webpack-dev-server 4.7.4 → 4.8.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.
@@ -30,8 +30,8 @@ declare class Server {
30
30
  /** @typedef {import("chokidar").WatchOptions} WatchOptions */
31
31
  /** @typedef {import("chokidar").FSWatcher} FSWatcher */
32
32
  /** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */
33
- /** @typedef {import("bonjour").Bonjour} Bonjour */
34
- /** @typedef {import("bonjour").BonjourOptions} BonjourOptions */
33
+ /** @typedef {import("bonjour-service").Bonjour} Bonjour */
34
+ /** @typedef {import("bonjour-service").Service} BonjourOptions */
35
35
  /** @typedef {import("http-proxy-middleware").RequestHandler} RequestHandler */
36
36
  /** @typedef {import("http-proxy-middleware").Options} HttpProxyMiddlewareOptions */
37
37
  /** @typedef {import("http-proxy-middleware").Filter} HttpProxyMiddlewareOptionsFilter */
@@ -164,7 +164,7 @@ declare class Server {
164
164
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
165
165
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
166
166
  * @property {boolean} [setupExitSignals]
167
- * @property {boolean | BonjourOptions} [bonjour]
167
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
168
168
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
169
169
  * @property {boolean | string | Static | Array<string | Static>} [static]
170
170
  * @property {boolean | ServerOptions} [https]
@@ -210,151 +210,12 @@ declare class Server {
210
210
  client: {
211
211
  configs: {
212
212
  description: string;
213
+ negatedDescription: string;
213
214
  multiple: boolean;
214
- path: string /** @typedef {import("http").IncomingMessage} IncomingMessage */;
215
+ path: string;
215
216
  type: string;
216
217
  values: boolean[];
217
218
  }[];
218
- /** @typedef {import("open").Options} OpenOptions */
219
- /** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
220
- /**
221
- * @template Request, Response
222
- * @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
223
- */
224
- /**
225
- * @template Request, Response
226
- * @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
227
- */
228
- /**
229
- * @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
230
- */
231
- /**
232
- * @typedef {number | string | "auto"} Port
233
- */
234
- /**
235
- * @typedef {Object} WatchFiles
236
- * @property {string | string[]} paths
237
- * @property {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [options]
238
- */
239
- /**
240
- * @typedef {Object} Static
241
- * @property {string} [directory]
242
- * @property {string | string[]} [publicPath]
243
- * @property {boolean | ServeIndexOptions} [serveIndex]
244
- * @property {ServeStaticOptions} [staticOptions]
245
- * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [watch]
246
- */
247
- /**
248
- * @typedef {Object} NormalizedStatic
249
- * @property {string} directory
250
- * @property {string[]} publicPath
251
- * @property {false | ServeIndexOptions} serveIndex
252
- * @property {ServeStaticOptions} staticOptions
253
- * @property {false | WatchOptions} watch
254
- */
255
- /**
256
- * @typedef {Object} ServerConfiguration
257
- * @property {"http" | "https" | "spdy" | string} [type]
258
- * @property {ServerOptions} [options]
259
- */
260
- /**
261
- * @typedef {Object} WebSocketServerConfiguration
262
- * @property {"sockjs" | "ws" | string | Function} [type]
263
- * @property {Record<string, any>} [options]
264
- */
265
- /**
266
- * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
267
- */
268
- /**
269
- * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
270
- */
271
- /**
272
- * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
273
- */
274
- /**
275
- * @callback ByPass
276
- * @param {Request} req
277
- * @param {Response} res
278
- * @param {ProxyConfigArrayItem} proxyConfig
279
- */
280
- /**
281
- * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
282
- */
283
- /**
284
- * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
285
- */
286
- /**
287
- * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
288
- */
289
- /**
290
- * @typedef {Object} OpenApp
291
- * @property {string} [name]
292
- * @property {string[]} [arguments]
293
- */
294
- /**
295
- * @typedef {Object} Open
296
- * @property {string | string[] | OpenApp} [app]
297
- * @property {string | string[]} [target]
298
- */
299
- /**
300
- * @typedef {Object} NormalizedOpen
301
- * @property {string} target
302
- * @property {import("open").Options} options
303
- */
304
- /**
305
- * @typedef {Object} WebSocketURL
306
- * @property {string} [hostname]
307
- * @property {string} [password]
308
- * @property {string} [pathname]
309
- * @property {number | string} [port]
310
- * @property {string} [protocol]
311
- * @property {string} [username]
312
- */
313
- /**
314
- * @typedef {Object} ClientConfiguration
315
- * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
316
- * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
317
- * @property {boolean} [progress]
318
- * @property {boolean | number} [reconnect]
319
- * @property {"ws" | "sockjs" | string} [webSocketTransport]
320
- * @property {string | WebSocketURL} [webSocketURL]
321
- */
322
- /**
323
- * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
324
- */
325
- /**
326
- * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
327
- */
328
- /**
329
- * @typedef {Object} Configuration
330
- * @property {boolean | string} [ipc]
331
- * @property {Host} [host]
332
- * @property {Port} [port]
333
- * @property {boolean | "only"} [hot]
334
- * @property {boolean} [liveReload]
335
- * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
336
- * @property {boolean} [compress]
337
- * @property {boolean} [magicHtml]
338
- * @property {"auto" | "all" | string | string[]} [allowedHosts]
339
- * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
340
- * @property {boolean} [setupExitSignals]
341
- * @property {boolean | BonjourOptions} [bonjour]
342
- * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
343
- * @property {boolean | string | Static | Array<string | Static>} [static]
344
- * @property {boolean | ServerOptions} [https]
345
- * @property {boolean} [http2]
346
- * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
347
- * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
348
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
349
- * @property {boolean | string | Open | Array<string | Open>} [open]
350
- * @property {boolean} [setupExitSignals]
351
- * @property {boolean | ClientConfiguration} [client]
352
- * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
353
- * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
354
- * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
355
- * @property {(devServer: Server) => void} [onListening]
356
- * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
357
- */
358
219
  description: string;
359
220
  multiple: boolean;
360
221
  simpleType: string;
@@ -373,6 +234,133 @@ declare class Server {
373
234
  };
374
235
  "client-overlay": {
375
236
  configs: {
237
+ /**
238
+ * @typedef {number | string | "auto"} Port
239
+ */
240
+ /**
241
+ * @typedef {Object} WatchFiles
242
+ * @property {string | string[]} paths
243
+ * @property {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [options]
244
+ */
245
+ /**
246
+ * @typedef {Object} Static
247
+ * @property {string} [directory]
248
+ * @property {string | string[]} [publicPath]
249
+ * @property {boolean | ServeIndexOptions} [serveIndex]
250
+ * @property {ServeStaticOptions} [staticOptions]
251
+ * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [watch]
252
+ */
253
+ /**
254
+ * @typedef {Object} NormalizedStatic
255
+ * @property {string} directory
256
+ * @property {string[]} publicPath
257
+ * @property {false | ServeIndexOptions} serveIndex
258
+ * @property {ServeStaticOptions} staticOptions
259
+ * @property {false | WatchOptions} watch
260
+ */
261
+ /**
262
+ * @typedef {Object} ServerConfiguration
263
+ * @property {"http" | "https" | "spdy" | string} [type]
264
+ * @property {ServerOptions} [options]
265
+ */
266
+ /**
267
+ * @typedef {Object} WebSocketServerConfiguration
268
+ * @property {"sockjs" | "ws" | string | Function} [type]
269
+ * @property {Record<string, any>} [options]
270
+ */
271
+ /**
272
+ * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
273
+ */
274
+ /**
275
+ * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
276
+ */
277
+ /**
278
+ * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
279
+ */
280
+ /**
281
+ * @callback ByPass
282
+ * @param {Request} req
283
+ * @param {Response} res
284
+ * @param {ProxyConfigArrayItem} proxyConfig
285
+ */
286
+ /**
287
+ * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
288
+ */
289
+ /**
290
+ * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
291
+ */
292
+ /**
293
+ * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
294
+ */
295
+ /**
296
+ * @typedef {Object} OpenApp
297
+ * @property {string} [name]
298
+ * @property {string[]} [arguments]
299
+ */
300
+ /**
301
+ * @typedef {Object} Open
302
+ * @property {string | string[] | OpenApp} [app]
303
+ * @property {string | string[]} [target]
304
+ */
305
+ /**
306
+ * @typedef {Object} NormalizedOpen
307
+ * @property {string} target
308
+ * @property {import("open").Options} options
309
+ */
310
+ /**
311
+ * @typedef {Object} WebSocketURL
312
+ * @property {string} [hostname]
313
+ * @property {string} [password]
314
+ * @property {string} [pathname]
315
+ * @property {number | string} [port]
316
+ * @property {string} [protocol]
317
+ * @property {string} [username]
318
+ */
319
+ /**
320
+ * @typedef {Object} ClientConfiguration
321
+ * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
322
+ * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
323
+ * @property {boolean} [progress]
324
+ * @property {boolean | number} [reconnect]
325
+ * @property {"ws" | "sockjs" | string} [webSocketTransport]
326
+ * @property {string | WebSocketURL} [webSocketURL]
327
+ */
328
+ /**
329
+ * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
330
+ */
331
+ /**
332
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
333
+ */
334
+ /**
335
+ * @typedef {Object} Configuration
336
+ * @property {boolean | string} [ipc]
337
+ * @property {Host} [host]
338
+ * @property {Port} [port]
339
+ * @property {boolean | "only"} [hot]
340
+ * @property {boolean} [liveReload]
341
+ * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
342
+ * @property {boolean} [compress]
343
+ * @property {boolean} [magicHtml]
344
+ * @property {"auto" | "all" | string | string[]} [allowedHosts]
345
+ * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
346
+ * @property {boolean} [setupExitSignals]
347
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
348
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
349
+ * @property {boolean | string | Static | Array<string | Static>} [static]
350
+ * @property {boolean | ServerOptions} [https]
351
+ * @property {boolean} [http2]
352
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
353
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
354
+ * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
355
+ * @property {boolean | string | Open | Array<string | Open>} [open]
356
+ * @property {boolean} [setupExitSignals]
357
+ * @property {boolean | ClientConfiguration} [client]
358
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
359
+ * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
360
+ * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
361
+ * @property {(devServer: Server) => void} [onListening]
362
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
363
+ */
376
364
  type: string;
377
365
  multiple: boolean;
378
366
  description: string;
@@ -388,6 +376,7 @@ declare class Server {
388
376
  type: string;
389
377
  multiple: boolean;
390
378
  description: string;
379
+ negatedDescription: string;
391
380
  path: string;
392
381
  }[];
393
382
  description: string;
@@ -399,6 +388,7 @@ declare class Server {
399
388
  type: string;
400
389
  multiple: boolean;
401
390
  description: string;
391
+ negatedDescription: string;
402
392
  path: string;
403
393
  }[];
404
394
  description: string;
@@ -418,91 +408,21 @@ declare class Server {
418
408
  multiple: boolean;
419
409
  };
420
410
  "client-reconnect": {
421
- /**
422
- * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
423
- */
424
- /**
425
- * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
426
- */
427
- /**
428
- * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
429
- */
430
- /**
431
- * @typedef {Object} OpenApp
432
- * @property {string} [name]
433
- * @property {string[]} [arguments]
434
- */
435
- /**
436
- * @typedef {Object} Open
437
- * @property {string | string[] | OpenApp} [app]
438
- * @property {string | string[]} [target]
439
- */
440
- /**
441
- * @typedef {Object} NormalizedOpen
442
- * @property {string} target
443
- * @property {import("open").Options} options
444
- */
445
- /**
446
- * @typedef {Object} WebSocketURL
447
- * @property {string} [hostname]
448
- * @property {string} [password]
449
- * @property {string} [pathname]
450
- * @property {number | string} [port]
451
- * @property {string} [protocol]
452
- * @property {string} [username]
453
- */
454
- /**
455
- * @typedef {Object} ClientConfiguration
456
- * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
457
- * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
458
- * @property {boolean} [progress]
459
- * @property {boolean | number} [reconnect]
460
- * @property {"ws" | "sockjs" | string} [webSocketTransport]
461
- * @property {string | WebSocketURL} [webSocketURL]
462
- */
463
- /**
464
- * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
465
- */
466
- /**
467
- * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
468
- */
469
- /**
470
- * @typedef {Object} Configuration
471
- * @property {boolean | string} [ipc]
472
- * @property {Host} [host]
473
- * @property {Port} [port]
474
- * @property {boolean | "only"} [hot]
475
- * @property {boolean} [liveReload]
476
- * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
477
- * @property {boolean} [compress]
478
- * @property {boolean} [magicHtml]
479
- * @property {"auto" | "all" | string | string[]} [allowedHosts]
480
- * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
481
- * @property {boolean} [setupExitSignals]
482
- * @property {boolean | BonjourOptions} [bonjour]
483
- * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
484
- * @property {boolean | string | Static | Array<string | Static>} [static]
485
- * @property {boolean | ServerOptions} [https]
486
- * @property {boolean} [http2]
487
- * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
488
- * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
489
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
490
- * @property {boolean | string | Open | Array<string | Open>} [open]
491
- * @property {boolean} [setupExitSignals]
492
- * @property {boolean | ClientConfiguration} [client]
493
- * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
494
- * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
495
- * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
496
- * @property {(devServer: Server) => void} [onListening]
497
- * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
498
- */
499
- configs: {
500
- type: string;
501
- multiple: boolean;
502
- description: string;
503
- negatedDescription: string;
504
- path: string;
505
- }[];
411
+ configs: (
412
+ | {
413
+ type: string;
414
+ multiple: boolean;
415
+ description: string;
416
+ negatedDescription: string;
417
+ path: string;
418
+ }
419
+ | {
420
+ type: string;
421
+ multiple: boolean;
422
+ description: string;
423
+ path: string;
424
+ }
425
+ )[];
506
426
  description: string;
507
427
  simpleType: string;
508
428
  multiple: boolean;
@@ -588,7 +508,7 @@ declare class Server {
588
508
  description: string;
589
509
  multiple: boolean;
590
510
  path: string;
591
- type: string;
511
+ /** @type {Compiler | MultiCompiler} */ type: string;
592
512
  values: string[];
593
513
  }
594
514
  | {
@@ -604,11 +524,22 @@ declare class Server {
604
524
  };
605
525
  "client-web-socket-url-username": {
606
526
  configs: {
527
+ /**
528
+ * @private
529
+ * @type {RequestHandler[]}
530
+ */
607
531
  type: string;
608
532
  multiple: boolean;
609
533
  description: string;
534
+ /**
535
+ * @type {Socket[]}
536
+ */
610
537
  path: string;
611
538
  }[];
539
+ /**
540
+ * @private
541
+ * @type {string | undefined}
542
+ */
612
543
  description: string;
613
544
  simpleType: string;
614
545
  multiple: boolean;
@@ -630,6 +561,7 @@ declare class Server {
630
561
  type: string;
631
562
  multiple: boolean;
632
563
  description: string;
564
+ negatedDescription: string;
633
565
  path: string;
634
566
  }[];
635
567
  description: string;
@@ -670,16 +602,11 @@ declare class Server {
670
602
  values: string[];
671
603
  multiple: boolean;
672
604
  description: string;
673
- negatedDescription: string;
674
605
  path: string;
675
606
  }
676
607
  )[];
677
608
  description: string;
678
609
  simpleType: string;
679
- /**
680
- * @param {"v4" | "v6"} family
681
- * @returns {string | undefined}
682
- */
683
610
  multiple: boolean;
684
611
  };
685
612
  http2: {
@@ -748,7 +675,8 @@ declare class Server {
748
675
  }[];
749
676
  description: string;
750
677
  multiple: boolean;
751
- simpleType: string /** @type {WebSocketURL} */;
678
+ /** @type {{ type: WebSocketServerConfiguration["type"], options: NonNullable<WebSocketServerConfiguration["options"]> }} */
679
+ simpleType: string;
752
680
  };
753
681
  "https-cert": {
754
682
  configs: {
@@ -761,6 +689,7 @@ declare class Server {
761
689
  simpleType: string;
762
690
  multiple: boolean;
763
691
  };
692
+ /** @type {ServerConfiguration} */
764
693
  "https-cert-reset": {
765
694
  configs: {
766
695
  description: string;
@@ -787,7 +716,7 @@ declare class Server {
787
716
  configs: {
788
717
  description: string;
789
718
  multiple: boolean;
790
- path: string;
719
+ /** @type {number | string} */ path: string;
791
720
  type: string;
792
721
  }[];
793
722
  description: string;
@@ -809,7 +738,7 @@ declare class Server {
809
738
  configs: {
810
739
  description: string;
811
740
  multiple: boolean;
812
- path: string;
741
+ /** @type {string} */ path: string;
813
742
  type: string;
814
743
  }[];
815
744
  description: string;
@@ -902,7 +831,7 @@ declare class Server {
902
831
  path: string;
903
832
  }[];
904
833
  description: string;
905
- simpleType: string;
834
+ /** @type {MultiCompiler} */ simpleType: string;
906
835
  multiple: boolean;
907
836
  };
908
837
  open: {
@@ -936,6 +865,10 @@ declare class Server {
936
865
  simpleType: string;
937
866
  multiple: boolean;
938
867
  };
868
+ /**
869
+ * @private
870
+ * @returns {Promise<void>}
871
+ */
939
872
  "open-app-name": {
940
873
  configs: {
941
874
  type: string;
@@ -950,10 +883,6 @@ declare class Server {
950
883
  "open-app-name-reset": {
951
884
  configs: {
952
885
  type: string;
953
- /**
954
- * @param {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} watchOptions
955
- * @returns {WatchOptions}
956
- */
957
886
  multiple: boolean;
958
887
  description: string;
959
888
  path: string;
@@ -991,10 +920,6 @@ declare class Server {
991
920
  description: string;
992
921
  path: string;
993
922
  }[];
994
- /**
995
- * @param {string | Static | undefined} [optionsForStatic]
996
- * @returns {NormalizedStatic}
997
- */
998
923
  description: string;
999
924
  simpleType: string;
1000
925
  multiple: boolean;
@@ -1003,7 +928,7 @@ declare class Server {
1003
928
  configs: (
1004
929
  | {
1005
930
  type: string;
1006
- multiple: boolean;
931
+ /** @type {NormalizedStatic} */ multiple: boolean;
1007
932
  description: string;
1008
933
  path: string;
1009
934
  }
@@ -1165,6 +1090,7 @@ declare class Server {
1165
1090
  "server-options-request-cert": {
1166
1091
  configs: {
1167
1092
  description: string;
1093
+ negatedDescription: string;
1168
1094
  multiple: boolean;
1169
1095
  path: string;
1170
1096
  type: string;
@@ -1183,19 +1109,30 @@ declare class Server {
1183
1109
  }[];
1184
1110
  description: string;
1185
1111
  multiple: boolean;
1186
- simpleType: string;
1112
+ simpleType: string /** @type {Array<keyof ServerOptions>} */;
1187
1113
  };
1114
+ /** @type {Array<keyof ServerOptions>} */
1188
1115
  static: {
1189
- configs: {
1190
- type: string;
1191
- multiple: boolean;
1192
- description: string;
1193
- path: string;
1194
- }[];
1116
+ configs: (
1117
+ | {
1118
+ type: string;
1119
+ multiple: boolean;
1120
+ description: string;
1121
+ path: string;
1122
+ }
1123
+ | {
1124
+ type: string;
1125
+ multiple: boolean;
1126
+ description: string;
1127
+ negatedDescription: string;
1128
+ path: string;
1129
+ }
1130
+ )[];
1195
1131
  description: string;
1196
- simpleType: string;
1197
- multiple: boolean;
1132
+ /** @type {any} */ simpleType: string;
1133
+ multiple: boolean /** @type {ServerOptions} */;
1198
1134
  };
1135
+ /** @type {ServerOptions} */
1199
1136
  "static-directory": {
1200
1137
  configs: {
1201
1138
  type: string;
@@ -1222,7 +1159,7 @@ declare class Server {
1222
1159
  configs: {
1223
1160
  type: string;
1224
1161
  multiple: boolean;
1225
- description: string;
1162
+ /** @type {ServerOptions} */ description: string;
1226
1163
  path: string;
1227
1164
  }[];
1228
1165
  description: string;
@@ -1290,6 +1227,7 @@ declare class Server {
1290
1227
  configs: (
1291
1228
  | {
1292
1229
  description: string;
1230
+ negatedDescription: string;
1293
1231
  multiple: boolean;
1294
1232
  path: string;
1295
1233
  type: string;
@@ -1306,6 +1244,7 @@ declare class Server {
1306
1244
  description: string;
1307
1245
  multiple: boolean;
1308
1246
  path: string;
1247
+ /** @type {ServerOptions & { cacert?: ServerOptions["ca"] }} */
1309
1248
  type: string;
1310
1249
  }
1311
1250
  )[];
@@ -1317,7 +1256,7 @@ declare class Server {
1317
1256
  configs: (
1318
1257
  | {
1319
1258
  description: string;
1320
- /** @type {ServerOptions & { cacert?: ServerOptions["ca"] }} */ multiple: boolean;
1259
+ multiple: boolean;
1321
1260
  path: string;
1322
1261
  type: string;
1323
1262
  values: string[];
@@ -1331,7 +1270,6 @@ declare class Server {
1331
1270
  )[];
1332
1271
  description: string;
1333
1272
  simpleType: string;
1334
- /** @type {ServerOptions & { cacert?: ServerOptions["ca"] }} */
1335
1273
  multiple: boolean;
1336
1274
  };
1337
1275
  };
@@ -1389,6 +1327,9 @@ declare class Server {
1389
1327
  anyOf: (
1390
1328
  | {
1391
1329
  type: string;
1330
+ cli: {
1331
+ negatedDescription: string;
1332
+ } /** @typedef {import("express").Request} Request */;
1392
1333
  description?: undefined;
1393
1334
  link?: undefined;
1394
1335
  }
@@ -1396,13 +1337,11 @@ declare class Server {
1396
1337
  type: string;
1397
1338
  description: string;
1398
1339
  link: string;
1340
+ cli?: undefined /** @typedef {import("express").Request} Request */;
1399
1341
  }
1400
1342
  )[];
1401
1343
  description: string;
1402
1344
  link: string;
1403
- cli: {
1404
- negatedDescription: string;
1405
- };
1406
1345
  };
1407
1346
  Client: {
1408
1347
  description: string;
@@ -1410,6 +1349,9 @@ declare class Server {
1410
1349
  anyOf: (
1411
1350
  | {
1412
1351
  enum: boolean[];
1352
+ cli: {
1353
+ negatedDescription: string;
1354
+ };
1413
1355
  type?: undefined;
1414
1356
  additionalProperties?: undefined;
1415
1357
  properties?: undefined;
@@ -1433,153 +1375,12 @@ declare class Server {
1433
1375
  webSocketTransport: {
1434
1376
  $ref: string;
1435
1377
  };
1436
- /** @typedef {import("net").Socket} Socket */
1437
- /** @typedef {import("http").IncomingMessage} IncomingMessage */
1438
- /** @typedef {import("open").Options} OpenOptions */
1439
- /** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
1440
- /**
1441
- * @template Request, Response
1442
- * @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
1443
- */
1444
- /**
1445
- * @template Request, Response
1446
- * @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
1447
- */
1448
- /**
1449
- * @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
1450
- */
1451
- /**
1452
- * @typedef {number | string | "auto"} Port
1453
- */
1454
- /**
1455
- * @typedef {Object} WatchFiles
1456
- * @property {string | string[]} paths
1457
- * @property {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [options]
1458
- */
1459
- /**
1460
- * @typedef {Object} Static
1461
- * @property {string} [directory]
1462
- * @property {string | string[]} [publicPath]
1463
- * @property {boolean | ServeIndexOptions} [serveIndex]
1464
- * @property {ServeStaticOptions} [staticOptions]
1465
- * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [watch]
1466
- */
1467
- /**
1468
- * @typedef {Object} NormalizedStatic
1469
- * @property {string} directory
1470
- * @property {string[]} publicPath
1471
- * @property {false | ServeIndexOptions} serveIndex
1472
- * @property {ServeStaticOptions} staticOptions
1473
- * @property {false | WatchOptions} watch
1474
- */
1475
- /**
1476
- * @typedef {Object} ServerConfiguration
1477
- * @property {"http" | "https" | "spdy" | string} [type]
1478
- * @property {ServerOptions} [options]
1479
- */
1480
- /**
1481
- * @typedef {Object} WebSocketServerConfiguration
1482
- * @property {"sockjs" | "ws" | string | Function} [type]
1483
- * @property {Record<string, any>} [options]
1484
- */
1485
- /**
1486
- * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
1487
- */
1488
- /**
1489
- * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
1490
- */
1491
- /**
1492
- * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
1493
- */
1494
- /**
1495
- * @callback ByPass
1496
- * @param {Request} req
1497
- * @param {Response} res
1498
- * @param {ProxyConfigArrayItem} proxyConfig
1499
- */
1500
- /**
1501
- * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
1502
- */
1503
- /**
1504
- * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
1505
- */
1506
- /**
1507
- * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
1508
- */
1509
- /**
1510
- * @typedef {Object} OpenApp
1511
- * @property {string} [name]
1512
- * @property {string[]} [arguments]
1513
- */
1514
- /**
1515
- * @typedef {Object} Open
1516
- * @property {string | string[] | OpenApp} [app]
1517
- * @property {string | string[]} [target]
1518
- */
1519
- /**
1520
- * @typedef {Object} NormalizedOpen
1521
- * @property {string} target
1522
- * @property {import("open").Options} options
1523
- */
1524
- /**
1525
- * @typedef {Object} WebSocketURL
1526
- * @property {string} [hostname]
1527
- * @property {string} [password]
1528
- * @property {string} [pathname]
1529
- * @property {number | string} [port]
1530
- * @property {string} [protocol]
1531
- * @property {string} [username]
1532
- */
1533
- /**
1534
- * @typedef {Object} ClientConfiguration
1535
- * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
1536
- * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
1537
- * @property {boolean} [progress]
1538
- * @property {boolean | number} [reconnect]
1539
- * @property {"ws" | "sockjs" | string} [webSocketTransport]
1540
- * @property {string | WebSocketURL} [webSocketURL]
1541
- */
1542
- /**
1543
- * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
1544
- */
1545
- /**
1546
- * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
1547
- */
1548
- /**
1549
- * @typedef {Object} Configuration
1550
- * @property {boolean | string} [ipc]
1551
- * @property {Host} [host]
1552
- * @property {Port} [port]
1553
- * @property {boolean | "only"} [hot]
1554
- * @property {boolean} [liveReload]
1555
- * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
1556
- * @property {boolean} [compress]
1557
- * @property {boolean} [magicHtml]
1558
- * @property {"auto" | "all" | string | string[]} [allowedHosts]
1559
- * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1560
- * @property {boolean} [setupExitSignals]
1561
- * @property {boolean | BonjourOptions} [bonjour]
1562
- * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1563
- * @property {boolean | string | Static | Array<string | Static>} [static]
1564
- * @property {boolean | ServerOptions} [https]
1565
- * @property {boolean} [http2]
1566
- * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
1567
- * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
1568
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
1569
- * @property {boolean | string | Open | Array<string | Open>} [open]
1570
- * @property {boolean} [setupExitSignals]
1571
- * @property {boolean | ClientConfiguration} [client]
1572
- * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
1573
- * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
1574
- * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
1575
- * @property {(devServer: Server) => void} [onListening]
1576
- * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
1577
- */
1578
1378
  webSocketURL: {
1579
1379
  $ref: string;
1580
1380
  };
1581
1381
  };
1582
1382
  enum?: undefined;
1383
+ cli?: undefined /** @typedef {import("express").Request} Request */;
1583
1384
  }
1584
1385
  )[];
1585
1386
  };
@@ -1592,140 +1393,6 @@ declare class Server {
1592
1393
  anyOf: (
1593
1394
  | {
1594
1395
  description: string;
1595
- /**
1596
- * @template Request, Response
1597
- * @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
1598
- */
1599
- /**
1600
- * @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
1601
- */
1602
- /**
1603
- * @typedef {number | string | "auto"} Port
1604
- */
1605
- /**
1606
- * @typedef {Object} WatchFiles
1607
- * @property {string | string[]} paths
1608
- * @property {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [options]
1609
- */
1610
- /**
1611
- * @typedef {Object} Static
1612
- * @property {string} [directory]
1613
- * @property {string | string[]} [publicPath]
1614
- * @property {boolean | ServeIndexOptions} [serveIndex]
1615
- * @property {ServeStaticOptions} [staticOptions]
1616
- * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [watch]
1617
- */
1618
- /**
1619
- * @typedef {Object} NormalizedStatic
1620
- * @property {string} directory
1621
- * @property {string[]} publicPath
1622
- * @property {false | ServeIndexOptions} serveIndex
1623
- * @property {ServeStaticOptions} staticOptions
1624
- * @property {false | WatchOptions} watch
1625
- */
1626
- /**
1627
- * @typedef {Object} ServerConfiguration
1628
- * @property {"http" | "https" | "spdy" | string} [type]
1629
- * @property {ServerOptions} [options]
1630
- */
1631
- /**
1632
- * @typedef {Object} WebSocketServerConfiguration
1633
- * @property {"sockjs" | "ws" | string | Function} [type]
1634
- * @property {Record<string, any>} [options]
1635
- */
1636
- /**
1637
- * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
1638
- */
1639
- /**
1640
- * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
1641
- */
1642
- /**
1643
- * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
1644
- */
1645
- /**
1646
- * @callback ByPass
1647
- * @param {Request} req
1648
- * @param {Response} res
1649
- * @param {ProxyConfigArrayItem} proxyConfig
1650
- */
1651
- /**
1652
- * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
1653
- */
1654
- /**
1655
- * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
1656
- */
1657
- /**
1658
- * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
1659
- */
1660
- /**
1661
- * @typedef {Object} OpenApp
1662
- * @property {string} [name]
1663
- * @property {string[]} [arguments]
1664
- */
1665
- /**
1666
- * @typedef {Object} Open
1667
- * @property {string | string[] | OpenApp} [app]
1668
- * @property {string | string[]} [target]
1669
- */
1670
- /**
1671
- * @typedef {Object} NormalizedOpen
1672
- * @property {string} target
1673
- * @property {import("open").Options} options
1674
- */
1675
- /**
1676
- * @typedef {Object} WebSocketURL
1677
- * @property {string} [hostname]
1678
- * @property {string} [password]
1679
- * @property {string} [pathname]
1680
- * @property {number | string} [port]
1681
- * @property {string} [protocol]
1682
- * @property {string} [username]
1683
- */
1684
- /**
1685
- * @typedef {Object} ClientConfiguration
1686
- * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
1687
- * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
1688
- * @property {boolean} [progress]
1689
- * @property {boolean | number} [reconnect]
1690
- * @property {"ws" | "sockjs" | string} [webSocketTransport]
1691
- * @property {string | WebSocketURL} [webSocketURL]
1692
- */
1693
- /**
1694
- * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
1695
- */
1696
- /**
1697
- * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
1698
- */
1699
- /**
1700
- * @typedef {Object} Configuration
1701
- * @property {boolean | string} [ipc]
1702
- * @property {Host} [host]
1703
- * @property {Port} [port]
1704
- * @property {boolean | "only"} [hot]
1705
- * @property {boolean} [liveReload]
1706
- * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
1707
- * @property {boolean} [compress]
1708
- * @property {boolean} [magicHtml]
1709
- * @property {"auto" | "all" | string | string[]} [allowedHosts]
1710
- * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1711
- * @property {boolean} [setupExitSignals]
1712
- * @property {boolean | BonjourOptions} [bonjour]
1713
- * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1714
- * @property {boolean | string | Static | Array<string | Static>} [static]
1715
- * @property {boolean | ServerOptions} [https]
1716
- * @property {boolean} [http2]
1717
- * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
1718
- * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
1719
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
1720
- * @property {boolean | string | Open | Array<string | Open>} [open]
1721
- * @property {boolean} [setupExitSignals]
1722
- * @property {boolean | ClientConfiguration} [client]
1723
- * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
1724
- * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
1725
- * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
1726
- * @property {(devServer: Server) => void} [onListening]
1727
- * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
1728
- */
1729
1396
  link: string;
1730
1397
  type: string;
1731
1398
  cli: {
@@ -1741,15 +1408,132 @@ declare class Server {
1741
1408
  errors: {
1742
1409
  description: string;
1743
1410
  type: string;
1411
+ cli: {
1412
+ negatedDescription: string;
1413
+ };
1744
1414
  };
1745
1415
  warnings: {
1416
+ /**
1417
+ * @typedef {Object} NormalizedStatic
1418
+ * @property {string} directory
1419
+ * @property {string[]} publicPath
1420
+ * @property {false | ServeIndexOptions} serveIndex
1421
+ * @property {ServeStaticOptions} staticOptions
1422
+ * @property {false | WatchOptions} watch
1423
+ */
1424
+ /**
1425
+ * @typedef {Object} ServerConfiguration
1426
+ * @property {"http" | "https" | "spdy" | string} [type]
1427
+ * @property {ServerOptions} [options]
1428
+ */
1429
+ /**
1430
+ * @typedef {Object} WebSocketServerConfiguration
1431
+ * @property {"sockjs" | "ws" | string | Function} [type]
1432
+ * @property {Record<string, any>} [options]
1433
+ */
1434
+ /**
1435
+ * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
1436
+ */
1437
+ /**
1438
+ * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
1439
+ */
1440
+ /**
1441
+ * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
1442
+ */
1443
+ /**
1444
+ * @callback ByPass
1445
+ * @param {Request} req
1446
+ * @param {Response} res
1447
+ * @param {ProxyConfigArrayItem} proxyConfig
1448
+ */
1449
+ /**
1450
+ * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
1451
+ */
1452
+ /**
1453
+ * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
1454
+ */
1455
+ /**
1456
+ * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
1457
+ */
1458
+ /**
1459
+ * @typedef {Object} OpenApp
1460
+ * @property {string} [name]
1461
+ * @property {string[]} [arguments]
1462
+ */
1463
+ /**
1464
+ * @typedef {Object} Open
1465
+ * @property {string | string[] | OpenApp} [app]
1466
+ * @property {string | string[]} [target]
1467
+ */
1468
+ /**
1469
+ * @typedef {Object} NormalizedOpen
1470
+ * @property {string} target
1471
+ * @property {import("open").Options} options
1472
+ */
1473
+ /**
1474
+ * @typedef {Object} WebSocketURL
1475
+ * @property {string} [hostname]
1476
+ * @property {string} [password]
1477
+ * @property {string} [pathname]
1478
+ * @property {number | string} [port]
1479
+ * @property {string} [protocol]
1480
+ * @property {string} [username]
1481
+ */
1482
+ /**
1483
+ * @typedef {Object} ClientConfiguration
1484
+ * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
1485
+ * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
1486
+ * @property {boolean} [progress]
1487
+ * @property {boolean | number} [reconnect]
1488
+ * @property {"ws" | "sockjs" | string} [webSocketTransport]
1489
+ * @property {string | WebSocketURL} [webSocketURL]
1490
+ */
1491
+ /**
1492
+ * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
1493
+ */
1494
+ /**
1495
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
1496
+ */
1497
+ /**
1498
+ * @typedef {Object} Configuration
1499
+ * @property {boolean | string} [ipc]
1500
+ * @property {Host} [host]
1501
+ * @property {Port} [port]
1502
+ * @property {boolean | "only"} [hot]
1503
+ * @property {boolean} [liveReload]
1504
+ * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
1505
+ * @property {boolean} [compress]
1506
+ * @property {boolean} [magicHtml]
1507
+ * @property {"auto" | "all" | string | string[]} [allowedHosts]
1508
+ * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1509
+ * @property {boolean} [setupExitSignals]
1510
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1511
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1512
+ * @property {boolean | string | Static | Array<string | Static>} [static]
1513
+ * @property {boolean | ServerOptions} [https]
1514
+ * @property {boolean} [http2]
1515
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
1516
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
1517
+ * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
1518
+ * @property {boolean | string | Open | Array<string | Open>} [open]
1519
+ * @property {boolean} [setupExitSignals]
1520
+ * @property {boolean | ClientConfiguration} [client]
1521
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
1522
+ * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
1523
+ * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
1524
+ * @property {(devServer: Server) => void} [onListening]
1525
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
1526
+ */
1746
1527
  description: string;
1747
1528
  type: string;
1529
+ cli: {
1530
+ negatedDescription: string;
1531
+ };
1748
1532
  };
1749
1533
  };
1750
1534
  description?: undefined;
1751
1535
  link?: undefined;
1752
- cli?: undefined;
1536
+ cli?: undefined /** @typedef {import("express").Request} Request */;
1753
1537
  }
1754
1538
  )[];
1755
1539
  };
@@ -1767,16 +1551,17 @@ declare class Server {
1767
1551
  anyOf: (
1768
1552
  | {
1769
1553
  type: string;
1554
+ cli: {
1555
+ negatedDescription: string;
1556
+ };
1770
1557
  minimum?: undefined;
1771
1558
  }
1772
1559
  | {
1773
1560
  type: string;
1774
1561
  minimum: number;
1562
+ cli?: undefined /** @typedef {import("express").Request} Request */;
1775
1563
  }
1776
1564
  )[];
1777
- cli: {
1778
- negatedDescription: string;
1779
- };
1780
1565
  };
1781
1566
  ClientWebSocketTransport: {
1782
1567
  anyOf: {
@@ -1934,9 +1719,6 @@ declare class Server {
1934
1719
  )[];
1935
1720
  description: string;
1936
1721
  };
1937
- /**
1938
- * @type {FSWatcher[]}
1939
- */
1940
1722
  cacert: {
1941
1723
  anyOf: (
1942
1724
  | {
@@ -2028,6 +1810,10 @@ declare class Server {
2028
1810
  items?: undefined;
2029
1811
  }
2030
1812
  )[];
1813
+ /**
1814
+ * @param {"v4" | "v6"} family
1815
+ * @returns {string | undefined}
1816
+ */
2031
1817
  description: string;
2032
1818
  };
2033
1819
  key: {
@@ -2107,13 +1893,10 @@ declare class Server {
2107
1893
  description: string;
2108
1894
  };
2109
1895
  };
2110
- cli?: undefined;
1896
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2111
1897
  }
2112
1898
  )[];
2113
1899
  description: string;
2114
- /**
2115
- * @type {string | undefined}
2116
- */
2117
1900
  link: string;
2118
1901
  };
2119
1902
  HeaderObject: {
@@ -2136,6 +1919,9 @@ declare class Server {
2136
1919
  Headers: {
2137
1920
  anyOf: (
2138
1921
  | {
1922
+ /**
1923
+ * @type {string[]}
1924
+ */
2139
1925
  type: string;
2140
1926
  items: {
2141
1927
  $ref: string;
@@ -2159,20 +1945,21 @@ declare class Server {
2159
1945
  description: string;
2160
1946
  link: string;
2161
1947
  };
2162
- /**
2163
- * @type {string[]}
2164
- */
2165
1948
  HistoryApiFallback: {
2166
1949
  anyOf: (
2167
1950
  | {
2168
1951
  type: string;
1952
+ cli: {
1953
+ negatedDescription: string;
1954
+ };
2169
1955
  description?: undefined;
2170
1956
  link?: undefined;
2171
1957
  }
2172
1958
  | {
2173
1959
  type: string;
2174
- description: string;
1960
+ /** @type {WebSocketURL} */ description: string;
2175
1961
  link: string;
1962
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2176
1963
  }
2177
1964
  )[];
2178
1965
  description: string;
@@ -2184,7 +1971,7 @@ declare class Server {
2184
1971
  anyOf: (
2185
1972
  | {
2186
1973
  enum: string[];
2187
- type?: undefined;
1974
+ /** @type {ServerConfiguration} */ type?: undefined;
2188
1975
  minLength?: undefined;
2189
1976
  }
2190
1977
  | {
@@ -2198,24 +1985,25 @@ declare class Server {
2198
1985
  anyOf: (
2199
1986
  | {
2200
1987
  type: string;
1988
+ cli: {
1989
+ negatedDescription: string;
1990
+ };
2201
1991
  enum?: undefined;
2202
1992
  }
2203
1993
  | {
2204
1994
  enum: string[];
2205
1995
  type?: undefined;
1996
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2206
1997
  }
2207
1998
  )[];
2208
1999
  description: string;
2209
2000
  link: string;
2210
- cli: {
2211
- negatedDescription: string;
2212
- };
2213
2001
  };
2214
2002
  IPC: {
2215
2003
  anyOf: (
2216
2004
  | {
2217
2005
  type: string;
2218
- /** @type {ServerConfiguration} */ minLength: number;
2006
+ minLength: number;
2219
2007
  enum?: undefined;
2220
2008
  }
2221
2009
  | {
@@ -2322,6 +2110,12 @@ declare class Server {
2322
2110
  }
2323
2111
  | {
2324
2112
  type: string;
2113
+ /**
2114
+ * prependEntry Method for webpack 4
2115
+ * @param {any} originalEntry
2116
+ * @param {any} newAdditionalEntries
2117
+ * @returns {any}
2118
+ */
2325
2119
  minLength: number;
2326
2120
  items?: undefined;
2327
2121
  minItems?: undefined;
@@ -2337,7 +2131,7 @@ declare class Server {
2337
2131
  };
2338
2132
  minLength?: undefined;
2339
2133
  description?: undefined;
2340
- cli?: undefined;
2134
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2341
2135
  }
2342
2136
  | {
2343
2137
  type: string;
@@ -2346,6 +2140,7 @@ declare class Server {
2346
2140
  cli: {
2347
2141
  description: string;
2348
2142
  };
2143
+ /** @type {Object<string,string>} */
2349
2144
  additionalProperties?: undefined;
2350
2145
  properties?: undefined;
2351
2146
  }
@@ -2416,10 +2211,6 @@ declare class Server {
2416
2211
  }[];
2417
2212
  link: string;
2418
2213
  description: string;
2419
- /**
2420
- * @private
2421
- * @returns {Compiler["options"]}
2422
- */
2423
2214
  };
2424
2215
  ServerType: {
2425
2216
  enum: string[];
@@ -2434,8 +2225,8 @@ declare class Server {
2434
2225
  type: string;
2435
2226
  minLength: number;
2436
2227
  cli: {
2437
- exclude: boolean /** @type {MultiCompiler} */;
2438
- } /** @type {MultiCompiler} */;
2228
+ exclude: boolean;
2229
+ };
2439
2230
  };
2440
2231
  ServerObject: {
2441
2232
  type: string;
@@ -2453,15 +2244,18 @@ declare class Server {
2453
2244
  };
2454
2245
  ServerOptions: {
2455
2246
  type: string;
2456
- /** @type {MultiCompiler} */ additionalProperties: boolean;
2247
+ additionalProperties: boolean;
2457
2248
  properties: {
2458
2249
  passphrase: {
2459
2250
  type: string;
2460
- description: string;
2251
+ /** @type {MultiCompiler} */ description: string;
2461
2252
  };
2462
2253
  requestCert: {
2463
2254
  type: string;
2464
2255
  description: string;
2256
+ cli: {
2257
+ negatedDescription: string;
2258
+ };
2465
2259
  };
2466
2260
  ca: {
2467
2261
  anyOf: (
@@ -2581,7 +2375,7 @@ declare class Server {
2581
2375
  }
2582
2376
  | {
2583
2377
  instanceof: string;
2584
- type?: undefined;
2378
+ /** @type {NormalizedStatic} */ type?: undefined;
2585
2379
  items?: undefined;
2586
2380
  }
2587
2381
  )[];
@@ -2687,10 +2481,14 @@ declare class Server {
2687
2481
  $ref: string;
2688
2482
  }[];
2689
2483
  };
2484
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2690
2485
  $ref?: undefined;
2691
2486
  }
2692
2487
  | {
2693
2488
  type: string;
2489
+ cli: {
2490
+ negatedDescription: string;
2491
+ };
2694
2492
  items?: undefined;
2695
2493
  $ref?: undefined;
2696
2494
  }
@@ -2698,6 +2496,7 @@ declare class Server {
2698
2496
  $ref: string;
2699
2497
  type?: undefined;
2700
2498
  items?: undefined;
2499
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2701
2500
  }
2702
2501
  )[];
2703
2502
  description: string;
@@ -2740,23 +2539,27 @@ declare class Server {
2740
2539
  anyOf: (
2741
2540
  | {
2742
2541
  type: string;
2542
+ cli: {
2543
+ negatedDescription: string;
2544
+ };
2743
2545
  additionalProperties?: undefined;
2744
2546
  }
2745
2547
  | {
2746
2548
  type: string;
2747
2549
  additionalProperties: boolean;
2550
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2748
2551
  }
2749
2552
  )[];
2750
2553
  description: string;
2751
- cli: {
2752
- negatedDescription: string;
2753
- };
2754
2554
  link: string;
2755
2555
  };
2756
2556
  watch: {
2757
2557
  anyOf: (
2758
2558
  | {
2759
2559
  type: string;
2560
+ cli: {
2561
+ negatedDescription: string;
2562
+ };
2760
2563
  description?: undefined;
2761
2564
  link?: undefined;
2762
2565
  }
@@ -2764,12 +2567,10 @@ declare class Server {
2764
2567
  type: string;
2765
2568
  description: string;
2766
2569
  link: string;
2570
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2767
2571
  }
2768
2572
  )[];
2769
2573
  description: string;
2770
- cli: {
2771
- negatedDescription: string;
2772
- };
2773
2574
  link: string;
2774
2575
  };
2775
2576
  };
@@ -2840,7 +2641,7 @@ declare class Server {
2840
2641
  $ref: string;
2841
2642
  }[];
2842
2643
  description: string;
2843
- link: string;
2644
+ link: string /** @type {Array<keyof ServerOptions>} */;
2844
2645
  };
2845
2646
  WebSocketServerType: {
2846
2647
  enum: string[];
@@ -2849,14 +2650,17 @@ declare class Server {
2849
2650
  anyOf: (
2850
2651
  | {
2851
2652
  enum: boolean[];
2653
+ cli: {
2654
+ negatedDescription: string;
2655
+ };
2852
2656
  $ref?: undefined;
2853
2657
  }
2854
2658
  | {
2855
2659
  $ref: string;
2856
2660
  enum?: undefined;
2661
+ cli?: undefined /** @typedef {import("express").Request} Request */;
2857
2662
  }
2858
2663
  )[];
2859
- /** @type {ServerOptions} */
2860
2664
  cli: {
2861
2665
  description: string;
2862
2666
  };
@@ -3172,7 +2976,7 @@ declare class Server {
3172
2976
  private runBonjour;
3173
2977
  /**
3174
2978
  * @private
3175
- * @type {import("bonjour").Bonjour | undefined}
2979
+ * @type {Bonjour | undefined}
3176
2980
  */
3177
2981
  private bonjour;
3178
2982
  /**
@@ -3364,7 +3168,11 @@ type Configuration = {
3364
3168
  | import("connect-history-api-fallback").Options
3365
3169
  | undefined;
3366
3170
  setupExitSignals?: boolean | undefined;
3367
- bonjour?: boolean | import("bonjour").BonjourOptions | undefined;
3171
+ bonjour?:
3172
+ | boolean
3173
+ | Record<string, never>
3174
+ | import("bonjour-service").Service
3175
+ | undefined;
3368
3176
  watchFiles?:
3369
3177
  | string
3370
3178
  | string[]
@@ -3433,8 +3241,8 @@ type AnymatchMatcher = import("anymatch").Matcher;
3433
3241
  type WatchOptions = import("chokidar").WatchOptions;
3434
3242
  type ConnectHistoryApiFallbackOptions =
3435
3243
  import("connect-history-api-fallback").Options;
3436
- type Bonjour = import("bonjour").Bonjour;
3437
- type BonjourOptions = import("bonjour").BonjourOptions;
3244
+ type Bonjour = import("bonjour-service").Bonjour;
3245
+ type BonjourOptions = import("bonjour-service").Service;
3438
3246
  type RequestHandler = import("http-proxy-middleware").RequestHandler;
3439
3247
  type HttpProxyMiddlewareOptions = import("http-proxy-middleware").Options;
3440
3248
  type HttpProxyMiddlewareOptionsFilter = import("http-proxy-middleware").Filter;
@@ -3454,9 +3262,9 @@ type ServerOptions = import("https").ServerOptions & {
3454
3262
  };
3455
3263
  };
3456
3264
  type DevMiddlewareOptions<Request_1, Response_1> =
3457
- import("webpack-dev-middleware").Options<Request_1, Response_1>;
3265
+ import("webpack-dev-middleware").Options<Request, Response>;
3458
3266
  type DevMiddlewareContext<Request_1, Response_1> =
3459
- import("webpack-dev-middleware").Context<Request_1, Response_1>;
3267
+ import("webpack-dev-middleware").Context<Request, Response>;
3460
3268
  type WatchFiles = {
3461
3269
  paths: string | string[];
3462
3270
  options?: