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/README.md +65 -17
- package/bin/cli-flags.js +317 -35
- package/client/index.js +34 -18
- package/client/modules/logger/index.js +43 -14
- package/client/modules/sockjs-client/index.js +20 -17
- package/client/overlay.js +30 -5
- package/client/socket.js +7 -3
- package/lib/Server.js +202 -105
- package/lib/options.json +282 -17
- package/package.json +10 -8
package/bin/cli-flags.js
CHANGED
|
@@ -174,6 +174,29 @@ module.exports = {
|
|
|
174
174
|
simpleType: "boolean",
|
|
175
175
|
multiple: false,
|
|
176
176
|
},
|
|
177
|
+
"client-reconnect": {
|
|
178
|
+
configs: [
|
|
179
|
+
{
|
|
180
|
+
type: "boolean",
|
|
181
|
+
multiple: false,
|
|
182
|
+
description:
|
|
183
|
+
"Tells dev-server the number of times it should try to reconnect the client.",
|
|
184
|
+
path: "client.reconnect",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
type: "number",
|
|
188
|
+
multiple: false,
|
|
189
|
+
description:
|
|
190
|
+
"Tells dev-server the number of times it should try to reconnect the client.",
|
|
191
|
+
path: "client.reconnect",
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
description:
|
|
195
|
+
"Tells dev-server the number of times it should try to reconnect the client.",
|
|
196
|
+
negatedDescription: "Tells dev-server to not to try to connect the client.",
|
|
197
|
+
simpleType: "string",
|
|
198
|
+
multiple: false,
|
|
199
|
+
},
|
|
177
200
|
"client-web-socket-url": {
|
|
178
201
|
configs: [
|
|
179
202
|
{
|
|
@@ -297,21 +320,54 @@ module.exports = {
|
|
|
297
320
|
"web-socket-server": {
|
|
298
321
|
configs: [
|
|
299
322
|
{
|
|
323
|
+
description:
|
|
324
|
+
"Deprecated: please use 'webSocketServer.type'/'--web-socket-server-type' option.",
|
|
325
|
+
multiple: false,
|
|
326
|
+
path: "webSocketServer",
|
|
300
327
|
type: "enum",
|
|
301
|
-
values: [false
|
|
328
|
+
values: [false],
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
description:
|
|
332
|
+
"Deprecated: please use 'webSocketServer.type'/'--web-socket-server-type' option.",
|
|
302
333
|
multiple: false,
|
|
334
|
+
path: "webSocketServer",
|
|
335
|
+
type: "enum",
|
|
336
|
+
values: ["sockjs", "ws"],
|
|
337
|
+
},
|
|
338
|
+
{
|
|
303
339
|
description:
|
|
304
340
|
"Allows to set web socket server and options (by default 'ws').",
|
|
341
|
+
multiple: false,
|
|
305
342
|
path: "webSocketServer",
|
|
343
|
+
type: "string",
|
|
306
344
|
},
|
|
345
|
+
],
|
|
346
|
+
|
|
347
|
+
description:
|
|
348
|
+
"Deprecated: please use 'webSocketServer.type'/'--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').",
|
|
349
|
+
simpleType: "string",
|
|
350
|
+
multiple: false,
|
|
351
|
+
},
|
|
352
|
+
"web-socket-server-type": {
|
|
353
|
+
configs: [
|
|
307
354
|
{
|
|
308
|
-
|
|
355
|
+
description:
|
|
356
|
+
"Allows to set web socket server and options (by default 'ws').",
|
|
309
357
|
multiple: false,
|
|
358
|
+
path: "webSocketServer.type",
|
|
359
|
+
type: "enum",
|
|
360
|
+
values: ["sockjs", "ws"],
|
|
361
|
+
},
|
|
362
|
+
{
|
|
310
363
|
description:
|
|
311
364
|
"Allows to set web socket server and options (by default 'ws').",
|
|
312
|
-
|
|
365
|
+
multiple: false,
|
|
366
|
+
path: "webSocketServer.type",
|
|
367
|
+
type: "string",
|
|
313
368
|
},
|
|
314
369
|
],
|
|
370
|
+
|
|
315
371
|
description:
|
|
316
372
|
"Allows to set web socket server and options (by default 'ws').",
|
|
317
373
|
simpleType: "string",
|
|
@@ -392,11 +448,13 @@ module.exports = {
|
|
|
392
448
|
{
|
|
393
449
|
type: "boolean",
|
|
394
450
|
multiple: false,
|
|
395
|
-
description:
|
|
451
|
+
description:
|
|
452
|
+
"Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.",
|
|
396
453
|
path: "http2",
|
|
397
454
|
},
|
|
398
455
|
],
|
|
399
|
-
description:
|
|
456
|
+
description:
|
|
457
|
+
"Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.",
|
|
400
458
|
negatedDescription: "Does not serve over HTTP/2 using SPDY.",
|
|
401
459
|
simpleType: "boolean",
|
|
402
460
|
multiple: false,
|
|
@@ -407,12 +465,12 @@ module.exports = {
|
|
|
407
465
|
type: "boolean",
|
|
408
466
|
multiple: false,
|
|
409
467
|
description:
|
|
410
|
-
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
|
|
468
|
+
"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.",
|
|
411
469
|
path: "https",
|
|
412
470
|
},
|
|
413
471
|
],
|
|
414
472
|
description:
|
|
415
|
-
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
|
|
473
|
+
"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.",
|
|
416
474
|
negatedDescription:
|
|
417
475
|
"Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
|
|
418
476
|
simpleType: "boolean",
|
|
@@ -423,11 +481,13 @@ module.exports = {
|
|
|
423
481
|
{
|
|
424
482
|
type: "string",
|
|
425
483
|
multiple: false,
|
|
426
|
-
description:
|
|
484
|
+
description:
|
|
485
|
+
"Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option.",
|
|
427
486
|
path: "https.passphrase",
|
|
428
487
|
},
|
|
429
488
|
],
|
|
430
|
-
description:
|
|
489
|
+
description:
|
|
490
|
+
"Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option.",
|
|
431
491
|
simpleType: "string",
|
|
432
492
|
multiple: false,
|
|
433
493
|
},
|
|
@@ -436,11 +496,13 @@ module.exports = {
|
|
|
436
496
|
{
|
|
437
497
|
type: "boolean",
|
|
438
498
|
multiple: false,
|
|
439
|
-
description:
|
|
499
|
+
description:
|
|
500
|
+
"Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option.",
|
|
440
501
|
path: "https.requestCert",
|
|
441
502
|
},
|
|
442
503
|
],
|
|
443
|
-
description:
|
|
504
|
+
description:
|
|
505
|
+
"Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option.",
|
|
444
506
|
negatedDescription: "Does not request for an SSL certificate.",
|
|
445
507
|
simpleType: "boolean",
|
|
446
508
|
multiple: false,
|
|
@@ -451,12 +513,12 @@ module.exports = {
|
|
|
451
513
|
type: "string",
|
|
452
514
|
multiple: true,
|
|
453
515
|
description:
|
|
454
|
-
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
516
|
+
"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.",
|
|
455
517
|
path: "https.ca[]",
|
|
456
518
|
},
|
|
457
519
|
],
|
|
458
520
|
description:
|
|
459
|
-
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
521
|
+
"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.",
|
|
460
522
|
simpleType: "string",
|
|
461
523
|
multiple: true,
|
|
462
524
|
},
|
|
@@ -464,14 +526,14 @@ module.exports = {
|
|
|
464
526
|
configs: [
|
|
465
527
|
{
|
|
466
528
|
description:
|
|
467
|
-
"Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
529
|
+
"Clear all items provided in 'https.ca' configuration. 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.",
|
|
468
530
|
multiple: false,
|
|
469
531
|
path: "https.ca",
|
|
470
532
|
type: "reset",
|
|
471
533
|
},
|
|
472
534
|
],
|
|
473
535
|
description:
|
|
474
|
-
"Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
536
|
+
"Clear all items provided in 'https.ca' configuration. 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.",
|
|
475
537
|
multiple: false,
|
|
476
538
|
simpleType: "boolean",
|
|
477
539
|
},
|
|
@@ -481,12 +543,12 @@ module.exports = {
|
|
|
481
543
|
type: "string",
|
|
482
544
|
multiple: true,
|
|
483
545
|
description:
|
|
484
|
-
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
546
|
+
"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.",
|
|
485
547
|
path: "https.cacert[]",
|
|
486
548
|
},
|
|
487
549
|
],
|
|
488
550
|
description:
|
|
489
|
-
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
551
|
+
"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.",
|
|
490
552
|
simpleType: "string",
|
|
491
553
|
multiple: true,
|
|
492
554
|
},
|
|
@@ -494,14 +556,14 @@ module.exports = {
|
|
|
494
556
|
configs: [
|
|
495
557
|
{
|
|
496
558
|
description:
|
|
497
|
-
"Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
559
|
+
"Clear all items provided in 'https.cacert' configuration. 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.",
|
|
498
560
|
multiple: false,
|
|
499
561
|
path: "https.cacert",
|
|
500
562
|
type: "reset",
|
|
501
563
|
},
|
|
502
564
|
],
|
|
503
565
|
description:
|
|
504
|
-
"Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
566
|
+
"Clear all items provided in 'https.cacert' configuration. 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.",
|
|
505
567
|
multiple: false,
|
|
506
568
|
simpleType: "boolean",
|
|
507
569
|
},
|
|
@@ -510,11 +572,13 @@ module.exports = {
|
|
|
510
572
|
{
|
|
511
573
|
type: "string",
|
|
512
574
|
multiple: true,
|
|
513
|
-
description:
|
|
575
|
+
description:
|
|
576
|
+
"Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` option.",
|
|
514
577
|
path: "https.key[]",
|
|
515
578
|
},
|
|
516
579
|
],
|
|
517
|
-
description:
|
|
580
|
+
description:
|
|
581
|
+
"Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` option.",
|
|
518
582
|
simpleType: "string",
|
|
519
583
|
multiple: true,
|
|
520
584
|
},
|
|
@@ -522,14 +586,14 @@ module.exports = {
|
|
|
522
586
|
configs: [
|
|
523
587
|
{
|
|
524
588
|
description:
|
|
525
|
-
"Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key.",
|
|
589
|
+
"Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` option.",
|
|
526
590
|
multiple: false,
|
|
527
591
|
path: "https.key",
|
|
528
592
|
type: "reset",
|
|
529
593
|
},
|
|
530
594
|
],
|
|
531
595
|
description:
|
|
532
|
-
"Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key.",
|
|
596
|
+
"Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` option.",
|
|
533
597
|
multiple: false,
|
|
534
598
|
simpleType: "boolean",
|
|
535
599
|
},
|
|
@@ -538,11 +602,13 @@ module.exports = {
|
|
|
538
602
|
{
|
|
539
603
|
type: "string",
|
|
540
604
|
multiple: true,
|
|
541
|
-
description:
|
|
605
|
+
description:
|
|
606
|
+
"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.",
|
|
542
607
|
path: "https.pfx[]",
|
|
543
608
|
},
|
|
544
609
|
],
|
|
545
|
-
description:
|
|
610
|
+
description:
|
|
611
|
+
"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.",
|
|
546
612
|
simpleType: "string",
|
|
547
613
|
multiple: true,
|
|
548
614
|
},
|
|
@@ -550,14 +616,14 @@ module.exports = {
|
|
|
550
616
|
configs: [
|
|
551
617
|
{
|
|
552
618
|
description:
|
|
553
|
-
"Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.",
|
|
619
|
+
"Clear all items provided in 'https.pfx' configuration. 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.",
|
|
554
620
|
multiple: false,
|
|
555
621
|
path: "https.pfx",
|
|
556
622
|
type: "reset",
|
|
557
623
|
},
|
|
558
624
|
],
|
|
559
625
|
description:
|
|
560
|
-
"Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.",
|
|
626
|
+
"Clear all items provided in 'https.pfx' configuration. 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.",
|
|
561
627
|
multiple: false,
|
|
562
628
|
simpleType: "boolean",
|
|
563
629
|
},
|
|
@@ -567,11 +633,12 @@ module.exports = {
|
|
|
567
633
|
type: "string",
|
|
568
634
|
multiple: true,
|
|
569
635
|
description:
|
|
570
|
-
"Path to an SSL certificate or content of an SSL certificate.",
|
|
636
|
+
"Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option.",
|
|
571
637
|
path: "https.cert[]",
|
|
572
638
|
},
|
|
573
639
|
],
|
|
574
|
-
description:
|
|
640
|
+
description:
|
|
641
|
+
"Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option.",
|
|
575
642
|
simpleType: "string",
|
|
576
643
|
multiple: true,
|
|
577
644
|
},
|
|
@@ -579,14 +646,14 @@ module.exports = {
|
|
|
579
646
|
configs: [
|
|
580
647
|
{
|
|
581
648
|
description:
|
|
582
|
-
"Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate.",
|
|
649
|
+
"Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option.",
|
|
583
650
|
multiple: false,
|
|
584
651
|
path: "https.cert",
|
|
585
652
|
type: "reset",
|
|
586
653
|
},
|
|
587
654
|
],
|
|
588
655
|
description:
|
|
589
|
-
"Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate.",
|
|
656
|
+
"Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option.",
|
|
590
657
|
multiple: false,
|
|
591
658
|
simpleType: "boolean",
|
|
592
659
|
},
|
|
@@ -594,14 +661,14 @@ module.exports = {
|
|
|
594
661
|
configs: [
|
|
595
662
|
{
|
|
596
663
|
description:
|
|
597
|
-
"Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
664
|
+
"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.",
|
|
598
665
|
multiple: true,
|
|
599
666
|
path: "https.crl[]",
|
|
600
667
|
type: "string",
|
|
601
668
|
},
|
|
602
669
|
],
|
|
603
670
|
description:
|
|
604
|
-
"Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
671
|
+
"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.",
|
|
605
672
|
multiple: true,
|
|
606
673
|
simpleType: "string",
|
|
607
674
|
},
|
|
@@ -609,14 +676,14 @@ module.exports = {
|
|
|
609
676
|
configs: [
|
|
610
677
|
{
|
|
611
678
|
description:
|
|
612
|
-
"Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
679
|
+
"Clear all items provided in 'https.crl' configuration. 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.",
|
|
613
680
|
multiple: false,
|
|
614
681
|
path: "https.crl",
|
|
615
682
|
type: "reset",
|
|
616
683
|
},
|
|
617
684
|
],
|
|
618
685
|
description:
|
|
619
|
-
"Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
686
|
+
"Clear all items provided in 'https.crl' configuration. 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.",
|
|
620
687
|
multiple: false,
|
|
621
688
|
simpleType: "boolean",
|
|
622
689
|
},
|
|
@@ -820,6 +887,221 @@ module.exports = {
|
|
|
820
887
|
simpleType: "string",
|
|
821
888
|
multiple: false,
|
|
822
889
|
},
|
|
890
|
+
"server-options-ca": {
|
|
891
|
+
configs: [
|
|
892
|
+
{
|
|
893
|
+
description:
|
|
894
|
+
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
895
|
+
multiple: true,
|
|
896
|
+
path: "server.options.ca[]",
|
|
897
|
+
type: "string",
|
|
898
|
+
},
|
|
899
|
+
],
|
|
900
|
+
description:
|
|
901
|
+
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
902
|
+
multiple: true,
|
|
903
|
+
simpleType: "string",
|
|
904
|
+
},
|
|
905
|
+
"server-options-ca-reset": {
|
|
906
|
+
configs: [
|
|
907
|
+
{
|
|
908
|
+
description:
|
|
909
|
+
"Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
910
|
+
multiple: false,
|
|
911
|
+
path: "server.options.ca",
|
|
912
|
+
type: "reset",
|
|
913
|
+
},
|
|
914
|
+
],
|
|
915
|
+
description:
|
|
916
|
+
"Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
917
|
+
multiple: false,
|
|
918
|
+
simpleType: "boolean",
|
|
919
|
+
},
|
|
920
|
+
"server-options-cacert": {
|
|
921
|
+
configs: [
|
|
922
|
+
{
|
|
923
|
+
description:
|
|
924
|
+
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
925
|
+
multiple: true,
|
|
926
|
+
path: "server.options.cacert[]",
|
|
927
|
+
type: "string",
|
|
928
|
+
},
|
|
929
|
+
],
|
|
930
|
+
description:
|
|
931
|
+
"Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
932
|
+
multiple: true,
|
|
933
|
+
simpleType: "string",
|
|
934
|
+
},
|
|
935
|
+
"server-options-cacert-reset": {
|
|
936
|
+
configs: [
|
|
937
|
+
{
|
|
938
|
+
description:
|
|
939
|
+
"Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
940
|
+
multiple: false,
|
|
941
|
+
path: "server.options.cacert",
|
|
942
|
+
type: "reset",
|
|
943
|
+
},
|
|
944
|
+
],
|
|
945
|
+
description:
|
|
946
|
+
"Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
|
|
947
|
+
multiple: false,
|
|
948
|
+
simpleType: "boolean",
|
|
949
|
+
},
|
|
950
|
+
"server-options-cert": {
|
|
951
|
+
configs: [
|
|
952
|
+
{
|
|
953
|
+
description:
|
|
954
|
+
"Path to an SSL certificate or content of an SSL certificate.",
|
|
955
|
+
multiple: true,
|
|
956
|
+
path: "server.options.cert[]",
|
|
957
|
+
type: "string",
|
|
958
|
+
},
|
|
959
|
+
],
|
|
960
|
+
description: "Path to an SSL certificate or content of an SSL certificate.",
|
|
961
|
+
multiple: true,
|
|
962
|
+
simpleType: "string",
|
|
963
|
+
},
|
|
964
|
+
"server-options-cert-reset": {
|
|
965
|
+
configs: [
|
|
966
|
+
{
|
|
967
|
+
description:
|
|
968
|
+
"Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.",
|
|
969
|
+
multiple: false,
|
|
970
|
+
path: "server.options.cert",
|
|
971
|
+
type: "reset",
|
|
972
|
+
},
|
|
973
|
+
],
|
|
974
|
+
description:
|
|
975
|
+
"Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.",
|
|
976
|
+
multiple: false,
|
|
977
|
+
simpleType: "boolean",
|
|
978
|
+
},
|
|
979
|
+
"server-options-crl": {
|
|
980
|
+
configs: [
|
|
981
|
+
{
|
|
982
|
+
description:
|
|
983
|
+
"Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
984
|
+
multiple: true,
|
|
985
|
+
path: "server.options.crl[]",
|
|
986
|
+
type: "string",
|
|
987
|
+
},
|
|
988
|
+
],
|
|
989
|
+
description:
|
|
990
|
+
"Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
991
|
+
multiple: true,
|
|
992
|
+
simpleType: "string",
|
|
993
|
+
},
|
|
994
|
+
"server-options-crl-reset": {
|
|
995
|
+
configs: [
|
|
996
|
+
{
|
|
997
|
+
description:
|
|
998
|
+
"Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
999
|
+
multiple: false,
|
|
1000
|
+
path: "server.options.crl",
|
|
1001
|
+
type: "reset",
|
|
1002
|
+
},
|
|
1003
|
+
],
|
|
1004
|
+
description:
|
|
1005
|
+
"Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
|
|
1006
|
+
multiple: false,
|
|
1007
|
+
simpleType: "boolean",
|
|
1008
|
+
},
|
|
1009
|
+
"server-options-key": {
|
|
1010
|
+
configs: [
|
|
1011
|
+
{
|
|
1012
|
+
description: "Path to an SSL key or content of an SSL key.",
|
|
1013
|
+
multiple: true,
|
|
1014
|
+
path: "server.options.key[]",
|
|
1015
|
+
type: "string",
|
|
1016
|
+
},
|
|
1017
|
+
],
|
|
1018
|
+
description: "Path to an SSL key or content of an SSL key.",
|
|
1019
|
+
multiple: true,
|
|
1020
|
+
simpleType: "string",
|
|
1021
|
+
},
|
|
1022
|
+
"server-options-key-reset": {
|
|
1023
|
+
configs: [
|
|
1024
|
+
{
|
|
1025
|
+
description:
|
|
1026
|
+
"Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key.",
|
|
1027
|
+
multiple: false,
|
|
1028
|
+
path: "server.options.key",
|
|
1029
|
+
type: "reset",
|
|
1030
|
+
},
|
|
1031
|
+
],
|
|
1032
|
+
description:
|
|
1033
|
+
"Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key.",
|
|
1034
|
+
multiple: false,
|
|
1035
|
+
simpleType: "boolean",
|
|
1036
|
+
},
|
|
1037
|
+
"server-options-passphrase": {
|
|
1038
|
+
configs: [
|
|
1039
|
+
{
|
|
1040
|
+
description: "Passphrase for a pfx file.",
|
|
1041
|
+
multiple: false,
|
|
1042
|
+
path: "server.options.passphrase",
|
|
1043
|
+
type: "string",
|
|
1044
|
+
},
|
|
1045
|
+
],
|
|
1046
|
+
description: "Passphrase for a pfx file.",
|
|
1047
|
+
multiple: false,
|
|
1048
|
+
simpleType: "string",
|
|
1049
|
+
},
|
|
1050
|
+
"server-options-pfx": {
|
|
1051
|
+
configs: [
|
|
1052
|
+
{
|
|
1053
|
+
description: "Path to an SSL pfx file or content of an SSL pfx file.",
|
|
1054
|
+
multiple: true,
|
|
1055
|
+
path: "server.options.pfx[]",
|
|
1056
|
+
type: "string",
|
|
1057
|
+
},
|
|
1058
|
+
],
|
|
1059
|
+
description: "Path to an SSL pfx file or content of an SSL pfx file.",
|
|
1060
|
+
multiple: true,
|
|
1061
|
+
simpleType: "string",
|
|
1062
|
+
},
|
|
1063
|
+
"server-options-pfx-reset": {
|
|
1064
|
+
configs: [
|
|
1065
|
+
{
|
|
1066
|
+
description:
|
|
1067
|
+
"Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.",
|
|
1068
|
+
multiple: false,
|
|
1069
|
+
path: "server.options.pfx",
|
|
1070
|
+
type: "reset",
|
|
1071
|
+
},
|
|
1072
|
+
],
|
|
1073
|
+
description:
|
|
1074
|
+
"Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.",
|
|
1075
|
+
multiple: false,
|
|
1076
|
+
simpleType: "boolean",
|
|
1077
|
+
},
|
|
1078
|
+
"server-options-request-cert": {
|
|
1079
|
+
configs: [
|
|
1080
|
+
{
|
|
1081
|
+
description: "Request for an SSL certificate.",
|
|
1082
|
+
multiple: false,
|
|
1083
|
+
path: "server.options.requestCert",
|
|
1084
|
+
type: "boolean",
|
|
1085
|
+
},
|
|
1086
|
+
],
|
|
1087
|
+
description: "Request for an SSL certificate.",
|
|
1088
|
+
multiple: false,
|
|
1089
|
+
simpleType: "boolean",
|
|
1090
|
+
},
|
|
1091
|
+
"server-type": {
|
|
1092
|
+
configs: [
|
|
1093
|
+
{
|
|
1094
|
+
description: "Allows to set server and options (by default 'http').",
|
|
1095
|
+
multiple: false,
|
|
1096
|
+
path: "server.type",
|
|
1097
|
+
type: "enum",
|
|
1098
|
+
values: ["http", "https", "spdy"],
|
|
1099
|
+
},
|
|
1100
|
+
],
|
|
1101
|
+
description: "Allows to set server and options (by default 'http').",
|
|
1102
|
+
multiple: false,
|
|
1103
|
+
simpleType: "string",
|
|
1104
|
+
},
|
|
823
1105
|
static: {
|
|
824
1106
|
configs: [
|
|
825
1107
|
{
|
package/client/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import webpackHotLog from "webpack/hot/log.js";
|
|
|
3
3
|
import stripAnsi from "./modules/strip-ansi/index.js";
|
|
4
4
|
import parseURL from "./utils/parseURL.js";
|
|
5
5
|
import socket from "./socket.js";
|
|
6
|
-
import { show, hide } from "./overlay.js";
|
|
6
|
+
import { formatProblem, show, hide } from "./overlay.js";
|
|
7
7
|
import { log, setLogLevel } from "./utils/log.js";
|
|
8
8
|
import sendMessage from "./utils/sendMessage.js";
|
|
9
9
|
import reloadApp from "./utils/reloadApp.js";
|
|
@@ -13,8 +13,7 @@ var status = {
|
|
|
13
13
|
// TODO Workaround for webpack v4, `__webpack_hash__` is not replaced without HotModuleReplacement
|
|
14
14
|
// eslint-disable-next-line camelcase
|
|
15
15
|
currentHash: typeof __webpack_hash__ !== "undefined" ? __webpack_hash__ : ""
|
|
16
|
-
};
|
|
17
|
-
|
|
16
|
+
};
|
|
18
17
|
var options = {
|
|
19
18
|
hot: false,
|
|
20
19
|
liveReload: false,
|
|
@@ -37,6 +36,10 @@ if (parsedResourceQuery.logging) {
|
|
|
37
36
|
options.logging = parsedResourceQuery.logging;
|
|
38
37
|
}
|
|
39
38
|
|
|
39
|
+
if (typeof parsedResourceQuery.reconnect !== "undefined") {
|
|
40
|
+
options.reconnect = Number(parsedResourceQuery.reconnect);
|
|
41
|
+
}
|
|
42
|
+
|
|
40
43
|
function setAllLogLevel(level) {
|
|
41
44
|
// This is needed because the HMR logger operate separately from dev server logger
|
|
42
45
|
webpackHotLog.setLogLevel(level === "verbose" || level === "log" ? "info" : level);
|
|
@@ -88,6 +91,13 @@ var onSocketMessage = {
|
|
|
88
91
|
|
|
89
92
|
options.overlay = value;
|
|
90
93
|
},
|
|
94
|
+
reconnect: function reconnect(value) {
|
|
95
|
+
if (parsedResourceQuery.reconnect === "false") {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
options.reconnect = value;
|
|
100
|
+
},
|
|
91
101
|
progress: function progress(_progress) {
|
|
92
102
|
options.progress = _progress;
|
|
93
103
|
},
|
|
@@ -128,41 +138,47 @@ var onSocketMessage = {
|
|
|
128
138
|
warnings: function warnings(_warnings) {
|
|
129
139
|
log.warn("Warnings while compiling.");
|
|
130
140
|
|
|
131
|
-
var
|
|
132
|
-
|
|
141
|
+
var printableWarnings = _warnings.map(function (error) {
|
|
142
|
+
var _formatProblem = formatProblem("warning", error),
|
|
143
|
+
header = _formatProblem.header,
|
|
144
|
+
body = _formatProblem.body;
|
|
145
|
+
|
|
146
|
+
return "".concat(header, "\n").concat(stripAnsi(body));
|
|
133
147
|
});
|
|
134
148
|
|
|
135
|
-
sendMessage("Warnings",
|
|
149
|
+
sendMessage("Warnings", printableWarnings);
|
|
136
150
|
|
|
137
|
-
for (var i = 0; i <
|
|
138
|
-
log.warn(
|
|
151
|
+
for (var i = 0; i < printableWarnings.length; i++) {
|
|
152
|
+
log.warn(printableWarnings[i]);
|
|
139
153
|
}
|
|
140
154
|
|
|
141
155
|
var needShowOverlayForWarnings = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.warnings;
|
|
142
156
|
|
|
143
157
|
if (needShowOverlayForWarnings) {
|
|
144
|
-
show(
|
|
158
|
+
show("warning", _warnings);
|
|
145
159
|
}
|
|
146
|
-
|
|
147
|
-
reloadApp(options, status);
|
|
148
160
|
},
|
|
149
161
|
errors: function errors(_errors) {
|
|
150
162
|
log.error("Errors while compiling. Reload prevented.");
|
|
151
163
|
|
|
152
|
-
var
|
|
153
|
-
|
|
164
|
+
var printableErrors = _errors.map(function (error) {
|
|
165
|
+
var _formatProblem2 = formatProblem("error", error),
|
|
166
|
+
header = _formatProblem2.header,
|
|
167
|
+
body = _formatProblem2.body;
|
|
168
|
+
|
|
169
|
+
return "".concat(header, "\n").concat(stripAnsi(body));
|
|
154
170
|
});
|
|
155
171
|
|
|
156
|
-
sendMessage("Errors",
|
|
172
|
+
sendMessage("Errors", printableErrors);
|
|
157
173
|
|
|
158
|
-
for (var i = 0; i <
|
|
159
|
-
log.error(
|
|
174
|
+
for (var i = 0; i < printableErrors.length; i++) {
|
|
175
|
+
log.error(printableErrors[i]);
|
|
160
176
|
}
|
|
161
177
|
|
|
162
178
|
var needShowOverlayForErrors = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.errors;
|
|
163
179
|
|
|
164
180
|
if (needShowOverlayForErrors) {
|
|
165
|
-
show(
|
|
181
|
+
show("error", _errors);
|
|
166
182
|
}
|
|
167
183
|
},
|
|
168
184
|
error: function error(_error) {
|
|
@@ -179,4 +195,4 @@ var onSocketMessage = {
|
|
|
179
195
|
}
|
|
180
196
|
};
|
|
181
197
|
var socketURL = createSocketURL(parsedResourceQuery);
|
|
182
|
-
socket(socketURL, onSocketMessage);
|
|
198
|
+
socket(socketURL, onSocketMessage, options.reconnect);
|