vtex
Version:
The platform for e-commerce apps
44 lines (43 loc) • 1.81 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 install_1 = tslib_1.__importDefault(require("../modules/apps/install"));
const Colors_1 = require("../api/constants/Colors");
class Install extends CustomCommand_1.CustomCommand {
async run() {
const { raw, flags: { force }, } = this.parse(Install);
const allArgs = this.getAllArgs(raw);
await install_1.default(allArgs, { force });
}
}
exports.default = Install;
Install.description = `Installs an app on the current ${Colors_1.ColorifyConstants.ID('workspace')}. If not specified which one, it defaults to the app in the current directory.`;
Install.examples = [
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex install')}`,
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex install')} vtex.service-example@0.x`,
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex install')} vtex.service-example@0.0.1`,
];
Install.flags = {
...CustomCommand_1.CustomCommand.globalFlags,
force: command_1.flags.boolean({
char: 'f',
description: 'Installs the specified app without checking for route conflicts.',
default: false,
}),
};
Install.strict = false;
Install.args = [
{
name: 'appId',
required: false,
description: `Name and version of the app ${Colors_1.ColorifyConstants.ID('({vendor}.{appname}@{x.x.x})')} to install.`,
},
{
name: 'ithAppId',
required: false,
multiple: true,
description: `Names and versions of the multiple apps ${Colors_1.ColorifyConstants.ID('({vendor}.{appname}@{x.x.x})')} to install.`,
},
];