@rsbuild/core 2.0.9 → 2.0.10
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/connect-next/package.json +1 -1
- package/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/html-rspack-plugin/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rslog/index.d.ts +3 -3
- package/compiled/rslog/package.json +1 -1
- package/compiled/rspack-chain/package.json +1 -1
- package/dist/756.js +16 -18
- package/dist/launch-editor-middleware.js +58 -23
- package/dist/manifest-plugin.js +6 -6
- package/dist/memfs.js +97 -95
- package/dist/tinyglobby.js +11 -9
- package/package.json +11 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
203: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(288);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
}
|
|
312
312
|
module.exports = { CachedChildCompilation };
|
|
313
313
|
},
|
|
314
|
-
|
|
314
|
+
288: (module) => {
|
|
315
315
|
"use strict";
|
|
316
316
|
class HtmlWebpackChildCompiler {
|
|
317
317
|
constructor(templates) {
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
}
|
|
481
481
|
module.exports = { HtmlWebpackChildCompiler };
|
|
482
482
|
},
|
|
483
|
-
|
|
483
|
+
880: (module) => {
|
|
484
484
|
"use strict";
|
|
485
485
|
module.exports = {};
|
|
486
486
|
module.exports.none = (chunks) => chunks;
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
};
|
|
500
500
|
module.exports.auto = module.exports.none;
|
|
501
501
|
},
|
|
502
|
-
|
|
502
|
+
447: (module) => {
|
|
503
503
|
"use strict";
|
|
504
504
|
module.exports = function (err) {
|
|
505
505
|
return {
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
334: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
527
527
|
"use strict";
|
|
528
528
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(159);
|
|
529
529
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
}
|
|
550
550
|
module.exports = { getHtmlRspackPluginHooks };
|
|
551
551
|
},
|
|
552
|
-
|
|
552
|
+
619: (module) => {
|
|
553
553
|
const voidTags = [
|
|
554
554
|
"area",
|
|
555
555
|
"base",
|
|
@@ -617,19 +617,19 @@
|
|
|
617
617
|
htmlTagObjectToString,
|
|
618
618
|
};
|
|
619
619
|
},
|
|
620
|
-
|
|
620
|
+
914: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
621
621
|
"use strict";
|
|
622
622
|
const promisify = __nccwpck_require__(23).promisify;
|
|
623
623
|
const vm = __nccwpck_require__(154);
|
|
624
624
|
const fs = __nccwpck_require__(896);
|
|
625
625
|
const path = __nccwpck_require__(928);
|
|
626
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
626
|
+
const { CachedChildCompilation } = __nccwpck_require__(203);
|
|
627
627
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
628
|
-
__nccwpck_require__(
|
|
629
|
-
const prettyError = __nccwpck_require__(
|
|
630
|
-
const chunkSorter = __nccwpck_require__(
|
|
628
|
+
__nccwpck_require__(619);
|
|
629
|
+
const prettyError = __nccwpck_require__(447);
|
|
630
|
+
const chunkSorter = __nccwpck_require__(880);
|
|
631
631
|
const getHtmlRspackPluginHooks =
|
|
632
|
-
__nccwpck_require__(
|
|
632
|
+
__nccwpck_require__(334).getHtmlRspackPluginHooks;
|
|
633
633
|
const WITH_PLACEHOLDER = "function __with_placeholder__";
|
|
634
634
|
class HtmlRspackPlugin {
|
|
635
635
|
constructor(userOptions = {}) {
|
|
@@ -2398,6 +2398,6 @@
|
|
|
2398
2398
|
}
|
|
2399
2399
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
2400
2400
|
__nccwpck_require__.ab = __dirname + "/";
|
|
2401
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
2401
|
+
var __webpack_exports__ = __nccwpck_require__(914);
|
|
2402
2402
|
module.exports = __webpack_exports__;
|
|
2403
2403
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.1.
|
|
1
|
+
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.1.9","funding":{"type":"opencollective","url":"https://opencollective.com/html-webpack-plugin"},"license":"MIT","types":"index.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
|
+
501: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(495)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
495: (__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__(906);
|
|
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
|
+
906: (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__(501);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -16,7 +16,7 @@ declare const color: {
|
|
|
16
16
|
strikethrough: ColorFn;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
declare
|
|
19
|
+
declare const LOG_TYPES: {
|
|
20
20
|
error: {
|
|
21
21
|
label: string;
|
|
22
22
|
level: "error";
|
|
@@ -90,9 +90,9 @@ type Logger = Record<LogMethods, LogFunction> & {
|
|
|
90
90
|
override: (customLogger: Partial<Record<LogMethods, LogFunction>>) => void;
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
declare
|
|
93
|
+
declare const createLogger: (options?: Options) => Logger;
|
|
94
94
|
|
|
95
|
-
declare
|
|
95
|
+
declare const logger: Logger;
|
|
96
96
|
|
|
97
97
|
export { color, createLogger, logger };
|
|
98
98
|
export type { LogFunction, LogLevel, LogMessage, LogType, Logger, Options };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rslog","version":"2.1.
|
|
1
|
+
{"name":"rslog","version":"2.1.2","license":"MIT","types":"index.d.ts","type":"module"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rspack-chain","version":"2.0.
|
|
1
|
+
{"name":"rspack-chain","version":"2.0.2","license":"MIT","types":"types/index.d.ts","type":"module"}
|
package/dist/756.js
CHANGED
|
@@ -755,8 +755,8 @@ let supportsColor = {
|
|
|
755
755
|
}
|
|
756
756
|
}, normalizeErrorMessage = (err)=>{
|
|
757
757
|
if (err.stack) {
|
|
758
|
-
let [
|
|
759
|
-
return
|
|
758
|
+
let [rawName, ...rest] = err.stack.split('\n'), name = rawName.startsWith('Error: ') ? rawName.slice(7) : rawName;
|
|
759
|
+
return `${name}\n${color.gray(rest.join('\n'))}`;
|
|
760
760
|
}
|
|
761
761
|
return err.message;
|
|
762
762
|
}, createLogger = (options = {})=>{
|
|
@@ -1477,14 +1477,12 @@ __nested_rspack_require_65__.m = __webpack_modules__, __nested_rspack_require_65
|
|
|
1477
1477
|
}
|
|
1478
1478
|
},
|
|
1479
1479
|
"./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/index.js" (__unused_rspack_module, exports, __nested_rspack_require_14714_14733__) {
|
|
1480
|
-
|
|
1481
|
-
value: !0
|
|
1482
|
-
}), exports.stringify = void 0;
|
|
1480
|
+
exports.A = void 0;
|
|
1483
1481
|
let stringify_1 = __nested_rspack_require_14714_14733__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/stringify.js"), quote_1 = __nested_rspack_require_14714_14733__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/quote.js"), ROOT_SENTINEL = Symbol("root");
|
|
1484
1482
|
function replacerToString(replacer) {
|
|
1485
1483
|
return replacer ? (value, space, next, key)=>replacer(value, space, (value)=>stringify_1.toString(value, space, next, key), key) : stringify_1.toString;
|
|
1486
1484
|
}
|
|
1487
|
-
exports.
|
|
1485
|
+
exports.A = function stringify(value, replacer, indent, options = {}) {
|
|
1488
1486
|
let space = "string" == typeof indent ? indent : " ".repeat(indent || 0), path = [], stack = new Set(), tracking = new Map(), unpack = new Map(), valueCount = 0, { maxDepth = 100, references = !1, skipUndefinedProperties = !1, maxValues = 100000 } = options, valueToString = replacerToString(replacer), onNext = (value, key)=>{
|
|
1489
1487
|
if (++valueCount > maxValues || skipUndefinedProperties && void 0 === value || path.length > maxDepth) return;
|
|
1490
1488
|
if (void 0 === key) return valueToString(value, space, onNext, key);
|
|
@@ -1514,9 +1512,9 @@ __nested_rspack_require_65__.m = __webpack_modules__, __nested_rspack_require_65
|
|
|
1514
1512
|
return result;
|
|
1515
1513
|
};
|
|
1516
1514
|
},
|
|
1517
|
-
"./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/object.js" (__unused_rspack_module, exports,
|
|
1515
|
+
"./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/object.js" (__unused_rspack_module, exports, __nested_rspack_require_18029_18048__) {
|
|
1518
1516
|
exports.objectToString = void 0;
|
|
1519
|
-
let quote_1 =
|
|
1517
|
+
let quote_1 = __nested_rspack_require_18029_18048__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/quote.js"), function_1 = __nested_rspack_require_18029_18048__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/function.js"), array_1 = __nested_rspack_require_18029_18048__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/array.js");
|
|
1520
1518
|
exports.objectToString = (value, space, next, key)=>{
|
|
1521
1519
|
if ("function" == typeof Buffer && Buffer.isBuffer(value)) return `Buffer.from(${next(value.toString("base64"))}, 'base64')`;
|
|
1522
1520
|
if ("object" == typeof global && value === global) return globalToString(value, space, next);
|
|
@@ -1600,9 +1598,9 @@ __nested_rspack_require_65__.m = __webpack_modules__, __nested_rspack_require_65
|
|
|
1600
1598
|
return result;
|
|
1601
1599
|
};
|
|
1602
1600
|
},
|
|
1603
|
-
"./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/stringify.js" (__unused_rspack_module, exports,
|
|
1601
|
+
"./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/stringify.js" (__unused_rspack_module, exports, __nested_rspack_require_23448_23467__) {
|
|
1604
1602
|
exports.toString = void 0;
|
|
1605
|
-
let quote_1 =
|
|
1603
|
+
let quote_1 = __nested_rspack_require_23448_23467__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/quote.js"), object_1 = __nested_rspack_require_23448_23467__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/object.js"), function_1 = __nested_rspack_require_23448_23467__("./node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/function.js"), PRIMITIVE_TYPES = {
|
|
1606
1604
|
string: quote_1.quoteString,
|
|
1607
1605
|
number: (value)=>Object.is(value, -0) ? "-0" : String(value),
|
|
1608
1606
|
boolean: String,
|
|
@@ -2193,7 +2191,7 @@ class RspackChain extends ChainedMap {
|
|
|
2193
2191
|
]);
|
|
2194
2192
|
}
|
|
2195
2193
|
static toString(config, { verbose = !1, configPrefix = 'config' } = {}) {
|
|
2196
|
-
return (0, dist.
|
|
2194
|
+
return (0, dist.A)(config, (value, indent, stringify)=>{
|
|
2197
2195
|
if (value && value.__pluginName) {
|
|
2198
2196
|
let prefix = `/* ${configPrefix}.${value.__pluginType}('${value.__pluginName}') */\n`, constructorExpression = value.__pluginPath ? `(require(${stringify(value.__pluginPath)}))` : value.__pluginConstructorName;
|
|
2199
2197
|
if (constructorExpression) {
|
|
@@ -3485,7 +3483,7 @@ function createPublicContext(context) {
|
|
|
3485
3483
|
async function createContext(options, userConfig, logger) {
|
|
3486
3484
|
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;
|
|
3487
3485
|
return {
|
|
3488
|
-
version: "2.0.
|
|
3486
|
+
version: "2.0.10",
|
|
3489
3487
|
rootPath,
|
|
3490
3488
|
distPath: '',
|
|
3491
3489
|
cachePath,
|
|
@@ -6204,7 +6202,7 @@ function createMiddleware(context, ready, outputFileSystem) {
|
|
|
6204
6202
|
}
|
|
6205
6203
|
async function setupOutputFileSystem(writeToDisk, compilers) {
|
|
6206
6204
|
if (!0 !== writeToDisk) {
|
|
6207
|
-
let { createFsFromVolume, Volume } = await import("./memfs.js").then(__webpack_require__.t.bind(__webpack_require__, "../../node_modules/.pnpm/memfs@4.57.
|
|
6205
|
+
let { createFsFromVolume, Volume } = await import("./memfs.js").then(__webpack_require__.t.bind(__webpack_require__, "../../node_modules/.pnpm/memfs@4.57.3/node_modules/memfs/lib/index.js", 23)), outputFileSystem = createFsFromVolume(new Volume());
|
|
6208
6206
|
for (let compiler of compilers)compiler.outputFileSystem = outputFileSystem;
|
|
6209
6207
|
}
|
|
6210
6208
|
let compiler = compilers.find((compiler)=>!!compiler.outputFileSystem);
|
|
@@ -7086,7 +7084,7 @@ let applyDefaultMiddlewares = async ({ config, buildManager, context, devServer,
|
|
|
7086
7084
|
server.base && '/' !== server.base && middlewares.use(getBaseUrlMiddleware({
|
|
7087
7085
|
base: server.base
|
|
7088
7086
|
}));
|
|
7089
|
-
let { default: launchEditorMiddleware } = await import("./launch-editor-middleware.js").then(__webpack_require__.t.bind(__webpack_require__, "../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
7087
|
+
let { default: launchEditorMiddleware } = await import("./launch-editor-middleware.js").then(__webpack_require__.t.bind(__webpack_require__, "../../node_modules/.pnpm/launch-editor-middleware@2.14.0/node_modules/launch-editor-middleware/index.js", 23));
|
|
7090
7088
|
if (middlewares.use('/__open-in-editor', launchEditorMiddleware()), middlewares.use((({ environments, logger })=>async function viewingServedFilesMiddleware(req, res, next) {
|
|
7091
7089
|
if ('/rsbuild-dev-server' !== req.url.replace(postfixRE, '')) return void next();
|
|
7092
7090
|
res.writeHead(200, {
|
|
@@ -8949,7 +8947,7 @@ try {
|
|
|
8949
8947
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
|
|
8950
8948
|
let { output: { manifest }, dev: { writeToDisk } } = environment.config;
|
|
8951
8949
|
if (!1 === manifest) return;
|
|
8952
|
-
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.
|
|
8950
|
+
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.6/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
|
|
8953
8951
|
manifestFilenames.set(environment.name, manifestOptions.filename);
|
|
8954
8952
|
let pluginOptions = {
|
|
8955
8953
|
fileName: manifestOptions.filename,
|
|
@@ -9463,7 +9461,7 @@ let applyServerOptions = (command)=>{
|
|
|
9463
9461
|
};
|
|
9464
9462
|
function setupCommands() {
|
|
9465
9463
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
9466
|
-
cli.version("2.0.
|
|
9464
|
+
cli.version("2.0.10"), 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)', {
|
|
9467
9465
|
default: 'auto'
|
|
9468
9466
|
}).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', {
|
|
9469
9467
|
type: [
|
|
@@ -9534,7 +9532,7 @@ function initNodeEnv(command) {
|
|
|
9534
9532
|
}
|
|
9535
9533
|
function showGreeting() {
|
|
9536
9534
|
let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
|
|
9537
|
-
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.
|
|
9535
|
+
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.10\n`);
|
|
9538
9536
|
}
|
|
9539
9537
|
function setupLogLevel() {
|
|
9540
9538
|
if (cli_argv.length <= 3) return;
|
|
@@ -9556,5 +9554,5 @@ function runCLI() {
|
|
|
9556
9554
|
src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err), process.exit(1);
|
|
9557
9555
|
}
|
|
9558
9556
|
}
|
|
9559
|
-
let src_version = "2.0.
|
|
9557
|
+
let src_version = "2.0.10";
|
|
9560
9558
|
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 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./1~rslib-runtime.js";
|
|
2
2
|
import "./756.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
|
-
"../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
5
|
-
let path = __webpack_require__("path?aeb1"), launch = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.
|
|
4
|
+
"../../node_modules/.pnpm/launch-editor-middleware@2.14.0/node_modules/launch-editor-middleware/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
5
|
+
let path = __webpack_require__("path?aeb1"), launch = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/index.js");
|
|
6
6
|
module.exports = (specifiedEditor, srcRoot, onErrorCallback)=>('function' == typeof specifiedEditor && (onErrorCallback = specifiedEditor, specifiedEditor = void 0), 'function' == typeof srcRoot && (onErrorCallback = srcRoot, srcRoot = void 0), srcRoot = srcRoot || process.cwd(), function launchEditorMiddleware(req, res) {
|
|
7
7
|
let url;
|
|
8
8
|
try {
|
|
@@ -16,7 +16,7 @@ __webpack_require__.add({
|
|
|
16
16
|
file ? (launch(file.startsWith('file://') ? file : path.resolve(srcRoot, file), specifiedEditor, onErrorCallback), res.end()) : (res.statusCode = 500, res.end('launch-editor-middleware: required query param "file" is missing.'));
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
19
|
+
"../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/editor-info/linux.js" (module) {
|
|
20
20
|
module.exports = {
|
|
21
21
|
atom: 'atom',
|
|
22
22
|
Brackets: 'brackets',
|
|
@@ -48,7 +48,7 @@ __webpack_require__.add({
|
|
|
48
48
|
zed: 'zed'
|
|
49
49
|
};
|
|
50
50
|
},
|
|
51
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
51
|
+
"../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/editor-info/macos.js" (module) {
|
|
52
52
|
module.exports = {
|
|
53
53
|
'/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
|
|
54
54
|
'/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
|
|
@@ -81,7 +81,7 @@ __webpack_require__.add({
|
|
|
81
81
|
'/Applications/Zed.app/Contents/MacOS/zed': 'zed'
|
|
82
82
|
};
|
|
83
83
|
},
|
|
84
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
84
|
+
"../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/editor-info/windows.js" (module) {
|
|
85
85
|
module.exports = [
|
|
86
86
|
'Brackets.exe',
|
|
87
87
|
'Code.exe',
|
|
@@ -112,7 +112,7 @@ __webpack_require__.add({
|
|
|
112
112
|
'Antigravity.exe'
|
|
113
113
|
];
|
|
114
114
|
},
|
|
115
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
115
|
+
"../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/get-args.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
116
116
|
let path = __webpack_require__("path?aeb1");
|
|
117
117
|
module.exports = function getArgumentsForPosition(editor, fileName, lineNumber, columnNumber = 1) {
|
|
118
118
|
switch(path.basename(editor).replace(/\.(exe|cmd|bat)$/i, '')){
|
|
@@ -209,8 +209,8 @@ __webpack_require__.add({
|
|
|
209
209
|
];
|
|
210
210
|
};
|
|
211
211
|
},
|
|
212
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
213
|
-
let path = __webpack_require__("path?aeb1"), shellQuote = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.
|
|
212
|
+
"../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/guess.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
213
|
+
let path = __webpack_require__("path?aeb1"), shellQuote = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js"), childProcess = __webpack_require__("child_process"), COMMON_EDITORS_MACOS = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/editor-info/macos.js"), COMMON_EDITORS_LINUX = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/editor-info/linux.js"), COMMON_EDITORS_WIN = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/editor-info/windows.js");
|
|
214
214
|
module.exports = function guessEditor(specifiedEditor) {
|
|
215
215
|
if (specifiedEditor) return shellQuote.parse(specifiedEditor);
|
|
216
216
|
if (process.env.LAUNCH_EDITOR) return [
|
|
@@ -283,8 +283,8 @@ __webpack_require__.add({
|
|
|
283
283
|
];
|
|
284
284
|
};
|
|
285
285
|
},
|
|
286
|
-
"../../node_modules/.pnpm/launch-editor@2.
|
|
287
|
-
let fs = __webpack_require__("fs?8b28"), os = __webpack_require__("os"), path = __webpack_require__("path?aeb1"), colors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"), childProcess = __webpack_require__("child_process"), guessEditor = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.
|
|
286
|
+
"../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
287
|
+
let fs = __webpack_require__("fs?8b28"), os = __webpack_require__("os"), path = __webpack_require__("path?aeb1"), colors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"), childProcess = __webpack_require__("child_process"), guessEditor = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/guess.js"), getArgumentsForPosition = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.14.0/node_modules/launch-editor/get-args.js");
|
|
288
288
|
function wrapErrorCallback(cb) {
|
|
289
289
|
return (fileName, errorMessage)=>{
|
|
290
290
|
console.log(), console.log(colors.red('Could not open ' + path.basename(fileName) + ' in the editor.')), errorMessage && ('.' !== errorMessage[errorMessage.length - 1] && (errorMessage += '.'), console.log(colors.red('The editor process exited with an error: ' + errorMessage))), console.log(), cb && cb(fileName, errorMessage);
|
|
@@ -309,7 +309,7 @@ __webpack_require__.add({
|
|
|
309
309
|
columnNumber: match && match[3]
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
let
|
|
312
|
+
let currentChildProcess = null;
|
|
313
313
|
module.exports = function launchEditor(file, specifiedEditor, onErrorCallback) {
|
|
314
314
|
let parsed = parseFile(file), { fileName } = parsed, { lineNumber, columnNumber } = parsed;
|
|
315
315
|
if (!fs.existsSync(fileName)) return;
|
|
@@ -320,7 +320,7 @@ __webpack_require__.add({
|
|
|
320
320
|
let extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber);
|
|
321
321
|
args.push.apply(args, extraArgs);
|
|
322
322
|
} else args.push(fileName);
|
|
323
|
-
if (
|
|
323
|
+
if (currentChildProcess && isTerminalEditor(editor) && currentChildProcess.kill('SIGKILL'), 'win32' === process.platform) {
|
|
324
324
|
function escapeCmdArgs(cmdArgs) {
|
|
325
325
|
return cmdArgs.replace(/([&|<>,;=^])/g, '^$1');
|
|
326
326
|
}
|
|
@@ -331,16 +331,16 @@ __webpack_require__.add({
|
|
|
331
331
|
editor,
|
|
332
332
|
...args.map(escapeCmdArgs)
|
|
333
333
|
].map(doubleQuoteIfNeeded).join(' ');
|
|
334
|
-
|
|
334
|
+
currentChildProcess = childProcess.exec(launchCommand, {
|
|
335
335
|
stdio: 'inherit',
|
|
336
336
|
shell: !0
|
|
337
337
|
});
|
|
338
|
-
} else
|
|
338
|
+
} else currentChildProcess = childProcess.spawn(editor, args, {
|
|
339
339
|
stdio: 'inherit'
|
|
340
340
|
});
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}),
|
|
341
|
+
currentChildProcess.on('exit', function(errorCode) {
|
|
342
|
+
currentChildProcess = null, errorCode && onErrorCallback(fileName, '(code ' + errorCode + ')');
|
|
343
|
+
}), currentChildProcess.on('error', function(error) {
|
|
344
344
|
let { code, message } = error;
|
|
345
345
|
'ENOENT' === code && (message = `${message} ('${editor}' command does not exist in 'PATH')`), onErrorCallback(fileName, message);
|
|
346
346
|
});
|
|
@@ -404,10 +404,10 @@ __webpack_require__.add({
|
|
|
404
404
|
};
|
|
405
405
|
module.exports = createColors(), module.exports.createColors = createColors;
|
|
406
406
|
},
|
|
407
|
-
"../../node_modules/.pnpm/shell-quote@1.8.
|
|
408
|
-
__webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.
|
|
407
|
+
"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
408
|
+
__webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js"), exports.parse = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js");
|
|
409
409
|
},
|
|
410
|
-
"../../node_modules/.pnpm/shell-quote@1.8.
|
|
410
|
+
"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/parse.js" (module) {
|
|
411
411
|
for(var CONTROL = "(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])", controlRE = RegExp('^' + CONTROL + '$'), META = '|&;()<> \\t', hash = /^#$/, TOKEN = '', i = 0; i < 4; i++)TOKEN += (0x100000000 * Math.random()).toString(16);
|
|
412
412
|
var startsWithToken = RegExp('^' + TOKEN);
|
|
413
413
|
function matchAll(s, r) {
|
|
@@ -490,11 +490,46 @@ __webpack_require__.add({
|
|
|
490
490
|
}, []);
|
|
491
491
|
};
|
|
492
492
|
},
|
|
493
|
-
"../../node_modules/.pnpm/shell-quote@1.8.
|
|
493
|
+
"../../node_modules/.pnpm/shell-quote@1.8.4/node_modules/shell-quote/quote.js" (module) {
|
|
494
|
+
var OPS = [
|
|
495
|
+
'||',
|
|
496
|
+
'&&',
|
|
497
|
+
';;',
|
|
498
|
+
'|&',
|
|
499
|
+
'<(',
|
|
500
|
+
'<<<',
|
|
501
|
+
'>>',
|
|
502
|
+
'>&',
|
|
503
|
+
'<&',
|
|
504
|
+
'&',
|
|
505
|
+
';',
|
|
506
|
+
'(',
|
|
507
|
+
')',
|
|
508
|
+
'|',
|
|
509
|
+
'<',
|
|
510
|
+
'>'
|
|
511
|
+
], LINE_TERMINATORS = /[\n\r\u2028\u2029]/, GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|]/g;
|
|
494
512
|
module.exports = function quote(xs) {
|
|
495
513
|
return xs.map(function(s) {
|
|
496
|
-
|
|
514
|
+
if ('' === s) return '\'\'';
|
|
515
|
+
if (s && 'object' == typeof s) {
|
|
516
|
+
if ('glob' === s.op) {
|
|
517
|
+
if ('string' != typeof s.pattern) throw TypeError('glob token requires a string `pattern`');
|
|
518
|
+
if (LINE_TERMINATORS.test(s.pattern)) throw TypeError('glob `pattern` must not contain line terminators');
|
|
519
|
+
return s.pattern.replace(GLOB_SHELL_SPECIAL, '\\$&');
|
|
520
|
+
}
|
|
521
|
+
if ('string' == typeof s.op) {
|
|
522
|
+
if (0 > OPS.indexOf(s.op)) throw TypeError('invalid `op` value: ' + JSON.stringify(s.op));
|
|
523
|
+
return s.op.replace(/[\s\S]/g, '\\$&');
|
|
524
|
+
}
|
|
525
|
+
if ('string' == typeof s.comment) {
|
|
526
|
+
if (LINE_TERMINATORS.test(s.comment)) throw TypeError('`comment` must not contain line terminators');
|
|
527
|
+
return '#' + s.comment;
|
|
528
|
+
}
|
|
529
|
+
throw TypeError('unrecognized object token shape');
|
|
530
|
+
}
|
|
531
|
+
return /["\s\\]/.test(s) && !/'/.test(s) ? "'" + s.replace(/(['])/g, '\\$1') + "'" : /["'\s]/.test(s) ? '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"' : String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2');
|
|
497
532
|
}).join(' ');
|
|
498
533
|
};
|
|
499
534
|
}
|
|
500
|
-
}), __webpack_require__("../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
535
|
+
}), __webpack_require__("../../node_modules/.pnpm/launch-editor-middleware@2.14.0/node_modules/launch-editor-middleware/index.js");
|
package/dist/manifest-plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./1~rslib-runtime.js";
|
|
2
2
|
import "./756.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.6/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.6/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.6/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.6/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.6/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.6/node_modules/rspack-manifest-plugin/dist/index.js").RspackManifestPlugin;
|
|
687
687
|
export { RspackManifestPlugin };
|