@rspack/dev-server 2.0.0-rc.2 → 2.0.0-rc.3
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/client/modules/logger/Logger.d.ts +3 -4
- package/client/modules/logger/Logger.js +9 -11
- package/client/modules/logger/index.d.ts +9 -1
- package/client/modules/logger/index.js +4 -5
- package/client/type.js +1 -0
- package/client/utils/ansiHTML.js +1 -1
- package/dist/0~chokidar.js +1 -1
- package/dist/0~connect-history-api-fallback.js +2 -2
- package/dist/0~debug.js +2 -2
- package/dist/0~http-proxy-middleware.js +2 -2
- package/dist/0~launch-editor.js +2 -2
- package/dist/0~serve-static.js +2 -2
- package/dist/{108.js → 937.js} +5 -5
- package/dist/index.js +1 -1
- package/package.json +13 -13
|
@@ -11,12 +11,11 @@ import { type Args, type EXPECTED_ANY, type LogTypeEnum } from '../types.js';
|
|
|
11
11
|
declare const LOG_SYMBOL: unique symbol;
|
|
12
12
|
declare const TIMERS_SYMBOL: unique symbol;
|
|
13
13
|
declare const TIMERS_AGGREGATES_SYMBOL: unique symbol;
|
|
14
|
-
declare class
|
|
14
|
+
declare class RspackLogger {
|
|
15
15
|
private [LOG_SYMBOL];
|
|
16
16
|
private [TIMERS_SYMBOL];
|
|
17
17
|
private [TIMERS_AGGREGATES_SYMBOL];
|
|
18
|
-
|
|
19
|
-
constructor(log: (type: LogTypeEnum, args?: Args) => void, getChildLogger: (name: string | (() => string)) => WebpackLogger);
|
|
18
|
+
constructor(log: (type: LogTypeEnum, args?: Args) => void);
|
|
20
19
|
error(...args: Args): void;
|
|
21
20
|
warn(...args: Args): void;
|
|
22
21
|
info(...args: Args): void;
|
|
@@ -37,4 +36,4 @@ declare class WebpackLogger {
|
|
|
37
36
|
timeAggregate(label?: string): void;
|
|
38
37
|
timeAggregateEnd(label?: string): void;
|
|
39
38
|
}
|
|
40
|
-
export {
|
|
39
|
+
export { RspackLogger as Logger };
|
|
@@ -9,11 +9,11 @@ function _define_property(obj, key, value) {
|
|
|
9
9
|
else obj[key] = value;
|
|
10
10
|
return obj;
|
|
11
11
|
}
|
|
12
|
-
const LOG_SYMBOL = Symbol('
|
|
13
|
-
const TIMERS_SYMBOL = Symbol('
|
|
14
|
-
const TIMERS_AGGREGATES_SYMBOL = Symbol('
|
|
12
|
+
const LOG_SYMBOL = Symbol('rspack logger raw log method');
|
|
13
|
+
const TIMERS_SYMBOL = Symbol('rspack logger times');
|
|
14
|
+
const TIMERS_AGGREGATES_SYMBOL = Symbol('rspack logger aggregated times');
|
|
15
15
|
let _LOG_SYMBOL = LOG_SYMBOL, _TIMERS_SYMBOL = TIMERS_SYMBOL, _TIMERS_AGGREGATES_SYMBOL = TIMERS_AGGREGATES_SYMBOL;
|
|
16
|
-
class
|
|
16
|
+
class RspackLogger {
|
|
17
17
|
error(...args) {
|
|
18
18
|
this[LOG_SYMBOL](LogType.error, args);
|
|
19
19
|
}
|
|
@@ -68,7 +68,7 @@ class WebpackLogger {
|
|
|
68
68
|
}
|
|
69
69
|
timeLog(label) {
|
|
70
70
|
const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
|
71
|
-
if (!prev) throw new Error(`No such label '${label}' for
|
|
71
|
+
if (!prev) throw new Error(`No such label '${label}' for RspackLogger.timeLog()`);
|
|
72
72
|
const time = process.hrtime(prev);
|
|
73
73
|
this[LOG_SYMBOL](LogType.time, [
|
|
74
74
|
label,
|
|
@@ -77,7 +77,7 @@ class WebpackLogger {
|
|
|
77
77
|
}
|
|
78
78
|
timeEnd(label) {
|
|
79
79
|
const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
|
80
|
-
if (!prev) throw new Error(`No such label '${label}' for
|
|
80
|
+
if (!prev) throw new Error(`No such label '${label}' for RspackLogger.timeEnd()`);
|
|
81
81
|
const time = process.hrtime(prev);
|
|
82
82
|
this[TIMERS_SYMBOL].delete(label);
|
|
83
83
|
this[LOG_SYMBOL](LogType.time, [
|
|
@@ -87,7 +87,7 @@ class WebpackLogger {
|
|
|
87
87
|
}
|
|
88
88
|
timeAggregate(label) {
|
|
89
89
|
const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
|
90
|
-
if (!prev) throw new Error(`No such label '${label}' for
|
|
90
|
+
if (!prev) throw new Error(`No such label '${label}' for RspackLogger.timeAggregate()`);
|
|
91
91
|
const time = process.hrtime(prev);
|
|
92
92
|
this[TIMERS_SYMBOL].delete(label);
|
|
93
93
|
this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
|
|
@@ -111,13 +111,11 @@ class WebpackLogger {
|
|
|
111
111
|
...time
|
|
112
112
|
]);
|
|
113
113
|
}
|
|
114
|
-
constructor(log
|
|
114
|
+
constructor(log){
|
|
115
115
|
_define_property(this, _LOG_SYMBOL, void 0);
|
|
116
116
|
_define_property(this, _TIMERS_SYMBOL, new Map());
|
|
117
117
|
_define_property(this, _TIMERS_AGGREGATES_SYMBOL, new Map());
|
|
118
|
-
_define_property(this, "getChildLogger", void 0);
|
|
119
118
|
this[LOG_SYMBOL] = log;
|
|
120
|
-
this.getChildLogger = getChildLogger;
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
|
-
export {
|
|
121
|
+
export { RspackLogger as Logger };
|
|
@@ -9,10 +9,18 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { Logger } from './Logger.js';
|
|
11
11
|
import type { LoggerOptions } from '../types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Client stub for tapable SyncBailHook
|
|
14
|
+
*/
|
|
15
|
+
declare class SyncBailHook {
|
|
16
|
+
constructor(_args?: string[]);
|
|
17
|
+
call(_origin?: string, _type?: string, _args?: unknown): undefined;
|
|
18
|
+
}
|
|
12
19
|
export declare const logger: {
|
|
13
20
|
getLogger: (name: string) => Logger;
|
|
14
21
|
configureDefaultLogger: (options: LoggerOptions) => void;
|
|
15
22
|
hooks: {
|
|
16
|
-
log:
|
|
23
|
+
log: SyncBailHook;
|
|
17
24
|
};
|
|
18
25
|
};
|
|
26
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Logger } from "./Logger.js";
|
|
2
2
|
import createConsoleLogger from "./createConsoleLogger.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
3
|
+
class SyncBailHook {
|
|
4
|
+
call(_origin, _type, _args) {}
|
|
5
|
+
constructor(_args){}
|
|
7
6
|
}
|
|
8
7
|
const currentDefaultLoggerOptions = {
|
|
9
8
|
level: 'info',
|
|
@@ -17,7 +16,7 @@ const configureDefaultLogger = (options)=>{
|
|
|
17
16
|
};
|
|
18
17
|
const getLogger = (name)=>new Logger((type, args)=>{
|
|
19
18
|
if (void 0 === hooks.log.call(name, type, args)) currentDefaultLogger(name, type, args);
|
|
20
|
-
}
|
|
19
|
+
});
|
|
21
20
|
const hooks = {
|
|
22
21
|
log: new SyncBailHook([
|
|
23
22
|
'origin',
|
package/client/type.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/client/utils/ansiHTML.js
CHANGED
|
@@ -96,7 +96,7 @@ function normalizeSeq(seq) {
|
|
|
96
96
|
function ansiHTML(text) {
|
|
97
97
|
if (!_regANSI.test(text)) return text;
|
|
98
98
|
const ansiCodes = [];
|
|
99
|
-
let ret = text.replace(/\
|
|
99
|
+
let ret = text.replace(/\x1b\[(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?m/g, (m)=>{
|
|
100
100
|
var _m_match;
|
|
101
101
|
const match = null == (_m_match = m.match(/(;?\d+)/g)) ? void 0 : _m_match.map(normalizeSeq);
|
|
102
102
|
Object.defineProperty(match, 'advance', {
|
package/dist/0~chokidar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! LICENSE: 0~chokidar.js.LICENSE.txt */
|
|
2
|
-
import { __webpack_require__ } from "./
|
|
2
|
+
import { __webpack_require__ } from "./937.js";
|
|
3
3
|
import { EventEmitter } from "node:events";
|
|
4
4
|
import { stat as external_node_fs_stat, unwatchFile, watch, watchFile } from "node:fs";
|
|
5
5
|
import { lstat, open as promises_open, readdir, realpath as promises_realpath, stat as promises_stat } from "node:fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./
|
|
2
|
-
import "./
|
|
1
|
+
import { __webpack_require__ } from "./937.js";
|
|
2
|
+
import "./937.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
4
|
"./node_modules/.pnpm/connect-history-api-fallback@2.0.0/node_modules/connect-history-api-fallback/lib/index.js" (module, exports, __webpack_require__) {
|
|
5
5
|
var url = __webpack_require__("url");
|
package/dist/0~debug.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./
|
|
2
|
-
import "./
|
|
1
|
+
import { __webpack_require__ } from "./937.js";
|
|
2
|
+
import "./937.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
4
|
"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js" (module, exports, __webpack_require__) {
|
|
5
5
|
exports.formatArgs = formatArgs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! LICENSE: 0~http-proxy-middleware.js.LICENSE.txt */
|
|
2
|
-
import { __webpack_require__ } from "./
|
|
3
|
-
import "./
|
|
2
|
+
import { __webpack_require__ } from "./937.js";
|
|
3
|
+
import "./937.js";
|
|
4
4
|
import "./0~debug.js";
|
|
5
5
|
__webpack_require__.add({
|
|
6
6
|
"./node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
package/dist/0~launch-editor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./
|
|
2
|
-
import "./
|
|
1
|
+
import { __webpack_require__ } from "./937.js";
|
|
2
|
+
import "./937.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
4
|
"./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js" (module) {
|
|
5
5
|
module.exports = {
|
package/dist/0~serve-static.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! LICENSE: 0~serve-static.js.LICENSE.txt */
|
|
2
|
-
import { __webpack_require__ } from "./
|
|
3
|
-
import "./
|
|
2
|
+
import { __webpack_require__ } from "./937.js";
|
|
3
|
+
import "./937.js";
|
|
4
4
|
import "./0~debug.js";
|
|
5
5
|
__webpack_require__.add({
|
|
6
6
|
"./node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
package/dist/{108.js → 937.js}
RENAMED
|
@@ -85,8 +85,8 @@ var __webpack_require__temp = __webpack_require__;
|
|
|
85
85
|
})();
|
|
86
86
|
(()=>{
|
|
87
87
|
var installedChunks = {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
410: 0,
|
|
89
|
+
937: 0
|
|
90
90
|
};
|
|
91
91
|
var installChunk = (data)=>{
|
|
92
92
|
var __rspack_esm_ids = data.__rspack_esm_ids;
|
|
@@ -104,7 +104,7 @@ var __webpack_require__temp = __webpack_require__;
|
|
|
104
104
|
__webpack_require__.C = installChunk;
|
|
105
105
|
})();
|
|
106
106
|
__webpack_require__.add({
|
|
107
|
-
"./node_modules/.pnpm/http-compression@1.1.
|
|
107
|
+
"./node_modules/.pnpm/http-compression@1.1.3/node_modules/http-compression/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
108
108
|
const zlib = __webpack_require__("zlib");
|
|
109
109
|
const MIMES = /text|javascript|\/json|xml/i;
|
|
110
110
|
const noop = ()=>{};
|
|
@@ -3879,7 +3879,7 @@ class WebsocketServer extends servers_BaseServer {
|
|
|
3879
3879
|
});
|
|
3880
3880
|
}
|
|
3881
3881
|
}
|
|
3882
|
-
const src = __webpack_require__("./node_modules/.pnpm/http-compression@1.1.
|
|
3882
|
+
const src = __webpack_require__("./node_modules/.pnpm/http-compression@1.1.3/node_modules/http-compression/src/index.js");
|
|
3883
3883
|
var src_default = /*#__PURE__*/ __webpack_require__.n(src);
|
|
3884
3884
|
const ipaddr = __webpack_require__("./node_modules/.pnpm/ipaddr.js@2.3.0/node_modules/ipaddr.js/lib/ipaddr.js");
|
|
3885
3885
|
var ipaddr_default = /*#__PURE__*/ __webpack_require__.n(ipaddr);
|
|
@@ -4447,7 +4447,7 @@ class Server {
|
|
|
4447
4447
|
#getClientTransport() {
|
|
4448
4448
|
let clientImplementation;
|
|
4449
4449
|
let clientImplementationFound = true;
|
|
4450
|
-
|
|
4450
|
+
const clientTransport = 'object' == typeof this.options.client && null !== this.options.client && void 0 !== this.options.client.webSocketTransport ? this.options.client.webSocketTransport : 'ws';
|
|
4451
4451
|
switch(typeof clientTransport){
|
|
4452
4452
|
case 'string':
|
|
4453
4453
|
if ('sockjs' === clientTransport) throw new Error("SockJS support has been removed. Please set client.webSocketTransport to 'ws' or provide a custom transport implementation path.");
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RspackDevServer } from "./
|
|
1
|
+
export { RspackDevServer } from "./937.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/dev-server",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
4
|
-
"description": "Development server for
|
|
3
|
+
"version": "2.0.0-rc.3",
|
|
4
|
+
"description": "Development server for Rspack",
|
|
5
5
|
"homepage": "https://rspack.rs",
|
|
6
6
|
"bugs": "https://github.com/rstackjs/rspack-dev-server/issues",
|
|
7
7
|
"repository": {
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/dev-middleware": "^2.0.
|
|
49
|
+
"@rspack/dev-middleware": "^2.0.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@hono/node-server": "^1.19.
|
|
53
|
-
"@microsoft/api-extractor": "^7.58.
|
|
54
|
-
"@rslib/core": "^0.
|
|
55
|
-
"@rslint/core": "^0.
|
|
52
|
+
"@hono/node-server": "^1.19.14",
|
|
53
|
+
"@microsoft/api-extractor": "^7.58.2",
|
|
54
|
+
"@rslib/core": "^0.21.1",
|
|
55
|
+
"@rslint/core": "^0.4.2",
|
|
56
56
|
"@rspack/core": "2.0.0-rc.0",
|
|
57
|
-
"@rspack/plugin-react-refresh": "1.6.
|
|
58
|
-
"@rstest/core": "^0.9.
|
|
57
|
+
"@rspack/plugin-react-refresh": "1.6.2",
|
|
58
|
+
"@rstest/core": "^0.9.7",
|
|
59
59
|
"@types/connect-history-api-fallback": "^1.5.4",
|
|
60
60
|
"@types/mime-types": "3.0.1",
|
|
61
|
-
"@types/node": "^24.12.
|
|
61
|
+
"@types/node": "^24.12.2",
|
|
62
62
|
"@types/serve-static": "^2.2.0",
|
|
63
63
|
"@types/trusted-types": "^2.0.7",
|
|
64
64
|
"@types/ws": "8.18.1",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"connect-next": "^4.0.1",
|
|
68
68
|
"cross-env": "^10.1.0",
|
|
69
69
|
"express": "^5.2.1",
|
|
70
|
-
"hono": "^4.12.
|
|
71
|
-
"http-compression": "^1.1.
|
|
70
|
+
"hono": "^4.12.14",
|
|
71
|
+
"http-compression": "^1.1.3",
|
|
72
72
|
"http-proxy": "^1.18.1",
|
|
73
73
|
"http-proxy-middleware": "^3.0.5",
|
|
74
74
|
"ipaddr.js": "^2.3.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"nano-staged": "^0.9.0",
|
|
77
77
|
"open": "^11.0.0",
|
|
78
78
|
"p-retry": "^7.1.1",
|
|
79
|
-
"prettier": "3.8.
|
|
79
|
+
"prettier": "3.8.3",
|
|
80
80
|
"puppeteer": "^24.40.0",
|
|
81
81
|
"react-refresh": "0.18.0",
|
|
82
82
|
"require-from-string": "^2.0.2",
|