webpack-dev-server 4.2.1 → 4.5.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.
package/lib/options.json CHANGED
@@ -59,6 +59,9 @@
59
59
  "progress": {
60
60
  "$ref": "#/definitions/ClientProgress"
61
61
  },
62
+ "reconnect": {
63
+ "$ref": "#/definitions/ClientReconnect"
64
+ },
62
65
  "webSocketTransport": {
63
66
  "$ref": "#/definitions/ClientWebSocketTransport"
64
67
  },
@@ -102,6 +105,19 @@
102
105
  "link": "https://webpack.js.org/configuration/dev-server/#progress",
103
106
  "type": "boolean"
104
107
  },
108
+ "ClientReconnect": {
109
+ "description": "Tells dev-server the number of times it should try to reconnect the client.",
110
+ "link": "https://webpack.js.org/configuration/dev-server/#reconnect",
111
+ "anyOf": [
112
+ {
113
+ "type": "boolean"
114
+ },
115
+ {
116
+ "type": "number",
117
+ "minimum": 0
118
+ }
119
+ ]
120
+ },
105
121
  "ClientWebSocketTransport": {
106
122
  "anyOf": [
107
123
  {
@@ -191,7 +207,7 @@
191
207
  },
192
208
  "HTTP2": {
193
209
  "type": "boolean",
194
- "description": "Allows to serve over HTTP/2 using SPDY.",
210
+ "description": "Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.",
195
211
  "link": "https://webpack.js.org/configuration/dev-server/#devserverhttp2"
196
212
  },
197
213
  "HTTPS": {
@@ -205,11 +221,11 @@
205
221
  "properties": {
206
222
  "passphrase": {
207
223
  "type": "string",
208
- "description": "Passphrase for a pfx file."
224
+ "description": "Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option."
209
225
  },
210
226
  "requestCert": {
211
227
  "type": "boolean",
212
- "description": "Request for an SSL certificate."
228
+ "description": "Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option."
213
229
  },
214
230
  "ca": {
215
231
  "anyOf": [
@@ -233,7 +249,7 @@
233
249
  "instanceof": "Buffer"
234
250
  }
235
251
  ],
236
- "description": "Path to an SSL CA certificate or content of an SSL CA certificate."
252
+ "description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, it will be removed in favor of the `server.options.ca` option."
237
253
  },
238
254
  "cacert": {
239
255
  "anyOf": [
@@ -257,7 +273,7 @@
257
273
  "instanceof": "Buffer"
258
274
  }
259
275
  ],
260
- "description": "Path to an SSL CA certificate or content of an SSL CA certificate."
276
+ "description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, it will be removed in favor of the `server.options.cacert` option."
261
277
  },
262
278
  "cert": {
263
279
  "anyOf": [
@@ -281,7 +297,7 @@
281
297
  "instanceof": "Buffer"
282
298
  }
283
299
  ],
284
- "description": "Path to an SSL certificate or content of an SSL certificate."
300
+ "description": "Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option."
285
301
  },
286
302
  "crl": {
287
303
  "anyOf": [
@@ -305,7 +321,7 @@
305
321
  "instanceof": "Buffer"
306
322
  }
307
323
  ],
308
- "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists)."
324
+ "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, it will be removed in favor of the `server.options.crl` option."
309
325
  },
310
326
  "key": {
311
327
  "anyOf": [
@@ -333,7 +349,7 @@
333
349
  "instanceof": "Buffer"
334
350
  }
335
351
  ],
336
- "description": "Path to an SSL key or content of an SSL key."
352
+ "description": "Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` option."
337
353
  },
338
354
  "pfx": {
339
355
  "anyOf": [
@@ -361,16 +377,40 @@
361
377
  "instanceof": "Buffer"
362
378
  }
363
379
  ],
364
- "description": "Path to an SSL pfx file or content of an SSL pfx file."
380
+ "description": "Path to an SSL pfx file or content of an SSL pfx file. Deprecated, it will be removed in favor of the `server.options.pfx` option."
365
381
  }
366
382
  }
367
383
  }
368
384
  ],
369
- "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
385
+ "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the `server` option.",
370
386
  "link": "https://webpack.js.org/configuration/dev-server/#devserverhttps"
371
387
  },
388
+ "HeaderObject": {
389
+ "type": "object",
390
+ "additionalProperties": false,
391
+ "properties": {
392
+ "key": {
393
+ "description": "key of header.",
394
+ "type": "string"
395
+ },
396
+ "value": {
397
+ "description": "value of header.",
398
+ "type": "string"
399
+ }
400
+ },
401
+ "cli": {
402
+ "exclude": true
403
+ }
404
+ },
372
405
  "Headers": {
373
406
  "anyOf": [
407
+ {
408
+ "type": "array",
409
+ "items": {
410
+ "$ref": "#/definitions/HeaderObject"
411
+ },
412
+ "minItems": 1
413
+ },
374
414
  {
375
415
  "type": "object"
376
416
  },
@@ -554,7 +594,9 @@
554
594
  "Port": {
555
595
  "anyOf": [
556
596
  {
557
- "type": "number"
597
+ "type": "number",
598
+ "minimum": 0,
599
+ "maximum": 65535
558
600
  },
559
601
  {
560
602
  "type": "string",
@@ -589,6 +631,215 @@
589
631
  "description": "Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain.",
590
632
  "link": "https://webpack.js.org/configuration/dev-server/#devserverproxy"
591
633
  },
634
+ "Server": {
635
+ "anyOf": [
636
+ {
637
+ "$ref": "#/definitions/ServerEnum"
638
+ },
639
+ {
640
+ "$ref": "#/definitions/ServerString"
641
+ },
642
+ {
643
+ "$ref": "#/definitions/ServerObject"
644
+ }
645
+ ],
646
+ "link": "https://webpack.js.org/configuration/dev-server/#devserverserver",
647
+ "description": "Allows to set server and options (by default 'http')."
648
+ },
649
+ "ServerType": {
650
+ "enum": ["http", "https", "spdy"]
651
+ },
652
+ "ServerEnum": {
653
+ "enum": ["http", "https", "spdy"],
654
+ "cli": {
655
+ "exclude": true
656
+ }
657
+ },
658
+ "ServerString": {
659
+ "type": "string",
660
+ "minLength": 1,
661
+ "cli": {
662
+ "exclude": true
663
+ }
664
+ },
665
+ "ServerObject": {
666
+ "type": "object",
667
+ "properties": {
668
+ "type": {
669
+ "$ref": "#/definitions/ServerType"
670
+ },
671
+ "options": {
672
+ "$ref": "#/definitions/ServerOptions"
673
+ }
674
+ },
675
+ "additionalProperties": false
676
+ },
677
+ "ServerOptions": {
678
+ "type": "object",
679
+ "additionalProperties": true,
680
+ "properties": {
681
+ "passphrase": {
682
+ "type": "string",
683
+ "description": "Passphrase for a pfx file."
684
+ },
685
+ "requestCert": {
686
+ "type": "boolean",
687
+ "description": "Request for an SSL certificate."
688
+ },
689
+ "ca": {
690
+ "anyOf": [
691
+ {
692
+ "type": "array",
693
+ "items": {
694
+ "anyOf": [
695
+ {
696
+ "type": "string"
697
+ },
698
+ {
699
+ "instanceof": "Buffer"
700
+ }
701
+ ]
702
+ }
703
+ },
704
+ {
705
+ "type": "string"
706
+ },
707
+ {
708
+ "instanceof": "Buffer"
709
+ }
710
+ ],
711
+ "description": "Path to an SSL CA certificate or content of an SSL CA certificate."
712
+ },
713
+ "cacert": {
714
+ "anyOf": [
715
+ {
716
+ "type": "array",
717
+ "items": {
718
+ "anyOf": [
719
+ {
720
+ "type": "string"
721
+ },
722
+ {
723
+ "instanceof": "Buffer"
724
+ }
725
+ ]
726
+ }
727
+ },
728
+ {
729
+ "type": "string"
730
+ },
731
+ {
732
+ "instanceof": "Buffer"
733
+ }
734
+ ],
735
+ "description": "Path to an SSL CA certificate or content of an SSL CA certificate."
736
+ },
737
+ "cert": {
738
+ "anyOf": [
739
+ {
740
+ "type": "array",
741
+ "items": {
742
+ "anyOf": [
743
+ {
744
+ "type": "string"
745
+ },
746
+ {
747
+ "instanceof": "Buffer"
748
+ }
749
+ ]
750
+ }
751
+ },
752
+ {
753
+ "type": "string"
754
+ },
755
+ {
756
+ "instanceof": "Buffer"
757
+ }
758
+ ],
759
+ "description": "Path to an SSL certificate or content of an SSL certificate."
760
+ },
761
+ "crl": {
762
+ "anyOf": [
763
+ {
764
+ "type": "array",
765
+ "items": {
766
+ "anyOf": [
767
+ {
768
+ "type": "string"
769
+ },
770
+ {
771
+ "instanceof": "Buffer"
772
+ }
773
+ ]
774
+ }
775
+ },
776
+ {
777
+ "type": "string"
778
+ },
779
+ {
780
+ "instanceof": "Buffer"
781
+ }
782
+ ],
783
+ "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists)."
784
+ },
785
+ "key": {
786
+ "anyOf": [
787
+ {
788
+ "type": "array",
789
+ "items": {
790
+ "anyOf": [
791
+ {
792
+ "type": "string"
793
+ },
794
+ {
795
+ "instanceof": "Buffer"
796
+ },
797
+ {
798
+ "type": "object",
799
+ "additionalProperties": true
800
+ }
801
+ ]
802
+ }
803
+ },
804
+ {
805
+ "type": "string"
806
+ },
807
+ {
808
+ "instanceof": "Buffer"
809
+ }
810
+ ],
811
+ "description": "Path to an SSL key or content of an SSL key."
812
+ },
813
+ "pfx": {
814
+ "anyOf": [
815
+ {
816
+ "type": "array",
817
+ "items": {
818
+ "anyOf": [
819
+ {
820
+ "type": "string"
821
+ },
822
+ {
823
+ "instanceof": "Buffer"
824
+ },
825
+ {
826
+ "type": "object",
827
+ "additionalProperties": true
828
+ }
829
+ ]
830
+ }
831
+ },
832
+ {
833
+ "type": "string"
834
+ },
835
+ {
836
+ "instanceof": "Buffer"
837
+ }
838
+ ],
839
+ "description": "Path to an SSL pfx file or content of an SSL pfx file."
840
+ }
841
+ }
842
+ },
592
843
  "SetupExitSignals": {
593
844
  "type": "boolean",
594
845
  "description": "Allows to close dev server and exit the process on SIGINT and SIGTERM signals (enabled by default for CLI).",
@@ -764,22 +1015,30 @@
764
1015
  "description": "Allows to set web socket server and options (by default 'ws').",
765
1016
  "link": "https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver"
766
1017
  },
1018
+ "WebSocketServerType": {
1019
+ "enum": ["sockjs", "ws"]
1020
+ },
767
1021
  "WebSocketServerEnum": {
768
- "enum": [false, "sockjs", "ws"]
1022
+ "anyOf": [
1023
+ {
1024
+ "enum": [false]
1025
+ },
1026
+ {
1027
+ "$ref": "#/definitions/WebSocketServerType"
1028
+ }
1029
+ ],
1030
+ "description": "Deprecated: please use 'webSocketServer.type'/'--web-socket-server-type' option."
769
1031
  },
770
1032
  "WebSocketServerFunction": {
771
1033
  "instanceof": "Function"
772
1034
  },
773
1035
  "WebSocketServerObject": {
774
1036
  "type": "object",
775
- "cli": {
776
- "exclude": true
777
- },
778
1037
  "properties": {
779
1038
  "type": {
780
1039
  "anyOf": [
781
1040
  {
782
- "$ref": "#/definitions/WebSocketServerEnum"
1041
+ "$ref": "#/definitions/WebSocketServerType"
783
1042
  },
784
1043
  {
785
1044
  "$ref": "#/definitions/WebSocketServerString"
@@ -791,7 +1050,10 @@
791
1050
  },
792
1051
  "options": {
793
1052
  "type": "object",
794
- "additionalProperties": true
1053
+ "additionalProperties": true,
1054
+ "cli": {
1055
+ "exclude": true
1056
+ }
795
1057
  }
796
1058
  },
797
1059
  "additionalProperties": false
@@ -863,6 +1125,9 @@
863
1125
  "proxy": {
864
1126
  "$ref": "#/definitions/Proxy"
865
1127
  },
1128
+ "server": {
1129
+ "$ref": "#/definitions/Server"
1130
+ },
866
1131
  "setupExitSignals": {
867
1132
  "$ref": "#/definitions/SetupExitSignals"
868
1133
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack-dev-server",
3
- "version": "4.2.1",
3
+ "version": "4.5.0",
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",
@@ -34,8 +34,8 @@
34
34
  "dependencies": {
35
35
  "ansi-html-community": "^0.0.8",
36
36
  "bonjour": "^3.5.0",
37
- "chokidar": "^3.5.1",
38
- "colorette": "^1.2.2",
37
+ "chokidar": "^3.5.2",
38
+ "colorette": "^2.0.10",
39
39
  "compression": "^1.7.4",
40
40
  "connect-history-api-fallback": "^1.6.0",
41
41
  "del": "^6.0.0",
@@ -55,7 +55,7 @@
55
55
  "spdy": "^4.0.2",
56
56
  "strip-ansi": "^7.0.0",
57
57
  "url": "^0.11.0",
58
- "webpack-dev-middleware": "^5.1.0",
58
+ "webpack-dev-middleware": "^5.2.1",
59
59
  "ws": "^8.1.0"
60
60
  },
61
61
  "devDependencies": {
@@ -66,15 +66,17 @@
66
66
  "@babel/plugin-transform-runtime": "^7.14.5",
67
67
  "@babel/preset-env": "^7.14.5",
68
68
  "@babel/runtime": "^7.14.5",
69
- "@commitlint/cli": "^13.1.0",
70
- "@commitlint/config-conventional": "^13.1.0",
69
+ "@commitlint/cli": "^14.1.0",
70
+ "@commitlint/config-conventional": "^14.1.0",
71
71
  "acorn": "^8.2.4",
72
72
  "babel-jest": "^27.0.2",
73
73
  "babel-loader": "^8.2.2",
74
74
  "body-parser": "^1.19.0",
75
75
  "core-js": "^3.12.1",
76
76
  "css-loader": "^5.2.4",
77
- "eslint": "^7.29.0",
77
+ "css-tree": "^1.1.3",
78
+ "csstree": "^0.0.3",
79
+ "eslint": "^8.0.1",
78
80
  "eslint-config-prettier": "^8.3.0",
79
81
  "eslint-config-webpack": "^1.2.5",
80
82
  "eslint-plugin-import": "^2.23.2",
@@ -103,7 +105,7 @@
103
105
  "tcp-port-used": "^1.0.2",
104
106
  "typescript": "^4.2.4",
105
107
  "url-loader": "^4.1.1",
106
- "webpack": "^5.50.0",
108
+ "webpack": "^5.64.0",
107
109
  "webpack-cli": "^4.7.2",
108
110
  "webpack-merge": "^5.8.0"
109
111
  },