@@ -183,12 +183,13 @@ ${chalk.bold("Usage:")}
|
||||
${APP_NAME} [options] [@files...] [messages...]
|
||||
|
||||
${chalk.bold("Commands:")}
|
||||
${APP_NAME} install <source> [-l] Install extension source and add to settings
|
||||
${APP_NAME} remove <source> [-l] Remove extension source from settings
|
||||
${APP_NAME} update [source] Update installed extensions (skips pinned sources)
|
||||
${APP_NAME} list List installed extensions from settings
|
||||
${APP_NAME} config Open TUI to enable/disable package resources
|
||||
${APP_NAME} <command> --help Show help for install/remove/update/list
|
||||
${APP_NAME} install <source> [-l] Install extension source and add to settings
|
||||
${APP_NAME} remove <source> [-l] Remove extension source from settings
|
||||
${APP_NAME} uninstall <source> [-l] Alias for remove
|
||||
${APP_NAME} update [source] Update installed extensions (skips pinned sources)
|
||||
${APP_NAME} list List installed extensions from settings
|
||||
${APP_NAME} config Open TUI to enable/disable package resources
|
||||
${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list
|
||||
|
||||
${chalk.bold("Options:")}
|
||||
--provider <name> Provider name (default: google)
|
||||
|
||||
@@ -118,12 +118,14 @@ Examples:
|
||||
${getPackageCommandUsage("remove")}
|
||||
|
||||
Remove a package and its source from settings.
|
||||
Alias: ${APP_NAME} uninstall <source> [-l]
|
||||
|
||||
Options:
|
||||
-l, --local Remove from project settings (.pi/settings.json)
|
||||
|
||||
Example:
|
||||
Examples:
|
||||
${APP_NAME} remove npm:@foo/bar
|
||||
${APP_NAME} uninstall npm:@foo/bar
|
||||
`);
|
||||
return;
|
||||
|
||||
@@ -147,8 +149,14 @@ List installed packages from user and project settings.
|
||||
}
|
||||
|
||||
function parsePackageCommand(args: string[]): PackageCommandOptions | undefined {
|
||||
const [command, ...rest] = args;
|
||||
if (command !== "install" && command !== "remove" && command !== "update" && command !== "list") {
|
||||
const [rawCommand, ...rest] = args;
|
||||
let command: PackageCommand | undefined;
|
||||
if (rawCommand === "uninstall") {
|
||||
command = "remove";
|
||||
} else if (rawCommand === "install" || rawCommand === "remove" || rawCommand === "update" || rawCommand === "list") {
|
||||
command = rawCommand;
|
||||
}
|
||||
if (!command) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user