@rspack/dev-server 2.0.3 → 2.2.0
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/createConsoleLogger.d.ts +1 -1
- package/client/modules/logger/index.d.ts +4 -2
- package/client/overlay.d.ts +1 -1
- package/client/overlay.js +2 -1
- package/client/utils/ansiHTML.d.ts +1 -1
- package/client/utils/ansiHTML.js +1 -1
- package/dist/0~chokidar.js +45 -46
- package/dist/0~connect-history-api-fallback.js +2 -2
- package/dist/0~connect-next.js +43 -39
- package/dist/0~debug.js +10 -10
- package/dist/0~http-proxy-middleware.js +136 -69
- package/dist/0~launch-editor.js +111 -63
- package/dist/0~serve-static.js +9 -9
- package/dist/{465.js → 619.js} +116 -123
- package/dist/index.js +1 -1
- package/package.json +18 -19
package/dist/{465.js → 619.js}
RENAMED
|
@@ -2,12 +2,12 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import { devMiddleware } from "@rspack/dev-middleware";
|
|
3
3
|
import { createRequire as __rspack_createRequire } from "node:module";
|
|
4
4
|
const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
5
|
+
import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
|
|
6
|
+
import * as __rspack_external_node_os_4f3c9d58 from "node:os";
|
|
7
|
+
import * as __rspack_external_node_path_806ed179 from "node:path";
|
|
8
|
+
import * as __rspack_external_node_url_3991086a from "node:url";
|
|
9
|
+
import * as __rspack_external_node_util_ac04460e from "node:util";
|
|
10
|
+
import * as __rspack_external_node_net_5ed819e1 from "node:net";
|
|
11
11
|
var __webpack_modules__ = {};
|
|
12
12
|
var __webpack_module_cache__ = {};
|
|
13
13
|
function __webpack_require__(moduleId) {
|
|
@@ -57,11 +57,15 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
57
57
|
};
|
|
58
58
|
})();
|
|
59
59
|
(()=>{
|
|
60
|
-
__webpack_require__.d = (exports,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
__webpack_require__.d = (exports, getters, values)=>{
|
|
61
|
+
var define = (defs, kind)=>{
|
|
62
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
[kind]: defs[key]
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
define(getters, "get");
|
|
68
|
+
define(values, "value");
|
|
65
69
|
};
|
|
66
70
|
})();
|
|
67
71
|
(()=>{
|
|
@@ -86,14 +90,14 @@ var __webpack_require__temp = __webpack_require__;
|
|
|
86
90
|
(()=>{
|
|
87
91
|
var installedChunks = {
|
|
88
92
|
410: 0,
|
|
89
|
-
|
|
93
|
+
619: 0
|
|
90
94
|
};
|
|
91
95
|
var installChunk = (data)=>{
|
|
92
96
|
var __rspack_esm_ids = data.__rspack_esm_ids;
|
|
93
|
-
var
|
|
97
|
+
var moreModules = data.__webpack_modules__;
|
|
94
98
|
var __rspack_esm_runtime = data.__rspack_esm_runtime;
|
|
95
99
|
var moduleId, chunkId, i = 0;
|
|
96
|
-
for(moduleId in
|
|
100
|
+
for(moduleId in moreModules)if (__webpack_require__.o(moreModules, moduleId)) __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
97
101
|
if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
|
|
98
102
|
for(; i < __rspack_esm_ids.length; i++){
|
|
99
103
|
chunkId = __rspack_esm_ids[i];
|
|
@@ -1308,8 +1312,8 @@ __webpack_require__.add({
|
|
|
1308
1312
|
else root.ipaddr = ipaddr;
|
|
1309
1313
|
})(this);
|
|
1310
1314
|
},
|
|
1311
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
1312
|
-
const { EMPTY_BUFFER } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1315
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1316
|
+
const { EMPTY_BUFFER } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
1313
1317
|
const FastBuffer = Buffer[Symbol.species];
|
|
1314
1318
|
function concat(list, totalLength) {
|
|
1315
1319
|
if (0 === list.length) return EMPTY_BUFFER;
|
|
@@ -1354,7 +1358,7 @@ __webpack_require__.add({
|
|
|
1354
1358
|
unmask: _unmask
|
|
1355
1359
|
};
|
|
1356
1360
|
},
|
|
1357
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
1361
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js" (module) {
|
|
1358
1362
|
const BINARY_TYPES = [
|
|
1359
1363
|
'nodebuffer',
|
|
1360
1364
|
'arraybuffer',
|
|
@@ -1375,8 +1379,8 @@ __webpack_require__.add({
|
|
|
1375
1379
|
NOOP: ()=>{}
|
|
1376
1380
|
};
|
|
1377
1381
|
},
|
|
1378
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
1379
|
-
const { kForOnEventAttribute, kListener } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1382
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/event-target.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1383
|
+
const { kForOnEventAttribute, kListener } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
1380
1384
|
const kCode = Symbol('kCode');
|
|
1381
1385
|
const kData = Symbol('kData');
|
|
1382
1386
|
const kError = Symbol('kError');
|
|
@@ -1520,8 +1524,8 @@ __webpack_require__.add({
|
|
|
1520
1524
|
else listener.call(thisArg, event);
|
|
1521
1525
|
}
|
|
1522
1526
|
},
|
|
1523
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
1524
|
-
const { tokenChars } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1527
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1528
|
+
const { tokenChars } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js");
|
|
1525
1529
|
function push(dest, name, elem) {
|
|
1526
1530
|
if (void 0 === dest[name]) dest[name] = [
|
|
1527
1531
|
elem
|
|
@@ -1642,7 +1646,7 @@ __webpack_require__.add({
|
|
|
1642
1646
|
parse
|
|
1643
1647
|
};
|
|
1644
1648
|
},
|
|
1645
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
1649
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js" (module) {
|
|
1646
1650
|
const kDone = Symbol('kDone');
|
|
1647
1651
|
const kRun = Symbol('kRun');
|
|
1648
1652
|
class Limiter {
|
|
@@ -1670,11 +1674,11 @@ __webpack_require__.add({
|
|
|
1670
1674
|
}
|
|
1671
1675
|
module.exports = Limiter;
|
|
1672
1676
|
},
|
|
1673
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
1677
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1674
1678
|
const zlib = __webpack_require__("zlib");
|
|
1675
|
-
const bufferUtil = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1676
|
-
const Limiter = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1677
|
-
const { kStatusCode } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1679
|
+
const bufferUtil = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js");
|
|
1680
|
+
const Limiter = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js");
|
|
1681
|
+
const { kStatusCode } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
1678
1682
|
const FastBuffer = Buffer[Symbol.species];
|
|
1679
1683
|
const TRAILER = Buffer.from([
|
|
1680
1684
|
0x00,
|
|
@@ -1879,12 +1883,12 @@ __webpack_require__.add({
|
|
|
1879
1883
|
this[kCallback](err);
|
|
1880
1884
|
}
|
|
1881
1885
|
},
|
|
1882
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
1886
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1883
1887
|
const { Writable } = __webpack_require__("stream");
|
|
1884
|
-
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1885
|
-
const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1886
|
-
const { concat, toArrayBuffer, unmask } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1887
|
-
const { isValidStatusCode, isValidUTF8 } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
1888
|
+
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js");
|
|
1889
|
+
const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
1890
|
+
const { concat, toArrayBuffer, unmask } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js");
|
|
1891
|
+
const { isValidStatusCode, isValidUTF8 } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js");
|
|
1888
1892
|
const FastBuffer = Buffer[Symbol.species];
|
|
1889
1893
|
const GET_INFO = 0;
|
|
1890
1894
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
@@ -1916,6 +1920,7 @@ __webpack_require__.add({
|
|
|
1916
1920
|
this._opcode = 0;
|
|
1917
1921
|
this._totalPayloadLength = 0;
|
|
1918
1922
|
this._messageLength = 0;
|
|
1923
|
+
this._numFragments = 0;
|
|
1919
1924
|
this._fragments = [];
|
|
1920
1925
|
this._errored = false;
|
|
1921
1926
|
this._loop = false;
|
|
@@ -2106,17 +2111,17 @@ __webpack_require__.add({
|
|
|
2106
2111
|
if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask);
|
|
2107
2112
|
}
|
|
2108
2113
|
if (this._opcode > 0x07) return void this.controlMessage(data, cb);
|
|
2114
|
+
if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
|
|
2115
|
+
const error = this.createError(RangeError, 'Too many message fragments', false, 1008, 'WS_ERR_TOO_MANY_BUFFERED_PARTS');
|
|
2116
|
+
cb(error);
|
|
2117
|
+
return;
|
|
2118
|
+
}
|
|
2109
2119
|
if (this._compressed) {
|
|
2110
2120
|
this._state = INFLATING;
|
|
2111
2121
|
this.decompress(data, cb);
|
|
2112
2122
|
return;
|
|
2113
2123
|
}
|
|
2114
2124
|
if (data.length) {
|
|
2115
|
-
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
2116
|
-
const error = this.createError(RangeError, 'Too many message fragments', false, 1008, 'WS_ERR_TOO_MANY_BUFFERED_PARTS');
|
|
2117
|
-
cb(error);
|
|
2118
|
-
return;
|
|
2119
|
-
}
|
|
2120
2125
|
this._messageLength = this._totalPayloadLength;
|
|
2121
2126
|
this._fragments.push(data);
|
|
2122
2127
|
}
|
|
@@ -2133,11 +2138,6 @@ __webpack_require__.add({
|
|
|
2133
2138
|
cb(error);
|
|
2134
2139
|
return;
|
|
2135
2140
|
}
|
|
2136
|
-
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
2137
|
-
const error = this.createError(RangeError, 'Too many message fragments', false, 1008, 'WS_ERR_TOO_MANY_BUFFERED_PARTS');
|
|
2138
|
-
cb(error);
|
|
2139
|
-
return;
|
|
2140
|
-
}
|
|
2141
2141
|
this._fragments.push(buf);
|
|
2142
2142
|
}
|
|
2143
2143
|
this.dataMessage(cb);
|
|
@@ -2154,6 +2154,7 @@ __webpack_require__.add({
|
|
|
2154
2154
|
this._totalPayloadLength = 0;
|
|
2155
2155
|
this._messageLength = 0;
|
|
2156
2156
|
this._fragmented = 0;
|
|
2157
|
+
this._numFragments = 0;
|
|
2157
2158
|
this._fragments = [];
|
|
2158
2159
|
if (2 === this._opcode) {
|
|
2159
2160
|
let data;
|
|
@@ -2239,14 +2240,14 @@ __webpack_require__.add({
|
|
|
2239
2240
|
}
|
|
2240
2241
|
module.exports = Receiver;
|
|
2241
2242
|
},
|
|
2242
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
2243
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2243
2244
|
const { Duplex } = __webpack_require__("stream");
|
|
2244
2245
|
const { randomFillSync } = __webpack_require__("crypto");
|
|
2245
2246
|
const { types: { isUint8Array } } = __webpack_require__("util");
|
|
2246
|
-
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2247
|
-
const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2248
|
-
const { isBlob, isValidStatusCode } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2249
|
-
const { mask: applyMask, toBuffer } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2247
|
+
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js");
|
|
2248
|
+
const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
2249
|
+
const { isBlob, isValidStatusCode } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js");
|
|
2250
|
+
const { mask: applyMask, toBuffer } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js");
|
|
2250
2251
|
const kByteLength = Symbol('kByteLength');
|
|
2251
2252
|
const maskBuffer = Buffer.alloc(4);
|
|
2252
2253
|
const RANDOM_POOL_SIZE = 8192;
|
|
@@ -2590,8 +2591,8 @@ __webpack_require__.add({
|
|
|
2590
2591
|
sender.onerror(err);
|
|
2591
2592
|
}
|
|
2592
2593
|
},
|
|
2593
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
2594
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2594
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/stream.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2595
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js");
|
|
2595
2596
|
const { Duplex } = __webpack_require__("stream");
|
|
2596
2597
|
function emitClose(stream) {
|
|
2597
2598
|
stream.emit('close');
|
|
@@ -2673,8 +2674,8 @@ __webpack_require__.add({
|
|
|
2673
2674
|
}
|
|
2674
2675
|
module.exports = createWebSocketStream;
|
|
2675
2676
|
},
|
|
2676
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
2677
|
-
const { tokenChars } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2677
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2678
|
+
const { tokenChars } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js");
|
|
2678
2679
|
function parse(header) {
|
|
2679
2680
|
const protocols = new Set();
|
|
2680
2681
|
let start = -1;
|
|
@@ -2705,9 +2706,9 @@ __webpack_require__.add({
|
|
|
2705
2706
|
parse
|
|
2706
2707
|
};
|
|
2707
2708
|
},
|
|
2708
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
2709
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2709
2710
|
const { isUtf8 } = __webpack_require__("buffer");
|
|
2710
|
-
const { hasBlob } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2711
|
+
const { hasBlob } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
2711
2712
|
const tokenChars = [
|
|
2712
2713
|
0,
|
|
2713
2714
|
0,
|
|
@@ -2871,16 +2872,16 @@ __webpack_require__.add({
|
|
|
2871
2872
|
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
|
|
2872
2873
|
};
|
|
2873
2874
|
},
|
|
2874
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
2875
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2875
2876
|
const EventEmitter = __webpack_require__("events");
|
|
2876
2877
|
const http = __webpack_require__("http");
|
|
2877
2878
|
const { Duplex } = __webpack_require__("stream");
|
|
2878
2879
|
const { createHash } = __webpack_require__("crypto");
|
|
2879
|
-
const extension = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2880
|
-
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2881
|
-
const subprotocol = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2882
|
-
const WebSocket = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2883
|
-
const { CLOSE_TIMEOUT, GUID, kWebSocket } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
2880
|
+
const extension = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js");
|
|
2881
|
+
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js");
|
|
2882
|
+
const subprotocol = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js");
|
|
2883
|
+
const WebSocket = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js");
|
|
2884
|
+
const { CLOSE_TIMEOUT, GUID, kWebSocket } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
2884
2885
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
2885
2886
|
const RUNNING = 0;
|
|
2886
2887
|
const CLOSING = 1;
|
|
@@ -2891,8 +2892,8 @@ __webpack_require__.add({
|
|
|
2891
2892
|
options = {
|
|
2892
2893
|
allowSynchronousEvents: true,
|
|
2893
2894
|
autoPong: true,
|
|
2894
|
-
maxBufferedChunks:
|
|
2895
|
-
maxFragments:
|
|
2895
|
+
maxBufferedChunks: 262144,
|
|
2896
|
+
maxFragments: 16384,
|
|
2896
2897
|
maxPayload: 104857600,
|
|
2897
2898
|
skipUTF8Validation: false,
|
|
2898
2899
|
perMessageDeflate: false,
|
|
@@ -3133,7 +3134,7 @@ __webpack_require__.add({
|
|
|
3133
3134
|
} else abortHandshake(socket, code, message, headers);
|
|
3134
3135
|
}
|
|
3135
3136
|
},
|
|
3136
|
-
"./node_modules/.pnpm/ws@8.21.
|
|
3137
|
+
"./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
3137
3138
|
const EventEmitter = __webpack_require__("events");
|
|
3138
3139
|
const https = __webpack_require__("https");
|
|
3139
3140
|
const http = __webpack_require__("http");
|
|
@@ -3142,14 +3143,14 @@ __webpack_require__.add({
|
|
|
3142
3143
|
const { randomBytes, createHash } = __webpack_require__("crypto");
|
|
3143
3144
|
const { Duplex, Readable } = __webpack_require__("stream");
|
|
3144
3145
|
const { URL: URL1 } = __webpack_require__("url?b918");
|
|
3145
|
-
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3146
|
-
const Receiver = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3147
|
-
const Sender = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3148
|
-
const { isBlob } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3149
|
-
const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3150
|
-
const { EventTarget: { addEventListener, removeEventListener } } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3151
|
-
const { format, parse } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3152
|
-
const { toBuffer } = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3146
|
+
const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js");
|
|
3147
|
+
const Receiver = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js");
|
|
3148
|
+
const Sender = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js");
|
|
3149
|
+
const { isBlob } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js");
|
|
3150
|
+
const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
|
|
3151
|
+
const { EventTarget: { addEventListener, removeEventListener } } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/event-target.js");
|
|
3152
|
+
const { format, parse } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js");
|
|
3153
|
+
const { toBuffer } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js");
|
|
3153
3154
|
const kAborted = Symbol('kAborted');
|
|
3154
3155
|
const protocolVersions = [
|
|
3155
3156
|
8,
|
|
@@ -3448,8 +3449,8 @@ __webpack_require__.add({
|
|
|
3448
3449
|
autoPong: true,
|
|
3449
3450
|
closeTimeout: CLOSE_TIMEOUT,
|
|
3450
3451
|
protocolVersion: protocolVersions[1],
|
|
3451
|
-
maxBufferedChunks:
|
|
3452
|
-
maxFragments:
|
|
3452
|
+
maxBufferedChunks: 262144,
|
|
3453
|
+
maxFragments: 16384,
|
|
3453
3454
|
maxPayload: 104857600,
|
|
3454
3455
|
skipUTF8Validation: false,
|
|
3455
3456
|
perMessageDeflate: true,
|
|
@@ -3835,7 +3836,7 @@ __webpack_require__.add({
|
|
|
3835
3836
|
const minPort = 1024;
|
|
3836
3837
|
const maxPort = 65535;
|
|
3837
3838
|
const getLocalHosts = ()=>{
|
|
3838
|
-
const interfaces =
|
|
3839
|
+
const interfaces = __rspack_external_node_os_4f3c9d58.networkInterfaces();
|
|
3839
3840
|
const results = new Set([
|
|
3840
3841
|
void 0,
|
|
3841
3842
|
'0.0.0.0'
|
|
@@ -3844,7 +3845,7 @@ const getLocalHosts = ()=>{
|
|
|
3844
3845
|
return results;
|
|
3845
3846
|
};
|
|
3846
3847
|
const checkAvailablePort = (basePort, host)=>new Promise((resolve, reject)=>{
|
|
3847
|
-
const server =
|
|
3848
|
+
const server = __rspack_external_node_net_5ed819e1.createServer();
|
|
3848
3849
|
server.unref();
|
|
3849
3850
|
server.on('error', reject);
|
|
3850
3851
|
server.listen(basePort, host, ()=>{
|
|
@@ -3886,14 +3887,14 @@ async function getPort(basePort, host) {
|
|
|
3886
3887
|
}
|
|
3887
3888
|
throw new Error('No available ports found');
|
|
3888
3889
|
}
|
|
3889
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3890
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3891
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3892
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3893
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3894
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3895
|
-
__webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3896
|
-
const websocket_server = __webpack_require__("./node_modules/.pnpm/ws@8.21.
|
|
3890
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/stream.js");
|
|
3891
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js");
|
|
3892
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js");
|
|
3893
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js");
|
|
3894
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js");
|
|
3895
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js");
|
|
3896
|
+
__webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js");
|
|
3897
|
+
const websocket_server = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js");
|
|
3897
3898
|
class BaseServer {
|
|
3898
3899
|
server;
|
|
3899
3900
|
clients;
|
|
@@ -3956,7 +3957,7 @@ const src = __webpack_require__("./node_modules/.pnpm/http-compression@1.1.3/nod
|
|
|
3956
3957
|
var src_default = /*#__PURE__*/ __webpack_require__.n(src);
|
|
3957
3958
|
const ipaddr = __webpack_require__("./node_modules/.pnpm/ipaddr.js@2.4.0/node_modules/ipaddr.js/lib/ipaddr.js");
|
|
3958
3959
|
var ipaddr_default = /*#__PURE__*/ __webpack_require__.n(ipaddr);
|
|
3959
|
-
const { styleText: styleText } =
|
|
3960
|
+
const { styleText: styleText } = __rspack_external_node_util_ac04460e;
|
|
3960
3961
|
const server_require = createRequire(import.meta.url);
|
|
3961
3962
|
if (!process.env.RSPACK_SERVE) process.env.RSPACK_SERVE = 'true';
|
|
3962
3963
|
const getConnect = async ()=>{
|
|
@@ -4020,7 +4021,7 @@ class Server {
|
|
|
4020
4021
|
static findIp(gatewayOrFamily, isInternal) {
|
|
4021
4022
|
if ('v4' === gatewayOrFamily || 'v6' === gatewayOrFamily) {
|
|
4022
4023
|
let host;
|
|
4023
|
-
const networks = Object.values(
|
|
4024
|
+
const networks = Object.values(__rspack_external_node_os_4f3c9d58.networkInterfaces()).flatMap((networks)=>networks ?? []).filter((network)=>{
|
|
4024
4025
|
if (!network || !network.address) return false;
|
|
4025
4026
|
if (network.family !== `IP${gatewayOrFamily}`) return false;
|
|
4026
4027
|
if (void 0 !== isInternal && network.internal !== isInternal) return false;
|
|
@@ -4037,7 +4038,7 @@ class Server {
|
|
|
4037
4038
|
return host;
|
|
4038
4039
|
}
|
|
4039
4040
|
const gatewayIp = ipaddr_default().parse(gatewayOrFamily);
|
|
4040
|
-
for (const addresses of Object.values(
|
|
4041
|
+
for (const addresses of Object.values(__rspack_external_node_os_4f3c9d58.networkInterfaces()))for (const { cidr } of addresses){
|
|
4041
4042
|
const net = ipaddr_default().parseCIDR(cidr);
|
|
4042
4043
|
if (net[0] && net[0].kind() === gatewayIp.kind() && gatewayIp.match(net)) return net[0].toString();
|
|
4043
4044
|
}
|
|
@@ -4062,19 +4063,19 @@ class Server {
|
|
|
4062
4063
|
let dir = cwd;
|
|
4063
4064
|
for(;;){
|
|
4064
4065
|
try {
|
|
4065
|
-
if (
|
|
4066
|
+
if (__rspack_external_node_fs_1b05aee1.statSync(__rspack_external_node_path_806ed179.join(dir, 'package.json')).isFile()) break;
|
|
4066
4067
|
} catch {}
|
|
4067
|
-
const parent =
|
|
4068
|
+
const parent = __rspack_external_node_path_806ed179.dirname(dir);
|
|
4068
4069
|
if (dir === parent) {
|
|
4069
4070
|
dir = void 0;
|
|
4070
4071
|
break;
|
|
4071
4072
|
}
|
|
4072
4073
|
dir = parent;
|
|
4073
4074
|
}
|
|
4074
|
-
if (!dir) return
|
|
4075
|
-
if ('1' === process.versions.pnp) return
|
|
4076
|
-
if ('3' === process.versions.pnp) return
|
|
4077
|
-
return
|
|
4075
|
+
if (!dir) return __rspack_external_node_path_806ed179.resolve(cwd, '.cache/rspack-dev-server');
|
|
4076
|
+
if ('1' === process.versions.pnp) return __rspack_external_node_path_806ed179.resolve(dir, '.pnp/.cache/rspack-dev-server');
|
|
4077
|
+
if ('3' === process.versions.pnp) return __rspack_external_node_path_806ed179.resolve(dir, '.yarn/.cache/rspack-dev-server');
|
|
4078
|
+
return __rspack_external_node_path_806ed179.resolve(dir, 'node_modules/.cache/rspack-dev-server');
|
|
4078
4079
|
}
|
|
4079
4080
|
#addAdditionalEntries(compiler) {
|
|
4080
4081
|
const additionalEntries = [];
|
|
@@ -4178,7 +4179,7 @@ class Server {
|
|
|
4178
4179
|
};
|
|
4179
4180
|
const getStaticItem = (optionsForStatic)=>{
|
|
4180
4181
|
const getDefaultStaticOptions = ()=>({
|
|
4181
|
-
directory:
|
|
4182
|
+
directory: __rspack_external_node_path_806ed179.join(process.cwd(), 'public'),
|
|
4182
4183
|
staticOptions: {},
|
|
4183
4184
|
publicPath: [
|
|
4184
4185
|
'/'
|
|
@@ -4274,9 +4275,9 @@ class Server {
|
|
|
4274
4275
|
if (item) {
|
|
4275
4276
|
let stats = null;
|
|
4276
4277
|
try {
|
|
4277
|
-
stats =
|
|
4278
|
+
stats = __rspack_external_node_fs_1b05aee1.lstatSync(__rspack_external_node_fs_1b05aee1.realpathSync(item)).isFile();
|
|
4278
4279
|
} catch {}
|
|
4279
|
-
return stats ?
|
|
4280
|
+
return stats ? __rspack_external_node_fs_1b05aee1.readFileSync(item) : item;
|
|
4280
4281
|
}
|
|
4281
4282
|
};
|
|
4282
4283
|
serverOptions[property] = Array.isArray(value) ? value.map((item)=>readFile(item)) : readFile(value);
|
|
@@ -4284,21 +4285,21 @@ class Server {
|
|
|
4284
4285
|
let fakeCert;
|
|
4285
4286
|
if (!serverOptions.key || !serverOptions.cert) {
|
|
4286
4287
|
const certificateDir = Server.findCacheDir();
|
|
4287
|
-
const certificatePath =
|
|
4288
|
+
const certificatePath = __rspack_external_node_path_806ed179.join(certificateDir, 'server.pem');
|
|
4288
4289
|
let certificateExists;
|
|
4289
4290
|
try {
|
|
4290
|
-
const certificate = await
|
|
4291
|
+
const certificate = await __rspack_external_node_fs_1b05aee1.promises.stat(certificatePath);
|
|
4291
4292
|
certificateExists = certificate.isFile();
|
|
4292
4293
|
} catch {
|
|
4293
4294
|
certificateExists = false;
|
|
4294
4295
|
}
|
|
4295
4296
|
if (certificateExists) {
|
|
4296
4297
|
const certificateTtl = 86400000;
|
|
4297
|
-
const certificateStat = await
|
|
4298
|
+
const certificateStat = await __rspack_external_node_fs_1b05aee1.promises.stat(certificatePath);
|
|
4298
4299
|
const now = Number(new Date());
|
|
4299
4300
|
if ((now - Number(certificateStat.ctime)) / certificateTtl > 30) {
|
|
4300
4301
|
this.logger.info('SSL certificate is more than 30 days old. Removing...');
|
|
4301
|
-
await
|
|
4302
|
+
await __rspack_external_node_fs_1b05aee1.promises.rm(certificatePath, {
|
|
4302
4303
|
recursive: true
|
|
4303
4304
|
});
|
|
4304
4305
|
certificateExists = false;
|
|
@@ -4382,14 +4383,14 @@ class Server {
|
|
|
4382
4383
|
}
|
|
4383
4384
|
]
|
|
4384
4385
|
});
|
|
4385
|
-
await
|
|
4386
|
+
await __rspack_external_node_fs_1b05aee1.promises.mkdir(certificateDir, {
|
|
4386
4387
|
recursive: true
|
|
4387
4388
|
});
|
|
4388
|
-
await
|
|
4389
|
+
await __rspack_external_node_fs_1b05aee1.promises.writeFile(certificatePath, pems.private + pems.cert, {
|
|
4389
4390
|
encoding: 'utf8'
|
|
4390
4391
|
});
|
|
4391
4392
|
}
|
|
4392
|
-
fakeCert = await
|
|
4393
|
+
fakeCert = await __rspack_external_node_fs_1b05aee1.promises.readFile(certificatePath);
|
|
4393
4394
|
this.logger.info(`SSL certificate: ${certificatePath}`);
|
|
4394
4395
|
}
|
|
4395
4396
|
serverOptions.key = serverOptions.key || fakeCert;
|
|
@@ -4397,9 +4398,9 @@ class Server {
|
|
|
4397
4398
|
}
|
|
4398
4399
|
if ('boolean' == typeof options.ipc) {
|
|
4399
4400
|
const isWindows = 'win32' === process.platform;
|
|
4400
|
-
const pipePrefix = isWindows ? '\\\\.\\pipe\\' :
|
|
4401
|
-
const pipeName = '
|
|
4402
|
-
options.ipc =
|
|
4401
|
+
const pipePrefix = isWindows ? '\\\\.\\pipe\\' : __rspack_external_node_os_4f3c9d58.tmpdir();
|
|
4402
|
+
const pipeName = 'rspack-dev-server.sock';
|
|
4403
|
+
options.ipc = __rspack_external_node_path_806ed179.join(pipePrefix, pipeName);
|
|
4403
4404
|
}
|
|
4404
4405
|
options.liveReload = void 0 !== options.liveReload ? options.liveReload : true;
|
|
4405
4406
|
const defaultOpenOptions = {
|
|
@@ -4704,19 +4705,6 @@ class Server {
|
|
|
4704
4705
|
next();
|
|
4705
4706
|
}
|
|
4706
4707
|
});
|
|
4707
|
-
const isHTTP2 = 'http2' === this.options.server.type;
|
|
4708
|
-
if (isHTTP2) middlewares.push({
|
|
4709
|
-
name: 'http2-status-message-patch',
|
|
4710
|
-
middleware: (_req, res, next)=>{
|
|
4711
|
-
Object.defineProperty(res, 'statusMessage', {
|
|
4712
|
-
get () {
|
|
4713
|
-
return '';
|
|
4714
|
-
},
|
|
4715
|
-
set () {}
|
|
4716
|
-
});
|
|
4717
|
-
next();
|
|
4718
|
-
}
|
|
4719
|
-
});
|
|
4720
4708
|
if (this.options.compress) middlewares.push({
|
|
4721
4709
|
name: 'compression',
|
|
4722
4710
|
middleware: src_default()()
|
|
@@ -4748,7 +4736,7 @@ class Server {
|
|
|
4748
4736
|
const params = new URLSearchParams(resolveUrl.search);
|
|
4749
4737
|
const fileName = params.get('fileName');
|
|
4750
4738
|
if ('string' == typeof fileName) {
|
|
4751
|
-
const { default: launchEditor } = await import("./0~launch-editor.js").then(__webpack_require__.t.bind(__webpack_require__, "./node_modules/.pnpm/launch-editor@2.
|
|
4739
|
+
const { default: launchEditor } = await import("./0~launch-editor.js").then(__webpack_require__.t.bind(__webpack_require__, "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/index.js", 23));
|
|
4752
4740
|
launchEditor(fileName);
|
|
4753
4741
|
}
|
|
4754
4742
|
res.end();
|
|
@@ -4795,13 +4783,18 @@ class Server {
|
|
|
4795
4783
|
});
|
|
4796
4784
|
if (this.options.proxy) {
|
|
4797
4785
|
const { createProxyMiddleware } = await import("./0~http-proxy-middleware.js");
|
|
4786
|
+
const defaultProxyLogger = {
|
|
4787
|
+
info: this.logger.log.bind(this.logger),
|
|
4788
|
+
warn: this.logger.warn.bind(this.logger),
|
|
4789
|
+
error: this.logger.error.bind(this.logger)
|
|
4790
|
+
};
|
|
4798
4791
|
const getProxyMiddleware = (proxyConfig)=>{
|
|
4799
4792
|
const { context, ...proxyOptions } = proxyConfig;
|
|
4800
4793
|
const pathFilter = proxyOptions.pathFilter ?? context;
|
|
4801
4794
|
if (void 0 !== pathFilter) proxyOptions.pathFilter = pathFilter;
|
|
4802
|
-
if (void 0 === proxyOptions.logger) proxyOptions.logger =
|
|
4795
|
+
if (void 0 === proxyOptions.logger) proxyOptions.logger = defaultProxyLogger;
|
|
4803
4796
|
if (proxyOptions.target || proxyOptions.router) return createProxyMiddleware(proxyOptions);
|
|
4804
|
-
|
|
4797
|
+
__rspack_external_node_util_ac04460e.deprecate(()=>{}, `Invalid proxy configuration:\n\n${JSON.stringify(proxyConfig, null, 2)}\n\nThe use of proxy object notation as proxy routes has been removed.\nPlease use the 'router' or 'context' options. Read more at https://github.com/chimurai/http-proxy-middleware`, 'DEP_WEBPACK_DEV_SERVER_PROXY_ROUTES_ARGUMENT')();
|
|
4805
4798
|
};
|
|
4806
4799
|
for (const proxyConfigOrCallback of this.options.proxy){
|
|
4807
4800
|
let proxyMiddleware;
|
|
@@ -4838,7 +4831,7 @@ class Server {
|
|
|
4838
4831
|
}
|
|
4839
4832
|
const staticOptions = this.options.static;
|
|
4840
4833
|
const useStatic = staticOptions.length > 0;
|
|
4841
|
-
const serveStatic = useStatic ? (await import("./0~serve-static.js").then(__webpack_require__.t.bind(__webpack_require__, "./node_modules/.pnpm/serve-static@2.2.1/node_modules/serve-static/index.js", 23))).default : null;
|
|
4834
|
+
const serveStatic = useStatic ? (await import("./0~serve-static.js").then(__webpack_require__.t.bind(__webpack_require__, "./node_modules/.pnpm/serve-static@2.2.1_supports-color@8.1.1/node_modules/serve-static/index.js", 23))).default : null;
|
|
4842
4835
|
if (useStatic) for (const staticOption of staticOptions)for (const publicPath of staticOption.publicPath)middlewares.push({
|
|
4843
4836
|
name: 'serve-static',
|
|
4844
4837
|
path: publicPath,
|
|
@@ -4968,7 +4961,7 @@ class Server {
|
|
|
4968
4961
|
const addressInfo = server?.address();
|
|
4969
4962
|
if (!addressInfo) return;
|
|
4970
4963
|
const { address, port } = addressInfo;
|
|
4971
|
-
const prettyPrintURL = (newHostname)=>
|
|
4964
|
+
const prettyPrintURL = (newHostname)=>__rspack_external_node_url_3991086a.format({
|
|
4972
4965
|
protocol,
|
|
4973
4966
|
hostname: newHostname,
|
|
4974
4967
|
port,
|
|
@@ -5112,7 +5105,7 @@ class Server {
|
|
|
5112
5105
|
const socket = new net.Socket();
|
|
5113
5106
|
socket.on('error', (error)=>{
|
|
5114
5107
|
if ('ECONNREFUSED' === error.code) {
|
|
5115
|
-
|
|
5108
|
+
__rspack_external_node_fs_1b05aee1.unlinkSync(this.options.ipc);
|
|
5116
5109
|
resolve();
|
|
5117
5110
|
return;
|
|
5118
5111
|
}
|
|
@@ -5143,7 +5136,7 @@ class Server {
|
|
|
5143
5136
|
});
|
|
5144
5137
|
if (this.options.ipc) {
|
|
5145
5138
|
const READ_WRITE = 438;
|
|
5146
|
-
await
|
|
5139
|
+
await __rspack_external_node_fs_1b05aee1.promises.chmod(this.options.ipc, READ_WRITE);
|
|
5147
5140
|
}
|
|
5148
5141
|
if (this.options.webSocketServer) this.#createWebSocketServer();
|
|
5149
5142
|
await this.#logStatus();
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RspackDevServer } from "./
|
|
1
|
+
export { RspackDevServer } from "./619.js";
|