@rsbuild/core 0.7.7 → 0.7.8
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 +3 -3
- package/compiled/jiti/index.d.ts +1 -0
- package/compiled/jiti/index.js +391 -0
- package/compiled/jiti/license +21 -0
- package/compiled/jiti/package.json +1 -0
- package/compiled/postcss-load-config/index.js +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/semver/index.d.ts +1 -0
- package/compiled/semver/index.js +2585 -0
- package/compiled/semver/license +15 -0
- package/compiled/semver/package.json +1 -0
- package/compiled/webpack-dev-middleware/index.js +280 -10
- package/compiled/ws/index.js +80 -57
- package/compiled/ws/package.json +1 -1
- package/dist/index.cjs +579 -530
- package/dist/index.js +340 -304
- package/dist-types/helpers.d.ts +2 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/internal.d.ts +1 -1
- package/dist-types/server/helper.d.ts +1 -0
- package/dist-types/types.d.ts +1 -2
- package/package.json +5 -3
- package/dist-types/server/index.d.ts +0 -2
package/compiled/ws/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 781:
|
|
5
5
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
const WebSocket = __nccwpck_require__(
|
|
10
|
+
const WebSocket = __nccwpck_require__(715);
|
|
11
11
|
|
|
12
|
-
WebSocket.createWebSocketStream = __nccwpck_require__(
|
|
13
|
-
WebSocket.Server = __nccwpck_require__(
|
|
14
|
-
WebSocket.Receiver = __nccwpck_require__(
|
|
15
|
-
WebSocket.Sender = __nccwpck_require__(
|
|
12
|
+
WebSocket.createWebSocketStream = __nccwpck_require__(884);
|
|
13
|
+
WebSocket.Server = __nccwpck_require__(120);
|
|
14
|
+
WebSocket.Receiver = __nccwpck_require__(594);
|
|
15
|
+
WebSocket.Sender = __nccwpck_require__(209);
|
|
16
16
|
|
|
17
17
|
WebSocket.WebSocket = WebSocket;
|
|
18
18
|
WebSocket.WebSocketServer = WebSocket.Server;
|
|
@@ -22,13 +22,13 @@ module.exports = WebSocket;
|
|
|
22
22
|
|
|
23
23
|
/***/ }),
|
|
24
24
|
|
|
25
|
-
/***/
|
|
25
|
+
/***/ 870:
|
|
26
26
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
27
27
|
|
|
28
28
|
"use strict";
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
const { EMPTY_BUFFER } = __nccwpck_require__(
|
|
31
|
+
const { EMPTY_BUFFER } = __nccwpck_require__(556);
|
|
32
32
|
|
|
33
33
|
const FastBuffer = Buffer[Symbol.species];
|
|
34
34
|
|
|
@@ -161,7 +161,7 @@ if (!process.env.WS_NO_BUFFER_UTIL) {
|
|
|
161
161
|
|
|
162
162
|
/***/ }),
|
|
163
163
|
|
|
164
|
-
/***/
|
|
164
|
+
/***/ 556:
|
|
165
165
|
/***/ ((module) => {
|
|
166
166
|
|
|
167
167
|
"use strict";
|
|
@@ -181,13 +181,13 @@ module.exports = {
|
|
|
181
181
|
|
|
182
182
|
/***/ }),
|
|
183
183
|
|
|
184
|
-
/***/
|
|
184
|
+
/***/ 418:
|
|
185
185
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
186
186
|
|
|
187
187
|
"use strict";
|
|
188
188
|
|
|
189
189
|
|
|
190
|
-
const { kForOnEventAttribute, kListener } = __nccwpck_require__(
|
|
190
|
+
const { kForOnEventAttribute, kListener } = __nccwpck_require__(556);
|
|
191
191
|
|
|
192
192
|
const kCode = Symbol('kCode');
|
|
193
193
|
const kData = Symbol('kData');
|
|
@@ -481,13 +481,13 @@ function callListener(listener, thisArg, event) {
|
|
|
481
481
|
|
|
482
482
|
/***/ }),
|
|
483
483
|
|
|
484
|
-
/***/
|
|
484
|
+
/***/ 787:
|
|
485
485
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
486
486
|
|
|
487
487
|
"use strict";
|
|
488
488
|
|
|
489
489
|
|
|
490
|
-
const { tokenChars } = __nccwpck_require__(
|
|
490
|
+
const { tokenChars } = __nccwpck_require__(502);
|
|
491
491
|
|
|
492
492
|
/**
|
|
493
493
|
* Adds an offer to the map of extension offers or a parameter to the map of
|
|
@@ -692,7 +692,7 @@ module.exports = { format, parse };
|
|
|
692
692
|
|
|
693
693
|
/***/ }),
|
|
694
694
|
|
|
695
|
-
/***/
|
|
695
|
+
/***/ 202:
|
|
696
696
|
/***/ ((module) => {
|
|
697
697
|
|
|
698
698
|
"use strict";
|
|
@@ -755,7 +755,7 @@ module.exports = Limiter;
|
|
|
755
755
|
|
|
756
756
|
/***/ }),
|
|
757
757
|
|
|
758
|
-
/***/
|
|
758
|
+
/***/ 262:
|
|
759
759
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
760
760
|
|
|
761
761
|
"use strict";
|
|
@@ -763,9 +763,9 @@ module.exports = Limiter;
|
|
|
763
763
|
|
|
764
764
|
const zlib = __nccwpck_require__(796);
|
|
765
765
|
|
|
766
|
-
const bufferUtil = __nccwpck_require__(
|
|
767
|
-
const Limiter = __nccwpck_require__(
|
|
768
|
-
const { kStatusCode } = __nccwpck_require__(
|
|
766
|
+
const bufferUtil = __nccwpck_require__(870);
|
|
767
|
+
const Limiter = __nccwpck_require__(202);
|
|
768
|
+
const { kStatusCode } = __nccwpck_require__(556);
|
|
769
769
|
|
|
770
770
|
const FastBuffer = Buffer[Symbol.species];
|
|
771
771
|
const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
|
|
@@ -1277,23 +1277,23 @@ function inflateOnError(err) {
|
|
|
1277
1277
|
|
|
1278
1278
|
/***/ }),
|
|
1279
1279
|
|
|
1280
|
-
/***/
|
|
1280
|
+
/***/ 594:
|
|
1281
1281
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1282
1282
|
|
|
1283
1283
|
"use strict";
|
|
1284
1284
|
|
|
1285
1285
|
|
|
1286
|
-
const { Writable } = __nccwpck_require__(
|
|
1286
|
+
const { Writable } = __nccwpck_require__(955);
|
|
1287
1287
|
|
|
1288
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
1288
|
+
const PerMessageDeflate = __nccwpck_require__(262);
|
|
1289
1289
|
const {
|
|
1290
1290
|
BINARY_TYPES,
|
|
1291
1291
|
EMPTY_BUFFER,
|
|
1292
1292
|
kStatusCode,
|
|
1293
1293
|
kWebSocket
|
|
1294
|
-
} = __nccwpck_require__(
|
|
1295
|
-
const { concat, toArrayBuffer, unmask } = __nccwpck_require__(
|
|
1296
|
-
const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(
|
|
1294
|
+
} = __nccwpck_require__(556);
|
|
1295
|
+
const { concat, toArrayBuffer, unmask } = __nccwpck_require__(870);
|
|
1296
|
+
const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(502);
|
|
1297
1297
|
|
|
1298
1298
|
const FastBuffer = Buffer[Symbol.species];
|
|
1299
1299
|
|
|
@@ -1989,7 +1989,7 @@ module.exports = Receiver;
|
|
|
1989
1989
|
|
|
1990
1990
|
/***/ }),
|
|
1991
1991
|
|
|
1992
|
-
/***/
|
|
1992
|
+
/***/ 209:
|
|
1993
1993
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1994
1994
|
|
|
1995
1995
|
"use strict";
|
|
@@ -1997,16 +1997,19 @@ module.exports = Receiver;
|
|
|
1997
1997
|
|
|
1998
1998
|
|
|
1999
1999
|
|
|
2000
|
-
const { Duplex } = __nccwpck_require__(
|
|
2000
|
+
const { Duplex } = __nccwpck_require__(955);
|
|
2001
2001
|
const { randomFillSync } = __nccwpck_require__(113);
|
|
2002
2002
|
|
|
2003
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
2004
|
-
const { EMPTY_BUFFER } = __nccwpck_require__(
|
|
2005
|
-
const { isValidStatusCode } = __nccwpck_require__(
|
|
2006
|
-
const { mask: applyMask, toBuffer } = __nccwpck_require__(
|
|
2003
|
+
const PerMessageDeflate = __nccwpck_require__(262);
|
|
2004
|
+
const { EMPTY_BUFFER } = __nccwpck_require__(556);
|
|
2005
|
+
const { isValidStatusCode } = __nccwpck_require__(502);
|
|
2006
|
+
const { mask: applyMask, toBuffer } = __nccwpck_require__(870);
|
|
2007
2007
|
|
|
2008
2008
|
const kByteLength = Symbol('kByteLength');
|
|
2009
2009
|
const maskBuffer = Buffer.alloc(4);
|
|
2010
|
+
const RANDOM_POOL_SIZE = 8 * 1024;
|
|
2011
|
+
let randomPool;
|
|
2012
|
+
let randomPoolPointer = RANDOM_POOL_SIZE;
|
|
2010
2013
|
|
|
2011
2014
|
/**
|
|
2012
2015
|
* HyBi Sender implementation.
|
|
@@ -2071,7 +2074,24 @@ class Sender {
|
|
|
2071
2074
|
if (options.generateMask) {
|
|
2072
2075
|
options.generateMask(mask);
|
|
2073
2076
|
} else {
|
|
2074
|
-
|
|
2077
|
+
if (randomPoolPointer === RANDOM_POOL_SIZE) {
|
|
2078
|
+
/* istanbul ignore else */
|
|
2079
|
+
if (randomPool === undefined) {
|
|
2080
|
+
//
|
|
2081
|
+
// This is lazily initialized because server-sent frames must not
|
|
2082
|
+
// be masked so it may never be used.
|
|
2083
|
+
//
|
|
2084
|
+
randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);
|
|
2088
|
+
randomPoolPointer = 0;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
mask[0] = randomPool[randomPoolPointer++];
|
|
2092
|
+
mask[1] = randomPool[randomPoolPointer++];
|
|
2093
|
+
mask[2] = randomPool[randomPoolPointer++];
|
|
2094
|
+
mask[3] = randomPool[randomPoolPointer++];
|
|
2075
2095
|
}
|
|
2076
2096
|
|
|
2077
2097
|
skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
|
|
@@ -2474,13 +2494,13 @@ module.exports = Sender;
|
|
|
2474
2494
|
|
|
2475
2495
|
/***/ }),
|
|
2476
2496
|
|
|
2477
|
-
/***/
|
|
2497
|
+
/***/ 884:
|
|
2478
2498
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2479
2499
|
|
|
2480
2500
|
"use strict";
|
|
2481
2501
|
|
|
2482
2502
|
|
|
2483
|
-
const { Duplex } = __nccwpck_require__(
|
|
2503
|
+
const { Duplex } = __nccwpck_require__(955);
|
|
2484
2504
|
|
|
2485
2505
|
/**
|
|
2486
2506
|
* Emits the `'close'` event on a stream.
|
|
@@ -2641,13 +2661,13 @@ module.exports = createWebSocketStream;
|
|
|
2641
2661
|
|
|
2642
2662
|
/***/ }),
|
|
2643
2663
|
|
|
2644
|
-
/***/
|
|
2664
|
+
/***/ 690:
|
|
2645
2665
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2646
2666
|
|
|
2647
2667
|
"use strict";
|
|
2648
2668
|
|
|
2649
2669
|
|
|
2650
|
-
const { tokenChars } = __nccwpck_require__(
|
|
2670
|
+
const { tokenChars } = __nccwpck_require__(502);
|
|
2651
2671
|
|
|
2652
2672
|
/**
|
|
2653
2673
|
* Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
|
|
@@ -2711,7 +2731,7 @@ module.exports = { parse };
|
|
|
2711
2731
|
|
|
2712
2732
|
/***/ }),
|
|
2713
2733
|
|
|
2714
|
-
/***/
|
|
2734
|
+
/***/ 502:
|
|
2715
2735
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2716
2736
|
|
|
2717
2737
|
"use strict";
|
|
@@ -2849,7 +2869,7 @@ if (isUtf8) {
|
|
|
2849
2869
|
|
|
2850
2870
|
/***/ }),
|
|
2851
2871
|
|
|
2852
|
-
/***/
|
|
2872
|
+
/***/ 120:
|
|
2853
2873
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2854
2874
|
|
|
2855
2875
|
"use strict";
|
|
@@ -2859,14 +2879,14 @@ if (isUtf8) {
|
|
|
2859
2879
|
|
|
2860
2880
|
const EventEmitter = __nccwpck_require__(361);
|
|
2861
2881
|
const http = __nccwpck_require__(685);
|
|
2862
|
-
const { Duplex } = __nccwpck_require__(
|
|
2882
|
+
const { Duplex } = __nccwpck_require__(955);
|
|
2863
2883
|
const { createHash } = __nccwpck_require__(113);
|
|
2864
2884
|
|
|
2865
|
-
const extension = __nccwpck_require__(
|
|
2866
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
2867
|
-
const subprotocol = __nccwpck_require__(
|
|
2868
|
-
const WebSocket = __nccwpck_require__(
|
|
2869
|
-
const { GUID, kWebSocket } = __nccwpck_require__(
|
|
2885
|
+
const extension = __nccwpck_require__(787);
|
|
2886
|
+
const PerMessageDeflate = __nccwpck_require__(262);
|
|
2887
|
+
const subprotocol = __nccwpck_require__(690);
|
|
2888
|
+
const WebSocket = __nccwpck_require__(715);
|
|
2889
|
+
const { GUID, kWebSocket } = __nccwpck_require__(556);
|
|
2870
2890
|
|
|
2871
2891
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
2872
2892
|
|
|
@@ -3090,6 +3110,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
3090
3110
|
socket.on('error', socketOnError);
|
|
3091
3111
|
|
|
3092
3112
|
const key = req.headers['sec-websocket-key'];
|
|
3113
|
+
const upgrade = req.headers.upgrade;
|
|
3093
3114
|
const version = +req.headers['sec-websocket-version'];
|
|
3094
3115
|
|
|
3095
3116
|
if (req.method !== 'GET') {
|
|
@@ -3098,13 +3119,13 @@ class WebSocketServer extends EventEmitter {
|
|
|
3098
3119
|
return;
|
|
3099
3120
|
}
|
|
3100
3121
|
|
|
3101
|
-
if (
|
|
3122
|
+
if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
|
|
3102
3123
|
const message = 'Invalid Upgrade header';
|
|
3103
3124
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
3104
3125
|
return;
|
|
3105
3126
|
}
|
|
3106
3127
|
|
|
3107
|
-
if (
|
|
3128
|
+
if (key === undefined || !keyRegex.test(key)) {
|
|
3108
3129
|
const message = 'Missing or invalid Sec-WebSocket-Key header';
|
|
3109
3130
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
3110
3131
|
return;
|
|
@@ -3396,7 +3417,7 @@ function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
|
3396
3417
|
|
|
3397
3418
|
/***/ }),
|
|
3398
3419
|
|
|
3399
|
-
/***/
|
|
3420
|
+
/***/ 715:
|
|
3400
3421
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3401
3422
|
|
|
3402
3423
|
"use strict";
|
|
@@ -3410,12 +3431,12 @@ const http = __nccwpck_require__(685);
|
|
|
3410
3431
|
const net = __nccwpck_require__(808);
|
|
3411
3432
|
const tls = __nccwpck_require__(404);
|
|
3412
3433
|
const { randomBytes, createHash } = __nccwpck_require__(113);
|
|
3413
|
-
const { Duplex, Readable } = __nccwpck_require__(
|
|
3434
|
+
const { Duplex, Readable } = __nccwpck_require__(955);
|
|
3414
3435
|
const { URL } = __nccwpck_require__(310);
|
|
3415
3436
|
|
|
3416
|
-
const PerMessageDeflate = __nccwpck_require__(
|
|
3417
|
-
const Receiver = __nccwpck_require__(
|
|
3418
|
-
const Sender = __nccwpck_require__(
|
|
3437
|
+
const PerMessageDeflate = __nccwpck_require__(262);
|
|
3438
|
+
const Receiver = __nccwpck_require__(594);
|
|
3439
|
+
const Sender = __nccwpck_require__(209);
|
|
3419
3440
|
const {
|
|
3420
3441
|
BINARY_TYPES,
|
|
3421
3442
|
EMPTY_BUFFER,
|
|
@@ -3425,12 +3446,12 @@ const {
|
|
|
3425
3446
|
kStatusCode,
|
|
3426
3447
|
kWebSocket,
|
|
3427
3448
|
NOOP
|
|
3428
|
-
} = __nccwpck_require__(
|
|
3449
|
+
} = __nccwpck_require__(556);
|
|
3429
3450
|
const {
|
|
3430
3451
|
EventTarget: { addEventListener, removeEventListener }
|
|
3431
|
-
} = __nccwpck_require__(
|
|
3432
|
-
const { format, parse } = __nccwpck_require__(
|
|
3433
|
-
const { toBuffer } = __nccwpck_require__(
|
|
3452
|
+
} = __nccwpck_require__(418);
|
|
3453
|
+
const { format, parse } = __nccwpck_require__(787);
|
|
3454
|
+
const { toBuffer } = __nccwpck_require__(870);
|
|
3434
3455
|
|
|
3435
3456
|
const closeTimeout = 30 * 1000;
|
|
3436
3457
|
const kAborted = Symbol('kAborted');
|
|
@@ -4330,7 +4351,9 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
4330
4351
|
|
|
4331
4352
|
req = websocket._req = null;
|
|
4332
4353
|
|
|
4333
|
-
|
|
4354
|
+
const upgrade = res.headers.upgrade;
|
|
4355
|
+
|
|
4356
|
+
if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
|
|
4334
4357
|
abortHandshake(websocket, socket, 'Invalid Upgrade header');
|
|
4335
4358
|
return;
|
|
4336
4359
|
}
|
|
@@ -4804,7 +4827,7 @@ module.exports = require("net");
|
|
|
4804
4827
|
|
|
4805
4828
|
/***/ }),
|
|
4806
4829
|
|
|
4807
|
-
/***/
|
|
4830
|
+
/***/ 955:
|
|
4808
4831
|
/***/ ((module) => {
|
|
4809
4832
|
|
|
4810
4833
|
"use strict";
|
|
@@ -4878,7 +4901,7 @@ module.exports = require("zlib");
|
|
|
4878
4901
|
/******/ // startup
|
|
4879
4902
|
/******/ // Load entry module and return exports
|
|
4880
4903
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
4881
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
4904
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(781);
|
|
4882
4905
|
/******/ module.exports = __webpack_exports__;
|
|
4883
4906
|
/******/
|
|
4884
4907
|
/******/ })()
|
package/compiled/ws/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.17.
|
|
1
|
+
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.17.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
|