Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update description for --no-history-api-fallback #4277

Merged
merged 2 commits into from Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -126,7 +126,7 @@ Options:
--no-compress Disables gzip compression for everything served.
--history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5
History API.
--no-history-api-fallback Negative 'history-api-fallback' option.
--no-history-api-fallback Disallows to proxy requests through a specified index page.
--host <value> Allows to specify a hostname to use.
--hot [value] Enables Hot Module Replacement.
--no-hot Disables Hot Module Replacement.
Expand Down
2 changes: 2 additions & 0 deletions bin/cli-flags.js
Expand Up @@ -340,6 +340,8 @@ module.exports = {
multiple: false,
description:
"Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.",
negatedDescription:
"Disallows to proxy requests through a specified index page.",
path: "historyApiFallback",
},
],
Expand Down
5 changes: 4 additions & 1 deletion lib/options.json
Expand Up @@ -451,7 +451,10 @@
"HistoryApiFallback": {
"anyOf": [
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Disallows to proxy requests through a specified index page."
}
},
{
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion test/cli/__snapshots__/basic.test.js.snap.webpack4
Expand Up @@ -81,7 +81,7 @@ Options:
--compress Enables gzip compression for everything served.
--no-compress Disables gzip compression for everything served.
--history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.
--no-history-api-fallback Negative 'history-api-fallback' option.
--no-history-api-fallback Disallows to proxy requests through a specified index page.
--host <value> Allows to specify a hostname to use.
--hot [value] Enables Hot Module Replacement.
--no-hot Disables Hot Module Replacement.
Expand Down
2 changes: 1 addition & 1 deletion test/cli/__snapshots__/basic.test.js.snap.webpack5
Expand Up @@ -82,7 +82,7 @@ Options:
--compress Enables gzip compression for everything served.
--no-compress Disables gzip compression for everything served.
--history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.
--no-history-api-fallback Negative 'history-api-fallback' option.
--no-history-api-fallback Disallows to proxy requests through a specified index page.
--host <value> Allows to specify a hostname to use.
--hot [value] Enables Hot Module Replacement.
--no-hot Disables Hot Module Replacement.
Expand Down
29 changes: 17 additions & 12 deletions types/lib/Server.d.ts
Expand Up @@ -2149,17 +2149,21 @@ declare class Server {
anyOf: (
| {
type: string;
cli: {
negatedDescription: string;
};
description?: undefined;
link?: undefined;
}
| {
type: string;
description: string;
link: string;
cli?: undefined;
}
)[];
description: string;
link: string /** @type {WebSocketURL} */;
link: string;
};
Host: {
description: string;
Expand All @@ -2181,7 +2185,7 @@ declare class Server {
anyOf: (
| {
type: string;
/** @type {string} */ enum?: undefined;
enum?: undefined;
}
| {
enum: string[];
Expand Down Expand Up @@ -2264,7 +2268,7 @@ declare class Server {
OpenBoolean: {
type: string;
cli: {
negatedDescription: string;
negatedDescription: string /** @type {ClientConfiguration} */;
};
};
OpenObject: {
Expand Down Expand Up @@ -2376,22 +2380,21 @@ declare class Server {
}
| {
type: string;
/** @type {any} */
items: {
anyOf: (
| {
type: string;
instanceof?: undefined;
}
| {
/** @type {any} */
instanceof: string;
type?: undefined;
}
)[];
};
}
)[];
/** @type {any} */
description: string;
link: string;
};
Expand All @@ -2405,6 +2408,7 @@ declare class Server {
ServerType: {
enum: string[];
};
/** @type {MultiCompiler} */
ServerEnum: {
enum: string[];
cli: {
Expand All @@ -2428,9 +2432,9 @@ declare class Server {
};
options: {
$ref: string;
} /** @type {MultiCompiler} */;
};
};
/** @type {MultiCompiler} */ additionalProperties: boolean;
additionalProperties: boolean;
};
ServerOptions: {
type: string;
Expand Down Expand Up @@ -2837,17 +2841,17 @@ declare class Server {
enum?: undefined;
}
)[];
/** @type {ServerOptions} */
cli: {
description: string;
};
} /** @type {ServerOptions} */;
};
/** @type {ServerOptions} */
WebSocketServerFunction: {
instanceof: string;
};
WebSocketServerObject: {
type: string;
/** @type {ServerOptions} */
type: string;
properties: {
type: {
anyOf: {
Expand Down Expand Up @@ -2878,8 +2882,9 @@ declare class Server {
$ref: string;
};
client: {
$ref: string;
$ref: string /** @type {ServerOptions} */;
};
/** @type {ServerOptions} */
compress: {
$ref: string;
};
Expand Down Expand Up @@ -2917,7 +2922,7 @@ declare class Server {
$ref: string;
};
onBeforeSetupMiddleware: {
$ref: string /** @type {any} */;
$ref: string;
};
onListening: {
$ref: string;
Expand Down