vtex
Version:
The platform for e-commerce apps
30 lines (29 loc) • 1.22 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 login_1 = tslib_1.__importDefault(require("../modules/auth/login"));
const Colors_1 = require("../api/constants/Colors");
class Login extends CustomCommand_1.CustomCommand {
async run() {
const { args: { account }, flags: { workspace }, } = this.parse(Login);
await login_1.default({ account, workspace });
}
}
exports.default = Login;
Login.description = `Logs in to a ${Colors_1.ColorifyConstants.ID('VTEX account')}.`;
Login.examples = [
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex login')}`,
`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex login')} storecomponents`,
];
Login.flags = {
...CustomCommand_1.CustomCommand.globalFlags,
workspace: command_1.flags.string({
char: 'w',
description: `Logs in the specified ${Colors_1.ColorifyConstants.ID('workspace')}.`,
}),
};
Login.args = [
{ name: 'account', required: false, description: `${Colors_1.ColorifyConstants.ID('Account')} name to log in.` },
];