vtex
Version:
The platform for e-commerce apps
31 lines (30 loc) • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const command_1 = require("@oclif/command");
const CustomCommand_1 = require("../api/oclif/CustomCommand");
const uninstall_1 = tslib_1.__importDefault(require("../modules/apps/uninstall"));
const Colors_1 = require("../api/constants/Colors");
class Uninstall extends CustomCommand_1.CustomCommand {
async run() {
const { raw, flags: { yes }, } = this.parse(Uninstall);
const allArgs = this.getAllArgs(raw);
await uninstall_1.default(allArgs, { yes });
}
}
exports.default = Uninstall;
Uninstall.description = `Uninstalls an app from the current ${Colors_1.ColorifyConstants.ID('workspace.')} If not specified which app to uninstall, it defaults to the app in the current directory.`;
Uninstall.examples = [
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex uninstall')}`,
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex uninstall')} vtex.service-example`,
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex uninstall')} vtex.service-example@0.x`,
];
Uninstall.flags = {
...CustomCommand_1.CustomCommand.globalFlags,
yes: command_1.flags.boolean({ char: 'y', description: 'Answers yes to all prompts.' }),
};
Uninstall.strict = false;
Uninstall.args = [
{ name: 'appName', required: false, description: 'Name of the app to uninstall.' },
{ name: 'ithAppName', required: false, multiple: true, description: 'Names of the multiple apps to uninstall.' },
];