Skip to content

Commit

Permalink
fix: add more negative decriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Feb 16, 2022
1 parent d9d981f commit 6ba09fc
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 124 deletions.
4 changes: 4 additions & 0 deletions bin/cli-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ module.exports = {
configs: [
{
description: "Request for an SSL certificate.",
negatedDescription: "Does not request for an SSL certificate.",
multiple: false,
path: "server.options.requestCert",
type: "boolean",
Expand Down Expand Up @@ -1067,6 +1068,8 @@ module.exports = {
multiple: false,
description:
"Allows to configure options for serving static files from directory (by default 'public' directory).",
negatedDescription:
"Disallows to configure options for serving static files from directory.",
path: "static",
},
],
Expand Down Expand Up @@ -1206,6 +1209,7 @@ module.exports = {
{
description:
"Deprecated: please use '--web-socket-server-type' option.",
negatedDescription: "Disallows to set web socket server and options.",
multiple: false,
path: "webSocketServer",
type: "enum",
Expand Down
15 changes: 12 additions & 3 deletions lib/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,10 @@
},
"requestCert": {
"type": "boolean",
"description": "Request for an SSL certificate."
"description": "Request for an SSL certificate.",
"cli": {
"negatedDescription": "Does not request for an SSL certificate."
}
},
"ca": {
"anyOf": [
Expand Down Expand Up @@ -928,7 +931,10 @@
}
},
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Disallows to configure options for serving static files from directory."
}
},
{
"$ref": "#/definitions/StaticString"
Expand Down Expand Up @@ -1094,7 +1100,10 @@
"WebSocketServerEnum": {
"anyOf": [
{
"enum": [false]
"enum": [false],
"cli": {
"negatedDescription": "Disallows to set web socket server and options."
}
},
{
"$ref": "#/definitions/WebSocketServerType"
Expand Down
6 changes: 3 additions & 3 deletions test/cli/__snapshots__/basic.test.js.snap.webpack4
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ Options:
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
--server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.
--server-options-request-cert Request for an SSL certificate.
--no-server-options-request-cert Negative 'server-options-request-cert' option.
--no-server-options-request-cert Does not request for an SSL certificate.
--server-type <value> Allows to set server and options (by default 'http').
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
--no-static Negative 'static' option.
--no-static Disallows to configure options for serving static files from directory.
--static-directory <value...> Directory for static contents.
--static-public-path <value...> The static files will be available in the browser under this public path.
--static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path.
Expand All @@ -147,7 +147,7 @@ Options:
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
--no-web-socket-server Negative 'web-socket-server' option.
--no-web-socket-server Disallows to set web socket server and options.
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').

Global options:
Expand Down
6 changes: 3 additions & 3 deletions test/cli/__snapshots__/basic.test.js.snap.webpack5
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Options:
--server-type <value> Allows to set server and options (by default 'http').
--server-options-passphrase <value> Passphrase for a pfx file.
--server-options-request-cert Request for an SSL certificate.
--no-server-options-request-cert Negative 'server-options-request-cert' option.
--no-server-options-request-cert Does not request for an SSL certificate.
--server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
--server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.
--server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the \`server.options.ca\` option.
Expand All @@ -136,7 +136,7 @@ Options:
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
--server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
--no-static Negative 'static' option.
--no-static Disallows to configure options for serving static files from directory.
--static-directory <value...> Directory for static contents.
--static-public-path <value...> The static files will be available in the browser under this public path.
--static-serve-index Tells dev server to use serveIndex middleware when enabled.
Expand All @@ -148,7 +148,7 @@ Options:
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
--no-web-socket-server Negative 'web-socket-server' option.
--no-web-socket-server Disallows to set web socket server and options.
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').

Global options:
Expand Down
23 changes: 17 additions & 6 deletions types/bin/cli-flags.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ declare const _exports: {
"server-options-request-cert": {
configs: {
description: string;
negatedDescription: string;
multiple: boolean;
path: string;
type: string;
Expand All @@ -802,12 +803,21 @@ declare const _exports: {
simpleType: string;
};
static: {
configs: {
type: string;
multiple: boolean;
description: string;
path: string;
}[];
configs: (
| {
type: string;
multiple: boolean;
description: string;
path: string;
}
| {
type: string;
multiple: boolean;
description: string;
negatedDescription: string;
path: string;
}
)[];
description: string;
simpleType: string;
multiple: boolean;
Expand Down Expand Up @@ -906,6 +916,7 @@ declare const _exports: {
configs: (
| {
description: string;
negatedDescription: string;
multiple: boolean;
path: string;
type: string;
Expand Down
Loading

0 comments on commit 6ba09fc

Please # to comment.