@rspack/core 1.5.8 → 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/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/RsdoctorPlugin.d.ts +2 -2
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- 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 +34 -5
- 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 +1 -1
- package/dist/index.js +630 -648
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- 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 +44 -45
- 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) {
|
|
@@ -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",
|
|
@@ -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 = "")=>({
|
|
@@ -2754,7 +2749,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2754
2749
|
class Message extends Error {
|
|
2755
2750
|
constructor(){
|
|
2756
2751
|
super(), this.stack = void 0, Error.captureStackTrace(this);
|
|
2757
|
-
|
|
2752
|
+
const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP);
|
|
2758
2753
|
this.message = match?.[1] ? createMessage(match[1]) : createMessage();
|
|
2759
2754
|
}
|
|
2760
2755
|
}
|
|
@@ -2780,7 +2775,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2780
2775
|
chunkSize;
|
|
2781
2776
|
digestSize;
|
|
2782
2777
|
constructor(instance, instancesPool, chunkSize, digestSize){
|
|
2783
|
-
|
|
2778
|
+
const exports1 = instance.exports;
|
|
2784
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;
|
|
2785
2780
|
}
|
|
2786
2781
|
reset() {
|
|
@@ -3134,35 +3129,34 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3134
3129
|
parallel;
|
|
3135
3130
|
loaderItem;
|
|
3136
3131
|
constructor(loaderItem, compiler){
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
}
|
|
3162
|
-
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;
|
|
3163
3156
|
}
|
|
3164
|
-
|
|
3165
|
-
|
|
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);
|
|
3166
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 ?? {};
|
|
3167
3161
|
}
|
|
3168
3162
|
get pitchExecuted() {
|
|
@@ -3428,9 +3422,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3428
3422
|
is_pitch: pitch,
|
|
3429
3423
|
resource: resource
|
|
3430
3424
|
}
|
|
3431
|
-
}), parallelism)
|
|
3432
|
-
|
|
3433
|
-
|
|
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 = {
|
|
3434
3429
|
hot: loaderContext.hot,
|
|
3435
3430
|
context: loaderContext.context,
|
|
3436
3431
|
resourcePath: loaderContext.resourcePath,
|
|
@@ -3483,125 +3478,125 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3483
3478
|
userRequest: normalModule?.userRequest,
|
|
3484
3479
|
rawRequest: normalModule?.rawRequest
|
|
3485
3480
|
}
|
|
3486
|
-
}
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
case "AddDependency":
|
|
3495
|
-
loaderContext.addDependency(args[0]);
|
|
3496
|
-
break;
|
|
3497
|
-
case "AddContextDependency":
|
|
3498
|
-
loaderContext.addContextDependency(args[0]);
|
|
3499
|
-
break;
|
|
3500
|
-
case "AddMissingDependency":
|
|
3501
|
-
loaderContext.addMissingDependency(args[0]);
|
|
3502
|
-
break;
|
|
3503
|
-
case "AddBuildDependency":
|
|
3504
|
-
loaderContext.addBuildDependency(args[0]);
|
|
3505
|
-
break;
|
|
3506
|
-
case "GetDependencies":
|
|
3507
|
-
return loaderContext.getDependencies();
|
|
3508
|
-
case "GetContextDependencies":
|
|
3509
|
-
return loaderContext.getContextDependencies();
|
|
3510
|
-
case "GetMissingDependencies":
|
|
3511
|
-
return loaderContext.getMissingDependencies();
|
|
3512
|
-
case "ClearDependencies":
|
|
3513
|
-
loaderContext.clearDependencies();
|
|
3514
|
-
break;
|
|
3515
|
-
case "Resolve":
|
|
3516
|
-
return new Promise((resolve, reject)=>{
|
|
3517
|
-
loaderContext.resolve(args[0], args[1], (err, result)=>{
|
|
3518
|
-
err ? reject(err) : resolve(result);
|
|
3519
|
-
});
|
|
3520
|
-
});
|
|
3521
|
-
case "GetResolve":
|
|
3522
|
-
return new Promise((resolve, reject)=>{
|
|
3523
|
-
loaderContext.getResolve(args[0])(args[1], args[2], (err, result)=>{
|
|
3524
|
-
err ? reject(err) : resolve(result);
|
|
3525
|
-
});
|
|
3526
|
-
});
|
|
3527
|
-
case "GetLogger":
|
|
3528
|
-
{
|
|
3529
|
-
let [type, name, arg] = args;
|
|
3530
|
-
loaderContext.getLogger(name)[type](...arg);
|
|
3531
|
-
}
|
|
3532
|
-
case "EmitError":
|
|
3533
|
-
{
|
|
3534
|
-
let workerError = args[0], error = Error(workerError.message);
|
|
3535
|
-
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]);
|
|
3536
3489
|
break;
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
{
|
|
3540
|
-
let workerError = args[0], error = Error(workerError.message);
|
|
3541
|
-
error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitWarning(error);
|
|
3490
|
+
case "AddContextDependency":
|
|
3491
|
+
loaderContext.addContextDependency(args[0]);
|
|
3542
3492
|
break;
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
{
|
|
3546
|
-
let [name, content, sourceMap, assetInfo] = args;
|
|
3547
|
-
loaderContext.emitFile(name, content, sourceMap, assetInfo);
|
|
3493
|
+
case "AddMissingDependency":
|
|
3494
|
+
loaderContext.addMissingDependency(args[0]);
|
|
3548
3495
|
break;
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
{
|
|
3552
|
-
let diagnostic = args[0];
|
|
3553
|
-
loaderContext.experiments.emitDiagnostic(diagnostic);
|
|
3496
|
+
case "AddBuildDependency":
|
|
3497
|
+
loaderContext.addBuildDependency(args[0]);
|
|
3554
3498
|
break;
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
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();
|
|
3560
3507
|
break;
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
let updates = args[0];
|
|
3567
|
-
loaderContext.loaders = loaderContext.loaders.map((item, index)=>{
|
|
3568
|
-
let update = updates[index];
|
|
3569
|
-
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
|
+
});
|
|
3570
3513
|
});
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
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
|
+
}
|
|
3595
3590
|
}
|
|
3596
|
-
}
|
|
3597
|
-
})
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
}
|
|
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) || [];
|
|
3605
3600
|
return JavaScriptTracer.endAsync({
|
|
3606
3601
|
name: loaderName,
|
|
3607
3602
|
trackName: loaderName,
|
|
@@ -3701,39 +3696,45 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3701
3696
|
let o, isBuiltin = !1;
|
|
3702
3697
|
if (use.loader.startsWith(BUILTIN_LOADER_PREFIX)) {
|
|
3703
3698
|
let temp = function(identifier, o, options) {
|
|
3704
|
-
if (identifier.startsWith(`${BUILTIN_LOADER_PREFIX}swc-loader`)) {
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
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"
|
|
3726
3726
|
});
|
|
3727
|
-
}
|
|
3728
|
-
typeExports: (options1 = rspackExperiments.collectTypeScriptInfo).typeExports,
|
|
3729
|
-
exportedEnum: !0 === options1.exportedEnum ? "all" : !1 === options1.exportedEnum || void 0 === options1.exportedEnum ? "none" : "const-only"
|
|
3730
|
-
}));
|
|
3727
|
+
}
|
|
3731
3728
|
}
|
|
3732
|
-
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;
|
|
3733
3736
|
}
|
|
3734
|
-
return
|
|
3735
|
-
o1.targets
|
|
3736
|
-
]), 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;
|
|
3737
3738
|
}(use.loader, use.options, 0);
|
|
3738
3739
|
o = isNil(temp) ? void 0 : "string" == typeof temp ? temp : JSON.stringify(temp, null, 2), isBuiltin = !0;
|
|
3739
3740
|
}
|
|
@@ -3847,7 +3848,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
3847
3848
|
resolve: rule.resolve ? getRawResolve(rule.resolve) : void 0,
|
|
3848
3849
|
oneOf: rule.oneOf ? rule.oneOf.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.oneOf[${index}]`, options, rule.type ?? upperType)) : void 0,
|
|
3849
3850
|
rules: rule.rules ? rule.rules.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.rules[${index}]`, options, rule.type ?? upperType)) : void 0,
|
|
3850
|
-
enforce: rule.enforce
|
|
3851
|
+
enforce: rule.enforce,
|
|
3852
|
+
extractSourceMap: rule.extractSourceMap
|
|
3851
3853
|
};
|
|
3852
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)=>{
|
|
3853
3855
|
let { path, query, fragment } = parseResource(resourceQueryFragment);
|
|
@@ -4188,11 +4190,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4188
4190
|
chunks.push(chunk);
|
|
4189
4191
|
}), stream.on("end", ()=>{
|
|
4190
4192
|
let bodyBuffer = Buffer.concat(chunks);
|
|
4191
|
-
|
|
4192
|
-
resolve({
|
|
4193
|
+
res.complete ? resolve({
|
|
4193
4194
|
res,
|
|
4194
4195
|
body: bodyBuffer
|
|
4195
|
-
});
|
|
4196
|
+
}) : reject(Error(`${url} request was terminated early`));
|
|
4196
4197
|
});
|
|
4197
4198
|
}).on("error", reject);
|
|
4198
4199
|
});
|
|
@@ -4462,11 +4463,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4462
4463
|
var _a;
|
|
4463
4464
|
(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
|
|
4464
4465
|
}), inst._zod.check = (payload)=>{
|
|
4466
|
+
var val, step;
|
|
4467
|
+
let valDecCount, stepDecCount, decCount, valInt;
|
|
4465
4468
|
if (typeof payload.value != typeof def.value) throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
4466
|
-
("bigint" == typeof payload.value ? payload.value % def.value === BigInt(0) : 0
|
|
4467
|
-
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(".", ""));
|
|
4468
|
-
return valInt % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
|
|
4469
|
-
}(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({
|
|
4470
4470
|
origin: typeof payload.value,
|
|
4471
4471
|
code: "not_multiple_of",
|
|
4472
4472
|
divisor: def.value,
|
|
@@ -4828,12 +4828,11 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4828
4828
|
version: 1
|
|
4829
4829
|
};
|
|
4830
4830
|
}), $ZodString = $constructor("$ZodString", (inst, def)=>{
|
|
4831
|
+
var params;
|
|
4832
|
+
let regex;
|
|
4831
4833
|
$ZodType.init(inst, def), inst._zod.pattern = [
|
|
4832
4834
|
...inst?._zod.bag?.patterns ?? []
|
|
4833
|
-
].pop() ?? ((params)=>{
|
|
4834
|
-
let regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
4835
|
-
return RegExp(`^${regex}$`);
|
|
4836
|
-
})(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, _)=>{
|
|
4837
4836
|
if (def.coerce) try {
|
|
4838
4837
|
payload.value = String(payload.value);
|
|
4839
4838
|
} catch (_) {}
|
|
@@ -4913,16 +4912,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
4913
4912
|
}), $ZodKSUID = $constructor("$ZodKSUID", (inst, def)=>{
|
|
4914
4913
|
def.pattern ?? (def.pattern = ksuid), $ZodStringFormat.init(inst, def);
|
|
4915
4914
|
}), $ZodISODateTime = $constructor("$ZodISODateTime", (inst, def)=>{
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
let timeRegex = `${time}(?:${opts.join("|")})`;
|
|
4924
|
-
return RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
4925
|
-
}(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);
|
|
4926
4922
|
}), $ZodISODate = $constructor("$ZodISODate", (inst, def)=>{
|
|
4927
4923
|
def.pattern ?? (def.pattern = regexes_date), $ZodStringFormat.init(inst, def);
|
|
4928
4924
|
}), $ZodISOTime = $constructor("$ZodISOTime", (inst, def)=>{
|
|
@@ -5464,11 +5460,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5464
5460
|
return proms.length ? Promise.all(proms).then(()=>payload) : payload;
|
|
5465
5461
|
};
|
|
5466
5462
|
}), $ZodEnum = $constructor("$ZodEnum", (inst, def)=>{
|
|
5463
|
+
var entries;
|
|
5464
|
+
let numericValues;
|
|
5467
5465
|
$ZodType.init(inst, def);
|
|
5468
|
-
let values =
|
|
5469
|
-
let numericValues = Object.values(entries).filter((v)=>"number" == typeof v);
|
|
5470
|
-
return Object.entries(entries).filter(([k, _])=>-1 === numericValues.indexOf(+k)).map(([_, v])=>v);
|
|
5471
|
-
}(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));
|
|
5472
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)=>{
|
|
5473
5468
|
let input = payload.value;
|
|
5474
5469
|
return inst._zod.values.has(input) || payload.issues.push({
|
|
@@ -5727,36 +5722,37 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5727
5722
|
}), classic_errors_initializer = (inst, issues)=>{
|
|
5728
5723
|
$ZodError.init(inst, issues), inst.name = "ZodError", Object.defineProperties(inst, {
|
|
5729
5724
|
format: {
|
|
5730
|
-
value: (mapper)=>
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
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++;
|
|
5756
5752
|
}
|
|
5757
|
-
}
|
|
5758
|
-
|
|
5759
|
-
|
|
5753
|
+
}
|
|
5754
|
+
})(error), fieldErrors;
|
|
5755
|
+
}
|
|
5760
5756
|
},
|
|
5761
5757
|
flatten: {
|
|
5762
5758
|
value: (mapper)=>(function(error, mapper = (issue)=>issue.message) {
|
|
@@ -5838,17 +5834,15 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5838
5834
|
fn: fn,
|
|
5839
5835
|
...normalizeParams(_params)
|
|
5840
5836
|
});
|
|
5841
|
-
}(check, params)), inst.superRefine = (refinement)=>
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
return ch;
|
|
5851
|
-
}(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({
|
|
5852
5846
|
type: "nonoptional",
|
|
5853
5847
|
innerType: inst,
|
|
5854
5848
|
...normalizeParams(params)
|
|
@@ -6509,9 +6503,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
6509
6503
|
$ZodCustom.init(inst, def), ZodType.init(inst, def);
|
|
6510
6504
|
});
|
|
6511
6505
|
function custom(fn, _params) {
|
|
6512
|
-
var Class
|
|
6513
|
-
let norm
|
|
6514
|
-
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({
|
|
6515
6509
|
type: "custom",
|
|
6516
6510
|
check: "custom",
|
|
6517
6511
|
fn: fn1,
|
|
@@ -7174,9 +7168,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7174
7168
|
let json = JSON.parse(data);
|
|
7175
7169
|
"function" != typeof c.templateParameters && (json.compilation = compilation);
|
|
7176
7170
|
let renderTag = function() {
|
|
7177
|
-
var tag
|
|
7178
|
-
let attributes
|
|
7179
|
-
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]}"`), `<${[
|
|
7180
7174
|
tag.tagName
|
|
7181
7175
|
].concat(attributes).join(" ")}${tag.voidTag && !tag.innerHTML ? "/" : ""}>${tag.innerHTML || ""}${tag.voidTag && !tag.innerHTML ? "" : `</${tag.tagName}>`}`;
|
|
7182
7176
|
}, renderTagList = function() {
|
|
@@ -7193,14 +7187,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7193
7187
|
return json;
|
|
7194
7188
|
}
|
|
7195
7189
|
this.hooks.compilation.tap("HtmlRspackPlugin", (compilationInstance)=>{
|
|
7196
|
-
var compilation1
|
|
7197
|
-
let optionsMap
|
|
7198
|
-
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);
|
|
7199
7193
|
}), this.hooks.done.tap("HtmlRspackPlugin", (stats)=>{
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
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);
|
|
7204
7197
|
});
|
|
7205
7198
|
let templateContent = c.templateContent;
|
|
7206
7199
|
if ("function" == typeof templateContent) templateFn = async (data)=>{
|
|
@@ -7582,7 +7575,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7582
7575
|
} catch (e) {
|
|
7583
7576
|
validateError = e;
|
|
7584
7577
|
}
|
|
7585
|
-
|
|
7578
|
+
const finalOptions = validateError ? {
|
|
7586
7579
|
hashFuncNames: [
|
|
7587
7580
|
"sha384"
|
|
7588
7581
|
],
|
|
@@ -7660,11 +7653,11 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7660
7653
|
});
|
|
7661
7654
|
});
|
|
7662
7655
|
}), "string" == typeof this.options.htmlPlugin && this.options.htmlPlugin !== NATIVE_HTML_PLUGIN) {
|
|
7656
|
+
var htmlPlugin, obj;
|
|
7663
7657
|
let self = this;
|
|
7664
7658
|
try {
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
"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)=>{
|
|
7668
7661
|
if ("string" == typeof compiler.options.output.chunkLoading && [
|
|
7669
7662
|
"require",
|
|
7670
7663
|
"async-node"
|
|
@@ -7702,7 +7695,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7702
7695
|
include: options?.include,
|
|
7703
7696
|
exclude: options?.exclude,
|
|
7704
7697
|
extractComments: function(extractComments) {
|
|
7705
|
-
|
|
7698
|
+
var value;
|
|
7699
|
+
let type, conditionStr = (condition)=>{
|
|
7706
7700
|
if (void 0 === condition || !0 === condition) return "@preserve|@lic|@cc_on|^\\**!";
|
|
7707
7701
|
if (!1 === condition) throw Error("unreachable");
|
|
7708
7702
|
return condition.source;
|
|
@@ -7716,10 +7710,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7716
7710
|
if (extractComments instanceof RegExp) return {
|
|
7717
7711
|
condition: extractComments.source
|
|
7718
7712
|
};
|
|
7719
|
-
if (
|
|
7720
|
-
let type = typeof value;
|
|
7721
|
-
return null != value && ("object" === type || "function" === type);
|
|
7722
|
-
}(extractComments)) {
|
|
7713
|
+
if (type = typeof (value = extractComments), null != value && ("object" === type || "function" === type)) {
|
|
7723
7714
|
if (!1 === extractComments.condition) return;
|
|
7724
7715
|
return {
|
|
7725
7716
|
condition: conditionStr(extractComments.condition),
|
|
@@ -7769,7 +7760,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
7769
7760
|
};
|
|
7770
7761
|
}
|
|
7771
7762
|
}
|
|
7772
|
-
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;
|
|
7773
7764
|
class Template {
|
|
7774
7765
|
static getFunctionContent(fn) {
|
|
7775
7766
|
return fn.toString().replace(FUNCTION_CONTENT_REGEX, "").replace(INDENT_MULTILINE_REGEX, "").replace(LINE_SEPARATOR_REGEX, "\n");
|
|
@@ -8668,9 +8659,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8668
8659
|
let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
|
|
8669
8660
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
|
8670
8661
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
8671
|
-
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, "
|
|
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);
|
|
8672
8663
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
8673
|
-
"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)));
|
|
8674
8665
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst })=>{
|
|
8675
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 })=>{
|
|
8676
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", [
|
|
@@ -8679,7 +8670,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8679
8670
|
})(module.parser.javascript, {
|
|
8680
8671
|
usedExports,
|
|
8681
8672
|
inlineConst
|
|
8682
|
-
}), 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) {
|
|
8683
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");
|
|
8684
8675
|
let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
|
|
8685
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);
|
|
@@ -8925,7 +8916,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
8925
8916
|
if (tp.globalThis) return "globalThis";
|
|
8926
8917
|
}
|
|
8927
8918
|
return "self";
|
|
8928
|
-
}), 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);
|
|
8929
8920
|
let { trustedTypes } = output;
|
|
8930
8921
|
trustedTypes && (defaults_F(trustedTypes, "policyName", ()=>output.uniqueName.replace(/[^a-zA-Z0-9\-#=_/@.%]+/g, "_") || "webpack"), D(trustedTypes, "onPolicyCreationFailure", "stop"));
|
|
8931
8922
|
let forEachEntry = (fn)=>{
|
|
@@ -9277,7 +9268,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9277
9268
|
plugins: nestedArray(config.plugins, (p)=>[
|
|
9278
9269
|
...p
|
|
9279
9270
|
]),
|
|
9280
|
-
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.")(), {
|
|
9281
9272
|
...experiments,
|
|
9282
9273
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
9283
9274
|
if ("boolean" == typeof cache || "memory" === cache.type) return cache;
|
|
@@ -9446,10 +9437,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9446
9437
|
throw Error(`${absPath} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system`);
|
|
9447
9438
|
})(fs, p);
|
|
9448
9439
|
return dir === p ? void callback(err) : void mkdirp(fs, dir, (err)=>{
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
if (err) return "EEXIST" === err.code ? void callback() : void callback(err);
|
|
9452
|
-
callback();
|
|
9440
|
+
err ? callback(err) : fs.mkdir(p, (err)=>{
|
|
9441
|
+
err ? "EEXIST" === err.code ? callback() : callback(err) : callback();
|
|
9453
9442
|
});
|
|
9454
9443
|
});
|
|
9455
9444
|
}
|
|
@@ -9661,8 +9650,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
9661
9650
|
}
|
|
9662
9651
|
}
|
|
9663
9652
|
let makeWebpackErrorCallback = (callback, hook)=>(err, result)=>{
|
|
9664
|
-
|
|
9665
|
-
callback(null, result);
|
|
9653
|
+
err ? err instanceof WebpackError ? callback(err) : callback(new HookWebpackError(err, hook)) : callback(null, result);
|
|
9666
9654
|
};
|
|
9667
9655
|
class Cache {
|
|
9668
9656
|
static STAGE_DISK = 10;
|
|
@@ -10314,7 +10302,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
10314
10302
|
});
|
|
10315
10303
|
}
|
|
10316
10304
|
}
|
|
10317
|
-
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.
|
|
10318
10306
|
|
|
10319
10307
|
Help:
|
|
10320
10308
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -10799,7 +10787,7 @@ Help:
|
|
|
10799
10787
|
callback(err, entries, compilation);
|
|
10800
10788
|
} catch (e) {
|
|
10801
10789
|
let err = Error(`compiler.runAsChild callback error: ${e}`);
|
|
10802
|
-
this.parentCompilation.errors.push(err)
|
|
10790
|
+
this.parentCompilation.errors.push(err);
|
|
10803
10791
|
}
|
|
10804
10792
|
};
|
|
10805
10793
|
this.compile((err, compilation)=>{
|
|
@@ -10846,10 +10834,9 @@ Help:
|
|
|
10846
10834
|
});
|
|
10847
10835
|
}
|
|
10848
10836
|
close(callback) {
|
|
10849
|
-
|
|
10837
|
+
this.watching ? this.watching.close(()=>{
|
|
10850
10838
|
this.close(callback);
|
|
10851
|
-
})
|
|
10852
|
-
this.hooks.shutdown.callAsync((err)=>{
|
|
10839
|
+
}) : this.hooks.shutdown.callAsync((err)=>{
|
|
10853
10840
|
if (err) return callback(err);
|
|
10854
10841
|
this.cache.shutdown(()=>{
|
|
10855
10842
|
this.#getInstance((error, instance)=>{
|
|
@@ -10895,160 +10882,158 @@ Help:
|
|
|
10895
10882
|
return this.#compilationParams = params, params;
|
|
10896
10883
|
}
|
|
10897
10884
|
#getInstance(callback) {
|
|
10898
|
-
|
|
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));
|
|
10899
10887
|
if (error) return callback(error);
|
|
10900
10888
|
if (this.#instance) return callback(null, this.#instance);
|
|
10901
|
-
let
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
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,
|
|
10906
10917
|
mode,
|
|
10907
10918
|
context: options.context,
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
rules: [
|
|
10937
|
-
{
|
|
10938
|
-
rules: module.defaultRules
|
|
10939
|
-
},
|
|
10940
|
-
{
|
|
10941
|
-
rules: module.rules
|
|
10942
|
-
}
|
|
10943
|
-
].map((rule, index)=>getRawModuleRule(rule, `ruleSet[${index}]`, options1, "javascript/auto")),
|
|
10944
|
-
parser: Object.fromEntries(Object.entries(parser = module.parser).map(([k, v])=>[
|
|
10945
|
-
k,
|
|
10946
|
-
getRawParserOptions(v, k)
|
|
10947
|
-
]).filter(([k, v])=>void 0 !== v)),
|
|
10948
|
-
generator: Object.fromEntries(Object.entries(generator = module.generator).map(([k, v])=>[
|
|
10949
|
-
k,
|
|
10950
|
-
getRawGeneratorOptions(v, k)
|
|
10951
|
-
]).filter(([k, v])=>void 0 !== v)),
|
|
10952
|
-
noParse: module.noParse
|
|
10953
|
-
}),
|
|
10954
|
-
optimization: options.optimization,
|
|
10955
|
-
stats: {
|
|
10956
|
-
colors: function(options) {
|
|
10957
|
-
if ("boolean" == typeof options || "string" == typeof options) return presetToOptions(options);
|
|
10958
|
-
if (!options) return {};
|
|
10959
|
-
let obj = {
|
|
10960
|
-
...presetToOptions(options.preset),
|
|
10961
|
-
...options
|
|
10962
|
-
};
|
|
10963
|
-
return delete obj.preset, obj;
|
|
10964
|
-
}(stats = options.stats).colors ?? !1
|
|
10965
|
-
},
|
|
10966
|
-
cache: {
|
|
10967
|
-
type: options.cache ? "memory" : "disable"
|
|
10968
|
-
},
|
|
10969
|
-
experiments,
|
|
10970
|
-
node: function(node) {
|
|
10971
|
-
if (!1 !== node) return external_node_assert_default()(!isNil(node.__dirname) && !isNil(node.global) && !isNil(node.__filename)), {
|
|
10972
|
-
dirname: String(node.__dirname),
|
|
10973
|
-
filename: String(node.__filename),
|
|
10974
|
-
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
|
|
10975
10947
|
};
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
}
|
|
10982
|
-
|
|
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
|
+
});
|
|
10983
10967
|
rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries()), rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
|
|
10984
10968
|
let instanceBinding = __webpack_require__("@rspack/binding");
|
|
10985
10969
|
this.#registers = this.#createHooksRegisters();
|
|
10986
|
-
let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(
|
|
10970
|
+
let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options2.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
10987
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);
|
|
10988
10972
|
}
|
|
10989
10973
|
#createHooksRegisters() {
|
|
10990
|
-
|
|
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);
|
|
10991
10976
|
return {
|
|
10992
|
-
...(
|
|
10993
|
-
registerCompilerThisCompilationTaps: (
|
|
10994
|
-
return
|
|
10977
|
+
...(getCompiler1 = getCompiler8, {
|
|
10978
|
+
registerCompilerThisCompilationTaps: (createTap1 = createTap7)(binding_default().RegisterJsTapKind.CompilerThisCompilation, function() {
|
|
10979
|
+
return getCompiler1().hooks.thisCompilation;
|
|
10995
10980
|
}, function(queried) {
|
|
10996
10981
|
return function(native) {
|
|
10997
|
-
return
|
|
10982
|
+
return getCompiler1().__internal__create_compilation(native), queried.call(getCompiler1().__internal__get_compilation(), getCompiler1().__internal__get_compilation_params());
|
|
10998
10983
|
};
|
|
10999
10984
|
}),
|
|
11000
|
-
registerCompilerCompilationTaps:
|
|
11001
|
-
return
|
|
10985
|
+
registerCompilerCompilationTaps: createTap1(binding_default().RegisterJsTapKind.CompilerCompilation, function() {
|
|
10986
|
+
return getCompiler1().hooks.compilation;
|
|
11002
10987
|
}, function(queried) {
|
|
11003
10988
|
return function() {
|
|
11004
|
-
return queried.call(
|
|
10989
|
+
return queried.call(getCompiler1().__internal__get_compilation(), getCompiler1().__internal__get_compilation_params());
|
|
11005
10990
|
};
|
|
11006
10991
|
}),
|
|
11007
|
-
registerCompilerMakeTaps:
|
|
11008
|
-
return
|
|
10992
|
+
registerCompilerMakeTaps: createTap1(binding_default().RegisterJsTapKind.CompilerMake, function() {
|
|
10993
|
+
return getCompiler1().hooks.make;
|
|
11009
10994
|
}, function(queried) {
|
|
11010
10995
|
return async function() {
|
|
11011
|
-
return await queried.promise(
|
|
10996
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
11012
10997
|
};
|
|
11013
10998
|
}),
|
|
11014
|
-
registerCompilerFinishMakeTaps:
|
|
11015
|
-
return
|
|
10999
|
+
registerCompilerFinishMakeTaps: createTap1(binding_default().RegisterJsTapKind.CompilerFinishMake, function() {
|
|
11000
|
+
return getCompiler1().hooks.finishMake;
|
|
11016
11001
|
}, function(queried) {
|
|
11017
11002
|
return async function() {
|
|
11018
|
-
return await queried.promise(
|
|
11003
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
11019
11004
|
};
|
|
11020
11005
|
}),
|
|
11021
|
-
registerCompilerShouldEmitTaps:
|
|
11022
|
-
return
|
|
11006
|
+
registerCompilerShouldEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerShouldEmit, function() {
|
|
11007
|
+
return getCompiler1().hooks.shouldEmit;
|
|
11023
11008
|
}, function(queried) {
|
|
11024
11009
|
return function() {
|
|
11025
|
-
return queried.call(
|
|
11010
|
+
return queried.call(getCompiler1().__internal__get_compilation());
|
|
11026
11011
|
};
|
|
11027
11012
|
}),
|
|
11028
|
-
registerCompilerEmitTaps:
|
|
11029
|
-
return
|
|
11013
|
+
registerCompilerEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerEmit, function() {
|
|
11014
|
+
return getCompiler1().hooks.emit;
|
|
11030
11015
|
}, function(queried) {
|
|
11031
11016
|
return async function() {
|
|
11032
|
-
return await queried.promise(
|
|
11017
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
11033
11018
|
};
|
|
11034
11019
|
}),
|
|
11035
|
-
registerCompilerAfterEmitTaps:
|
|
11036
|
-
return
|
|
11020
|
+
registerCompilerAfterEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerAfterEmit, function() {
|
|
11021
|
+
return getCompiler1().hooks.afterEmit;
|
|
11037
11022
|
}, function(queried) {
|
|
11038
11023
|
return async function() {
|
|
11039
|
-
return await queried.promise(
|
|
11024
|
+
return await queried.promise(getCompiler1().__internal__get_compilation());
|
|
11040
11025
|
};
|
|
11041
11026
|
}),
|
|
11042
|
-
registerCompilerAssetEmittedTaps:
|
|
11043
|
-
return
|
|
11027
|
+
registerCompilerAssetEmittedTaps: createTap1(binding_default().RegisterJsTapKind.CompilerAssetEmitted, function() {
|
|
11028
|
+
return getCompiler1().hooks.assetEmitted;
|
|
11044
11029
|
}, function(queried) {
|
|
11045
11030
|
return async function({ filename, targetPath, outputPath }) {
|
|
11046
11031
|
return queried.promise(filename, {
|
|
11047
|
-
compilation:
|
|
11032
|
+
compilation: getCompiler1().__internal__get_compilation(),
|
|
11048
11033
|
targetPath,
|
|
11049
11034
|
outputPath,
|
|
11050
11035
|
get source () {
|
|
11051
|
-
return
|
|
11036
|
+
return getCompiler1().__internal__get_compilation().getAsset(filename)?.source;
|
|
11052
11037
|
},
|
|
11053
11038
|
get content () {
|
|
11054
11039
|
return this.source?.buffer();
|
|
@@ -11057,9 +11042,9 @@ Help:
|
|
|
11057
11042
|
};
|
|
11058
11043
|
})
|
|
11059
11044
|
}),
|
|
11060
|
-
...(
|
|
11061
|
-
registerCompilationAdditionalTreeRuntimeRequirementsTaps:
|
|
11062
|
-
return
|
|
11045
|
+
...(getCompiler2 = getCompiler8, createTap2 = createTap7, createMapTap = createMapTap2, {
|
|
11046
|
+
registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements, function() {
|
|
11047
|
+
return getCompiler2().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
|
|
11063
11048
|
}, function(queried) {
|
|
11064
11049
|
return function({ chunk, runtimeRequirements }) {
|
|
11065
11050
|
let set = __from_binding_runtime_globals(runtimeRequirements);
|
|
@@ -11069,7 +11054,7 @@ Help:
|
|
|
11069
11054
|
};
|
|
11070
11055
|
}),
|
|
11071
11056
|
registerCompilationRuntimeRequirementInTreeTaps: createMapTap(binding_default().RegisterJsTapKind.CompilationRuntimeRequirementInTree, function() {
|
|
11072
|
-
return
|
|
11057
|
+
return getCompiler2().__internal__get_compilation().hooks.runtimeRequirementInTree;
|
|
11073
11058
|
}, function(queried) {
|
|
11074
11059
|
return function({ chunk, allRuntimeRequirements, runtimeRequirements }) {
|
|
11075
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) {
|
|
@@ -11083,8 +11068,8 @@ Help:
|
|
|
11083
11068
|
};
|
|
11084
11069
|
};
|
|
11085
11070
|
}),
|
|
11086
|
-
registerCompilationRuntimeModuleTaps:
|
|
11087
|
-
return
|
|
11071
|
+
registerCompilationRuntimeModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationRuntimeModule, function() {
|
|
11072
|
+
return getCompiler2().__internal__get_compilation().hooks.runtimeModule;
|
|
11088
11073
|
}, function(queried) {
|
|
11089
11074
|
return function({ module, chunk }) {
|
|
11090
11075
|
let originSource = module.source?.source;
|
|
@@ -11093,29 +11078,29 @@ Help:
|
|
|
11093
11078
|
if (newSource && newSource !== originSource) return module;
|
|
11094
11079
|
};
|
|
11095
11080
|
}),
|
|
11096
|
-
registerCompilationBuildModuleTaps:
|
|
11097
|
-
return
|
|
11081
|
+
registerCompilationBuildModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationBuildModule, function() {
|
|
11082
|
+
return getCompiler2().__internal__get_compilation().hooks.buildModule;
|
|
11098
11083
|
}, function(queried) {
|
|
11099
11084
|
return function(module) {
|
|
11100
11085
|
return queried.call(module);
|
|
11101
11086
|
};
|
|
11102
11087
|
}),
|
|
11103
|
-
registerCompilationStillValidModuleTaps:
|
|
11104
|
-
return
|
|
11088
|
+
registerCompilationStillValidModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationStillValidModule, function() {
|
|
11089
|
+
return getCompiler2().__internal__get_compilation().hooks.stillValidModule;
|
|
11105
11090
|
}, function(queried) {
|
|
11106
11091
|
return function(module) {
|
|
11107
11092
|
return queried.call(module);
|
|
11108
11093
|
};
|
|
11109
11094
|
}),
|
|
11110
|
-
registerCompilationSucceedModuleTaps:
|
|
11111
|
-
return
|
|
11095
|
+
registerCompilationSucceedModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationSucceedModule, function() {
|
|
11096
|
+
return getCompiler2().__internal__get_compilation().hooks.succeedModule;
|
|
11112
11097
|
}, function(queried) {
|
|
11113
11098
|
return function(module) {
|
|
11114
11099
|
return queried.call(module);
|
|
11115
11100
|
};
|
|
11116
11101
|
}),
|
|
11117
|
-
registerCompilationExecuteModuleTaps:
|
|
11118
|
-
return
|
|
11102
|
+
registerCompilationExecuteModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationExecuteModule, function() {
|
|
11103
|
+
return getCompiler2().__internal__get_compilation().hooks.executeModule;
|
|
11119
11104
|
}, function(queried) {
|
|
11120
11105
|
return function({ entry, id, codegenResults, runtimeModules }) {
|
|
11121
11106
|
try {
|
|
@@ -11153,96 +11138,96 @@ Help:
|
|
|
11153
11138
|
}, moduleCache = __nested_webpack_require_4781_4800__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4781_4800__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
|
|
11154
11139
|
for (let runtimeModule of runtimeModules)__nested_webpack_require_4781_4800__(runtimeModule);
|
|
11155
11140
|
let executeResult = __nested_webpack_require_4781_4800__(entry);
|
|
11156
|
-
|
|
11141
|
+
getCompiler2().__internal__get_module_execution_results_map().set(id, executeResult);
|
|
11157
11142
|
} catch (e) {
|
|
11158
|
-
throw
|
|
11143
|
+
throw getCompiler2().__internal__get_module_execution_results_map().set(id, e), e;
|
|
11159
11144
|
}
|
|
11160
11145
|
};
|
|
11161
11146
|
}),
|
|
11162
|
-
registerCompilationFinishModulesTaps:
|
|
11163
|
-
return
|
|
11147
|
+
registerCompilationFinishModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationFinishModules, function() {
|
|
11148
|
+
return getCompiler2().__internal__get_compilation().hooks.finishModules;
|
|
11164
11149
|
}, function(queried) {
|
|
11165
11150
|
return async function() {
|
|
11166
|
-
return await queried.promise(
|
|
11151
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().modules);
|
|
11167
11152
|
};
|
|
11168
11153
|
}),
|
|
11169
|
-
registerCompilationOptimizeModulesTaps:
|
|
11170
|
-
return
|
|
11154
|
+
registerCompilationOptimizeModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeModules, function() {
|
|
11155
|
+
return getCompiler2().__internal__get_compilation().hooks.optimizeModules;
|
|
11171
11156
|
}, function(queried) {
|
|
11172
11157
|
return function() {
|
|
11173
|
-
return queried.call(
|
|
11158
|
+
return queried.call(getCompiler2().__internal__get_compilation().modules.values());
|
|
11174
11159
|
};
|
|
11175
11160
|
}),
|
|
11176
|
-
registerCompilationAfterOptimizeModulesTaps:
|
|
11177
|
-
return
|
|
11161
|
+
registerCompilationAfterOptimizeModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterOptimizeModules, function() {
|
|
11162
|
+
return getCompiler2().__internal__get_compilation().hooks.afterOptimizeModules;
|
|
11178
11163
|
}, function(queried) {
|
|
11179
11164
|
return function() {
|
|
11180
|
-
queried.call(
|
|
11165
|
+
queried.call(getCompiler2().__internal__get_compilation().modules.values());
|
|
11181
11166
|
};
|
|
11182
11167
|
}),
|
|
11183
|
-
registerCompilationOptimizeTreeTaps:
|
|
11184
|
-
return
|
|
11168
|
+
registerCompilationOptimizeTreeTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeTree, function() {
|
|
11169
|
+
return getCompiler2().__internal__get_compilation().hooks.optimizeTree;
|
|
11185
11170
|
}, function(queried) {
|
|
11186
11171
|
return async function() {
|
|
11187
|
-
return await queried.promise(
|
|
11172
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().chunks, getCompiler2().__internal__get_compilation().modules);
|
|
11188
11173
|
};
|
|
11189
11174
|
}),
|
|
11190
|
-
registerCompilationOptimizeChunkModulesTaps:
|
|
11191
|
-
return
|
|
11175
|
+
registerCompilationOptimizeChunkModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeChunkModules, function() {
|
|
11176
|
+
return getCompiler2().__internal__get_compilation().hooks.optimizeChunkModules;
|
|
11192
11177
|
}, function(queried) {
|
|
11193
11178
|
return async function() {
|
|
11194
|
-
return await queried.promise(
|
|
11179
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().chunks, getCompiler2().__internal__get_compilation().modules);
|
|
11195
11180
|
};
|
|
11196
11181
|
}),
|
|
11197
|
-
registerCompilationChunkHashTaps:
|
|
11198
|
-
return
|
|
11182
|
+
registerCompilationChunkHashTaps: createTap2(binding_default().RegisterJsTapKind.CompilationChunkHash, function() {
|
|
11183
|
+
return getCompiler2().__internal__get_compilation().hooks.chunkHash;
|
|
11199
11184
|
}, function(queried) {
|
|
11200
11185
|
return function(chunk) {
|
|
11201
11186
|
let digestResult;
|
|
11202
|
-
if (!
|
|
11203
|
-
let hash = createHash(
|
|
11204
|
-
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;
|
|
11205
11190
|
};
|
|
11206
11191
|
}),
|
|
11207
|
-
registerCompilationChunkAssetTaps:
|
|
11208
|
-
return
|
|
11192
|
+
registerCompilationChunkAssetTaps: createTap2(binding_default().RegisterJsTapKind.CompilationChunkAsset, function() {
|
|
11193
|
+
return getCompiler2().__internal__get_compilation().hooks.chunkAsset;
|
|
11209
11194
|
}, function(queried) {
|
|
11210
11195
|
return function({ chunk, filename }) {
|
|
11211
11196
|
return queried.call(chunk, filename);
|
|
11212
11197
|
};
|
|
11213
11198
|
}),
|
|
11214
|
-
registerCompilationProcessAssetsTaps:
|
|
11215
|
-
return
|
|
11199
|
+
registerCompilationProcessAssetsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationProcessAssets, function() {
|
|
11200
|
+
return getCompiler2().__internal__get_compilation().hooks.processAssets;
|
|
11216
11201
|
}, function(queried) {
|
|
11217
11202
|
return async function() {
|
|
11218
|
-
return await queried.promise(
|
|
11203
|
+
return await queried.promise(getCompiler2().__internal__get_compilation().assets);
|
|
11219
11204
|
};
|
|
11220
11205
|
}),
|
|
11221
|
-
registerCompilationAfterProcessAssetsTaps:
|
|
11222
|
-
return
|
|
11206
|
+
registerCompilationAfterProcessAssetsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterProcessAssets, function() {
|
|
11207
|
+
return getCompiler2().__internal__get_compilation().hooks.afterProcessAssets;
|
|
11223
11208
|
}, function(queried) {
|
|
11224
11209
|
return function() {
|
|
11225
|
-
return queried.call(
|
|
11210
|
+
return queried.call(getCompiler2().__internal__get_compilation().assets);
|
|
11226
11211
|
};
|
|
11227
11212
|
}),
|
|
11228
|
-
registerCompilationSealTaps:
|
|
11229
|
-
return
|
|
11213
|
+
registerCompilationSealTaps: createTap2(binding_default().RegisterJsTapKind.CompilationSeal, function() {
|
|
11214
|
+
return getCompiler2().__internal__get_compilation().hooks.seal;
|
|
11230
11215
|
}, function(queried) {
|
|
11231
11216
|
return function() {
|
|
11232
11217
|
return queried.call();
|
|
11233
11218
|
};
|
|
11234
11219
|
}),
|
|
11235
|
-
registerCompilationAfterSealTaps:
|
|
11236
|
-
return
|
|
11220
|
+
registerCompilationAfterSealTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterSeal, function() {
|
|
11221
|
+
return getCompiler2().__internal__get_compilation().hooks.afterSeal;
|
|
11237
11222
|
}, function(queried) {
|
|
11238
11223
|
return async function() {
|
|
11239
11224
|
return await queried.promise();
|
|
11240
11225
|
};
|
|
11241
11226
|
})
|
|
11242
11227
|
}),
|
|
11243
|
-
...(
|
|
11244
|
-
registerNormalModuleFactoryBeforeResolveTaps:
|
|
11245
|
-
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;
|
|
11246
11231
|
}, function(queried) {
|
|
11247
11232
|
return async function(resolveData) {
|
|
11248
11233
|
return [
|
|
@@ -11251,22 +11236,22 @@ Help:
|
|
|
11251
11236
|
];
|
|
11252
11237
|
};
|
|
11253
11238
|
}),
|
|
11254
|
-
registerNormalModuleFactoryFactorizeTaps:
|
|
11255
|
-
return
|
|
11239
|
+
registerNormalModuleFactoryFactorizeTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryFactorize, function() {
|
|
11240
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
|
|
11256
11241
|
}, function(queried) {
|
|
11257
11242
|
return async function(resolveData) {
|
|
11258
11243
|
return await queried.promise(resolveData), resolveData;
|
|
11259
11244
|
};
|
|
11260
11245
|
}),
|
|
11261
|
-
registerNormalModuleFactoryResolveTaps:
|
|
11262
|
-
return
|
|
11246
|
+
registerNormalModuleFactoryResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryResolve, function() {
|
|
11247
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
|
|
11263
11248
|
}, function(queried) {
|
|
11264
11249
|
return async function(resolveData) {
|
|
11265
11250
|
return await queried.promise(resolveData), resolveData;
|
|
11266
11251
|
};
|
|
11267
11252
|
}),
|
|
11268
11253
|
registerNormalModuleFactoryResolveForSchemeTaps: createMapTap1(binding_default().RegisterJsTapKind.NormalModuleFactoryResolveForScheme, function() {
|
|
11269
|
-
return
|
|
11254
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.resolveForScheme;
|
|
11270
11255
|
}, function(queried) {
|
|
11271
11256
|
return async function(args) {
|
|
11272
11257
|
return [
|
|
@@ -11275,8 +11260,8 @@ Help:
|
|
|
11275
11260
|
];
|
|
11276
11261
|
};
|
|
11277
11262
|
}),
|
|
11278
|
-
registerNormalModuleFactoryAfterResolveTaps:
|
|
11279
|
-
return
|
|
11263
|
+
registerNormalModuleFactoryAfterResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryAfterResolve, function() {
|
|
11264
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
|
|
11280
11265
|
}, function(queried) {
|
|
11281
11266
|
return async function(resolveData) {
|
|
11282
11267
|
return [
|
|
@@ -11285,8 +11270,8 @@ Help:
|
|
|
11285
11270
|
];
|
|
11286
11271
|
};
|
|
11287
11272
|
}),
|
|
11288
|
-
registerNormalModuleFactoryCreateModuleTaps:
|
|
11289
|
-
return
|
|
11273
|
+
registerNormalModuleFactoryCreateModuleTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryCreateModule, function() {
|
|
11274
|
+
return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.createModule;
|
|
11290
11275
|
}, function(queried) {
|
|
11291
11276
|
return async function(args) {
|
|
11292
11277
|
let data = {
|
|
@@ -11297,17 +11282,17 @@ Help:
|
|
|
11297
11282
|
};
|
|
11298
11283
|
})
|
|
11299
11284
|
}),
|
|
11300
|
-
...(
|
|
11301
|
-
registerContextModuleFactoryBeforeResolveTaps: (
|
|
11302
|
-
return
|
|
11285
|
+
...(getCompiler4 = getCompiler8, {
|
|
11286
|
+
registerContextModuleFactoryBeforeResolveTaps: (createTap4 = createTap7)(binding_default().RegisterJsTapKind.ContextModuleFactoryBeforeResolve, function() {
|
|
11287
|
+
return getCompiler4().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
|
|
11303
11288
|
}, function(queried) {
|
|
11304
11289
|
return async function(bindingData) {
|
|
11305
11290
|
let data = !!bindingData && ContextModuleFactoryBeforeResolveData.__from_binding(bindingData), result = await queried.promise(data);
|
|
11306
11291
|
return !!result && ContextModuleFactoryBeforeResolveData.__to_binding(result);
|
|
11307
11292
|
};
|
|
11308
11293
|
}),
|
|
11309
|
-
registerContextModuleFactoryAfterResolveTaps:
|
|
11310
|
-
return
|
|
11294
|
+
registerContextModuleFactoryAfterResolveTaps: createTap4(binding_default().RegisterJsTapKind.ContextModuleFactoryAfterResolve, function() {
|
|
11295
|
+
return getCompiler4().__internal__get_compilation_params().contextModuleFactory.hooks.afterResolve;
|
|
11311
11296
|
}, function(queried) {
|
|
11312
11297
|
return async function(bindingData) {
|
|
11313
11298
|
let data = !!bindingData && ContextModuleFactoryAfterResolveData.__from_binding(bindingData), result = await queried.promise(data);
|
|
@@ -11315,158 +11300,155 @@ Help:
|
|
|
11315
11300
|
};
|
|
11316
11301
|
})
|
|
11317
11302
|
}),
|
|
11318
|
-
...(
|
|
11319
|
-
registerJavascriptModulesChunkHashTaps:
|
|
11320
|
-
return JavascriptModulesPlugin.getCompilationHooks(
|
|
11303
|
+
...(getCompiler5 = getCompiler8, {
|
|
11304
|
+
registerJavascriptModulesChunkHashTaps: createTap7(binding_default().RegisterJsTapKind.JavascriptModulesChunkHash, function() {
|
|
11305
|
+
return JavascriptModulesPlugin.getCompilationHooks(getCompiler5().__internal__get_compilation()).chunkHash;
|
|
11321
11306
|
}, function(queried) {
|
|
11322
11307
|
return function(chunk) {
|
|
11323
11308
|
let digestResult;
|
|
11324
|
-
if (!
|
|
11325
|
-
let hash = createHash(
|
|
11326
|
-
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;
|
|
11327
11312
|
};
|
|
11328
11313
|
})
|
|
11329
11314
|
}),
|
|
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
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
...(getCompiler5 = getCompiler7, {
|
|
11417
|
-
registerRuntimePluginCreateScriptTaps: (createTap4 = createTap6)(binding_default().RegisterJsTapKind.RuntimePluginCreateScript, function() {
|
|
11418
|
-
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;
|
|
11419
11401
|
}, function(queried) {
|
|
11420
11402
|
return function(data) {
|
|
11421
11403
|
return queried.call(data.code, data.chunk);
|
|
11422
11404
|
};
|
|
11423
11405
|
}),
|
|
11424
|
-
registerRuntimePluginLinkPreloadTaps:
|
|
11425
|
-
return RuntimePlugin.getCompilationHooks(
|
|
11406
|
+
registerRuntimePluginLinkPreloadTaps: createTap5(binding_default().RegisterJsTapKind.RuntimePluginLinkPreload, function() {
|
|
11407
|
+
return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).linkPreload;
|
|
11426
11408
|
}, function(queried) {
|
|
11427
11409
|
return function(data) {
|
|
11428
11410
|
return queried.call(data.code, data.chunk);
|
|
11429
11411
|
};
|
|
11430
11412
|
}),
|
|
11431
|
-
registerRuntimePluginLinkPrefetchTaps:
|
|
11432
|
-
return RuntimePlugin.getCompilationHooks(
|
|
11413
|
+
registerRuntimePluginLinkPrefetchTaps: createTap5(binding_default().RegisterJsTapKind.RuntimePluginLinkPrefetch, function() {
|
|
11414
|
+
return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).linkPrefetch;
|
|
11433
11415
|
}, function(queried) {
|
|
11434
11416
|
return function(data) {
|
|
11435
11417
|
return queried.call(data.code, data.chunk);
|
|
11436
11418
|
};
|
|
11437
11419
|
})
|
|
11438
11420
|
}),
|
|
11439
|
-
...(
|
|
11440
|
-
registerRsdoctorPluginModuleGraphTaps: (
|
|
11441
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11421
|
+
...(getCompiler7 = getCompiler8, {
|
|
11422
|
+
registerRsdoctorPluginModuleGraphTaps: (createTap6 = createTap7)(binding_.RegisterJsTapKind.RsdoctorPluginModuleGraph, function() {
|
|
11423
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleGraph;
|
|
11442
11424
|
}, function(queried) {
|
|
11443
11425
|
return async function(data) {
|
|
11444
11426
|
return await queried.promise(data);
|
|
11445
11427
|
};
|
|
11446
11428
|
}),
|
|
11447
|
-
registerRsdoctorPluginChunkGraphTaps:
|
|
11448
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11429
|
+
registerRsdoctorPluginChunkGraphTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginChunkGraph, function() {
|
|
11430
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).chunkGraph;
|
|
11449
11431
|
}, function(queried) {
|
|
11450
11432
|
return async function(data) {
|
|
11451
11433
|
return await queried.promise(data);
|
|
11452
11434
|
};
|
|
11453
11435
|
}),
|
|
11454
|
-
registerRsdoctorPluginModuleIdsTaps:
|
|
11455
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11436
|
+
registerRsdoctorPluginModuleIdsTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginModuleIds, function() {
|
|
11437
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleIds;
|
|
11456
11438
|
}, function(queried) {
|
|
11457
11439
|
return async function(data) {
|
|
11458
11440
|
return await queried.promise(data);
|
|
11459
11441
|
};
|
|
11460
11442
|
}),
|
|
11461
|
-
registerRsdoctorPluginModuleSourcesTaps:
|
|
11462
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11443
|
+
registerRsdoctorPluginModuleSourcesTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginModuleSources, function() {
|
|
11444
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleSources;
|
|
11463
11445
|
}, function(queried) {
|
|
11464
11446
|
return async function(data) {
|
|
11465
11447
|
return await queried.promise(data);
|
|
11466
11448
|
};
|
|
11467
11449
|
}),
|
|
11468
|
-
registerRsdoctorPluginAssetsTaps:
|
|
11469
|
-
return RsdoctorPluginImpl.getCompilationHooks(
|
|
11450
|
+
registerRsdoctorPluginAssetsTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginAssets, function() {
|
|
11451
|
+
return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).assets;
|
|
11470
11452
|
}, function(queried) {
|
|
11471
11453
|
return async function(data) {
|
|
11472
11454
|
return await queried.promise(data);
|
|
@@ -11598,7 +11580,7 @@ Help:
|
|
|
11598
11580
|
obj.children = this.stats.map((stat, idx)=>{
|
|
11599
11581
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
11600
11582
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
11601
|
-
}), 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(""));
|
|
11602
11584
|
let mapError = (j, obj)=>({
|
|
11603
11585
|
...obj,
|
|
11604
11586
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -11614,11 +11596,8 @@ Help:
|
|
|
11614
11596
|
forToString: !0
|
|
11615
11597
|
});
|
|
11616
11598
|
return this.stats.map((stat, idx)=>{
|
|
11617
|
-
let str = stat.toString(childOptions.children[idx]), compilationName = stat.compilation.name, name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root).replace(/\|/g, " ");
|
|
11618
|
-
return str
|
|
11619
|
-
let rem = str.replace(/\n([^\n])/g, `\n $1`);
|
|
11620
|
-
return " " + rem;
|
|
11621
|
-
}(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;
|
|
11622
11601
|
}).filter(Boolean).join("\n\n");
|
|
11623
11602
|
}
|
|
11624
11603
|
}
|
|
@@ -11738,9 +11717,11 @@ Help:
|
|
|
11738
11717
|
}, this.compilers = normalizedCompilers, this._options = {
|
|
11739
11718
|
parallelism: options?.parallelism || 1 / 0
|
|
11740
11719
|
}, this.dependencies = new WeakMap(), this.running = !1;
|
|
11741
|
-
|
|
11720
|
+
const compilerStats = this.compilers.map(()=>null);
|
|
11721
|
+
let doneCompilers = 0;
|
|
11742
11722
|
for(let index = 0; index < this.compilers.length; index++){
|
|
11743
|
-
|
|
11723
|
+
const compiler = this.compilers[index], compilerIndex = index;
|
|
11724
|
+
let compilerDone = !1;
|
|
11744
11725
|
compiler.hooks.done.tap("MultiCompiler", (stats)=>{
|
|
11745
11726
|
!compilerDone && (compilerDone = !0, doneCompilers++), compilerStats[compilerIndex] = stats, doneCompilers === this.compilers.length && this.hooks.done.call(new MultiStats(compilerStats));
|
|
11746
11727
|
}), compiler.hooks.invalid.tap("MultiCompiler", ()=>{
|
|
@@ -12495,7 +12476,7 @@ Help:
|
|
|
12495
12476
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
12496
12477
|
},
|
|
12497
12478
|
version: (object)=>{
|
|
12498
|
-
object.version = "5.75.0", object.rspackVersion = "1.
|
|
12479
|
+
object.version = "5.75.0", object.rspackVersion = "1.6.0-beta.0";
|
|
12499
12480
|
},
|
|
12500
12481
|
env: (object, _compilation, _context, { _env })=>{
|
|
12501
12482
|
object.env = _env;
|
|
@@ -13220,7 +13201,7 @@ Help:
|
|
|
13220
13201
|
"chunkOrigin.moduleName": (moduleName, { bold })=>bold(moduleName),
|
|
13221
13202
|
"chunkOrigin.loc": (loc)=>loc,
|
|
13222
13203
|
"error.file": (file, { bold })=>bold(file),
|
|
13223
|
-
"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),
|
|
13224
13205
|
"error.loc": (loc, { green })=>green(loc),
|
|
13225
13206
|
"error.message": (message, { bold, formatError })=>message.includes("\u001b[") ? message : bold(formatError(message)),
|
|
13226
13207
|
"error.details": (details, { formatError })=>formatError(details),
|
|
@@ -13714,7 +13695,7 @@ Help:
|
|
|
13714
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}`);
|
|
13715
13696
|
}
|
|
13716
13697
|
let timeStr = time.toString();
|
|
13717
|
-
return time > 1000 && (timeStr =
|
|
13698
|
+
return time > 1000 && (timeStr = (time / 1000).toFixed(2), unit = " s"), `${boldQuantity ? bold(timeStr) : timeStr}${unit}`;
|
|
13718
13699
|
},
|
|
13719
13700
|
formatError: (msg, { green, yellow, red })=>{
|
|
13720
13701
|
let message = msg;
|
|
@@ -14979,7 +14960,8 @@ Help:
|
|
|
14979
14960
|
generator: schemas_record(schemas_string(), any()),
|
|
14980
14961
|
resolve: resolveOptions,
|
|
14981
14962
|
sideEffects: schemas_boolean(),
|
|
14982
|
-
enforce: literal("pre").or(literal("post"))
|
|
14963
|
+
enforce: literal("pre").or(literal("post")),
|
|
14964
|
+
extractSourceMap: schemas_boolean()
|
|
14983
14965
|
}).partial().extend({
|
|
14984
14966
|
oneOf: lazy(()=>ruleSetRule.or(falsy).array()).optional(),
|
|
14985
14967
|
rules: lazy(()=>ruleSetRule.or(falsy).array()).optional()
|
|
@@ -15684,7 +15666,7 @@ Help:
|
|
|
15684
15666
|
_provides;
|
|
15685
15667
|
_enhanced;
|
|
15686
15668
|
constructor(options){
|
|
15687
|
-
|
|
15669
|
+
const sharedOptions = parseOptions(options.shared, (item, key)=>{
|
|
15688
15670
|
var str;
|
|
15689
15671
|
if ("string" != typeof item) throw Error("Unexpected array in shared");
|
|
15690
15672
|
return item !== key && (str = item, VERSION_PATTERN_REGEXP.test(str)) ? {
|
|
@@ -15820,7 +15802,7 @@ Help:
|
|
|
15820
15802
|
let _options = JSON.stringify(options || {});
|
|
15821
15803
|
return binding_default().transform(source, _options);
|
|
15822
15804
|
}
|
|
15823
|
-
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 = {
|
|
15824
15806
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
15825
15807
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
15826
15808
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -15867,22 +15849,20 @@ Help:
|
|
|
15867
15849
|
this._options = _options;
|
|
15868
15850
|
}
|
|
15869
15851
|
apply(compiler) {
|
|
15870
|
-
|
|
15871
|
-
|
|
15872
|
-
|
|
15873
|
-
|
|
15874
|
-
|
|
15875
|
-
|
|
15876
|
-
|
|
15877
|
-
|
|
15878
|
-
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
};
|
|
15885
|
-
}(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
|
+
});
|
|
15886
15866
|
compiler.options.resolve.alias = {
|
|
15887
15867
|
"@module-federation/runtime-tools": paths.runtimeTools,
|
|
15888
15868
|
"@module-federation/runtime": paths.runtime,
|
|
@@ -15945,8 +15925,10 @@ Help:
|
|
|
15945
15925
|
return remoteInfos;
|
|
15946
15926
|
}(options), runtimePluginImports = [], runtimePluginVars = [];
|
|
15947
15927
|
for(let i = 0; i < runtimePlugins.length; i++){
|
|
15948
|
-
let runtimePluginVar = `__module_federation_runtime_plugin_${i}__
|
|
15949
|
-
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})`);
|
|
15950
15932
|
}
|
|
15951
15933
|
let content = [
|
|
15952
15934
|
`import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,
|