webpack-dev-server 4.13.1 → 4.13.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/lib/Server.js CHANGED
@@ -186,7 +186,6 @@ const schema = require("./options.json");
186
186
  * @property {boolean} [magicHtml]
187
187
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
188
188
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
189
- * @property {boolean} [setupExitSignals]
190
189
  * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
191
190
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
192
191
  * @property {boolean | string | Static | Array<string | Static>} [static]
@@ -2893,7 +2892,11 @@ class Server {
2893
2892
  }
2894
2893
 
2895
2894
  if (/** @type {NormalizedOpen[]} */ (this.options.open).length > 0) {
2896
- const openTarget = prettyPrintURL(this.options.host || "localhost");
2895
+ const openTarget = prettyPrintURL(
2896
+ !this.options.host || this.options.host === "0.0.0.0"
2897
+ ? "localhost"
2898
+ : this.options.host
2899
+ );
2897
2900
 
2898
2901
  this.openBrowser(openTarget);
2899
2902
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack-dev-server",
3
- "version": "4.13.1",
3
+ "version": "4.13.2",
4
4
  "description": "Serves a webpack app. Updates the browser on changes.",
5
5
  "bin": "bin/webpack-dev-server.js",
6
6
  "main": "lib/Server.js",
@@ -162,7 +162,6 @@ declare class Server {
162
162
  * @property {boolean} [magicHtml]
163
163
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
164
164
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
165
- * @property {boolean} [setupExitSignals]
166
165
  * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
167
166
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
168
167
  * @property {boolean | string | Static | Array<string | Static>} [static]
@@ -340,7 +339,6 @@ declare class Server {
340
339
  * @property {boolean} [magicHtml]
341
340
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
342
341
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
343
- * @property {boolean} [setupExitSignals]
344
342
  * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
345
343
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
346
344
  * @property {boolean | string | Static | Array<string | Static>} [static]
@@ -467,7 +465,6 @@ declare class Server {
467
465
  * @property {boolean} [magicHtml]
468
466
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
469
467
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
470
- * @property {boolean} [setupExitSignals]
471
468
  * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
472
469
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
473
470
  * @property {boolean | string | Static | Array<string | Static>} [static]
@@ -562,10 +559,6 @@ declare class Server {
562
559
  description: string;
563
560
  path: string;
564
561
  }[];
565
- /**
566
- * @param {Configuration | Compiler | MultiCompiler} options
567
- * @param {Compiler | MultiCompiler | Configuration} compiler
568
- */
569
562
  description: string;
570
563
  simpleType: string;
571
564
  multiple: boolean;
@@ -591,19 +584,12 @@ declare class Server {
591
584
  description: string;
592
585
  simpleType: string;
593
586
  multiple: boolean;
594
- /**
595
- * @type {FSWatcher[]}
596
- */
597
587
  };
598
588
  "client-web-socket-url-port": {
599
589
  configs: {
600
590
  type: string;
601
591
  multiple: boolean;
602
592
  description: string;
603
- /**
604
- * @private
605
- * @type {RequestHandler[]}
606
- */
607
593
  path: string;
608
594
  }[];
609
595
  description: string;
@@ -766,13 +752,13 @@ declare class Server {
766
752
  "https-cacert-reset": {
767
753
  configs: {
768
754
  description: string;
755
+ /** @type {string} */
769
756
  multiple: boolean;
770
757
  path: string;
771
758
  type: string;
772
759
  }[];
773
760
  description: string;
774
761
  multiple: boolean;
775
- /** @type {ServerConfiguration} */
776
762
  simpleType: string;
777
763
  };
778
764
  "https-cert": {
@@ -783,7 +769,7 @@ declare class Server {
783
769
  path: string;
784
770
  }[];
785
771
  description: string;
786
- /** @type {string} */ simpleType: string;
772
+ simpleType: string;
787
773
  multiple: boolean;
788
774
  };
789
775
  "https-cert-reset": {
@@ -881,6 +867,12 @@ declare class Server {
881
867
  description: string;
882
868
  negatedDescription: string;
883
869
  path: string;
870
+ /**
871
+ * prependEntry Method for webpack 4
872
+ * @param {any} originalEntry
873
+ * @param {any} newAdditionalEntries
874
+ * @returns {any}
875
+ */
884
876
  }[];
885
877
  description: string;
886
878
  simpleType: string;
@@ -906,7 +898,6 @@ declare class Server {
906
898
  simpleType: string;
907
899
  multiple: boolean;
908
900
  };
909
- /** @type {Object<string,string>} */
910
901
  "live-reload": {
911
902
  configs: {
912
903
  type: string;
@@ -915,6 +906,7 @@ declare class Server {
915
906
  negatedDescription: string;
916
907
  path: string;
917
908
  }[];
909
+ /** @type {any} */
918
910
  description: string;
919
911
  simpleType: string;
920
912
  multiple: boolean;
@@ -936,7 +928,7 @@ declare class Server {
936
928
  | {
937
929
  type: string;
938
930
  multiple: boolean;
939
- description: string;
931
+ /** @type {MultiCompiler} */ description: string;
940
932
  path: string;
941
933
  }
942
934
  | {
@@ -968,14 +960,14 @@ declare class Server {
968
960
  multiple: boolean;
969
961
  description: string;
970
962
  path: string;
971
- /**
972
- * @private
973
- * @returns {Promise<void>}
974
- */
975
963
  }[];
976
964
  description: string;
977
965
  simpleType: string;
978
966
  multiple: boolean;
967
+ /**
968
+ * @param {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} watchOptions
969
+ * @returns {WatchOptions}
970
+ */
979
971
  };
980
972
  "open-app-name-reset": {
981
973
  configs: {
@@ -1206,7 +1198,7 @@ declare class Server {
1206
1198
  }[];
1207
1199
  description: string;
1208
1200
  multiple: boolean;
1209
- simpleType: string;
1201
+ simpleType: string /** @type {ServerOptions} */;
1210
1202
  };
1211
1203
  static: {
1212
1204
  configs: (
@@ -1219,7 +1211,7 @@ declare class Server {
1219
1211
  | {
1220
1212
  type: string;
1221
1213
  multiple: boolean;
1222
- description: string;
1214
+ /** @type {ServerOptions} */ description: string;
1223
1215
  negatedDescription: string;
1224
1216
  path: string;
1225
1217
  }
@@ -1231,15 +1223,11 @@ declare class Server {
1231
1223
  "static-directory": {
1232
1224
  configs: {
1233
1225
  type: string;
1234
- multiple: boolean;
1226
+ /** @type {any} */ multiple: boolean;
1235
1227
  description: string;
1236
1228
  path: string;
1237
1229
  }[];
1238
1230
  description: string;
1239
- /**
1240
- * @param {string | Buffer | undefined} item
1241
- * @returns {string | Buffer | undefined}
1242
- */
1243
1231
  simpleType: string;
1244
1232
  multiple: boolean;
1245
1233
  };
@@ -1251,8 +1239,8 @@ declare class Server {
1251
1239
  path: string;
1252
1240
  }[];
1253
1241
  description: string;
1254
- simpleType: string;
1255
- multiple: boolean /** @type {any} */;
1242
+ /** @type {any} */ simpleType: string;
1243
+ multiple: boolean;
1256
1244
  };
1257
1245
  "static-public-path-reset": {
1258
1246
  configs: {
@@ -1369,7 +1357,7 @@ declare class Server {
1369
1357
  description: string;
1370
1358
  simpleType: string;
1371
1359
  multiple: boolean;
1372
- };
1360
+ } /** @type {ServerOptions} */;
1373
1361
  };
1374
1362
  readonly processArguments: (
1375
1363
  args: Record<string, import("../bin/process-arguments").Argument>,
@@ -1588,7 +1576,6 @@ declare class Server {
1588
1576
  * @property {boolean} [magicHtml]
1589
1577
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
1590
1578
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1591
- * @property {boolean} [setupExitSignals]
1592
1579
  * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1593
1580
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1594
1581
  * @property {boolean | string | Static | Array<string | Static>} [static]
@@ -1745,7 +1732,6 @@ declare class Server {
1745
1732
  * @property {boolean} [magicHtml]
1746
1733
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
1747
1734
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1748
- * @property {boolean} [setupExitSignals]
1749
1735
  * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1750
1736
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1751
1737
  * @property {boolean | string | Static | Array<string | Static>} [static]
@@ -1813,7 +1799,6 @@ declare class Server {
1813
1799
  * @property {boolean} [magicHtml]
1814
1800
  * @property {"auto" | "all" | string | string[]} [allowedHosts]
1815
1801
  * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1816
- * @property {boolean} [setupExitSignals]
1817
1802
  * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1818
1803
  * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1819
1804
  * @property {boolean | string | Static | Array<string | Static>} [static]
@@ -1929,10 +1914,6 @@ declare class Server {
1929
1914
  cli: {
1930
1915
  negatedDescription: string;
1931
1916
  };
1932
- /**
1933
- * @private
1934
- * @type {RequestHandler[]}
1935
- */
1936
1917
  };
1937
1918
  ca: {
1938
1919
  anyOf: (
@@ -2191,13 +2172,15 @@ declare class Server {
2191
2172
  cli: {
2192
2173
  negatedDescription: string;
2193
2174
  };
2194
- description?: undefined;
2175
+ /** @type {WebSocketURL} */ description?: undefined;
2195
2176
  link?: undefined;
2196
2177
  }
2197
2178
  | {
2198
2179
  type: string;
2199
- /** @type {WebSocketURL} */ description: string;
2180
+ /** @type {ClientConfiguration} */
2181
+ description: string;
2200
2182
  link: string;
2183
+ /** @type {{ type: WebSocketServerConfiguration["type"], options: NonNullable<WebSocketServerConfiguration["options"]> }} */
2201
2184
  cli?: undefined /** @typedef {import("express").Request} Request */;
2202
2185
  }
2203
2186
  )[];
@@ -2210,7 +2193,7 @@ declare class Server {
2210
2193
  anyOf: (
2211
2194
  | {
2212
2195
  enum: string[];
2213
- /** @type {ServerConfiguration} */ type?: undefined;
2196
+ type?: undefined;
2214
2197
  minLength?: undefined;
2215
2198
  }
2216
2199
  | {
@@ -2283,7 +2266,7 @@ declare class Server {
2283
2266
  OnListening: {
2284
2267
  instanceof: string;
2285
2268
  description: string;
2286
- link: string;
2269
+ /** @type {string} */ link: string;
2287
2270
  };
2288
2271
  Open: {
2289
2272
  anyOf: (
@@ -2381,12 +2364,6 @@ declare class Server {
2381
2364
  };
2382
2365
  };
2383
2366
  };
2384
- /**
2385
- * prependEntry Method for webpack 4
2386
- * @param {any} originalEntry
2387
- * @param {any} newAdditionalEntries
2388
- * @returns {any}
2389
- */
2390
2367
  OpenString: {
2391
2368
  type: string;
2392
2369
  minLength: number;
@@ -2441,7 +2418,6 @@ declare class Server {
2441
2418
  }
2442
2419
  )[];
2443
2420
  description: string;
2444
- /** @type {any} */
2445
2421
  link: string;
2446
2422
  };
2447
2423
  Server: {
@@ -2620,6 +2596,10 @@ declare class Server {
2620
2596
  )[];
2621
2597
  description: string;
2622
2598
  };
2599
+ /**
2600
+ * @param {string | Static | undefined} [optionsForStatic]
2601
+ * @returns {NormalizedStatic}
2602
+ */
2623
2603
  key: {
2624
2604
  anyOf: (
2625
2605
  | {
@@ -2641,7 +2621,7 @@ declare class Server {
2641
2621
  additionalProperties: boolean;
2642
2622
  instanceof?: undefined;
2643
2623
  }
2644
- )[];
2624
+ )[] /** @type {NormalizedStatic} */;
2645
2625
  };
2646
2626
  instanceof?: undefined;
2647
2627
  }
@@ -2905,7 +2885,7 @@ declare class Server {
2905
2885
  };
2906
2886
  };
2907
2887
  WebSocketServerFunction: {
2908
- instanceof: string /** @type {ServerOptions} */;
2888
+ instanceof: string;
2909
2889
  };
2910
2890
  WebSocketServerObject: {
2911
2891
  type: string;
@@ -2940,6 +2920,10 @@ declare class Server {
2940
2920
  };
2941
2921
  client: {
2942
2922
  $ref: string;
2923
+ /**
2924
+ * @param {string | Buffer | undefined} item
2925
+ * @returns {string | Buffer | undefined}
2926
+ */
2943
2927
  };
2944
2928
  compress: {
2945
2929
  $ref: string;
@@ -2974,7 +2958,6 @@ declare class Server {
2974
2958
  magicHtml: {
2975
2959
  $ref: string;
2976
2960
  };
2977
- /** @type {any} */
2978
2961
  onAfterSetupMiddleware: {
2979
2962
  $ref: string;
2980
2963
  };
@@ -2982,7 +2965,7 @@ declare class Server {
2982
2965
  $ref: string;
2983
2966
  };
2984
2967
  onListening: {
2985
- $ref: string;
2968
+ $ref: string /** @type {ServerOptions} */;
2986
2969
  };
2987
2970
  open: {
2988
2971
  $ref: string;
@@ -3405,7 +3388,6 @@ type Configuration = {
3405
3388
  | boolean
3406
3389
  | import("connect-history-api-fallback").Options
3407
3390
  | undefined;
3408
- setupExitSignals?: boolean | undefined;
3409
3391
  bonjour?:
3410
3392
  | boolean
3411
3393
  | Record<string, never>
@@ -3424,6 +3406,7 @@ type Configuration = {
3424
3406
  webSocketServer?: string | boolean | WebSocketServerConfiguration | undefined;
3425
3407
  proxy?: ProxyConfigArrayItem | ProxyConfigMap | ProxyConfigArray | undefined;
3426
3408
  open?: string | boolean | Open | (string | Open)[] | undefined;
3409
+ setupExitSignals?: boolean | undefined;
3427
3410
  client?: boolean | ClientConfiguration | undefined;
3428
3411
  headers?:
3429
3412
  | Headers