webpack-dev-server 4.8.1 → 4.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -130
- package/bin/cli-flags.js +15 -0
- package/client/index.js +5 -3
- package/client/modules/logger/index.js +1 -2
- package/client/modules/sockjs-client/index.js +1 -1
- package/client/overlay.js +23 -6
- package/client/utils/createSocketURL.js +1 -1
- package/lib/Server.js +7 -6
- package/lib/getPort.js +133 -0
- package/lib/options.json +4 -0
- package/package.json +6 -5
- package/types/bin/cli-flags.d.ts +11 -0
- package/types/lib/Server.d.ts +231 -115
- package/types/lib/getPort.d.ts +10 -0
package/types/lib/Server.d.ts
CHANGED
|
@@ -393,6 +393,17 @@ declare class Server {
|
|
|
393
393
|
simpleType: string;
|
|
394
394
|
multiple: boolean;
|
|
395
395
|
};
|
|
396
|
+
"client-overlay-trusted-types-policy-name": {
|
|
397
|
+
configs: {
|
|
398
|
+
description: string;
|
|
399
|
+
multiple: boolean;
|
|
400
|
+
path: string;
|
|
401
|
+
type: string;
|
|
402
|
+
}[];
|
|
403
|
+
description: string;
|
|
404
|
+
multiple: boolean;
|
|
405
|
+
simpleType: string;
|
|
406
|
+
};
|
|
396
407
|
"client-overlay-warnings": {
|
|
397
408
|
configs: {
|
|
398
409
|
type: string;
|
|
@@ -417,6 +428,60 @@ declare class Server {
|
|
|
417
428
|
simpleType: string;
|
|
418
429
|
multiple: boolean;
|
|
419
430
|
};
|
|
431
|
+
/**
|
|
432
|
+
* @typedef {Object} WebSocketURL
|
|
433
|
+
* @property {string} [hostname]
|
|
434
|
+
* @property {string} [password]
|
|
435
|
+
* @property {string} [pathname]
|
|
436
|
+
* @property {number | string} [port]
|
|
437
|
+
* @property {string} [protocol]
|
|
438
|
+
* @property {string} [username]
|
|
439
|
+
*/
|
|
440
|
+
/**
|
|
441
|
+
* @typedef {Object} ClientConfiguration
|
|
442
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
443
|
+
* @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
|
|
444
|
+
* @property {boolean} [progress]
|
|
445
|
+
* @property {boolean | number} [reconnect]
|
|
446
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
447
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
448
|
+
*/
|
|
449
|
+
/**
|
|
450
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
451
|
+
*/
|
|
452
|
+
/**
|
|
453
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
454
|
+
*/
|
|
455
|
+
/**
|
|
456
|
+
* @typedef {Object} Configuration
|
|
457
|
+
* @property {boolean | string} [ipc]
|
|
458
|
+
* @property {Host} [host]
|
|
459
|
+
* @property {Port} [port]
|
|
460
|
+
* @property {boolean | "only"} [hot]
|
|
461
|
+
* @property {boolean} [liveReload]
|
|
462
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
463
|
+
* @property {boolean} [compress]
|
|
464
|
+
* @property {boolean} [magicHtml]
|
|
465
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
466
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
467
|
+
* @property {boolean} [setupExitSignals]
|
|
468
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
469
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
470
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
471
|
+
* @property {boolean | ServerOptions} [https]
|
|
472
|
+
* @property {boolean} [http2]
|
|
473
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
474
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
475
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
476
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
477
|
+
* @property {boolean} [setupExitSignals]
|
|
478
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
479
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
480
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
481
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
482
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
483
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
484
|
+
*/
|
|
420
485
|
"client-reconnect": {
|
|
421
486
|
configs: (
|
|
422
487
|
| {
|
|
@@ -453,36 +518,6 @@ declare class Server {
|
|
|
453
518
|
path: string;
|
|
454
519
|
}
|
|
455
520
|
)[];
|
|
456
|
-
/**
|
|
457
|
-
* @typedef {Object} Configuration
|
|
458
|
-
* @property {boolean | string} [ipc]
|
|
459
|
-
* @property {Host} [host]
|
|
460
|
-
* @property {Port} [port]
|
|
461
|
-
* @property {boolean | "only"} [hot]
|
|
462
|
-
* @property {boolean} [liveReload]
|
|
463
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
464
|
-
* @property {boolean} [compress]
|
|
465
|
-
* @property {boolean} [magicHtml]
|
|
466
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
467
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
468
|
-
* @property {boolean} [setupExitSignals]
|
|
469
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
470
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
471
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
472
|
-
* @property {boolean | ServerOptions} [https]
|
|
473
|
-
* @property {boolean} [http2]
|
|
474
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
475
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
476
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
477
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
478
|
-
* @property {boolean} [setupExitSignals]
|
|
479
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
480
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
481
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
482
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
483
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
484
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
485
|
-
*/
|
|
486
521
|
description: string;
|
|
487
522
|
simpleType: string;
|
|
488
523
|
multiple: boolean;
|
|
@@ -539,6 +574,9 @@ declare class Server {
|
|
|
539
574
|
path: string;
|
|
540
575
|
}[];
|
|
541
576
|
description: string;
|
|
577
|
+
/**
|
|
578
|
+
* @type {FSWatcher[]}
|
|
579
|
+
*/
|
|
542
580
|
simpleType: string;
|
|
543
581
|
multiple: boolean;
|
|
544
582
|
};
|
|
@@ -558,20 +596,12 @@ declare class Server {
|
|
|
558
596
|
type: string;
|
|
559
597
|
}
|
|
560
598
|
)[];
|
|
561
|
-
/**
|
|
562
|
-
* @private
|
|
563
|
-
* @type {{ name: string | symbol, listener: (...args: any[]) => void}[] }}
|
|
564
|
-
*/
|
|
565
599
|
description: string;
|
|
566
600
|
multiple: boolean;
|
|
567
601
|
simpleType: string;
|
|
568
602
|
};
|
|
569
603
|
"client-web-socket-url-username": {
|
|
570
604
|
configs: {
|
|
571
|
-
/**
|
|
572
|
-
* @private
|
|
573
|
-
* @type {RequestHandler[]}
|
|
574
|
-
*/
|
|
575
605
|
type: string;
|
|
576
606
|
multiple: boolean;
|
|
577
607
|
description: string;
|
|
@@ -581,6 +611,10 @@ declare class Server {
|
|
|
581
611
|
simpleType: string;
|
|
582
612
|
multiple: boolean;
|
|
583
613
|
};
|
|
614
|
+
/**
|
|
615
|
+
* @param {string} URL
|
|
616
|
+
* @returns {boolean}
|
|
617
|
+
*/
|
|
584
618
|
compress: {
|
|
585
619
|
configs: {
|
|
586
620
|
type: string;
|
|
@@ -591,6 +625,10 @@ declare class Server {
|
|
|
591
625
|
}[];
|
|
592
626
|
description: string;
|
|
593
627
|
simpleType: string;
|
|
628
|
+
/**
|
|
629
|
+
* @param {string} gateway
|
|
630
|
+
* @returns {string | undefined}
|
|
631
|
+
*/
|
|
594
632
|
multiple: boolean;
|
|
595
633
|
};
|
|
596
634
|
"history-api-fallback": {
|
|
@@ -623,6 +661,10 @@ declare class Server {
|
|
|
623
661
|
)[];
|
|
624
662
|
description: string;
|
|
625
663
|
simpleType: string;
|
|
664
|
+
/**
|
|
665
|
+
* @param {Host} hostname
|
|
666
|
+
* @returns {Promise<string>}
|
|
667
|
+
*/
|
|
626
668
|
multiple: boolean;
|
|
627
669
|
};
|
|
628
670
|
hot: {
|
|
@@ -632,10 +674,6 @@ declare class Server {
|
|
|
632
674
|
multiple: boolean;
|
|
633
675
|
description: string;
|
|
634
676
|
negatedDescription: string;
|
|
635
|
-
/**
|
|
636
|
-
* @param {"v4" | "v6"} family
|
|
637
|
-
* @returns {string | undefined}
|
|
638
|
-
*/
|
|
639
677
|
path: string;
|
|
640
678
|
}
|
|
641
679
|
| {
|
|
@@ -662,10 +700,6 @@ declare class Server {
|
|
|
662
700
|
simpleType: string;
|
|
663
701
|
multiple: boolean;
|
|
664
702
|
};
|
|
665
|
-
/**
|
|
666
|
-
* @param {Port} port
|
|
667
|
-
* @returns {Promise<number | string>}
|
|
668
|
-
*/
|
|
669
703
|
https: {
|
|
670
704
|
configs: {
|
|
671
705
|
type: string;
|
|
@@ -685,9 +719,6 @@ declare class Server {
|
|
|
685
719
|
description: string;
|
|
686
720
|
path: string;
|
|
687
721
|
}[];
|
|
688
|
-
/**
|
|
689
|
-
* @type {string | undefined}
|
|
690
|
-
*/
|
|
691
722
|
description: string;
|
|
692
723
|
simpleType: string;
|
|
693
724
|
multiple: boolean;
|
|
@@ -695,6 +726,9 @@ declare class Server {
|
|
|
695
726
|
"https-ca-reset": {
|
|
696
727
|
configs: {
|
|
697
728
|
description: string;
|
|
729
|
+
/**
|
|
730
|
+
* @type {string[]}
|
|
731
|
+
*/
|
|
698
732
|
multiple: boolean;
|
|
699
733
|
path: string;
|
|
700
734
|
type: string;
|
|
@@ -719,7 +753,7 @@ declare class Server {
|
|
|
719
753
|
description: string;
|
|
720
754
|
multiple: boolean;
|
|
721
755
|
path: string;
|
|
722
|
-
|
|
756
|
+
type: string;
|
|
723
757
|
}[];
|
|
724
758
|
description: string;
|
|
725
759
|
multiple: boolean;
|
|
@@ -829,7 +863,7 @@ declare class Server {
|
|
|
829
863
|
type: string;
|
|
830
864
|
multiple: boolean;
|
|
831
865
|
description: string;
|
|
832
|
-
negatedDescription: string;
|
|
866
|
+
/** @type {Object<string,string>} */ negatedDescription: string;
|
|
833
867
|
path: string;
|
|
834
868
|
}[];
|
|
835
869
|
description: string;
|
|
@@ -841,12 +875,13 @@ declare class Server {
|
|
|
841
875
|
| {
|
|
842
876
|
type: string;
|
|
843
877
|
multiple: boolean;
|
|
878
|
+
/** @type {any} */
|
|
844
879
|
description: string;
|
|
845
880
|
path: string;
|
|
846
881
|
}
|
|
847
882
|
| {
|
|
848
883
|
type: string;
|
|
849
|
-
/** @type {
|
|
884
|
+
/** @type {any} */ values: boolean[];
|
|
850
885
|
multiple: boolean;
|
|
851
886
|
description: string;
|
|
852
887
|
path: string;
|
|
@@ -896,7 +931,7 @@ declare class Server {
|
|
|
896
931
|
path: string;
|
|
897
932
|
}
|
|
898
933
|
)[];
|
|
899
|
-
description: string;
|
|
934
|
+
/** @type {Compiler} */ description: string;
|
|
900
935
|
simpleType: string;
|
|
901
936
|
multiple: boolean;
|
|
902
937
|
};
|
|
@@ -952,7 +987,7 @@ declare class Server {
|
|
|
952
987
|
path: string;
|
|
953
988
|
}[];
|
|
954
989
|
description: string;
|
|
955
|
-
simpleType: string;
|
|
990
|
+
/** @type {NormalizedStatic} */ simpleType: string;
|
|
956
991
|
multiple: boolean;
|
|
957
992
|
};
|
|
958
993
|
"open-target-reset": {
|
|
@@ -1127,8 +1162,9 @@ declare class Server {
|
|
|
1127
1162
|
}[];
|
|
1128
1163
|
description: string;
|
|
1129
1164
|
multiple: boolean;
|
|
1130
|
-
simpleType: string
|
|
1165
|
+
simpleType: string /** @type {ServerOptions} */;
|
|
1131
1166
|
};
|
|
1167
|
+
/** @type {ServerOptions} */
|
|
1132
1168
|
"server-options-request-cert": {
|
|
1133
1169
|
configs: {
|
|
1134
1170
|
description: string;
|
|
@@ -1164,6 +1200,10 @@ declare class Server {
|
|
|
1164
1200
|
| {
|
|
1165
1201
|
type: string;
|
|
1166
1202
|
multiple: boolean;
|
|
1203
|
+
/**
|
|
1204
|
+
* @param {string | Buffer | undefined} item
|
|
1205
|
+
* @returns {string | Buffer | undefined}
|
|
1206
|
+
*/
|
|
1167
1207
|
description: string;
|
|
1168
1208
|
negatedDescription: string;
|
|
1169
1209
|
path: string;
|
|
@@ -1180,7 +1220,7 @@ declare class Server {
|
|
|
1180
1220
|
description: string;
|
|
1181
1221
|
path: string;
|
|
1182
1222
|
}[];
|
|
1183
|
-
description: string;
|
|
1223
|
+
/** @type {any} */ description: string;
|
|
1184
1224
|
simpleType: string;
|
|
1185
1225
|
multiple: boolean;
|
|
1186
1226
|
};
|
|
@@ -1287,7 +1327,9 @@ declare class Server {
|
|
|
1287
1327
|
type: string;
|
|
1288
1328
|
}
|
|
1289
1329
|
)[];
|
|
1330
|
+
/** @type {ServerOptions & { cacert?: ServerOptions["ca"] }} */
|
|
1290
1331
|
description: string;
|
|
1332
|
+
/** @type {ServerOptions} */
|
|
1291
1333
|
simpleType: string;
|
|
1292
1334
|
multiple: boolean;
|
|
1293
1335
|
};
|
|
@@ -1603,6 +1645,10 @@ declare class Server {
|
|
|
1603
1645
|
negatedDescription: string;
|
|
1604
1646
|
};
|
|
1605
1647
|
};
|
|
1648
|
+
trustedTypesPolicyName: {
|
|
1649
|
+
description: string;
|
|
1650
|
+
type: string;
|
|
1651
|
+
};
|
|
1606
1652
|
};
|
|
1607
1653
|
description?: undefined;
|
|
1608
1654
|
link?: undefined;
|
|
@@ -1621,21 +1667,103 @@ declare class Server {
|
|
|
1621
1667
|
ClientReconnect: {
|
|
1622
1668
|
description: string;
|
|
1623
1669
|
link: string;
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1670
|
+
anyOf: (
|
|
1671
|
+
| {
|
|
1672
|
+
/**
|
|
1673
|
+
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1674
|
+
*/
|
|
1675
|
+
/**
|
|
1676
|
+
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1677
|
+
*/
|
|
1678
|
+
/**
|
|
1679
|
+
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1680
|
+
*/
|
|
1681
|
+
/**
|
|
1682
|
+
* @typedef {Object} OpenApp
|
|
1683
|
+
* @property {string} [name]
|
|
1684
|
+
* @property {string[]} [arguments]
|
|
1685
|
+
*/
|
|
1686
|
+
/**
|
|
1687
|
+
* @typedef {Object} Open
|
|
1688
|
+
* @property {string | string[] | OpenApp} [app]
|
|
1689
|
+
* @property {string | string[]} [target]
|
|
1690
|
+
*/
|
|
1691
|
+
/**
|
|
1692
|
+
* @typedef {Object} NormalizedOpen
|
|
1693
|
+
* @property {string} target
|
|
1694
|
+
* @property {import("open").Options} options
|
|
1695
|
+
*/
|
|
1696
|
+
/**
|
|
1697
|
+
* @typedef {Object} WebSocketURL
|
|
1698
|
+
* @property {string} [hostname]
|
|
1699
|
+
* @property {string} [password]
|
|
1700
|
+
* @property {string} [pathname]
|
|
1701
|
+
* @property {number | string} [port]
|
|
1702
|
+
* @property {string} [protocol]
|
|
1703
|
+
* @property {string} [username]
|
|
1704
|
+
*/
|
|
1705
|
+
/**
|
|
1706
|
+
* @typedef {Object} ClientConfiguration
|
|
1707
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1708
|
+
* @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
|
|
1709
|
+
* @property {boolean} [progress]
|
|
1710
|
+
* @property {boolean | number} [reconnect]
|
|
1711
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1712
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
1713
|
+
*/
|
|
1714
|
+
/**
|
|
1715
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1716
|
+
*/
|
|
1717
|
+
/**
|
|
1718
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1719
|
+
*/
|
|
1720
|
+
/**
|
|
1721
|
+
* @typedef {Object} Configuration
|
|
1722
|
+
* @property {boolean | string} [ipc]
|
|
1723
|
+
* @property {Host} [host]
|
|
1724
|
+
* @property {Port} [port]
|
|
1725
|
+
* @property {boolean | "only"} [hot]
|
|
1726
|
+
* @property {boolean} [liveReload]
|
|
1727
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1728
|
+
* @property {boolean} [compress]
|
|
1729
|
+
* @property {boolean} [magicHtml]
|
|
1730
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1731
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1732
|
+
* @property {boolean} [setupExitSignals]
|
|
1733
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1734
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1735
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1736
|
+
* @property {boolean | ServerOptions} [https]
|
|
1737
|
+
* @property {boolean} [http2]
|
|
1738
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1739
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1740
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1741
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1742
|
+
* @property {boolean} [setupExitSignals]
|
|
1743
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
1744
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1745
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1746
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1747
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
1748
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1749
|
+
*/
|
|
1750
|
+
type: string;
|
|
1751
|
+
cli: {
|
|
1752
|
+
negatedDescription: string;
|
|
1753
|
+
};
|
|
1754
|
+
minimum?: undefined;
|
|
1755
|
+
}
|
|
1756
|
+
| {
|
|
1757
|
+
type: string;
|
|
1758
|
+
minimum: number;
|
|
1759
|
+
cli?: undefined /** @typedef {import("express").Request} Request */;
|
|
1760
|
+
}
|
|
1761
|
+
)[];
|
|
1762
|
+
};
|
|
1763
|
+
ClientWebSocketTransport: {
|
|
1764
|
+
anyOf: {
|
|
1765
|
+
$ref: string;
|
|
1766
|
+
}[];
|
|
1639
1767
|
/**
|
|
1640
1768
|
* @typedef {Object} OpenApp
|
|
1641
1769
|
* @property {string} [name]
|
|
@@ -1705,25 +1833,6 @@ declare class Server {
|
|
|
1705
1833
|
* @property {(devServer: Server) => void} [onListening]
|
|
1706
1834
|
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1707
1835
|
*/
|
|
1708
|
-
anyOf: (
|
|
1709
|
-
| {
|
|
1710
|
-
type: string;
|
|
1711
|
-
cli: {
|
|
1712
|
-
negatedDescription: string;
|
|
1713
|
-
};
|
|
1714
|
-
minimum?: undefined;
|
|
1715
|
-
}
|
|
1716
|
-
| {
|
|
1717
|
-
type: string;
|
|
1718
|
-
minimum: number;
|
|
1719
|
-
cli?: undefined /** @typedef {import("express").Request} Request */;
|
|
1720
|
-
}
|
|
1721
|
-
)[];
|
|
1722
|
-
};
|
|
1723
|
-
ClientWebSocketTransport: {
|
|
1724
|
-
anyOf: {
|
|
1725
|
-
$ref: string;
|
|
1726
|
-
}[];
|
|
1727
1836
|
description: string;
|
|
1728
1837
|
link: string;
|
|
1729
1838
|
};
|
|
@@ -1733,6 +1842,15 @@ declare class Server {
|
|
|
1733
1842
|
ClientWebSocketTransportString: {
|
|
1734
1843
|
type: string;
|
|
1735
1844
|
minLength: number;
|
|
1845
|
+
/**
|
|
1846
|
+
* @typedef {Object} WebSocketURL
|
|
1847
|
+
* @property {string} [hostname]
|
|
1848
|
+
* @property {string} [password]
|
|
1849
|
+
* @property {string} [pathname]
|
|
1850
|
+
* @property {number | string} [port]
|
|
1851
|
+
* @property {string} [protocol]
|
|
1852
|
+
* @property {string} [username]
|
|
1853
|
+
*/
|
|
1736
1854
|
};
|
|
1737
1855
|
ClientWebSocketURL: {
|
|
1738
1856
|
description: string;
|
|
@@ -1757,9 +1875,6 @@ declare class Server {
|
|
|
1757
1875
|
description: string;
|
|
1758
1876
|
type: string;
|
|
1759
1877
|
};
|
|
1760
|
-
/**
|
|
1761
|
-
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1762
|
-
*/
|
|
1763
1878
|
password: {
|
|
1764
1879
|
description: string;
|
|
1765
1880
|
type: string;
|
|
@@ -1873,10 +1988,6 @@ declare class Server {
|
|
|
1873
1988
|
}
|
|
1874
1989
|
| {
|
|
1875
1990
|
instanceof: string;
|
|
1876
|
-
/**
|
|
1877
|
-
* @private
|
|
1878
|
-
* @type {RequestHandler[]}
|
|
1879
|
-
*/
|
|
1880
1991
|
type?: undefined;
|
|
1881
1992
|
items?: undefined;
|
|
1882
1993
|
}
|
|
@@ -1946,6 +2057,10 @@ declare class Server {
|
|
|
1946
2057
|
description: string;
|
|
1947
2058
|
};
|
|
1948
2059
|
crl: {
|
|
2060
|
+
/**
|
|
2061
|
+
* @param {"v4" | "v6"} family
|
|
2062
|
+
* @returns {Promise<string | undefined>}
|
|
2063
|
+
*/
|
|
1949
2064
|
anyOf: (
|
|
1950
2065
|
| {
|
|
1951
2066
|
type: string;
|
|
@@ -2100,7 +2215,7 @@ declare class Server {
|
|
|
2100
2215
|
}
|
|
2101
2216
|
)[];
|
|
2102
2217
|
description: string;
|
|
2103
|
-
link: string
|
|
2218
|
+
link: string /** @type {WebSocketURL} */;
|
|
2104
2219
|
};
|
|
2105
2220
|
HistoryApiFallback: {
|
|
2106
2221
|
anyOf: (
|
|
@@ -2116,11 +2231,12 @@ declare class Server {
|
|
|
2116
2231
|
type: string;
|
|
2117
2232
|
description: string;
|
|
2118
2233
|
link: string;
|
|
2234
|
+
/** @type {string} */
|
|
2119
2235
|
cli?: undefined /** @typedef {import("express").Request} Request */;
|
|
2120
2236
|
}
|
|
2121
2237
|
)[];
|
|
2122
2238
|
description: string;
|
|
2123
|
-
|
|
2239
|
+
link: string;
|
|
2124
2240
|
};
|
|
2125
2241
|
Host: {
|
|
2126
2242
|
description: string;
|
|
@@ -2258,6 +2374,12 @@ declare class Server {
|
|
|
2258
2374
|
anyOf: (
|
|
2259
2375
|
| {
|
|
2260
2376
|
type: string;
|
|
2377
|
+
/**
|
|
2378
|
+
* prependEntry Method for webpack 4
|
|
2379
|
+
* @param {any} originalEntry
|
|
2380
|
+
* @param {any} newAdditionalEntries
|
|
2381
|
+
* @returns {any}
|
|
2382
|
+
*/
|
|
2261
2383
|
items: {
|
|
2262
2384
|
type: string;
|
|
2263
2385
|
minLength: number;
|
|
@@ -2299,6 +2421,7 @@ declare class Server {
|
|
|
2299
2421
|
};
|
|
2300
2422
|
};
|
|
2301
2423
|
};
|
|
2424
|
+
/** @type {any} */
|
|
2302
2425
|
OpenString: {
|
|
2303
2426
|
type: string;
|
|
2304
2427
|
minLength: number;
|
|
@@ -2346,7 +2469,7 @@ declare class Server {
|
|
|
2346
2469
|
}
|
|
2347
2470
|
| {
|
|
2348
2471
|
instanceof: string;
|
|
2349
|
-
|
|
2472
|
+
type?: undefined;
|
|
2350
2473
|
}
|
|
2351
2474
|
)[];
|
|
2352
2475
|
};
|
|
@@ -2508,6 +2631,7 @@ declare class Server {
|
|
|
2508
2631
|
anyOf: (
|
|
2509
2632
|
| {
|
|
2510
2633
|
type: string;
|
|
2634
|
+
/** @type {NormalizedStatic} */
|
|
2511
2635
|
instanceof?: undefined;
|
|
2512
2636
|
}
|
|
2513
2637
|
| {
|
|
@@ -2812,7 +2936,7 @@ declare class Server {
|
|
|
2812
2936
|
}
|
|
2813
2937
|
)[];
|
|
2814
2938
|
cli: {
|
|
2815
|
-
description: string
|
|
2939
|
+
description: string /** @type {any} */;
|
|
2816
2940
|
};
|
|
2817
2941
|
};
|
|
2818
2942
|
WebSocketServerFunction: {
|
|
@@ -2850,7 +2974,6 @@ declare class Server {
|
|
|
2850
2974
|
$ref: string;
|
|
2851
2975
|
};
|
|
2852
2976
|
client: {
|
|
2853
|
-
/** @type {any} */
|
|
2854
2977
|
$ref: string;
|
|
2855
2978
|
};
|
|
2856
2979
|
compress: {
|
|
@@ -2951,9 +3074,10 @@ declare class Server {
|
|
|
2951
3074
|
static getHostname(hostname: Host): Promise<string>;
|
|
2952
3075
|
/**
|
|
2953
3076
|
* @param {Port} port
|
|
3077
|
+
* @param {string} host
|
|
2954
3078
|
* @returns {Promise<number | string>}
|
|
2955
3079
|
*/
|
|
2956
|
-
static getFreePort(port: Port): Promise<number | string>;
|
|
3080
|
+
static getFreePort(port: Port, host: string): Promise<number | string>;
|
|
2957
3081
|
/**
|
|
2958
3082
|
* @returns {string}
|
|
2959
3083
|
*/
|
|
@@ -3202,9 +3326,7 @@ declare class Server {
|
|
|
3202
3326
|
/**
|
|
3203
3327
|
* @param {(err?: Error) => void} [callback]
|
|
3204
3328
|
*/
|
|
3205
|
-
startCallback(
|
|
3206
|
-
callback?: ((err?: Error | undefined) => void) | undefined
|
|
3207
|
-
): void;
|
|
3329
|
+
startCallback(callback?: ((err?: Error) => void) | undefined): void;
|
|
3208
3330
|
/**
|
|
3209
3331
|
* @returns {Promise<void>}
|
|
3210
3332
|
*/
|
|
@@ -3212,25 +3334,19 @@ declare class Server {
|
|
|
3212
3334
|
/**
|
|
3213
3335
|
* @param {(err?: Error) => void} [callback]
|
|
3214
3336
|
*/
|
|
3215
|
-
stopCallback(
|
|
3216
|
-
callback?: ((err?: Error | undefined) => void) | undefined
|
|
3217
|
-
): void;
|
|
3337
|
+
stopCallback(callback?: ((err?: Error) => void) | undefined): void;
|
|
3218
3338
|
/**
|
|
3219
3339
|
* @param {Port} port
|
|
3220
3340
|
* @param {Host} hostname
|
|
3221
3341
|
* @param {(err?: Error) => void} fn
|
|
3222
3342
|
* @returns {void}
|
|
3223
3343
|
*/
|
|
3224
|
-
listen(
|
|
3225
|
-
port: Port,
|
|
3226
|
-
hostname: Host,
|
|
3227
|
-
fn: (err?: Error | undefined) => void
|
|
3228
|
-
): void;
|
|
3344
|
+
listen(port: Port, hostname: Host, fn: (err?: Error) => void): void;
|
|
3229
3345
|
/**
|
|
3230
3346
|
* @param {(err?: Error) => void} [callback]
|
|
3231
3347
|
* @returns {void}
|
|
3232
3348
|
*/
|
|
3233
|
-
close(callback?: ((err?: Error
|
|
3349
|
+
close(callback?: ((err?: Error) => void) | undefined): void;
|
|
3234
3350
|
}
|
|
3235
3351
|
declare namespace Server {
|
|
3236
3352
|
export {
|