Skip to content

Commit 6ba09fc

Browse files
committed
fix: add more negative decriptions
1 parent d9d981f commit 6ba09fc

File tree

6 files changed

+153
-124
lines changed

6 files changed

+153
-124
lines changed

bin/cli-flags.js

+4
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,7 @@ module.exports = {
10301030
configs: [
10311031
{
10321032
description: "Request for an SSL certificate.",
1033+
negatedDescription: "Does not request for an SSL certificate.",
10331034
multiple: false,
10341035
path: "server.options.requestCert",
10351036
type: "boolean",
@@ -1067,6 +1068,8 @@ module.exports = {
10671068
multiple: false,
10681069
description:
10691070
"Allows to configure options for serving static files from directory (by default 'public' directory).",
1071+
negatedDescription:
1072+
"Disallows to configure options for serving static files from directory.",
10701073
path: "static",
10711074
},
10721075
],
@@ -1206,6 +1209,7 @@ module.exports = {
12061209
{
12071210
description:
12081211
"Deprecated: please use '--web-socket-server-type' option.",
1212+
negatedDescription: "Disallows to set web socket server and options.",
12091213
multiple: false,
12101214
path: "webSocketServer",
12111215
type: "enum",

lib/options.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,10 @@
743743
},
744744
"requestCert": {
745745
"type": "boolean",
746-
"description": "Request for an SSL certificate."
746+
"description": "Request for an SSL certificate.",
747+
"cli": {
748+
"negatedDescription": "Does not request for an SSL certificate."
749+
}
747750
},
748751
"ca": {
749752
"anyOf": [
@@ -928,7 +931,10 @@
928931
}
929932
},
930933
{
931-
"type": "boolean"
934+
"type": "boolean",
935+
"cli": {
936+
"negatedDescription": "Disallows to configure options for serving static files from directory."
937+
}
932938
},
933939
{
934940
"$ref": "#/definitions/StaticString"
@@ -1094,7 +1100,10 @@
10941100
"WebSocketServerEnum": {
10951101
"anyOf": [
10961102
{
1097-
"enum": [false]
1103+
"enum": [false],
1104+
"cli": {
1105+
"negatedDescription": "Disallows to set web socket server and options."
1106+
}
10981107
},
10991108
{
11001109
"$ref": "#/definitions/WebSocketServerType"

test/cli/__snapshots__/basic.test.js.snap.webpack4

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ Options:
132132
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
133133
--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.
134134
--server-options-request-cert Request for an SSL certificate.
135-
--no-server-options-request-cert Negative 'server-options-request-cert' option.
135+
--no-server-options-request-cert Does not request for an SSL certificate.
136136
--server-type <value> Allows to set server and options (by default 'http').
137137
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
138-
--no-static Negative 'static' option.
138+
--no-static Disallows to configure options for serving static files from directory.
139139
--static-directory <value...> Directory for static contents.
140140
--static-public-path <value...> The static files will be available in the browser under this public path.
141141
--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.
@@ -147,7 +147,7 @@ Options:
147147
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
148148
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
149149
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
150-
--no-web-socket-server Negative 'web-socket-server' option.
150+
--no-web-socket-server Disallows to set web socket server and options.
151151
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').
152152

153153
Global options:

test/cli/__snapshots__/basic.test.js.snap.webpack5

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Options:
122122
--server-type <value> Allows to set server and options (by default 'http').
123123
--server-options-passphrase <value> Passphrase for a pfx file.
124124
--server-options-request-cert Request for an SSL certificate.
125-
--no-server-options-request-cert Negative 'server-options-request-cert' option.
125+
--no-server-options-request-cert Does not request for an SSL certificate.
126126
--server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
127127
--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.
128128
--server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the \`server.options.ca\` option.
@@ -136,7 +136,7 @@ Options:
136136
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
137137
--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.
138138
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
139-
--no-static Negative 'static' option.
139+
--no-static Disallows to configure options for serving static files from directory.
140140
--static-directory <value...> Directory for static contents.
141141
--static-public-path <value...> The static files will be available in the browser under this public path.
142142
--static-serve-index Tells dev server to use serveIndex middleware when enabled.
@@ -148,7 +148,7 @@ Options:
148148
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
149149
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
150150
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
151-
--no-web-socket-server Negative 'web-socket-server' option.
151+
--no-web-socket-server Disallows to set web socket server and options.
152152
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').
153153

154154
Global options:

types/bin/cli-flags.d.ts

+17-6
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,7 @@ declare const _exports: {
781781
"server-options-request-cert": {
782782
configs: {
783783
description: string;
784+
negatedDescription: string;
784785
multiple: boolean;
785786
path: string;
786787
type: string;
@@ -802,12 +803,21 @@ declare const _exports: {
802803
simpleType: string;
803804
};
804805
static: {
805-
configs: {
806-
type: string;
807-
multiple: boolean;
808-
description: string;
809-
path: string;
810-
}[];
806+
configs: (
807+
| {
808+
type: string;
809+
multiple: boolean;
810+
description: string;
811+
path: string;
812+
}
813+
| {
814+
type: string;
815+
multiple: boolean;
816+
description: string;
817+
negatedDescription: string;
818+
path: string;
819+
}
820+
)[];
811821
description: string;
812822
simpleType: string;
813823
multiple: boolean;
@@ -906,6 +916,7 @@ declare const _exports: {
906916
configs: (
907917
| {
908918
description: string;
919+
negatedDescription: string;
909920
multiple: boolean;
910921
path: string;
911922
type: string;

0 commit comments

Comments
 (0)