@rsbuild/core 2.0.5 → 2.0.6
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/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/http-proxy-middleware/index.d.ts +4 -4
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +8 -8
- package/dist/753.js +23 -21
- package/dist/http-proxy-middleware.js +2 -2
- package/dist/manifest-plugin.js +6 -6
- package/dist/memfs.js +4 -6
- package/dist/ws.js +12 -13
- package/dist-types/cli/init.d.ts +1 -1
- package/dist-types/initConfigs.d.ts +2 -2
- package/dist-types/initPlugins.d.ts +1 -1
- package/dist-types/inspectConfig.d.ts +1 -1
- package/dist-types/loadConfig.d.ts +1 -1
- package/dist-types/loadEnv.d.ts +1 -1
- package/dist-types/pluginManager.d.ts +1 -1
- package/dist-types/restart.d.ts +1 -1
- package/dist-types/rspack-plugins/resource-hints/doesChunkBelongToHtml.d.ts +1 -1
- package/dist-types/rspack-plugins/resource-hints/getResourceType.d.ts +1 -1
- package/dist-types/rspackConfig.d.ts +1 -1
- package/dist-types/server/cliShortcuts.d.ts +1 -1
- package/dist-types/server/gzipMiddleware.d.ts +1 -1
- package/dist-types/server/helper.d.ts +1 -1
- package/dist-types/server/open.d.ts +1 -1
- package/package.json +6 -6
package/dist/753.js
CHANGED
|
@@ -384,8 +384,8 @@ __webpack_require__.add({
|
|
|
384
384
|
return (asyncHooks.AsyncResource && (res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn')), res && res.runInAsyncScope) ? res.runInAsyncScope.bind(res, fn, null) : fn;
|
|
385
385
|
}
|
|
386
386
|
},
|
|
387
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
388
|
-
let yaml, { resolve } = __webpack_require__("node:path?435f"), config = __webpack_require__("../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js"), loadOptions = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
387
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
388
|
+
let yaml, { resolve } = __webpack_require__("node:path?435f"), config = __webpack_require__("../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js"), loadOptions = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/options.js"), loadPlugins = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/plugins.js"), req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/req.js");
|
|
389
389
|
async function processResult(ctx, result) {
|
|
390
390
|
let obj, file = result.filepath || '', projectConfig = ((obj = result.config) && obj.__esModule ? obj : {
|
|
391
391
|
default: obj
|
|
@@ -458,8 +458,8 @@ __webpack_require__.add({
|
|
|
458
458
|
});
|
|
459
459
|
};
|
|
460
460
|
},
|
|
461
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
462
|
-
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
461
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/options.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
462
|
+
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/req.js");
|
|
463
463
|
module.exports = async function options(config, file) {
|
|
464
464
|
if (config.parser && 'string' == typeof config.parser) try {
|
|
465
465
|
config.parser = await req(config.parser, file);
|
|
@@ -479,8 +479,8 @@ __webpack_require__.add({
|
|
|
479
479
|
return config;
|
|
480
480
|
};
|
|
481
481
|
},
|
|
482
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
483
|
-
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
482
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/plugins.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
483
|
+
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/req.js");
|
|
484
484
|
async function load(plugin, options, file) {
|
|
485
485
|
try {
|
|
486
486
|
if (null == options || 0 === Object.keys(options).length) return await req(plugin, file);
|
|
@@ -496,7 +496,7 @@ __webpack_require__.add({
|
|
|
496
496
|
}), list;
|
|
497
497
|
};
|
|
498
498
|
},
|
|
499
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
499
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/req.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
500
500
|
let tsx, jiti;
|
|
501
501
|
var __filename = __rspack_fileURLToPath(import.meta.url);
|
|
502
502
|
let { createRequire } = __webpack_require__("node:module?1bcb"), { pathToFileURL } = __webpack_require__("node:url?b4ec"), TS_EXT_RE = /\.[mc]?ts$/, importError = [];
|
|
@@ -836,7 +836,7 @@ function lib_default(args, opts) {
|
|
|
836
836
|
_: []
|
|
837
837
|
}, i = 0, j = 0, idx = 0, len = (args = args || []).length;
|
|
838
838
|
let alibi = void 0 !== opts.alias, strict = void 0 !== opts.unknown, defaults = void 0 !== opts.default;
|
|
839
|
-
if (opts.alias = opts.alias || {}, opts.string = toArr(opts.string), opts.boolean = toArr(opts.boolean), alibi) for(k in opts.alias)for(
|
|
839
|
+
if (opts.alias = opts.alias || {}, opts.string = toArr(opts.string), opts.boolean = toArr(opts.boolean), alibi) for(k in opts.alias)for(arr = opts.alias[k] = toArr(opts.alias[k]), i = 0; i < arr.length; i++)(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);
|
|
840
840
|
for(i = opts.boolean.length; i-- > 0;)for(j = (arr = opts.alias[opts.boolean[i]] || []).length; j-- > 0;)opts.boolean.push(arr[j]);
|
|
841
841
|
for(i = opts.string.length; i-- > 0;)for(j = (arr = opts.alias[opts.string[i]] || []).length; j-- > 0;)opts.string.push(arr[j]);
|
|
842
842
|
if (defaults) {
|
|
@@ -3481,7 +3481,7 @@ function createPublicContext(context) {
|
|
|
3481
3481
|
async function createContext(options, userConfig, logger) {
|
|
3482
3482
|
let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = join(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
|
|
3483
3483
|
return {
|
|
3484
|
-
version: "2.0.
|
|
3484
|
+
version: "2.0.6",
|
|
3485
3485
|
rootPath,
|
|
3486
3486
|
distPath: '',
|
|
3487
3487
|
cachePath,
|
|
@@ -4467,7 +4467,7 @@ function parseMinifyOptions(config) {
|
|
|
4467
4467
|
cssOptions: minify.cssOptions
|
|
4468
4468
|
};
|
|
4469
4469
|
}
|
|
4470
|
-
let postcss_load_config_src = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
4470
|
+
let postcss_load_config_src = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.14/node_modules/postcss-load-config/src/index.js");
|
|
4471
4471
|
var postcss_load_config_src_default = __webpack_require__.n(postcss_load_config_src);
|
|
4472
4472
|
function getLightningCSSLoaderOptions(config, targets, minify) {
|
|
4473
4473
|
let userOptions = 'object' == typeof config.tools.lightningcssLoader ? config.tools.lightningcssLoader : {}, initialOptions = {
|
|
@@ -5537,14 +5537,14 @@ async function ensureFileDir(outputFilePath) {
|
|
|
5537
5537
|
recursive: !0
|
|
5538
5538
|
});
|
|
5539
5539
|
}
|
|
5540
|
-
async function applyProfile(root, filterValue, traceLayer
|
|
5540
|
+
async function applyProfile(root, filterValue, traceLayer, traceOutput) {
|
|
5541
5541
|
if ('perfetto' !== traceLayer && 'logger' !== traceLayer) throw Error(`unsupported trace layer: ${traceLayer}`);
|
|
5542
5542
|
if (!traceOutput) {
|
|
5543
5543
|
let timestamp = Date.now(), defaultOutputDir = node_path.join(root, `.rspack-profile-${timestamp}-${process.pid}`), defaultRustTracePerfettoOutput = node_path.join(defaultOutputDir, 'rspack.pftrace');
|
|
5544
5544
|
traceOutput = 'perfetto' === traceLayer ? defaultRustTracePerfettoOutput : 'stdout';
|
|
5545
5545
|
}
|
|
5546
5546
|
let filter = resolveLayer(filterValue);
|
|
5547
|
-
return await ensureFileDir(traceOutput), await core_rspack.experiments.globalTrace.register(filter, traceLayer, traceOutput), traceOutput;
|
|
5547
|
+
return 'perfetto' === traceLayer && await ensureFileDir(traceOutput), await core_rspack.experiments.globalTrace.register(filter, traceLayer, traceOutput), traceOutput;
|
|
5548
5548
|
}
|
|
5549
5549
|
function getForceSplittingGroups(forceSplitting, strategy) {
|
|
5550
5550
|
let cacheGroups = {};
|
|
@@ -6767,8 +6767,10 @@ function gzipMiddleware_gzipMiddleware({ filter, level = node_zlib.constants.Z_B
|
|
|
6767
6767
|
if (started) return;
|
|
6768
6768
|
if (started = !0, ((res)=>{
|
|
6769
6769
|
if (res.getHeader('Content-Encoding')) return !1;
|
|
6770
|
-
let contentType =
|
|
6771
|
-
if (
|
|
6770
|
+
let contentType = res.getHeader('Content-Type');
|
|
6771
|
+
if (!contentType) return !1;
|
|
6772
|
+
let contentTypeValue = String(contentType);
|
|
6773
|
+
if (!CONTENT_TYPE_REGEX.test(contentTypeValue) || 'text/event-stream' === contentTypeValue.split(';', 1)[0].trim().toLowerCase()) return !1;
|
|
6772
6774
|
let size = res.getHeader('Content-Length');
|
|
6773
6775
|
return void 0 === size || Number(size) > 1024;
|
|
6774
6776
|
})(res)) for (let listener of (res.setHeader('Content-Encoding', 'gzip'), res.removeHeader('Content-Length'), (gzip = node_zlib.createGzip({
|
|
@@ -8852,7 +8854,7 @@ try {
|
|
|
8852
8854
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
|
|
8853
8855
|
let { output: { manifest }, dev: { writeToDisk } } = environment.config;
|
|
8854
8856
|
if (!1 === manifest) return;
|
|
8855
|
-
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
8857
|
+
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.3/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
|
|
8856
8858
|
manifestFilenames.set(environment.name, manifestOptions.filename);
|
|
8857
8859
|
let pluginOptions = {
|
|
8858
8860
|
fileName: manifestOptions.filename,
|
|
@@ -8928,15 +8930,15 @@ try {
|
|
|
8928
8930
|
{
|
|
8929
8931
|
name: 'rsbuild:rspack-profile',
|
|
8930
8932
|
setup (api) {
|
|
8931
|
-
let traceOutput, { RSPACK_PROFILE } = process.env;
|
|
8933
|
+
let traceOutput, { RSPACK_PROFILE, RSPACK_TRACE_LAYER = 'logger' } = process.env;
|
|
8932
8934
|
if (!RSPACK_PROFILE) return;
|
|
8933
8935
|
let onStart = async ()=>{
|
|
8934
|
-
traceOutput = await applyProfile(api.context.rootPath, RSPACK_PROFILE,
|
|
8936
|
+
traceOutput = await applyProfile(api.context.rootPath, RSPACK_PROFILE, RSPACK_TRACE_LAYER, process.env.RSPACK_TRACE_OUTPUT);
|
|
8935
8937
|
};
|
|
8936
8938
|
api.onBeforeBuild(async ({ isFirstCompile })=>{
|
|
8937
8939
|
isFirstCompile && await onStart();
|
|
8938
8940
|
}), api.onBeforeStartDevServer(onStart), api.onExit(()=>{
|
|
8939
|
-
traceOutput && (core_rspack.experiments.globalTrace.cleanup(), api.logger.info(`profile file saved to ${color.cyan(traceOutput)}`));
|
|
8941
|
+
traceOutput && (core_rspack.experiments.globalTrace.cleanup(), 'perfetto' === RSPACK_TRACE_LAYER && api.logger.info(`profile file saved to ${color.cyan(traceOutput)}`));
|
|
8940
8942
|
});
|
|
8941
8943
|
}
|
|
8942
8944
|
},
|
|
@@ -9366,7 +9368,7 @@ let applyServerOptions = (command)=>{
|
|
|
9366
9368
|
};
|
|
9367
9369
|
function setupCommands() {
|
|
9368
9370
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
9369
|
-
cli.version("2.0.
|
|
9371
|
+
cli.version("2.0.6"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
|
|
9370
9372
|
default: 'auto'
|
|
9371
9373
|
}).option('--env-dir <dir>', 'Set the directory for loading `.env` files').option('--env-mode <mode>', 'Set the env mode to load the `.env.[mode]` file').option('--environment <name>', 'Set the environment name(s) to build', {
|
|
9372
9374
|
type: [
|
|
@@ -9443,7 +9445,7 @@ function initNodeEnv() {
|
|
|
9443
9445
|
}
|
|
9444
9446
|
function showGreeting() {
|
|
9445
9447
|
let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
|
|
9446
|
-
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.
|
|
9448
|
+
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.6\n`);
|
|
9447
9449
|
}
|
|
9448
9450
|
function setupLogLevel() {
|
|
9449
9451
|
let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
|
|
@@ -9464,5 +9466,5 @@ function runCLI() {
|
|
|
9464
9466
|
src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err), process.exit(1);
|
|
9465
9467
|
}
|
|
9466
9468
|
}
|
|
9467
|
-
let src_version = "2.0.
|
|
9469
|
+
let src_version = "2.0.6";
|
|
9468
9470
|
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, core_rspack as rspack, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig_loadConfig as loadConfig, loadEnv, logger_createLogger as createLogger, mergeRsbuildConfig, runCLI, src_logger as logger, src_version as version };
|
|
@@ -2744,7 +2744,7 @@ function verifyConfig(options) {
|
|
|
2744
2744
|
(ERRORS = errors_ERRORS || (errors_ERRORS = {})).ERR_CONFIG_FACTORY_TARGET_MISSING = "[HPM] Missing \"target\" option. Example: {target: \"http://www.example.org\"}", ERRORS.ERR_CONTEXT_MATCHER_GENERIC = "[HPM] Invalid pathFilter. Expecting something like: \"/api\" or [\"/api\", \"/ajax\"]", ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY = "[HPM] Invalid pathFilter. Plain paths (e.g. \"/api\") can not be mixed with globs (e.g. \"/api/**\"). Expecting something like: [\"/api\", \"/ajax\"] or [\"/api/**\", \"!**.html\"].", ERRORS.ERR_PATH_REWRITER_CONFIG = "[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";
|
|
2745
2745
|
let Debug = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js")('http-proxy-middleware'), debug = Debug.extend('debug-proxy-errors-plugin'), debugProxyErrorsPlugin = (proxyServer)=>{
|
|
2746
2746
|
proxyServer.on('error', (error, req, res, target)=>{
|
|
2747
|
-
debug(`
|
|
2747
|
+
debug(`httpxy error event: \n%O`, error);
|
|
2748
2748
|
}), proxyServer.on('proxyReq', (proxyReq, req, socket)=>{
|
|
2749
2749
|
socket.on('error', (error)=>{
|
|
2750
2750
|
debug('Socket error in proxyReq event: \n%O', error);
|
|
@@ -2766,7 +2766,7 @@ let Debug = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-c
|
|
|
2766
2766
|
debug('Socket error in close event: \n%O', error);
|
|
2767
2767
|
});
|
|
2768
2768
|
}), proxyServer.on('econnreset', (error, req, res, target)=>{
|
|
2769
|
-
debug(`
|
|
2769
|
+
debug(`httpxy econnreset event: \n%O`, error);
|
|
2770
2770
|
});
|
|
2771
2771
|
};
|
|
2772
2772
|
function getStatusCode(errorCode) {
|
package/dist/manifest-plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./1~rslib-runtime.js";
|
|
2
2
|
import "./753.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
|
-
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
4
|
+
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.3/node_modules/rspack-manifest-plugin/dist/helpers.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
5
5
|
exports.transformFiles = exports.reduceChunk = exports.reduceAssets = exports.generateManifest = void 0;
|
|
6
6
|
let node_path_1 = __webpack_require__("node:path?435f");
|
|
7
7
|
exports.generateManifest = (compilation, files, { generate, seed = {} })=>generate ? generate(seed, files, Array.from(compilation.entrypoints.entries()).reduce((e, [name, entrypoint])=>Object.assign(e, {
|
|
@@ -61,9 +61,9 @@ __webpack_require__.add({
|
|
|
61
61
|
'sort'
|
|
62
62
|
].filter((fname)=>!!options[fname]).reduce((prev, fname)=>prev[fname](options[fname]), files).map(standardizeFilePaths);
|
|
63
63
|
},
|
|
64
|
-
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
64
|
+
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.3/node_modules/rspack-manifest-plugin/dist/hooks.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
65
65
|
exports.getCompilerHooks = exports.emitHook = exports.beforeRunHook = void 0;
|
|
66
|
-
let node_fs_1 = __webpack_require__("node:fs?9592"), node_path_1 = __webpack_require__("node:path?435f"), lite_tapable_1 = __webpack_require__("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.0/node_modules/@rspack/lite-tapable/dist/index.cjs"), helpers_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
66
|
+
let node_fs_1 = __webpack_require__("node:fs?9592"), node_path_1 = __webpack_require__("node:path?435f"), lite_tapable_1 = __webpack_require__("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.0/node_modules/@rspack/lite-tapable/dist/index.cjs"), helpers_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.3/node_modules/rspack-manifest-plugin/dist/helpers.js"), compilerHookMap = new WeakMap(), getCompilerHooks = (compiler)=>{
|
|
67
67
|
let hooks = compilerHookMap.get(compiler);
|
|
68
68
|
return void 0 === hooks && (hooks = {
|
|
69
69
|
afterEmit: new lite_tapable_1.SyncWaterfallHook([
|
|
@@ -112,9 +112,9 @@ __webpack_require__.add({
|
|
|
112
112
|
getCompilerHooks(compiler).afterEmit.call(manifest);
|
|
113
113
|
};
|
|
114
114
|
},
|
|
115
|
-
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
115
|
+
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.3/node_modules/rspack-manifest-plugin/dist/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
116
116
|
exports.RspackManifestPlugin = void 0;
|
|
117
|
-
let node_path_1 = __webpack_require__("node:path?435f"), hooks_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
117
|
+
let node_path_1 = __webpack_require__("node:path?435f"), hooks_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.3/node_modules/rspack-manifest-plugin/dist/hooks.js"), emitCountMap = new Map(), defaults = {
|
|
118
118
|
assetHookStage: 1 / 0,
|
|
119
119
|
basePath: '',
|
|
120
120
|
fileName: 'manifest.json',
|
|
@@ -683,5 +683,5 @@ __webpack_require__.add({
|
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
});
|
|
686
|
-
var RspackManifestPlugin = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
686
|
+
var RspackManifestPlugin = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.3/node_modules/rspack-manifest-plugin/dist/index.js").RspackManifestPlugin;
|
|
687
687
|
export { RspackManifestPlugin };
|
package/dist/memfs.js
CHANGED
|
@@ -79,7 +79,7 @@ __webpack_require__.add({
|
|
|
79
79
|
"../../node_modules/.pnpm/@jsonjoy.com+buffers@17.67.0_tslib@2.8.1/node_modules/@jsonjoy.com/buffers/lib/Reader.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
80
80
|
exports.Reader = void 0;
|
|
81
81
|
let decodeUtf8_1 = __webpack_require__("../../node_modules/.pnpm/@jsonjoy.com+buffers@17.67.0_tslib@2.8.1/node_modules/@jsonjoy.com/buffers/lib/utf8/decodeUtf8/index.js");
|
|
82
|
-
class Reader {
|
|
82
|
+
exports.Reader = class Reader {
|
|
83
83
|
constructor(uint8 = new Uint8Array([]), view = new DataView(uint8.buffer, uint8.byteOffset, uint8.length), x = 0, end = uint8.length){
|
|
84
84
|
this.uint8 = uint8, this.view = view, this.x = x, this.end = end;
|
|
85
85
|
}
|
|
@@ -161,8 +161,7 @@ __webpack_require__.add({
|
|
|
161
161
|
for(let i = this.x; i < end; i++)str += String.fromCharCode(uint8[i]);
|
|
162
162
|
return this.x = end, str;
|
|
163
163
|
}
|
|
164
|
-
}
|
|
165
|
-
exports.Reader = Reader;
|
|
164
|
+
};
|
|
166
165
|
},
|
|
167
166
|
"../../node_modules/.pnpm/@jsonjoy.com+buffers@17.67.0_tslib@2.8.1/node_modules/@jsonjoy.com/buffers/lib/Slice.js" (__unused_rspack_module, exports) {
|
|
168
167
|
exports.Slice = void 0, exports.Slice = class {
|
|
@@ -617,7 +616,7 @@ __webpack_require__.add({
|
|
|
617
616
|
value: !0
|
|
618
617
|
}), exports.Link = void 0;
|
|
619
618
|
let fs_node_utils_1 = __webpack_require__("../../node_modules/.pnpm/@jsonjoy.com+fs-node-utils@4.57.2_tslib@2.8.1/node_modules/@jsonjoy.com/fs-node-utils/lib/index.js"), fanout_1 = __webpack_require__("../../node_modules/.pnpm/thingies@2.6.0_tslib@2.8.1/node_modules/thingies/lib/fanout.js"), { S_IFREG } = fs_node_utils_1.constants;
|
|
620
|
-
class Link {
|
|
619
|
+
exports.Link = class Link {
|
|
621
620
|
get steps() {
|
|
622
621
|
return this._steps;
|
|
623
622
|
}
|
|
@@ -677,8 +676,7 @@ __webpack_require__.add({
|
|
|
677
676
|
this.name
|
|
678
677
|
];
|
|
679
678
|
}
|
|
680
|
-
}
|
|
681
|
-
exports.Link = Link;
|
|
679
|
+
};
|
|
682
680
|
},
|
|
683
681
|
"../../node_modules/.pnpm/@jsonjoy.com+fs-core@4.57.2_tslib@2.8.1/node_modules/@jsonjoy.com/fs-core/lib/Node.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
684
682
|
Object.defineProperty(exports, "__esModule", {
|
package/dist/ws.js
CHANGED
|
@@ -540,7 +540,17 @@ __webpack_require__.add({
|
|
|
540
540
|
},
|
|
541
541
|
"../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/sender.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
542
542
|
let randomPool, { Duplex } = __webpack_require__("stream"), { randomFillSync } = __webpack_require__("crypto"), PerMessageDeflate = __webpack_require__("../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/permessage-deflate.js"), { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__("../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/constants.js"), { isBlob, isValidStatusCode } = __webpack_require__("../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/validation.js"), { mask: applyMask, toBuffer } = __webpack_require__("../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/buffer-util.js"), kByteLength = Symbol('kByteLength'), maskBuffer = Buffer.alloc(4), randomPoolPointer = 8192;
|
|
543
|
-
|
|
543
|
+
function callCallbacks(sender, err, cb) {
|
|
544
|
+
'function' == typeof cb && cb(err);
|
|
545
|
+
for(let i = 0; i < sender._queue.length; i++){
|
|
546
|
+
let params = sender._queue[i], callback = params[params.length - 1];
|
|
547
|
+
'function' == typeof callback && callback(err);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function onError(sender, err, cb) {
|
|
551
|
+
callCallbacks(sender, err, cb), sender.onerror(err);
|
|
552
|
+
}
|
|
553
|
+
module.exports = class Sender {
|
|
544
554
|
constructor(socket, extensions, generateMask){
|
|
545
555
|
this._extensions = extensions || {}, generateMask && (this._generateMask = generateMask, this._maskBuffer = Buffer.alloc(4)), this._socket = socket, this._firstFragment = !0, this._compress = !1, this._bufferedBytes = 0, this._queue = [], this._state = 0, this.onerror = NOOP, this[kWebSocket] = void 0;
|
|
546
556
|
}
|
|
@@ -704,18 +714,7 @@ __webpack_require__.add({
|
|
|
704
714
|
sendFrame(list, cb) {
|
|
705
715
|
2 === list.length ? (this._socket.cork(), this._socket.write(list[0]), this._socket.write(list[1], cb), this._socket.uncork()) : this._socket.write(list[0], cb);
|
|
706
716
|
}
|
|
707
|
-
}
|
|
708
|
-
function callCallbacks(sender, err, cb) {
|
|
709
|
-
'function' == typeof cb && cb(err);
|
|
710
|
-
for(let i = 0; i < sender._queue.length; i++){
|
|
711
|
-
let params = sender._queue[i], callback = params[params.length - 1];
|
|
712
|
-
'function' == typeof callback && callback(err);
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
function onError(sender, err, cb) {
|
|
716
|
-
callCallbacks(sender, err, cb), sender.onerror(err);
|
|
717
|
-
}
|
|
718
|
-
module.exports = Sender;
|
|
717
|
+
};
|
|
719
718
|
},
|
|
720
719
|
"../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/stream.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
721
720
|
__webpack_require__("../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/websocket.js");
|
package/dist-types/cli/init.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RsbuildInstance } from '../types';
|
|
2
2
|
import type { CommonOptions } from './commands';
|
|
3
|
-
export declare function init({ cliOptions, isRestart, isBuildWatch }: {
|
|
3
|
+
export declare function init({ cliOptions, isRestart, isBuildWatch, }: {
|
|
4
4
|
cliOptions?: CommonOptions;
|
|
5
5
|
isRestart?: boolean;
|
|
6
6
|
isBuildWatch?: boolean;
|
|
@@ -13,7 +13,7 @@ export type InitConfigsOptions = {
|
|
|
13
13
|
* 5. Run all the `modifyEnvironmentConfig` hooks
|
|
14
14
|
* 6. Validate the final Rsbuild config
|
|
15
15
|
*/
|
|
16
|
-
export declare function initRsbuildConfig({ context, pluginManager }: Pick<InitConfigsOptions, 'context' | 'pluginManager'>): Promise<NormalizedConfig>;
|
|
17
|
-
export declare function initConfigs({ context, pluginManager, rsbuildOptions }: InitConfigsOptions): Promise<{
|
|
16
|
+
export declare function initRsbuildConfig({ context, pluginManager, }: Pick<InitConfigsOptions, 'context' | 'pluginManager'>): Promise<NormalizedConfig>;
|
|
17
|
+
export declare function initConfigs({ context, pluginManager, rsbuildOptions, }: InitConfigsOptions): Promise<{
|
|
18
18
|
rspackConfigs: Rspack.Configuration[];
|
|
19
19
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Logger } from './logger';
|
|
2
2
|
import type { InternalContext, NormalizedEnvironmentConfig, PluginManager, RsbuildPluginAPI } from './types';
|
|
3
3
|
export declare function getHTMLPathByEntry(entryName: string, config: NormalizedEnvironmentConfig, logger: Logger): string;
|
|
4
|
-
export declare function initPluginAPI({ context, pluginManager }: {
|
|
4
|
+
export declare function initPluginAPI({ context, pluginManager, }: {
|
|
5
5
|
context: InternalContext;
|
|
6
6
|
pluginManager: PluginManager;
|
|
7
7
|
}): (environment?: string) => RsbuildPluginAPI;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InitConfigsOptions } from './initConfigs';
|
|
2
2
|
import type { InspectConfigOptions, InspectConfigResult, Rspack } from './types';
|
|
3
3
|
export declare function stringifyConfig(config: unknown, verbose?: boolean): string;
|
|
4
|
-
export declare function inspectConfig({ context, pluginManager, bundlerConfigs, inspectOptions }: InitConfigsOptions & {
|
|
4
|
+
export declare function inspectConfig({ context, pluginManager, bundlerConfigs, inspectOptions, }: InitConfigsOptions & {
|
|
5
5
|
inspectOptions?: InspectConfigOptions;
|
|
6
6
|
bundlerConfigs: Rspack.Configuration[];
|
|
7
7
|
}): Promise<InspectConfigResult>;
|
|
@@ -57,4 +57,4 @@ export declare function defineConfig(config: RsbuildConfigSyncFn): RsbuildConfig
|
|
|
57
57
|
export declare function defineConfig(config: RsbuildConfigAsyncFn): RsbuildConfigAsyncFn;
|
|
58
58
|
export declare function defineConfig(config: RsbuildConfigExport): RsbuildConfigExport;
|
|
59
59
|
export type ConfigLoader = 'auto' | 'jiti' | 'native';
|
|
60
|
-
export declare function loadConfig({ cwd, path, envMode, meta, loader }?: LoadConfigOptions): Promise<LoadConfigResult>;
|
|
60
|
+
export declare function loadConfig({ cwd, path, envMode, meta, loader, }?: LoadConfigOptions): Promise<LoadConfigResult>;
|
package/dist-types/loadEnv.d.ts
CHANGED
|
@@ -60,4 +60,4 @@ export type LoadEnvResult = {
|
|
|
60
60
|
*/
|
|
61
61
|
cleanup: () => void;
|
|
62
62
|
};
|
|
63
|
-
export declare function loadEnv({ cwd, mode, prefixes, processEnv }?: LoadEnvOptions): LoadEnvResult;
|
|
63
|
+
export declare function loadEnv({ cwd, mode, prefixes, processEnv, }?: LoadEnvOptions): LoadEnvResult;
|
|
@@ -16,7 +16,7 @@ export declare const sortPluginsByEnforce: (plugins: PluginMeta[]) => PluginMeta
|
|
|
16
16
|
* execution order.
|
|
17
17
|
*/
|
|
18
18
|
export declare const sortPluginsByDependencies: (plugins: PluginMeta[]) => PluginMeta[];
|
|
19
|
-
export declare function initPlugins({ context, pluginManager }: {
|
|
19
|
+
export declare function initPlugins({ context, pluginManager, }: {
|
|
20
20
|
context: InternalContext;
|
|
21
21
|
pluginManager: PluginManager;
|
|
22
22
|
}): Promise<void>;
|
package/dist-types/restart.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare const restartDevServer: ({ filePath, clear, logger, }: {
|
|
|
11
11
|
clear?: boolean;
|
|
12
12
|
logger: Logger;
|
|
13
13
|
}) => Promise<boolean>;
|
|
14
|
-
export declare function watchFilesForRestart({ files, rsbuild, isBuildWatch, watchOptions }: {
|
|
14
|
+
export declare function watchFilesForRestart({ files, rsbuild, isBuildWatch, watchOptions, }: {
|
|
15
15
|
files: string[];
|
|
16
16
|
rsbuild: RsbuildInstance;
|
|
17
17
|
isBuildWatch: boolean;
|
|
@@ -24,5 +24,5 @@ interface DoesChunkBelongToHtmlOptions {
|
|
|
24
24
|
pluginOptions?: ResourceHintsOptions;
|
|
25
25
|
}
|
|
26
26
|
export declare function recursiveChunkEntryNames(chunk: Chunk): string[];
|
|
27
|
-
export declare function doesChunkBelongToHtml({ chunk, htmlPluginData }: DoesChunkBelongToHtmlOptions): boolean;
|
|
27
|
+
export declare function doesChunkBelongToHtml({ chunk, htmlPluginData, }: DoesChunkBelongToHtmlOptions): boolean;
|
|
28
28
|
export {};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
export type ResourceType = 'audio' | 'document' | 'embed' | 'fetch' | 'font' | 'image' | 'object' | 'script' | 'style' | 'track' | 'worker' | 'video';
|
|
19
|
-
export declare function getResourceType({ href, file }: {
|
|
19
|
+
export declare function getResourceType({ href, file, }: {
|
|
20
20
|
href: string;
|
|
21
21
|
file: string;
|
|
22
22
|
}): ResourceType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EnvironmentContext, InternalContext, ModifyChainUtils, ModifyRspackConfigUtils, RsbuildTarget, Rspack } from './types';
|
|
2
2
|
export declare function getConfigUtils(getCurrentConfig: () => Rspack.Configuration, chainUtils: ModifyChainUtils): ModifyRspackConfigUtils;
|
|
3
3
|
export declare function getChainUtils(target: RsbuildTarget, environment: EnvironmentContext, environments: Record<string, EnvironmentContext>): ModifyChainUtils;
|
|
4
|
-
export declare function generateRspackConfig({ target, context, environmentName }: {
|
|
4
|
+
export declare function generateRspackConfig({ target, context, environmentName, }: {
|
|
5
5
|
target: RsbuildTarget;
|
|
6
6
|
context: InternalContext;
|
|
7
7
|
environmentName: string;
|
|
@@ -2,7 +2,7 @@ import type { Logger } from '../logger';
|
|
|
2
2
|
import type { CliShortcut, NormalizedConfig } from '../types/config';
|
|
3
3
|
export declare const isCliShortcutsEnabled: (config: NormalizedConfig) => boolean;
|
|
4
4
|
export declare const normalizeShortcutInput: (input: string) => string;
|
|
5
|
-
export declare function setupCliShortcuts({ help, openPage, closeServer, printUrls, restartServer, customShortcuts, logger }: {
|
|
5
|
+
export declare function setupCliShortcuts({ help, openPage, closeServer, printUrls, restartServer, customShortcuts, logger, }: {
|
|
6
6
|
help?: boolean | string;
|
|
7
7
|
openPage: () => Promise<void>;
|
|
8
8
|
closeServer: () => Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CompressOptions, RequestHandler } from '../types';
|
|
2
|
-
export declare function gzipMiddleware({ filter, level }?: CompressOptions): RequestHandler;
|
|
2
|
+
export declare function gzipMiddleware({ filter, level, }?: CompressOptions): RequestHandler;
|
|
@@ -30,7 +30,7 @@ export declare const joinUrlSegments: (s1: string, s2: string) => string;
|
|
|
30
30
|
export declare const stripBase: (path: string, base: string) => string;
|
|
31
31
|
export declare const getRoutes: (context: InternalContext) => Routes;
|
|
32
32
|
export declare const formatRoutes: (entry: RsbuildEntry, base: string, distPathPrefix: string | undefined, outputStructure: OutputStructure | undefined) => Routes;
|
|
33
|
-
export declare function printServerURLs({ urls: originalUrls, port, routes, protocol, printUrls, fallbackPathname, trailingLineBreak, originalConfig, logger }: {
|
|
33
|
+
export declare function printServerURLs({ urls: originalUrls, port, routes, protocol, printUrls, fallbackPathname, trailingLineBreak, originalConfig, logger, }: {
|
|
34
34
|
urls: {
|
|
35
35
|
url: string;
|
|
36
36
|
label: string;
|
|
@@ -2,7 +2,7 @@ import type { Logger } from '../logger';
|
|
|
2
2
|
import type { NormalizedConfig, Routes } from '../types';
|
|
3
3
|
export declare const replacePortPlaceholder: (url: string, port: number) => string;
|
|
4
4
|
export declare function resolveUrl(str: string, base: string): string;
|
|
5
|
-
export declare function open({ port, routes, config, protocol, clearCache, logger }: {
|
|
5
|
+
export declare function open({ port, routes, config, protocol, clearCache, logger, }: {
|
|
6
6
|
port: number;
|
|
7
7
|
routes: Routes;
|
|
8
8
|
config: NormalizedConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"types.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rspack/core": "~2.0.
|
|
39
|
+
"@rspack/core": "~2.0.3",
|
|
40
40
|
"@swc/helpers": "^0.5.21"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@jridgewell/remapping": "^2.3.5",
|
|
52
52
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
53
|
-
"@rslib/core": "0.21.
|
|
53
|
+
"@rslib/core": "0.21.4",
|
|
54
54
|
"@types/cors": "^2.8.19",
|
|
55
|
-
"@types/node": "^24.12.
|
|
55
|
+
"@types/node": "^24.12.3",
|
|
56
56
|
"@types/on-finished": "2.3.5",
|
|
57
57
|
"@types/range-parser": "^1.2.7",
|
|
58
58
|
"@types/ws": "^8.18.1",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"deepmerge": "^4.3.1",
|
|
66
66
|
"dotenv-expand": "13.0.0",
|
|
67
67
|
"html-rspack-plugin": "6.1.8",
|
|
68
|
-
"http-proxy-middleware": "4.0.0
|
|
68
|
+
"http-proxy-middleware": "4.0.0",
|
|
69
69
|
"jiti": "^2.7.0",
|
|
70
70
|
"launch-editor-middleware": "^2.13.2",
|
|
71
71
|
"memfs": "^4.57.2",
|
|
72
72
|
"mrmime": "^2.0.1",
|
|
73
73
|
"on-finished": "2.4.1",
|
|
74
74
|
"open": "^11.0.0",
|
|
75
|
-
"postcss": "^8.5.
|
|
75
|
+
"postcss": "^8.5.14",
|
|
76
76
|
"postcss-load-config": "6.0.1",
|
|
77
77
|
"postcss-loader": "8.2.1",
|
|
78
78
|
"prebundle": "1.6.4",
|