@rsbuild/core 2.1.8 → 2.1.9
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/postcss/index.js +1 -1
- package/compiled/postcss/lib/node.d.ts +2 -2
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/dist/626.js +19 -20
- package/dist/launch-editor-middleware.js +1 -1
- package/dist/manifest-plugin.js +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/hooks.d.ts +2 -2
- package/dist/types/rsbuild.d.ts +4 -3
- package/package.json +3 -3
|
@@ -31,12 +31,12 @@ declare namespace Node {
|
|
|
31
31
|
|
|
32
32
|
export interface Position {
|
|
33
33
|
/**
|
|
34
|
-
* Source
|
|
34
|
+
* Source column in file. It starts from 1.
|
|
35
35
|
*/
|
|
36
36
|
column: number
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Source
|
|
39
|
+
* Source line in file. It starts from 1.
|
|
40
40
|
*/
|
|
41
41
|
line: number
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"postcss","author":"Andrey Sitnik <andrey@sitnik.es>","version":"8.5.
|
|
1
|
+
{"name":"postcss","author":"Andrey Sitnik <andrey@sitnik.es>","version":"8.5.23","funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"./lib/postcss.d.ts","type":"commonjs"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
261: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(759)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
759: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = loader;
|
|
11
11
|
var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(858);
|
|
13
13
|
function _interopRequireDefault(e) {
|
|
14
14
|
return e && e.__esModule ? e : { default: e };
|
|
15
15
|
}
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
callback(null, result.css, map, { ast });
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
|
-
|
|
182
|
+
858: (module, exports, __nccwpck_require__) => {
|
|
183
183
|
module = __nccwpck_require__.nmd(module);
|
|
184
184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
185
|
exports.exec = exec;
|
|
@@ -716,6 +716,6 @@
|
|
|
716
716
|
})();
|
|
717
717
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
718
718
|
__nccwpck_require__.ab = __dirname + "/";
|
|
719
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
719
|
+
var __webpack_exports__ = __nccwpck_require__(261);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
package/dist/626.js
CHANGED
|
@@ -386,8 +386,8 @@ __webpack_require__.add({
|
|
|
386
386
|
return (asyncHooks.AsyncResource && (res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn')), res && res.runInAsyncScope) ? res.runInAsyncScope.bind(res, fn, null) : fn;
|
|
387
387
|
}
|
|
388
388
|
},
|
|
389
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
390
|
-
let yaml, { resolve } = __webpack_require__("node:path?815c"), 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.
|
|
389
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.23/node_modules/postcss-load-config/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
390
|
+
let yaml, { resolve } = __webpack_require__("node:path?815c"), 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.23/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.23/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.23/node_modules/postcss-load-config/src/req.js");
|
|
391
391
|
async function processResult(ctx, result) {
|
|
392
392
|
let obj, file = result.filepath || '', projectConfig = ((obj = result.config) && obj.__esModule ? obj : {
|
|
393
393
|
default: obj
|
|
@@ -460,8 +460,8 @@ __webpack_require__.add({
|
|
|
460
460
|
});
|
|
461
461
|
};
|
|
462
462
|
},
|
|
463
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
464
|
-
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
463
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.23/node_modules/postcss-load-config/src/options.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
464
|
+
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.23/node_modules/postcss-load-config/src/req.js");
|
|
465
465
|
module.exports = async function options(config, file) {
|
|
466
466
|
if (config.parser && 'string' == typeof config.parser) try {
|
|
467
467
|
config.parser = await req(config.parser, file);
|
|
@@ -481,8 +481,8 @@ __webpack_require__.add({
|
|
|
481
481
|
return config;
|
|
482
482
|
};
|
|
483
483
|
},
|
|
484
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
485
|
-
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
484
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.23/node_modules/postcss-load-config/src/plugins.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
485
|
+
let req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.23/node_modules/postcss-load-config/src/req.js");
|
|
486
486
|
async function load(plugin, options, file) {
|
|
487
487
|
try {
|
|
488
488
|
if (null == options || 0 === Object.keys(options).length) return await req(plugin, file);
|
|
@@ -498,7 +498,7 @@ __webpack_require__.add({
|
|
|
498
498
|
}), list;
|
|
499
499
|
};
|
|
500
500
|
},
|
|
501
|
-
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
501
|
+
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.23/node_modules/postcss-load-config/src/req.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
502
502
|
let tsx, jiti, { createRequire } = __webpack_require__("node:module?f56b"), { pathToFileURL } = __webpack_require__("node:url?5295"), TS_EXT_RE = /\.[mc]?ts$/, importError = [];
|
|
503
503
|
module.exports = async function req(name, rootFile = __rspack_import_meta_filename__) {
|
|
504
504
|
let url = createRequire(rootFile).resolve(name);
|
|
@@ -3407,7 +3407,7 @@ function createPublicContext(context) {
|
|
|
3407
3407
|
async function createContext(options, userConfig, logger, loadConfigResult) {
|
|
3408
3408
|
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, hooks = initHooks();
|
|
3409
3409
|
return {
|
|
3410
|
-
version: "2.1.
|
|
3410
|
+
version: "2.1.9",
|
|
3411
3411
|
rootPath,
|
|
3412
3412
|
configFile: loadConfigResult?.filePath ?? userConfig._privateMeta?.configFilePath,
|
|
3413
3413
|
configFileDependencies: loadConfigResult?.dependencies ?? userConfig._privateMeta?.configFileDependencies ?? [],
|
|
@@ -3507,7 +3507,6 @@ function stringifyConfig(config, verbose) {
|
|
|
3507
3507
|
});
|
|
3508
3508
|
}
|
|
3509
3509
|
async function inspectConfig_inspectConfig({ context, pluginManager, bundlerConfigs, inspectOptions = {} }) {
|
|
3510
|
-
inspectOptions.mode ? setNodeEnv(inspectOptions.mode) : process.env.NODE_ENV || setNodeEnv('development');
|
|
3511
3510
|
let stringifiedBundlerConfigs = bundlerConfigs.map((config, index)=>({
|
|
3512
3511
|
name: config.name || String(index),
|
|
3513
3512
|
content: stringifyConfig(config, inspectOptions.verbose)
|
|
@@ -5029,7 +5028,7 @@ function parseMinifyOptions(config) {
|
|
|
5029
5028
|
cssOptions: minify.cssOptions
|
|
5030
5029
|
};
|
|
5031
5030
|
}
|
|
5032
|
-
let postcss_load_config_src = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
5031
|
+
let postcss_load_config_src = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.23/node_modules/postcss-load-config/src/index.js");
|
|
5033
5032
|
var postcss_load_config_src_default = __webpack_require__.n(postcss_load_config_src);
|
|
5034
5033
|
async function getLightningCSSLoaderOptions(config, targets, minify) {
|
|
5035
5034
|
let userOptions = 'object' == typeof config.tools.lightningcssLoader ? config.tools.lightningcssLoader : {}, initialOptions = {
|
|
@@ -9572,7 +9571,7 @@ try {
|
|
|
9572
9571
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
|
|
9573
9572
|
let { output: { manifest }, dev: { writeToDisk } } = environment.config;
|
|
9574
9573
|
if (!1 === manifest) return;
|
|
9575
|
-
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.
|
|
9574
|
+
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.7/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
|
|
9576
9575
|
manifestFilenames.set(environment.name, manifestOptions.filename);
|
|
9577
9576
|
let pluginOptions = {
|
|
9578
9577
|
fileName: manifestOptions.filename,
|
|
@@ -9776,8 +9775,8 @@ async function createRsbuild(options = {}) {
|
|
|
9776
9775
|
cwd: options.cwd,
|
|
9777
9776
|
...'boolean' == typeof options.loadEnv ? {} : options.loadEnv
|
|
9778
9777
|
}) : null, configOrFactory = options.config ?? options.rsbuildConfig, config = isFunction(configOrFactory) ? await configOrFactory() : configOrFactory;
|
|
9779
|
-
isLoadConfigResult(config) && (loadConfigResult = config, config = config.content);
|
|
9780
|
-
let logger =
|
|
9778
|
+
isLoadConfigResult(config) && (loadConfigResult = config, config = config.content), config ||= {};
|
|
9779
|
+
let logger = config.customLogger ?? logger_createLogger({
|
|
9781
9780
|
...src_logger.options,
|
|
9782
9781
|
level: src_logger.level
|
|
9783
9782
|
});
|
|
@@ -9839,10 +9838,10 @@ async function createRsbuild(options = {}) {
|
|
|
9839
9838
|
pluginManager,
|
|
9840
9839
|
rsbuildOptions: resolvedOptions
|
|
9841
9840
|
}, createCompiler, config, options);
|
|
9842
|
-
}, initAction = ()=>{
|
|
9843
|
-
context.action || (context.action = 'development' ===
|
|
9844
|
-
}, inspectConfig = async (inspectOptions)=>{
|
|
9845
|
-
initAction();
|
|
9841
|
+
}, initAction = (mode = config.mode)=>{
|
|
9842
|
+
context.action || (context.action = 'development' === mode ? 'dev' : 'build');
|
|
9843
|
+
}, inspectConfig = async (inspectOptions = {})=>{
|
|
9844
|
+
inspectOptions.mode ? setNodeEnv(inspectOptions.mode) : process.env.NODE_ENV || setNodeEnv('development'), initAction(config.mode ?? (process.env.NODE_ENV || ''));
|
|
9846
9845
|
let { rspackConfigs } = await initConfigs_initConfigs({
|
|
9847
9846
|
context,
|
|
9848
9847
|
pluginManager,
|
|
@@ -10115,7 +10114,7 @@ let applyServerOptions = (command)=>{
|
|
|
10115
10114
|
};
|
|
10116
10115
|
function setupCommands(argv) {
|
|
10117
10116
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
10118
|
-
cli.version("2.1.
|
|
10117
|
+
cli.version("2.1.9"), 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)', {
|
|
10119
10118
|
default: 'auto'
|
|
10120
10119
|
}).option('--dist-path <dir>', 'Set the root directory of output files').option('--source-map', 'Enable source map').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', {
|
|
10121
10120
|
type: [
|
|
@@ -10180,7 +10179,7 @@ function setupCommands(argv) {
|
|
|
10180
10179
|
}
|
|
10181
10180
|
function showGreeting() {
|
|
10182
10181
|
let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
|
|
10183
|
-
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.1.
|
|
10182
|
+
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.1.9\n`);
|
|
10184
10183
|
}
|
|
10185
10184
|
function setupLogLevel(argv) {
|
|
10186
10185
|
if (argv.length <= 3) return;
|
|
@@ -10202,5 +10201,5 @@ function runCLI({ argv = process.argv } = {}) {
|
|
|
10202
10201
|
src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err), process.exit(1);
|
|
10203
10202
|
}
|
|
10204
10203
|
}
|
|
10205
|
-
let src_version = "2.1.
|
|
10204
|
+
let src_version = "2.1.9";
|
|
10206
10205
|
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, mrmime_lookup, runCLI, src_logger as logger, src_version as version };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js");e.exports=(e,t,o)=>("function"==typeof e&&(o=e,e=void 0),"function"==typeof t&&(o=t,t=void 0),t=t||process.cwd(),function(s,r){let a;try{let e=s.url.startsWith("http")?s.url:`http://localhost${s.url}`;a=new URL(e)}catch(e){r.statusCode=500,r.end("launch-editor-middleware: invalid URL.");return}let p=a.searchParams.get("file");p?(i(p.startsWith("file://")?p:n.resolve(t,p),e,o),r.end()):(r.statusCode=500,r.end('launch-editor-middleware: required query param "file" is missing.'))})},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"(e){e.exports={atom:"atom",Brackets:"brackets","code-insiders":"code-insiders",code:"code",vscodium:"vscodium",codium:"codium",cursor:"cursor",trae:"trae",antigravity:"antigravity",emacs:"emacs",gvim:"gvim",idea:"idea","idea.sh":"idea",phpstorm:"phpstorm","phpstorm.sh":"phpstorm",pycharm:"pycharm","pycharm.sh":"pycharm",rubymine:"rubymine","rubymine.sh":"rubymine",sublime_text:"subl",vim:"vim",webstorm:"webstorm","webstorm.sh":"webstorm",goland:"goland","goland.sh":"goland",rider:"rider","rider.sh":"rider",zed:"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"(e){e.exports={"/Applications/Atom.app/Contents/MacOS/Atom":"atom","/Applications/Atom Beta.app/Contents/MacOS/Atom Beta":"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta","/Applications/Brackets.app/Contents/MacOS/Brackets":"brackets","/Applications/Sublime Text.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text.app/Contents/MacOS/sublime_text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2":"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl","/Applications/Visual Studio Code.app/Contents/MacOS/Code":"code","/Applications/Visual Studio Code.app/Contents/MacOS/Electron":"code","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders":"code-insiders","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron":"code-insiders","/Applications/VSCodium.app/Contents/MacOS/Electron":"codium","/Applications/Cursor.app/Contents/MacOS/Cursor":"cursor","/Applications/Trae.app/Contents/MacOS/Electron":"trae","/Applications/Antigravity.app/Contents/MacOS/Electron":"antigravity","/Applications/AppCode.app/Contents/MacOS/appcode":"/Applications/AppCode.app/Contents/MacOS/appcode","/Applications/CLion.app/Contents/MacOS/clion":"/Applications/CLion.app/Contents/MacOS/clion","/Applications/IntelliJ IDEA.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea","/Applications/PhpStorm.app/Contents/MacOS/phpstorm":"/Applications/PhpStorm.app/Contents/MacOS/phpstorm","/Applications/PyCharm.app/Contents/MacOS/pycharm":"/Applications/PyCharm.app/Contents/MacOS/pycharm","/Applications/PyCharm CE.app/Contents/MacOS/pycharm":"/Applications/PyCharm CE.app/Contents/MacOS/pycharm","/Applications/RubyMine.app/Contents/MacOS/rubymine":"/Applications/RubyMine.app/Contents/MacOS/rubymine","/Applications/WebStorm.app/Contents/MacOS/webstorm":"/Applications/WebStorm.app/Contents/MacOS/webstorm","/Applications/MacVim.app/Contents/MacOS/MacVim":"mvim","/Applications/GoLand.app/Contents/MacOS/goland":"/Applications/GoLand.app/Contents/MacOS/goland","/Applications/Rider.app/Contents/MacOS/rider":"/Applications/Rider.app/Contents/MacOS/rider","/Applications/Zed.app/Contents/MacOS/zed":"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js"(e){e.exports=["Brackets.exe","Code.exe","Code - Insiders.exe","VSCodium.exe","Cursor.exe","atom.exe","sublime_text.exe","notepad++.exe","clion.exe","clion64.exe","idea.exe","idea64.exe","phpstorm.exe","phpstorm64.exe","pycharm.exe","pycharm64.exe","rubymine.exe","rubymine64.exe","webstorm.exe","webstorm64.exe","goland.exe","goland64.exe","rider.exe","rider64.exe","Trae.exe","zed.exe","Antigravity.exe"]},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"(e,t,o){let n=o("path?37f5");e.exports=function(e,t,o,i=1){switch(n.basename(e).replace(/\.(exe|cmd|bat)$/i,"")){case"atom":case"Atom":case"Atom Beta":case"subl":case"sublime":case"sublime_text":case"wstorm":case"charm":case"zed":return[`${t}:${o}:${i}`];case"notepad++":return["-n"+o,"-c"+i,t];case"vim":case"mvim":return[`+call cursor(${o}, ${i})`,t];case"joe":case"gvim":return[`+${o}`,t];case"emacs":case"emacsclient":return[`+${o}:${i}`,t];case"rmate":case"mate":case"mine":return["--line",o,t];case"code":case"Code":case"code-insiders":case"Code - Insiders":case"codium":case"trae":case"antigravity":case"cursor":case"vscodium":case"VSCodium":return["-r","-g",`${t}:${o}:${i}`];case"appcode":case"clion":case"clion64":case"idea":case"idea64":case"phpstorm":case"phpstorm64":case"pycharm":case"pycharm64":case"rubymine":case"rubymine64":case"webstorm":case"webstorm64":case"goland":case"goland64":case"rider":case"rider64":return["--line",o,"--column",i,t]}return process.env.LAUNCH_EDITOR?[t,o,i]:[t]}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js"),s=o("child_process"),r=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"),a=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js");function c(e){let t=Object.keys(r),o=e.split("\n");for(let n=0;n<t.length;n++){let i=t[n];if(o.includes(i))return r[i];let s=i.replace("/Applications","");if(-1!==e.indexOf(s)){if(i!==r[i])return r[i];let e=o.find(e=>e.endsWith(s));if(void 0!==e)return e}}}function l(e){let t=e.split("\r\n");for(let e=0;e<t.length;e++){let o=t[e].trim(),i=n.win32.basename(o);if(-1!==p.indexOf(i))return o}}function d(e){let t=Object.keys(a);for(let o=0;o<t.length;o++){let n=t[o];if(-1!==e.indexOf(n))return a[n]}}e.exports=function(e){if(e)return i.parse(e);if(process.env.LAUNCH_EDITOR)return[process.env.LAUNCH_EDITOR];if(process.versions.webcontainer)return[process.env.EDITOR||"code"];try{if("darwin"===process.platform){let e=s.execSync("ps x -o comm=",{stdio:["pipe","pipe","ignore"]}).toString(),t=c(e);if(void 0!==t)return[t]}else if("win32"===process.platform){let e=s.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"',{stdio:["pipe","pipe","ignore"]}).toString(),t=l(e);if(void 0!==t)return[t]}else if("linux"===process.platform){let e=s.execSync("ps x --no-heading -o comm --sort=comm",{stdio:["pipe","pipe","ignore"]}).toString(),t=d(e);if(void 0!==t)return[t]}}catch(e){}return process.env.VISUAL?[process.env.VISUAL]:process.env.EDITOR?[process.env.EDITOR]:[null]},e.exports.getEditorFromMacProcesses=c,e.exports.getEditorFromWindowsProcesses=l,e.exports.getEditorFromLinuxProcesses=d},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js"(e,t,o){let n=o("fs?cdbd"),i=o("os"),s=o("path?37f5"),r=o("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"),a=o("child_process"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"),c=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"),l=/:(\d+)(:(\d+))?$/,d=null;e.exports=function(e,t,m){var u,x;let b,h,f=((u=e).startsWith("file://")&&(u=o("url?5f07").fileURLToPath(u)),b=u.replace(l,""),{fileName:b,lineNumber:(h=u.match(l))&&h[1],columnNumber:h&&h[3]}),{fileName:g}=f,{lineNumber:C,columnNumber:S}=f;if("win32"===process.platform&&s.resolve(g).startsWith("\\\\"))return m(g,"UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");if(!n.existsSync(g))return;"function"==typeof t&&(m=t,t=void 0),x=m,m=(e,t)=>{console.log(),console.log(r.red("Could not open "+s.basename(e)+" in the editor.")),t&&("."!==t[t.length-1]&&(t+="."),console.log(r.red("The editor process exited with an error: "+t))),console.log(),x&&x(e,t)};let[A,...y]=p(t);if(!A)return void m(g,null);if("linux"===process.platform&&g.startsWith("/mnt/")&&/Microsoft/i.test(i.release())&&(g=s.relative("",g)),C){let e=c(A,g,C,S);y.push.apply(y,e)}else y.push(g);if(d&&function(e){switch(e){case"vim":case"emacs":case"nano":return!0}return!1}(A)&&d.kill("SIGKILL"),"win32"===process.platform){let e=[A,...y.map(function(e){return e.replace(/([&|<>,;=^])/g,"^$1")})].map(function(e){return e.includes("^")?`^"${e}^"`:e.includes(" ")?`"${e}"`:e}).join(" ");d=a.exec(e,{stdio:"inherit",shell:!0})}else d=a.spawn(A,y,{stdio:"inherit"});d.on("exit",function(e){d=null,e&&m(g,"(code "+e+")")}),d.on("error",function(e){let{code:t,message:o}=e;"ENOENT"===t&&(o=`${o} ('${A}' command does not exist in 'PATH')`),m(g,o)})}},"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(e){let t=process||{},o=t.argv||[],n=t.env||{},i=!(n.NO_COLOR||o.includes("--no-color"))&&(!!n.FORCE_COLOR||o.includes("--color")||"win32"===t.platform||(t.stdout||{}).isTTY&&"dumb"!==n.TERM||!!n.CI),s=(e,t,o=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+r(i,t,o,s)+t:e+i+t},r=(e,t,o,n)=>{let i="",s=0;do i+=e.substring(s,n)+o,s=n+t.length,n=e.indexOf(t,s);while(~n);return i+e.substring(s)},a=(e=i)=>{let t=e?s:()=>String;return{isColorSupported:e,reset:t("\x1b[0m","\x1b[0m"),bold:t("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m"),dim:t("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),italic:t("\x1b[3m","\x1b[23m"),underline:t("\x1b[4m","\x1b[24m"),inverse:t("\x1b[7m","\x1b[27m"),hidden:t("\x1b[8m","\x1b[28m"),strikethrough:t("\x1b[9m","\x1b[29m"),black:t("\x1b[30m","\x1b[39m"),red:t("\x1b[31m","\x1b[39m"),green:t("\x1b[32m","\x1b[39m"),yellow:t("\x1b[33m","\x1b[39m"),blue:t("\x1b[34m","\x1b[39m"),magenta:t("\x1b[35m","\x1b[39m"),cyan:t("\x1b[36m","\x1b[39m"),white:t("\x1b[37m","\x1b[39m"),gray:t("\x1b[90m","\x1b[39m"),bgBlack:t("\x1b[40m","\x1b[49m"),bgRed:t("\x1b[41m","\x1b[49m"),bgGreen:t("\x1b[42m","\x1b[49m"),bgYellow:t("\x1b[43m","\x1b[49m"),bgBlue:t("\x1b[44m","\x1b[49m"),bgMagenta:t("\x1b[45m","\x1b[49m"),bgCyan:t("\x1b[46m","\x1b[49m"),bgWhite:t("\x1b[47m","\x1b[49m"),blackBright:t("\x1b[90m","\x1b[39m"),redBright:t("\x1b[91m","\x1b[39m"),greenBright:t("\x1b[92m","\x1b[39m"),yellowBright:t("\x1b[93m","\x1b[39m"),blueBright:t("\x1b[94m","\x1b[39m"),magentaBright:t("\x1b[95m","\x1b[39m"),cyanBright:t("\x1b[96m","\x1b[39m"),whiteBright:t("\x1b[97m","\x1b[39m"),bgBlackBright:t("\x1b[100m","\x1b[49m"),bgRedBright:t("\x1b[101m","\x1b[49m"),bgGreenBright:t("\x1b[102m","\x1b[49m"),bgYellowBright:t("\x1b[103m","\x1b[49m"),bgBlueBright:t("\x1b[104m","\x1b[49m"),bgMagentaBright:t("\x1b[105m","\x1b[49m"),bgCyanBright:t("\x1b[106m","\x1b[49m"),bgWhiteBright:t("\x1b[107m","\x1b[49m")}};e.exports=a(),e.exports.createColors=a},"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js"(e,t,o){o("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js"),t.parse=o("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js")},"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js"(e){for(var t="(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])",o=RegExp("^"+t+"$"),n="|&;()<> \\t",i=/^#$/,s="",r=0;r<4;r++)s+=(0x100000000*Math.random()).toString(16);var a=RegExp("^"+s);e.exports=function(e,r,p){var c=function(e,r,a){a||(a={});var p=a.escape||"\\",c=function(e,t){for(var o,n=t.lastIndex,i=[];o=t.exec(e);)i.push(o),t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,i}(e,RegExp(["("+t+")","("+("(\\"+p+"['\""+n+"]|[^\\s'\""+n)+"])+|\"((\\\\\"|[^\"])*?)\"|'((\\\\'|[^'])*?)')+"].join("|"),"g"));if(0===c.length)return[];r||(r={});var l=!1;return c.map(function(t){var n,a=t[0];if(a&&!l){if(o.test(a))return{op:a};var c=!1,d=!1,m="",u=!1;for(n=0;n<a.length;n++){var x=a.charAt(n);if(u=u||!c&&("*"===x||"?"===x),d)m+=x,d=!1;else if(c)x===c?c=!1:"'"==c?m+=x:x===p?(n+=1,'"'===(x=a.charAt(n))||x===p||"$"===x?m+=x:m+=p+x):"$"===x?m+=h():m+=x;else if('"'===x||"'"===x)c=x;else if(o.test(x))return{op:a};else if(i.test(x)){l=!0;var b={comment:e.slice(t.index+n+1)};if(m.length)return[m,b];return[b]}else x===p?d=!0:"$"===x?m+=h():m+=x}return u?{op:"glob",pattern:m}:m}function h(){n+=1;var e,t,o,i,p,c=a.charAt(n);if("{"===c){if(n+=1,"}"===a.charAt(n))throw Error("Bad substitution: "+a.slice(n-2,n+1));if((i=a.indexOf("}",n))<0)throw Error("Bad substitution: "+a.slice(n));p=a.slice(n,i),n=i}else if(/[*@#?$!_-]/.test(c))p=c,n+=1;else{var l=a.slice(n);(i=l.match(/[^\w\d_]/))?(p=l.slice(0,i.index),n+=i.index-1):(p=l,n=a.length)}return e=r,t=p,(void 0===(o="function"==typeof e?e(t):e[t])&&""!=t?o="":void 0===o&&(o="$"),"object"==typeof o)?""+s+JSON.stringify(o)+s:""+o}}).reduce(function(e,t){return void 0===t?e:e.concat(t)},[])}(e,r,p);return"function"!=typeof r?c:c.reduce(function(e,t){if("object"==typeof t)return e.concat(t);var o=t.split(RegExp("("+s+".*?"+s+")","g"));return 1===o.length?e.concat(o[0]):e.concat(o.filter(Boolean).map(function(e){return a.test(e)?JSON.parse(e.split(s)[1]):e}))},[])}},"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js"(e){var t=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],o=/[\n\r\u2028\u2029]/,n=/[\s#!"$&'():;<=>@\\^`|]/g;e.exports=function(e){return e.map(function(e){if(""===e)return"''";if(e&&"object"==typeof e){if("glob"===e.op){if("string"!=typeof e.pattern)throw TypeError("glob token requires a string `pattern`");if(o.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(n,"\\$&")}if("string"==typeof e.op){if(0>t.indexOf(e.op))throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,"\\$&")}if("string"==typeof e.comment){if(o.test(e.comment))throw TypeError("`comment` must not contain line terminators");return"#"+e.comment}throw TypeError("unrecognized object token shape")}return/["\s\\]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,"$1\\$2")}).join(" ")}}}),e("../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js");
|
|
1
|
+
import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js");e.exports=(e,t,o)=>("function"==typeof e&&(o=e,e=void 0),"function"==typeof t&&(o=t,t=void 0),t=t||process.cwd(),function(r,s){let a;try{let e=r.url.startsWith("http")?r.url:`http://localhost${r.url}`;a=new URL(e)}catch(e){s.statusCode=500,s.end("launch-editor-middleware: invalid URL.");return}let p=a.searchParams.get("file");p?(i(p.startsWith("file://")?p:n.resolve(t,p),e,o),s.end()):(s.statusCode=500,s.end('launch-editor-middleware: required query param "file" is missing.'))})},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"(e){e.exports={atom:"atom",Brackets:"brackets","code-insiders":"code-insiders",code:"code",vscodium:"vscodium",codium:"codium",cursor:"cursor",trae:"trae",antigravity:"antigravity",emacs:"emacs",gvim:"gvim",idea:"idea","idea.sh":"idea",phpstorm:"phpstorm","phpstorm.sh":"phpstorm",pycharm:"pycharm","pycharm.sh":"pycharm",rubymine:"rubymine","rubymine.sh":"rubymine",sublime_text:"subl",vim:"vim",webstorm:"webstorm","webstorm.sh":"webstorm",goland:"goland","goland.sh":"goland",rider:"rider","rider.sh":"rider",zed:"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"(e){e.exports={"/Applications/Atom.app/Contents/MacOS/Atom":"atom","/Applications/Atom Beta.app/Contents/MacOS/Atom Beta":"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta","/Applications/Brackets.app/Contents/MacOS/Brackets":"brackets","/Applications/Sublime Text.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text.app/Contents/MacOS/sublime_text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2":"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl","/Applications/Visual Studio Code.app/Contents/MacOS/Code":"code","/Applications/Visual Studio Code.app/Contents/MacOS/Electron":"code","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders":"code-insiders","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron":"code-insiders","/Applications/VSCodium.app/Contents/MacOS/Electron":"codium","/Applications/Cursor.app/Contents/MacOS/Cursor":"cursor","/Applications/Trae.app/Contents/MacOS/Electron":"trae","/Applications/Antigravity.app/Contents/MacOS/Electron":"antigravity","/Applications/AppCode.app/Contents/MacOS/appcode":"/Applications/AppCode.app/Contents/MacOS/appcode","/Applications/CLion.app/Contents/MacOS/clion":"/Applications/CLion.app/Contents/MacOS/clion","/Applications/IntelliJ IDEA.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea","/Applications/PhpStorm.app/Contents/MacOS/phpstorm":"/Applications/PhpStorm.app/Contents/MacOS/phpstorm","/Applications/PyCharm.app/Contents/MacOS/pycharm":"/Applications/PyCharm.app/Contents/MacOS/pycharm","/Applications/PyCharm CE.app/Contents/MacOS/pycharm":"/Applications/PyCharm CE.app/Contents/MacOS/pycharm","/Applications/RubyMine.app/Contents/MacOS/rubymine":"/Applications/RubyMine.app/Contents/MacOS/rubymine","/Applications/WebStorm.app/Contents/MacOS/webstorm":"/Applications/WebStorm.app/Contents/MacOS/webstorm","/Applications/MacVim.app/Contents/MacOS/MacVim":"mvim","/Applications/GoLand.app/Contents/MacOS/goland":"/Applications/GoLand.app/Contents/MacOS/goland","/Applications/Rider.app/Contents/MacOS/rider":"/Applications/Rider.app/Contents/MacOS/rider","/Applications/Zed.app/Contents/MacOS/zed":"zed"}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js"(e){e.exports=["Brackets.exe","Code.exe","Code - Insiders.exe","VSCodium.exe","Cursor.exe","atom.exe","sublime_text.exe","notepad++.exe","clion.exe","clion64.exe","idea.exe","idea64.exe","phpstorm.exe","phpstorm64.exe","pycharm.exe","pycharm64.exe","rubymine.exe","rubymine64.exe","webstorm.exe","webstorm64.exe","goland.exe","goland64.exe","rider.exe","rider64.exe","Trae.exe","zed.exe","Antigravity.exe"]},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"(e,t,o){let n=o("path?37f5");e.exports=function(e,t,o,i=1){switch(n.basename(e).replace(/\.(exe|cmd|bat)$/i,"")){case"atom":case"Atom":case"Atom Beta":case"subl":case"sublime":case"sublime_text":case"wstorm":case"charm":case"zed":return[`${t}:${o}:${i}`];case"notepad++":return["-n"+o,"-c"+i,t];case"vim":case"mvim":return[`+call cursor(${o}, ${i})`,t];case"joe":case"gvim":return[`+${o}`,t];case"emacs":case"emacsclient":return[`+${o}:${i}`,t];case"rmate":case"mate":case"mine":return["--line",o,t];case"code":case"Code":case"code-insiders":case"Code - Insiders":case"codium":case"trae":case"antigravity":case"cursor":case"vscodium":case"VSCodium":return["-r","-g",`${t}:${o}:${i}`];case"appcode":case"clion":case"clion64":case"idea":case"idea64":case"phpstorm":case"phpstorm64":case"pycharm":case"pycharm64":case"rubymine":case"rubymine64":case"webstorm":case"webstorm64":case"goland":case"goland64":case"rider":case"rider64":return["--line",o,"--column",i,t]}return process.env.LAUNCH_EDITOR?[t,o,i]:[t]}},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"(e,t,o){let n=o("path?37f5"),i=o("../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/index.js"),r=o("child_process"),s=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/macos.js"),a=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/windows.js");function l(e){let t=Object.keys(s),o=e.split("\n");for(let n=0;n<t.length;n++){let i=t[n];if(o.includes(i))return s[i];let r=i.replace("/Applications","");if(-1!==e.indexOf(r)){if(i!==s[i])return s[i];let e=o.find(e=>e.endsWith(r));if(void 0!==e)return e}}}function c(e){let t=e.split("\r\n");for(let e=0;e<t.length;e++){let o=t[e].trim(),i=n.win32.basename(o);if(-1!==p.indexOf(i))return o}}function d(e){let t=Object.keys(a);for(let o=0;o<t.length;o++){let n=t[o];if(-1!==e.indexOf(n))return a[n]}}e.exports=function(e){if(e)return i.parse(e);if(process.env.LAUNCH_EDITOR)return[process.env.LAUNCH_EDITOR];if(process.versions.webcontainer)return[process.env.EDITOR||"code"];try{if("darwin"===process.platform){let e=r.execSync("ps x -o comm=",{stdio:["pipe","pipe","ignore"]}).toString(),t=l(e);if(void 0!==t)return[t]}else if("win32"===process.platform){let e=r.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"',{stdio:["pipe","pipe","ignore"]}).toString(),t=c(e);if(void 0!==t)return[t]}else if("linux"===process.platform){let e=r.execSync("ps x --no-heading -o comm --sort=comm",{stdio:["pipe","pipe","ignore"]}).toString(),t=d(e);if(void 0!==t)return[t]}}catch(e){}return process.env.VISUAL?[process.env.VISUAL]:process.env.EDITOR?[process.env.EDITOR]:[null]},e.exports.getEditorFromMacProcesses=l,e.exports.getEditorFromWindowsProcesses=c,e.exports.getEditorFromLinuxProcesses=d},"../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js"(e,t,o){let n=o("fs?cdbd"),i=o("os"),r=o("path?37f5"),s=o("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"),a=o("child_process"),p=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/guess.js"),l=o("../../node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/get-args.js"),c=/:(\d+)(:(\d+))?$/,d=null;e.exports=function(e,t,m){var u,h;let x,b,f=((u=e).startsWith("file://")&&(u=o("url?5f07").fileURLToPath(u)),x=u.replace(c,""),{fileName:x,lineNumber:(b=u.match(c))&&b[1],columnNumber:b&&b[3]}),{fileName:g}=f,{lineNumber:C,columnNumber:S}=f;if("win32"===process.platform&&r.resolve(g).startsWith("\\\\"))return m(g,"UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");if(!n.existsSync(g))return;"function"==typeof t&&(m=t,t=void 0),h=m,m=(e,t)=>{console.log(),console.log(s.red("Could not open "+r.basename(e)+" in the editor.")),t&&("."!==t[t.length-1]&&(t+="."),console.log(s.red("The editor process exited with an error: "+t))),console.log(),h&&h(e,t)};let[A,...y]=p(t);if(!A)return void m(g,null);if("linux"===process.platform&&g.startsWith("/mnt/")&&/Microsoft/i.test(i.release())&&(g=r.relative("",g)),C){let e=l(A,g,C,S);y.push.apply(y,e)}else y.push(g);if(d&&function(e){switch(e){case"vim":case"emacs":case"nano":return!0}return!1}(A)&&d.kill("SIGKILL"),"win32"===process.platform){let e=[A,...y.map(function(e){return e.replace(/([&|<>,;=^])/g,"^$1")})].map(function(e){return e.includes("^")?`^"${e}^"`:e.includes(" ")?`"${e}"`:e}).join(" ");d=a.exec(e,{stdio:"inherit",shell:!0})}else d=a.spawn(A,y,{stdio:"inherit"});d.on("exit",function(e){d=null,e&&m(g,"(code "+e+")")}),d.on("error",function(e){let{code:t,message:o}=e;"ENOENT"===t&&(o=`${o} ('${A}' command does not exist in 'PATH')`),m(g,o)})}},"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(e){let t=process||{},o=t.argv||[],n=t.env||{},i=!(n.NO_COLOR||o.includes("--no-color"))&&(!!n.FORCE_COLOR||o.includes("--color")||"win32"===t.platform||(t.stdout||{}).isTTY&&"dumb"!==n.TERM||!!n.CI),r=(e,t,o=e)=>n=>{let i=""+n,r=i.indexOf(t,e.length);return~r?e+s(i,t,o,r)+t:e+i+t},s=(e,t,o,n)=>{let i="",r=0;do i+=e.substring(r,n)+o,r=n+t.length,n=e.indexOf(t,r);while(~n);return i+e.substring(r)},a=(e=i)=>{let t=e?r:()=>String;return{isColorSupported:e,reset:t("\x1b[0m","\x1b[0m"),bold:t("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m"),dim:t("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),italic:t("\x1b[3m","\x1b[23m"),underline:t("\x1b[4m","\x1b[24m"),inverse:t("\x1b[7m","\x1b[27m"),hidden:t("\x1b[8m","\x1b[28m"),strikethrough:t("\x1b[9m","\x1b[29m"),black:t("\x1b[30m","\x1b[39m"),red:t("\x1b[31m","\x1b[39m"),green:t("\x1b[32m","\x1b[39m"),yellow:t("\x1b[33m","\x1b[39m"),blue:t("\x1b[34m","\x1b[39m"),magenta:t("\x1b[35m","\x1b[39m"),cyan:t("\x1b[36m","\x1b[39m"),white:t("\x1b[37m","\x1b[39m"),gray:t("\x1b[90m","\x1b[39m"),bgBlack:t("\x1b[40m","\x1b[49m"),bgRed:t("\x1b[41m","\x1b[49m"),bgGreen:t("\x1b[42m","\x1b[49m"),bgYellow:t("\x1b[43m","\x1b[49m"),bgBlue:t("\x1b[44m","\x1b[49m"),bgMagenta:t("\x1b[45m","\x1b[49m"),bgCyan:t("\x1b[46m","\x1b[49m"),bgWhite:t("\x1b[47m","\x1b[49m"),blackBright:t("\x1b[90m","\x1b[39m"),redBright:t("\x1b[91m","\x1b[39m"),greenBright:t("\x1b[92m","\x1b[39m"),yellowBright:t("\x1b[93m","\x1b[39m"),blueBright:t("\x1b[94m","\x1b[39m"),magentaBright:t("\x1b[95m","\x1b[39m"),cyanBright:t("\x1b[96m","\x1b[39m"),whiteBright:t("\x1b[97m","\x1b[39m"),bgBlackBright:t("\x1b[100m","\x1b[49m"),bgRedBright:t("\x1b[101m","\x1b[49m"),bgGreenBright:t("\x1b[102m","\x1b[49m"),bgYellowBright:t("\x1b[103m","\x1b[49m"),bgBlueBright:t("\x1b[104m","\x1b[49m"),bgMagentaBright:t("\x1b[105m","\x1b[49m"),bgCyanBright:t("\x1b[106m","\x1b[49m"),bgWhiteBright:t("\x1b[107m","\x1b[49m")}};e.exports=a(),e.exports.createColors=a},"../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/index.js"(e,t,o){o("../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/quote.js"),t.parse=o("../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/parse.js")},"../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/parse.js"(e){for(var t="(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])",o=RegExp("^"+t+"$"),n="|&;()<> \\t",i=/^#$/,r="",s=0;s<4;s++)r+=(0x100000000*Math.random()).toString(16);var a=RegExp("^"+r);e.exports=function(e,s,p){var l=function(e,s,a){a||(a={});var p=a.escape||"\\",l=!0===a.splitUnquoted?" \n":"string"==typeof a.splitUnquoted?a.splitUnquoted:"",c=function(e,t){for(var o,n=t.lastIndex,i=[];o=t.exec(e);)i[i.length]=o,t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,i}(e,RegExp(["("+t+")","("+("(\\"+p+"['\""+n+"]|[^\\s'\""+n)+'])+|"((\\\\"|[^"])*?)"|\'([^\']*?)\')+'].join("|"),"g"));if(0===c.length)return[];s||(s={});var d=!1;return c.map(function(t){var n,a=t[0];if(a&&!d){if(o.test(a))return{op:a};var c=!1,m=!1,u="",h=[],x=!1,b=null,f=!1;for(n=0;n<a.length;n++){var g=a.charAt(n);if(l&&"$"!==g&&O(),f=f||!c&&("*"===g||"?"===g),m)u+=g,m=!1;else if(c)g===c?c=!1:"'"==c?u+=g:g===p?(n+=1,'"'===(g=a.charAt(n))||g===p||"$"===g?u+=g:u+=p+g):"$"===g?u+=_():u+=g;else if('"'===g||"'"===g)c=g,x=!0;else if(o.test(g))return{op:a};else if(i.test(g)){d=!0;var C={comment:e.slice(t.index+n+1)};if(u.length)return[u,C];return[C]}else if(g===p)m=!0;else if("$"===g){var S=_();if(l)for(var A=0;A<S.length;A+=1){var y=S.charAt(A);0>l.indexOf(y)?(O(),u+=y):null===b?b=+(" "!==y&&" "!==y&&"\n"!==y):" "!==y&&" "!==y&&"\n"!==y&&(b+=1)}else u+=S}else u+=g}if(f)return{op:"glob",pattern:u};if(l){if(null!==b&&b>0){h[h.length]=u,u="";for(var v=1;v<b;v+=1)h[h.length]=""}return(""!==u||x&&0===h.length)&&(h[h.length]=u),h}return u}function _(){n+=1;var e,t,o,i,p,l=a.charAt(n);if("{"===l){if(n+=1,"}"===a.charAt(n))throw Error("Bad substitution: "+a.slice(n-2,n+1));var c=1;for(i=n;c>0&&i<a.length;)"{"===a.charAt(i)&&"$"===a.charAt(i-1)?c+=1:"}"===a.charAt(i)&&(c-=1),i+=1;if(0!==c)throw Error("Bad substitution: "+a.slice(n));i-=1,p=a.slice(n,i),n=i}else if(/[*@#?$!_-]/.test(l))p=l,n+=1;else{var d=a.slice(n);(i=d.match(/[^\w\d_]/))?(p=d.slice(0,i.index),n+=i.index-1):(p=d,n=a.length)}return e=s,t=p,(void 0===(o="function"==typeof e?e(t):e[t])&&""!=t?o="":void 0===o&&(o="$"),"object"==typeof o)?""+r+JSON.stringify(o)+r:""+o}function O(){if(null!==b){if(0===b)""!==u&&(h[h.length]=u,u="");else{h[h.length]=u,u="";for(var e=1;e<b;e+=1)h[h.length]=""}b=null}}}).reduce(function(e,t){return void 0===t||[].concat(t).forEach(function(t){e[e.length]=t}),e},[])}(e,s,p);return"function"!=typeof s?l:l.reduce(function(e,t){if("object"==typeof t)return e[e.length]=t,e;var o=t.split(RegExp("("+r+".*?"+r+")","g"));return 1===o.length?e[e.length]=o[0]:o.filter(Boolean).forEach(function(t){e[e.length]=a.test(t)?JSON.parse(t.split(r)[1]):t}),e},[])}},"../../node_modules/.pnpm/shell-quote@1.10.0/node_modules/shell-quote/quote.js"(e){var t=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],o=/[\n\r\u2028\u2029]/,n=/[\s#!"$&'():;<=>@\\^`|]/g;e.exports=function(e){return e.map(function(e){if(""===e)return"''";if(e&&"object"==typeof e){if("op"in e&&"glob"===e.op){if("string"!=typeof e.pattern)throw TypeError("glob token requires a string `pattern`");if(o.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(n,"\\$&")}if("op"in e&&"string"==typeof e.op){if(0>t.indexOf(e.op))throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,"\\$&")}if("comment"in e&&"string"==typeof e.comment){if(o.test(e.comment))throw TypeError("`comment` must not contain line terminators");return"#"+e.comment}throw TypeError("unrecognized object token shape")}return/["\s\\]/.test(e)&&!/'/.test(e)?"'"+e.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(e)?'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"':String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")}}}),e("../../node_modules/.pnpm/launch-editor-middleware@2.14.1/node_modules/launch-editor-middleware/index.js");
|
package/dist/manifest-plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/helpers.js"(e,t,s){t.transformFiles=t.reduceChunk=t.reduceAssets=t.generateManifest=void 0;let r=s("node:path?815c");t.generateManifest=(e,t,{generate:s,seed:r={}})=>s?s(r,t,Array.from(e.entrypoints.entries()).reduce((e,[t,s])=>Object.assign(e,{[t]:s.getFiles()}),{}),{compilation:e}):t.reduce((e,t)=>Object.assign(e,{[t.name]:t.path}),r),t.reduceAssets=(e,t,s)=>{let n;return(s[t.name]?n=s[t.name]:t.info.sourceFilename&&(n=(0,r.join)((0,r.dirname)(t.name),(0,r.basename)(t.info.sourceFilename))),n)?e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:n,path:t.name}):t.chunks&&t.chunks.length>0?e:e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!1,name:t.name,path:t.name})},t.reduceChunk=(e,t,s,n)=>(Array.from(t.auxiliaryFiles||[]).forEach(e=>{n[e]={isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:(0,r.basename)(e),path:e}}),Array.from(t.files).reduce((e,r)=>{let n=t.name?t.name:null;return n=n?s.useEntryKeys&&!r.endsWith(".map")?n:`${n}.${((e,{transformExtensions:t})=>{let s=e.replace(/\?.*/,"").split("."),r=s.pop();return t.test(r)?`${s.pop()}.${r}`:r})(r,s)}`:r,e.concat({chunk:t,isAsset:!1,isChunk:!0,isInitial:t.isOnlyInitial(),isModuleAsset:!1,name:n,path:r})},e));let n=e=>{let t=Object.assign({},e);return t.name=e.name.replace(/\\/g,"/"),t.path=e.path.replace(/\\/g,"/"),t};t.transformFiles=(e,t)=>["filter","map","sort"].filter(e=>!!t[e]).reduce((e,s)=>e[s](t[s]),e).map(n)},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/hooks.js"(e,t,s){t.getCompilerHooks=t.emitHook=t.beforeRunHook=void 0;let r=s("node:fs?31c0"),n=s("node:path?815c"),o=s("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"),a=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/helpers.js"),i=new WeakMap,l=e=>{let t=i.get(e);return void 0===t&&(t={afterEmit:new o.SyncWaterfallHook(["manifest"]),beforeEmit:new o.SyncWaterfallHook(["manifest"])},i.set(e,t)),t};t.getCompilerHooks=l,t.beforeRunHook=({emitCountMap:e,manifestFileName:t},s,r)=>{let n=e.get(t)||0;e.set(t,n+1),r&&r()},t.emitHook=function({compiler:e,emitCountMap:t,manifestAssetId:s,manifestFileName:o,moduleAssets:i,options:p},c){let h=t.get(o)-1,u=c.getStats().toJson({all:!1,assets:!0,cachedAssets:!0,ids:!0,publicPath:!0}),g=null!==p.publicPath?p.publicPath:u.publicPath,f="auto"===g?"":g,{basePath:m,removeKeyHash:d}=p;t.set(o,h);let y={},k=Array.from(c.chunks).reduce((e,t)=>(0,a.reduceChunk)(e,t,p,y),[]);(k=(k=u.assets.reduce((e,t)=>(0,a.reduceAssets)(e,t,i),k)).filter(({name:s,path:r})=>!r.includes("hot-update")&&void 0===t.get((0,n.join)(e.options.output?.path||"<unknown>",s)))).forEach(e=>{delete y[e.path]}),Object.keys(y).forEach(e=>{k=k.concat(y[e])});let S={};u.assets?.forEach(e=>{e.integrity&&(S[e.name]=e.integrity)}),k=k.map(e=>{let t=e=>e.endsWith("/")?e:`${e}/`,s={name:m?t(m)+e.name:e.name,path:f?t(f)+e.path:e.path};return S[e.path]&&(s.integrity=S[e.path]),s.name=d?s.name.replace(d,""):s.name,Object.assign(e,s)}),k=(0,a.transformFiles)(k,p);let _=(0,a.generateManifest)(c,k,p),A=0===h;if(_=l(e).beforeEmit.call(_),A){let t=p.serialize(_);c.emitAsset(s,new e.webpack.sources.RawSource(t)),p.writeToFileEmit&&((0,r.mkdirSync)((0,n.dirname)(o),{recursive:!0}),(0,r.writeFileSync)(o,t))}l(e).afterEmit.call(_)}},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/index.js"(e,t,s){t.RspackManifestPlugin=void 0;let r=s("node:path?815c"),n=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/hooks.js"),o=new Map,a={assetHookStage:1/0,basePath:"",fileName:"manifest.json",filter:null,generate:void 0,map:null,publicPath:null,removeKeyHash:/([a-f0-9]{16,32}\.?)/gi,seed:void 0,serialize:e=>JSON.stringify(e,null,2),sort:null,transformExtensions:/^(gz|map)$/i,useEntryKeys:!1,useLegacyEmit:!1,writeToFileEmit:!1};t.RspackManifestPlugin=class{options;constructor(e){this.options=Object.assign({},a,e)}apply(e){let t=(0,r.resolve)(e.options.output?.path||"./",this.options.fileName),s=(0,r.relative)(e.options.output?.path||"./",t),a=n.beforeRunHook.bind(this,{emitCountMap:o,manifestFileName:t}),i=n.emitHook.bind(this,{compiler:e,emitCountMap:o,manifestAssetId:s,manifestFileName:t,moduleAssets:{},options:this.options}),l={name:"WebpackManifestPlugin",stage:this.options.assetHookStage};!0===this.options.useLegacyEmit?e.hooks.emit.tap(l,i):e.hooks.thisCompilation.tap(l,e=>{e.hooks.processAssets.tap(l,()=>i(e))}),e.hooks.run.tapAsync(l,a),e.hooks.watchRun.tapAsync(l,a)}}},"../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"(e,t){var s={};s.d=(e,t,r)=>{var n=(t,r)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,[r]:t[n]})};n(t,"get"),n(r,"value")},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};function n(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}s.r(r);class o{intercept(e){if(this.interceptors.push(Object.assign({},e)),e.register)for(let t=0;t<this.taps.length;t++)this.taps[t]=e.register(this.taps[t])}_runRegisterInterceptors(e){return this.interceptors.reduce((e,t)=>t.register?.(e)??e,e)}_runCallInterceptors(...e){for(let t of this.interceptors)t.call&&t.call(...e)}_runErrorInterceptors(e){for(let t of this.interceptors)t.error&&t.error(e)}_runTapInterceptors(e){for(let t of this.interceptors)t.tap&&t.tap(e)}_runDoneInterceptors(){for(let e of this.interceptors)e.done&&e.done()}_runResultInterceptors(e){for(let t of this.interceptors)t.result&&t.result(e)}withOptions(e){let t=t=>Object.assign({},e,"string"==typeof t?{name:t}:t);return{name:this.name,tap:(e,s)=>this.tap(t(e),s),tapAsync:(e,s)=>this.tapAsync(t(e),s),tapPromise:(e,s)=>this.tapPromise(t(e),s),intercept:e=>this.intercept(e),isUsed:()=>this.isUsed(),withOptions:e=>this.withOptions(t(e)),queryStageRange:e=>this.queryStageRange(e)}}isUsed(){return this.taps.length>0||this.interceptors.length>0}queryStageRange(e){return new c(e,this)}callAsyncStageRange(e){throw Error("Hook should implement there own _callAsyncStageRange")}callAsync(...e){return this.callAsyncStageRange(this.queryStageRange(l),...e)}promiseStageRange(e,...t){return new Promise((s,r)=>{this.callAsyncStageRange(e,...t,(e,t)=>e?r(e):s(t))})}promise(...e){return this.promiseStageRange(this.queryStageRange(l),...e)}tap(e,t){this._tap("sync",e,t)}tapAsync(e,t){this._tap("async",e,t)}tapPromise(e,t){this._tap("promise",e,t)}_tap(e,t,s){let r=t;if("string"==typeof t)r={name:t.trim()};else if("object"!=typeof t||null===t)throw Error("Invalid tap options");if("string"!=typeof r.name||""===r.name)throw Error("Missing name for tap");this._insert(this._runRegisterInterceptors(Object.assign({type:e,fn:s},r)))}_insert(e){let t;"string"==typeof e.before?t=new Set([e.before]):Array.isArray(e.before)&&(t=new Set(e.before));let s=0;"number"==typeof e.stage&&(s=e.stage);let r=this.taps.length;for(;r>0;){r--;let e=this.taps[r];this.taps[r+1]=e;let n=e.stage||0;if(t){if(t.has(e.name)){t.delete(e.name);continue}if(t.size>0)continue}if(!(n>s)){r++;break}}this.taps[r]=e}_prepareArgs(e){let t=this.args.length;return e.length<t?(e.length=t,e.fill(void 0,e.length,t)):(e.length>t&&(e.length=t),e)}constructor(e=[],t){n(this,"args",void 0),n(this,"name",void 0),n(this,"taps",void 0),n(this,"interceptors",void 0),this.args=e,this.name=t,this.taps=[],this.interceptors=[]}}let a=-1/0,i=1/0,l=[a,1/0],p=0x80000000-1;class c{isUsed(){return!!(this.tapsInRange.length>0||this.stageRange[0]===a&&this.hook.interceptors.some(e=>e.call)||this.stageRange[1]===i&&this.hook.interceptors.some(e=>e.done))}call(...e){if("function"!=typeof this.hook.callStageRange)throw Error("hook is not a SyncHook, call methods only exists on SyncHook");return this.hook.callStageRange(this,...e)}callAsync(...e){return this.hook.callAsyncStageRange(this,...e)}promise(...e){return this.hook.promiseStageRange(this,...e)}constructor(e,t){n(this,"stageRange",void 0),n(this,"hook",void 0),n(this,"tapsInRange",void 0);let s=[],[r,o]=e;for(let e of t.taps){let t=e.stage??0;r<=t&&t<o?s.push(e):o===i&&t===i&&s.push(e)}this.stageRange=e,this.hook=t,this.tapsInRange=s}}class h extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncHook")}}class u extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){let t;this._runTapInterceptors(e);try{t=e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}if(void 0!==t)return this._runResultInterceptors(t),l(null,t)}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncBailHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncBailHook")}}class g extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{let t=e.fn(...p);void 0!==t&&(p[0]=t)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null,p[0]))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncWaterfallHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncWaterfallHook")}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}class f extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=r.length;for(let e of r){if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{0==(c-=1)&&l()},e=>{c=0,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=0,p(e)):0==(c-=1)&&l()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=0,p(e)}t||0!=--c||l()}if(c<=0)return}}}class m extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{(c+=1)===r.length?l():h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=r.length,p(e)):(c+=1)===r.length?l():h()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l():h())}if(c===r.length)return};h()}}class d extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)},c=e=>{this._runResultInterceptors(e),o(null,e)};if(0===r.length)return l();let h=0,u=()=>{let e=r[h];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{h+=1,void 0!==e?c(e):h===r.length?l():u()},e=>{h=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(h=r.length,p(e)):(h+=1,void 0!==t?c(t):h===r.length?l():u())});else{let t,s=!1;try{t=e.fn(...i)}catch(e){s=!0,h=r.length,p(e)}s||(h+=1,void 0!==t?c(t):h===r.length?l():u())}if(h===r.length)return};u()}}class y extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=e=>{this._runResultInterceptors(e),o(null,e)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l(i[0]);let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{c+=1,void 0!==e&&(i[0]=e),c===r.length?l(i[0]):h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(c=r.length,p(e)):(c+=1,void 0!==t&&(i[0]=t),c===r.length?l(i[0]):h())});else{let t=!1;try{let t=e.fn(...i);void 0!==t&&(i[0]=t)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l(i[0]):h())}if(c===r.length)return};h()}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}let k=(e,t)=>t;class S{get(e){return this._map.get(e)}for(e){let t=this.get(e);if(void 0!==t)return t;let s=this._factory(e),r=this._interceptors;for(let t=0;t<r.length;t++){let n=r[t].factory;n&&(s=n(e,s))}return this._map.set(e,s),s}intercept(e){this._interceptors.push(Object.assign({factory:k},e))}isUsed(){for(let e of this._map.keys()){let t=this.get(e);if(t?.isUsed())return!0}return!1}queryStageRange(e){return new _(e,this)}constructor(e,t){n(this,"_map",new Map),n(this,"_factory",void 0),n(this,"name",void 0),n(this,"_interceptors",void 0),this.name=t,this._factory=e,this._interceptors=[]}}class _{get(e){return this.hookMap.get(e)?.queryStageRange(this.stageRange)}for(e){return this.hookMap.for(e).queryStageRange(this.stageRange)}isUsed(){for(let e of this.hookMap._map.keys())if(this.get(e)?.isUsed())return!0;return!1}constructor(e,t){n(this,"stageRange",void 0),n(this,"hookMap",void 0),this.stageRange=e,this.hookMap=t}}class A{tap(e,t){for(let s of this.hooks)s.tap(e,t)}tapAsync(e,t){for(let s of this.hooks)s.tapAsync(e,t)}tapPromise(e,t){for(let s of this.hooks)s.tapPromise(e,t)}isUsed(){for(let e of this.hooks)if(e.isUsed())return!0;return!1}intercept(e){for(let t of this.hooks)t.intercept(e)}withOptions(e){return new A(this.hooks.map(t=>t.withOptions(e)),this.name)}constructor(e,t){n(this,"hooks",void 0),n(this,"name",void 0),this.hooks=e,this.name=t}}for(var H in s.d(r,{AsyncParallelHook:()=>f,AsyncSeriesBailHook:()=>d,AsyncSeriesHook:()=>m,AsyncSeriesWaterfallHook:()=>y,HookBase:()=>o,HookMap:()=>S,MultiHook:()=>A,QueriedHook:()=>c,QueriedHookMap:()=>_,SyncBailHook:()=>u,SyncHook:()=>h,SyncWaterfallHook:()=>g},{maxStage:i,minStage:a,safeStage:e=>e<-0x80000000?-0x80000000:e>p?p:e}),t.AsyncParallelHook=r.AsyncParallelHook,t.AsyncSeriesBailHook=r.AsyncSeriesBailHook,t.AsyncSeriesHook=r.AsyncSeriesHook,t.AsyncSeriesWaterfallHook=r.AsyncSeriesWaterfallHook,t.HookBase=r.HookBase,t.HookMap=r.HookMap,t.MultiHook=r.MultiHook,t.QueriedHook=r.QueriedHook,t.QueriedHookMap=r.QueriedHookMap,t.SyncBailHook=r.SyncBailHook,t.SyncHook=r.SyncHook,t.SyncWaterfallHook=r.SyncWaterfallHook,t.maxStage=r.maxStage,t.minStage=r.minStage,t.safeStage=r.safeStage,r)-1===["AsyncParallelHook","AsyncSeriesBailHook","AsyncSeriesHook","AsyncSeriesWaterfallHook","HookBase","HookMap","MultiHook","QueriedHook","QueriedHookMap","SyncBailHook","SyncHook","SyncWaterfallHook","maxStage","minStage","safeStage"].indexOf(H)&&(t[H]=r[H]);Object.defineProperty(t,"__esModule",{value:!0})}});var t=e("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.5/node_modules/rspack-manifest-plugin/dist/index.js").RspackManifestPlugin;export{t as RspackManifestPlugin};
|
|
1
|
+
import{__webpack_require__ as e}from"./rslib-runtime.js";import"./626.js";e.add({"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.7/node_modules/rspack-manifest-plugin/dist/helpers.js"(e,t,s){t.transformFiles=t.reduceChunk=t.reduceAssets=t.generateManifest=void 0;let r=s("node:path?815c");t.generateManifest=(e,t,{generate:s,seed:r={}})=>s?s(r,t,Array.from(e.entrypoints.entries()).reduce((e,[t,s])=>Object.assign(e,{[t]:s.getFiles()}),{}),{compilation:e}):t.reduce((e,t)=>Object.assign(e,{[t.name]:t.path}),r),t.reduceAssets=(e,t,s)=>{let n;return(s[t.name]?n=s[t.name]:t.info.sourceFilename&&(n=(0,r.join)((0,r.dirname)(t.name),(0,r.basename)(t.info.sourceFilename))),n)?e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:n,path:t.name}):t.chunks&&t.chunks.length>0?e:e.concat({isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!1,name:t.name,path:t.name})},t.reduceChunk=(e,t,s,n)=>(Array.from(t.auxiliaryFiles||[]).forEach(e=>{n[e]={isAsset:!0,isChunk:!1,isInitial:!1,isModuleAsset:!0,name:(0,r.basename)(e),path:e}}),Array.from(t.files).reduce((e,r)=>{let n=t.name?t.name:null;return n=n?s.useEntryKeys&&!r.endsWith(".map")?n:`${n}.${((e,{transformExtensions:t})=>{let s=e.replace(/\?.*/,"").split("."),r=s.pop();return t.test(r)?`${s.pop()}.${r}`:r})(r,s)}`:r,e.concat({chunk:t,isAsset:!1,isChunk:!0,isInitial:t.isOnlyInitial(),isModuleAsset:!1,name:n,path:r})},e));let n=e=>{let t=Object.assign({},e);return t.name=e.name.replace(/\\/g,"/"),t.path=e.path.replace(/\\/g,"/"),t};t.transformFiles=(e,t)=>["filter","map","sort"].filter(e=>!!t[e]).reduce((e,s)=>e[s](t[s]),e).map(n)},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.7/node_modules/rspack-manifest-plugin/dist/hooks.js"(e,t,s){t.getCompilerHooks=t.emitHook=t.beforeRunHook=void 0;let r=s("node:fs?31c0"),n=s("node:path?815c"),o=s("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"),a=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.7/node_modules/rspack-manifest-plugin/dist/helpers.js"),i=new WeakMap,l=e=>{let t=i.get(e);return void 0===t&&(t={afterEmit:new o.SyncWaterfallHook(["manifest"]),beforeEmit:new o.SyncWaterfallHook(["manifest"])},i.set(e,t)),t};t.getCompilerHooks=l,t.beforeRunHook=({emitCountMap:e,manifestFileName:t},s,r)=>{let n=e.get(t)||0;e.set(t,n+1),r&&r()},t.emitHook=function({compiler:e,emitCountMap:t,manifestAssetId:s,manifestFileName:o,moduleAssets:i,options:p},c){let h=t.get(o)-1,u=c.getStats().toJson({all:!1,assets:!0,cachedAssets:!0,ids:!0,publicPath:!0}),g=null!==p.publicPath?p.publicPath:u.publicPath,f="auto"===g?"":g,{basePath:m,removeKeyHash:d}=p;t.set(o,h);let y={},k=Array.from(c.chunks).reduce((e,t)=>(0,a.reduceChunk)(e,t,p,y),[]);(k=(k=u.assets.reduce((e,t)=>(0,a.reduceAssets)(e,t,i),k)).filter(({name:s,path:r})=>!r.includes("hot-update")&&void 0===t.get((0,n.join)(e.options.output?.path||"<unknown>",s)))).forEach(e=>{delete y[e.path]}),Object.keys(y).forEach(e=>{k=k.concat(y[e])});let S={};u.assets?.forEach(e=>{e.integrity&&(S[e.name]=e.integrity)}),k=k.map(e=>{let t=e=>e.endsWith("/")?e:`${e}/`,s={name:m?t(m)+e.name:e.name,path:f?t(f)+e.path:e.path};return S[e.path]&&(s.integrity=S[e.path]),s.name=d?s.name.replace(d,""):s.name,Object.assign(e,s)}),k=(0,a.transformFiles)(k,p);let _=(0,a.generateManifest)(c,k,p),A=0===h;if(_=l(e).beforeEmit.call(_),A){let t=p.serialize(_);c.emitAsset(s,new e.webpack.sources.RawSource(t)),p.writeToFileEmit&&((0,r.mkdirSync)((0,n.dirname)(o),{recursive:!0}),(0,r.writeFileSync)(o,t))}l(e).afterEmit.call(_)}},"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.7/node_modules/rspack-manifest-plugin/dist/index.js"(e,t,s){t.RspackManifestPlugin=void 0;let r=s("node:path?815c"),n=s("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.7/node_modules/rspack-manifest-plugin/dist/hooks.js"),o=new Map,a={assetHookStage:1/0,basePath:"",fileName:"manifest.json",filter:null,generate:void 0,map:null,publicPath:null,removeKeyHash:/([a-f0-9]{16,32}\.?)/gi,seed:void 0,serialize:e=>JSON.stringify(e,null,2),sort:null,transformExtensions:/^(gz|map)$/i,useEntryKeys:!1,useLegacyEmit:!1,writeToFileEmit:!1};t.RspackManifestPlugin=class{options;constructor(e){this.options=Object.assign({},a,e)}apply(e){let t=(0,r.resolve)(e.options.output?.path||"./",this.options.fileName),s=(0,r.relative)(e.options.output?.path||"./",t),a=n.beforeRunHook.bind(this,{emitCountMap:o,manifestFileName:t}),i=n.emitHook.bind(this,{compiler:e,emitCountMap:o,manifestAssetId:s,manifestFileName:t,moduleAssets:{},options:this.options}),l={name:"WebpackManifestPlugin",stage:this.options.assetHookStage};!0===this.options.useLegacyEmit?e.hooks.emit.tap(l,i):e.hooks.thisCompilation.tap(l,e=>{e.hooks.processAssets.tap(l,()=>i(e))}),e.hooks.run.tapAsync(l,a),e.hooks.watchRun.tapAsync(l,a)}}},"../../node_modules/.pnpm/@rspack+lite-tapable@1.1.2/node_modules/@rspack/lite-tapable/dist/index.cjs"(e,t){var s={};s.d=(e,t,r)=>{var n=(t,r)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,[r]:t[n]})};n(t,"get"),n(r,"value")},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};function n(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}s.r(r);class o{intercept(e){if(this.interceptors.push(Object.assign({},e)),e.register)for(let t=0;t<this.taps.length;t++)this.taps[t]=e.register(this.taps[t])}_runRegisterInterceptors(e){return this.interceptors.reduce((e,t)=>t.register?.(e)??e,e)}_runCallInterceptors(...e){for(let t of this.interceptors)t.call&&t.call(...e)}_runErrorInterceptors(e){for(let t of this.interceptors)t.error&&t.error(e)}_runTapInterceptors(e){for(let t of this.interceptors)t.tap&&t.tap(e)}_runDoneInterceptors(){for(let e of this.interceptors)e.done&&e.done()}_runResultInterceptors(e){for(let t of this.interceptors)t.result&&t.result(e)}withOptions(e){let t=t=>Object.assign({},e,"string"==typeof t?{name:t}:t);return{name:this.name,tap:(e,s)=>this.tap(t(e),s),tapAsync:(e,s)=>this.tapAsync(t(e),s),tapPromise:(e,s)=>this.tapPromise(t(e),s),intercept:e=>this.intercept(e),isUsed:()=>this.isUsed(),withOptions:e=>this.withOptions(t(e)),queryStageRange:e=>this.queryStageRange(e)}}isUsed(){return this.taps.length>0||this.interceptors.length>0}queryStageRange(e){return new c(e,this)}callAsyncStageRange(e){throw Error("Hook should implement there own _callAsyncStageRange")}callAsync(...e){return this.callAsyncStageRange(this.queryStageRange(l),...e)}promiseStageRange(e,...t){return new Promise((s,r)=>{this.callAsyncStageRange(e,...t,(e,t)=>e?r(e):s(t))})}promise(...e){return this.promiseStageRange(this.queryStageRange(l),...e)}tap(e,t){this._tap("sync",e,t)}tapAsync(e,t){this._tap("async",e,t)}tapPromise(e,t){this._tap("promise",e,t)}_tap(e,t,s){let r=t;if("string"==typeof t)r={name:t.trim()};else if("object"!=typeof t||null===t)throw Error("Invalid tap options");if("string"!=typeof r.name||""===r.name)throw Error("Missing name for tap");this._insert(this._runRegisterInterceptors(Object.assign({type:e,fn:s},r)))}_insert(e){let t;"string"==typeof e.before?t=new Set([e.before]):Array.isArray(e.before)&&(t=new Set(e.before));let s=0;"number"==typeof e.stage&&(s=e.stage);let r=this.taps.length;for(;r>0;){r--;let e=this.taps[r];this.taps[r+1]=e;let n=e.stage||0;if(t){if(t.has(e.name)){t.delete(e.name);continue}if(t.size>0)continue}if(!(n>s)){r++;break}}this.taps[r]=e}_prepareArgs(e){let t=this.args.length;return e.length<t?(e.length=t,e.fill(void 0,e.length,t)):(e.length>t&&(e.length=t),e)}constructor(e=[],t){n(this,"args",void 0),n(this,"name",void 0),n(this,"taps",void 0),n(this,"interceptors",void 0),this.args=e,this.name=t,this.taps=[],this.interceptors=[]}}let a=-1/0,i=1/0,l=[a,1/0],p=0x80000000-1;class c{isUsed(){return!!(this.tapsInRange.length>0||this.stageRange[0]===a&&this.hook.interceptors.some(e=>e.call)||this.stageRange[1]===i&&this.hook.interceptors.some(e=>e.done))}call(...e){if("function"!=typeof this.hook.callStageRange)throw Error("hook is not a SyncHook, call methods only exists on SyncHook");return this.hook.callStageRange(this,...e)}callAsync(...e){return this.hook.callAsyncStageRange(this,...e)}promise(...e){return this.hook.promiseStageRange(this,...e)}constructor(e,t){n(this,"stageRange",void 0),n(this,"hook",void 0),n(this,"tapsInRange",void 0);let s=[],[r,o]=e;for(let e of t.taps){let t=e.stage??0;r<=t&&t<o?s.push(e):o===i&&t===i&&s.push(e)}this.stageRange=e,this.hook=t,this.tapsInRange=s}}class h extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncHook")}}class u extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){let t;this._runTapInterceptors(e);try{t=e.fn(...p)}catch(e){return this._runErrorInterceptors(e),l(e)}if(void 0!==t)return this._runResultInterceptors(t),l(null,t)}r===i&&(this._runDoneInterceptors(),l(null))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncBailHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncBailHook")}}class g extends o{callAsyncStageRange(e,...t){let{stageRange:[s,r],tapsInRange:n}=e,o=t.slice(0,t.length-1),l=t[t.length-1],p=this._prepareArgs(o);for(let e of(s===a&&this._runCallInterceptors(...p),n)){this._runTapInterceptors(e);try{let t=e.fn(...p);void 0!==t&&(p[0]=t)}catch(e){return this._runErrorInterceptors(e),l(e)}}r===i&&(this._runDoneInterceptors(),l(null,p[0]))}call(...e){return this.callStageRange(this.queryStageRange(l),...e)}callStageRange(e,...t){let s,r;if(this.callAsyncStageRange(e,...t,(e,t)=>{r=e,s=t}),r)throw r;return s}tapAsync(){throw Error("tapAsync is not supported on a SyncWaterfallHook")}tapPromise(){throw Error("tapPromise is not supported on a SyncWaterfallHook")}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}class f extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=r.length;for(let e of r){if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{0==(c-=1)&&l()},e=>{c=0,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=0,p(e)):0==(c-=1)&&l()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=0,p(e)}t||0!=--c||l()}if(c<=0)return}}}class m extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l();let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(()=>{(c+=1)===r.length?l():h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,e=>{e?(c=r.length,p(e)):(c+=1)===r.length?l():h()});else{let t=!1;try{e.fn(...i)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l():h())}if(c===r.length)return};h()}}class d extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=()=>{this._runDoneInterceptors(),o(null)},p=e=>{this._runErrorInterceptors(e),o(e)},c=e=>{this._runResultInterceptors(e),o(null,e)};if(0===r.length)return l();let h=0,u=()=>{let e=r[h];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{h+=1,void 0!==e?c(e):h===r.length?l():u()},e=>{h=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(h=r.length,p(e)):(h+=1,void 0!==t?c(t):h===r.length?l():u())});else{let t,s=!1;try{t=e.fn(...i)}catch(e){s=!0,h=r.length,p(e)}s||(h+=1,void 0!==t?c(t):h===r.length?l():u())}if(h===r.length)return};u()}}class y extends o{callAsyncStageRange(e,...t){let{stageRange:[s],tapsInRange:r}=e,n=t.slice(0,t.length-1),o=t[t.length-1],i=this._prepareArgs(n);s===a&&this._runCallInterceptors(...i);let l=e=>{this._runResultInterceptors(e),o(null,e)},p=e=>{this._runErrorInterceptors(e),o(e)};if(0===r.length)return l(i[0]);let c=0,h=()=>{let e=r[c];if(this._runTapInterceptors(e),"promise"===e.type){let t=e.fn(...i);if(!t||!t.then)throw Error(`Tap function (tapPromise) did not return promise (returned ${t})`);t.then(e=>{c+=1,void 0!==e&&(i[0]=e),c===r.length?l(i[0]):h()},e=>{c=r.length,p(e)})}else if("async"===e.type)e.fn(...i,(e,t)=>{e?(c=r.length,p(e)):(c+=1,void 0!==t&&(i[0]=t),c===r.length?l(i[0]):h())});else{let t=!1;try{let t=e.fn(...i);void 0!==t&&(i[0]=t)}catch(e){t=!0,c=r.length,p(e)}t||((c+=1)===r.length?l(i[0]):h())}if(c===r.length)return};h()}constructor(e=[],t){if(e.length<1)throw Error("Waterfall hooks must have at least one argument");super(e,t)}}let k=(e,t)=>t;class S{get(e){return this._map.get(e)}for(e){let t=this.get(e);if(void 0!==t)return t;let s=this._factory(e),r=this._interceptors;for(let t=0;t<r.length;t++){let n=r[t].factory;n&&(s=n(e,s))}return this._map.set(e,s),s}intercept(e){this._interceptors.push(Object.assign({factory:k},e))}isUsed(){for(let e of this._map.keys()){let t=this.get(e);if(t?.isUsed())return!0}return!1}queryStageRange(e){return new _(e,this)}constructor(e,t){n(this,"_map",new Map),n(this,"_factory",void 0),n(this,"name",void 0),n(this,"_interceptors",void 0),this.name=t,this._factory=e,this._interceptors=[]}}class _{get(e){return this.hookMap.get(e)?.queryStageRange(this.stageRange)}for(e){return this.hookMap.for(e).queryStageRange(this.stageRange)}isUsed(){for(let e of this.hookMap._map.keys())if(this.get(e)?.isUsed())return!0;return!1}constructor(e,t){n(this,"stageRange",void 0),n(this,"hookMap",void 0),this.stageRange=e,this.hookMap=t}}class A{tap(e,t){for(let s of this.hooks)s.tap(e,t)}tapAsync(e,t){for(let s of this.hooks)s.tapAsync(e,t)}tapPromise(e,t){for(let s of this.hooks)s.tapPromise(e,t)}isUsed(){for(let e of this.hooks)if(e.isUsed())return!0;return!1}intercept(e){for(let t of this.hooks)t.intercept(e)}withOptions(e){return new A(this.hooks.map(t=>t.withOptions(e)),this.name)}constructor(e,t){n(this,"hooks",void 0),n(this,"name",void 0),this.hooks=e,this.name=t}}for(var H in s.d(r,{AsyncParallelHook:()=>f,AsyncSeriesBailHook:()=>d,AsyncSeriesHook:()=>m,AsyncSeriesWaterfallHook:()=>y,HookBase:()=>o,HookMap:()=>S,MultiHook:()=>A,QueriedHook:()=>c,QueriedHookMap:()=>_,SyncBailHook:()=>u,SyncHook:()=>h,SyncWaterfallHook:()=>g},{maxStage:i,minStage:a,safeStage:e=>e<-0x80000000?-0x80000000:e>p?p:e}),t.AsyncParallelHook=r.AsyncParallelHook,t.AsyncSeriesBailHook=r.AsyncSeriesBailHook,t.AsyncSeriesHook=r.AsyncSeriesHook,t.AsyncSeriesWaterfallHook=r.AsyncSeriesWaterfallHook,t.HookBase=r.HookBase,t.HookMap=r.HookMap,t.MultiHook=r.MultiHook,t.QueriedHook=r.QueriedHook,t.QueriedHookMap=r.QueriedHookMap,t.SyncBailHook=r.SyncBailHook,t.SyncHook=r.SyncHook,t.SyncWaterfallHook=r.SyncWaterfallHook,t.maxStage=r.maxStage,t.minStage=r.minStage,t.safeStage=r.safeStage,r)-1===["AsyncParallelHook","AsyncSeriesBailHook","AsyncSeriesHook","AsyncSeriesWaterfallHook","HookBase","HookMap","MultiHook","QueriedHook","QueriedHookMap","SyncBailHook","SyncHook","SyncWaterfallHook","maxStage","minStage","safeStage"].indexOf(H)&&(t[H]=r[H]);Object.defineProperty(t,"__esModule",{value:!0})}});var t=e("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.2_@rspack+core@2.1.7/node_modules/rspack-manifest-plugin/dist/index.js").RspackManifestPlugin;export{t as RspackManifestPlugin};
|
package/dist/types/context.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type ActionType = 'dev' | 'build' | 'preview';
|
|
|
24
24
|
* import { createRsbuild } from '@rsbuild/core';
|
|
25
25
|
*
|
|
26
26
|
* async function main() {
|
|
27
|
-
* const rsbuild = createRsbuild({
|
|
27
|
+
* const rsbuild = await createRsbuild({
|
|
28
28
|
* // ...
|
|
29
29
|
* });
|
|
30
30
|
* await rsbuild.startDevServer();
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -204,8 +204,8 @@ export type EnvironmentContext = {
|
|
|
204
204
|
*/ manifest?: Record<string, unknown> | ManifestData;
|
|
205
205
|
/**
|
|
206
206
|
* WebSocket authentication token, used to authenticate WebSocket connections and
|
|
207
|
-
* prevent unauthorized access.
|
|
208
|
-
* an empty string
|
|
207
|
+
* prevent unauthorized access. It contains a token when running the `dev` action
|
|
208
|
+
* and is an empty string for other actions.
|
|
209
209
|
*/ webSocketToken: string;
|
|
210
210
|
};
|
|
211
211
|
export type ModifyChainUtils = {
|
package/dist/types/rsbuild.d.ts
CHANGED
|
@@ -52,8 +52,9 @@ export type InitConfigsOptions = Pick<RsbuildContext, 'action'>;
|
|
|
52
52
|
export type InspectConfigOptions = {
|
|
53
53
|
/**
|
|
54
54
|
* Inspect the config in the specified mode.
|
|
55
|
-
* Available options: 'development' or '
|
|
56
|
-
* @default 'development'
|
|
55
|
+
* Available options: 'development', 'production', or 'none'.
|
|
56
|
+
* @default Inferred from `process.env.NODE_ENV`: 'development' when unset,
|
|
57
|
+
* 'development' or 'production' when matching, otherwise 'none'.
|
|
57
58
|
*/ mode?: RsbuildMode;
|
|
58
59
|
/**
|
|
59
60
|
* Enables verbose mode to display the complete function
|
|
@@ -62,7 +63,7 @@ export type InspectConfigOptions = {
|
|
|
62
63
|
*/ verbose?: boolean;
|
|
63
64
|
/**
|
|
64
65
|
* Specify the output path for inspection results.
|
|
65
|
-
* @default '
|
|
66
|
+
* @default '<context.distPath>/.rsbuild'
|
|
66
67
|
*/ outputPath?: string;
|
|
67
68
|
/**
|
|
68
69
|
* Whether to write the inspection results to disk.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"registry": "https://registry.npmjs.org/"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@rspack/core": "~2.1.
|
|
42
|
+
"@rspack/core": "~2.1.7",
|
|
43
43
|
"@swc/helpers": "^0.5.23"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"mrmime": "^2.0.1",
|
|
70
70
|
"on-finished": "2.4.1",
|
|
71
71
|
"open": "^11.0.0",
|
|
72
|
-
"postcss": "^8.5.
|
|
72
|
+
"postcss": "^8.5.23",
|
|
73
73
|
"postcss-load-config": "6.0.1",
|
|
74
74
|
"postcss-loader": "8.2.1",
|
|
75
75
|
"prebundle": "1.6.5",
|