Skip to content

Commit

Permalink
refactor: cli options
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Oct 15, 2021
1 parent 5420c9e commit 76aa77a
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 227 deletions.
42 changes: 28 additions & 14 deletions README.md
Expand Up @@ -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 <value> 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 <value...> 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 <value...> 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 <value...> 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 <value...> Path to an SSL pfx file or content of an SSL pfx file.
--https-passphrase <value> 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 <value...> 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 <value...> 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 <value...> 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 <value...> 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 <value...> 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 <value...> 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 <value...> 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 <value...> 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)
Expand Down
65 changes: 37 additions & 28 deletions bin/cli-flags.js
Expand Up @@ -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,
},
Expand All @@ -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,
Expand All @@ -483,27 +487,27 @@ 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,
},
"https-ca-reset": {
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",
},
Expand All @@ -513,27 +517,27 @@ 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,
},
"https-cacert-reset": {
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",
},
Expand All @@ -542,26 +546,28 @@ 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,
},
"https-key-reset": {
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",
},
Expand All @@ -570,26 +576,28 @@ 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,
},
"https-pfx-reset": {
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",
},
Expand All @@ -599,56 +607,57 @@ 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,
},
"https-cert-reset": {
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",
},
"https-crl": {
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",
},
"https-crl-reset": {
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",
},
Expand Down

0 comments on commit 76aa77a

Please sign in to comment.