@rspack/dev-server 2.1.0 → 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.
@@ -8,5 +8,5 @@
8
8
  * https://github.com/webpack/webpack-dev-server/blob/main/LICENSE
9
9
  */
10
10
  import { type LoggerOptions, type LoggingFunction } from '../types.js';
11
- declare const _default: ({ level, debug, console, }: LoggerOptions) => LoggingFunction;
12
11
  export default _default;
12
+ declare function _default({ level, debug, console, }: LoggerOptions): LoggingFunction;
@@ -16,9 +16,11 @@ declare class SyncBailHook {
16
16
  constructor(_args?: string[]);
17
17
  call(_origin?: string, _type?: string, _args?: unknown): undefined;
18
18
  }
19
+ declare const configureDefaultLogger: (options: LoggerOptions) => void;
20
+ declare const getLogger: (name: string) => Logger;
19
21
  export declare const logger: {
20
- getLogger: (name: string) => Logger;
21
- configureDefaultLogger: (options: LoggerOptions) => void;
22
+ getLogger: typeof getLogger;
23
+ configureDefaultLogger: typeof configureDefaultLogger;
22
24
  hooks: {
23
25
  log: SyncBailHook;
24
26
  };
@@ -21,7 +21,7 @@ type Event = {
21
21
  type StateMachine = {
22
22
  send: (event: Event) => void;
23
23
  };
24
- declare const formatProblem: (type: "warning" | "error", item: string | Message) => {
24
+ declare const formatProblem: (type: 'warning' | 'error', item: string | Message) => {
25
25
  header: string;
26
26
  body: string;
27
27
  };
@@ -22,9 +22,9 @@ declare const _closeTags: Record<string, string | ((ansiCodes: Option<Array<stri
22
22
  * Converts text with ANSI color codes to HTML markup.
23
23
  */
24
24
  declare function ansiHTML(text: string): string;
25
+ export default ansiHTML;
25
26
  declare namespace ansiHTML {
26
27
  var setColors: (colors: typeof _defColors) => void;
27
28
  var reset: () => void;
28
29
  var tags: AnsiHtmlTags;
29
30
  }
30
- export default ansiHTML;
@@ -1,12 +1,12 @@
1
1
  /*! LICENSE: 0~chokidar.js.LICENSE.txt */
2
- import { __webpack_require__ } from "./944.js";
2
+ import { __webpack_require__ } from "./619.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";
6
6
  import { join, relative as external_node_path_relative, resolve as external_node_path_resolve, sep } from "node:path";
7
7
  import { Readable } from "node:stream";
8
8
  import { type as external_node_os_type } from "node:os";
9
- import * as __rspack_external_node_path_c5b9b54f from "node:path";
9
+ import * as __rspack_external_node_path_806ed179 from "node:path";
10
10
  var chokidar_namespaceObject = {};
11
11
  __webpack_require__.r(chokidar_namespaceObject);
12
12
  __webpack_require__.d(chokidar_namespaceObject, {
@@ -539,7 +539,7 @@ const binaryExtensions = new Set([
539
539
  'zip',
540
540
  'zipx'
541
541
  ]);
542
- const isBinaryPath = (filePath)=>binaryExtensions.has(__rspack_external_node_path_c5b9b54f.extname(filePath).slice(1).toLowerCase());
542
+ const isBinaryPath = (filePath)=>binaryExtensions.has(__rspack_external_node_path_806ed179.extname(filePath).slice(1).toLowerCase());
543
543
  const foreach = (val, fn)=>{
544
544
  if (val instanceof Set) val.forEach(fn);
545
545
  else fn(val);
@@ -569,7 +569,7 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
569
569
  emitRaw(rawEvent, evPath, {
570
570
  watchedPath: path
571
571
  });
572
- if (evPath && path !== evPath) fsWatchBroadcast(__rspack_external_node_path_c5b9b54f.resolve(path, evPath), KEY_LISTENERS, __rspack_external_node_path_c5b9b54f.join(path, evPath));
572
+ if (evPath && path !== evPath) fsWatchBroadcast(__rspack_external_node_path_806ed179.resolve(path, evPath), KEY_LISTENERS, __rspack_external_node_path_806ed179.join(path, evPath));
573
573
  };
574
574
  try {
575
575
  return watch(path, {
@@ -684,11 +684,11 @@ class NodeFsHandler {
684
684
  }
685
685
  _watchWithNodeFs(path, listener) {
686
686
  const opts = this.fsw.options;
687
- const directory = __rspack_external_node_path_c5b9b54f.dirname(path);
688
- const basename = __rspack_external_node_path_c5b9b54f.basename(path);
687
+ const directory = __rspack_external_node_path_806ed179.dirname(path);
688
+ const basename = __rspack_external_node_path_806ed179.basename(path);
689
689
  const parent = this.fsw._getWatchedDir(directory);
690
690
  parent.add(basename);
691
- const absolutePath = __rspack_external_node_path_c5b9b54f.resolve(path);
691
+ const absolutePath = __rspack_external_node_path_806ed179.resolve(path);
692
692
  const options = {
693
693
  persistent: opts.persistent
694
694
  };
@@ -710,8 +710,8 @@ class NodeFsHandler {
710
710
  }
711
711
  _handleFile(file, stats, initialAdd) {
712
712
  if (this.fsw.closed) return;
713
- const dirname = __rspack_external_node_path_c5b9b54f.dirname(file);
714
- const basename = __rspack_external_node_path_c5b9b54f.basename(file);
713
+ const dirname = __rspack_external_node_path_806ed179.dirname(file);
714
+ const basename = __rspack_external_node_path_806ed179.basename(file);
715
715
  const parent = this.fsw._getWatchedDir(dirname);
716
716
  let prevStats = stats;
717
717
  if (parent.has(basename)) return;
@@ -778,7 +778,7 @@ class NodeFsHandler {
778
778
  this.fsw._symlinkPaths.set(full, true);
779
779
  }
780
780
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
781
- directory = __rspack_external_node_path_c5b9b54f.join(directory, '');
781
+ directory = __rspack_external_node_path_806ed179.join(directory, '');
782
782
  const throttleKey = target ? `${directory}:${target}` : directory;
783
783
  throttler = this.fsw._throttle('readdir', throttleKey, 1000);
784
784
  if (!throttler) return;
@@ -795,7 +795,7 @@ class NodeFsHandler {
795
795
  return;
796
796
  }
797
797
  const item = entry.path;
798
- let path = __rspack_external_node_path_c5b9b54f.join(directory, item);
798
+ let path = __rspack_external_node_path_806ed179.join(directory, item);
799
799
  current.add(item);
800
800
  if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) return;
801
801
  if (this.fsw.closed) {
@@ -804,7 +804,7 @@ class NodeFsHandler {
804
804
  }
805
805
  if (item === target || !target && !previous.has(item)) {
806
806
  this.fsw._incrReadyCount();
807
- path = __rspack_external_node_path_c5b9b54f.join(dir, __rspack_external_node_path_c5b9b54f.relative(dir, path));
807
+ path = __rspack_external_node_path_806ed179.join(dir, __rspack_external_node_path_806ed179.relative(dir, path));
808
808
  this._addToNodeFs(path, initialAdd, wh, depth + 1);
809
809
  }
810
810
  }).on(EV.ERROR, this._boundHandleError);
@@ -826,10 +826,10 @@ class NodeFsHandler {
826
826
  });
827
827
  }
828
828
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
829
- const parentDir = this.fsw._getWatchedDir(__rspack_external_node_path_c5b9b54f.dirname(dir));
830
- const tracked = parentDir.has(__rspack_external_node_path_c5b9b54f.basename(dir));
829
+ const parentDir = this.fsw._getWatchedDir(__rspack_external_node_path_806ed179.dirname(dir));
830
+ const tracked = parentDir.has(__rspack_external_node_path_806ed179.basename(dir));
831
831
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) this.fsw._emit(EV.ADD_DIR, dir, stats);
832
- parentDir.add(__rspack_external_node_path_c5b9b54f.basename(dir));
832
+ parentDir.add(__rspack_external_node_path_806ed179.basename(dir));
833
833
  this.fsw._getWatchedDir(dir);
834
834
  let throttler;
835
835
  let closer;
@@ -867,7 +867,7 @@ class NodeFsHandler {
867
867
  const follow = this.fsw.options.followSymlinks;
868
868
  let closer;
869
869
  if (stats.isDirectory()) {
870
- const absPath = __rspack_external_node_path_c5b9b54f.resolve(path);
870
+ const absPath = __rspack_external_node_path_806ed179.resolve(path);
871
871
  const targetPath = follow ? await promises_realpath(path) : path;
872
872
  if (this.fsw.closed) return;
873
873
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -876,12 +876,12 @@ class NodeFsHandler {
876
876
  } else if (stats.isSymbolicLink()) {
877
877
  const targetPath = follow ? await promises_realpath(path) : path;
878
878
  if (this.fsw.closed) return;
879
- const parent = __rspack_external_node_path_c5b9b54f.dirname(wh.watchPath);
879
+ const parent = __rspack_external_node_path_806ed179.dirname(wh.watchPath);
880
880
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
881
881
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
882
882
  closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
883
883
  if (this.fsw.closed) return;
884
- if (void 0 !== targetPath) this.fsw._symlinkPaths.set(__rspack_external_node_path_c5b9b54f.resolve(path), targetPath);
884
+ if (void 0 !== targetPath) this.fsw._symlinkPaths.set(__rspack_external_node_path_806ed179.resolve(path), targetPath);
885
885
  } else closer = this._handleFile(wh.watchPath, stats, initialAdd);
886
886
  ready();
887
887
  if (closer) this.fsw._addPathCloser(path, closer);
@@ -916,9 +916,9 @@ function createPattern(matcher) {
916
916
  if ('object' == typeof matcher && null !== matcher) return (string)=>{
917
917
  if (matcher.path === string) return true;
918
918
  if (matcher.recursive) {
919
- const relative = __rspack_external_node_path_c5b9b54f.relative(matcher.path, string);
919
+ const relative = __rspack_external_node_path_806ed179.relative(matcher.path, string);
920
920
  if (!relative) return false;
921
- return !relative.startsWith('..') && !__rspack_external_node_path_c5b9b54f.isAbsolute(relative);
921
+ return !relative.startsWith('..') && !__rspack_external_node_path_806ed179.isAbsolute(relative);
922
922
  }
923
923
  return false;
924
924
  };
@@ -926,7 +926,7 @@ function createPattern(matcher) {
926
926
  }
927
927
  function normalizePath(path) {
928
928
  if ('string' != typeof path) throw new Error('string expected');
929
- path = __rspack_external_node_path_c5b9b54f.normalize(path);
929
+ path = __rspack_external_node_path_806ed179.normalize(path);
930
930
  path = path.replace(/\\/g, '/');
931
931
  let prepend = false;
932
932
  if (path.startsWith('//')) prepend = true;
@@ -962,14 +962,14 @@ const toUnix = (string)=>{
962
962
  if (prepend) str = SLASH + str;
963
963
  return str;
964
964
  };
965
- const normalizePathToUnix = (path)=>toUnix(__rspack_external_node_path_c5b9b54f.normalize(toUnix(path)));
965
+ const normalizePathToUnix = (path)=>toUnix(__rspack_external_node_path_806ed179.normalize(toUnix(path)));
966
966
  const normalizeIgnored = (cwd = '')=>(path)=>{
967
- if ('string' == typeof path) return normalizePathToUnix(__rspack_external_node_path_c5b9b54f.isAbsolute(path) ? path : __rspack_external_node_path_c5b9b54f.join(cwd, path));
967
+ if ('string' == typeof path) return normalizePathToUnix(__rspack_external_node_path_806ed179.isAbsolute(path) ? path : __rspack_external_node_path_806ed179.join(cwd, path));
968
968
  return path;
969
969
  };
970
970
  const getAbsolutePath = (path, cwd)=>{
971
- if (__rspack_external_node_path_c5b9b54f.isAbsolute(path)) return path;
972
- return __rspack_external_node_path_c5b9b54f.join(cwd, path);
971
+ if (__rspack_external_node_path_806ed179.isAbsolute(path)) return path;
972
+ return __rspack_external_node_path_806ed179.join(cwd, path);
973
973
  };
974
974
  const EMPTY_SET = Object.freeze(new Set());
975
975
  class DirEntry {
@@ -995,7 +995,7 @@ class DirEntry {
995
995
  try {
996
996
  await readdir(dir);
997
997
  } catch (err) {
998
- if (this._removeWatcher) this._removeWatcher(__rspack_external_node_path_c5b9b54f.dirname(dir), __rspack_external_node_path_c5b9b54f.basename(dir));
998
+ if (this._removeWatcher) this._removeWatcher(__rspack_external_node_path_806ed179.dirname(dir), __rspack_external_node_path_806ed179.basename(dir));
999
999
  }
1000
1000
  }
1001
1001
  has(item) {
@@ -1033,7 +1033,7 @@ class WatchHelper {
1033
1033
  const watchPath = path;
1034
1034
  this.path = path = path.replace(REPLACER_RE, '');
1035
1035
  this.watchPath = watchPath;
1036
- this.fullWatchPath = __rspack_external_node_path_c5b9b54f.resolve(watchPath);
1036
+ this.fullWatchPath = __rspack_external_node_path_806ed179.resolve(watchPath);
1037
1037
  this.dirParts = [];
1038
1038
  this.dirParts.forEach((parts)=>{
1039
1039
  if (parts.length > 1) parts.pop();
@@ -1042,7 +1042,7 @@ class WatchHelper {
1042
1042
  this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
1043
1043
  }
1044
1044
  entryPath(entry) {
1045
- return __rspack_external_node_path_c5b9b54f.join(this.watchPath, __rspack_external_node_path_c5b9b54f.relative(this.watchPath, entry.fullPath));
1045
+ return __rspack_external_node_path_806ed179.join(this.watchPath, __rspack_external_node_path_806ed179.relative(this.watchPath, entry.fullPath));
1046
1046
  }
1047
1047
  filterPath(entry) {
1048
1048
  const { stats } = entry;
@@ -1167,7 +1167,7 @@ class FSWatcher extends EventEmitter {
1167
1167
  })).then((results)=>{
1168
1168
  if (this.closed) return;
1169
1169
  results.forEach((item)=>{
1170
- if (item) this.add(__rspack_external_node_path_c5b9b54f.dirname(item), __rspack_external_node_path_c5b9b54f.basename(_origAdd || item));
1170
+ if (item) this.add(__rspack_external_node_path_806ed179.dirname(item), __rspack_external_node_path_806ed179.basename(_origAdd || item));
1171
1171
  });
1172
1172
  });
1173
1173
  return this;
@@ -1177,9 +1177,9 @@ class FSWatcher extends EventEmitter {
1177
1177
  const paths = unifyPaths(paths_);
1178
1178
  const { cwd } = this.options;
1179
1179
  paths.forEach((path)=>{
1180
- if (!__rspack_external_node_path_c5b9b54f.isAbsolute(path) && !this._closers.has(path)) {
1181
- if (cwd) path = __rspack_external_node_path_c5b9b54f.join(cwd, path);
1182
- path = __rspack_external_node_path_c5b9b54f.resolve(path);
1180
+ if (!__rspack_external_node_path_806ed179.isAbsolute(path) && !this._closers.has(path)) {
1181
+ if (cwd) path = __rspack_external_node_path_806ed179.join(cwd, path);
1182
+ path = __rspack_external_node_path_806ed179.resolve(path);
1183
1183
  }
1184
1184
  this._closePath(path);
1185
1185
  this._addIgnoredPath(path);
@@ -1216,7 +1216,7 @@ class FSWatcher extends EventEmitter {
1216
1216
  getWatched() {
1217
1217
  const watchList = {};
1218
1218
  this._watched.forEach((entry, dir)=>{
1219
- const key = this.options.cwd ? __rspack_external_node_path_c5b9b54f.relative(this.options.cwd, dir) : dir;
1219
+ const key = this.options.cwd ? __rspack_external_node_path_806ed179.relative(this.options.cwd, dir) : dir;
1220
1220
  const index = key || ONE_DOT;
1221
1221
  watchList[index] = entry.getChildren().sort();
1222
1222
  });
@@ -1229,8 +1229,8 @@ class FSWatcher extends EventEmitter {
1229
1229
  async _emit(event, path, stats) {
1230
1230
  if (this.closed) return;
1231
1231
  const opts = this.options;
1232
- if (isWindows) path = __rspack_external_node_path_c5b9b54f.normalize(path);
1233
- if (opts.cwd) path = __rspack_external_node_path_c5b9b54f.relative(opts.cwd, path);
1232
+ if (isWindows) path = __rspack_external_node_path_806ed179.normalize(path);
1233
+ if (opts.cwd) path = __rspack_external_node_path_806ed179.relative(opts.cwd, path);
1234
1234
  const args = [
1235
1235
  path
1236
1236
  ];
@@ -1281,7 +1281,7 @@ class FSWatcher extends EventEmitter {
1281
1281
  if (isThrottled) return this;
1282
1282
  }
1283
1283
  if (opts.alwaysStat && void 0 === stats && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
1284
- const fullPath = opts.cwd ? __rspack_external_node_path_c5b9b54f.join(opts.cwd, path) : path;
1284
+ const fullPath = opts.cwd ? __rspack_external_node_path_806ed179.join(opts.cwd, path) : path;
1285
1285
  let stats;
1286
1286
  try {
1287
1287
  stats = await promises_stat(fullPath);
@@ -1333,7 +1333,7 @@ class FSWatcher extends EventEmitter {
1333
1333
  const pollInterval = awf.pollInterval;
1334
1334
  let timeoutHandler;
1335
1335
  let fullPath = path;
1336
- if (this.options.cwd && !__rspack_external_node_path_c5b9b54f.isAbsolute(path)) fullPath = __rspack_external_node_path_c5b9b54f.join(this.options.cwd, path);
1336
+ if (this.options.cwd && !__rspack_external_node_path_806ed179.isAbsolute(path)) fullPath = __rspack_external_node_path_806ed179.join(this.options.cwd, path);
1337
1337
  const now = new Date();
1338
1338
  const writes = this._pendingWrites;
1339
1339
  function awaitWriteFinishFn(prevStat) {
@@ -1388,7 +1388,7 @@ class FSWatcher extends EventEmitter {
1388
1388
  return new WatchHelper(path, this.options.followSymlinks, this);
1389
1389
  }
1390
1390
  _getWatchedDir(directory) {
1391
- const dir = __rspack_external_node_path_c5b9b54f.resolve(directory);
1391
+ const dir = __rspack_external_node_path_806ed179.resolve(directory);
1392
1392
  if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
1393
1393
  return this._watched.get(dir);
1394
1394
  }
@@ -1397,8 +1397,8 @@ class FSWatcher extends EventEmitter {
1397
1397
  return Boolean(256 & Number(stats.mode));
1398
1398
  }
1399
1399
  _remove(directory, item, isDirectory) {
1400
- const path = __rspack_external_node_path_c5b9b54f.join(directory, item);
1401
- const fullPath = __rspack_external_node_path_c5b9b54f.resolve(path);
1400
+ const path = __rspack_external_node_path_806ed179.join(directory, item);
1401
+ const fullPath = __rspack_external_node_path_806ed179.resolve(path);
1402
1402
  isDirectory = null != isDirectory ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
1403
1403
  if (!this._throttle('remove', path, 100)) return;
1404
1404
  if (!isDirectory && 1 === this._watched.size) this.add(directory, item, true);
@@ -1410,7 +1410,7 @@ class FSWatcher extends EventEmitter {
1410
1410
  parent.remove(item);
1411
1411
  if (this._symlinkPaths.has(fullPath)) this._symlinkPaths.delete(fullPath);
1412
1412
  let relPath = path;
1413
- if (this.options.cwd) relPath = __rspack_external_node_path_c5b9b54f.relative(this.options.cwd, path);
1413
+ if (this.options.cwd) relPath = __rspack_external_node_path_806ed179.relative(this.options.cwd, path);
1414
1414
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
1415
1415
  const event = this._pendingWrites.get(relPath).cancelWait();
1416
1416
  if (event === EVENTS.ADD) return;
@@ -1423,8 +1423,8 @@ class FSWatcher extends EventEmitter {
1423
1423
  }
1424
1424
  _closePath(path) {
1425
1425
  this._closeFile(path);
1426
- const dir = __rspack_external_node_path_c5b9b54f.dirname(path);
1427
- this._getWatchedDir(dir).remove(__rspack_external_node_path_c5b9b54f.basename(path));
1426
+ const dir = __rspack_external_node_path_806ed179.dirname(path);
1427
+ this._getWatchedDir(dir).remove(__rspack_external_node_path_806ed179.basename(path));
1428
1428
  }
1429
1429
  _closeFile(path) {
1430
1430
  const closers = this._closers.get(path);
@@ -1,5 +1,5 @@
1
- import { __webpack_require__ } from "./944.js";
2
- import "./944.js";
1
+ import { __webpack_require__ } from "./619.js";
2
+ import "./619.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?b918");
@@ -1,7 +1,7 @@
1
1
  /*! LICENSE: 0~connect-next.js.LICENSE.txt */
2
2
  import { EventEmitter } from "node:events";
3
3
  import { createRequire } from "node:module";
4
- import * as __rspack_external_node_http_2dc67212 from "node:http";
4
+ import * as __rspack_external_node_http_e245b239 from "node:http";
5
5
  /*! LICENSE: index.js.LICENSE.txt */ const __rspack_createRequire_require = createRequire(import.meta.url);
6
6
  var __webpack_modules__ = {};
7
7
  var __webpack_module_cache__ = {};
@@ -1209,7 +1209,7 @@ const proto = {
1209
1209
  next();
1210
1210
  },
1211
1211
  listen (...args) {
1212
- const server = __rspack_external_node_http_2dc67212.createServer(this);
1212
+ const server = __rspack_external_node_http_e245b239.createServer(this);
1213
1213
  return server.listen(...args);
1214
1214
  }
1215
1215
  };
@@ -1244,6 +1244,6 @@ function isConnectServer(value) {
1244
1244
  return 'function' == typeof value && 'handle' in value && 'function' == typeof value.handle;
1245
1245
  }
1246
1246
  function isHttpServer(value) {
1247
- return value instanceof __rspack_external_node_http_2dc67212.Server;
1247
+ return value instanceof __rspack_external_node_http_e245b239.Server;
1248
1248
  }
1249
1249
  export { connect };
package/dist/0~debug.js CHANGED
@@ -1,7 +1,7 @@
1
- import { __webpack_require__ } from "./944.js";
2
- import "./944.js";
1
+ import { __webpack_require__ } from "./619.js";
2
+ import "./619.js";
3
3
  __webpack_require__.add({
4
- "./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js" (module, exports, __webpack_require__) {
4
+ "./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js" (module, exports, __webpack_require__) {
5
5
  exports.formatArgs = formatArgs;
6
6
  exports.save = save;
7
7
  exports.load = load;
@@ -134,7 +134,7 @@ __webpack_require__.add({
134
134
  return localStorage;
135
135
  } catch (error) {}
136
136
  }
137
- module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js")(exports);
137
+ module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js")(exports);
138
138
  const { formatters } = module.exports;
139
139
  formatters.j = function(v) {
140
140
  try {
@@ -144,7 +144,7 @@ __webpack_require__.add({
144
144
  }
145
145
  };
146
146
  },
147
- "./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js" (module, __unused_rspack_exports, __webpack_require__) {
147
+ "./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js" (module, __unused_rspack_exports, __webpack_require__) {
148
148
  function setup(env) {
149
149
  createDebug.debug = createDebug;
150
150
  createDebug.default = createDebug;
@@ -286,11 +286,11 @@ __webpack_require__.add({
286
286
  }
287
287
  module.exports = setup;
288
288
  },
289
- "./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
290
- if ("u" < typeof process || 'renderer' === process.type || true === process.browser || process.__nwjs) module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js");
291
- else module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js");
289
+ "./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
290
+ if ("u" < typeof process || 'renderer' === process.type || true === process.browser || process.__nwjs) module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js");
291
+ else module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js");
292
292
  },
293
- "./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js" (module, exports, __webpack_require__) {
293
+ "./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js" (module, exports, __webpack_require__) {
294
294
  const tty = __webpack_require__("tty");
295
295
  const util = __webpack_require__("util");
296
296
  exports.init = init;
@@ -428,7 +428,7 @@ __webpack_require__.add({
428
428
  const keys = Object.keys(exports.inspectOpts);
429
429
  for(let i = 0; i < keys.length; i++)debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
430
430
  }
431
- module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js")(exports);
431
+ module.exports = __webpack_require__("./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js")(exports);
432
432
  const { formatters } = module.exports;
433
433
  formatters.o = function(v) {
434
434
  this.inspectOpts.colors = this.useColors;
@@ -5,13 +5,14 @@ import node_http2 from "node:http2";
5
5
  import { EventEmitter } from "node:events";
6
6
  import "node:net";
7
7
  import "node:stream";
8
+ import { styleText } from "node:util";
8
9
  import { URL as external_node_url_URL } from "node:url";
9
10
  import { URL as external_url_URL } from "url";
10
11
  import "node:zlib";
11
12
  import "node:querystring";
12
- import { __webpack_require__ } from "./944.js";
13
+ import { __webpack_require__ } from "./619.js";
13
14
  import "./0~debug.js";
14
- import "./944.js";
15
+ import "./619.js";
15
16
  __webpack_require__.add({
16
17
  "./node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js" (module, __unused_rspack_exports, __webpack_require__) {
17
18
  const stringify = __webpack_require__("./node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js");
@@ -2796,6 +2797,7 @@ __webpack_require__.add({
2796
2797
  }
2797
2798
  });
2798
2799
  const upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
2800
+ const transferEncodingConnectionToken = /(^|,)\s*transfer-encoding\s*($|,)/i;
2799
2801
  const defaultAgents = {
2800
2802
  http: new node_http.Agent({
2801
2803
  keepAlive: true,
@@ -2809,6 +2811,16 @@ const defaultAgents = {
2809
2811
  })
2810
2812
  };
2811
2813
  const isSSL = /^https|wss/;
2814
+ function forceConnectionCloseForTransferEncoding(headers) {
2815
+ let carriesTransferEncoding = false;
2816
+ for(const key in headers)if (void 0 !== headers[key] && "transfer-encoding" === key.toLowerCase()) {
2817
+ carriesTransferEncoding = true;
2818
+ break;
2819
+ }
2820
+ const connection = headers.connection;
2821
+ const connectionMarksTransferEncoding = "string" == typeof connection && transferEncodingConnectionToken.test(connection);
2822
+ if (carriesTransferEncoding || connectionMarksTransferEncoding) headers.connection = "close";
2823
+ }
2812
2824
  const HTTP2_HEADER_BLACKLIST = [
2813
2825
  ":method",
2814
2826
  ":path",
@@ -2857,6 +2869,8 @@ function setupOutgoing(outgoing, options, req, forward) {
2857
2869
  outgoing.headers = outgoing.headers || {};
2858
2870
  if ("string" != typeof outgoing.headers.connection || !upgradeHeader.test(outgoing.headers.connection)) outgoing.headers.connection = "close";
2859
2871
  }
2872
+ outgoing.headers = outgoing.headers || {};
2873
+ forceConnectionCloseForTransferEncoding(outgoing.headers);
2860
2874
  const target = options[forward || "target"];
2861
2875
  const targetPath = target && false !== options.prependPath ? target.pathname || "" : "";
2862
2876
  const targetSearch = target instanceof URL && false !== options.prependPath ? target.search || "" : "";
@@ -2954,6 +2968,7 @@ const webOutgoingMiddleware = [
2954
2968
  defineProxyOutgoingMiddleware((req, res, proxyRes, options)=>{
2955
2969
  if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers.location && redirectRegex.test(String(proxyRes.statusCode))) {
2956
2970
  const target = _toURL(options.target);
2971
+ const keepProtocolRelative = proxyRes.headers.location.startsWith("//") && !options.protocolRewrite;
2957
2972
  const u = new URL(proxyRes.headers.location, target);
2958
2973
  if (target.host !== u.host) return;
2959
2974
  if (options.hostRewrite) u.host = options.hostRewrite;
@@ -2962,7 +2977,7 @@ const webOutgoingMiddleware = [
2962
2977
  else if (req.headers.host) u.host = req.headers.host;
2963
2978
  }
2964
2979
  if (options.protocolRewrite) u.protocol = options.protocolRewrite;
2965
- proxyRes.headers.location = u.toString();
2980
+ proxyRes.headers.location = keepProtocolRelative ? u.href.slice(u.protocol.length) : u.href;
2966
2981
  }
2967
2982
  }),
2968
2983
  defineProxyOutgoingMiddleware((req, res, proxyRes, options)=>{
@@ -3012,7 +3027,7 @@ const nativeAgents = {
3012
3027
  http: node_http,
3013
3028
  https: node_https
3014
3029
  };
3015
- const redirectStatuses = new Set([
3030
+ const redirectStatuses = /* @__PURE__ */ new Set([
3016
3031
  301,
3017
3032
  302,
3018
3033
  303,
@@ -3021,10 +3036,7 @@ const redirectStatuses = new Set([
3021
3036
  ]);
3022
3037
  const webIncomingMiddleware = [
3023
3038
  defineProxyMiddleware((req)=>{
3024
- if (("DELETE" === req.method || "OPTIONS" === req.method) && !req.headers["content-length"]) {
3025
- req.headers["content-length"] = "0";
3026
- delete req.headers["transfer-encoding"];
3027
- }
3039
+ if (("DELETE" === req.method || "OPTIONS" === req.method) && !req.headers["content-length"] && !req.headers["transfer-encoding"]) req.headers["content-length"] = "0";
3028
3040
  }),
3029
3041
  defineProxyMiddleware((req, res, options)=>{
3030
3042
  if (options.timeout) req.socket.setTimeout(options.timeout, ()=>{
@@ -3127,6 +3139,7 @@ const webIncomingMiddleware = [
3127
3139
  delete redirectHeaders["content-type"];
3128
3140
  delete redirectHeaders["transfer-encoding"];
3129
3141
  }
3142
+ forceConnectionCloseForTransferEncoding(redirectHeaders);
3130
3143
  const redirectOpts = {
3131
3144
  hostname: location.hostname,
3132
3145
  port: location.port || (isHTTPS ? 443 : 80),
@@ -3374,32 +3387,41 @@ function _createProxyFn(type, server) {
3374
3387
  return callbackPromise;
3375
3388
  };
3376
3389
  }
3377
- new Set([
3378
- 301,
3379
- 302,
3380
- 303,
3381
- 307,
3382
- 308
3383
- ]);
3384
- var errors_ERRORS;
3385
- (function(ERRORS) {
3386
- ERRORS["ERR_CONFIG_FACTORY_TARGET_MISSING"] = "[HPM] Missing \"target\" option. Example: {target: \"http://www.example.org\"}";
3387
- ERRORS["ERR_CONTEXT_MATCHER_GENERIC"] = "[HPM] Invalid pathFilter. Expecting something like: \"/api\" or [\"/api\", \"/ajax\"]";
3388
- ERRORS["ERR_CONTEXT_MATCHER_INVALID_ARRAY"] = "[HPM] Invalid pathFilter. Plain paths (e.g. \"/api\") can not be mixed with globs (e.g. \"/api/**\"). Expecting something like: [\"/api\", \"/ajax\"] or [\"/api/**\", \"!**.html\"].";
3389
- ERRORS["ERR_PATH_REWRITER_CONFIG"] = "[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";
3390
- })(errors_ERRORS || (errors_ERRORS = {}));
3390
+ class errors_HttpProxyMiddlewareError extends Error {
3391
+ code;
3392
+ constructor(message, code){
3393
+ super(message);
3394
+ this.code = code;
3395
+ this.name = this.constructor.name;
3396
+ if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
3397
+ }
3398
+ }
3391
3399
  function verifyConfig(options) {
3392
- if (!options.target && !options.router) throw new Error(errors_ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING);
3400
+ if (!options.target && !options.router) throw new errors_HttpProxyMiddlewareError('[HPM] Missing "target" option. Example: {target: "http://www.example.org"}', 'ERR_CONFIG_FACTORY_TARGET_MISSING');
3393
3401
  }
3394
- const src = __webpack_require__("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js");
3402
+ const src = __webpack_require__("./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js");
3395
3403
  const Debug = src('http-proxy-middleware');
3396
3404
  function definePlugin(fn) {
3397
3405
  return fn;
3398
3406
  }
3399
3407
  const debug = Debug.extend('debug-proxy-errors-plugin');
3408
+ const BODY_PARSER_ERROR_MESSAGE = `[HPM] Connection reset (ECONNRESET) detected with non-empty "req.body" [ERR_HPM.GH40].
3409
+
3410
+ This usually means that the POST request body (req.body) was already parsed before reaching the proxy.
3411
+ When bodyParser runs first, it consumes the request stream, leaving the proxy unable to forward the body data to the target server.
3412
+
3413
+ How to fix this issue:
3414
+ - Option 1: Place the proxy middleware before the bodyParser middleware.
3415
+ - Option 2: Use 'fixRequestBody()' helper to fix this issue.
3416
+
3417
+ For more details, see: https://github.com/chimurai/http-proxy-middleware/issues/40\n`;
3418
+ function hasParsedBody(req) {
3419
+ return Boolean(req && 'POST' === req.method && 'body' in req && req.body);
3420
+ }
3400
3421
  const debugProxyErrorsPlugin = definePlugin((proxyServer, options)=>{
3401
3422
  proxyServer.on('error', (error, req, res, target)=>{
3402
3423
  debug(`httpxy error event: \n%O`, error);
3424
+ if ('ECONNRESET' === error.code && hasParsedBody(req)) console.error(styleText('red', BODY_PARSER_ERROR_MESSAGE));
3403
3425
  });
3404
3426
  proxyServer.on('proxyReq', (proxyReq, req, socket)=>{
3405
3427
  socket.on('error', (error)=>{
@@ -3573,13 +3595,13 @@ function matchPathFilter(pathFilter = '/', uri, req) {
3573
3595
  if (Array.isArray(pathFilter)) {
3574
3596
  if (pathFilter.every(isStringPath)) return matchMultiPath(pathFilter, uri);
3575
3597
  if (pathFilter.every(isGlobPath)) return matchMultiGlobPath(pathFilter, uri);
3576
- throw new Error(errors_ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY);
3598
+ throw new errors_HttpProxyMiddlewareError('[HPM] Invalid pathFilter. Plain paths (e.g. "/api") can not be mixed with globs (e.g. "/api/**"). Expecting something like: ["/api", "/ajax"] or ["/api/**", "!**.html"].', 'HPM_INVALID_PATH_FILTER_ARRAY_CONFIG');
3577
3599
  }
3578
3600
  if ('function' == typeof pathFilter) {
3579
3601
  const pathname = getUrlPathName(uri);
3580
3602
  return Boolean(pathFilter(pathname, req));
3581
3603
  }
3582
- throw new Error(errors_ERRORS.ERR_CONTEXT_MATCHER_GENERIC);
3604
+ throw new errors_HttpProxyMiddlewareError('[HPM] Invalid pathFilter. Expecting something like: "/api" or ["/api", "/ajax"]', 'HPM_INVALID_PATH_FILTER_CONFIG');
3583
3605
  }
3584
3606
  function matchSingleStringPath(pathFilter, uri) {
3585
3607
  const pathname = getUrlPathName(uri);
@@ -3641,7 +3663,7 @@ function isValidRewriteConfig(rewriteConfig) {
3641
3663
  if ('function' == typeof rewriteConfig) return true;
3642
3664
  if (isPlainObject(rewriteConfig)) return 0 !== Object.keys(rewriteConfig).length;
3643
3665
  if (null == rewriteConfig) return false;
3644
- throw new Error(errors_ERRORS.ERR_PATH_REWRITER_CONFIG);
3666
+ throw new errors_HttpProxyMiddlewareError('[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function', 'HPM_INVALID_PATH_REWRITER_CONFIG');
3645
3667
  }
3646
3668
  function parsePathRewriteRules(rewriteConfig) {
3647
3669
  const rules = [];
@@ -1,5 +1,5 @@
1
- import { __webpack_require__ } from "./944.js";
2
- import "./944.js";
1
+ import { __webpack_require__ } from "./619.js";
2
+ import "./619.js";
3
3
  __webpack_require__.add({
4
4
  "./node_modules/.pnpm/launch-editor@2.14.1/node_modules/launch-editor/editor-info/linux.js" (module) {
5
5
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /*! LICENSE: 0~serve-static.js.LICENSE.txt */
2
- import { __webpack_require__ } from "./944.js";
3
- import "./944.js";
2
+ import { __webpack_require__ } from "./619.js";
3
+ import "./619.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__) {
@@ -987,14 +987,14 @@ __webpack_require__.add({
987
987
  return a.start - b.start;
988
988
  }
989
989
  },
990
- "./node_modules/.pnpm/send@1.2.1/node_modules/send/index.js" (module, __unused_rspack_exports, __webpack_require__) {
990
+ "./node_modules/.pnpm/send@1.2.1_supports-color@8.1.1/node_modules/send/index.js" (module, __unused_rspack_exports, __webpack_require__) {
991
991
  /*!
992
992
  * send
993
993
  * Copyright(c) 2012 TJ Holowaychuk
994
994
  * Copyright(c) 2014-2022 Douglas Christopher Wilson
995
995
  * MIT Licensed
996
996
  */ var createError = __webpack_require__("./node_modules/.pnpm/http-errors@2.0.1/node_modules/http-errors/index.js");
997
- var debug = __webpack_require__("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js")('send');
997
+ var debug = __webpack_require__("./node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js")('send');
998
998
  var encodeUrl = __webpack_require__("./node_modules/.pnpm/encodeurl@2.0.0/node_modules/encodeurl/index.js");
999
999
  var escapeHtml = __webpack_require__("./node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js");
1000
1000
  var etag = __webpack_require__("./node_modules/.pnpm/etag@1.8.1/node_modules/etag/index.js");
@@ -1418,7 +1418,7 @@ __webpack_require__.add({
1418
1418
  }
1419
1419
  }
1420
1420
  },
1421
- "./node_modules/.pnpm/serve-static@2.2.1/node_modules/serve-static/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1421
+ "./node_modules/.pnpm/serve-static@2.2.1_supports-color@8.1.1/node_modules/serve-static/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1422
1422
  /*!
1423
1423
  * serve-static
1424
1424
  * Copyright(c) 2010 Sencha Inc.
@@ -1429,7 +1429,7 @@ __webpack_require__.add({
1429
1429
  var escapeHtml = __webpack_require__("./node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js");
1430
1430
  var parseUrl = __webpack_require__("./node_modules/.pnpm/parseurl@1.3.3/node_modules/parseurl/index.js");
1431
1431
  var resolve = __webpack_require__("path").resolve;
1432
- var send = __webpack_require__("./node_modules/.pnpm/send@1.2.1/node_modules/send/index.js");
1432
+ var send = __webpack_require__("./node_modules/.pnpm/send@1.2.1_supports-color@8.1.1/node_modules/send/index.js");
1433
1433
  var url = __webpack_require__("url?b918");
1434
1434
  module.exports = serveStatic;
1435
1435
  function serveStatic(root, options) {
@@ -1592,4 +1592,4 @@ __webpack_require__.add({
1592
1592
  module.exports = /*#__PURE__*/ JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}');
1593
1593
  }
1594
1594
  });
1595
- __webpack_require__("./node_modules/.pnpm/serve-static@2.2.1/node_modules/serve-static/index.js");
1595
+ __webpack_require__("./node_modules/.pnpm/serve-static@2.2.1_supports-color@8.1.1/node_modules/serve-static/index.js");
@@ -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 __rspack_external_node_fs_5ea92f0c from "node:fs";
6
- import * as __rspack_external_node_os_74b4b876 from "node:os";
7
- import * as __rspack_external_node_path_c5b9b54f from "node:path";
8
- import * as __rspack_external_node_url_e96de089 from "node:url";
9
- import * as __rspack_external_node_util_1b29d436 from "node:util";
10
- import * as __rspack_external_node_net_0373943e from "node:net";
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) {
@@ -90,14 +90,14 @@ var __webpack_require__temp = __webpack_require__;
90
90
  (()=>{
91
91
  var installedChunks = {
92
92
  410: 0,
93
- 944: 0
93
+ 619: 0
94
94
  };
95
95
  var installChunk = (data)=>{
96
96
  var __rspack_esm_ids = data.__rspack_esm_ids;
97
- var __webpack_modules__ = data.__webpack_modules__;
97
+ var moreModules = data.__webpack_modules__;
98
98
  var __rspack_esm_runtime = data.__rspack_esm_runtime;
99
99
  var moduleId, chunkId, i = 0;
100
- for(moduleId in __webpack_modules__)if (__webpack_require__.o(__webpack_modules__, moduleId)) __webpack_require__.m[moduleId] = __webpack_modules__[moduleId];
100
+ for(moduleId in moreModules)if (__webpack_require__.o(moreModules, moduleId)) __webpack_require__.m[moduleId] = moreModules[moduleId];
101
101
  if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
102
102
  for(; i < __rspack_esm_ids.length; i++){
103
103
  chunkId = __rspack_esm_ids[i];
@@ -1312,8 +1312,8 @@ __webpack_require__.add({
1312
1312
  else root.ipaddr = ipaddr;
1313
1313
  })(this);
1314
1314
  },
1315
- "./node_modules/.pnpm/ws@8.21.0/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.0/node_modules/ws/lib/constants.js");
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");
1317
1317
  const FastBuffer = Buffer[Symbol.species];
1318
1318
  function concat(list, totalLength) {
1319
1319
  if (0 === list.length) return EMPTY_BUFFER;
@@ -1358,7 +1358,7 @@ __webpack_require__.add({
1358
1358
  unmask: _unmask
1359
1359
  };
1360
1360
  },
1361
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js" (module) {
1361
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js" (module) {
1362
1362
  const BINARY_TYPES = [
1363
1363
  'nodebuffer',
1364
1364
  'arraybuffer',
@@ -1379,8 +1379,8 @@ __webpack_require__.add({
1379
1379
  NOOP: ()=>{}
1380
1380
  };
1381
1381
  },
1382
- "./node_modules/.pnpm/ws@8.21.0/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.0/node_modules/ws/lib/constants.js");
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");
1384
1384
  const kCode = Symbol('kCode');
1385
1385
  const kData = Symbol('kData');
1386
1386
  const kError = Symbol('kError');
@@ -1524,8 +1524,8 @@ __webpack_require__.add({
1524
1524
  else listener.call(thisArg, event);
1525
1525
  }
1526
1526
  },
1527
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js" (module, __unused_rspack_exports, __webpack_require__) {
1528
- const { tokenChars } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js");
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");
1529
1529
  function push(dest, name, elem) {
1530
1530
  if (void 0 === dest[name]) dest[name] = [
1531
1531
  elem
@@ -1646,7 +1646,7 @@ __webpack_require__.add({
1646
1646
  parse
1647
1647
  };
1648
1648
  },
1649
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js" (module) {
1649
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js" (module) {
1650
1650
  const kDone = Symbol('kDone');
1651
1651
  const kRun = Symbol('kRun');
1652
1652
  class Limiter {
@@ -1674,11 +1674,11 @@ __webpack_require__.add({
1674
1674
  }
1675
1675
  module.exports = Limiter;
1676
1676
  },
1677
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js" (module, __unused_rspack_exports, __webpack_require__) {
1677
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js" (module, __unused_rspack_exports, __webpack_require__) {
1678
1678
  const zlib = __webpack_require__("zlib");
1679
- const bufferUtil = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js");
1680
- const Limiter = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js");
1681
- const { kStatusCode } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js");
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");
1682
1682
  const FastBuffer = Buffer[Symbol.species];
1683
1683
  const TRAILER = Buffer.from([
1684
1684
  0x00,
@@ -1883,12 +1883,12 @@ __webpack_require__.add({
1883
1883
  this[kCallback](err);
1884
1884
  }
1885
1885
  },
1886
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js" (module, __unused_rspack_exports, __webpack_require__) {
1886
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js" (module, __unused_rspack_exports, __webpack_require__) {
1887
1887
  const { Writable } = __webpack_require__("stream");
1888
- const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js");
1889
- const { BINARY_TYPES, EMPTY_BUFFER, kStatusCode, kWebSocket } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js");
1890
- const { concat, toArrayBuffer, unmask } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js");
1891
- const { isValidStatusCode, isValidUTF8 } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js");
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");
1892
1892
  const FastBuffer = Buffer[Symbol.species];
1893
1893
  const GET_INFO = 0;
1894
1894
  const GET_PAYLOAD_LENGTH_16 = 1;
@@ -1920,6 +1920,7 @@ __webpack_require__.add({
1920
1920
  this._opcode = 0;
1921
1921
  this._totalPayloadLength = 0;
1922
1922
  this._messageLength = 0;
1923
+ this._numFragments = 0;
1923
1924
  this._fragments = [];
1924
1925
  this._errored = false;
1925
1926
  this._loop = false;
@@ -2110,17 +2111,17 @@ __webpack_require__.add({
2110
2111
  if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask);
2111
2112
  }
2112
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
+ }
2113
2119
  if (this._compressed) {
2114
2120
  this._state = INFLATING;
2115
2121
  this.decompress(data, cb);
2116
2122
  return;
2117
2123
  }
2118
2124
  if (data.length) {
2119
- if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
2120
- const error = this.createError(RangeError, 'Too many message fragments', false, 1008, 'WS_ERR_TOO_MANY_BUFFERED_PARTS');
2121
- cb(error);
2122
- return;
2123
- }
2124
2125
  this._messageLength = this._totalPayloadLength;
2125
2126
  this._fragments.push(data);
2126
2127
  }
@@ -2137,11 +2138,6 @@ __webpack_require__.add({
2137
2138
  cb(error);
2138
2139
  return;
2139
2140
  }
2140
- if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
2141
- const error = this.createError(RangeError, 'Too many message fragments', false, 1008, 'WS_ERR_TOO_MANY_BUFFERED_PARTS');
2142
- cb(error);
2143
- return;
2144
- }
2145
2141
  this._fragments.push(buf);
2146
2142
  }
2147
2143
  this.dataMessage(cb);
@@ -2158,6 +2154,7 @@ __webpack_require__.add({
2158
2154
  this._totalPayloadLength = 0;
2159
2155
  this._messageLength = 0;
2160
2156
  this._fragmented = 0;
2157
+ this._numFragments = 0;
2161
2158
  this._fragments = [];
2162
2159
  if (2 === this._opcode) {
2163
2160
  let data;
@@ -2243,14 +2240,14 @@ __webpack_require__.add({
2243
2240
  }
2244
2241
  module.exports = Receiver;
2245
2242
  },
2246
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js" (module, __unused_rspack_exports, __webpack_require__) {
2243
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js" (module, __unused_rspack_exports, __webpack_require__) {
2247
2244
  const { Duplex } = __webpack_require__("stream");
2248
2245
  const { randomFillSync } = __webpack_require__("crypto");
2249
2246
  const { types: { isUint8Array } } = __webpack_require__("util");
2250
- const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js");
2251
- const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js");
2252
- const { isBlob, isValidStatusCode } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js");
2253
- const { mask: applyMask, toBuffer } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js");
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");
2254
2251
  const kByteLength = Symbol('kByteLength');
2255
2252
  const maskBuffer = Buffer.alloc(4);
2256
2253
  const RANDOM_POOL_SIZE = 8192;
@@ -2594,8 +2591,8 @@ __webpack_require__.add({
2594
2591
  sender.onerror(err);
2595
2592
  }
2596
2593
  },
2597
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js" (module, __unused_rspack_exports, __webpack_require__) {
2598
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js");
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");
2599
2596
  const { Duplex } = __webpack_require__("stream");
2600
2597
  function emitClose(stream) {
2601
2598
  stream.emit('close');
@@ -2677,8 +2674,8 @@ __webpack_require__.add({
2677
2674
  }
2678
2675
  module.exports = createWebSocketStream;
2679
2676
  },
2680
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js" (module, __unused_rspack_exports, __webpack_require__) {
2681
- const { tokenChars } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js");
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");
2682
2679
  function parse(header) {
2683
2680
  const protocols = new Set();
2684
2681
  let start = -1;
@@ -2709,9 +2706,9 @@ __webpack_require__.add({
2709
2706
  parse
2710
2707
  };
2711
2708
  },
2712
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js" (module, __unused_rspack_exports, __webpack_require__) {
2709
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js" (module, __unused_rspack_exports, __webpack_require__) {
2713
2710
  const { isUtf8 } = __webpack_require__("buffer");
2714
- const { hasBlob } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js");
2711
+ const { hasBlob } = __webpack_require__("./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js");
2715
2712
  const tokenChars = [
2716
2713
  0,
2717
2714
  0,
@@ -2875,16 +2872,16 @@ __webpack_require__.add({
2875
2872
  return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
2876
2873
  };
2877
2874
  },
2878
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js" (module, __unused_rspack_exports, __webpack_require__) {
2875
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js" (module, __unused_rspack_exports, __webpack_require__) {
2879
2876
  const EventEmitter = __webpack_require__("events");
2880
2877
  const http = __webpack_require__("http");
2881
2878
  const { Duplex } = __webpack_require__("stream");
2882
2879
  const { createHash } = __webpack_require__("crypto");
2883
- const extension = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js");
2884
- const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js");
2885
- const subprotocol = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js");
2886
- const WebSocket = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js");
2887
- const { CLOSE_TIMEOUT, GUID, kWebSocket } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js");
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");
2888
2885
  const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
2889
2886
  const RUNNING = 0;
2890
2887
  const CLOSING = 1;
@@ -2895,8 +2892,8 @@ __webpack_require__.add({
2895
2892
  options = {
2896
2893
  allowSynchronousEvents: true,
2897
2894
  autoPong: true,
2898
- maxBufferedChunks: 1048576,
2899
- maxFragments: 131072,
2895
+ maxBufferedChunks: 262144,
2896
+ maxFragments: 16384,
2900
2897
  maxPayload: 104857600,
2901
2898
  skipUTF8Validation: false,
2902
2899
  perMessageDeflate: false,
@@ -3137,7 +3134,7 @@ __webpack_require__.add({
3137
3134
  } else abortHandshake(socket, code, message, headers);
3138
3135
  }
3139
3136
  },
3140
- "./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js" (module, __unused_rspack_exports, __webpack_require__) {
3137
+ "./node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js" (module, __unused_rspack_exports, __webpack_require__) {
3141
3138
  const EventEmitter = __webpack_require__("events");
3142
3139
  const https = __webpack_require__("https");
3143
3140
  const http = __webpack_require__("http");
@@ -3146,14 +3143,14 @@ __webpack_require__.add({
3146
3143
  const { randomBytes, createHash } = __webpack_require__("crypto");
3147
3144
  const { Duplex, Readable } = __webpack_require__("stream");
3148
3145
  const { URL: URL1 } = __webpack_require__("url?b918");
3149
- const PerMessageDeflate = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js");
3150
- const Receiver = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js");
3151
- const Sender = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js");
3152
- const { isBlob } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js");
3153
- const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js");
3154
- const { EventTarget: { addEventListener, removeEventListener } } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js");
3155
- const { format, parse } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js");
3156
- const { toBuffer } = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js");
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");
3157
3154
  const kAborted = Symbol('kAborted');
3158
3155
  const protocolVersions = [
3159
3156
  8,
@@ -3452,8 +3449,8 @@ __webpack_require__.add({
3452
3449
  autoPong: true,
3453
3450
  closeTimeout: CLOSE_TIMEOUT,
3454
3451
  protocolVersion: protocolVersions[1],
3455
- maxBufferedChunks: 1048576,
3456
- maxFragments: 131072,
3452
+ maxBufferedChunks: 262144,
3453
+ maxFragments: 16384,
3457
3454
  maxPayload: 104857600,
3458
3455
  skipUTF8Validation: false,
3459
3456
  perMessageDeflate: true,
@@ -3839,7 +3836,7 @@ __webpack_require__.add({
3839
3836
  const minPort = 1024;
3840
3837
  const maxPort = 65535;
3841
3838
  const getLocalHosts = ()=>{
3842
- const interfaces = __rspack_external_node_os_74b4b876.networkInterfaces();
3839
+ const interfaces = __rspack_external_node_os_4f3c9d58.networkInterfaces();
3843
3840
  const results = new Set([
3844
3841
  void 0,
3845
3842
  '0.0.0.0'
@@ -3848,7 +3845,7 @@ const getLocalHosts = ()=>{
3848
3845
  return results;
3849
3846
  };
3850
3847
  const checkAvailablePort = (basePort, host)=>new Promise((resolve, reject)=>{
3851
- const server = __rspack_external_node_net_0373943e.createServer();
3848
+ const server = __rspack_external_node_net_5ed819e1.createServer();
3852
3849
  server.unref();
3853
3850
  server.on('error', reject);
3854
3851
  server.listen(basePort, host, ()=>{
@@ -3890,14 +3887,14 @@ async function getPort(basePort, host) {
3890
3887
  }
3891
3888
  throw new Error('No available ports found');
3892
3889
  }
3893
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js");
3894
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js");
3895
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js");
3896
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js");
3897
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js");
3898
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js");
3899
- __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js");
3900
- const websocket_server = __webpack_require__("./node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js");
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");
3901
3898
  class BaseServer {
3902
3899
  server;
3903
3900
  clients;
@@ -3960,7 +3957,7 @@ const src = __webpack_require__("./node_modules/.pnpm/http-compression@1.1.3/nod
3960
3957
  var src_default = /*#__PURE__*/ __webpack_require__.n(src);
3961
3958
  const ipaddr = __webpack_require__("./node_modules/.pnpm/ipaddr.js@2.4.0/node_modules/ipaddr.js/lib/ipaddr.js");
3962
3959
  var ipaddr_default = /*#__PURE__*/ __webpack_require__.n(ipaddr);
3963
- const { styleText: styleText } = __rspack_external_node_util_1b29d436;
3960
+ const { styleText: styleText } = __rspack_external_node_util_ac04460e;
3964
3961
  const server_require = createRequire(import.meta.url);
3965
3962
  if (!process.env.RSPACK_SERVE) process.env.RSPACK_SERVE = 'true';
3966
3963
  const getConnect = async ()=>{
@@ -4024,7 +4021,7 @@ class Server {
4024
4021
  static findIp(gatewayOrFamily, isInternal) {
4025
4022
  if ('v4' === gatewayOrFamily || 'v6' === gatewayOrFamily) {
4026
4023
  let host;
4027
- const networks = Object.values(__rspack_external_node_os_74b4b876.networkInterfaces()).flatMap((networks)=>networks ?? []).filter((network)=>{
4024
+ const networks = Object.values(__rspack_external_node_os_4f3c9d58.networkInterfaces()).flatMap((networks)=>networks ?? []).filter((network)=>{
4028
4025
  if (!network || !network.address) return false;
4029
4026
  if (network.family !== `IP${gatewayOrFamily}`) return false;
4030
4027
  if (void 0 !== isInternal && network.internal !== isInternal) return false;
@@ -4041,7 +4038,7 @@ class Server {
4041
4038
  return host;
4042
4039
  }
4043
4040
  const gatewayIp = ipaddr_default().parse(gatewayOrFamily);
4044
- for (const addresses of Object.values(__rspack_external_node_os_74b4b876.networkInterfaces()))for (const { cidr } of addresses){
4041
+ for (const addresses of Object.values(__rspack_external_node_os_4f3c9d58.networkInterfaces()))for (const { cidr } of addresses){
4045
4042
  const net = ipaddr_default().parseCIDR(cidr);
4046
4043
  if (net[0] && net[0].kind() === gatewayIp.kind() && gatewayIp.match(net)) return net[0].toString();
4047
4044
  }
@@ -4066,19 +4063,19 @@ class Server {
4066
4063
  let dir = cwd;
4067
4064
  for(;;){
4068
4065
  try {
4069
- if (__rspack_external_node_fs_5ea92f0c.statSync(__rspack_external_node_path_c5b9b54f.join(dir, 'package.json')).isFile()) break;
4066
+ if (__rspack_external_node_fs_1b05aee1.statSync(__rspack_external_node_path_806ed179.join(dir, 'package.json')).isFile()) break;
4070
4067
  } catch {}
4071
- const parent = __rspack_external_node_path_c5b9b54f.dirname(dir);
4068
+ const parent = __rspack_external_node_path_806ed179.dirname(dir);
4072
4069
  if (dir === parent) {
4073
4070
  dir = void 0;
4074
4071
  break;
4075
4072
  }
4076
4073
  dir = parent;
4077
4074
  }
4078
- if (!dir) return __rspack_external_node_path_c5b9b54f.resolve(cwd, '.cache/rspack-dev-server');
4079
- if ('1' === process.versions.pnp) return __rspack_external_node_path_c5b9b54f.resolve(dir, '.pnp/.cache/rspack-dev-server');
4080
- if ('3' === process.versions.pnp) return __rspack_external_node_path_c5b9b54f.resolve(dir, '.yarn/.cache/rspack-dev-server');
4081
- return __rspack_external_node_path_c5b9b54f.resolve(dir, 'node_modules/.cache/rspack-dev-server');
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');
4082
4079
  }
4083
4080
  #addAdditionalEntries(compiler) {
4084
4081
  const additionalEntries = [];
@@ -4182,7 +4179,7 @@ class Server {
4182
4179
  };
4183
4180
  const getStaticItem = (optionsForStatic)=>{
4184
4181
  const getDefaultStaticOptions = ()=>({
4185
- directory: __rspack_external_node_path_c5b9b54f.join(process.cwd(), 'public'),
4182
+ directory: __rspack_external_node_path_806ed179.join(process.cwd(), 'public'),
4186
4183
  staticOptions: {},
4187
4184
  publicPath: [
4188
4185
  '/'
@@ -4278,9 +4275,9 @@ class Server {
4278
4275
  if (item) {
4279
4276
  let stats = null;
4280
4277
  try {
4281
- stats = __rspack_external_node_fs_5ea92f0c.lstatSync(__rspack_external_node_fs_5ea92f0c.realpathSync(item)).isFile();
4278
+ stats = __rspack_external_node_fs_1b05aee1.lstatSync(__rspack_external_node_fs_1b05aee1.realpathSync(item)).isFile();
4282
4279
  } catch {}
4283
- return stats ? __rspack_external_node_fs_5ea92f0c.readFileSync(item) : item;
4280
+ return stats ? __rspack_external_node_fs_1b05aee1.readFileSync(item) : item;
4284
4281
  }
4285
4282
  };
4286
4283
  serverOptions[property] = Array.isArray(value) ? value.map((item)=>readFile(item)) : readFile(value);
@@ -4288,21 +4285,21 @@ class Server {
4288
4285
  let fakeCert;
4289
4286
  if (!serverOptions.key || !serverOptions.cert) {
4290
4287
  const certificateDir = Server.findCacheDir();
4291
- const certificatePath = __rspack_external_node_path_c5b9b54f.join(certificateDir, 'server.pem');
4288
+ const certificatePath = __rspack_external_node_path_806ed179.join(certificateDir, 'server.pem');
4292
4289
  let certificateExists;
4293
4290
  try {
4294
- const certificate = await __rspack_external_node_fs_5ea92f0c.promises.stat(certificatePath);
4291
+ const certificate = await __rspack_external_node_fs_1b05aee1.promises.stat(certificatePath);
4295
4292
  certificateExists = certificate.isFile();
4296
4293
  } catch {
4297
4294
  certificateExists = false;
4298
4295
  }
4299
4296
  if (certificateExists) {
4300
4297
  const certificateTtl = 86400000;
4301
- const certificateStat = await __rspack_external_node_fs_5ea92f0c.promises.stat(certificatePath);
4298
+ const certificateStat = await __rspack_external_node_fs_1b05aee1.promises.stat(certificatePath);
4302
4299
  const now = Number(new Date());
4303
4300
  if ((now - Number(certificateStat.ctime)) / certificateTtl > 30) {
4304
4301
  this.logger.info('SSL certificate is more than 30 days old. Removing...');
4305
- await __rspack_external_node_fs_5ea92f0c.promises.rm(certificatePath, {
4302
+ await __rspack_external_node_fs_1b05aee1.promises.rm(certificatePath, {
4306
4303
  recursive: true
4307
4304
  });
4308
4305
  certificateExists = false;
@@ -4386,14 +4383,14 @@ class Server {
4386
4383
  }
4387
4384
  ]
4388
4385
  });
4389
- await __rspack_external_node_fs_5ea92f0c.promises.mkdir(certificateDir, {
4386
+ await __rspack_external_node_fs_1b05aee1.promises.mkdir(certificateDir, {
4390
4387
  recursive: true
4391
4388
  });
4392
- await __rspack_external_node_fs_5ea92f0c.promises.writeFile(certificatePath, pems.private + pems.cert, {
4389
+ await __rspack_external_node_fs_1b05aee1.promises.writeFile(certificatePath, pems.private + pems.cert, {
4393
4390
  encoding: 'utf8'
4394
4391
  });
4395
4392
  }
4396
- fakeCert = await __rspack_external_node_fs_5ea92f0c.promises.readFile(certificatePath);
4393
+ fakeCert = await __rspack_external_node_fs_1b05aee1.promises.readFile(certificatePath);
4397
4394
  this.logger.info(`SSL certificate: ${certificatePath}`);
4398
4395
  }
4399
4396
  serverOptions.key = serverOptions.key || fakeCert;
@@ -4401,9 +4398,9 @@ class Server {
4401
4398
  }
4402
4399
  if ('boolean' == typeof options.ipc) {
4403
4400
  const isWindows = 'win32' === process.platform;
4404
- const pipePrefix = isWindows ? '\\\\.\\pipe\\' : __rspack_external_node_os_74b4b876.tmpdir();
4401
+ const pipePrefix = isWindows ? '\\\\.\\pipe\\' : __rspack_external_node_os_4f3c9d58.tmpdir();
4405
4402
  const pipeName = 'rspack-dev-server.sock';
4406
- options.ipc = __rspack_external_node_path_c5b9b54f.join(pipePrefix, pipeName);
4403
+ options.ipc = __rspack_external_node_path_806ed179.join(pipePrefix, pipeName);
4407
4404
  }
4408
4405
  options.liveReload = void 0 !== options.liveReload ? options.liveReload : true;
4409
4406
  const defaultOpenOptions = {
@@ -4786,13 +4783,18 @@ class Server {
4786
4783
  });
4787
4784
  if (this.options.proxy) {
4788
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
+ };
4789
4791
  const getProxyMiddleware = (proxyConfig)=>{
4790
4792
  const { context, ...proxyOptions } = proxyConfig;
4791
4793
  const pathFilter = proxyOptions.pathFilter ?? context;
4792
4794
  if (void 0 !== pathFilter) proxyOptions.pathFilter = pathFilter;
4793
- if (void 0 === proxyOptions.logger) proxyOptions.logger = this.logger;
4795
+ if (void 0 === proxyOptions.logger) proxyOptions.logger = defaultProxyLogger;
4794
4796
  if (proxyOptions.target || proxyOptions.router) return createProxyMiddleware(proxyOptions);
4795
- __rspack_external_node_util_1b29d436.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')();
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')();
4796
4798
  };
4797
4799
  for (const proxyConfigOrCallback of this.options.proxy){
4798
4800
  let proxyMiddleware;
@@ -4829,7 +4831,7 @@ class Server {
4829
4831
  }
4830
4832
  const staticOptions = this.options.static;
4831
4833
  const useStatic = staticOptions.length > 0;
4832
- 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;
4833
4835
  if (useStatic) for (const staticOption of staticOptions)for (const publicPath of staticOption.publicPath)middlewares.push({
4834
4836
  name: 'serve-static',
4835
4837
  path: publicPath,
@@ -4959,7 +4961,7 @@ class Server {
4959
4961
  const addressInfo = server?.address();
4960
4962
  if (!addressInfo) return;
4961
4963
  const { address, port } = addressInfo;
4962
- const prettyPrintURL = (newHostname)=>__rspack_external_node_url_e96de089.format({
4964
+ const prettyPrintURL = (newHostname)=>__rspack_external_node_url_3991086a.format({
4963
4965
  protocol,
4964
4966
  hostname: newHostname,
4965
4967
  port,
@@ -5103,7 +5105,7 @@ class Server {
5103
5105
  const socket = new net.Socket();
5104
5106
  socket.on('error', (error)=>{
5105
5107
  if ('ECONNREFUSED' === error.code) {
5106
- __rspack_external_node_fs_5ea92f0c.unlinkSync(this.options.ipc);
5108
+ __rspack_external_node_fs_1b05aee1.unlinkSync(this.options.ipc);
5107
5109
  resolve();
5108
5110
  return;
5109
5111
  }
@@ -5134,7 +5136,7 @@ class Server {
5134
5136
  });
5135
5137
  if (this.options.ipc) {
5136
5138
  const READ_WRITE = 438;
5137
- await __rspack_external_node_fs_5ea92f0c.promises.chmod(this.options.ipc, READ_WRITE);
5139
+ await __rspack_external_node_fs_1b05aee1.promises.chmod(this.options.ipc, READ_WRITE);
5138
5140
  }
5139
5141
  if (this.options.webSocketServer) this.#createWebSocketServer();
5140
5142
  await this.#logStatus();
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { RspackDevServer } from "./944.js";
1
+ export { RspackDevServer } from "./619.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/dev-server",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Development server for Rspack",
5
5
  "homepage": "https://github.com/rstackjs/rspack-dev-server",
6
6
  "bugs": "https://github.com/rstackjs/rspack-dev-server/issues",
@@ -37,16 +37,16 @@
37
37
  "@rspack/dev-middleware": "^2.0.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@hono/node-server": "^2.0.4",
41
- "@microsoft/api-extractor": "^7.58.9",
42
- "@rslib/core": "^0.22.1",
43
- "@rslint/core": "^0.6.1",
40
+ "@hono/node-server": "^2.0.11",
41
+ "@microsoft/api-extractor": "^7.58.12",
42
+ "@rslib/core": "^0.23.2",
43
+ "@rslint/core": "^0.7.1",
44
44
  "@rspack/core": "2.0.0-rc.0",
45
45
  "@rspack/plugin-react-refresh": "2.0.2",
46
- "@rstest/core": "^0.10.4",
46
+ "@rstest/core": "^0.11.4",
47
47
  "@types/connect-history-api-fallback": "^1.5.4",
48
48
  "@types/mime-types": "3.0.1",
49
- "@types/node": "^24.13.2",
49
+ "@types/node": "^24.13.3",
50
50
  "@types/serve-static": "^2.2.0",
51
51
  "@types/trusted-types": "^2.0.7",
52
52
  "@types/ws": "8.18.1",
@@ -58,21 +58,21 @@
58
58
  "hono": "^4.12.25",
59
59
  "http-compression": "^1.1.3",
60
60
  "http-proxy": "^1.18.1",
61
- "http-proxy-middleware": "4.1.1",
61
+ "http-proxy-middleware": "4.2.0",
62
62
  "ipaddr.js": "^2.4.0",
63
63
  "launch-editor": "^2.14.1",
64
64
  "nano-staged": "^1.0.2",
65
65
  "open": "^11.0.0",
66
66
  "p-retry": "^7.1.1",
67
- "prettier": "3.8.4",
67
+ "prettier": "3.9.6",
68
68
  "puppeteer": "^24.43.1",
69
69
  "react-refresh": "0.18.0",
70
70
  "require-from-string": "^2.0.2",
71
71
  "selfsigned": "^5.5.0",
72
72
  "serve-static": "^2.2.1",
73
73
  "simple-git-hooks": "^2.13.1",
74
- "typescript": "^6.0.3",
75
- "ws": "^8.21.0"
74
+ "typescript": "^7.0.2",
75
+ "ws": "^8.21.1"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@rspack/core": "^2.0.0",