@rspack/core 1.5.7 → 1.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Compilation.d.ts +2 -2
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/RuntimeModule.d.ts +1 -1
- package/dist/builtin-loader/swc/pluginImport.d.ts +2 -2
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +5 -0
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -2
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
- package/dist/builtin-plugin/URLPlugin.d.ts +9 -0
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/index.d.ts +2 -0
- package/dist/config/adapterRuleUse.d.ts +4 -1
- package/dist/config/devServer.d.ts +4 -4
- package/dist/config/normalization.d.ts +6 -3
- package/dist/config/types.d.ts +45 -6
- package/dist/container/ModuleFederationPlugin.d.ts +1 -1
- package/dist/cssExtractHmr.js +7 -8
- package/dist/cssExtractLoader.js +4 -5
- package/dist/exports.d.ts +3 -2
- package/dist/index.js +685 -679
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/schema/config.d.ts +16 -4
- package/dist/stats/statsFactoryUtils.d.ts +17 -0
- package/dist/util/ArrayQueue.d.ts +2 -2
- package/dist/util/comparators.d.ts +1 -1
- package/dist/worker.js +47 -48
- package/module.d.ts +0 -2
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -28,12 +28,11 @@ var __webpack_modules__ = {
|
|
|
28
28
|
if ("function" == typeof options && (callback = options, options = void 0), "string" != typeof path && !Buffer.isBuffer(path) && !(path instanceof URL) && "number" != typeof path) return void callback(TypeError("path must be a string, Buffer, URL or number"));
|
|
29
29
|
if (options) return this._provider.call(this._providerContext, path, options, callback);
|
|
30
30
|
let callbacks = this._activeAsyncOperations.get(path);
|
|
31
|
-
|
|
32
|
-
this._activeAsyncOperations.set(path, callbacks = [
|
|
31
|
+
callbacks ? callbacks.push(callback) : (this._activeAsyncOperations.set(path, callbacks = [
|
|
33
32
|
callback
|
|
34
33
|
]), provider(path, (err, result)=>{
|
|
35
34
|
this._activeAsyncOperations.delete(path), runCallbacks(callbacks, err, result);
|
|
36
|
-
});
|
|
35
|
+
}));
|
|
37
36
|
} : null, this.provideSync = this._syncProvider ? (path, options)=>this._syncProvider.call(this._providerContext, path, options) : null;
|
|
38
37
|
}
|
|
39
38
|
purge() {}
|
|
@@ -54,12 +53,11 @@ var __webpack_modules__ = {
|
|
|
54
53
|
let cacheEntry = this._data.get(strPath);
|
|
55
54
|
if (void 0 !== cacheEntry) return cacheEntry.err ? nextTick(callback, cacheEntry.err) : nextTick(callback, null, cacheEntry.result);
|
|
56
55
|
let callbacks = this._activeAsyncOperations.get(strPath);
|
|
57
|
-
|
|
58
|
-
this._activeAsyncOperations.set(strPath, callbacks = [
|
|
56
|
+
void 0 !== callbacks ? callbacks.push(callback) : (this._activeAsyncOperations.set(strPath, callbacks = [
|
|
59
57
|
callback
|
|
60
58
|
]), this._provider.call(this._providerContext, path, (err, result)=>{
|
|
61
59
|
this._activeAsyncOperations.delete(strPath), this._storeResult(strPath, err, result), this._enterAsyncMode(), runCallbacks(callbacks, err, result);
|
|
62
|
-
});
|
|
60
|
+
}));
|
|
63
61
|
}
|
|
64
62
|
provideSync(path, options) {
|
|
65
63
|
let result;
|
|
@@ -161,21 +159,21 @@ var __webpack_modules__ = {
|
|
|
161
159
|
module.exports = class {
|
|
162
160
|
constructor(fileSystem, duration){
|
|
163
161
|
this.fileSystem = fileSystem, this._lstatBackend = createBackend(duration, this.fileSystem.lstat, this.fileSystem.lstatSync, this.fileSystem);
|
|
164
|
-
|
|
162
|
+
const lstat = this._lstatBackend.provide;
|
|
165
163
|
this.lstat = lstat;
|
|
166
|
-
|
|
164
|
+
const lstatSync = this._lstatBackend.provideSync;
|
|
167
165
|
this.lstatSync = lstatSync, this._statBackend = createBackend(duration, this.fileSystem.stat, this.fileSystem.statSync, this.fileSystem);
|
|
168
|
-
|
|
166
|
+
const stat = this._statBackend.provide;
|
|
169
167
|
this.stat = stat;
|
|
170
|
-
|
|
168
|
+
const statSync = this._statBackend.provideSync;
|
|
171
169
|
this.statSync = statSync, this._readdirBackend = createBackend(duration, this.fileSystem.readdir, this.fileSystem.readdirSync, this.fileSystem);
|
|
172
|
-
|
|
170
|
+
const readdir = this._readdirBackend.provide;
|
|
173
171
|
this.readdir = readdir;
|
|
174
|
-
|
|
172
|
+
const readdirSync = this._readdirBackend.provideSync;
|
|
175
173
|
this.readdirSync = readdirSync, this._readFileBackend = createBackend(duration, this.fileSystem.readFile, this.fileSystem.readFileSync, this.fileSystem);
|
|
176
|
-
|
|
174
|
+
const readFile = this._readFileBackend.provide;
|
|
177
175
|
this.readFile = readFile;
|
|
178
|
-
|
|
176
|
+
const readFileSync = this._readFileBackend.provideSync;
|
|
179
177
|
this.readFileSync = readFileSync, this._readJsonBackend = createBackend(duration, this.fileSystem.readJson || this.readFile && ((path, callback)=>{
|
|
180
178
|
this.readFile(path, (err, buffer)=>{
|
|
181
179
|
let data;
|
|
@@ -189,17 +187,17 @@ var __webpack_modules__ = {
|
|
|
189
187
|
callback(null, data);
|
|
190
188
|
});
|
|
191
189
|
}), this.fileSystem.readJsonSync || this.readFileSync && ((path)=>JSON.parse(this.readFileSync(path).toString("utf8"))), this.fileSystem);
|
|
192
|
-
|
|
190
|
+
const readJson = this._readJsonBackend.provide;
|
|
193
191
|
this.readJson = readJson;
|
|
194
|
-
|
|
192
|
+
const readJsonSync = this._readJsonBackend.provideSync;
|
|
195
193
|
this.readJsonSync = readJsonSync, this._readlinkBackend = createBackend(duration, this.fileSystem.readlink, this.fileSystem.readlinkSync, this.fileSystem);
|
|
196
|
-
|
|
194
|
+
const readlink = this._readlinkBackend.provide;
|
|
197
195
|
this.readlink = readlink;
|
|
198
|
-
|
|
196
|
+
const readlinkSync = this._readlinkBackend.provideSync;
|
|
199
197
|
this.readlinkSync = readlinkSync, this._realpathBackend = createBackend(duration, this.fileSystem.realpath, this.fileSystem.realpathSync, this.fileSystem);
|
|
200
|
-
|
|
198
|
+
const realpath = this._realpathBackend.provide;
|
|
201
199
|
this.realpath = realpath;
|
|
202
|
-
|
|
200
|
+
const realpathSync = this._realpathBackend.provideSync;
|
|
203
201
|
this.realpathSync = realpathSync;
|
|
204
202
|
}
|
|
205
203
|
purge(what) {
|
|
@@ -728,7 +726,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
728
726
|
static STAGE_BASIC = 5;
|
|
729
727
|
static STAGE_ATTACH = 10;
|
|
730
728
|
static STAGE_TRIGGER = 20;
|
|
731
|
-
static __to_binding(
|
|
729
|
+
static __to_binding(module) {
|
|
732
730
|
return {
|
|
733
731
|
name: module.name,
|
|
734
732
|
stage: module.stage,
|
|
@@ -964,8 +962,8 @@ for(var __webpack_i__ in (()=>{
|
|
|
964
962
|
"context"
|
|
965
963
|
]))
|
|
966
964
|
});
|
|
967
|
-
|
|
968
|
-
for (
|
|
965
|
+
const hooks = this.hooks, caches = {};
|
|
966
|
+
for (const key of Object.keys(hooks))caches[key] = new Map();
|
|
969
967
|
this._caches = caches, this._inCreate = !1;
|
|
970
968
|
}
|
|
971
969
|
_getAllLevelHooks(hookMap, cache, type) {
|
|
@@ -1509,8 +1507,10 @@ for(var __webpack_i__ in (()=>{
|
|
|
1509
1507
|
#addEntryDispatcher;
|
|
1510
1508
|
[_computedKey];
|
|
1511
1509
|
constructor(compiler, inner){
|
|
1510
|
+
var name, stage, getArgs;
|
|
1511
|
+
let errorMessage, getOptions;
|
|
1512
1512
|
this.#inner = inner, this.#shutdown = !1;
|
|
1513
|
-
|
|
1513
|
+
const processAssetsHook = new lite_tapable_namespaceObject.AsyncSeriesHook([
|
|
1514
1514
|
"assets"
|
|
1515
1515
|
]);
|
|
1516
1516
|
this.hooks = {
|
|
@@ -1518,35 +1518,32 @@ for(var __webpack_i__ in (()=>{
|
|
|
1518
1518
|
afterProcessAssets: new lite_tapable_namespaceObject.SyncHook([
|
|
1519
1519
|
"assets"
|
|
1520
1520
|
]),
|
|
1521
|
-
additionalAssets: (
|
|
1522
|
-
let errorMessage = (reason)=>`Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}.
|
|
1521
|
+
additionalAssets: (name = "additionalAssets", stage = Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, getArgs = ()=>[], errorMessage = (reason)=>`Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}.
|
|
1523
1522
|
BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`, getOptions = (options)=>{
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
};
|
|
1523
|
+
let isString = "string" == typeof options;
|
|
1524
|
+
if (!isString && options.stage) throw Error(errorMessage("it's using the 'stage' option"));
|
|
1525
|
+
return {
|
|
1526
|
+
...isString ? {
|
|
1527
|
+
name: options
|
|
1528
|
+
} : options,
|
|
1529
|
+
stage: stage
|
|
1532
1530
|
};
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
})("additionalAssets", Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, ()=>[]),
|
|
1531
|
+
}, Object.freeze({
|
|
1532
|
+
name,
|
|
1533
|
+
intercept () {
|
|
1534
|
+
throw Error(errorMessage("it's using 'intercept'"));
|
|
1535
|
+
},
|
|
1536
|
+
tap: (options, fn)=>{
|
|
1537
|
+
processAssetsHook.tap(getOptions(options), ()=>fn(...getArgs()));
|
|
1538
|
+
},
|
|
1539
|
+
tapAsync: (options, fn)=>{
|
|
1540
|
+
processAssetsHook.tapAsync(getOptions(options), (assets, callback)=>fn(...getArgs(), callback));
|
|
1541
|
+
},
|
|
1542
|
+
tapPromise: (options, fn)=>{
|
|
1543
|
+
processAssetsHook.tapPromise(getOptions(options), ()=>fn(...getArgs()));
|
|
1544
|
+
},
|
|
1545
|
+
_fakeHook: !0
|
|
1546
|
+
})),
|
|
1550
1547
|
childCompiler: new lite_tapable_namespaceObject.SyncHook([
|
|
1551
1548
|
"childCompiler",
|
|
1552
1549
|
"compilerName",
|
|
@@ -1879,7 +1876,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
1879
1876
|
this.#rebuildModuleTask.exec(module.identifier(), f);
|
|
1880
1877
|
}
|
|
1881
1878
|
addRuntimeModule(chunk, runtimeModule) {
|
|
1882
|
-
runtimeModule.attach(this, chunk, this.chunkGraph), this.#inner.addRuntimeModule(chunk, RuntimeModule.__to_binding(
|
|
1879
|
+
runtimeModule.attach(this, chunk, this.chunkGraph), this.#inner.addRuntimeModule(chunk, RuntimeModule.__to_binding(runtimeModule));
|
|
1883
1880
|
}
|
|
1884
1881
|
addInclude(context, dependency, options, callback) {
|
|
1885
1882
|
this.#addIncludeDispatcher.call(context, dependency, options, callback);
|
|
@@ -2167,14 +2164,14 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2167
2164
|
class DeterministicChunkIdsPlugin extends builtin_plugin_base.Xj {
|
|
2168
2165
|
name = binding_.BuiltinPluginName.DeterministicChunkIdsPlugin;
|
|
2169
2166
|
affectedHooks = "compilation";
|
|
2170
|
-
raw(
|
|
2167
|
+
raw() {
|
|
2171
2168
|
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
2172
2169
|
}
|
|
2173
2170
|
}
|
|
2174
2171
|
class DeterministicModuleIdsPlugin extends builtin_plugin_base.Xj {
|
|
2175
2172
|
name = binding_.BuiltinPluginName.DeterministicModuleIdsPlugin;
|
|
2176
2173
|
affectedHooks = "compilation";
|
|
2177
|
-
raw(
|
|
2174
|
+
raw() {
|
|
2178
2175
|
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
2179
2176
|
}
|
|
2180
2177
|
}
|
|
@@ -2196,7 +2193,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2196
2193
|
}
|
|
2197
2194
|
}
|
|
2198
2195
|
static entryDescriptionToOptions(compiler, name, desc) {
|
|
2199
|
-
|
|
2196
|
+
return {
|
|
2200
2197
|
name,
|
|
2201
2198
|
filename: desc.filename,
|
|
2202
2199
|
runtime: desc.runtime,
|
|
@@ -2208,8 +2205,6 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
2208
2205
|
asyncChunks: desc.asyncChunks,
|
|
2209
2206
|
library: desc.library
|
|
2210
2207
|
};
|
|
2211
|
-
if (void 0 !== desc.layer && !compiler.options.experiments.layers) throw Error("'entryOptions.layer' is only allowed when 'experiments.layers' is enabled");
|
|
2212
|
-
return options;
|
|
2213
2208
|
}
|
|
2214
2209
|
}
|
|
2215
2210
|
let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
|
|
@@ -2304,7 +2299,22 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2304
2299
|
if (!enabled.has(type)) return enabled.add(type), (0, builtin_plugin_base.no)(this.name, type);
|
|
2305
2300
|
}
|
|
2306
2301
|
}
|
|
2307
|
-
let EnableWasmLoadingPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}),
|
|
2302
|
+
let EnableWasmLoadingPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}), RemoveDuplicateModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveDuplicateModulesPlugin, ()=>({}));
|
|
2303
|
+
class EsmLibraryPlugin {
|
|
2304
|
+
static PLUGIN_NAME = "EsmLibraryPlugin";
|
|
2305
|
+
apply(compiler) {
|
|
2306
|
+
var config;
|
|
2307
|
+
let err;
|
|
2308
|
+
new RemoveDuplicateModulesPlugin().apply(compiler);
|
|
2309
|
+
let { splitChunks } = compiler.options.optimization;
|
|
2310
|
+
if (splitChunks && (splitChunks.chunks = "all", splitChunks.minSize = 0), err = (config = compiler.options).optimization.concatenateModules ? "You should disable `config.optimization.concatenateModules`" : !1 !== config.output.chunkFormat ? "You should disable default chunkFormat by `config.output.chunkFormat = false`" : void 0) throw new src_0.WebpackError(`Conflicted config for ${EsmLibraryPlugin.PLUGIN_NAME}: ${err}`);
|
|
2311
|
+
compiler.__internal__registerBuiltinPlugin({
|
|
2312
|
+
name: binding_.BuiltinPluginName.EsmLibraryPlugin,
|
|
2313
|
+
options: {}
|
|
2314
|
+
});
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
let EvalDevToolModulePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation"), EvalSourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
|
|
2308
2318
|
function isNil(value) {
|
|
2309
2319
|
return null == value;
|
|
2310
2320
|
}
|
|
@@ -2739,7 +2749,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2739
2749
|
class Message extends Error {
|
|
2740
2750
|
constructor(){
|
|
2741
2751
|
super(), this.stack = void 0, Error.captureStackTrace(this);
|
|
2742
|
-
|
|
2752
|
+
const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP);
|
|
2743
2753
|
this.message = match?.[1] ? createMessage(match[1]) : createMessage();
|
|
2744
2754
|
}
|
|
2745
2755
|
}
|
|
@@ -2749,10 +2759,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2749
2759
|
}
|
|
2750
2760
|
}
|
|
2751
2761
|
class Hash {
|
|
2752
|
-
update(
|
|
2762
|
+
update() {
|
|
2753
2763
|
throw new AbstractMethodError();
|
|
2754
2764
|
}
|
|
2755
|
-
digest(
|
|
2765
|
+
digest() {
|
|
2756
2766
|
throw new AbstractMethodError();
|
|
2757
2767
|
}
|
|
2758
2768
|
}
|
|
@@ -2765,7 +2775,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2765
2775
|
chunkSize;
|
|
2766
2776
|
digestSize;
|
|
2767
2777
|
constructor(instance, instancesPool, chunkSize, digestSize){
|
|
2768
|
-
|
|
2778
|
+
const exports1 = instance.exports;
|
|
2769
2779
|
exports1.init(), this.exports = exports1, this.mem = Buffer.from(exports1.memory.buffer, 0, 65536), this.buffered = 0, this.instancesPool = instancesPool, this.chunkSize = chunkSize, this.digestSize = digestSize;
|
|
2770
2780
|
}
|
|
2771
2781
|
reset() {
|
|
@@ -2869,7 +2879,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2869
2879
|
constructor(){
|
|
2870
2880
|
super(), this.string = "";
|
|
2871
2881
|
}
|
|
2872
|
-
update(data
|
|
2882
|
+
update(data) {
|
|
2873
2883
|
let normalizedData;
|
|
2874
2884
|
return (normalizedData = Buffer.isBuffer(data) ? data.toString("utf-8") : data).startsWith("debug-digest-") && (normalizedData = Buffer.from(normalizedData.slice(13), "hex").toString()), this.string += `[${normalizedData}](${Error().stack?.split("\n", 3)[2]})\n`, this;
|
|
2875
2885
|
}
|
|
@@ -3119,35 +3129,34 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3119
3129
|
parallel;
|
|
3120
3130
|
loaderItem;
|
|
3121
3131
|
constructor(loaderItem, compiler){
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
}
|
|
3147
|
-
obj.type = "" === value.type ? void 0 : value.type, null === obj.options || void 0 === obj.options ? obj.query = "" : "string" == typeof obj.options ? obj.query = `?${obj.options}` : obj.ident ? obj.query = `??${obj.ident}` : "object" == typeof obj.options && obj.options.ident ? obj.query = `??${obj.options.ident}` : obj.query = `?${JSON.stringify(obj.options)}`;
|
|
3132
|
+
var loader, compiler1;
|
|
3133
|
+
let obj;
|
|
3134
|
+
const { request, path, query, fragment, options, ident, normal, pitch, raw, type } = (loader = loaderItem, compiler1 = compiler, Object.defineProperty(obj = {
|
|
3135
|
+
path: null,
|
|
3136
|
+
query: null,
|
|
3137
|
+
fragment: null,
|
|
3138
|
+
options: null,
|
|
3139
|
+
ident: null,
|
|
3140
|
+
normal: null,
|
|
3141
|
+
pitch: null,
|
|
3142
|
+
raw: null,
|
|
3143
|
+
data: null,
|
|
3144
|
+
pitchExecuted: !1,
|
|
3145
|
+
normalExecuted: !1
|
|
3146
|
+
}, "request", {
|
|
3147
|
+
enumerable: !0,
|
|
3148
|
+
get: ()=>obj.path.replace(/#/g, "\u200b#") + obj.query.replace(/#/g, "\u200b#") + obj.fragment,
|
|
3149
|
+
set: (value)=>{
|
|
3150
|
+
let splittedRequest = parseResourceWithoutFragment(value.loader);
|
|
3151
|
+
if (obj.path = splittedRequest.path, obj.query = splittedRequest.query, obj.fragment = "", obj.options = null === obj.options ? splittedRequest.query ? splittedRequest.query.slice(1) : void 0 : obj.options, "string" == typeof obj.options && "?" === obj.options[0]) {
|
|
3152
|
+
let ident = obj.options.slice(1);
|
|
3153
|
+
if ("[[missing ident]]" === ident) throw Error("No ident is provided by referenced loader. When using a function for Rule.use in config you need to provide an 'ident' property for referenced loader options.");
|
|
3154
|
+
if (obj.options = compiler1.__internal__ruleSet.references.get(ident), void 0 === obj.options) throw Error("Invalid ident is provided by referenced loader");
|
|
3155
|
+
obj.ident = ident;
|
|
3148
3156
|
}
|
|
3149
|
-
|
|
3150
|
-
|
|
3157
|
+
obj.type = "" === value.type ? void 0 : value.type, null === obj.options || void 0 === obj.options ? obj.query = "" : "string" == typeof obj.options ? obj.query = `?${obj.options}` : obj.ident ? obj.query = `??${obj.ident}` : "object" == typeof obj.options && obj.options.ident ? obj.query = `??${obj.options.ident}` : obj.query = `?${JSON.stringify(obj.options)}`;
|
|
3158
|
+
}
|
|
3159
|
+
}), obj.request = loader, Object.preventExtensions && Object.preventExtensions(obj), obj);
|
|
3151
3160
|
this.request = request, this.path = path, this.query = query, this.fragment = fragment, this.options = options, this.ident = ident, this.normal = normal, this.pitch = pitch, this.raw = raw, this.type = type, this.parallel = !!ident && compiler.__internal__ruleSet.references.get(`${ident}$$parallelism`), this.loaderItem = loaderItem, this.loaderItem.data = this.loaderItem.data ?? {};
|
|
3152
3161
|
}
|
|
3153
3162
|
get pitchExecuted() {
|
|
@@ -3413,9 +3422,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3413
3422
|
is_pitch: pitch,
|
|
3414
3423
|
resource: resource
|
|
3415
3424
|
}
|
|
3416
|
-
}), parallelism)
|
|
3417
|
-
|
|
3418
|
-
|
|
3425
|
+
}), parallelism) {
|
|
3426
|
+
let normalModule, workerLoaderContext;
|
|
3427
|
+
result = await service_run(loaderName, {
|
|
3428
|
+
loaderContext: (normalModule = loaderContext._module instanceof binding_.NormalModule ? loaderContext._module : void 0, Object.assign(workerLoaderContext = {
|
|
3419
3429
|
hot: loaderContext.hot,
|
|
3420
3430
|
context: loaderContext.context,
|
|
3421
3431
|
resourcePath: loaderContext.resourcePath,
|
|
@@ -3468,125 +3478,125 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3468
3478
|
userRequest: normalModule?.userRequest,
|
|
3469
3479
|
rawRequest: normalModule?.rawRequest
|
|
3470
3480
|
}
|
|
3471
|
-
}
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
case "AddDependency":
|
|
3480
|
-
loaderContext.addDependency(args[0]);
|
|
3481
|
-
break;
|
|
3482
|
-
case "AddContextDependency":
|
|
3483
|
-
loaderContext.addContextDependency(args[0]);
|
|
3484
|
-
break;
|
|
3485
|
-
case "AddMissingDependency":
|
|
3486
|
-
loaderContext.addMissingDependency(args[0]);
|
|
3487
|
-
break;
|
|
3488
|
-
case "AddBuildDependency":
|
|
3489
|
-
loaderContext.addBuildDependency(args[0]);
|
|
3490
|
-
break;
|
|
3491
|
-
case "GetDependencies":
|
|
3492
|
-
return loaderContext.getDependencies();
|
|
3493
|
-
case "GetContextDependencies":
|
|
3494
|
-
return loaderContext.getContextDependencies();
|
|
3495
|
-
case "GetMissingDependencies":
|
|
3496
|
-
return loaderContext.getMissingDependencies();
|
|
3497
|
-
case "ClearDependencies":
|
|
3498
|
-
loaderContext.clearDependencies();
|
|
3499
|
-
break;
|
|
3500
|
-
case "Resolve":
|
|
3501
|
-
return new Promise((resolve, reject)=>{
|
|
3502
|
-
loaderContext.resolve(args[0], args[1], (err, result)=>{
|
|
3503
|
-
err ? reject(err) : resolve(result);
|
|
3504
|
-
});
|
|
3505
|
-
});
|
|
3506
|
-
case "GetResolve":
|
|
3507
|
-
return new Promise((resolve, reject)=>{
|
|
3508
|
-
loaderContext.getResolve(args[0])(args[1], args[2], (err, result)=>{
|
|
3509
|
-
err ? reject(err) : resolve(result);
|
|
3510
|
-
});
|
|
3511
|
-
});
|
|
3512
|
-
case "GetLogger":
|
|
3513
|
-
{
|
|
3514
|
-
let [type, name, arg] = args;
|
|
3515
|
-
loaderContext.getLogger(name)[type](...arg);
|
|
3516
|
-
}
|
|
3517
|
-
case "EmitError":
|
|
3518
|
-
{
|
|
3519
|
-
let workerError = args[0], error = Error(workerError.message);
|
|
3520
|
-
error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitError(error);
|
|
3481
|
+
}, compiler.options.loader), workerLoaderContext),
|
|
3482
|
+
loaderState,
|
|
3483
|
+
args
|
|
3484
|
+
}, {
|
|
3485
|
+
handleIncomingRequest (requestType, ...args) {
|
|
3486
|
+
switch(requestType){
|
|
3487
|
+
case "AddDependency":
|
|
3488
|
+
loaderContext.addDependency(args[0]);
|
|
3521
3489
|
break;
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
{
|
|
3525
|
-
let workerError = args[0], error = Error(workerError.message);
|
|
3526
|
-
error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitWarning(error);
|
|
3490
|
+
case "AddContextDependency":
|
|
3491
|
+
loaderContext.addContextDependency(args[0]);
|
|
3527
3492
|
break;
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
{
|
|
3531
|
-
let [name, content, sourceMap, assetInfo] = args;
|
|
3532
|
-
loaderContext.emitFile(name, content, sourceMap, assetInfo);
|
|
3493
|
+
case "AddMissingDependency":
|
|
3494
|
+
loaderContext.addMissingDependency(args[0]);
|
|
3533
3495
|
break;
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
{
|
|
3537
|
-
let diagnostic = args[0];
|
|
3538
|
-
loaderContext.experiments.emitDiagnostic(diagnostic);
|
|
3496
|
+
case "AddBuildDependency":
|
|
3497
|
+
loaderContext.addBuildDependency(args[0]);
|
|
3539
3498
|
break;
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3499
|
+
case "GetDependencies":
|
|
3500
|
+
return loaderContext.getDependencies();
|
|
3501
|
+
case "GetContextDependencies":
|
|
3502
|
+
return loaderContext.getContextDependencies();
|
|
3503
|
+
case "GetMissingDependencies":
|
|
3504
|
+
return loaderContext.getMissingDependencies();
|
|
3505
|
+
case "ClearDependencies":
|
|
3506
|
+
loaderContext.clearDependencies();
|
|
3545
3507
|
break;
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
let updates = args[0];
|
|
3552
|
-
loaderContext.loaders = loaderContext.loaders.map((item, index)=>{
|
|
3553
|
-
let update = updates[index];
|
|
3554
|
-
return item.loaderItem.data = update.data, update.pitchExecuted && (item.pitchExecuted = !0), update.normalExecuted && (item.normalExecuted = !0), item;
|
|
3508
|
+
case "Resolve":
|
|
3509
|
+
return new Promise((resolve, reject)=>{
|
|
3510
|
+
loaderContext.resolve(args[0], args[1], (err, result)=>{
|
|
3511
|
+
err ? reject(err) : resolve(result);
|
|
3512
|
+
});
|
|
3555
3513
|
});
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3514
|
+
case "GetResolve":
|
|
3515
|
+
return new Promise((resolve, reject)=>{
|
|
3516
|
+
loaderContext.getResolve(args[0])(args[1], args[2], (err, result)=>{
|
|
3517
|
+
err ? reject(err) : resolve(result);
|
|
3518
|
+
});
|
|
3519
|
+
});
|
|
3520
|
+
case "GetLogger":
|
|
3521
|
+
{
|
|
3522
|
+
let [type, name, arg] = args;
|
|
3523
|
+
loaderContext.getLogger(name)[type](...arg);
|
|
3524
|
+
break;
|
|
3525
|
+
}
|
|
3526
|
+
case "EmitError":
|
|
3527
|
+
{
|
|
3528
|
+
let workerError = args[0], error = Error(workerError.message);
|
|
3529
|
+
error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitError(error);
|
|
3530
|
+
break;
|
|
3531
|
+
}
|
|
3532
|
+
case "EmitWarning":
|
|
3533
|
+
{
|
|
3534
|
+
let workerError = args[0], error = Error(workerError.message);
|
|
3535
|
+
error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitWarning(error);
|
|
3536
|
+
break;
|
|
3537
|
+
}
|
|
3538
|
+
case "EmitFile":
|
|
3539
|
+
{
|
|
3540
|
+
let [name, content, sourceMap, assetInfo] = args;
|
|
3541
|
+
loaderContext.emitFile(name, content, sourceMap, assetInfo);
|
|
3542
|
+
break;
|
|
3543
|
+
}
|
|
3544
|
+
case "EmitDiagnostic":
|
|
3545
|
+
{
|
|
3546
|
+
let diagnostic = args[0];
|
|
3547
|
+
loaderContext.experiments.emitDiagnostic(diagnostic);
|
|
3548
|
+
break;
|
|
3549
|
+
}
|
|
3550
|
+
case "SetCacheable":
|
|
3551
|
+
{
|
|
3552
|
+
let cacheable = args[0];
|
|
3553
|
+
loaderContext.cacheable(cacheable);
|
|
3554
|
+
break;
|
|
3555
|
+
}
|
|
3556
|
+
case "ImportModule":
|
|
3557
|
+
return loaderContext.importModule(args[0], args[1]);
|
|
3558
|
+
case "UpdateLoaderObjects":
|
|
3559
|
+
{
|
|
3560
|
+
let updates = args[0];
|
|
3561
|
+
loaderContext.loaders = loaderContext.loaders.map((item, index)=>{
|
|
3562
|
+
let update = updates[index];
|
|
3563
|
+
return item.loaderItem.data = update.data, update.pitchExecuted && (item.pitchExecuted = !0), update.normalExecuted && (item.normalExecuted = !0), item;
|
|
3564
|
+
});
|
|
3565
|
+
break;
|
|
3566
|
+
}
|
|
3567
|
+
case "CompilationGetPath":
|
|
3568
|
+
{
|
|
3569
|
+
let filename = args[0], data = args[1];
|
|
3570
|
+
return compiler._lastCompilation.getPath(filename, data);
|
|
3571
|
+
}
|
|
3572
|
+
case "CompilationGetPathWithInfo":
|
|
3573
|
+
{
|
|
3574
|
+
let filename = args[0], data = args[1];
|
|
3575
|
+
return compiler._lastCompilation.getPathWithInfo(filename, data);
|
|
3576
|
+
}
|
|
3577
|
+
case "CompilationGetAssetPath":
|
|
3578
|
+
{
|
|
3579
|
+
let filename = args[0], data = args[1];
|
|
3580
|
+
return compiler._lastCompilation.getAssetPath(filename, data);
|
|
3581
|
+
}
|
|
3582
|
+
case "CompilationGetAssetPathWithInfo":
|
|
3583
|
+
{
|
|
3584
|
+
let filename = args[0], data = args[1];
|
|
3585
|
+
return compiler._lastCompilation.getAssetPathWithInfo(filename, data);
|
|
3586
|
+
}
|
|
3587
|
+
default:
|
|
3588
|
+
throw Error(`Unknown request type: ${requestType}`);
|
|
3589
|
+
}
|
|
3580
3590
|
}
|
|
3581
|
-
}
|
|
3582
|
-
})
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
}
|
|
3591
|
+
}) || [];
|
|
3592
|
+
} else loaderState === binding_.JsLoaderState.Normal && function(args, raw) {
|
|
3593
|
+
if (!raw && args[0] instanceof Uint8Array) {
|
|
3594
|
+
var buf;
|
|
3595
|
+
let str;
|
|
3596
|
+
args[0] = (buf = args[0], 0xfeff === (str = decoder.decode(buf.buffer instanceof SharedArrayBuffer ? Buffer.from(buf) : buf)).charCodeAt(0) ? str.slice(1) : str);
|
|
3597
|
+
} else raw && "string" == typeof args[0] && (args[0] = Buffer.from(args[0], "utf-8"));
|
|
3598
|
+
raw && args[0] instanceof Uint8Array && !Buffer.isBuffer(args[0]) && (args[0] = Buffer.from(args[0].buffer));
|
|
3599
|
+
}(args, !!currentLoaderObject?.raw), result = await utils_runSyncOrAsync(fn, loaderContext, args) || [];
|
|
3590
3600
|
return JavaScriptTracer.endAsync({
|
|
3591
3601
|
name: loaderName,
|
|
3592
3602
|
trackName: loaderName,
|
|
@@ -3686,39 +3696,45 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3686
3696
|
let o, isBuiltin = !1;
|
|
3687
3697
|
if (use.loader.startsWith(BUILTIN_LOADER_PREFIX)) {
|
|
3688
3698
|
let temp = function(identifier, o, options) {
|
|
3689
|
-
if (identifier.startsWith(`${BUILTIN_LOADER_PREFIX}swc-loader`)) {
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3699
|
+
if (identifier.startsWith(`${BUILTIN_LOADER_PREFIX}swc-loader`)) return ((options, _)=>{
|
|
3700
|
+
if (options && "object" == typeof options) {
|
|
3701
|
+
options.jsc ??= {}, options.jsc.experimental ??= {}, options.jsc.experimental.disableAllLints ??= !0;
|
|
3702
|
+
let { rspackExperiments } = options;
|
|
3703
|
+
if (rspackExperiments) {
|
|
3704
|
+
var options1;
|
|
3705
|
+
(rspackExperiments.import || rspackExperiments.pluginImport) && (rspackExperiments.import = function(pluginImport) {
|
|
3706
|
+
if (pluginImport) return pluginImport.map((config)=>{
|
|
3707
|
+
let rawConfig = {
|
|
3708
|
+
...config,
|
|
3709
|
+
style: {}
|
|
3710
|
+
};
|
|
3711
|
+
if ("boolean" == typeof config.style) rawConfig.style.bool = config.style;
|
|
3712
|
+
else if ("string" == typeof config.style) {
|
|
3713
|
+
let isTpl = config.style.includes("{{");
|
|
3714
|
+
rawConfig.style[isTpl ? "custom" : "css"] = config.style;
|
|
3715
|
+
} else {
|
|
3716
|
+
var val;
|
|
3717
|
+
val = config.style, "[object Object]" === Object.prototype.toString.call(val) && (rawConfig.style = config.style);
|
|
3718
|
+
}
|
|
3719
|
+
return config.styleLibraryDirectory && (rawConfig.style = {
|
|
3720
|
+
styleLibraryDirectory: config.styleLibraryDirectory
|
|
3721
|
+
}), rawConfig;
|
|
3722
|
+
});
|
|
3723
|
+
}(rspackExperiments.import || rspackExperiments.pluginImport)), rspackExperiments.collectTypeScriptInfo && (rspackExperiments.collectTypeScriptInfo = {
|
|
3724
|
+
typeExports: (options1 = rspackExperiments.collectTypeScriptInfo).typeExports,
|
|
3725
|
+
exportedEnum: !0 === options1.exportedEnum ? "all" : !1 === options1.exportedEnum || void 0 === options1.exportedEnum ? "none" : "const-only"
|
|
3711
3726
|
});
|
|
3712
|
-
}
|
|
3713
|
-
typeExports: (options1 = rspackExperiments.collectTypeScriptInfo).typeExports,
|
|
3714
|
-
exportedEnum: !0 === options1.exportedEnum ? "all" : !1 === options1.exportedEnum || void 0 === options1.exportedEnum ? "none" : "const-only"
|
|
3715
|
-
}));
|
|
3727
|
+
}
|
|
3716
3728
|
}
|
|
3717
|
-
return
|
|
3729
|
+
return options;
|
|
3730
|
+
})(o, 0);
|
|
3731
|
+
if (identifier.startsWith(`${BUILTIN_LOADER_PREFIX}lightningcss-loader`)) {
|
|
3732
|
+
var o1;
|
|
3733
|
+
return (o1 = o) && "object" == typeof o1 && ("string" == typeof o1.targets && (o1.targets = [
|
|
3734
|
+
o1.targets
|
|
3735
|
+
]), o1.include && "object" == typeof o1.include && (o1.include = toFeatures(o1.include)), o1.exclude && "object" == typeof o1.exclude && (o1.exclude = toFeatures(o1.exclude))), o1;
|
|
3718
3736
|
}
|
|
3719
|
-
return
|
|
3720
|
-
o1.targets
|
|
3721
|
-
]), o1.include && "object" == typeof o1.include && (o1.include = toFeatures(o1.include)), o1.exclude && "object" == typeof o1.exclude && (o1.exclude = toFeatures(o1.exclude))), o1) : o;
|
|
3737
|
+
return o;
|
|
3722
3738
|
}(use.loader, use.options, 0);
|
|
3723
3739
|
o = isNil(temp) ? void 0 : "string" == typeof temp ? temp : JSON.stringify(temp, null, 2), isBuiltin = !0;
|
|
3724
3740
|
}
|
|
@@ -3832,7 +3848,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3832
3848
|
resolve: rule.resolve ? getRawResolve(rule.resolve) : void 0,
|
|
3833
3849
|
oneOf: rule.oneOf ? rule.oneOf.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.oneOf[${index}]`, options, rule.type ?? upperType)) : void 0,
|
|
3834
3850
|
rules: rule.rules ? rule.rules.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.rules[${index}]`, options, rule.type ?? upperType)) : void 0,
|
|
3835
|
-
enforce: rule.enforce
|
|
3851
|
+
enforce: rule.enforce,
|
|
3852
|
+
extractSourceMap: rule.extractSourceMap
|
|
3836
3853
|
};
|
|
3837
3854
|
return ("function" == typeof rule.test || "function" == typeof rule.resource || "function" == typeof rule.resourceQuery || "function" == typeof rule.resourceFragment) && (delete rawModuleRule.test, delete rawModuleRule.resource, delete rawModuleRule.resourceQuery, delete rawModuleRule.resourceFragment, rawModuleRule.rspackResource = getRawRuleSetCondition((resourceQueryFragment)=>{
|
|
3838
3855
|
let { path, query, fragment } = parseResource(resourceQueryFragment);
|
|
@@ -3951,6 +3968,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3951
3968
|
requireAsExpression: parser.requireAsExpression,
|
|
3952
3969
|
requireDynamic: parser.requireDynamic,
|
|
3953
3970
|
requireResolve: parser.requireResolve,
|
|
3971
|
+
commonjs: parser.commonjs,
|
|
3954
3972
|
importDynamic: parser.importDynamic,
|
|
3955
3973
|
commonjsMagicComments: parser.commonjsMagicComments,
|
|
3956
3974
|
inlineConst: parser.inlineConst,
|
|
@@ -4147,7 +4165,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4147
4165
|
constructor(global){
|
|
4148
4166
|
super(), this.global = global;
|
|
4149
4167
|
}
|
|
4150
|
-
raw(
|
|
4168
|
+
raw() {
|
|
4151
4169
|
return (0, builtin_plugin_base.no)(this.name, this.global);
|
|
4152
4170
|
}
|
|
4153
4171
|
}
|
|
@@ -4172,11 +4190,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4172
4190
|
chunks.push(chunk);
|
|
4173
4191
|
}), stream.on("end", ()=>{
|
|
4174
4192
|
let bodyBuffer = Buffer.concat(chunks);
|
|
4175
|
-
|
|
4176
|
-
resolve({
|
|
4193
|
+
res.complete ? resolve({
|
|
4177
4194
|
res,
|
|
4178
4195
|
body: bodyBuffer
|
|
4179
|
-
});
|
|
4196
|
+
}) : reject(Error(`${url} request was terminated early`));
|
|
4180
4197
|
});
|
|
4181
4198
|
}).on("error", reject);
|
|
4182
4199
|
});
|
|
@@ -4446,11 +4463,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4446
4463
|
var _a;
|
|
4447
4464
|
(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
|
|
4448
4465
|
}), inst._zod.check = (payload)=>{
|
|
4466
|
+
var val, step;
|
|
4467
|
+
let valDecCount, stepDecCount, decCount, valInt;
|
|
4449
4468
|
if (typeof payload.value != typeof def.value) throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
4450
|
-
("bigint" == typeof payload.value ? payload.value % def.value === BigInt(0) : 0
|
|
4451
|
-
let valDecCount = (val.toString().split(".")[1] || "").length, stepDecCount = (step.toString().split(".")[1] || "").length, decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount, valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
4452
|
-
return valInt % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
|
|
4453
|
-
}(payload.value, def.value)) || payload.issues.push({
|
|
4469
|
+
("bigint" == typeof payload.value ? payload.value % def.value === BigInt(0) : 0 == (val = payload.value, step = def.value, valDecCount = (val.toString().split(".")[1] || "").length, stepDecCount = (step.toString().split(".")[1] || "").length, decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount, (valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""))) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount)) || payload.issues.push({
|
|
4454
4470
|
origin: typeof payload.value,
|
|
4455
4471
|
code: "not_multiple_of",
|
|
4456
4472
|
divisor: def.value,
|
|
@@ -4812,12 +4828,11 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4812
4828
|
version: 1
|
|
4813
4829
|
};
|
|
4814
4830
|
}), $ZodString = $constructor("$ZodString", (inst, def)=>{
|
|
4831
|
+
var params;
|
|
4832
|
+
let regex;
|
|
4815
4833
|
$ZodType.init(inst, def), inst._zod.pattern = [
|
|
4816
4834
|
...inst?._zod.bag?.patterns ?? []
|
|
4817
|
-
].pop() ?? ((params)=>{
|
|
4818
|
-
let regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
4819
|
-
return RegExp(`^${regex}$`);
|
|
4820
|
-
})(inst._zod.bag), inst._zod.parse = (payload, _)=>{
|
|
4835
|
+
].pop() ?? (regex = (params = inst._zod.bag) ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : "[\\s\\S]*", RegExp(`^${regex}$`)), inst._zod.parse = (payload, _)=>{
|
|
4821
4836
|
if (def.coerce) try {
|
|
4822
4837
|
payload.value = String(payload.value);
|
|
4823
4838
|
} catch (_) {}
|
|
@@ -4897,16 +4912,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4897
4912
|
}), $ZodKSUID = $constructor("$ZodKSUID", (inst, def)=>{
|
|
4898
4913
|
def.pattern ?? (def.pattern = ksuid), $ZodStringFormat.init(inst, def);
|
|
4899
4914
|
}), $ZodISODateTime = $constructor("$ZodISODateTime", (inst, def)=>{
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
let timeRegex = `${time}(?:${opts.join("|")})`;
|
|
4908
|
-
return RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
4909
|
-
}(def)), $ZodStringFormat.init(inst, def);
|
|
4915
|
+
var args;
|
|
4916
|
+
let time, opts, timeRegex;
|
|
4917
|
+
def.pattern ?? (time = timeSource({
|
|
4918
|
+
precision: (args = def).precision
|
|
4919
|
+
}), opts = [
|
|
4920
|
+
"Z"
|
|
4921
|
+
], args.local && opts.push(""), args.offset && opts.push("([+-]\\d{2}:\\d{2})"), timeRegex = `${time}(?:${opts.join("|")})`, def.pattern = RegExp(`^${dateSource}T(?:${timeRegex})$`)), $ZodStringFormat.init(inst, def);
|
|
4910
4922
|
}), $ZodISODate = $constructor("$ZodISODate", (inst, def)=>{
|
|
4911
4923
|
def.pattern ?? (def.pattern = regexes_date), $ZodStringFormat.init(inst, def);
|
|
4912
4924
|
}), $ZodISOTime = $constructor("$ZodISOTime", (inst, def)=>{
|
|
@@ -5448,11 +5460,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5448
5460
|
return proms.length ? Promise.all(proms).then(()=>payload) : payload;
|
|
5449
5461
|
};
|
|
5450
5462
|
}), $ZodEnum = $constructor("$ZodEnum", (inst, def)=>{
|
|
5463
|
+
var entries;
|
|
5464
|
+
let numericValues;
|
|
5451
5465
|
$ZodType.init(inst, def);
|
|
5452
|
-
let values =
|
|
5453
|
-
let numericValues = Object.values(entries).filter((v)=>"number" == typeof v);
|
|
5454
|
-
return Object.entries(entries).filter(([k, _])=>-1 === numericValues.indexOf(+k)).map(([_, v])=>v);
|
|
5455
|
-
}(def.entries);
|
|
5466
|
+
let values = (numericValues = Object.values(entries = def.entries).filter((v)=>"number" == typeof v), Object.entries(entries).filter(([k, _])=>-1 === numericValues.indexOf(+k)).map(([_, v])=>v));
|
|
5456
5467
|
inst._zod.values = new Set(values), inst._zod.pattern = RegExp(`^(${values.filter((k)=>propertyKeyTypes.has(typeof k)).map((o)=>"string" == typeof o ? escapeRegex(o) : o.toString()).join("|")})$`), inst._zod.parse = (payload, _ctx)=>{
|
|
5457
5468
|
let input = payload.value;
|
|
5458
5469
|
return inst._zod.values.has(input) || payload.issues.push({
|
|
@@ -5711,36 +5722,37 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5711
5722
|
}), classic_errors_initializer = (inst, issues)=>{
|
|
5712
5723
|
$ZodError.init(inst, issues), inst.name = "ZodError", Object.defineProperties(inst, {
|
|
5713
5724
|
format: {
|
|
5714
|
-
value: (mapper)=>
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5725
|
+
value: (mapper)=>{
|
|
5726
|
+
var error;
|
|
5727
|
+
let mapper1, fieldErrors, processError;
|
|
5728
|
+
return error = inst, mapper1 = mapper || function(issue) {
|
|
5729
|
+
return issue.message;
|
|
5730
|
+
}, fieldErrors = {
|
|
5731
|
+
_errors: []
|
|
5732
|
+
}, (processError = (error)=>{
|
|
5733
|
+
for (let issue of error.issues)if ("invalid_union" === issue.code && issue.errors.length) issue.errors.map((issues)=>processError({
|
|
5734
|
+
issues
|
|
5735
|
+
}));
|
|
5736
|
+
else if ("invalid_key" === issue.code) processError({
|
|
5737
|
+
issues: issue.issues
|
|
5738
|
+
});
|
|
5739
|
+
else if ("invalid_element" === issue.code) processError({
|
|
5740
|
+
issues: issue.issues
|
|
5741
|
+
});
|
|
5742
|
+
else if (0 === issue.path.length) fieldErrors._errors.push(mapper1(issue));
|
|
5743
|
+
else {
|
|
5744
|
+
let curr = fieldErrors, i = 0;
|
|
5745
|
+
for(; i < issue.path.length;){
|
|
5746
|
+
let el = issue.path[i];
|
|
5747
|
+
i === issue.path.length - 1 ? (curr[el] = curr[el] || {
|
|
5748
|
+
_errors: []
|
|
5749
|
+
}, curr[el]._errors.push(mapper1(issue))) : curr[el] = curr[el] || {
|
|
5750
|
+
_errors: []
|
|
5751
|
+
}, curr = curr[el], i++;
|
|
5740
5752
|
}
|
|
5741
|
-
}
|
|
5742
|
-
|
|
5743
|
-
|
|
5753
|
+
}
|
|
5754
|
+
})(error), fieldErrors;
|
|
5755
|
+
}
|
|
5744
5756
|
},
|
|
5745
5757
|
flatten: {
|
|
5746
5758
|
value: (mapper)=>(function(error, mapper = (issue)=>issue.message) {
|
|
@@ -5822,17 +5834,15 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5822
5834
|
fn: fn,
|
|
5823
5835
|
...normalizeParams(_params)
|
|
5824
5836
|
});
|
|
5825
|
-
}(check, params)), inst.superRefine = (refinement)=>
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
return ch;
|
|
5835
|
-
}(refinement)), inst.overwrite = (fn)=>inst.check(_overwrite(fn)), inst.optional = ()=>schemas_optional(inst), inst.nullable = ()=>nullable(inst), inst.nullish = ()=>schemas_optional(nullable(inst)), inst.nonoptional = (params)=>new ZodNonOptional({
|
|
5837
|
+
}(check, params)), inst.superRefine = (refinement)=>{
|
|
5838
|
+
var fn, fn1;
|
|
5839
|
+
let ch, ch1;
|
|
5840
|
+
return inst.check((fn = refinement, ch1 = (fn1 = (payload)=>(payload.addIssue = (issue)=>{
|
|
5841
|
+
"string" == typeof issue ? payload.issues.push(util_issue(issue, payload.value, ch1._zod.def)) : (issue.fatal && (issue.continue = !1), issue.code ?? (issue.code = "custom"), issue.input ?? (issue.input = payload.value), issue.inst ?? (issue.inst = ch1), issue.continue ?? (issue.continue = !ch1._zod.def.abort), payload.issues.push(util_issue(issue)));
|
|
5842
|
+
}, fn(payload.value, payload)), (ch = new $ZodCheck({
|
|
5843
|
+
check: "custom"
|
|
5844
|
+
}))._zod.check = fn1, ch)));
|
|
5845
|
+
}, inst.overwrite = (fn)=>inst.check(_overwrite(fn)), inst.optional = ()=>schemas_optional(inst), inst.nullable = ()=>nullable(inst), inst.nullish = ()=>schemas_optional(nullable(inst)), inst.nonoptional = (params)=>new ZodNonOptional({
|
|
5836
5846
|
type: "nonoptional",
|
|
5837
5847
|
innerType: inst,
|
|
5838
5848
|
...normalizeParams(params)
|
|
@@ -6493,9 +6503,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
6493
6503
|
$ZodCustom.init(inst, def), ZodType.init(inst, def);
|
|
6494
6504
|
});
|
|
6495
6505
|
function custom(fn, _params) {
|
|
6496
|
-
var Class
|
|
6497
|
-
let norm
|
|
6498
|
-
return norm.abort ?? (norm.abort = !0), new Class({
|
|
6506
|
+
var Class, fn1;
|
|
6507
|
+
let norm;
|
|
6508
|
+
return Class = ZodCustom, fn1 = fn ?? (()=>!0), (norm = normalizeParams(_params)).abort ?? (norm.abort = !0), new Class({
|
|
6499
6509
|
type: "custom",
|
|
6500
6510
|
check: "custom",
|
|
6501
6511
|
fn: fn1,
|
|
@@ -7158,9 +7168,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7158
7168
|
let json = JSON.parse(data);
|
|
7159
7169
|
"function" != typeof c.templateParameters && (json.compilation = compilation);
|
|
7160
7170
|
let renderTag = function() {
|
|
7161
|
-
var tag
|
|
7162
|
-
let attributes
|
|
7163
|
-
return `<${[
|
|
7171
|
+
var tag;
|
|
7172
|
+
let attributes;
|
|
7173
|
+
return tag = this, attributes = Object.keys(tag.attributes || {}).filter((attributeName)=>"" === tag.attributes[attributeName] || tag.attributes[attributeName]).map((attributeName)=>"true" === tag.attributes[attributeName] ? attributeName : `${attributeName}="${tag.attributes[attributeName]}"`), `<${[
|
|
7164
7174
|
tag.tagName
|
|
7165
7175
|
].concat(attributes).join(" ")}${tag.voidTag && !tag.innerHTML ? "/" : ""}>${tag.innerHTML || ""}${tag.voidTag && !tag.innerHTML ? "" : `</${tag.tagName}>`}`;
|
|
7166
7176
|
}, renderTagList = function() {
|
|
@@ -7177,14 +7187,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7177
7187
|
return json;
|
|
7178
7188
|
}
|
|
7179
7189
|
this.hooks.compilation.tap("HtmlRspackPlugin", (compilationInstance)=>{
|
|
7180
|
-
var compilation1
|
|
7181
|
-
let optionsMap
|
|
7182
|
-
optionsMap[uid1] = options, compilationOptionsMap.set(compilation1, optionsMap);
|
|
7190
|
+
var compilation1, uid1, options;
|
|
7191
|
+
let optionsMap;
|
|
7192
|
+
compilation1 = compilation = compilationInstance, uid1 = uid, options = c, (optionsMap = compilationOptionsMap.get(compilation1) || {})[uid1] = options, compilationOptionsMap.set(compilation1, optionsMap);
|
|
7183
7193
|
}), this.hooks.done.tap("HtmlRspackPlugin", (stats)=>{
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
delete optionsMap[uid1], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation1) : compilationOptionsMap.set(compilation1, optionsMap);
|
|
7194
|
+
var compilation, compilation1, uid1;
|
|
7195
|
+
let optionsMap;
|
|
7196
|
+
compilation = stats.compilation, hooks_compilationHooksMap.delete(compilation), compilation1 = stats.compilation, uid1 = uid, optionsMap = compilationOptionsMap.get(compilation1) || {}, delete optionsMap[uid1], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation1) : compilationOptionsMap.set(compilation1, optionsMap);
|
|
7188
7197
|
});
|
|
7189
7198
|
let templateContent = c.templateContent;
|
|
7190
7199
|
if ("function" == typeof templateContent) templateFn = async (data)=>{
|
|
@@ -7379,7 +7388,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7379
7388
|
constructor(deterministic){
|
|
7380
7389
|
super(), this.deterministic = deterministic;
|
|
7381
7390
|
}
|
|
7382
|
-
raw(
|
|
7391
|
+
raw() {
|
|
7383
7392
|
return (0, builtin_plugin_base.no)(this.name, this.deterministic);
|
|
7384
7393
|
}
|
|
7385
7394
|
}
|
|
@@ -7387,7 +7396,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7387
7396
|
class ModuleConcatenationPlugin extends builtin_plugin_base.Xj {
|
|
7388
7397
|
name = binding_.BuiltinPluginName.ModuleConcatenationPlugin;
|
|
7389
7398
|
affectedHooks = "compilation";
|
|
7390
|
-
raw(
|
|
7399
|
+
raw() {
|
|
7391
7400
|
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
7392
7401
|
}
|
|
7393
7402
|
}
|
|
@@ -7395,14 +7404,14 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7395
7404
|
class NaturalChunkIdsPlugin extends builtin_plugin_base.Xj {
|
|
7396
7405
|
name = binding_.BuiltinPluginName.NaturalChunkIdsPlugin;
|
|
7397
7406
|
affectedHooks = "compilation";
|
|
7398
|
-
raw(
|
|
7407
|
+
raw() {
|
|
7399
7408
|
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
7400
7409
|
}
|
|
7401
7410
|
}
|
|
7402
7411
|
class NaturalModuleIdsPlugin extends builtin_plugin_base.Xj {
|
|
7403
7412
|
name = binding_.BuiltinPluginName.NaturalModuleIdsPlugin;
|
|
7404
7413
|
affectedHooks = "compilation";
|
|
7405
|
-
raw(
|
|
7414
|
+
raw() {
|
|
7406
7415
|
return (0, builtin_plugin_base.no)(this.name, void 0);
|
|
7407
7416
|
}
|
|
7408
7417
|
}
|
|
@@ -7420,7 +7429,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7420
7429
|
]), [
|
|
7421
7430
|
key,
|
|
7422
7431
|
value
|
|
7423
|
-
]))), "compilation"), RealContentHashPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation"),
|
|
7432
|
+
]))), "compilation"), RealContentHashPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation"), RemoveEmptyChunksPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveEmptyChunksPlugin, ()=>{}, "compilation"), RsdoctorPluginImpl = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
|
|
7424
7433
|
moduleGraphFeatures: !0,
|
|
7425
7434
|
chunkGraphFeatures: !0
|
|
7426
7435
|
}) {
|
|
@@ -7566,7 +7575,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7566
7575
|
} catch (e) {
|
|
7567
7576
|
validateError = e;
|
|
7568
7577
|
}
|
|
7569
|
-
|
|
7578
|
+
const finalOptions = validateError ? {
|
|
7570
7579
|
hashFuncNames: [
|
|
7571
7580
|
"sha384"
|
|
7572
7581
|
],
|
|
@@ -7644,11 +7653,11 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7644
7653
|
});
|
|
7645
7654
|
});
|
|
7646
7655
|
}), "string" == typeof this.options.htmlPlugin && this.options.htmlPlugin !== NATIVE_HTML_PLUGIN) {
|
|
7656
|
+
var htmlPlugin, obj;
|
|
7647
7657
|
let self = this;
|
|
7648
7658
|
try {
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
"function" == typeof getHooks && compiler.hooks.thisCompilation.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (compilation)=>{
|
|
7659
|
+
let getHooks;
|
|
7660
|
+
getHooks = (htmlPlugin = require(this.options.htmlPlugin)).getCompilationHooks || htmlPlugin.getHooks, "function" == typeof getHooks && compiler.hooks.thisCompilation.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (compilation)=>{
|
|
7652
7661
|
if ("string" == typeof compiler.options.output.chunkLoading && [
|
|
7653
7662
|
"require",
|
|
7654
7663
|
"async-node"
|
|
@@ -7686,7 +7695,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7686
7695
|
include: options?.include,
|
|
7687
7696
|
exclude: options?.exclude,
|
|
7688
7697
|
extractComments: function(extractComments) {
|
|
7689
|
-
|
|
7698
|
+
var value;
|
|
7699
|
+
let type, conditionStr = (condition)=>{
|
|
7690
7700
|
if (void 0 === condition || !0 === condition) return "@preserve|@lic|@cc_on|^\\**!";
|
|
7691
7701
|
if (!1 === condition) throw Error("unreachable");
|
|
7692
7702
|
return condition.source;
|
|
@@ -7700,10 +7710,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7700
7710
|
if (extractComments instanceof RegExp) return {
|
|
7701
7711
|
condition: extractComments.source
|
|
7702
7712
|
};
|
|
7703
|
-
if (
|
|
7704
|
-
let type = typeof value;
|
|
7705
|
-
return null != value && ("object" === type || "function" === type);
|
|
7706
|
-
}(extractComments)) {
|
|
7713
|
+
if (type = typeof (value = extractComments), null != value && ("object" === type || "function" === type)) {
|
|
7707
7714
|
if (!1 === extractComments.condition) return;
|
|
7708
7715
|
return {
|
|
7709
7716
|
condition: conditionStr(extractComments.condition),
|
|
@@ -7720,7 +7727,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7720
7727
|
module: options?.minimizerOptions?.module
|
|
7721
7728
|
}
|
|
7722
7729
|
};
|
|
7723
|
-
}, "compilation"), WarnCaseSensitiveModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
|
7730
|
+
}, "compilation"), URLPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.URLPlugin, ()=>{}, "compilation"), WarnCaseSensitiveModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
|
7724
7731
|
class WebWorkerTemplatePlugin extends builtin_plugin_base.Xj {
|
|
7725
7732
|
name = binding_.BuiltinPluginName.WebWorkerTemplatePlugin;
|
|
7726
7733
|
raw(compiler) {
|
|
@@ -7753,7 +7760,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7753
7760
|
};
|
|
7754
7761
|
}
|
|
7755
7762
|
}
|
|
7756
|
-
let 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;
|
|
7763
|
+
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;
|
|
7757
7764
|
class Template {
|
|
7758
7765
|
static getFunctionContent(fn) {
|
|
7759
7766
|
return fn.toString().replace(FUNCTION_CONTENT_REGEX, "").replace(INDENT_MULTILINE_REGEX, "").replace(LINE_SEPARATOR_REGEX, "\n");
|
|
@@ -8607,7 +8614,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8607
8614
|
"./src"
|
|
8608
8615
|
]);
|
|
8609
8616
|
defaults_F(options, "devtool", ()=>!!development && "eval"), D(options, "watch", !1), D(options, "profile", !1), D(options, "lazyCompilation", !1), D(options, "bail", !1), defaults_F(options, "cache", ()=>development), !1 === options.cache && (options.experiments.cache = !1), applyExperimentsDefaults(options.experiments, {
|
|
8610
|
-
production,
|
|
8611
8617
|
development
|
|
8612
8618
|
}), applyOptimizationDefaults(options.optimization, {
|
|
8613
8619
|
production,
|
|
@@ -8652,19 +8658,19 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8652
8658
|
defaults_F(infrastructureLogging, "stream", ()=>process.stderr);
|
|
8653
8659
|
let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
|
|
8654
8660
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
|
8655
|
-
}, applyExperimentsDefaults = (experiments, {
|
|
8656
|
-
defaults_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, "
|
|
8661
|
+
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
8662
|
+
defaults_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, "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", !1), 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", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
|
|
8657
8663
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
8658
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.
|
|
8664
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.0-beta.0"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
8659
8665
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst })=>{
|
|
8660
8666
|
if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), ((parserOptions, { usedExports, inlineConst })=>{
|
|
8661
|
-
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !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", [
|
|
8667
|
+
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !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, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
|
8662
8668
|
"..."
|
|
8663
8669
|
]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", usedExports && inlineConst), D(parserOptions, "typeReexportsPresence", "no-tolerant"), D(parserOptions, "jsx", !1);
|
|
8664
8670
|
})(module.parser.javascript, {
|
|
8665
8671
|
usedExports,
|
|
8666
8672
|
inlineConst
|
|
8667
|
-
}), defaults_F(module.parser,
|
|
8673
|
+
}), defaults_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), defaults_F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), D(module.generator.json, "JSONParse", !0), css) {
|
|
8668
8674
|
defaults_F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), defaults_F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), defaults_F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), defaults_F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), defaults_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");
|
|
8669
8675
|
let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
|
|
8670
8676
|
D(module.generator["css/auto"], "localIdentName", localIdentName), D(module.generator["css/auto"], "esModule", !0), defaults_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);
|
|
@@ -8910,7 +8916,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8910
8916
|
if (tp.globalThis) return "globalThis";
|
|
8911
8917
|
}
|
|
8912
8918
|
return "self";
|
|
8913
|
-
}), D(output, "importFunctionName", "import"), D(output, "importMetaName", "import.meta"), defaults_F(output, "clean", ()=>!!output.clean), D(output, "crossOriginLoading", !1), D(output, "workerPublicPath", ""), D(output, "sourceMapFilename", "[file].map[query]"), defaults_F(output, "scriptType", ()=>!!output.module && "module"), D(output, "charset", !
|
|
8919
|
+
}), D(output, "importFunctionName", "import"), D(output, "importMetaName", "import.meta"), defaults_F(output, "clean", ()=>!!output.clean), D(output, "crossOriginLoading", !1), D(output, "workerPublicPath", ""), D(output, "sourceMapFilename", "[file].map[query]"), defaults_F(output, "scriptType", ()=>!!output.module && "module"), D(output, "charset", !1), D(output, "chunkLoadTimeout", 120000);
|
|
8914
8920
|
let { trustedTypes } = output;
|
|
8915
8921
|
trustedTypes && (defaults_F(trustedTypes, "policyName", ()=>output.uniqueName.replace(/[^a-zA-Z0-9\-#=_/@.%]+/g, "_") || "webpack"), D(trustedTypes, "onPolicyCreationFailure", "stop"));
|
|
8916
8922
|
let forEachEntry = (fn)=>{
|
|
@@ -9262,7 +9268,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9262
9268
|
plugins: nestedArray(config.plugins, (p)=>[
|
|
9263
9269
|
...p
|
|
9264
9270
|
]),
|
|
9265
|
-
experiments: nestedConfig(config.experiments, (experiments)=>({
|
|
9271
|
+
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")(), {
|
|
9266
9272
|
...experiments,
|
|
9267
9273
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
9268
9274
|
if ("boolean" == typeof cache || "memory" === cache.type) return cache;
|
|
@@ -9403,7 +9409,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9403
9409
|
}
|
|
9404
9410
|
let printGeneratedCodeForStack = (moduleId, code)=>{
|
|
9405
9411
|
let lines = code.split("\n"), n = `${lines.length}`.length;
|
|
9406
|
-
return `\n\nGenerated code for ${moduleId}\n${lines.map((line, i
|
|
9412
|
+
return `\n\nGenerated code for ${moduleId}\n${lines.map((line, i)=>{
|
|
9407
9413
|
let iStr = `${i + 1}`;
|
|
9408
9414
|
return `${" ".repeat(n - iStr.length)}${iStr} | ${line}`;
|
|
9409
9415
|
}).join("\n")}`;
|
|
@@ -9431,10 +9437,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9431
9437
|
throw Error(`${absPath} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system`);
|
|
9432
9438
|
})(fs, p);
|
|
9433
9439
|
return dir === p ? void callback(err) : void mkdirp(fs, dir, (err)=>{
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
if (err) return "EEXIST" === err.code ? void callback() : void callback(err);
|
|
9437
|
-
callback();
|
|
9440
|
+
err ? callback(err) : fs.mkdir(p, (err)=>{
|
|
9441
|
+
err ? "EEXIST" === err.code ? callback() : callback(err) : callback();
|
|
9438
9442
|
});
|
|
9439
9443
|
});
|
|
9440
9444
|
}
|
|
@@ -9646,8 +9650,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9646
9650
|
}
|
|
9647
9651
|
}
|
|
9648
9652
|
let makeWebpackErrorCallback = (callback, hook)=>(err, result)=>{
|
|
9649
|
-
|
|
9650
|
-
callback(null, result);
|
|
9653
|
+
err ? err instanceof WebpackError ? callback(err) : callback(new HookWebpackError(err, hook)) : callback(null, result);
|
|
9651
9654
|
};
|
|
9652
9655
|
class Cache {
|
|
9653
9656
|
static STAGE_DISK = 10;
|
|
@@ -10299,7 +10302,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10299
10302
|
});
|
|
10300
10303
|
}
|
|
10301
10304
|
}
|
|
10302
|
-
let CORE_VERSION = "1.
|
|
10305
|
+
let CORE_VERSION = "1.6.0-beta.0", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
10303
10306
|
|
|
10304
10307
|
Help:
|
|
10305
10308
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -10784,7 +10787,7 @@ Help:
|
|
|
10784
10787
|
callback(err, entries, compilation);
|
|
10785
10788
|
} catch (e) {
|
|
10786
10789
|
let err = Error(`compiler.runAsChild callback error: ${e}`);
|
|
10787
|
-
this.parentCompilation.errors.push(err)
|
|
10790
|
+
this.parentCompilation.errors.push(err);
|
|
10788
10791
|
}
|
|
10789
10792
|
};
|
|
10790
10793
|
this.compile((err, compilation)=>{
|
|
@@ -10831,10 +10834,9 @@ Help:
|
|
|
10831
10834
|
});
|
|
10832
10835
|
}
|
|
10833
10836
|
close(callback) {
|
|
10834
|
-
|
|
10837
|
+
this.watching ? this.watching.close(()=>{
|
|
10835
10838
|
this.close(callback);
|
|
10836
|
-
})
|
|
10837
|
-
this.hooks.shutdown.callAsync((err)=>{
|
|
10839
|
+
}) : this.hooks.shutdown.callAsync((err)=>{
|
|
10838
10840
|
if (err) return callback(err);
|
|
10839
10841
|
this.cache.shutdown(()=>{
|
|
10840
10842
|
this.#getInstance((error, instance)=>{
|
|
@@ -10880,160 +10882,158 @@ Help:
|
|
|
10880
10882
|
return this.#compilationParams = params, params;
|
|
10881
10883
|
}
|
|
10882
10884
|
#getInstance(callback) {
|
|
10883
|
-
|
|
10885
|
+
var options, compiler, output, module, options1, parser, generator, stats;
|
|
10886
|
+
let mode, experiments, error = CORE_VERSION === binding_default().EXPECTED_RSPACK_CORE_VERSION || CORE_VERSION.includes("canary") ? null : Error(bindingVersionCheck_errorMessage(CORE_VERSION, binding_default().EXPECTED_RSPACK_CORE_VERSION));
|
|
10884
10887
|
if (error) return callback(error);
|
|
10885
10888
|
if (this.#instance) return callback(null, this.#instance);
|
|
10886
|
-
let
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10889
|
+
let options2 = this.options, rawOptions = (options = options2, compiler = this, mode = options.mode, experiments = options.experiments, {
|
|
10890
|
+
name: options.name,
|
|
10891
|
+
mode,
|
|
10892
|
+
context: options.context,
|
|
10893
|
+
output: {
|
|
10894
|
+
...output = options.output,
|
|
10895
|
+
environment: function(environment = {}) {
|
|
10896
|
+
return {
|
|
10897
|
+
const: !!environment.const,
|
|
10898
|
+
arrowFunction: !!environment.arrowFunction,
|
|
10899
|
+
nodePrefixForCoreModules: !!environment.nodePrefixForCoreModules,
|
|
10900
|
+
asyncFunction: !!environment.asyncFunction,
|
|
10901
|
+
bigIntLiteral: !!environment.bigIntLiteral,
|
|
10902
|
+
destructuring: !!environment.destructuring,
|
|
10903
|
+
document: !!environment.document,
|
|
10904
|
+
dynamicImport: !!environment.dynamicImport,
|
|
10905
|
+
forOf: !!environment.forOf,
|
|
10906
|
+
globalThis: !!environment.globalThis,
|
|
10907
|
+
module: !!environment.module,
|
|
10908
|
+
optionalChaining: !!environment.optionalChaining,
|
|
10909
|
+
templateLiteral: !!environment.templateLiteral
|
|
10910
|
+
};
|
|
10911
|
+
}(output.environment)
|
|
10912
|
+
},
|
|
10913
|
+
resolve: getRawResolve(options.resolve),
|
|
10914
|
+
resolveLoader: getRawResolve(options.resolveLoader),
|
|
10915
|
+
module: (module = options.module, options1 = {
|
|
10916
|
+
compiler,
|
|
10891
10917
|
mode,
|
|
10892
10918
|
context: options.context,
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
rules: [
|
|
10922
|
-
{
|
|
10923
|
-
rules: module.defaultRules
|
|
10924
|
-
},
|
|
10925
|
-
{
|
|
10926
|
-
rules: module.rules
|
|
10927
|
-
}
|
|
10928
|
-
].map((rule, index)=>getRawModuleRule(rule, `ruleSet[${index}]`, options1, "javascript/auto")),
|
|
10929
|
-
parser: Object.fromEntries(Object.entries(parser = module.parser).map(([k, v])=>[
|
|
10930
|
-
k,
|
|
10931
|
-
getRawParserOptions(v, k)
|
|
10932
|
-
]).filter(([k, v])=>void 0 !== v)),
|
|
10933
|
-
generator: Object.fromEntries(Object.entries(generator = module.generator).map(([k, v])=>[
|
|
10934
|
-
k,
|
|
10935
|
-
getRawGeneratorOptions(v, k)
|
|
10936
|
-
]).filter(([k, v])=>void 0 !== v)),
|
|
10937
|
-
noParse: module.noParse
|
|
10938
|
-
}),
|
|
10939
|
-
optimization: options.optimization,
|
|
10940
|
-
stats: {
|
|
10941
|
-
colors: function(options) {
|
|
10942
|
-
if ("boolean" == typeof options || "string" == typeof options) return presetToOptions(options);
|
|
10943
|
-
if (!options) return {};
|
|
10944
|
-
let obj = {
|
|
10945
|
-
...presetToOptions(options.preset),
|
|
10946
|
-
...options
|
|
10947
|
-
};
|
|
10948
|
-
return delete obj.preset, obj;
|
|
10949
|
-
}(stats = options.stats).colors ?? !1
|
|
10950
|
-
},
|
|
10951
|
-
cache: {
|
|
10952
|
-
type: options.cache ? "memory" : "disable"
|
|
10953
|
-
},
|
|
10954
|
-
experiments,
|
|
10955
|
-
node: function(node) {
|
|
10956
|
-
if (!1 !== node) return external_node_assert_default()(!isNil(node.__dirname) && !isNil(node.global) && !isNil(node.__filename)), {
|
|
10957
|
-
dirname: String(node.__dirname),
|
|
10958
|
-
filename: String(node.__filename),
|
|
10959
|
-
global: String(node.global)
|
|
10919
|
+
experiments
|
|
10920
|
+
}, external_node_assert_default()(!isNil(module.defaultRules), "module.defaultRules should not be nil after defaults"), {
|
|
10921
|
+
rules: [
|
|
10922
|
+
{
|
|
10923
|
+
rules: module.defaultRules
|
|
10924
|
+
},
|
|
10925
|
+
{
|
|
10926
|
+
rules: module.rules
|
|
10927
|
+
}
|
|
10928
|
+
].map((rule, index)=>getRawModuleRule(rule, `ruleSet[${index}]`, options1, "javascript/auto")),
|
|
10929
|
+
parser: Object.fromEntries(Object.entries(parser = module.parser).map(([k, v])=>[
|
|
10930
|
+
k,
|
|
10931
|
+
getRawParserOptions(v, k)
|
|
10932
|
+
]).filter(([k, v])=>void 0 !== v)),
|
|
10933
|
+
generator: Object.fromEntries(Object.entries(generator = module.generator).map(([k, v])=>[
|
|
10934
|
+
k,
|
|
10935
|
+
getRawGeneratorOptions(v, k)
|
|
10936
|
+
]).filter(([k, v])=>void 0 !== v)),
|
|
10937
|
+
noParse: module.noParse
|
|
10938
|
+
}),
|
|
10939
|
+
optimization: options.optimization,
|
|
10940
|
+
stats: {
|
|
10941
|
+
colors: !!function(options) {
|
|
10942
|
+
if ("boolean" == typeof options || "string" == typeof options) return presetToOptions(options);
|
|
10943
|
+
if (!options) return {};
|
|
10944
|
+
let obj = {
|
|
10945
|
+
...presetToOptions(options.preset),
|
|
10946
|
+
...options
|
|
10960
10947
|
};
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
}
|
|
10967
|
-
|
|
10948
|
+
return delete obj.preset, obj;
|
|
10949
|
+
}(stats = options.stats).colors
|
|
10950
|
+
},
|
|
10951
|
+
cache: {
|
|
10952
|
+
type: options.cache ? "memory" : "disable"
|
|
10953
|
+
},
|
|
10954
|
+
experiments,
|
|
10955
|
+
node: function(node) {
|
|
10956
|
+
if (!1 !== node) return external_node_assert_default()(!isNil(node.__dirname) && !isNil(node.global) && !isNil(node.__filename)), {
|
|
10957
|
+
dirname: String(node.__dirname),
|
|
10958
|
+
filename: String(node.__filename),
|
|
10959
|
+
global: String(node.global)
|
|
10960
|
+
};
|
|
10961
|
+
}(options.node),
|
|
10962
|
+
profile: options.profile,
|
|
10963
|
+
amd: options.amd ? JSON.stringify(options.amd || {}) : void 0,
|
|
10964
|
+
bail: options.bail,
|
|
10965
|
+
__references: {}
|
|
10966
|
+
});
|
|
10968
10967
|
rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries()), rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
|
|
10969
10968
|
let instanceBinding = __webpack_require__("@rspack/binding");
|
|
10970
10969
|
this.#registers = this.#createHooksRegisters();
|
|
10971
|
-
let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(
|
|
10970
|
+
let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options2.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
10972
10971
|
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);
|
|
10973
10972
|
}
|
|
10974
10973
|
#createHooksRegisters() {
|
|
10975
|
-
|
|
10974
|
+
var getCompiler, createTap;
|
|
10975
|
+
let getCompiler1, createTap1, getCompiler2, createTap2, createMapTap, getCompiler3, createTap3, createMapTap1, getCompiler4, createTap4, getCompiler5, getOptions, getCompiler6, createTap5, getCompiler7, createTap6, ref = new WeakRef(this), getCompiler8 = ()=>ref.deref(), createTap7 = this.#createHookRegisterTaps.bind(this), createMapTap2 = this.#createHookMapRegisterTaps.bind(this);
|
|
10976
10976
|
return {
|
|
10977
|
-
...(
|
|
10978
|
-
registerCompilerThisCompilationTaps: (
|
|
10979
|
-
return
|
|
10977
|
+
...(getCompiler1 = getCompiler8, {
|
|
10978
|
+
registerCompilerThisCompilationTaps: (createTap1 = createTap7)(binding_default().RegisterJsTapKind.CompilerThisCompilation, function() {
|
|
10979
|
+
return getCompiler1().hooks.thisCompilation;
|
|
10980
10980
|
}, function(queried) {
|
|
10981
10981
|
return function(native) {
|
|
10982
|
-
return
|
|
10982
|
+
return getCompiler1().__internal__create_compilation(native), queried.call(getCompiler1().__internal__get_compilation(), getCompiler1().__internal__get_compilation_params());
|
|
10983
10983
|
};
|
|
10984
10984
|
}),
|
|
10985
|
-
registerCompilerCompilationTaps:
|
|
10986
|
-
return
|
|
10985
|
+
registerCompilerCompilationTaps: createTap1(binding_default().RegisterJsTapKind.CompilerCompilation, function() {
|
|
10986
|
+
return getCompiler1().hooks.compilation;
|
|
10987
10987
|
}, function(queried) {
|
|
10988
10988
|
return function() {
|
|
10989
|
-
return queried.call(
|
|
10989
|
+
return queried.call(getCompiler1().__internal__get_compilation(), getCompiler1().__internal__get_compilation_params());
|
|
10990
10990
|
};
|
|
10991
10991
|
}),
|
|
10992
|
-
registerCompilerMakeTaps:
|
|
10993
|
-
return
|
|
10992
|
+
registerCompilerMakeTaps: createTap1(binding_default().RegisterJsTapKind.CompilerMake, function() {
|
|
10993
|
+
return getCompiler1().hooks.make;
|
|
10994
10994
|
}, function(queried) {
|
|
10995
10995
|
return async function() {
|
|
10996
|
-
return await queried.promise(
|
|
10996
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
10997
10997
|
};
|
|
10998
10998
|
}),
|
|
10999
|
-
registerCompilerFinishMakeTaps:
|
|
11000
|
-
return
|
|
10999
|
+
registerCompilerFinishMakeTaps: createTap1(binding_default().RegisterJsTapKind.CompilerFinishMake, function() {
|
|
11000
|
+
return getCompiler1().hooks.finishMake;
|
|
11001
11001
|
}, function(queried) {
|
|
11002
11002
|
return async function() {
|
|
11003
|
-
return await queried.promise(
|
|
11003
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
11004
11004
|
};
|
|
11005
11005
|
}),
|
|
11006
|
-
registerCompilerShouldEmitTaps:
|
|
11007
|
-
return
|
|
11006
|
+
registerCompilerShouldEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerShouldEmit, function() {
|
|
11007
|
+
return getCompiler1().hooks.shouldEmit;
|
|
11008
11008
|
}, function(queried) {
|
|
11009
11009
|
return function() {
|
|
11010
|
-
return queried.call(
|
|
11010
|
+
return queried.call(getCompiler1().__internal__get_compilation());
|
|
11011
11011
|
};
|
|
11012
11012
|
}),
|
|
11013
|
-
registerCompilerEmitTaps:
|
|
11014
|
-
return
|
|
11013
|
+
registerCompilerEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerEmit, function() {
|
|
11014
|
+
return getCompiler1().hooks.emit;
|
|
11015
11015
|
}, function(queried) {
|
|
11016
11016
|
return async function() {
|
|
11017
|
-
return await queried.promise(
|
|
11017
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
11018
11018
|
};
|
|
11019
11019
|
}),
|
|
11020
|
-
registerCompilerAfterEmitTaps:
|
|
11021
|
-
return
|
|
11020
|
+
registerCompilerAfterEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerAfterEmit, function() {
|
|
11021
|
+
return getCompiler1().hooks.afterEmit;
|
|
11022
11022
|
}, function(queried) {
|
|
11023
11023
|
return async function() {
|
|
11024
|
-
return await queried.promise(
|
|
11024
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
11025
11025
|
};
|
|
11026
11026
|
}),
|
|
11027
|
-
registerCompilerAssetEmittedTaps:
|
|
11028
|
-
return
|
|
11027
|
+
registerCompilerAssetEmittedTaps: createTap1(binding_default().RegisterJsTapKind.CompilerAssetEmitted, function() {
|
|
11028
|
+
return getCompiler1().hooks.assetEmitted;
|
|
11029
11029
|
}, function(queried) {
|
|
11030
11030
|
return async function({ filename, targetPath, outputPath }) {
|
|
11031
11031
|
return queried.promise(filename, {
|
|
11032
|
-
compilation:
|
|
11032
|
+
compilation: getCompiler1().__internal__get_compilation(),
|
|
11033
11033
|
targetPath,
|
|
11034
11034
|
outputPath,
|
|
11035
11035
|
get source () {
|
|
11036
|
-
return
|
|
11036
|
+
return getCompiler1().__internal__get_compilation().getAsset(filename)?.source;
|
|
11037
11037
|
},
|
|
11038
11038
|
get content () {
|
|
11039
11039
|
return this.source?.buffer();
|
|
@@ -11042,9 +11042,9 @@ Help:
|
|
|
11042
11042
|
};
|
|
11043
11043
|
})
|
|
11044
11044
|
}),
|
|
11045
|
-
...(
|
|
11046
|
-
registerCompilationAdditionalTreeRuntimeRequirementsTaps:
|
|
11047
|
-
return
|
|
11045
|
+
...(getCompiler2 = getCompiler8, createTap2 = createTap7, createMapTap = createMapTap2, {
|
|
11046
|
+
registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements, function() {
|
|
11047
|
+
return getCompiler2().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
|
|
11048
11048
|
}, function(queried) {
|
|
11049
11049
|
return function({ chunk, runtimeRequirements }) {
|
|
11050
11050
|
let set = __from_binding_runtime_globals(runtimeRequirements);
|
|
@@ -11054,7 +11054,7 @@ Help:
|
|
|
11054
11054
|
};
|
|
11055
11055
|
}),
|
|
11056
11056
|
registerCompilationRuntimeRequirementInTreeTaps: createMapTap(binding_default().RegisterJsTapKind.CompilationRuntimeRequirementInTree, function() {
|
|
11057
|
-
return
|
|
11057
|
+
return getCompiler2().__internal__get_compilation().hooks.runtimeRequirementInTree;
|
|
11058
11058
|
}, function(queried) {
|
|
11059
11059
|
return function({ chunk, allRuntimeRequirements, runtimeRequirements }) {
|
|
11060
11060
|
let set = __from_binding_runtime_globals(runtimeRequirements), all = __from_binding_runtime_globals(allRuntimeRequirements), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
|
|
@@ -11068,8 +11068,8 @@ Help:
|
|
|
11068
11068
|
};
|
|
11069
11069
|
};
|
|
11070
11070
|
}),
|
|
11071
|
-
registerCompilationRuntimeModuleTaps:
|
|
11072
|
-
return
|
|
11071
|
+
registerCompilationRuntimeModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationRuntimeModule, function() {
|
|
11072
|
+
return getCompiler2().__internal__get_compilation().hooks.runtimeModule;
|
|
11073
11073
|
}, function(queried) {
|
|
11074
11074
|
return function({ module, chunk }) {
|
|
11075
11075
|
let originSource = module.source?.source;
|
|
@@ -11078,29 +11078,29 @@ Help:
|
|
|
11078
11078
|
if (newSource && newSource !== originSource) return module;
|
|
11079
11079
|
};
|
|
11080
11080
|
}),
|
|
11081
|
-
registerCompilationBuildModuleTaps:
|
|
11082
|
-
return
|
|
11081
|
+
registerCompilationBuildModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationBuildModule, function() {
|
|
11082
|
+
return getCompiler2().__internal__get_compilation().hooks.buildModule;
|
|
11083
11083
|
}, function(queried) {
|
|
11084
11084
|
return function(module) {
|
|
11085
11085
|
return queried.call(module);
|
|
11086
11086
|
};
|
|
11087
11087
|
}),
|
|
11088
|
-
registerCompilationStillValidModuleTaps:
|
|
11089
|
-
return
|
|
11088
|
+
registerCompilationStillValidModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationStillValidModule, function() {
|
|
11089
|
+
return getCompiler2().__internal__get_compilation().hooks.stillValidModule;
|
|
11090
11090
|
}, function(queried) {
|
|
11091
11091
|
return function(module) {
|
|
11092
11092
|
return queried.call(module);
|
|
11093
11093
|
};
|
|
11094
11094
|
}),
|
|
11095
|
-
registerCompilationSucceedModuleTaps:
|
|
11096
|
-
return
|
|
11095
|
+
registerCompilationSucceedModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationSucceedModule, function() {
|
|
11096
|
+
return getCompiler2().__internal__get_compilation().hooks.succeedModule;
|
|
11097
11097
|
}, function(queried) {
|
|
11098
11098
|
return function(module) {
|
|
11099
11099
|
return queried.call(module);
|
|
11100
11100
|
};
|
|
11101
11101
|
}),
|
|
11102
|
-
registerCompilationExecuteModuleTaps:
|
|
11103
|
-
return
|
|
11102
|
+
registerCompilationExecuteModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationExecuteModule, function() {
|
|
11103
|
+
return getCompiler2().__internal__get_compilation().hooks.executeModule;
|
|
11104
11104
|
}, function(queried) {
|
|
11105
11105
|
return function({ entry, id, codegenResults, runtimeModules }) {
|
|
11106
11106
|
try {
|
|
@@ -11138,96 +11138,96 @@ Help:
|
|
|
11138
11138
|
}, moduleCache = __nested_webpack_require_4781_4800__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4781_4800__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
|
|
11139
11139
|
for (let runtimeModule of runtimeModules)__nested_webpack_require_4781_4800__(runtimeModule);
|
|
11140
11140
|
let executeResult = __nested_webpack_require_4781_4800__(entry);
|
|
11141
|
-
|
|
11141
|
+
getCompiler2().__internal__get_module_execution_results_map().set(id, executeResult);
|
|
11142
11142
|
} catch (e) {
|
|
11143
|
-
throw
|
|
11143
|
+
throw getCompiler2().__internal__get_module_execution_results_map().set(id, e), e;
|
|
11144
11144
|
}
|
|
11145
11145
|
};
|
|
11146
11146
|
}),
|
|
11147
|
-
registerCompilationFinishModulesTaps:
|
|
11148
|
-
return
|
|
11147
|
+
registerCompilationFinishModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationFinishModules, function() {
|
|
11148
|
+
return getCompiler2().__internal__get_compilation().hooks.finishModules;
|
|
11149
11149
|
}, function(queried) {
|
|
11150
11150
|
return async function() {
|
|
11151
|
-
return await queried.promise(
|
|
11151
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().modules);
|
|
11152
11152
|
};
|
|
11153
11153
|
}),
|
|
11154
|
-
registerCompilationOptimizeModulesTaps:
|
|
11155
|
-
return
|
|
11154
|
+
registerCompilationOptimizeModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeModules, function() {
|
|
11155
|
+
return getCompiler2().__internal__get_compilation().hooks.optimizeModules;
|
|
11156
11156
|
}, function(queried) {
|
|
11157
11157
|
return function() {
|
|
11158
|
-
return queried.call(
|
|
11158
|
+
return queried.call(getCompiler2().__internal__get_compilation().modules.values());
|
|
11159
11159
|
};
|
|
11160
11160
|
}),
|
|
11161
|
-
registerCompilationAfterOptimizeModulesTaps:
|
|
11162
|
-
return
|
|
11161
|
+
registerCompilationAfterOptimizeModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterOptimizeModules, function() {
|
|
11162
|
+
return getCompiler2().__internal__get_compilation().hooks.afterOptimizeModules;
|
|
11163
11163
|
}, function(queried) {
|
|
11164
11164
|
return function() {
|
|
11165
|
-
queried.call(
|
|
11165
|
+
queried.call(getCompiler2().__internal__get_compilation().modules.values());
|
|
11166
11166
|
};
|
|
11167
11167
|
}),
|
|
11168
|
-
registerCompilationOptimizeTreeTaps:
|
|
11169
|
-
return
|
|
11168
|
+
registerCompilationOptimizeTreeTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeTree, function() {
|
|
11169
|
+
return getCompiler2().__internal__get_compilation().hooks.optimizeTree;
|
|
11170
11170
|
}, function(queried) {
|
|
11171
11171
|
return async function() {
|
|
11172
|
-
return await queried.promise(
|
|
11172
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().chunks, getCompiler2().__internal__get_compilation().modules);
|
|
11173
11173
|
};
|
|
11174
11174
|
}),
|
|
11175
|
-
registerCompilationOptimizeChunkModulesTaps:
|
|
11176
|
-
return
|
|
11175
|
+
registerCompilationOptimizeChunkModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeChunkModules, function() {
|
|
11176
|
+
return getCompiler2().__internal__get_compilation().hooks.optimizeChunkModules;
|
|
11177
11177
|
}, function(queried) {
|
|
11178
11178
|
return async function() {
|
|
11179
|
-
return await queried.promise(
|
|
11179
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().chunks, getCompiler2().__internal__get_compilation().modules);
|
|
11180
11180
|
};
|
|
11181
11181
|
}),
|
|
11182
|
-
registerCompilationChunkHashTaps:
|
|
11183
|
-
return
|
|
11182
|
+
registerCompilationChunkHashTaps: createTap2(binding_default().RegisterJsTapKind.CompilationChunkHash, function() {
|
|
11183
|
+
return getCompiler2().__internal__get_compilation().hooks.chunkHash;
|
|
11184
11184
|
}, function(queried) {
|
|
11185
11185
|
return function(chunk) {
|
|
11186
11186
|
let digestResult;
|
|
11187
|
-
if (!
|
|
11188
|
-
let hash = createHash(
|
|
11189
|
-
return queried.call(chunk, hash), "string" == typeof (digestResult =
|
|
11187
|
+
if (!getCompiler2().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
|
|
11188
|
+
let hash = createHash(getCompiler2().options.output.hashFunction);
|
|
11189
|
+
return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler2().options.output.hashDigest ? hash.digest(getCompiler2().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
|
|
11190
11190
|
};
|
|
11191
11191
|
}),
|
|
11192
|
-
registerCompilationChunkAssetTaps:
|
|
11193
|
-
return
|
|
11192
|
+
registerCompilationChunkAssetTaps: createTap2(binding_default().RegisterJsTapKind.CompilationChunkAsset, function() {
|
|
11193
|
+
return getCompiler2().__internal__get_compilation().hooks.chunkAsset;
|
|
11194
11194
|
}, function(queried) {
|
|
11195
11195
|
return function({ chunk, filename }) {
|
|
11196
11196
|
return queried.call(chunk, filename);
|
|
11197
11197
|
};
|
|
11198
11198
|
}),
|
|
11199
|
-
registerCompilationProcessAssetsTaps:
|
|
11200
|
-
return
|
|
11199
|
+
registerCompilationProcessAssetsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationProcessAssets, function() {
|
|
11200
|
+
return getCompiler2().__internal__get_compilation().hooks.processAssets;
|
|
11201
11201
|
}, function(queried) {
|
|
11202
11202
|
return async function() {
|
|
11203
|
-
return await queried.promise(
|
|
11203
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().assets);
|
|
11204
11204
|
};
|
|
11205
11205
|
}),
|
|
11206
|
-
registerCompilationAfterProcessAssetsTaps:
|
|
11207
|
-
return
|
|
11206
|
+
registerCompilationAfterProcessAssetsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterProcessAssets, function() {
|
|
11207
|
+
return getCompiler2().__internal__get_compilation().hooks.afterProcessAssets;
|
|
11208
11208
|
}, function(queried) {
|
|
11209
11209
|
return function() {
|
|
11210
|
-
return queried.call(
|
|
11210
|
+
return queried.call(getCompiler2().__internal__get_compilation().assets);
|
|
11211
11211
|
};
|
|
11212
11212
|
}),
|
|
11213
|
-
registerCompilationSealTaps:
|
|
11214
|
-
return
|
|
11213
|
+
registerCompilationSealTaps: createTap2(binding_default().RegisterJsTapKind.CompilationSeal, function() {
|
|
11214
|
+
return getCompiler2().__internal__get_compilation().hooks.seal;
|
|
11215
11215
|
}, function(queried) {
|
|
11216
11216
|
return function() {
|
|
11217
11217
|
return queried.call();
|
|
11218
11218
|
};
|
|
11219
11219
|
}),
|
|
11220
|
-
registerCompilationAfterSealTaps:
|
|
11221
|
-
return
|
|
11220
|
+
registerCompilationAfterSealTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterSeal, function() {
|
|
11221
|
+
return getCompiler2().__internal__get_compilation().hooks.afterSeal;
|
|
11222
11222
|
}, function(queried) {
|
|
11223
11223
|
return async function() {
|
|
11224
11224
|
return await queried.promise();
|
|
11225
11225
|
};
|
|
11226
11226
|
})
|
|
11227
11227
|
}),
|
|
11228
|
-
...(
|
|
11229
|
-
registerNormalModuleFactoryBeforeResolveTaps:
|
|
11230
|
-
return
|
|
11228
|
+
...(getCompiler3 = getCompiler8, createTap3 = createTap7, createMapTap1 = createMapTap2, {
|
|
11229
|
+
registerNormalModuleFactoryBeforeResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryBeforeResolve, function() {
|
|
11230
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.beforeResolve;
|
|
11231
11231
|
}, function(queried) {
|
|
11232
11232
|
return async function(resolveData) {
|
|
11233
11233
|
return [
|
|
@@ -11236,22 +11236,22 @@ Help:
|
|
|
11236
11236
|
];
|
|
11237
11237
|
};
|
|
11238
11238
|
}),
|
|
11239
|
-
registerNormalModuleFactoryFactorizeTaps:
|
|
11240
|
-
return
|
|
11239
|
+
registerNormalModuleFactoryFactorizeTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryFactorize, function() {
|
|
11240
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
|
|
11241
11241
|
}, function(queried) {
|
|
11242
11242
|
return async function(resolveData) {
|
|
11243
11243
|
return await queried.promise(resolveData), resolveData;
|
|
11244
11244
|
};
|
|
11245
11245
|
}),
|
|
11246
|
-
registerNormalModuleFactoryResolveTaps:
|
|
11247
|
-
return
|
|
11246
|
+
registerNormalModuleFactoryResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryResolve, function() {
|
|
11247
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
|
|
11248
11248
|
}, function(queried) {
|
|
11249
11249
|
return async function(resolveData) {
|
|
11250
11250
|
return await queried.promise(resolveData), resolveData;
|
|
11251
11251
|
};
|
|
11252
11252
|
}),
|
|
11253
11253
|
registerNormalModuleFactoryResolveForSchemeTaps: createMapTap1(binding_default().RegisterJsTapKind.NormalModuleFactoryResolveForScheme, function() {
|
|
11254
|
-
return
|
|
11254
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.resolveForScheme;
|
|
11255
11255
|
}, function(queried) {
|
|
11256
11256
|
return async function(args) {
|
|
11257
11257
|
return [
|
|
@@ -11260,8 +11260,8 @@ Help:
|
|
|
11260
11260
|
];
|
|
11261
11261
|
};
|
|
11262
11262
|
}),
|
|
11263
|
-
registerNormalModuleFactoryAfterResolveTaps:
|
|
11264
|
-
return
|
|
11263
|
+
registerNormalModuleFactoryAfterResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryAfterResolve, function() {
|
|
11264
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
|
|
11265
11265
|
}, function(queried) {
|
|
11266
11266
|
return async function(resolveData) {
|
|
11267
11267
|
return [
|
|
@@ -11270,8 +11270,8 @@ Help:
|
|
|
11270
11270
|
];
|
|
11271
11271
|
};
|
|
11272
11272
|
}),
|
|
11273
|
-
registerNormalModuleFactoryCreateModuleTaps:
|
|
11274
|
-
return
|
|
11273
|
+
registerNormalModuleFactoryCreateModuleTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryCreateModule, function() {
|
|
11274
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.createModule;
|
|
11275
11275
|
}, function(queried) {
|
|
11276
11276
|
return async function(args) {
|
|
11277
11277
|
let data = {
|
|
@@ -11282,17 +11282,17 @@ Help:
|
|
|
11282
11282
|
};
|
|
11283
11283
|
})
|
|
11284
11284
|
}),
|
|
11285
|
-
...(
|
|
11286
|
-
registerContextModuleFactoryBeforeResolveTaps: (
|
|
11287
|
-
return
|
|
11285
|
+
...(getCompiler4 = getCompiler8, {
|
|
11286
|
+
registerContextModuleFactoryBeforeResolveTaps: (createTap4 = createTap7)(binding_default().RegisterJsTapKind.ContextModuleFactoryBeforeResolve, function() {
|
|
11287
|
+
return getCompiler4().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
|
|
11288
11288
|
}, function(queried) {
|
|
11289
11289
|
return async function(bindingData) {
|
|
11290
11290
|
let data = !!bindingData && ContextModuleFactoryBeforeResolveData.__from_binding(bindingData), result = await queried.promise(data);
|
|
11291
11291
|
return !!result && ContextModuleFactoryBeforeResolveData.__to_binding(result);
|
|
11292
11292
|
};
|
|
11293
11293
|
}),
|
|
11294
|
-
registerContextModuleFactoryAfterResolveTaps:
|
|
11295
|
-
return
|
|
11294
|
+
registerContextModuleFactoryAfterResolveTaps: createTap4(binding_default().RegisterJsTapKind.ContextModuleFactoryAfterResolve, function() {
|
|
11295
|
+
return getCompiler4().__internal__get_compilation_params().contextModuleFactory.hooks.afterResolve;
|
|
11296
11296
|
}, function(queried) {
|
|
11297
11297
|
return async function(bindingData) {
|
|
11298
11298
|
let data = !!bindingData && ContextModuleFactoryAfterResolveData.__from_binding(bindingData), result = await queried.promise(data);
|
|
@@ -11300,158 +11300,155 @@ Help:
|
|
|
11300
11300
|
};
|
|
11301
11301
|
})
|
|
11302
11302
|
}),
|
|
11303
|
-
...(
|
|
11304
|
-
registerJavascriptModulesChunkHashTaps:
|
|
11305
|
-
return JavascriptModulesPlugin.getCompilationHooks(
|
|
11303
|
+
...(getCompiler5 = getCompiler8, {
|
|
11304
|
+
registerJavascriptModulesChunkHashTaps: createTap7(binding_default().RegisterJsTapKind.JavascriptModulesChunkHash, function() {
|
|
11305
|
+
return JavascriptModulesPlugin.getCompilationHooks(getCompiler5().__internal__get_compilation()).chunkHash;
|
|
11306
11306
|
}, function(queried) {
|
|
11307
11307
|
return function(chunk) {
|
|
11308
11308
|
let digestResult;
|
|
11309
|
-
if (!
|
|
11310
|
-
let hash = createHash(
|
|
11311
|
-
return queried.call(chunk, hash), "string" == typeof (digestResult =
|
|
11309
|
+
if (!getCompiler5().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
|
|
11310
|
+
let hash = createHash(getCompiler5().options.output.hashFunction);
|
|
11311
|
+
return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler5().options.output.hashDigest ? hash.digest(getCompiler5().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
|
|
11312
11312
|
};
|
|
11313
11313
|
})
|
|
11314
11314
|
}),
|
|
11315
|
-
...(
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
...(getCompiler5 = getCompiler7, {
|
|
11402
|
-
registerRuntimePluginCreateScriptTaps: (createTap4 = createTap6)(binding_default().RegisterJsTapKind.RuntimePluginCreateScript, function() {
|
|
11403
|
-
return RuntimePlugin.getCompilationHooks(getCompiler5().__internal__get_compilation()).createScript;
|
|
11315
|
+
...(getCompiler = getCompiler8, createTap = createTap7, getOptions = (uid)=>((compilation, uid)=>{
|
|
11316
|
+
if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
|
|
11317
|
+
return compilationOptionsMap.get(compilation)?.[uid];
|
|
11318
|
+
})(getCompiler().__internal__get_compilation(), uid), {
|
|
11319
|
+
registerHtmlPluginBeforeAssetTagGenerationTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration, function() {
|
|
11320
|
+
return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeAssetTagGeneration;
|
|
11321
|
+
}, function(queried) {
|
|
11322
|
+
return async function(data) {
|
|
11323
|
+
let { compilationId, uid } = data, res = await queried.promise({
|
|
11324
|
+
...data,
|
|
11325
|
+
plugin: {
|
|
11326
|
+
options: getOptions(uid)
|
|
11327
|
+
}
|
|
11328
|
+
});
|
|
11329
|
+
return res.compilationId = compilationId, res.uid = uid, res;
|
|
11330
|
+
};
|
|
11331
|
+
}),
|
|
11332
|
+
registerHtmlPluginAlterAssetTagsTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAlterAssetTags, function() {
|
|
11333
|
+
return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTags;
|
|
11334
|
+
}, function(queried) {
|
|
11335
|
+
return async function(data) {
|
|
11336
|
+
let { compilationId, uid } = data, res = await queried.promise({
|
|
11337
|
+
...data,
|
|
11338
|
+
plugin: {
|
|
11339
|
+
options: getOptions(uid)
|
|
11340
|
+
}
|
|
11341
|
+
});
|
|
11342
|
+
return res.compilationId = compilationId, res.uid = uid, res;
|
|
11343
|
+
};
|
|
11344
|
+
}),
|
|
11345
|
+
registerHtmlPluginAlterAssetTagGroupsTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAlterAssetTagGroups, function() {
|
|
11346
|
+
return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTagGroups;
|
|
11347
|
+
}, function(queried) {
|
|
11348
|
+
return async function(data) {
|
|
11349
|
+
let { compilationId, uid } = data, res = await queried.promise({
|
|
11350
|
+
...data,
|
|
11351
|
+
plugin: {
|
|
11352
|
+
options: getOptions(uid)
|
|
11353
|
+
}
|
|
11354
|
+
});
|
|
11355
|
+
return res.compilationId = compilationId, res.uid = uid, res;
|
|
11356
|
+
};
|
|
11357
|
+
}),
|
|
11358
|
+
registerHtmlPluginAfterTemplateExecutionTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAfterTemplateExecution, function() {
|
|
11359
|
+
return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterTemplateExecution;
|
|
11360
|
+
}, function(queried) {
|
|
11361
|
+
return async function(data) {
|
|
11362
|
+
let { compilationId, uid } = data, res = await queried.promise({
|
|
11363
|
+
...data,
|
|
11364
|
+
plugin: {
|
|
11365
|
+
options: getOptions(uid)
|
|
11366
|
+
}
|
|
11367
|
+
});
|
|
11368
|
+
return res.compilationId = compilationId, res;
|
|
11369
|
+
};
|
|
11370
|
+
}),
|
|
11371
|
+
registerHtmlPluginBeforeEmitTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginBeforeEmit, function() {
|
|
11372
|
+
return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeEmit;
|
|
11373
|
+
}, function(queried) {
|
|
11374
|
+
return async function(data) {
|
|
11375
|
+
let { compilationId, uid } = data, res = await queried.promise({
|
|
11376
|
+
...data,
|
|
11377
|
+
plugin: {
|
|
11378
|
+
options: getOptions(uid)
|
|
11379
|
+
}
|
|
11380
|
+
});
|
|
11381
|
+
return res.compilationId = compilationId, res.uid = uid, res;
|
|
11382
|
+
};
|
|
11383
|
+
}),
|
|
11384
|
+
registerHtmlPluginAfterEmitTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAfterEmit, function() {
|
|
11385
|
+
return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterEmit;
|
|
11386
|
+
}, function(queried) {
|
|
11387
|
+
return async function(data) {
|
|
11388
|
+
let { compilationId, uid } = data, res = await queried.promise({
|
|
11389
|
+
...data,
|
|
11390
|
+
plugin: {
|
|
11391
|
+
options: getOptions(uid)
|
|
11392
|
+
}
|
|
11393
|
+
});
|
|
11394
|
+
return res.compilationId = compilationId, res.uid = uid, res;
|
|
11395
|
+
};
|
|
11396
|
+
})
|
|
11397
|
+
}),
|
|
11398
|
+
...(getCompiler6 = getCompiler8, {
|
|
11399
|
+
registerRuntimePluginCreateScriptTaps: (createTap5 = createTap7)(binding_default().RegisterJsTapKind.RuntimePluginCreateScript, function() {
|
|
11400
|
+
return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).createScript;
|
|
11404
11401
|
}, function(queried) {
|
|
11405
11402
|
return function(data) {
|
|
11406
11403
|
return queried.call(data.code, data.chunk);
|
|
11407
11404
|
};
|
|
11408
11405
|
}),
|
|
11409
|
-
registerRuntimePluginLinkPreloadTaps:
|
|
11410
|
-
return RuntimePlugin.getCompilationHooks(
|
|
11406
|
+
registerRuntimePluginLinkPreloadTaps: createTap5(binding_default().RegisterJsTapKind.RuntimePluginLinkPreload, function() {
|
|
11407
|
+
return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).linkPreload;
|
|
11411
11408
|
}, function(queried) {
|
|
11412
11409
|
return function(data) {
|
|
11413
11410
|
return queried.call(data.code, data.chunk);
|
|
11414
11411
|
};
|
|
11415
11412
|
}),
|
|
11416
|
-
registerRuntimePluginLinkPrefetchTaps:
|
|
11417
|
-
return RuntimePlugin.getCompilationHooks(
|
|
11413
|
+
registerRuntimePluginLinkPrefetchTaps: createTap5(binding_default().RegisterJsTapKind.RuntimePluginLinkPrefetch, function() {
|
|
11414
|
+
return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).linkPrefetch;
|
|
11418
11415
|
}, function(queried) {
|
|
11419
11416
|
return function(data) {
|
|
11420
11417
|
return queried.call(data.code, data.chunk);
|
|
11421
11418
|
};
|
|
11422
11419
|
})
|
|
11423
11420
|
}),
|
|
11424
|
-
...(
|
|
11425
|
-
registerRsdoctorPluginModuleGraphTaps: (
|
|
11426
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11421
|
+
...(getCompiler7 = getCompiler8, {
|
|
11422
|
+
registerRsdoctorPluginModuleGraphTaps: (createTap6 = createTap7)(binding_.RegisterJsTapKind.RsdoctorPluginModuleGraph, function() {
|
|
11423
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleGraph;
|
|
11427
11424
|
}, function(queried) {
|
|
11428
11425
|
return async function(data) {
|
|
11429
11426
|
return await queried.promise(data);
|
|
11430
11427
|
};
|
|
11431
11428
|
}),
|
|
11432
|
-
registerRsdoctorPluginChunkGraphTaps:
|
|
11433
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11429
|
+
registerRsdoctorPluginChunkGraphTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginChunkGraph, function() {
|
|
11430
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).chunkGraph;
|
|
11434
11431
|
}, function(queried) {
|
|
11435
11432
|
return async function(data) {
|
|
11436
11433
|
return await queried.promise(data);
|
|
11437
11434
|
};
|
|
11438
11435
|
}),
|
|
11439
|
-
registerRsdoctorPluginModuleIdsTaps:
|
|
11440
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11436
|
+
registerRsdoctorPluginModuleIdsTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginModuleIds, function() {
|
|
11437
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleIds;
|
|
11441
11438
|
}, function(queried) {
|
|
11442
11439
|
return async function(data) {
|
|
11443
11440
|
return await queried.promise(data);
|
|
11444
11441
|
};
|
|
11445
11442
|
}),
|
|
11446
|
-
registerRsdoctorPluginModuleSourcesTaps:
|
|
11447
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11443
|
+
registerRsdoctorPluginModuleSourcesTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginModuleSources, function() {
|
|
11444
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleSources;
|
|
11448
11445
|
}, function(queried) {
|
|
11449
11446
|
return async function(data) {
|
|
11450
11447
|
return await queried.promise(data);
|
|
11451
11448
|
};
|
|
11452
11449
|
}),
|
|
11453
|
-
registerRsdoctorPluginAssetsTaps:
|
|
11454
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11450
|
+
registerRsdoctorPluginAssetsTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginAssets, function() {
|
|
11451
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).assets;
|
|
11455
11452
|
}, function(queried) {
|
|
11456
11453
|
return async function(data) {
|
|
11457
11454
|
return await queried.promise(data);
|
|
@@ -11583,7 +11580,7 @@ Help:
|
|
|
11583
11580
|
obj.children = this.stats.map((stat, idx)=>{
|
|
11584
11581
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
11585
11582
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
11586
|
-
}), childOptions.version && (obj.rspackVersion = "1.
|
|
11583
|
+
}), childOptions.version && (obj.rspackVersion = "1.6.0-beta.0", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
11587
11584
|
let mapError = (j, obj)=>({
|
|
11588
11585
|
...obj,
|
|
11589
11586
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -11599,11 +11596,8 @@ Help:
|
|
|
11599
11596
|
forToString: !0
|
|
11600
11597
|
});
|
|
11601
11598
|
return this.stats.map((stat, idx)=>{
|
|
11602
|
-
let str = stat.toString(childOptions.children[idx]), compilationName = stat.compilation.name, name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root).replace(/\|/g, " ");
|
|
11603
|
-
return str
|
|
11604
|
-
let rem = str.replace(/\n([^\n])/g, `\n $1`);
|
|
11605
|
-
return " " + rem;
|
|
11606
|
-
}(str, " ")}` : str;
|
|
11599
|
+
let rem, str = stat.toString(childOptions.children[idx]), compilationName = stat.compilation.name, name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root).replace(/\|/g, " ");
|
|
11600
|
+
return str ? name ? `${name}:\n${" " + (rem = str.replace(/\n([^\n])/g, `\n $1`))}` : str : str;
|
|
11607
11601
|
}).filter(Boolean).join("\n\n");
|
|
11608
11602
|
}
|
|
11609
11603
|
}
|
|
@@ -11723,9 +11717,11 @@ Help:
|
|
|
11723
11717
|
}, this.compilers = normalizedCompilers, this._options = {
|
|
11724
11718
|
parallelism: options?.parallelism || 1 / 0
|
|
11725
11719
|
}, this.dependencies = new WeakMap(), this.running = !1;
|
|
11726
|
-
|
|
11720
|
+
const compilerStats = this.compilers.map(()=>null);
|
|
11721
|
+
let doneCompilers = 0;
|
|
11727
11722
|
for(let index = 0; index < this.compilers.length; index++){
|
|
11728
|
-
|
|
11723
|
+
const compiler = this.compilers[index], compilerIndex = index;
|
|
11724
|
+
let compilerDone = !1;
|
|
11729
11725
|
compiler.hooks.done.tap("MultiCompiler", (stats)=>{
|
|
11730
11726
|
!compilerDone && (compilerDone = !0, doneCompilers++), compilerStats[compilerIndex] = stats, doneCompilers === this.compilers.length && this.hooks.done.call(new MultiStats(compilerStats));
|
|
11731
11727
|
}), compiler.hooks.invalid.tap("MultiCompiler", ()=>{
|
|
@@ -12408,6 +12404,7 @@ Help:
|
|
|
12408
12404
|
LogType.warn,
|
|
12409
12405
|
LogType.info,
|
|
12410
12406
|
LogType.log,
|
|
12407
|
+
LogType.debug,
|
|
12411
12408
|
LogType.group,
|
|
12412
12409
|
LogType.groupEnd,
|
|
12413
12410
|
LogType.groupCollapsed,
|
|
@@ -12479,7 +12476,7 @@ Help:
|
|
|
12479
12476
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
12480
12477
|
},
|
|
12481
12478
|
version: (object)=>{
|
|
12482
|
-
object.version = "5.75.0", object.rspackVersion = "1.
|
|
12479
|
+
object.version = "5.75.0", object.rspackVersion = "1.6.0-beta.0";
|
|
12483
12480
|
},
|
|
12484
12481
|
env: (object, _compilation, _context, { _env })=>{
|
|
12485
12482
|
object.env = _env;
|
|
@@ -12541,7 +12538,7 @@ Help:
|
|
|
12541
12538
|
return chunk && 1 === chunk.files.size && (!chunkGroupAuxiliary || 0 === chunk.auxiliaryFiles.size);
|
|
12542
12539
|
})) || (object.entrypoints = factory.create(`${type}.entrypoints`, array, context));
|
|
12543
12540
|
},
|
|
12544
|
-
chunkGroups: (object, compilation, context,
|
|
12541
|
+
chunkGroups: (object, compilation, context, _, factory)=>{
|
|
12545
12542
|
let { type, getStatsCompilation } = context, namedChunkGroups = getStatsCompilation(compilation).namedChunkGroups.map((cg)=>({
|
|
12546
12543
|
name: cg.name,
|
|
12547
12544
|
chunkGroup: cg
|
|
@@ -12734,7 +12731,7 @@ Help:
|
|
|
12734
12731
|
error: EXTRACT_ERROR,
|
|
12735
12732
|
warning: EXTRACT_ERROR,
|
|
12736
12733
|
moduleTraceItem: {
|
|
12737
|
-
_: (object, { origin, module, dependencies }, context,
|
|
12734
|
+
_: (object, { origin, module, dependencies }, context, _, factory)=>{
|
|
12738
12735
|
let { type } = context;
|
|
12739
12736
|
origin.moduleDescriptor && (object.originIdentifier = origin.moduleDescriptor.identifier, object.originName = origin.moduleDescriptor.name), module.moduleDescriptor && (object.moduleIdentifier = module.moduleDescriptor.identifier, object.moduleName = module.moduleDescriptor.name), object.dependencies = factory.create(`${type}.dependencies`, dependencies, context);
|
|
12740
12737
|
},
|
|
@@ -12900,7 +12897,7 @@ Help:
|
|
|
12900
12897
|
chunkGroups: OFF_FOR_TO_STRING,
|
|
12901
12898
|
chunkGroupAuxiliary: OFF_FOR_TO_STRING,
|
|
12902
12899
|
chunkGroupChildren: OFF_FOR_TO_STRING,
|
|
12903
|
-
chunkGroupMaxAssets: (
|
|
12900
|
+
chunkGroupMaxAssets: (_, { forToString })=>forToString ? 5 : 1 / 0,
|
|
12904
12901
|
chunks: OFF_FOR_TO_STRING,
|
|
12905
12902
|
chunkRelations: OFF_FOR_TO_STRING,
|
|
12906
12903
|
chunkModules: ({ all, modules })=>!1 !== all && (!0 === all || !modules),
|
|
@@ -12915,16 +12912,16 @@ Help:
|
|
|
12915
12912
|
groupModulesByAttributes: ON_FOR_TO_STRING,
|
|
12916
12913
|
groupModulesByPath: ON_FOR_TO_STRING,
|
|
12917
12914
|
groupModulesByExtension: ON_FOR_TO_STRING,
|
|
12918
|
-
modulesSpace: (
|
|
12919
|
-
chunkModulesSpace: (
|
|
12920
|
-
nestedModulesSpace: (
|
|
12915
|
+
modulesSpace: (_, { forToString })=>forToString ? 15 : 1 / 0,
|
|
12916
|
+
chunkModulesSpace: (_, { forToString })=>forToString ? 10 : 1 / 0,
|
|
12917
|
+
nestedModulesSpace: (_, { forToString })=>forToString ? 10 : 1 / 0,
|
|
12921
12918
|
relatedAssets: OFF_FOR_TO_STRING,
|
|
12922
12919
|
groupAssetsByEmitStatus: ON_FOR_TO_STRING,
|
|
12923
12920
|
groupAssetsByInfo: ON_FOR_TO_STRING,
|
|
12924
12921
|
groupAssetsByPath: ON_FOR_TO_STRING,
|
|
12925
12922
|
groupAssetsByExtension: ON_FOR_TO_STRING,
|
|
12926
12923
|
groupAssetsByChunk: ON_FOR_TO_STRING,
|
|
12927
|
-
assetsSpace: (
|
|
12924
|
+
assetsSpace: (_, { forToString })=>forToString ? 15 : 1 / 0,
|
|
12928
12925
|
orphanModules: OFF_FOR_TO_STRING,
|
|
12929
12926
|
runtimeModules: ({ all, runtime }, { forToString })=>void 0 !== runtime ? runtime : forToString ? !0 === all : !1 !== all,
|
|
12930
12927
|
cachedModules: ({ all, cached }, { forToString })=>void 0 !== cached ? cached : forToString ? !0 === all : !1 !== all,
|
|
@@ -12932,7 +12929,7 @@ Help:
|
|
|
12932
12929
|
depth: OFF_FOR_TO_STRING,
|
|
12933
12930
|
cachedAssets: OFF_FOR_TO_STRING,
|
|
12934
12931
|
reasons: OFF_FOR_TO_STRING,
|
|
12935
|
-
reasonsSpace: (
|
|
12932
|
+
reasonsSpace: (_, { forToString })=>forToString ? 15 : 1 / 0,
|
|
12936
12933
|
groupReasonsByOrigin: ON_FOR_TO_STRING,
|
|
12937
12934
|
usedExports: OFF_FOR_TO_STRING,
|
|
12938
12935
|
providedExports: OFF_FOR_TO_STRING,
|
|
@@ -12994,7 +12991,7 @@ Help:
|
|
|
12994
12991
|
compiler.hooks.compilation.tap("DefaultStatsPresetPlugin", (compilation)=>{
|
|
12995
12992
|
for (let key of Object.keys(NAMED_PRESETS)){
|
|
12996
12993
|
let defaults = NAMED_PRESETS[key];
|
|
12997
|
-
compilation.hooks.statsPreset.for(key).tap("DefaultStatsPresetPlugin", (options
|
|
12994
|
+
compilation.hooks.statsPreset.for(key).tap("DefaultStatsPresetPlugin", (options)=>{
|
|
12998
12995
|
applyDefaults(options, defaults);
|
|
12999
12996
|
});
|
|
13000
12997
|
}
|
|
@@ -13056,7 +13053,7 @@ Help:
|
|
|
13056
13053
|
},
|
|
13057
13054
|
"asset.type": (type)=>type,
|
|
13058
13055
|
"asset.name": (name, { formatFilename, asset: { isOverSizeLimit } })=>formatFilename(name, isOverSizeLimit),
|
|
13059
|
-
"asset.size": (size, { asset: { isOverSizeLimit }, yellow,
|
|
13056
|
+
"asset.size": (size, { asset: { isOverSizeLimit }, yellow, formatSize })=>isOverSizeLimit ? yellow(formatSize(size)) : formatSize(size),
|
|
13060
13057
|
"asset.emitted": (emitted, { green, formatFlag })=>emitted ? green(formatFlag("emitted")) : void 0,
|
|
13061
13058
|
"asset.comparedForEmit": (comparedForEmit, { yellow, formatFlag })=>comparedForEmit ? yellow(formatFlag("compared for emit")) : void 0,
|
|
13062
13059
|
"asset.cached": (cached, { green, formatFlag })=>cached ? green(formatFlag("cached")) : void 0,
|
|
@@ -13204,7 +13201,7 @@ Help:
|
|
|
13204
13201
|
"chunkOrigin.moduleName": (moduleName, { bold })=>bold(moduleName),
|
|
13205
13202
|
"chunkOrigin.loc": (loc)=>loc,
|
|
13206
13203
|
"error.file": (file, { bold })=>bold(file),
|
|
13207
|
-
"error.moduleName": (moduleName, { bold })=>moduleName.includes("!") ? `${bold(moduleName.replace(/^(\s|\S)*!/, ""))} (${moduleName})` :
|
|
13204
|
+
"error.moduleName": (moduleName, { bold })=>moduleName.includes("!") ? `${bold(moduleName.replace(/^(\s|\S)*!/, ""))} (${moduleName})` : bold(moduleName),
|
|
13208
13205
|
"error.loc": (loc, { green })=>green(loc),
|
|
13209
13206
|
"error.message": (message, { bold, formatError })=>message.includes("\u001b[") ? message : bold(formatError(message)),
|
|
13210
13207
|
"error.details": (details, { formatError })=>formatError(details),
|
|
@@ -13698,7 +13695,7 @@ Help:
|
|
|
13698
13695
|
return time < times[3] ? `${time}${unit}` : time < times[2] ? bold(`${time}${unit}`) : time < times[1] ? green(`${time}${unit}`) : time < times[0] ? yellow(`${time}${unit}`) : red(`${time}${unit}`);
|
|
13699
13696
|
}
|
|
13700
13697
|
let timeStr = time.toString();
|
|
13701
|
-
return time > 1000 && (timeStr =
|
|
13698
|
+
return time > 1000 && (timeStr = (time / 1000).toFixed(2), unit = " s"), `${boldQuantity ? bold(timeStr) : timeStr}${unit}`;
|
|
13702
13699
|
},
|
|
13703
13700
|
formatError: (msg, { green, yellow, red })=>{
|
|
13704
13701
|
let message = msg;
|
|
@@ -13832,7 +13829,7 @@ Help:
|
|
|
13832
13829
|
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
|
|
13833
13830
|
namespace: options.output.devtoolNamespace
|
|
13834
13831
|
}).apply(compiler);
|
|
13835
|
-
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);
|
|
13832
|
+
if (new JavascriptModulesPlugin().apply(compiler), new URLPlugin().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);
|
|
13836
13833
|
options.optimization.splitChunks && new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler), options.optimization.removeEmptyChunks && new RemoveEmptyChunksPlugin().apply(compiler), options.optimization.realContentHash && new RealContentHashPlugin().apply(compiler);
|
|
13837
13834
|
let moduleIds = options.optimization.moduleIds;
|
|
13838
13835
|
if (moduleIds) switch(moduleIds){
|
|
@@ -14963,7 +14960,8 @@ Help:
|
|
|
14963
14960
|
generator: schemas_record(schemas_string(), any()),
|
|
14964
14961
|
resolve: resolveOptions,
|
|
14965
14962
|
sideEffects: schemas_boolean(),
|
|
14966
|
-
enforce: literal("pre").or(literal("post"))
|
|
14963
|
+
enforce: literal("pre").or(literal("post")),
|
|
14964
|
+
extractSourceMap: schemas_boolean()
|
|
14967
14965
|
}).partial().extend({
|
|
14968
14966
|
oneOf: lazy(()=>ruleSetRule.or(falsy).array()).optional(),
|
|
14969
14967
|
rules: lazy(()=>ruleSetRule.or(falsy).array()).optional()
|
|
@@ -14997,6 +14995,7 @@ Help:
|
|
|
14997
14995
|
"auto"
|
|
14998
14996
|
]), javascriptParserUrl = union([
|
|
14999
14997
|
literal("relative"),
|
|
14998
|
+
literal("new-url-relative"),
|
|
15000
14999
|
schemas_boolean()
|
|
15001
15000
|
]), exprContextCritical = schemas_boolean(), wrappedContextCritical = schemas_boolean(), unknownContextCritical = schemas_boolean(), wrappedContextRegExp = _instanceof(RegExp), exportsPresence = schemas_enum([
|
|
15002
15001
|
"error",
|
|
@@ -15013,7 +15012,12 @@ Help:
|
|
|
15013
15012
|
]).or(literal(!1)), strictExportPresence = schemas_boolean(), worker = schemas_array(schemas_string()).or(schemas_boolean()), overrideStrict = schemas_enum([
|
|
15014
15013
|
"strict",
|
|
15015
15014
|
"non-strict"
|
|
15016
|
-
]), requireAsExpression = schemas_boolean(), requireDynamic = schemas_boolean(), requireResolve = schemas_boolean(),
|
|
15015
|
+
]), requireAsExpression = schemas_boolean(), requireDynamic = schemas_boolean(), requireResolve = schemas_boolean(), commonjsExports = union([
|
|
15016
|
+
schemas_boolean(),
|
|
15017
|
+
literal("skipInEsm")
|
|
15018
|
+
]), commonjs = schemas_boolean().or(strictObject({
|
|
15019
|
+
exports: commonjsExports
|
|
15020
|
+
}).partial()), importDynamic = schemas_boolean(), commonjsMagicComments = schemas_boolean(), inlineConst = schemas_boolean(), typeReexportsPresence = schemas_enum([
|
|
15017
15021
|
"no-tolerant",
|
|
15018
15022
|
"tolerant",
|
|
15019
15023
|
"tolerant-no-check"
|
|
@@ -15038,6 +15042,7 @@ Help:
|
|
|
15038
15042
|
requireAsExpression: requireAsExpression,
|
|
15039
15043
|
requireDynamic: requireDynamic,
|
|
15040
15044
|
requireResolve: requireResolve,
|
|
15045
|
+
commonjs: commonjs,
|
|
15041
15046
|
importDynamic: importDynamic,
|
|
15042
15047
|
inlineConst: inlineConst,
|
|
15043
15048
|
typeReexportsPresence: typeReexportsPresence,
|
|
@@ -15661,7 +15666,7 @@ Help:
|
|
|
15661
15666
|
_provides;
|
|
15662
15667
|
_enhanced;
|
|
15663
15668
|
constructor(options){
|
|
15664
|
-
|
|
15669
|
+
const sharedOptions = parseOptions(options.shared, (item, key)=>{
|
|
15665
15670
|
var str;
|
|
15666
15671
|
if ("string" != typeof item) throw Error("Unexpected array in shared");
|
|
15667
15672
|
return item !== key && (str = item, VERSION_PATTERN_REGEXP.test(str)) ? {
|
|
@@ -15797,7 +15802,7 @@ Help:
|
|
|
15797
15802
|
let _options = JSON.stringify(options || {});
|
|
15798
15803
|
return binding_default().transform(source, _options);
|
|
15799
15804
|
}
|
|
15800
|
-
let exports_rspackVersion = "1.
|
|
15805
|
+
let exports_rspackVersion = "1.6.0-beta.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
15801
15806
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
15802
15807
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
15803
15808
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -15844,22 +15849,20 @@ Help:
|
|
|
15844
15849
|
this._options = _options;
|
|
15845
15850
|
}
|
|
15846
15851
|
apply(compiler) {
|
|
15847
|
-
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
|
|
15852
|
-
|
|
15853
|
-
|
|
15854
|
-
|
|
15855
|
-
|
|
15856
|
-
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
};
|
|
15862
|
-
}(this._options);
|
|
15852
|
+
var options;
|
|
15853
|
+
let runtimeToolsPath, bundlerRuntimePath, runtimePath, { webpack } = compiler, paths = (runtimeToolsPath = (options = this._options).implementation ?? require.resolve("@module-federation/runtime-tools"), bundlerRuntimePath = require.resolve("@module-federation/webpack-bundler-runtime", {
|
|
15854
|
+
paths: [
|
|
15855
|
+
runtimeToolsPath
|
|
15856
|
+
]
|
|
15857
|
+
}), runtimePath = require.resolve("@module-federation/runtime", {
|
|
15858
|
+
paths: [
|
|
15859
|
+
runtimeToolsPath
|
|
15860
|
+
]
|
|
15861
|
+
}), {
|
|
15862
|
+
runtimeTools: runtimeToolsPath,
|
|
15863
|
+
bundlerRuntime: bundlerRuntimePath,
|
|
15864
|
+
runtime: runtimePath
|
|
15865
|
+
});
|
|
15863
15866
|
compiler.options.resolve.alias = {
|
|
15864
15867
|
"@module-federation/runtime-tools": paths.runtimeTools,
|
|
15865
15868
|
"@module-federation/runtime": paths.runtime,
|
|
@@ -15922,8 +15925,10 @@ Help:
|
|
|
15922
15925
|
return remoteInfos;
|
|
15923
15926
|
}(options), runtimePluginImports = [], runtimePluginVars = [];
|
|
15924
15927
|
for(let i = 0; i < runtimePlugins.length; i++){
|
|
15925
|
-
let runtimePluginVar = `__module_federation_runtime_plugin_${i}__
|
|
15926
|
-
runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(
|
|
15928
|
+
let runtimePluginVar = `__module_federation_runtime_plugin_${i}__`, pluginSpec = runtimePlugins[i], pluginPath = Array.isArray(pluginSpec) ? pluginSpec[0] : pluginSpec, pluginParams = Array.isArray(pluginSpec) ? pluginSpec[1] : void 0;
|
|
15929
|
+
runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
|
|
15930
|
+
let paramsCode = void 0 === pluginParams ? "undefined" : JSON.stringify(pluginParams);
|
|
15931
|
+
runtimePluginVars.push(`${runtimePluginVar}(${paramsCode})`);
|
|
15927
15932
|
}
|
|
15928
15933
|
let content = [
|
|
15929
15934
|
`import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,
|
|
@@ -15988,6 +15993,7 @@ Help:
|
|
|
15988
15993
|
}
|
|
15989
15994
|
},
|
|
15990
15995
|
RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
|
|
15996
|
+
EsmLibraryPlugin: EsmLibraryPlugin,
|
|
15991
15997
|
RsdoctorPlugin: RsdoctorPluginImpl,
|
|
15992
15998
|
RstestPlugin: RstestPlugin,
|
|
15993
15999
|
RslibPlugin: RslibPlugin,
|