@rsbuild/core 1.7.1 → 2.0.0-alpha.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.
Files changed (121) hide show
  1. package/compiled/css-loader/index.js +2 -2
  2. package/compiled/html-rspack-plugin/index.js +14 -14
  3. package/compiled/http-proxy-middleware/index.d.ts +2 -2
  4. package/compiled/postcss/index.js +1 -1
  5. package/compiled/postcss-loader/index.js +6 -6
  6. package/compiled/ws/index.js +59 -54
  7. package/compiled/ws/package.json +1 -1
  8. package/dist/131.js +1070 -1122
  9. package/dist/31.js +336 -0
  10. package/dist/710.js +445 -0
  11. package/dist/743.js +7 -0
  12. package/dist/{136.mjs → 88.js} +11 -13
  13. package/dist/client/hmr.js +0 -1
  14. package/dist/client/overlay.js +32 -21
  15. package/dist/connect.js +581 -0
  16. package/dist/connect.js.LICENSE.txt +54 -0
  17. package/dist/cors.js +188 -0
  18. package/dist/cors.js.LICENSE.txt +11 -0
  19. package/dist/launch-editor-middleware.js +439 -0
  20. package/dist/manifest-plugin.js +177 -0
  21. package/dist/memfs.js +3644 -0
  22. package/dist/{0~open.js → open.js} +21 -13
  23. package/dist/{0~range-parser.js → range-parser.js} +1 -1
  24. package/dist/remapping.js +196 -0
  25. package/dist/sirv.js +122 -0
  26. package/dist/tinyglobby.js +1463 -0
  27. package/dist/transformLoader.mjs +1 -1
  28. package/dist/transformRawLoader.mjs +1 -1
  29. package/dist-types/{provider/build.d.ts → build.d.ts} +2 -2
  30. package/dist-types/cli/commands.d.ts +1 -1
  31. package/dist-types/configChain.d.ts +0 -2
  32. package/dist-types/constants.d.ts +2 -3
  33. package/dist-types/{provider/createCompiler.d.ts → createCompiler.d.ts} +1 -1
  34. package/dist-types/defaultConfig.d.ts +1 -1
  35. package/dist-types/helpers/fs.d.ts +4 -0
  36. package/dist-types/helpers/index.d.ts +1 -1
  37. package/dist-types/helpers/url.d.ts +0 -1
  38. package/dist-types/helpers/vendors.d.ts +0 -13
  39. package/dist-types/hooks.d.ts +3 -5
  40. package/dist-types/index.d.ts +1 -1
  41. package/dist-types/{provider/initConfigs.d.ts → initConfigs.d.ts} +1 -1
  42. package/dist-types/inspectConfig.d.ts +5 -33
  43. package/dist-types/pluginHelper.d.ts +1 -1
  44. package/dist-types/plugins/css.d.ts +1 -1
  45. package/dist-types/plugins/inlineChunk.d.ts +1 -1
  46. package/dist-types/plugins/minimize.d.ts +2 -2
  47. package/dist-types/{provider/rspackConfig.d.ts → rspackConfig.d.ts} +1 -1
  48. package/dist-types/server/assets-middleware/getFileFromUrl.d.ts +1 -2
  49. package/dist-types/server/assets-middleware/setupOutputFileSystem.d.ts +1 -1
  50. package/dist-types/server/browserLogs.d.ts +1 -1
  51. package/dist-types/server/devMiddlewares.d.ts +1 -1
  52. package/dist-types/server/devServer.d.ts +1 -1
  53. package/dist-types/server/gzipMiddleware.d.ts +1 -1
  54. package/dist-types/server/helper.d.ts +13 -10
  55. package/dist-types/server/proxy.d.ts +2 -2
  56. package/dist-types/server/socketServer.d.ts +1 -1
  57. package/dist-types/types/config.d.ts +7 -51
  58. package/dist-types/types/context.d.ts +3 -2
  59. package/dist-types/types/hooks.d.ts +9 -9
  60. package/dist-types/types/plugin.d.ts +3 -40
  61. package/dist-types/types/rsbuild.d.ts +6 -31
  62. package/dist-types/types/thirdParty.d.ts +1 -4
  63. package/package.json +15 -20
  64. package/compiled/@jridgewell/remapping/index.d.ts +0 -1
  65. package/compiled/@jridgewell/remapping/index.js +0 -1222
  66. package/compiled/@jridgewell/remapping/license +0 -19
  67. package/compiled/@jridgewell/remapping/package.json +0 -1
  68. package/compiled/@jridgewell/trace-mapping/index.d.ts +0 -194
  69. package/compiled/@jridgewell/trace-mapping/index.js +0 -1408
  70. package/compiled/@jridgewell/trace-mapping/license +0 -19
  71. package/compiled/@jridgewell/trace-mapping/package.json +0 -1
  72. package/compiled/connect/index.d.ts +0 -90
  73. package/compiled/connect/index.js +0 -1240
  74. package/compiled/connect/license +0 -25
  75. package/compiled/connect/package.json +0 -1
  76. package/compiled/cors/index.d.ts +0 -56
  77. package/compiled/cors/index.js +0 -371
  78. package/compiled/cors/license +0 -22
  79. package/compiled/cors/package.json +0 -1
  80. package/compiled/launch-editor-middleware/index.d.ts +0 -1
  81. package/compiled/launch-editor-middleware/index.js +0 -719
  82. package/compiled/launch-editor-middleware/license +0 -21
  83. package/compiled/launch-editor-middleware/package.json +0 -1
  84. package/compiled/memfs/index.d.ts +0 -1462
  85. package/compiled/memfs/index.js +0 -1
  86. package/compiled/memfs/license +0 -201
  87. package/compiled/memfs/package.json +0 -1
  88. package/compiled/mrmime/index.d.ts +0 -4
  89. package/compiled/mrmime/index.js +0 -456
  90. package/compiled/mrmime/package.json +0 -1
  91. package/compiled/picocolors/index.d.ts +0 -55
  92. package/compiled/picocolors/index.js +0 -108
  93. package/compiled/picocolors/license +0 -15
  94. package/compiled/picocolors/package.json +0 -1
  95. package/compiled/rspack-manifest-plugin/index.d.ts +0 -48
  96. package/compiled/rspack-manifest-plugin/index.js +0 -409
  97. package/compiled/rspack-manifest-plugin/license +0 -21
  98. package/compiled/rspack-manifest-plugin/package.json +0 -1
  99. package/compiled/sirv/index.d.ts +0 -1
  100. package/compiled/sirv/index.js +0 -274
  101. package/compiled/sirv/package.json +0 -1
  102. package/compiled/tinyglobby/index.d.ts +0 -46
  103. package/compiled/tinyglobby/index.js +0 -2664
  104. package/compiled/tinyglobby/license +0 -21
  105. package/compiled/tinyglobby/package.json +0 -1
  106. package/compiled/webpack-bundle-analyzer/index.d.ts +0 -160
  107. package/compiled/webpack-bundle-analyzer/index.js +0 -23
  108. package/compiled/webpack-bundle-analyzer/license +0 -20
  109. package/compiled/webpack-bundle-analyzer/package.json +0 -1
  110. package/compiled/webpack-bundle-analyzer/public/viewer.js +0 -16
  111. package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +0 -10
  112. package/dist/2~open.cjs +0 -436
  113. package/dist/2~range-parser.cjs +0 -52
  114. package/dist/2~range-parser.cjs.LICENSE.txt +0 -6
  115. package/dist/index.cjs +0 -9442
  116. package/dist/index.cjs.LICENSE.txt +0 -26
  117. package/dist-types/plugins/bundleAnalyzer.d.ts +0 -2
  118. package/dist-types/plugins/performance.d.ts +0 -5
  119. package/dist-types/provider/helpers.d.ts +0 -12
  120. package/dist-types/provider/provider.d.ts +0 -2
  121. /package/dist/{0~range-parser.js.LICENSE.txt → range-parser.js.LICENSE.txt} +0 -0
@@ -1,15 +1,15 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 593: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(451)["default"];
4
+ 735: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(857)["default"];
6
6
  },
7
- 451: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 857: (__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__(574);
12
+ var _utils = __nccwpck_require__(220);
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
- 574: (module, exports, __nccwpck_require__) => {
182
+ 220: (module, exports, __nccwpck_require__) => {
183
183
  module = __nccwpck_require__.nmd(module);
184
184
  Object.defineProperty(exports, "__esModule", { value: true });
185
185
  exports.exec = exec;
@@ -715,6 +715,6 @@
715
715
  })();
716
716
  if (typeof __nccwpck_require__ !== "undefined")
717
717
  __nccwpck_require__.ab = __dirname + "/";
718
- var __webpack_exports__ = __nccwpck_require__(593);
718
+ var __webpack_exports__ = __nccwpck_require__(735);
719
719
  module.exports = __webpack_exports__;
720
720
  })();
@@ -1,19 +1,19 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 821: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 159: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const WebSocket = __nccwpck_require__(234);
6
- WebSocket.createWebSocketStream = __nccwpck_require__(297);
7
- WebSocket.Server = __nccwpck_require__(788);
8
- WebSocket.Receiver = __nccwpck_require__(176);
9
- WebSocket.Sender = __nccwpck_require__(480);
5
+ const WebSocket = __nccwpck_require__(640);
6
+ WebSocket.createWebSocketStream = __nccwpck_require__(283);
7
+ WebSocket.Server = __nccwpck_require__(686);
8
+ WebSocket.Receiver = __nccwpck_require__(522);
9
+ WebSocket.Sender = __nccwpck_require__(814);
10
10
  WebSocket.WebSocket = WebSocket;
11
11
  WebSocket.WebSocketServer = WebSocket.Server;
12
12
  module.exports = WebSocket;
13
13
  },
14
- 72: (module, __unused_webpack_exports, __nccwpck_require__) => {
14
+ 398: (module, __unused_webpack_exports, __nccwpck_require__) => {
15
15
  "use strict";
16
- const { EMPTY_BUFFER } = __nccwpck_require__(892);
16
+ const { EMPTY_BUFFER } = __nccwpck_require__(146);
17
17
  const FastBuffer = Buffer[Symbol.species];
18
18
  function concat(list, totalLength) {
19
19
  if (list.length === 0) return EMPTY_BUFFER;
@@ -87,13 +87,14 @@
87
87
  } catch (e) {}
88
88
  }
89
89
  },
90
- 892: (module) => {
90
+ 146: (module) => {
91
91
  "use strict";
92
92
  const BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
93
93
  const hasBlob = typeof Blob !== "undefined";
94
94
  if (hasBlob) BINARY_TYPES.push("blob");
95
95
  module.exports = {
96
96
  BINARY_TYPES,
97
+ CLOSE_TIMEOUT: 3e4,
97
98
  EMPTY_BUFFER: Buffer.alloc(0),
98
99
  GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
99
100
  hasBlob,
@@ -104,9 +105,9 @@
104
105
  NOOP: () => {},
105
106
  };
106
107
  },
107
- 95: (module, __unused_webpack_exports, __nccwpck_require__) => {
108
+ 233: (module, __unused_webpack_exports, __nccwpck_require__) => {
108
109
  "use strict";
109
- const { kForOnEventAttribute, kListener } = __nccwpck_require__(892);
110
+ const { kForOnEventAttribute, kListener } = __nccwpck_require__(146);
110
111
  const kCode = Symbol("kCode");
111
112
  const kData = Symbol("kData");
112
113
  const kError = Symbol("kError");
@@ -268,9 +269,9 @@
268
269
  }
269
270
  }
270
271
  },
271
- 468: (module, __unused_webpack_exports, __nccwpck_require__) => {
272
+ 994: (module, __unused_webpack_exports, __nccwpck_require__) => {
272
273
  "use strict";
273
- const { tokenChars } = __nccwpck_require__(342);
274
+ const { tokenChars } = __nccwpck_require__(788);
274
275
  function push(dest, name, elem) {
275
276
  if (dest[name] === undefined) dest[name] = [elem];
276
277
  else dest[name].push(elem);
@@ -426,7 +427,7 @@
426
427
  }
427
428
  module.exports = { format, parse };
428
429
  },
429
- 137: (module) => {
430
+ 51: (module) => {
430
431
  "use strict";
431
432
  const kDone = Symbol("kDone");
432
433
  const kRun = Symbol("kRun");
@@ -455,12 +456,12 @@
455
456
  }
456
457
  module.exports = Limiter;
457
458
  },
458
- 465: (module, __unused_webpack_exports, __nccwpck_require__) => {
459
+ 279: (module, __unused_webpack_exports, __nccwpck_require__) => {
459
460
  "use strict";
460
461
  const zlib = __nccwpck_require__(106);
461
- const bufferUtil = __nccwpck_require__(72);
462
- const Limiter = __nccwpck_require__(137);
463
- const { kStatusCode } = __nccwpck_require__(892);
462
+ const bufferUtil = __nccwpck_require__(398);
463
+ const Limiter = __nccwpck_require__(51);
464
+ const { kStatusCode } = __nccwpck_require__(146);
464
465
  const FastBuffer = Buffer[Symbol.species];
465
466
  const TRAILER = Buffer.from([0, 0, 255, 255]);
466
467
  const kPerMessageDeflate = Symbol("permessage-deflate");
@@ -784,14 +785,14 @@
784
785
  this[kCallback](err);
785
786
  }
786
787
  },
787
- 176: (module, __unused_webpack_exports, __nccwpck_require__) => {
788
+ 522: (module, __unused_webpack_exports, __nccwpck_require__) => {
788
789
  "use strict";
789
790
  const { Writable } = __nccwpck_require__(203);
790
- const PerMessageDeflate = __nccwpck_require__(465);
791
+ const PerMessageDeflate = __nccwpck_require__(279);
791
792
  const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } =
792
- __nccwpck_require__(892);
793
- const { concat, toArrayBuffer, unmask } = __nccwpck_require__(72);
794
- const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(342);
793
+ __nccwpck_require__(146);
794
+ const { concat, toArrayBuffer, unmask } = __nccwpck_require__(398);
795
+ const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(788);
795
796
  const FastBuffer = Buffer[Symbol.species];
796
797
  const GET_INFO = 0;
797
798
  const GET_PAYLOAD_LENGTH_16 = 1;
@@ -1288,14 +1289,14 @@
1288
1289
  }
1289
1290
  module.exports = Receiver;
1290
1291
  },
1291
- 480: (module, __unused_webpack_exports, __nccwpck_require__) => {
1292
+ 814: (module, __unused_webpack_exports, __nccwpck_require__) => {
1292
1293
  "use strict";
1293
1294
  const { Duplex } = __nccwpck_require__(203);
1294
1295
  const { randomFillSync } = __nccwpck_require__(982);
1295
- const PerMessageDeflate = __nccwpck_require__(465);
1296
- const { EMPTY_BUFFER, kWebSocket, NOOP } = __nccwpck_require__(892);
1297
- const { isBlob, isValidStatusCode } = __nccwpck_require__(342);
1298
- const { mask: applyMask, toBuffer } = __nccwpck_require__(72);
1296
+ const PerMessageDeflate = __nccwpck_require__(279);
1297
+ const { EMPTY_BUFFER, kWebSocket, NOOP } = __nccwpck_require__(146);
1298
+ const { isBlob, isValidStatusCode } = __nccwpck_require__(788);
1299
+ const { mask: applyMask, toBuffer } = __nccwpck_require__(398);
1299
1300
  const kByteLength = Symbol("kByteLength");
1300
1301
  const maskBuffer = Buffer.alloc(4);
1301
1302
  const RANDOM_POOL_SIZE = 8 * 1024;
@@ -1664,9 +1665,9 @@
1664
1665
  sender.onerror(err);
1665
1666
  }
1666
1667
  },
1667
- 297: (module, __unused_webpack_exports, __nccwpck_require__) => {
1668
+ 283: (module, __unused_webpack_exports, __nccwpck_require__) => {
1668
1669
  "use strict";
1669
- const WebSocket = __nccwpck_require__(234);
1670
+ const WebSocket = __nccwpck_require__(640);
1670
1671
  const { Duplex } = __nccwpck_require__(203);
1671
1672
  function emitClose(stream) {
1672
1673
  stream.emit("close");
@@ -1761,9 +1762,9 @@
1761
1762
  }
1762
1763
  module.exports = createWebSocketStream;
1763
1764
  },
1764
- 31: (module, __unused_webpack_exports, __nccwpck_require__) => {
1765
+ 417: (module, __unused_webpack_exports, __nccwpck_require__) => {
1765
1766
  "use strict";
1766
- const { tokenChars } = __nccwpck_require__(342);
1767
+ const { tokenChars } = __nccwpck_require__(788);
1767
1768
  function parse(header) {
1768
1769
  const protocols = new Set();
1769
1770
  let start = -1;
@@ -1804,10 +1805,10 @@
1804
1805
  }
1805
1806
  module.exports = { parse };
1806
1807
  },
1807
- 342: (module, __unused_webpack_exports, __nccwpck_require__) => {
1808
+ 788: (module, __unused_webpack_exports, __nccwpck_require__) => {
1808
1809
  "use strict";
1809
1810
  const { isUtf8 } = __nccwpck_require__(181);
1810
- const { hasBlob } = __nccwpck_require__(892);
1811
+ const { hasBlob } = __nccwpck_require__(146);
1811
1812
  const tokenChars = [
1812
1813
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1813
1814
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
@@ -1901,17 +1902,17 @@
1901
1902
  } catch (e) {}
1902
1903
  }
1903
1904
  },
1904
- 788: (module, __unused_webpack_exports, __nccwpck_require__) => {
1905
+ 686: (module, __unused_webpack_exports, __nccwpck_require__) => {
1905
1906
  "use strict";
1906
1907
  const EventEmitter = __nccwpck_require__(434);
1907
1908
  const http = __nccwpck_require__(611);
1908
1909
  const { Duplex } = __nccwpck_require__(203);
1909
1910
  const { createHash } = __nccwpck_require__(982);
1910
- const extension = __nccwpck_require__(468);
1911
- const PerMessageDeflate = __nccwpck_require__(465);
1912
- const subprotocol = __nccwpck_require__(31);
1913
- const WebSocket = __nccwpck_require__(234);
1914
- const { GUID, kWebSocket } = __nccwpck_require__(892);
1911
+ const extension = __nccwpck_require__(994);
1912
+ const PerMessageDeflate = __nccwpck_require__(279);
1913
+ const subprotocol = __nccwpck_require__(417);
1914
+ const WebSocket = __nccwpck_require__(640);
1915
+ const { CLOSE_TIMEOUT, GUID, kWebSocket } = __nccwpck_require__(146);
1915
1916
  const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
1916
1917
  const RUNNING = 0;
1917
1918
  const CLOSING = 1;
@@ -1927,6 +1928,7 @@
1927
1928
  perMessageDeflate: false,
1928
1929
  handleProtocols: null,
1929
1930
  clientTracking: true,
1931
+ closeTimeout: CLOSE_TIMEOUT,
1930
1932
  verifyClient: null,
1931
1933
  noServer: false,
1932
1934
  backlog: null,
@@ -2270,7 +2272,7 @@
2270
2272
  }
2271
2273
  }
2272
2274
  },
2273
- 234: (module, __unused_webpack_exports, __nccwpck_require__) => {
2275
+ 640: (module, __unused_webpack_exports, __nccwpck_require__) => {
2274
2276
  "use strict";
2275
2277
  const EventEmitter = __nccwpck_require__(434);
2276
2278
  const https = __nccwpck_require__(692);
@@ -2280,12 +2282,13 @@
2280
2282
  const { randomBytes, createHash } = __nccwpck_require__(982);
2281
2283
  const { Duplex, Readable } = __nccwpck_require__(203);
2282
2284
  const { URL } = __nccwpck_require__(16);
2283
- const PerMessageDeflate = __nccwpck_require__(465);
2284
- const Receiver = __nccwpck_require__(176);
2285
- const Sender = __nccwpck_require__(480);
2286
- const { isBlob } = __nccwpck_require__(342);
2285
+ const PerMessageDeflate = __nccwpck_require__(279);
2286
+ const Receiver = __nccwpck_require__(522);
2287
+ const Sender = __nccwpck_require__(814);
2288
+ const { isBlob } = __nccwpck_require__(788);
2287
2289
  const {
2288
2290
  BINARY_TYPES,
2291
+ CLOSE_TIMEOUT,
2289
2292
  EMPTY_BUFFER,
2290
2293
  GUID,
2291
2294
  kForOnEventAttribute,
@@ -2293,13 +2296,12 @@
2293
2296
  kStatusCode,
2294
2297
  kWebSocket,
2295
2298
  NOOP,
2296
- } = __nccwpck_require__(892);
2299
+ } = __nccwpck_require__(146);
2297
2300
  const {
2298
2301
  EventTarget: { addEventListener, removeEventListener },
2299
- } = __nccwpck_require__(95);
2300
- const { format, parse } = __nccwpck_require__(468);
2301
- const { toBuffer } = __nccwpck_require__(72);
2302
- const closeTimeout = 30 * 1e3;
2302
+ } = __nccwpck_require__(233);
2303
+ const { format, parse } = __nccwpck_require__(994);
2304
+ const { toBuffer } = __nccwpck_require__(398);
2303
2305
  const kAborted = Symbol("kAborted");
2304
2306
  const protocolVersions = [8, 13];
2305
2307
  const readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
@@ -2338,6 +2340,7 @@
2338
2340
  initAsClient(this, address, protocols, options);
2339
2341
  } else {
2340
2342
  this._autoPong = options.autoPong;
2343
+ this._closeTimeout = options.closeTimeout;
2341
2344
  this._isServer = true;
2342
2345
  }
2343
2346
  }
@@ -2635,6 +2638,7 @@
2635
2638
  const opts = {
2636
2639
  allowSynchronousEvents: true,
2637
2640
  autoPong: true,
2641
+ closeTimeout: CLOSE_TIMEOUT,
2638
2642
  protocolVersion: protocolVersions[1],
2639
2643
  maxPayload: 100 * 1024 * 1024,
2640
2644
  skipUTF8Validation: false,
@@ -2652,6 +2656,7 @@
2652
2656
  port: undefined,
2653
2657
  };
2654
2658
  websocket._autoPong = opts.autoPong;
2659
+ websocket._closeTimeout = opts.closeTimeout;
2655
2660
  if (!protocolVersions.includes(opts.protocolVersion)) {
2656
2661
  throw new RangeError(
2657
2662
  `Unsupported protocol version: ${opts.protocolVersion} ` +
@@ -3035,7 +3040,7 @@
3035
3040
  function setCloseTimer(websocket) {
3036
3041
  websocket._closeTimer = setTimeout(
3037
3042
  websocket._socket.destroy.bind(websocket._socket),
3038
- closeTimeout,
3043
+ websocket._closeTimeout,
3039
3044
  );
3040
3045
  }
3041
3046
  function socketOnClose() {
@@ -3044,13 +3049,13 @@
3044
3049
  this.removeListener("data", socketOnData);
3045
3050
  this.removeListener("end", socketOnEnd);
3046
3051
  websocket._readyState = WebSocket.CLOSING;
3047
- let chunk;
3048
3052
  if (
3049
3053
  !this._readableState.endEmitted &&
3050
3054
  !websocket._closeFrameReceived &&
3051
3055
  !websocket._receiver._writableState.errorEmitted &&
3052
- (chunk = websocket._socket.read()) !== null
3056
+ this._readableState.length !== 0
3053
3057
  ) {
3058
+ const chunk = this.read(this._readableState.length);
3054
3059
  websocket._receiver.write(chunk);
3055
3060
  }
3056
3061
  websocket._receiver.end();
@@ -3156,6 +3161,6 @@
3156
3161
  }
3157
3162
  if (typeof __nccwpck_require__ !== "undefined")
3158
3163
  __nccwpck_require__.ab = __dirname + "/";
3159
- var __webpack_exports__ = __nccwpck_require__(821);
3164
+ var __webpack_exports__ = __nccwpck_require__(159);
3160
3165
  module.exports = __webpack_exports__;
3161
3166
  })();
@@ -1 +1 @@
1
- {"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.18.3","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.19.0","license":"MIT","types":"index.d.ts","type":"commonjs"}