From 76aa77a5201bbb3a7632bb5666794ddf32ff4e08 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 15 Oct 2021 17:20:12 +0530 Subject: [PATCH] refactor: cli options --- README.md | 42 +- bin/cli-flags.js | 65 ++- lib/options.json | 479 ++++++++++++------ .../__snapshots__/basic.test.js.snap.webpack4 | 26 +- .../__snapshots__/basic.test.js.snap.webpack5 | 28 +- 5 files changed, 413 insertions(+), 227 deletions(-) diff --git a/README.md b/README.md index 2baf9647d2..af2eafba6d 100644 --- a/README.md +++ b/README.md @@ -121,21 +121,35 @@ Options: --no-http2 Does not serve over HTTP/2 using SPDY. --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). - --https-passphrase Passphrase for a pfx file. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Does not request for an SSL certificate. - --https-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --https-ca-reset Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --https-cacert Path to an SSL CA certificate or content of an SSL CA certificate. - --https-cacert-reset Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --https-key Path to an SSL key or content of an SSL key. - --https-key-reset Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. - --https-pfx Path to an SSL pfx file or content of an SSL pfx file. + --https-passphrase Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option. + --https-request-cert Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` + option. + --no-https-request-cert Negative 'https-request-cert' option. + --https-ca 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. + --https-ca-reset 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. + --https-cacert 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. + --https-cacert-reset 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. + --https-cert Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the + `server.options.cert` option. + --https-cert-reset 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. + --https-crl 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. + --https-crl-reset 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. + --https-key Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` + option. + --https-key-reset 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. + --https-pfx 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. --https-pfx-reset Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --https-cert Path to an SSL certificate or content of an SSL certificate. - --https-cert-reset Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --https-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --https-crl-reset 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.pfx` option. --ipc [value] Listen to a unix socket. --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default) diff --git a/bin/cli-flags.js b/bin/cli-flags.js index 329f2098bc..9e71ca3bbd 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -455,11 +455,13 @@ module.exports = { { type: "string", multiple: false, - description: "Passphrase for a pfx file.", + description: + "Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option.", path: "https.passphrase", }, ], - description: "Passphrase for a pfx file.", + description: + "Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option.", simpleType: "string", multiple: false, }, @@ -468,11 +470,13 @@ module.exports = { { type: "boolean", multiple: false, - description: "Request for an SSL certificate.", + description: + "Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option.", path: "https.requestCert", }, ], - description: "Request for an SSL certificate.", + description: + "Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option.", negatedDescription: "Does not request for an SSL certificate.", simpleType: "boolean", multiple: false, @@ -483,12 +487,12 @@ module.exports = { type: "string", multiple: true, description: - "Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", path: "https.ca[]", }, ], description: - "Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", simpleType: "string", multiple: true, }, @@ -496,14 +500,14 @@ module.exports = { configs: [ { description: - "Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", multiple: false, path: "https.ca", type: "reset", }, ], description: - "Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", multiple: false, simpleType: "boolean", }, @@ -513,12 +517,12 @@ module.exports = { type: "string", multiple: true, description: - "Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", path: "https.cacert[]", }, ], description: - "Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", simpleType: "string", multiple: true, }, @@ -526,14 +530,14 @@ module.exports = { configs: [ { description: - "Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", multiple: false, path: "https.cacert", type: "reset", }, ], description: - "Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.", + "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.", multiple: false, simpleType: "boolean", }, @@ -542,11 +546,13 @@ module.exports = { { type: "string", multiple: true, - description: "Path to an SSL key or content of an SSL key.", + 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.", path: "https.key[]", }, ], - description: "Path to an SSL key or content of an SSL key.", + 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.", simpleType: "string", multiple: true, }, @@ -554,14 +560,14 @@ module.exports = { configs: [ { description: - "Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key.", + "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.", multiple: false, path: "https.key", type: "reset", }, ], description: - "Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key.", + "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.", multiple: false, simpleType: "boolean", }, @@ -570,11 +576,13 @@ module.exports = { { type: "string", multiple: true, - description: "Path to an SSL pfx file or content of an SSL pfx file.", + 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.", path: "https.pfx[]", }, ], - description: "Path to an SSL pfx file or content of an SSL pfx file.", + 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.", simpleType: "string", multiple: true, }, @@ -582,14 +590,14 @@ module.exports = { configs: [ { description: - "Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.", + "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.", multiple: false, path: "https.pfx", type: "reset", }, ], description: - "Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.", + "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.", multiple: false, simpleType: "boolean", }, @@ -599,11 +607,12 @@ module.exports = { type: "string", multiple: true, description: - "Path to an SSL certificate or content of an SSL certificate.", + "Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option.", path: "https.cert[]", }, ], - description: "Path to an SSL certificate or content of an SSL certificate.", + 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.", simpleType: "string", multiple: true, }, @@ -611,14 +620,14 @@ module.exports = { configs: [ { description: - "Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate.", + "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.", multiple: false, path: "https.cert", type: "reset", }, ], description: - "Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate.", + "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.", multiple: false, simpleType: "boolean", }, @@ -626,14 +635,14 @@ module.exports = { configs: [ { description: - "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).", + "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.", multiple: true, path: "https.crl[]", type: "string", }, ], description: - "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).", + "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.", multiple: true, simpleType: "string", }, @@ -641,14 +650,14 @@ module.exports = { configs: [ { description: - "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).", + "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.", multiple: false, path: "https.crl", type: "reset", }, ], description: - "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).", + "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.", multiple: false, simpleType: "boolean", }, diff --git a/lib/options.json b/lib/options.json index 04ea997210..0947c09227 100644 --- a/lib/options.json +++ b/lib/options.json @@ -216,177 +216,174 @@ "type": "boolean" }, { - "$ref": "#/definitions/HTTPSObject" - } - ], - "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).", - "link": "https://webpack.js.org/configuration/dev-server/#devserverhttps" - }, - "HTTPSObject": { - "type": "object", - "additionalProperties": true, - "properties": { - "passphrase": { - "type": "string", - "description": "Passphrase for a pfx file." - }, - "requestCert": { - "type": "boolean", - "description": "Request for an SSL certificate." - }, - "ca": { - "anyOf": [ - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "instanceof": "Buffer" - } - ] - } + "type": "object", + "additionalProperties": true, + "properties": { + "passphrase": { + "type": "string", + "description": "Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option." }, - { - "type": "string" + "requestCert": { + "type": "boolean", + "description": "Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option." }, - { - "instanceof": "Buffer" - } - ], - "description": "Path to an SSL CA certificate or content of an SSL CA certificate." - }, - "cacert": { - "anyOf": [ - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "instanceof": "Buffer" + "ca": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] } - ] - } - }, - { - "type": "string" + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "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." }, - { - "instanceof": "Buffer" - } - ], - "description": "Path to an SSL CA certificate or content of an SSL CA certificate." - }, - "cert": { - "anyOf": [ - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "instanceof": "Buffer" + "cacert": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] } - ] - } - }, - { - "type": "string" + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "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." }, - { - "instanceof": "Buffer" - } - ], - "description": "Path to an SSL certificate or content of an SSL certificate." - }, - "crl": { - "anyOf": [ - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "instanceof": "Buffer" + "cert": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] } - ] - } - }, - { - "type": "string" + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "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." }, - { - "instanceof": "Buffer" - } - ], - "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists)." - }, - "key": { - "anyOf": [ - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "instanceof": "Buffer" - }, - { - "type": "object", - "additionalProperties": true + "crl": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] } - ] - } - }, - { - "type": "string" + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "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." }, - { - "instanceof": "Buffer" - } - ], - "description": "Path to an SSL key or content of an SSL key." - }, - "pfx": { - "anyOf": [ - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "instanceof": "Buffer" - }, - { - "type": "object", - "additionalProperties": true + "key": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + }, + { + "type": "object", + "additionalProperties": true + } + ] } - ] - } - }, - { - "type": "string" + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "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." }, - { - "instanceof": "Buffer" + "pfx": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + }, + { + "type": "object", + "additionalProperties": true + } + ] + } + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "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." } - ], - "description": "Path to an SSL pfx file or content of an SSL pfx file." + } } - } + ], + "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).", + "link": "https://webpack.js.org/configuration/dev-server/#devserverhttps" }, "HeaderObject": { "type": "object", @@ -656,11 +653,177 @@ "$ref": "#/definitions/ServerType" }, "options": { - "$ref": "#/definitions/HTTPSObject" + "$ref": "#/definitions/ServerOptions" } }, "additionalProperties": false }, + "ServerOptions": { + "type": "object", + "additionalProperties": true, + "properties": { + "passphrase": { + "type": "string", + "description": "Passphrase for a pfx file." + }, + "requestCert": { + "type": "boolean", + "description": "Request for an SSL certificate." + }, + "ca": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] + } + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "description": "Path to an SSL CA certificate or content of an SSL CA certificate." + }, + "cacert": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] + } + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "description": "Path to an SSL CA certificate or content of an SSL CA certificate." + }, + "cert": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] + } + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "description": "Path to an SSL certificate or content of an SSL certificate." + }, + "crl": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ] + } + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists)." + }, + "key": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + }, + { + "type": "object", + "additionalProperties": true + } + ] + } + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "description": "Path to an SSL key or content of an SSL key." + }, + "pfx": { + "anyOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "instanceof": "Buffer" + }, + { + "type": "object", + "additionalProperties": true + } + ] + } + }, + { + "type": "string" + }, + { + "instanceof": "Buffer" + } + ], + "description": "Path to an SSL pfx file or content of an SSL pfx file." + } + } + }, "SetupExitSignals": { "type": "boolean", "description": "Allows to close dev server and exit the process on SIGINT and SIGTERM signals (enabled by default for CLI).", diff --git a/test/cli/__snapshots__/basic.test.js.snap.webpack4 b/test/cli/__snapshots__/basic.test.js.snap.webpack4 index a921b0ec49..13eccd0d9a 100644 --- a/test/cli/__snapshots__/basic.test.js.snap.webpack4 +++ b/test/cli/__snapshots__/basic.test.js.snap.webpack4 @@ -92,20 +92,20 @@ Options: --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --https-passphrase Passphrase for a pfx file. - --https-request-cert Request for an SSL certificate. + --https-request-cert Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option. --no-https-request-cert Does not request for an SSL certificate. - --https-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --https-ca-reset Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --https-cacert Path to an SSL CA certificate or content of an SSL CA certificate. - --https-cacert-reset Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --https-key Path to an SSL key or content of an SSL key. - --https-key-reset Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. - --https-pfx Path to an SSL pfx file or content of an SSL pfx file. - --https-pfx-reset Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --https-cert Path to an SSL certificate or content of an SSL certificate. - --https-cert-reset Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --https-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --https-crl-reset 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). + --https-ca 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. + --https-ca-reset 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. + --https-cacert 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. + --https-cacert-reset 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. + --https-key Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` option. + --https-key-reset 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. + --https-pfx 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. + --https-pfx-reset 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. + --https-cert Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option. + --https-cert-reset 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. + --https-crl 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. + --https-crl-reset 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. --ipc [value] Listen to a unix socket. --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default) diff --git a/test/cli/__snapshots__/basic.test.js.snap.webpack5 b/test/cli/__snapshots__/basic.test.js.snap.webpack5 index 1a5705792a..c3e5fd7b74 100644 --- a/test/cli/__snapshots__/basic.test.js.snap.webpack5 +++ b/test/cli/__snapshots__/basic.test.js.snap.webpack5 @@ -90,21 +90,21 @@ Options: --no-http2 Negative 'http2' option. --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --no-https Negative 'https' option. - --https-passphrase Passphrase for a pfx file. - --https-request-cert Request for an SSL certificate. + --https-passphrase Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option. + --https-request-cert Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert` option. --no-https-request-cert Negative 'https-request-cert' option. - --https-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --https-ca-reset Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --https-cacert Path to an SSL CA certificate or content of an SSL CA certificate. - --https-cacert-reset Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --https-cert Path to an SSL certificate or content of an SSL certificate. - --https-cert-reset Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --https-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --https-crl-reset 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). - --https-key Path to an SSL key or content of an SSL key. - --https-key-reset Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. - --https-pfx Path to an SSL pfx file or content of an SSL pfx file. - --https-pfx-reset Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. + --https-ca 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. + --https-ca-reset 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. + --https-cacert 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. + --https-cacert-reset 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. + --https-cert Path to an SSL certificate or content of an SSL certificate. Deprecated, it will be removed in favor of the `server.options.cert` option. + --https-cert-reset 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. + --https-crl 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. + --https-crl-reset 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. + --https-key Path to an SSL key or content of an SSL key. Deprecated, it will be removed in favor of the `server.options.key` option. + --https-key-reset 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. + --https-pfx 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. + --https-pfx-reset 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. --ipc [value] Listen to a unix socket. --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). --no-live-reload Negative 'live-reload' option.