fix(cli): routed update plugin shorthand
Added the documented update -l path for marketplace plugin upgrades and covered the dispatch contract with update command tests. Fixes #4304
This commit is contained in:
@@ -82,7 +82,7 @@ export interface BinaryReplacementOptions {
|
||||
* Parse update subcommand arguments.
|
||||
* Returns undefined if not an update command.
|
||||
*/
|
||||
export function parseUpdateArgs(args: string[]): { force: boolean; check: boolean } | undefined {
|
||||
export function parseUpdateArgs(args: string[]): { force: boolean; check: boolean; plugins: boolean } | undefined {
|
||||
if (args.length === 0 || args[0] !== "update") {
|
||||
return undefined;
|
||||
}
|
||||
@@ -90,6 +90,7 @@ export function parseUpdateArgs(args: string[]): { force: boolean; check: boolea
|
||||
return {
|
||||
force: args.includes("--force") || args.includes("-f"),
|
||||
check: args.includes("--check") || args.includes("-c"),
|
||||
plugins: args.includes("--plugins") || args.includes("-l"),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -914,12 +915,14 @@ ${chalk.bold("Usage:")}
|
||||
${APP_NAME} update [options]
|
||||
|
||||
${chalk.bold("Options:")}
|
||||
-c, --check Check for updates without installing
|
||||
-f, --force Force reinstall even if up to date
|
||||
-c, --check Check for updates without installing
|
||||
-f, --force Force reinstall even if up to date
|
||||
-l, --plugins Update installed plugins
|
||||
|
||||
${chalk.bold("Examples:")}
|
||||
${APP_NAME} update Update to latest version
|
||||
${APP_NAME} update --check Check if updates are available
|
||||
${APP_NAME} update --force Force reinstall
|
||||
${APP_NAME} update Update to latest version
|
||||
${APP_NAME} update --check Check if updates are available
|
||||
${APP_NAME} update --force Force reinstall
|
||||
${APP_NAME} update -l Update installed plugins
|
||||
`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user