@rsbuild/core 0.6.8 → 0.6.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/commander/{typings/index.d.ts → index.d.ts} +26 -24
- package/compiled/commander/index.js +3528 -1
- package/compiled/commander/package.json +1 -1
- package/compiled/connect-history-api-fallback/index.js +186 -1
- package/compiled/dotenv/{lib/main.d.ts → index.d.ts} +16 -12
- package/compiled/dotenv/index.js +458 -1
- package/compiled/dotenv/package.json +1 -1
- package/compiled/dotenv-expand/{lib/main.d.ts → index.d.ts} +9 -7
- package/compiled/dotenv-expand/index.js +146 -1
- package/compiled/dotenv-expand/package.json +1 -1
- package/compiled/http-compression/index.js +185 -1
- package/compiled/launch-editor-middleware/index.js +843 -1
- package/compiled/on-finished/index.d.ts +2 -2
- package/compiled/on-finished/index.js +390 -3
- package/compiled/on-finished/package.json +1 -1
- package/compiled/open/index.d.ts +1 -153
- package/compiled/open/index.js +526 -1
- package/compiled/open/package.json +1 -1
- package/compiled/sirv/index.d.ts +1 -0
- package/compiled/sirv/index.js +798 -1
- package/compiled/sirv/package.json +1 -1
- package/compiled/webpack-dev-middleware/index.d.ts +1 -0
- package/compiled/webpack-dev-middleware/index.js +6696 -0
- package/compiled/webpack-dev-middleware/license +20 -0
- package/compiled/webpack-dev-middleware/package.json +1 -0
- package/compiled/webpack-dev-middleware/schema-utils.js +1 -0
- package/compiled/ws/index.d.ts +7 -15
- package/compiled/ws/index.js +4885 -1
- package/compiled/ws/package.json +1 -1
- package/dist/cli/commands.js +1 -1
- package/dist/cli/prepare.js +1 -1
- package/dist/client/format.d.ts +5 -0
- package/dist/client/{formatStats.js → format.js} +8 -43
- package/dist/client/{hmr/index.d.ts → hmr.d.ts} +4 -0
- package/dist/client/hmr.mjs +194 -431
- package/dist/client/overlay.mjs +205 -227
- package/dist/createContext.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/target.js +19 -16
- package/dist/provider/plugins/swc.js +1 -0
- package/dist/provider/shared.js +2 -2
- package/dist/server/devMiddleware.js +1 -1
- package/dist/server/devServer.js +6 -1
- package/dist/server/getDevMiddlewares.d.ts +3 -0
- package/dist/server/getDevMiddlewares.js +6 -8
- package/dist/server/helper.d.ts +4 -4
- package/dist/server/middlewares.d.ts +5 -2
- package/dist/server/middlewares.js +1 -7
- package/package.json +6 -5
- package/compiled/open/license +0 -9
- package/compiled/sirv/sirv.d.ts +0 -27
- package/dist/client/formatStats.d.ts +0 -12
- package/dist/client/hmr/url.d.ts +0 -6
package/compiled/ws/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.
|
|
1
|
+
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.17.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/dist/cli/commands.js
CHANGED
|
@@ -39,7 +39,7 @@ const applyServerOptions = (command) => {
|
|
|
39
39
|
command.option("-o --open [url]", "open the page in browser on startup").option("--port <port>", "specify a port number for server to listen").option("--host <host>", "specify the host that the server listens to");
|
|
40
40
|
};
|
|
41
41
|
function runCli() {
|
|
42
|
-
import_commander.program.name("rsbuild").usage("<command> [options]").version("0.6.
|
|
42
|
+
import_commander.program.name("rsbuild").usage("<command> [options]").version("0.6.9");
|
|
43
43
|
const devCommand = import_commander.program.command("dev");
|
|
44
44
|
const buildCommand = import_commander.program.command("build");
|
|
45
45
|
const previewCommand = import_commander.program.command("preview");
|
package/dist/cli/prepare.js
CHANGED
|
@@ -34,7 +34,7 @@ function prepareCli() {
|
|
|
34
34
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
35
35
|
console.log();
|
|
36
36
|
}
|
|
37
|
-
import_rslog.logger.greet(` ${`Rsbuild v${"0.6.
|
|
37
|
+
import_rslog.logger.greet(` ${`Rsbuild v${"0.6.9"}`}
|
|
38
38
|
`);
|
|
39
39
|
}
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -16,15 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var format_exports = {};
|
|
20
|
+
__export(format_exports, {
|
|
21
21
|
formatStatsMessages: () => formatStatsMessages
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
const friendlySyntaxErrorLabel = "SyntaxError:";
|
|
25
|
-
function isLikelyASyntaxError(message) {
|
|
26
|
-
return message.includes(friendlySyntaxErrorLabel);
|
|
27
|
-
}
|
|
23
|
+
module.exports = __toCommonJS(format_exports);
|
|
28
24
|
function resolveFileName(stats) {
|
|
29
25
|
const regex = /(?:\!|^)([^!]+)$/;
|
|
30
26
|
const fileName = stats.moduleIdentifier?.match(regex)?.at(-1) ?? "";
|
|
@@ -54,30 +50,6 @@ ${stats.stack}` : "";
|
|
|
54
50
|
message = stats;
|
|
55
51
|
}
|
|
56
52
|
lines = message.split("\n");
|
|
57
|
-
lines = lines.map((line) => {
|
|
58
|
-
const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(
|
|
59
|
-
line
|
|
60
|
-
);
|
|
61
|
-
if (!parsingError) {
|
|
62
|
-
return line;
|
|
63
|
-
}
|
|
64
|
-
const [, errorLine, errorColumn, errorMessage] = parsingError;
|
|
65
|
-
return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;
|
|
66
|
-
});
|
|
67
|
-
message = lines.join("\n");
|
|
68
|
-
message = message.replace(
|
|
69
|
-
/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g,
|
|
70
|
-
`${friendlySyntaxErrorLabel} $3 ($1:$2)
|
|
71
|
-
`
|
|
72
|
-
);
|
|
73
|
-
lines = message.split("\n");
|
|
74
|
-
if (lines.length > 2 && lines[1].trim() === "") {
|
|
75
|
-
lines.splice(1, 1);
|
|
76
|
-
}
|
|
77
|
-
lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, "$1");
|
|
78
|
-
if (lines[1] && lines[1].indexOf("Module not found:") !== -1) {
|
|
79
|
-
lines[1] = lines[1].replace("Error: ", "");
|
|
80
|
-
}
|
|
81
53
|
lines = lines.filter(
|
|
82
54
|
(line, index, arr) => index === 0 || line.trim() !== "" || line.trim() !== arr[index - 1].trim()
|
|
83
55
|
);
|
|
@@ -85,19 +57,12 @@ ${stats.stack}` : "";
|
|
|
85
57
|
return message.trim();
|
|
86
58
|
}
|
|
87
59
|
function formatStatsMessages(stats) {
|
|
88
|
-
const formattedErrors = stats.errors?.map(formatMessage);
|
|
89
|
-
const formattedWarnings = stats.warnings?.map(formatMessage);
|
|
90
|
-
|
|
91
|
-
errors: formattedErrors
|
|
92
|
-
warnings: formattedWarnings
|
|
60
|
+
const formattedErrors = stats.errors?.map(formatMessage) || [];
|
|
61
|
+
const formattedWarnings = stats.warnings?.map(formatMessage) || [];
|
|
62
|
+
return {
|
|
63
|
+
errors: formattedErrors,
|
|
64
|
+
warnings: formattedWarnings
|
|
93
65
|
};
|
|
94
|
-
if (result.errors?.some(isLikelyASyntaxError)) {
|
|
95
|
-
result.errors = result.errors.filter(isLikelyASyntaxError);
|
|
96
|
-
}
|
|
97
|
-
if (result.errors.length > 1) {
|
|
98
|
-
result.errors.length = 1;
|
|
99
|
-
}
|
|
100
|
-
return result;
|
|
101
66
|
}
|
|
102
67
|
// Annotate the CommonJS export names for ESM import in node:
|
|
103
68
|
0 && (module.exports = {
|