@rspack-canary/browser 1.5.0-canary-0de3ce24-20250810153546 → 1.5.0-canary-e5e47098-20250820070851
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/BuildInfo.d.ts +3 -3
- package/dist/Chunk.d.ts +3 -3
- package/dist/ChunkGraph.d.ts +2 -2
- package/dist/Chunks.d.ts +2 -2
- package/dist/Compilation.d.ts +3 -3
- package/dist/Compiler.d.ts +6 -1
- package/dist/ConcatenatedModule.d.ts +1 -1
- package/dist/ContextModule.d.ts +1 -1
- package/dist/Diagnostics.d.ts +1 -1
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/ExportsInfo.d.ts +1 -1
- package/dist/ExternalModule.d.ts +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/Module.d.ts +6 -17
- package/dist/ModuleGraph.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +2 -1
- package/dist/NormalModule.d.ts +2 -2
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Resolver.d.ts +1 -1
- package/dist/ResolverFactory.d.ts +1 -1
- package/dist/RspackError.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +1 -1
- package/dist/RuntimeModule.d.ts +1 -1
- package/dist/VirtualModulesPlugin.d.ts +12 -0
- package/dist/binding.d.ts +8 -0
- package/dist/browser/service.d.ts +22 -0
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +2 -2
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -2
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +2 -2
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +10 -0
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RslibPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/types.d.ts +6 -1
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +6 -5
- package/dist/index.mjs +350 -319
- package/dist/lib/DllReferencePlugin.d.ts +1 -1
- package/dist/lib/WebpackError.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +1 -1
- package/dist/loader-runner/worker.d.ts +1 -1
- package/dist/napi-binding.d.ts +3069 -0
- package/dist/rspack.wasi-browser.js +2 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/schema/config.d.ts +8 -4
- package/dist/schema/plugins.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
- package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +2 -2
- package/dist/swc.d.ts +1 -1
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/dist/util/SplitChunkSize.d.ts +1 -1
- package/dist/util/source.d.ts +1 -1
- package/package.json +6 -7
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +0 -29
package/dist/index.mjs
CHANGED
|
@@ -11800,7 +11800,7 @@ var __webpack_modules__ = {
|
|
|
11800
11800
|
},
|
|
11801
11801
|
"../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
11802
11802
|
var elliptic = exports;
|
|
11803
|
-
elliptic.version = __webpack_require__("../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json").
|
|
11803
|
+
elliptic.version = __webpack_require__("../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json").rE;
|
|
11804
11804
|
elliptic.utils = __webpack_require__("../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js");
|
|
11805
11805
|
elliptic.rand = __webpack_require__("../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js");
|
|
11806
11806
|
elliptic.curve = __webpack_require__("../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js");
|
|
@@ -35092,7 +35092,7 @@ var __webpack_modules__ = {
|
|
|
35092
35092
|
},
|
|
35093
35093
|
"./src/util/require.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
35094
35094
|
__webpack_require__.d(__webpack_exports__, {
|
|
35095
|
-
|
|
35095
|
+
y: ()=>nonWebpackRequire
|
|
35096
35096
|
});
|
|
35097
35097
|
var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/browser/fs.ts");
|
|
35098
35098
|
var _rspack_binding__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("@rspack/binding");
|
|
@@ -35104,25 +35104,19 @@ var __webpack_modules__ = {
|
|
|
35104
35104
|
node_fs__WEBPACK_IMPORTED_MODULE_0__["default"].readFile(loaderPath, {}, (err, data)=>{
|
|
35105
35105
|
if (err) return void reject(err);
|
|
35106
35106
|
const loaderCode = (null == data ? void 0 : data.toString()) || "";
|
|
35107
|
+
const codeUrl = URL.createObjectURL(new Blob([
|
|
35108
|
+
loaderCode
|
|
35109
|
+
], {
|
|
35110
|
+
type: "text/javascript"
|
|
35111
|
+
}));
|
|
35107
35112
|
try {
|
|
35108
|
-
const
|
|
35109
|
-
|
|
35110
|
-
|
|
35111
|
-
|
|
35112
|
-
|
|
35113
|
-
|
|
35114
|
-
|
|
35115
|
-
const wrapper = new Function("module", "exports", "require", loaderCode);
|
|
35116
|
-
wrapper(module, exports, createRequire);
|
|
35117
|
-
resolve(module.exports);
|
|
35118
|
-
} catch {
|
|
35119
|
-
const dataUrl = `data:text/javascript;base64,${btoa(loaderCode)}`;
|
|
35120
|
-
try {
|
|
35121
|
-
const modulePromise = eval(`import("${dataUrl}")`);
|
|
35122
|
-
modulePromise.then(resolve);
|
|
35123
|
-
} catch (e) {
|
|
35124
|
-
reject(e);
|
|
35125
|
-
}
|
|
35113
|
+
const modulePromise = eval(`import("${codeUrl}")`);
|
|
35114
|
+
modulePromise.then((module)=>{
|
|
35115
|
+
URL.revokeObjectURL(codeUrl);
|
|
35116
|
+
resolve(module);
|
|
35117
|
+
});
|
|
35118
|
+
} catch (e) {
|
|
35119
|
+
reject(e);
|
|
35126
35120
|
}
|
|
35127
35121
|
});
|
|
35128
35122
|
}).catch((err)=>reject(err));
|
|
@@ -35348,7 +35342,7 @@ var __webpack_modules__ = {
|
|
|
35348
35342
|
},
|
|
35349
35343
|
"../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json": function(module) {
|
|
35350
35344
|
module.exports = {
|
|
35351
|
-
|
|
35345
|
+
rE: "6.6.1"
|
|
35352
35346
|
};
|
|
35353
35347
|
},
|
|
35354
35348
|
"../../node_modules/.pnpm/parse-asn1@5.1.7/node_modules/parse-asn1/aesid.json": function(module) {
|
|
@@ -39191,9 +39185,6 @@ class ModuleWarning extends lib_WebpackError {
|
|
|
39191
39185
|
this.details = err && "object" == typeof err && err.stack ? cleanUp(err.stack, err.name, err.message) : void 0;
|
|
39192
39186
|
}
|
|
39193
39187
|
}
|
|
39194
|
-
var service_RequestType = /*#__PURE__*/ function(RequestType) {
|
|
39195
|
-
return RequestType;
|
|
39196
|
-
}({});
|
|
39197
39188
|
async function service_run() {
|
|
39198
39189
|
throw new Error("Not support browser");
|
|
39199
39190
|
}
|
|
@@ -39207,7 +39198,7 @@ class LoadingLoaderError extends Error {
|
|
|
39207
39198
|
}
|
|
39208
39199
|
const LoaderLoadingError = LoadingLoaderError;
|
|
39209
39200
|
function loadLoader(loader, compiler, callback) {
|
|
39210
|
-
(0, util_require.
|
|
39201
|
+
(0, util_require.y)()(loader.path).then((module)=>{
|
|
39211
39202
|
handleResult(loader, module, callback);
|
|
39212
39203
|
}, callback);
|
|
39213
39204
|
}
|
|
@@ -39788,47 +39779,47 @@ async function runLoaders(compiler, context) {
|
|
|
39788
39779
|
return {
|
|
39789
39780
|
handleIncomingRequest (requestType, ...args) {
|
|
39790
39781
|
switch(requestType){
|
|
39791
|
-
case
|
|
39782
|
+
case "AddDependency":
|
|
39792
39783
|
loaderContext.addDependency(args[0]);
|
|
39793
39784
|
break;
|
|
39794
|
-
case
|
|
39785
|
+
case "AddContextDependency":
|
|
39795
39786
|
loaderContext.addContextDependency(args[0]);
|
|
39796
39787
|
break;
|
|
39797
|
-
case
|
|
39788
|
+
case "AddMissingDependency":
|
|
39798
39789
|
loaderContext.addMissingDependency(args[0]);
|
|
39799
39790
|
break;
|
|
39800
|
-
case
|
|
39791
|
+
case "AddBuildDependency":
|
|
39801
39792
|
loaderContext.addBuildDependency(args[0]);
|
|
39802
39793
|
break;
|
|
39803
|
-
case
|
|
39794
|
+
case "GetDependencies":
|
|
39804
39795
|
return loaderContext.getDependencies();
|
|
39805
|
-
case
|
|
39796
|
+
case "GetContextDependencies":
|
|
39806
39797
|
return loaderContext.getContextDependencies();
|
|
39807
|
-
case
|
|
39798
|
+
case "GetMissingDependencies":
|
|
39808
39799
|
return loaderContext.getMissingDependencies();
|
|
39809
|
-
case
|
|
39800
|
+
case "ClearDependencies":
|
|
39810
39801
|
loaderContext.clearDependencies();
|
|
39811
39802
|
break;
|
|
39812
|
-
case
|
|
39803
|
+
case "Resolve":
|
|
39813
39804
|
return new Promise((resolve, reject)=>{
|
|
39814
39805
|
loaderContext.resolve(args[0], args[1], (err, result)=>{
|
|
39815
39806
|
if (err) reject(err);
|
|
39816
39807
|
else resolve(result);
|
|
39817
39808
|
});
|
|
39818
39809
|
});
|
|
39819
|
-
case
|
|
39810
|
+
case "GetResolve":
|
|
39820
39811
|
return new Promise((resolve, reject)=>{
|
|
39821
39812
|
loaderContext.getResolve(args[0])(args[1], args[2], (err, result)=>{
|
|
39822
39813
|
if (err) reject(err);
|
|
39823
39814
|
else resolve(result);
|
|
39824
39815
|
});
|
|
39825
39816
|
});
|
|
39826
|
-
case
|
|
39817
|
+
case "GetLogger":
|
|
39827
39818
|
{
|
|
39828
39819
|
const [type, name, arg] = args;
|
|
39829
39820
|
loaderContext.getLogger(name)[type](...arg);
|
|
39830
39821
|
}
|
|
39831
|
-
case
|
|
39822
|
+
case "EmitError":
|
|
39832
39823
|
{
|
|
39833
39824
|
const workerError = args[0];
|
|
39834
39825
|
const error = new Error(workerError.message);
|
|
@@ -39837,7 +39828,7 @@ async function runLoaders(compiler, context) {
|
|
|
39837
39828
|
loaderContext.emitError(error);
|
|
39838
39829
|
break;
|
|
39839
39830
|
}
|
|
39840
|
-
case
|
|
39831
|
+
case "EmitWarning":
|
|
39841
39832
|
{
|
|
39842
39833
|
const workerError = args[0];
|
|
39843
39834
|
const error = new Error(workerError.message);
|
|
@@ -39846,27 +39837,27 @@ async function runLoaders(compiler, context) {
|
|
|
39846
39837
|
loaderContext.emitWarning(error);
|
|
39847
39838
|
break;
|
|
39848
39839
|
}
|
|
39849
|
-
case
|
|
39840
|
+
case "EmitFile":
|
|
39850
39841
|
{
|
|
39851
39842
|
const [name, content, sourceMap, assetInfo] = args;
|
|
39852
39843
|
loaderContext.emitFile(name, content, sourceMap, assetInfo);
|
|
39853
39844
|
break;
|
|
39854
39845
|
}
|
|
39855
|
-
case
|
|
39846
|
+
case "EmitDiagnostic":
|
|
39856
39847
|
{
|
|
39857
39848
|
const diagnostic = args[0];
|
|
39858
39849
|
loaderContext.experiments.emitDiagnostic(diagnostic);
|
|
39859
39850
|
break;
|
|
39860
39851
|
}
|
|
39861
|
-
case
|
|
39852
|
+
case "SetCacheable":
|
|
39862
39853
|
{
|
|
39863
39854
|
const cacheable = args[0];
|
|
39864
39855
|
loaderContext.cacheable(cacheable);
|
|
39865
39856
|
break;
|
|
39866
39857
|
}
|
|
39867
|
-
case
|
|
39858
|
+
case "ImportModule":
|
|
39868
39859
|
return loaderContext.importModule(args[0], args[1]);
|
|
39869
|
-
case
|
|
39860
|
+
case "UpdateLoaderObjects":
|
|
39870
39861
|
{
|
|
39871
39862
|
const updates = args[0];
|
|
39872
39863
|
loaderContext.loaders = loaderContext.loaders.map((item, index)=>{
|
|
@@ -39878,25 +39869,25 @@ async function runLoaders(compiler, context) {
|
|
|
39878
39869
|
});
|
|
39879
39870
|
break;
|
|
39880
39871
|
}
|
|
39881
|
-
case
|
|
39872
|
+
case "CompilationGetPath":
|
|
39882
39873
|
{
|
|
39883
39874
|
const filename = args[0];
|
|
39884
39875
|
const data = args[1];
|
|
39885
39876
|
return compiler._lastCompilation.getPath(filename, data);
|
|
39886
39877
|
}
|
|
39887
|
-
case
|
|
39878
|
+
case "CompilationGetPathWithInfo":
|
|
39888
39879
|
{
|
|
39889
39880
|
const filename = args[0];
|
|
39890
39881
|
const data = args[1];
|
|
39891
39882
|
return compiler._lastCompilation.getPathWithInfo(filename, data);
|
|
39892
39883
|
}
|
|
39893
|
-
case
|
|
39884
|
+
case "CompilationGetAssetPath":
|
|
39894
39885
|
{
|
|
39895
39886
|
const filename = args[0];
|
|
39896
39887
|
const data = args[1];
|
|
39897
39888
|
return compiler._lastCompilation.getAssetPath(filename, data);
|
|
39898
39889
|
}
|
|
39899
|
-
case
|
|
39890
|
+
case "CompilationGetAssetPathWithInfo":
|
|
39900
39891
|
{
|
|
39901
39892
|
const filename = args[0];
|
|
39902
39893
|
const data = args[1];
|
|
@@ -40414,6 +40405,7 @@ function getRawJavascriptParserOptions(parser) {
|
|
|
40414
40405
|
importMeta: parser.importMeta,
|
|
40415
40406
|
url: null == (_parser_url = parser.url) ? void 0 : _parser_url.toString(),
|
|
40416
40407
|
exprContextCritical: parser.exprContextCritical,
|
|
40408
|
+
unknownContextCritical: parser.unknownContextCritical,
|
|
40417
40409
|
wrappedContextCritical: parser.wrappedContextCritical,
|
|
40418
40410
|
wrappedContextRegExp: parser.wrappedContextRegExp,
|
|
40419
40411
|
exportsPresence: false === parser.exportsPresence ? "false" : parser.exportsPresence,
|
|
@@ -40621,12 +40613,13 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
40621
40613
|
type,
|
|
40622
40614
|
externals: (Array.isArray(externals) ? externals : [
|
|
40623
40615
|
externals
|
|
40624
|
-
]).filter(Boolean).map((item)=>ExternalsPlugin_class_private_field_get(this, _getRawExternalItem).call(this, item))
|
|
40616
|
+
]).filter(Boolean).map((item)=>ExternalsPlugin_class_private_field_get(this, _getRawExternalItem).call(this, item)),
|
|
40617
|
+
placeInInitial: this.placeInInitial ?? false
|
|
40625
40618
|
};
|
|
40626
40619
|
return createBuiltinPlugin(this.name, raw);
|
|
40627
40620
|
}
|
|
40628
|
-
constructor(type, externals){
|
|
40629
|
-
super(), ExternalsPlugin_class_private_method_init(this, _processRequest), ExternalsPlugin_define_property(this, "type", void 0), ExternalsPlugin_define_property(this, "externals", void 0), ExternalsPlugin_define_property(this, "name", void 0), ExternalsPlugin_class_private_field_init(this, _resolveRequestCache, {
|
|
40621
|
+
constructor(type, externals, placeInInitial){
|
|
40622
|
+
super(), ExternalsPlugin_class_private_method_init(this, _processRequest), ExternalsPlugin_define_property(this, "type", void 0), ExternalsPlugin_define_property(this, "externals", void 0), ExternalsPlugin_define_property(this, "placeInInitial", void 0), ExternalsPlugin_define_property(this, "name", void 0), ExternalsPlugin_class_private_field_init(this, _resolveRequestCache, {
|
|
40630
40623
|
writable: true,
|
|
40631
40624
|
value: void 0
|
|
40632
40625
|
}), ExternalsPlugin_class_private_field_init(this, _processResolveResult, {
|
|
@@ -40635,7 +40628,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
40635
40628
|
}), ExternalsPlugin_class_private_field_init(this, _getRawExternalItem, {
|
|
40636
40629
|
writable: true,
|
|
40637
40630
|
value: void 0
|
|
40638
|
-
}), this.type = type, this.externals = externals, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.ExternalsPlugin, ExternalsPlugin_class_private_field_set(this, _resolveRequestCache, new Map()), ExternalsPlugin_class_private_field_set(this, _processResolveResult, (text)=>{
|
|
40631
|
+
}), this.type = type, this.externals = externals, this.placeInInitial = placeInInitial, this.name = external_rspack_wasi_browser_js_.BuiltinPluginName.ExternalsPlugin, ExternalsPlugin_class_private_field_set(this, _resolveRequestCache, new Map()), ExternalsPlugin_class_private_field_set(this, _processResolveResult, (text)=>{
|
|
40639
40632
|
if (!text) return;
|
|
40640
40633
|
let resolveRequest = ExternalsPlugin_class_private_field_get(this, _resolveRequestCache).get(text);
|
|
40641
40634
|
if (!resolveRequest) {
|
|
@@ -43969,7 +43962,7 @@ const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def)=>{
|
|
|
43969
43962
|
inst.keyType = def.keyType;
|
|
43970
43963
|
inst.valueType = def.valueType;
|
|
43971
43964
|
});
|
|
43972
|
-
function
|
|
43965
|
+
function schemas_record(keyType, valueType, params) {
|
|
43973
43966
|
return new ZodRecord({
|
|
43974
43967
|
type: "record",
|
|
43975
43968
|
keyType,
|
|
@@ -44292,7 +44285,7 @@ const getDllReferencePluginOptionsSchema = memoize(()=>{
|
|
|
44292
44285
|
exports: schemas_array(schemas_string()).or(literal(true)),
|
|
44293
44286
|
id: schemas_string().or(numberOrInfinity)
|
|
44294
44287
|
}).partial();
|
|
44295
|
-
const dllReferencePluginOptionsContent =
|
|
44288
|
+
const dllReferencePluginOptionsContent = schemas_record(schemas_string(), dllReferencePluginOptionsContentItem);
|
|
44296
44289
|
const dllReferencePluginOptionsSourceType = schemas_enum([
|
|
44297
44290
|
"var",
|
|
44298
44291
|
"assign",
|
|
@@ -44351,7 +44344,7 @@ const getHtmlPluginOptionsSchema = memoize(()=>{
|
|
|
44351
44344
|
error: "HtmlRspackPlugin does not support template path with loader yet"
|
|
44352
44345
|
}),
|
|
44353
44346
|
templateContent: schemas_string().or(templateRenderFunction),
|
|
44354
|
-
templateParameters:
|
|
44347
|
+
templateParameters: schemas_record(schemas_string(), schemas_string()).or(schemas_boolean()).or(templateParamFunction),
|
|
44355
44348
|
inject: schemas_enum([
|
|
44356
44349
|
"head",
|
|
44357
44350
|
"body"
|
|
@@ -44386,7 +44379,7 @@ const getHtmlPluginOptionsSchema = memoize(()=>{
|
|
|
44386
44379
|
minify: schemas_boolean(),
|
|
44387
44380
|
title: schemas_string(),
|
|
44388
44381
|
favicon: schemas_string(),
|
|
44389
|
-
meta:
|
|
44382
|
+
meta: schemas_record(schemas_string(), schemas_string().or(schemas_record(schemas_string(), schemas_string()))),
|
|
44390
44383
|
hash: schemas_boolean()
|
|
44391
44384
|
}).partial();
|
|
44392
44385
|
});
|
|
@@ -45080,7 +45073,7 @@ const HtmlRspackPluginImpl = base_create(external_rspack_wasi_browser_js_.Builti
|
|
|
45080
45073
|
const templateFilePath = path_browserify_default().resolve(context, filename);
|
|
45081
45074
|
if (!browser_fs["default"].existsSync(templateFilePath)) throw new Error(`HtmlRspackPlugin: could not load file \`${filename}\` from \`${context}\``);
|
|
45082
45075
|
try {
|
|
45083
|
-
const renderer = await (0, util_require.
|
|
45076
|
+
const renderer = await (0, util_require.y)()(templateFilePath);
|
|
45084
45077
|
if (false === c.templateParameters) return await renderer({});
|
|
45085
45078
|
return await renderer(generateRenderData(data));
|
|
45086
45079
|
} catch (e) {
|
|
@@ -45294,12 +45287,10 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
45294
45287
|
};
|
|
45295
45288
|
const prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
45296
45289
|
options.prefix = `${prefix}__${i++}`;
|
|
45297
|
-
const activeModules = new
|
|
45290
|
+
const activeModules = new Set();
|
|
45298
45291
|
const filesByKey = new Map();
|
|
45299
|
-
|
|
45300
|
-
|
|
45301
|
-
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, indexToModule, activeModules, filesByKey, options.prefix));
|
|
45302
|
-
applyPlugin(c, moduleToIndex, indexToModule, options, activeModules, filesByKey);
|
|
45292
|
+
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, options.prefix));
|
|
45293
|
+
applyPlugin(c, options, activeModules, filesByKey);
|
|
45303
45294
|
}
|
|
45304
45295
|
const keys = [
|
|
45305
45296
|
...middlewareByCompiler.keys()
|
|
@@ -45319,53 +45310,44 @@ const lazyCompilationMiddleware = (compiler)=>{
|
|
|
45319
45310
|
if (compiler.options.lazyCompilation) console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN);
|
|
45320
45311
|
}
|
|
45321
45312
|
if (!compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
|
45322
|
-
const activeModules = new
|
|
45313
|
+
const activeModules = new Set();
|
|
45323
45314
|
const filesByKey = new Map();
|
|
45324
|
-
const indexToMap = new Map();
|
|
45325
|
-
const moduleToIndex = new Map();
|
|
45326
45315
|
const options = {
|
|
45327
45316
|
...compiler.options.experiments.lazyCompilation,
|
|
45328
45317
|
...compiler.options.lazyCompilation
|
|
45329
45318
|
};
|
|
45330
|
-
applyPlugin(compiler,
|
|
45319
|
+
applyPlugin(compiler, options, activeModules, filesByKey);
|
|
45331
45320
|
const lazyCompilationPrefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
|
45332
|
-
return lazyCompilationMiddlewareInternal(compiler,
|
|
45321
|
+
return lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, lazyCompilationPrefix);
|
|
45333
45322
|
};
|
|
45334
|
-
function applyPlugin(compiler,
|
|
45323
|
+
function applyPlugin(compiler, options, activeModules, filesByKey) {
|
|
45335
45324
|
const plugin = new BuiltinLazyCompilationPlugin(({ module, path })=>{
|
|
45336
|
-
|
|
45337
|
-
|
|
45338
|
-
|
|
45339
|
-
moduleToIndex.set(module, index);
|
|
45340
|
-
indexToModule.set(index, module);
|
|
45341
|
-
}
|
|
45342
|
-
const key = indexToModule.get(index);
|
|
45343
|
-
filesByKey.set(key, path);
|
|
45344
|
-
const active = true === activeModules.get(key);
|
|
45325
|
+
const data = `${encodeURIComponent(module.replace(/\\/g, "/").replace(/@/g, "_"))}`;
|
|
45326
|
+
filesByKey.set(data, path);
|
|
45327
|
+
const active = activeModules.has(data);
|
|
45345
45328
|
return {
|
|
45346
45329
|
client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
|
|
45347
|
-
data
|
|
45330
|
+
data,
|
|
45348
45331
|
active
|
|
45349
45332
|
};
|
|
45350
45333
|
}, options.cacheable ?? true, options.entries ?? true, options.imports ?? true, options.test);
|
|
45351
45334
|
plugin.apply(compiler);
|
|
45352
45335
|
}
|
|
45353
|
-
const lazyCompilationMiddlewareInternal = (compiler,
|
|
45336
|
+
const lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey, lazyCompilationPrefix)=>{
|
|
45354
45337
|
const logger = compiler.getInfrastructureLogger("LazyCompilation");
|
|
45355
45338
|
return (req, res, next)=>{
|
|
45356
45339
|
var _req_url;
|
|
45357
45340
|
if (!(null == (_req_url = req.url) ? void 0 : _req_url.startsWith(lazyCompilationPrefix))) return null == next ? void 0 : next();
|
|
45358
|
-
const
|
|
45341
|
+
const modules = req.url.slice(lazyCompilationPrefix.length).split("@");
|
|
45359
45342
|
req.socket.setNoDelay(true);
|
|
45360
45343
|
res.setHeader("content-type", "text/event-stream");
|
|
45361
45344
|
res.writeHead(200);
|
|
45362
45345
|
res.write("\n");
|
|
45363
45346
|
const moduleActivated = [];
|
|
45364
|
-
for (const
|
|
45365
|
-
const
|
|
45366
|
-
|
|
45367
|
-
|
|
45368
|
-
if (!oldValue) {
|
|
45347
|
+
for (const key of modules){
|
|
45348
|
+
const activated = activeModules.has(key);
|
|
45349
|
+
activeModules.add(key);
|
|
45350
|
+
if (!activated) {
|
|
45369
45351
|
logger.log(`${key} is now in use and will be compiled.`);
|
|
45370
45352
|
moduleActivated.push(key);
|
|
45371
45353
|
}
|
|
@@ -45376,7 +45358,7 @@ const lazyCompilationMiddlewareInternal = (compiler, indexToModule, activeModule
|
|
|
45376
45358
|
if (!filePath) logger.warn(`Cannot find correct file path for module ${key}`);
|
|
45377
45359
|
return filePath;
|
|
45378
45360
|
}).filter(Boolean));
|
|
45379
|
-
if (rebuiltModules.size) compiler.watching.invalidateWithChangesAndRemovals(
|
|
45361
|
+
if (rebuiltModules.size) compiler.watching.invalidateWithChangesAndRemovals(rebuiltModules);
|
|
45380
45362
|
}
|
|
45381
45363
|
};
|
|
45382
45364
|
};
|
|
@@ -45459,6 +45441,13 @@ class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
|
45459
45441
|
}
|
|
45460
45442
|
const NodeTargetPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NodeTargetPlugin, ()=>void 0);
|
|
45461
45443
|
const NoEmitOnErrorsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NoEmitOnErrorsPlugin, ()=>void 0);
|
|
45444
|
+
const NormalModuleReplacementPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.NormalModuleReplacementPlugin, (resourceRegExp, newResource)=>({
|
|
45445
|
+
resourceRegExp,
|
|
45446
|
+
newResource: "function" == typeof newResource ? (data)=>{
|
|
45447
|
+
newResource(data);
|
|
45448
|
+
return data;
|
|
45449
|
+
} : newResource
|
|
45450
|
+
}));
|
|
45462
45451
|
const OccurrenceChunkIdsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
|
|
45463
45452
|
...options
|
|
45464
45453
|
}), "compilation");
|
|
@@ -45809,7 +45798,7 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
|
|
|
45809
45798
|
});
|
|
45810
45799
|
});
|
|
45811
45800
|
}
|
|
45812
|
-
(0, util_require.
|
|
45801
|
+
(0, util_require.y)()(this.options.htmlPlugin).then(bindingHtmlHooks).catch((e)=>{
|
|
45813
45802
|
if (!isErrorWithCode(e) || "MODULE_NOT_FOUND" !== e.code) throw e;
|
|
45814
45803
|
});
|
|
45815
45804
|
}
|
|
@@ -47113,7 +47102,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
47113
47102
|
if ("object" == typeof rspackFuture) {
|
|
47114
47103
|
D(rspackFuture, "bundlerInfo", {});
|
|
47115
47104
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
47116
|
-
D(rspackFuture.bundlerInfo, "version", "1.5.0-canary-
|
|
47105
|
+
D(rspackFuture.bundlerInfo, "version", "1.5.0-canary-e5e47098-20250820070851");
|
|
47117
47106
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
47118
47107
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
47119
47108
|
}
|
|
@@ -47126,6 +47115,7 @@ const applyJavascriptParserOptionsDefaults = (parserOptions, { inlineConst })=>{
|
|
|
47126
47115
|
D(parserOptions, "dynamicImportPreload", false);
|
|
47127
47116
|
D(parserOptions, "url", true);
|
|
47128
47117
|
D(parserOptions, "exprContextCritical", true);
|
|
47118
|
+
D(parserOptions, "unknownContextCritical", true);
|
|
47129
47119
|
D(parserOptions, "wrappedContextCritical", false);
|
|
47130
47120
|
D(parserOptions, "wrappedContextRegExp", /.*/);
|
|
47131
47121
|
D(parserOptions, "strictExportPresence", false);
|
|
@@ -49727,20 +49717,7 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
|
|
|
49727
49717
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.beforeResolve;
|
|
49728
49718
|
}, function(queried) {
|
|
49729
49719
|
return async function(resolveData) {
|
|
49730
|
-
const
|
|
49731
|
-
contextInfo: {
|
|
49732
|
-
issuer: resolveData.issuer,
|
|
49733
|
-
issuerLayer: resolveData.issuerLayer ?? null
|
|
49734
|
-
},
|
|
49735
|
-
request: resolveData.request,
|
|
49736
|
-
context: resolveData.context,
|
|
49737
|
-
fileDependencies: [],
|
|
49738
|
-
missingDependencies: [],
|
|
49739
|
-
contextDependencies: []
|
|
49740
|
-
};
|
|
49741
|
-
const ret = await queried.promise(normalizedResolveData);
|
|
49742
|
-
resolveData.request = normalizedResolveData.request;
|
|
49743
|
-
resolveData.context = normalizedResolveData.context;
|
|
49720
|
+
const ret = await queried.promise(resolveData);
|
|
49744
49721
|
return [
|
|
49745
49722
|
ret,
|
|
49746
49723
|
resolveData
|
|
@@ -49751,20 +49728,7 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
|
|
|
49751
49728
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
|
|
49752
49729
|
}, function(queried) {
|
|
49753
49730
|
return async function(resolveData) {
|
|
49754
|
-
|
|
49755
|
-
contextInfo: {
|
|
49756
|
-
issuer: resolveData.issuer,
|
|
49757
|
-
issuerLayer: resolveData.issuerLayer ?? null
|
|
49758
|
-
},
|
|
49759
|
-
request: resolveData.request,
|
|
49760
|
-
context: resolveData.context,
|
|
49761
|
-
fileDependencies: [],
|
|
49762
|
-
missingDependencies: [],
|
|
49763
|
-
contextDependencies: []
|
|
49764
|
-
};
|
|
49765
|
-
await queried.promise(normalizedResolveData);
|
|
49766
|
-
resolveData.request = normalizedResolveData.request;
|
|
49767
|
-
resolveData.context = normalizedResolveData.context;
|
|
49731
|
+
await queried.promise(resolveData);
|
|
49768
49732
|
return resolveData;
|
|
49769
49733
|
};
|
|
49770
49734
|
}),
|
|
@@ -49772,20 +49736,7 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
|
|
|
49772
49736
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
|
|
49773
49737
|
}, function(queried) {
|
|
49774
49738
|
return async function(resolveData) {
|
|
49775
|
-
|
|
49776
|
-
contextInfo: {
|
|
49777
|
-
issuer: resolveData.issuer,
|
|
49778
|
-
issuerLayer: resolveData.issuerLayer ?? null
|
|
49779
|
-
},
|
|
49780
|
-
request: resolveData.request,
|
|
49781
|
-
context: resolveData.context,
|
|
49782
|
-
fileDependencies: [],
|
|
49783
|
-
missingDependencies: [],
|
|
49784
|
-
contextDependencies: []
|
|
49785
|
-
};
|
|
49786
|
-
await queried.promise(normalizedResolveData);
|
|
49787
|
-
resolveData.request = normalizedResolveData.request;
|
|
49788
|
-
resolveData.context = normalizedResolveData.context;
|
|
49739
|
+
await queried.promise(resolveData);
|
|
49789
49740
|
return resolveData;
|
|
49790
49741
|
};
|
|
49791
49742
|
}),
|
|
@@ -49803,12 +49754,11 @@ const createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createM
|
|
|
49803
49754
|
registerNormalModuleFactoryAfterResolveTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.NormalModuleFactoryAfterResolve, function() {
|
|
49804
49755
|
return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
|
|
49805
49756
|
}, function(queried) {
|
|
49806
|
-
return async function(
|
|
49807
|
-
const
|
|
49808
|
-
const ret = await queried.promise(data);
|
|
49757
|
+
return async function(resolveData) {
|
|
49758
|
+
const ret = await queried.promise(resolveData);
|
|
49809
49759
|
return [
|
|
49810
49760
|
ret,
|
|
49811
|
-
|
|
49761
|
+
resolveData
|
|
49812
49762
|
];
|
|
49813
49763
|
};
|
|
49814
49764
|
}),
|
|
@@ -49986,6 +49936,231 @@ class TraceHookPlugin {
|
|
|
49986
49936
|
}
|
|
49987
49937
|
__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
49988
49938
|
const checkVersion = ()=>{};
|
|
49939
|
+
function NativeWatchFileSystem_check_private_redeclaration(obj, privateCollection) {
|
|
49940
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
49941
|
+
}
|
|
49942
|
+
function NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor) {
|
|
49943
|
+
if (descriptor.get) return descriptor.get.call(receiver);
|
|
49944
|
+
return descriptor.value;
|
|
49945
|
+
}
|
|
49946
|
+
function NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value) {
|
|
49947
|
+
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
49948
|
+
else {
|
|
49949
|
+
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
49950
|
+
descriptor.value = value;
|
|
49951
|
+
}
|
|
49952
|
+
}
|
|
49953
|
+
function NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, action) {
|
|
49954
|
+
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
49955
|
+
return privateMap.get(receiver);
|
|
49956
|
+
}
|
|
49957
|
+
function NativeWatchFileSystem_class_private_field_get(receiver, privateMap) {
|
|
49958
|
+
var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "get");
|
|
49959
|
+
return NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor);
|
|
49960
|
+
}
|
|
49961
|
+
function NativeWatchFileSystem_class_private_field_init(obj, privateMap, value) {
|
|
49962
|
+
NativeWatchFileSystem_check_private_redeclaration(obj, privateMap);
|
|
49963
|
+
privateMap.set(obj, value);
|
|
49964
|
+
}
|
|
49965
|
+
function NativeWatchFileSystem_class_private_field_set(receiver, privateMap, value) {
|
|
49966
|
+
var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "set");
|
|
49967
|
+
NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value);
|
|
49968
|
+
return value;
|
|
49969
|
+
}
|
|
49970
|
+
const toJsWatcherIgnored = (ignored)=>{
|
|
49971
|
+
if (Array.isArray(ignored) || "string" == typeof ignored || ignored instanceof RegExp) return ignored;
|
|
49972
|
+
if ("function" == typeof ignored) throw new Error("NativeWatcher does not support using a function for the 'ignored' option");
|
|
49973
|
+
};
|
|
49974
|
+
var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap(), _inputFileSystem = /*#__PURE__*/ new WeakMap();
|
|
49975
|
+
class NativeWatchFileSystem {
|
|
49976
|
+
watch(files, directories, missing, _startTime, options, callback, callbackUndelayed) {
|
|
49977
|
+
if ((!files.added || "function" != typeof files.added[Symbol.iterator]) && (!files.removed || "function" != typeof files.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'files'");
|
|
49978
|
+
if ((!directories.added || "function" != typeof directories.added[Symbol.iterator]) && (!directories.removed || "function" != typeof directories.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'directories'");
|
|
49979
|
+
if ("function" != typeof callback) throw new Error("Invalid arguments: 'callback'");
|
|
49980
|
+
if ("object" != typeof options) throw new Error("Invalid arguments: 'options'");
|
|
49981
|
+
if ("function" != typeof callbackUndelayed && callbackUndelayed) throw new Error("Invalid arguments: 'callbackUndelayed'");
|
|
49982
|
+
const nativeWatcher = this.getNativeWatcher(options);
|
|
49983
|
+
nativeWatcher.watch([
|
|
49984
|
+
Array.from(files.added),
|
|
49985
|
+
Array.from(files.removed)
|
|
49986
|
+
], [
|
|
49987
|
+
Array.from(directories.added),
|
|
49988
|
+
Array.from(directories.removed)
|
|
49989
|
+
], [
|
|
49990
|
+
Array.from(missing.added),
|
|
49991
|
+
Array.from(missing.removed)
|
|
49992
|
+
], (err, result)=>{
|
|
49993
|
+
var _class_private_field_get1;
|
|
49994
|
+
if (err) return void callback(err, new Map(), new Map(), new Set(), new Set());
|
|
49995
|
+
nativeWatcher.pause();
|
|
49996
|
+
const changedFiles = result.changedFiles;
|
|
49997
|
+
const removedFiles = result.removedFiles;
|
|
49998
|
+
if (null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem)) ? void 0 : _class_private_field_get1.purge) {
|
|
49999
|
+
const fs = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem);
|
|
50000
|
+
for (const item of changedFiles){
|
|
50001
|
+
var _fs_purge;
|
|
50002
|
+
null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
|
|
50003
|
+
}
|
|
50004
|
+
for (const item of removedFiles){
|
|
50005
|
+
var _fs_purge1;
|
|
50006
|
+
null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
|
|
50007
|
+
}
|
|
50008
|
+
}
|
|
50009
|
+
callback(err, new Map(), new Map(), new Set(changedFiles), new Set(removedFiles));
|
|
50010
|
+
}, (fileName)=>{
|
|
50011
|
+
callbackUndelayed(fileName, Date.now());
|
|
50012
|
+
});
|
|
50013
|
+
return {
|
|
50014
|
+
close: ()=>{
|
|
50015
|
+
nativeWatcher.close().then(()=>{
|
|
50016
|
+
NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, void 0);
|
|
50017
|
+
}, (err)=>{
|
|
50018
|
+
console.error("Error closing native watcher:", err);
|
|
50019
|
+
});
|
|
50020
|
+
},
|
|
50021
|
+
pause: ()=>{
|
|
50022
|
+
nativeWatcher.pause();
|
|
50023
|
+
},
|
|
50024
|
+
getInfo () {
|
|
50025
|
+
return {
|
|
50026
|
+
changes: new Set(),
|
|
50027
|
+
removals: new Set(),
|
|
50028
|
+
fileTimeInfoEntries: new Map(),
|
|
50029
|
+
contextTimeInfoEntries: new Map()
|
|
50030
|
+
};
|
|
50031
|
+
}
|
|
50032
|
+
};
|
|
50033
|
+
}
|
|
50034
|
+
getNativeWatcher(options) {
|
|
50035
|
+
if (NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) return NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner);
|
|
50036
|
+
const nativeWatcherOptions = {
|
|
50037
|
+
followSymlinks: options.followSymlinks,
|
|
50038
|
+
aggregateTimeout: options.aggregateTimeout,
|
|
50039
|
+
pollInterval: "boolean" == typeof options.poll ? 0 : options.poll,
|
|
50040
|
+
ignored: toJsWatcherIgnored(options.ignored)
|
|
50041
|
+
};
|
|
50042
|
+
const nativeWatcher = new external_rspack_wasi_browser_js_["default"].NativeWatcher(nativeWatcherOptions);
|
|
50043
|
+
NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, nativeWatcher);
|
|
50044
|
+
return nativeWatcher;
|
|
50045
|
+
}
|
|
50046
|
+
triggerEvent(kind, path) {
|
|
50047
|
+
var _class_private_field_get1;
|
|
50048
|
+
null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) || _class_private_field_get1.triggerEvent(kind, path);
|
|
50049
|
+
}
|
|
50050
|
+
constructor(inputFileSystem){
|
|
50051
|
+
NativeWatchFileSystem_class_private_field_init(this, NativeWatchFileSystem_inner, {
|
|
50052
|
+
writable: true,
|
|
50053
|
+
value: void 0
|
|
50054
|
+
});
|
|
50055
|
+
NativeWatchFileSystem_class_private_field_init(this, _inputFileSystem, {
|
|
50056
|
+
writable: true,
|
|
50057
|
+
value: void 0
|
|
50058
|
+
});
|
|
50059
|
+
NativeWatchFileSystem_class_private_field_set(this, _inputFileSystem, inputFileSystem);
|
|
50060
|
+
}
|
|
50061
|
+
}
|
|
50062
|
+
function VirtualModulesPlugin_check_private_redeclaration(obj, privateCollection) {
|
|
50063
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
50064
|
+
}
|
|
50065
|
+
function VirtualModulesPlugin_class_apply_descriptor_get(receiver, descriptor) {
|
|
50066
|
+
if (descriptor.get) return descriptor.get.call(receiver);
|
|
50067
|
+
return descriptor.value;
|
|
50068
|
+
}
|
|
50069
|
+
function VirtualModulesPlugin_class_apply_descriptor_set(receiver, descriptor, value) {
|
|
50070
|
+
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
50071
|
+
else {
|
|
50072
|
+
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
50073
|
+
descriptor.value = value;
|
|
50074
|
+
}
|
|
50075
|
+
}
|
|
50076
|
+
function VirtualModulesPlugin_class_extract_field_descriptor(receiver, privateMap, action) {
|
|
50077
|
+
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
50078
|
+
return privateMap.get(receiver);
|
|
50079
|
+
}
|
|
50080
|
+
function VirtualModulesPlugin_class_private_field_get(receiver, privateMap) {
|
|
50081
|
+
var descriptor = VirtualModulesPlugin_class_extract_field_descriptor(receiver, privateMap, "get");
|
|
50082
|
+
return VirtualModulesPlugin_class_apply_descriptor_get(receiver, descriptor);
|
|
50083
|
+
}
|
|
50084
|
+
function VirtualModulesPlugin_class_private_field_init(obj, privateMap, value) {
|
|
50085
|
+
VirtualModulesPlugin_check_private_redeclaration(obj, privateMap);
|
|
50086
|
+
privateMap.set(obj, value);
|
|
50087
|
+
}
|
|
50088
|
+
function VirtualModulesPlugin_class_private_field_set(receiver, privateMap, value) {
|
|
50089
|
+
var descriptor = VirtualModulesPlugin_class_extract_field_descriptor(receiver, privateMap, "set");
|
|
50090
|
+
VirtualModulesPlugin_class_apply_descriptor_set(receiver, descriptor, value);
|
|
50091
|
+
return value;
|
|
50092
|
+
}
|
|
50093
|
+
const VirtualModulesPlugin_PLUGIN_NAME = "VirtualModulesPlugin";
|
|
50094
|
+
const VFILES_BY_COMPILER = new WeakMap();
|
|
50095
|
+
var _staticModules = /*#__PURE__*/ new WeakMap(), _compiler = /*#__PURE__*/ new WeakMap(), _store = /*#__PURE__*/ new WeakMap();
|
|
50096
|
+
class VirtualModulesPlugin {
|
|
50097
|
+
apply(compiler) {
|
|
50098
|
+
VirtualModulesPlugin_class_private_field_set(this, _compiler, compiler);
|
|
50099
|
+
compiler.hooks.afterEnvironment.tap(VirtualModulesPlugin_PLUGIN_NAME, ()=>{
|
|
50100
|
+
const record = VFILES_BY_COMPILER.get(compiler) || {};
|
|
50101
|
+
if (VirtualModulesPlugin_class_private_field_get(this, _staticModules)) for (const [filePath, content] of Object.entries(VirtualModulesPlugin_class_private_field_get(this, _staticModules))){
|
|
50102
|
+
const fullPath = path_browserify_default().resolve(compiler.context, filePath);
|
|
50103
|
+
record[fullPath] = content;
|
|
50104
|
+
}
|
|
50105
|
+
VFILES_BY_COMPILER.set(compiler, record);
|
|
50106
|
+
});
|
|
50107
|
+
}
|
|
50108
|
+
writeModule(filePath, contents) {
|
|
50109
|
+
if (!VirtualModulesPlugin_class_private_field_get(this, _compiler)) throw new Error("Plugin has not been initialized");
|
|
50110
|
+
const store = this.getVirtualFileStore();
|
|
50111
|
+
const fullPath = path_browserify_default().resolve(VirtualModulesPlugin_class_private_field_get(this, _compiler).context, filePath);
|
|
50112
|
+
store.writeVirtualFileSync(fullPath, contents);
|
|
50113
|
+
notifyWatchers(VirtualModulesPlugin_class_private_field_get(this, _compiler), fullPath, Date.now());
|
|
50114
|
+
}
|
|
50115
|
+
getVirtualFileStore() {
|
|
50116
|
+
var _class_private_field_get1;
|
|
50117
|
+
if (VirtualModulesPlugin_class_private_field_get(this, _store)) return VirtualModulesPlugin_class_private_field_get(this, _store);
|
|
50118
|
+
const store = null == (_class_private_field_get1 = VirtualModulesPlugin_class_private_field_get(this, _compiler)) ? void 0 : _class_private_field_get1.__internal__get_virtual_file_store();
|
|
50119
|
+
if (!store) throw new Error("Virtual file store has not been initialized");
|
|
50120
|
+
VirtualModulesPlugin_class_private_field_set(this, _store, store);
|
|
50121
|
+
return store;
|
|
50122
|
+
}
|
|
50123
|
+
static __internal__take_virtual_files(compiler) {
|
|
50124
|
+
const record = VFILES_BY_COMPILER.get(compiler);
|
|
50125
|
+
if (record) {
|
|
50126
|
+
VFILES_BY_COMPILER.delete(compiler);
|
|
50127
|
+
return Object.entries(record).map(([path, content])=>({
|
|
50128
|
+
path,
|
|
50129
|
+
content
|
|
50130
|
+
}));
|
|
50131
|
+
}
|
|
50132
|
+
}
|
|
50133
|
+
constructor(modules){
|
|
50134
|
+
VirtualModulesPlugin_class_private_field_init(this, _staticModules, {
|
|
50135
|
+
writable: true,
|
|
50136
|
+
value: void 0
|
|
50137
|
+
});
|
|
50138
|
+
VirtualModulesPlugin_class_private_field_init(this, _compiler, {
|
|
50139
|
+
writable: true,
|
|
50140
|
+
value: void 0
|
|
50141
|
+
});
|
|
50142
|
+
VirtualModulesPlugin_class_private_field_init(this, _store, {
|
|
50143
|
+
writable: true,
|
|
50144
|
+
value: void 0
|
|
50145
|
+
});
|
|
50146
|
+
VirtualModulesPlugin_class_private_field_set(this, _staticModules, modules || null);
|
|
50147
|
+
}
|
|
50148
|
+
}
|
|
50149
|
+
function notifyWatchers(compiler, fullPath, time) {
|
|
50150
|
+
if (compiler.watchFileSystem instanceof NativeWatchFileSystem) compiler.watchFileSystem.triggerEvent("change", fullPath);
|
|
50151
|
+
else notifyJsWatchers(compiler, fullPath, time);
|
|
50152
|
+
}
|
|
50153
|
+
function notifyJsWatchers(compiler, fullPath, time) {
|
|
50154
|
+
if (compiler.watchFileSystem && isNodeWatchFileSystem(compiler.watchFileSystem)) {
|
|
50155
|
+
const watcher = compiler.watchFileSystem.watcher;
|
|
50156
|
+
if (!watcher) return;
|
|
50157
|
+
const fileWatcher = watcher.fileWatchers.get(fullPath);
|
|
50158
|
+
if (fileWatcher) fileWatcher.watcher.emit("change", time, null);
|
|
50159
|
+
}
|
|
50160
|
+
}
|
|
50161
|
+
function isNodeWatchFileSystem(fs) {
|
|
50162
|
+
return "watch" in fs;
|
|
50163
|
+
}
|
|
49989
50164
|
var Watching_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
49990
50165
|
function Watching_check_private_redeclaration(obj, privateCollection) {
|
|
49991
50166
|
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
@@ -50612,6 +50787,10 @@ class Compiler {
|
|
|
50612
50787
|
Compiler_class_private_field_set(this, Compiler_compilation, compilation);
|
|
50613
50788
|
return compilation;
|
|
50614
50789
|
}
|
|
50790
|
+
__internal__get_virtual_file_store() {
|
|
50791
|
+
var _class_private_field_get1;
|
|
50792
|
+
return null == (_class_private_field_get1 = Compiler_class_private_field_get(this, _instance)) ? void 0 : _class_private_field_get1.getVirtualFileStore();
|
|
50793
|
+
}
|
|
50615
50794
|
__internal__registerBuiltinPlugin(plugin) {
|
|
50616
50795
|
Compiler_class_private_field_get(this, _builtinPlugins).push(plugin);
|
|
50617
50796
|
}
|
|
@@ -50849,6 +51028,7 @@ function getInstance(callback) {
|
|
|
50849
51028
|
const options = this.options;
|
|
50850
51029
|
const rawOptions = getRawOptions(options, this);
|
|
50851
51030
|
rawOptions.__references = Object.fromEntries(Compiler_class_private_field_get(this, _ruleSet).builtinReferences.entries());
|
|
51031
|
+
rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
|
|
50852
51032
|
const instanceBinding = __webpack_require__("@rspack/binding");
|
|
50853
51033
|
Compiler_class_private_field_set(this, _registers, Compiler_class_private_method_get(this, _createHooksRegisters, createHooksRegisters).call(this));
|
|
50854
51034
|
const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
|
@@ -51007,7 +51187,7 @@ class MultiStats {
|
|
|
51007
51187
|
return obj;
|
|
51008
51188
|
});
|
|
51009
51189
|
if (childOptions.version) {
|
|
51010
|
-
obj.rspackVersion = "1.5.0-canary-
|
|
51190
|
+
obj.rspackVersion = "1.5.0-canary-e5e47098-20250820070851";
|
|
51011
51191
|
obj.version = "5.75.0";
|
|
51012
51192
|
}
|
|
51013
51193
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -51127,7 +51307,7 @@ function MultiWatching_define_property(obj, key, value) {
|
|
|
51127
51307
|
else obj[key] = value;
|
|
51128
51308
|
return obj;
|
|
51129
51309
|
}
|
|
51130
|
-
class
|
|
51310
|
+
class MultiWatching_MultiWatching {
|
|
51131
51311
|
invalidate(callback) {
|
|
51132
51312
|
if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
|
|
51133
51313
|
else for (const watching of this.watchings)watching.invalidate();
|
|
@@ -51160,7 +51340,7 @@ class MultiWatching {
|
|
|
51160
51340
|
this.compiler = compiler;
|
|
51161
51341
|
}
|
|
51162
51342
|
}
|
|
51163
|
-
const
|
|
51343
|
+
const MultiWatching = MultiWatching_MultiWatching;
|
|
51164
51344
|
function ArrayQueue_define_property(obj, key, value) {
|
|
51165
51345
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
51166
51346
|
value: value,
|
|
@@ -51337,10 +51517,10 @@ class MultiCompiler {
|
|
|
51337
51517
|
if (compiler.watching !== watching) return;
|
|
51338
51518
|
if (!watching.running) watching.invalidate();
|
|
51339
51519
|
}, handler);
|
|
51340
|
-
this.watching = new
|
|
51520
|
+
this.watching = new MultiWatching(watchings, this);
|
|
51341
51521
|
return this.watching;
|
|
51342
51522
|
}
|
|
51343
|
-
this.watching = new
|
|
51523
|
+
this.watching = new MultiWatching([], this);
|
|
51344
51524
|
return this.watching;
|
|
51345
51525
|
}
|
|
51346
51526
|
run(callback, options) {
|
|
@@ -52317,7 +52497,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
52317
52497
|
},
|
|
52318
52498
|
version: (object)=>{
|
|
52319
52499
|
object.version = "5.75.0";
|
|
52320
|
-
object.rspackVersion = "1.5.0-canary-
|
|
52500
|
+
object.rspackVersion = "1.5.0-canary-e5e47098-20250820070851";
|
|
52321
52501
|
},
|
|
52322
52502
|
env: (object, _compilation, _context, { _env })=>{
|
|
52323
52503
|
object.env = _env;
|
|
@@ -53928,14 +54108,14 @@ class RspackOptionsApply {
|
|
|
53928
54108
|
compiler.outputFileSystem = browser_fs["default"];
|
|
53929
54109
|
if (options.externals) {
|
|
53930
54110
|
assert_default()(options.externalsType, "options.externalsType should have value after `applyRspackOptionsDefaults`");
|
|
53931
|
-
new ExternalsPlugin(options.externalsType, options.externals).apply(compiler);
|
|
54111
|
+
new ExternalsPlugin(options.externalsType, options.externals, false).apply(compiler);
|
|
53932
54112
|
}
|
|
53933
54113
|
if (options.externalsPresets.node) new NodeTargetPlugin().apply(compiler);
|
|
53934
54114
|
if (options.externalsPresets.electronMain) new ElectronTargetPlugin("main").apply(compiler);
|
|
53935
54115
|
if (options.externalsPresets.electronPreload) new ElectronTargetPlugin("preload").apply(compiler);
|
|
53936
54116
|
if (options.externalsPresets.electronRenderer) new ElectronTargetPlugin("renderer").apply(compiler);
|
|
53937
54117
|
if (options.externalsPresets.electron && !options.externalsPresets.electronMain && !options.externalsPresets.electronPreload && !options.externalsPresets.electronRenderer) new ElectronTargetPlugin().apply(compiler);
|
|
53938
|
-
if (options.externalsPresets.nwjs) new ExternalsPlugin("node-commonjs", "nw.gui").apply(compiler);
|
|
54118
|
+
if (options.externalsPresets.nwjs) new ExternalsPlugin("node-commonjs", "nw.gui", false).apply(compiler);
|
|
53939
54119
|
if (options.externalsPresets.web || options.externalsPresets.webAsync || options.externalsPresets.node && options.experiments.css) new HttpExternalsRspackPlugin(!!options.experiments.css, !!options.externalsPresets.webAsync).apply(compiler);
|
|
53940
54120
|
new ChunkPrefetchPreloadPlugin().apply(compiler);
|
|
53941
54121
|
if (options.output.pathinfo) new ModuleInfoHeaderPlugin("verbose" === options.output.pathinfo).apply(compiler);
|
|
@@ -54357,39 +54537,6 @@ class LoaderTargetPlugin {
|
|
|
54357
54537
|
this.target = target;
|
|
54358
54538
|
}
|
|
54359
54539
|
}
|
|
54360
|
-
function NormalModuleReplacementPlugin_define_property(obj, key, value) {
|
|
54361
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
54362
|
-
value: value,
|
|
54363
|
-
enumerable: true,
|
|
54364
|
-
configurable: true,
|
|
54365
|
-
writable: true
|
|
54366
|
-
});
|
|
54367
|
-
else obj[key] = value;
|
|
54368
|
-
return obj;
|
|
54369
|
-
}
|
|
54370
|
-
class NormalModuleReplacementPlugin {
|
|
54371
|
-
apply(compiler) {
|
|
54372
|
-
const { resourceRegExp, newResource } = this;
|
|
54373
|
-
compiler.hooks.normalModuleFactory.tap("NormalModuleReplacementPlugin", (nmf)=>{
|
|
54374
|
-
nmf.hooks.beforeResolve.tap("NormalModuleReplacementPlugin", (result)=>{
|
|
54375
|
-
if (resourceRegExp.test(result.request)) if ("function" == typeof newResource) newResource(result);
|
|
54376
|
-
else result.request = newResource;
|
|
54377
|
-
});
|
|
54378
|
-
nmf.hooks.afterResolve.tap("NormalModuleReplacementPlugin", (result)=>{
|
|
54379
|
-
const createData = result.createData || {};
|
|
54380
|
-
if (resourceRegExp.test(createData.resource || "")) if ("function" == typeof newResource) newResource(result);
|
|
54381
|
-
else if (path_browserify.posix.isAbsolute(newResource) || path_browserify.win32.isAbsolute(newResource)) createData.resource = newResource;
|
|
54382
|
-
else createData.resource = path_browserify.join(path_browserify.dirname(createData.resource || ""), newResource);
|
|
54383
|
-
});
|
|
54384
|
-
});
|
|
54385
|
-
}
|
|
54386
|
-
constructor(resourceRegExp, newResource){
|
|
54387
|
-
NormalModuleReplacementPlugin_define_property(this, "resourceRegExp", void 0);
|
|
54388
|
-
NormalModuleReplacementPlugin_define_property(this, "newResource", void 0);
|
|
54389
|
-
this.resourceRegExp = resourceRegExp;
|
|
54390
|
-
this.newResource = newResource;
|
|
54391
|
-
}
|
|
54392
|
-
}
|
|
54393
54540
|
var CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.18.2/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
|
|
54394
54541
|
var CachedInputFileSystem_default = /*#__PURE__*/ __webpack_require__.n(CachedInputFileSystem);
|
|
54395
54542
|
const filterToFunction = (item)=>{
|
|
@@ -54504,125 +54651,6 @@ const createConsoleLogger = ({ level = "info", debug = false, console: console1
|
|
|
54504
54651
|
};
|
|
54505
54652
|
return logger;
|
|
54506
54653
|
};
|
|
54507
|
-
function NativeWatchFileSystem_check_private_redeclaration(obj, privateCollection) {
|
|
54508
|
-
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
54509
|
-
}
|
|
54510
|
-
function NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor) {
|
|
54511
|
-
if (descriptor.get) return descriptor.get.call(receiver);
|
|
54512
|
-
return descriptor.value;
|
|
54513
|
-
}
|
|
54514
|
-
function NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value) {
|
|
54515
|
-
if (descriptor.set) descriptor.set.call(receiver, value);
|
|
54516
|
-
else {
|
|
54517
|
-
if (!descriptor.writable) throw new TypeError("attempted to set read only private field");
|
|
54518
|
-
descriptor.value = value;
|
|
54519
|
-
}
|
|
54520
|
-
}
|
|
54521
|
-
function NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, action) {
|
|
54522
|
-
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
54523
|
-
return privateMap.get(receiver);
|
|
54524
|
-
}
|
|
54525
|
-
function NativeWatchFileSystem_class_private_field_get(receiver, privateMap) {
|
|
54526
|
-
var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "get");
|
|
54527
|
-
return NativeWatchFileSystem_class_apply_descriptor_get(receiver, descriptor);
|
|
54528
|
-
}
|
|
54529
|
-
function NativeWatchFileSystem_class_private_field_init(obj, privateMap, value) {
|
|
54530
|
-
NativeWatchFileSystem_check_private_redeclaration(obj, privateMap);
|
|
54531
|
-
privateMap.set(obj, value);
|
|
54532
|
-
}
|
|
54533
|
-
function NativeWatchFileSystem_class_private_field_set(receiver, privateMap, value) {
|
|
54534
|
-
var descriptor = NativeWatchFileSystem_class_extract_field_descriptor(receiver, privateMap, "set");
|
|
54535
|
-
NativeWatchFileSystem_class_apply_descriptor_set(receiver, descriptor, value);
|
|
54536
|
-
return value;
|
|
54537
|
-
}
|
|
54538
|
-
const toJsWatcherIgnored = (ignored)=>{
|
|
54539
|
-
if (Array.isArray(ignored) || "string" == typeof ignored || ignored instanceof RegExp) return ignored;
|
|
54540
|
-
if ("function" == typeof ignored) throw new Error("NativeWatcher does not support using a function for the 'ignored' option");
|
|
54541
|
-
};
|
|
54542
|
-
var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap(), _inputFileSystem = /*#__PURE__*/ new WeakMap();
|
|
54543
|
-
class NativeWatchFileSystem {
|
|
54544
|
-
watch(files, directories, missing, _startTime, options, callback, callbackUndelayed) {
|
|
54545
|
-
if ((!files.added || "function" != typeof files.added[Symbol.iterator]) && (!files.removed || "function" != typeof files.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'files'");
|
|
54546
|
-
if ((!directories.added || "function" != typeof directories.added[Symbol.iterator]) && (!directories.removed || "function" != typeof directories.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'directories'");
|
|
54547
|
-
if ("function" != typeof callback) throw new Error("Invalid arguments: 'callback'");
|
|
54548
|
-
if ("object" != typeof options) throw new Error("Invalid arguments: 'options'");
|
|
54549
|
-
if ("function" != typeof callbackUndelayed && callbackUndelayed) throw new Error("Invalid arguments: 'callbackUndelayed'");
|
|
54550
|
-
const nativeWatcher = this.getNativeWatcher(options);
|
|
54551
|
-
nativeWatcher.watch([
|
|
54552
|
-
Array.from(files.added),
|
|
54553
|
-
Array.from(files.removed)
|
|
54554
|
-
], [
|
|
54555
|
-
Array.from(directories.added),
|
|
54556
|
-
Array.from(directories.removed)
|
|
54557
|
-
], [
|
|
54558
|
-
Array.from(missing.added),
|
|
54559
|
-
Array.from(missing.removed)
|
|
54560
|
-
], (err, result)=>{
|
|
54561
|
-
var _class_private_field_get1;
|
|
54562
|
-
if (err) return void callback(err, new Map(), new Map(), new Set(), new Set());
|
|
54563
|
-
nativeWatcher.pause();
|
|
54564
|
-
const changedFiles = result.changedFiles;
|
|
54565
|
-
const removedFiles = result.removedFiles;
|
|
54566
|
-
if (null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem)) ? void 0 : _class_private_field_get1.purge) {
|
|
54567
|
-
const fs = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem);
|
|
54568
|
-
for (const item of changedFiles){
|
|
54569
|
-
var _fs_purge;
|
|
54570
|
-
null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
|
|
54571
|
-
}
|
|
54572
|
-
for (const item of removedFiles){
|
|
54573
|
-
var _fs_purge1;
|
|
54574
|
-
null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
|
|
54575
|
-
}
|
|
54576
|
-
}
|
|
54577
|
-
callback(err, new Map(), new Map(), new Set(changedFiles), new Set(removedFiles));
|
|
54578
|
-
}, (fileName)=>{
|
|
54579
|
-
callbackUndelayed(fileName, Date.now());
|
|
54580
|
-
});
|
|
54581
|
-
return {
|
|
54582
|
-
close: ()=>{
|
|
54583
|
-
nativeWatcher.close().then(()=>{
|
|
54584
|
-
NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, void 0);
|
|
54585
|
-
}, (err)=>{
|
|
54586
|
-
console.error("Error closing native watcher:", err);
|
|
54587
|
-
});
|
|
54588
|
-
},
|
|
54589
|
-
pause: ()=>{
|
|
54590
|
-
nativeWatcher.pause();
|
|
54591
|
-
},
|
|
54592
|
-
getInfo () {
|
|
54593
|
-
return {
|
|
54594
|
-
changes: new Set(),
|
|
54595
|
-
removals: new Set(),
|
|
54596
|
-
fileTimeInfoEntries: new Map(),
|
|
54597
|
-
contextTimeInfoEntries: new Map()
|
|
54598
|
-
};
|
|
54599
|
-
}
|
|
54600
|
-
};
|
|
54601
|
-
}
|
|
54602
|
-
getNativeWatcher(options) {
|
|
54603
|
-
if (NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) return NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner);
|
|
54604
|
-
const nativeWatcherOptions = {
|
|
54605
|
-
followSymlinks: options.followSymlinks,
|
|
54606
|
-
aggregateTimeout: options.aggregateTimeout,
|
|
54607
|
-
pollInterval: "boolean" == typeof options.poll ? 0 : options.poll,
|
|
54608
|
-
ignored: toJsWatcherIgnored(options.ignored)
|
|
54609
|
-
};
|
|
54610
|
-
const nativeWatcher = new external_rspack_wasi_browser_js_["default"].NativeWatcher(nativeWatcherOptions);
|
|
54611
|
-
NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, nativeWatcher);
|
|
54612
|
-
return nativeWatcher;
|
|
54613
|
-
}
|
|
54614
|
-
constructor(inputFileSystem){
|
|
54615
|
-
NativeWatchFileSystem_class_private_field_init(this, NativeWatchFileSystem_inner, {
|
|
54616
|
-
writable: true,
|
|
54617
|
-
value: void 0
|
|
54618
|
-
});
|
|
54619
|
-
NativeWatchFileSystem_class_private_field_init(this, _inputFileSystem, {
|
|
54620
|
-
writable: true,
|
|
54621
|
-
value: void 0
|
|
54622
|
-
});
|
|
54623
|
-
NativeWatchFileSystem_class_private_field_set(this, _inputFileSystem, inputFileSystem);
|
|
54624
|
-
}
|
|
54625
|
-
}
|
|
54626
54654
|
function NodeWatchFileSystem_define_property(obj, key, value) {
|
|
54627
54655
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
54628
54656
|
value: value,
|
|
@@ -55130,7 +55158,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
|
|
|
55130
55158
|
module: schemas_boolean()
|
|
55131
55159
|
}).partial();
|
|
55132
55160
|
const ZodSwcTerserMangleOptions = strictObject({
|
|
55133
|
-
props:
|
|
55161
|
+
props: schemas_record(schemas_string(), any()),
|
|
55134
55162
|
topLevel: schemas_boolean(),
|
|
55135
55163
|
toplevel: schemas_boolean(),
|
|
55136
55164
|
keepClassNames: schemas_boolean(),
|
|
@@ -55161,15 +55189,15 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
|
|
|
55161
55189
|
importSource: schemas_string()
|
|
55162
55190
|
}).partial();
|
|
55163
55191
|
const ZodSwcConstModulesConfig = strictObject({
|
|
55164
|
-
globals:
|
|
55192
|
+
globals: schemas_record(schemas_string(), schemas_record(schemas_string(), schemas_string())).optional()
|
|
55165
55193
|
});
|
|
55166
55194
|
const ZodSwcGlobalPassOption = strictObject({
|
|
55167
|
-
vars:
|
|
55195
|
+
vars: schemas_record(schemas_string(), schemas_string()),
|
|
55168
55196
|
envs: union([
|
|
55169
55197
|
schemas_string().array(),
|
|
55170
|
-
|
|
55198
|
+
schemas_record(schemas_string(), schemas_string())
|
|
55171
55199
|
]),
|
|
55172
|
-
typeofs:
|
|
55200
|
+
typeofs: schemas_record(schemas_string(), schemas_string())
|
|
55173
55201
|
}).partial();
|
|
55174
55202
|
const ZodSwcOptimizerConfig = strictObject({
|
|
55175
55203
|
simplify: schemas_boolean(),
|
|
@@ -55230,7 +55258,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
|
|
|
55230
55258
|
cacheRoot: schemas_string(),
|
|
55231
55259
|
plugins: schemas_array(tuple([
|
|
55232
55260
|
schemas_string(),
|
|
55233
|
-
|
|
55261
|
+
schemas_record(schemas_string(), any())
|
|
55234
55262
|
])),
|
|
55235
55263
|
runPluginFirst: schemas_boolean(),
|
|
55236
55264
|
disableBuiltinTransformsForInternalTesting: schemas_boolean(),
|
|
@@ -55239,7 +55267,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
|
|
|
55239
55267
|
keepImportAssertions: schemas_boolean()
|
|
55240
55268
|
}).partial(),
|
|
55241
55269
|
baseUrl: schemas_string(),
|
|
55242
|
-
paths:
|
|
55270
|
+
paths: schemas_record(schemas_string(), schemas_string().array()),
|
|
55243
55271
|
minify: ZodSwcJsMinifyOptions,
|
|
55244
55272
|
preserveAllComments: schemas_boolean(),
|
|
55245
55273
|
output: strictObject({
|
|
@@ -55284,7 +55312,7 @@ const getZodSwcLoaderOptionsSchema = memoize(()=>{
|
|
|
55284
55312
|
});
|
|
55285
55313
|
const ZodSwcUmdConfig = ZodSwcBaseModuleConfig.extend({
|
|
55286
55314
|
type: literal("umd"),
|
|
55287
|
-
globals:
|
|
55315
|
+
globals: schemas_record(schemas_string(), schemas_string()).optional()
|
|
55288
55316
|
});
|
|
55289
55317
|
const ZodSwcAmdConfig = ZodSwcBaseModuleConfig.extend({
|
|
55290
55318
|
type: literal("amd"),
|
|
@@ -55470,7 +55498,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55470
55498
|
layer: layer.optional()
|
|
55471
55499
|
});
|
|
55472
55500
|
const entryUnnamed = entryItem;
|
|
55473
|
-
const entryObject =
|
|
55501
|
+
const entryObject = schemas_record(schemas_string(), entryItem.or(entryDescription));
|
|
55474
55502
|
const entryStatic = entryObject.or(entryUnnamed);
|
|
55475
55503
|
const entryDynamic = anyFunction;
|
|
55476
55504
|
const entry = entryStatic.or(entryDynamic);
|
|
@@ -55601,7 +55629,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55601
55629
|
environment: environment,
|
|
55602
55630
|
compareBeforeEmit: schemas_boolean()
|
|
55603
55631
|
}).partial();
|
|
55604
|
-
const resolveAlias =
|
|
55632
|
+
const resolveAlias = schemas_record(schemas_string(), literal(false).or(schemas_string()).or(schemas_array(schemas_string().or(literal(false))))).or(literal(false));
|
|
55605
55633
|
const resolveTsConfigFile = schemas_string();
|
|
55606
55634
|
const resolveTsConfig = resolveTsConfigFile.or(strictObject({
|
|
55607
55635
|
configFile: resolveTsConfigFile,
|
|
@@ -55624,14 +55652,14 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55624
55652
|
tsConfig: resolveTsConfig,
|
|
55625
55653
|
fullySpecified: schemas_boolean(),
|
|
55626
55654
|
exportsFields: schemas_array(schemas_string()),
|
|
55627
|
-
extensionAlias:
|
|
55655
|
+
extensionAlias: schemas_record(schemas_string(), schemas_string().or(schemas_array(schemas_string()))),
|
|
55628
55656
|
aliasFields: schemas_array(schemas_string()),
|
|
55629
55657
|
restrictions: schemas_array(schemas_string()),
|
|
55630
55658
|
roots: schemas_array(schemas_string()),
|
|
55631
55659
|
pnp: schemas_boolean()
|
|
55632
55660
|
}).partial();
|
|
55633
55661
|
const resolveOptions = baseResolveOptions.extend({
|
|
55634
|
-
byDependency: lazy(()=>
|
|
55662
|
+
byDependency: lazy(()=>schemas_record(schemas_string(), resolveOptions)).optional()
|
|
55635
55663
|
});
|
|
55636
55664
|
const baseRuleSetCondition = _instanceof(RegExp).or(schemas_string()).or(anyFunction);
|
|
55637
55665
|
const ruleSetCondition = baseRuleSetCondition.or(lazy(()=>ruleSetConditions)).or(lazy(()=>ruleSetLogicalConditions));
|
|
@@ -55642,7 +55670,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55642
55670
|
not: ruleSetCondition
|
|
55643
55671
|
}).partial();
|
|
55644
55672
|
const ruleSetLoader = schemas_string();
|
|
55645
|
-
const ruleSetLoaderOptions = schemas_string().or(
|
|
55673
|
+
const ruleSetLoaderOptions = schemas_string().or(schemas_record(schemas_string(), any()));
|
|
55646
55674
|
const ruleSetLoaderWithOptions = strictObject({
|
|
55647
55675
|
ident: schemas_string().optional(),
|
|
55648
55676
|
loader: ruleSetLoader,
|
|
@@ -55681,15 +55709,15 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55681
55709
|
resourceQuery: ruleSetCondition,
|
|
55682
55710
|
scheme: ruleSetCondition,
|
|
55683
55711
|
mimetype: ruleSetCondition,
|
|
55684
|
-
descriptionData:
|
|
55685
|
-
with:
|
|
55712
|
+
descriptionData: schemas_record(schemas_string(), ruleSetCondition),
|
|
55713
|
+
with: schemas_record(schemas_string(), ruleSetCondition),
|
|
55686
55714
|
type: schemas_string(),
|
|
55687
55715
|
layer: schemas_string(),
|
|
55688
55716
|
loader: ruleSetLoader,
|
|
55689
55717
|
options: ruleSetLoaderOptions,
|
|
55690
55718
|
use: ruleSetUse,
|
|
55691
|
-
parser:
|
|
55692
|
-
generator:
|
|
55719
|
+
parser: schemas_record(schemas_string(), any()),
|
|
55720
|
+
generator: schemas_record(schemas_string(), any()),
|
|
55693
55721
|
resolve: resolveOptions,
|
|
55694
55722
|
sideEffects: schemas_boolean(),
|
|
55695
55723
|
enforce: literal("pre").or(literal("post"))
|
|
@@ -55746,6 +55774,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55746
55774
|
]);
|
|
55747
55775
|
const exprContextCritical = schemas_boolean();
|
|
55748
55776
|
const wrappedContextCritical = schemas_boolean();
|
|
55777
|
+
const unknownContextCritical = schemas_boolean();
|
|
55749
55778
|
const wrappedContextRegExp = _instanceof(RegExp);
|
|
55750
55779
|
const exportsPresence = schemas_enum([
|
|
55751
55780
|
"error",
|
|
@@ -55787,6 +55816,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55787
55816
|
url: javascriptParserUrl,
|
|
55788
55817
|
exprContextCritical: exprContextCritical,
|
|
55789
55818
|
wrappedContextCritical: wrappedContextCritical,
|
|
55819
|
+
unknownContextCritical: unknownContextCritical,
|
|
55790
55820
|
wrappedContextRegExp: wrappedContextRegExp,
|
|
55791
55821
|
exportsPresence: exportsPresence,
|
|
55792
55822
|
importExportsPresence: importExportsPresence,
|
|
@@ -55923,7 +55953,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55923
55953
|
allowTarget,
|
|
55924
55954
|
allowTarget.array()
|
|
55925
55955
|
]);
|
|
55926
|
-
const externalItemObjectValue =
|
|
55956
|
+
const externalItemObjectValue = schemas_record(schemas_string(), schemas_string().or(schemas_string().array()));
|
|
55927
55957
|
const externalItemUmdValue = strictObject({
|
|
55928
55958
|
root: schemas_string().or(schemas_string().array()),
|
|
55929
55959
|
commonjs: schemas_string().or(schemas_string().array()),
|
|
@@ -55969,7 +55999,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
55969
55999
|
}
|
|
55970
56000
|
};
|
|
55971
56001
|
const externalItemValue = schemas_string().or(schemas_boolean()).or(schemas_string().array().min(1)).or(externalItemObjectValue);
|
|
55972
|
-
const externalItemObjectUnknown =
|
|
56002
|
+
const externalItemObjectUnknown = schemas_record(schemas_string(), externalItemValue);
|
|
55973
56003
|
const externalItem = schemas_string().or(_instanceof(RegExp)).or(externalItemObjectUnknown).or(anyFunction);
|
|
55974
56004
|
const externals = externalItem.array().or(externalItem);
|
|
55975
56005
|
const externalsPresets = strictObject({
|
|
@@ -56021,7 +56051,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
56021
56051
|
global: schemas_boolean().or(literal("warn"))
|
|
56022
56052
|
}).partial();
|
|
56023
56053
|
const node = literal(false).or(nodeOptions);
|
|
56024
|
-
const loader =
|
|
56054
|
+
const loader = schemas_record(schemas_string(), any());
|
|
56025
56055
|
const snapshotOptions = strictObject({});
|
|
56026
56056
|
const cacheOptions = schemas_boolean();
|
|
56027
56057
|
const statsPresets = schemas_enum([
|
|
@@ -56138,7 +56168,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
56138
56168
|
"async",
|
|
56139
56169
|
"all"
|
|
56140
56170
|
]).or(_instanceof(RegExp)).or(anyFunction);
|
|
56141
|
-
const optimizationSplitChunksSizes = numberOrInfinity.or(
|
|
56171
|
+
const optimizationSplitChunksSizes = numberOrInfinity.or(schemas_record(schemas_string(), numberOrInfinity));
|
|
56142
56172
|
const optimizationSplitChunksDefaultSizeTypes = schemas_array(schemas_string());
|
|
56143
56173
|
const sharedOptimizationSplitChunksCacheGroup = {
|
|
56144
56174
|
chunks: optimizationSplitChunksChunks,
|
|
@@ -56167,7 +56197,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
56167
56197
|
...sharedOptimizationSplitChunksCacheGroup
|
|
56168
56198
|
}).partial();
|
|
56169
56199
|
const optimizationSplitChunksOptions = strictObject({
|
|
56170
|
-
cacheGroups:
|
|
56200
|
+
cacheGroups: schemas_record(schemas_string(), literal(false).or(optimizationSplitChunksCacheGroup)),
|
|
56171
56201
|
fallbackCacheGroup: strictObject({
|
|
56172
56202
|
chunks: optimizationSplitChunksChunks,
|
|
56173
56203
|
minSize: numberOrInfinity,
|
|
@@ -56330,7 +56360,7 @@ const getRspackOptionsSchema = memoize(()=>{
|
|
|
56330
56360
|
module: _instanceof(RegExp).optional()
|
|
56331
56361
|
})).array();
|
|
56332
56362
|
const profile = schemas_boolean();
|
|
56333
|
-
const amd = literal(false).or(
|
|
56363
|
+
const amd = literal(false).or(schemas_record(schemas_string(), any()));
|
|
56334
56364
|
const bail = schemas_boolean();
|
|
56335
56365
|
const performance = strictObject({
|
|
56336
56366
|
assetFilter: anyFunction,
|
|
@@ -56833,7 +56863,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
56833
56863
|
i++;
|
|
56834
56864
|
}
|
|
56835
56865
|
}
|
|
56836
|
-
new ExternalsPlugin(remoteType, remoteExternals).apply(compiler);
|
|
56866
|
+
new ExternalsPlugin(remoteType, remoteExternals, true).apply(compiler);
|
|
56837
56867
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
56838
56868
|
const rawOptions = {
|
|
56839
56869
|
remoteType: this._options.remoteType,
|
|
@@ -56929,7 +56959,7 @@ function transformSync(source, options) {
|
|
|
56929
56959
|
const _options = JSON.stringify(options || {});
|
|
56930
56960
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
56931
56961
|
}
|
|
56932
|
-
const exports_rspackVersion = "1.5.0-canary-
|
|
56962
|
+
const exports_rspackVersion = "1.5.0-canary-e5e47098-20250820070851";
|
|
56933
56963
|
const exports_version = "5.75.0";
|
|
56934
56964
|
const exports_WebpackError = Error;
|
|
56935
56965
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -57015,7 +57045,8 @@ const exports_experiments = {
|
|
|
57015
57045
|
sync: external_rspack_wasi_browser_js_.sync
|
|
57016
57046
|
},
|
|
57017
57047
|
CssChunkingPlugin: CssChunkingPlugin,
|
|
57018
|
-
createNativePlugin: createNativePlugin
|
|
57048
|
+
createNativePlugin: createNativePlugin,
|
|
57049
|
+
VirtualModulesPlugin: VirtualModulesPlugin
|
|
57019
57050
|
};
|
|
57020
57051
|
var rspack_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
57021
57052
|
function createMultiCompiler(options) {
|