liveperson-functions-cli
Version:
LivePerson Functions CLI
44 lines • 1.41 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@oclif/core");
const logout_controller_1 = require("../controller/logout.controller");
class Logout extends core_1.Command {
constructor() {
super(...arguments);
this.logoutController = new logout_controller_1.LogoutController();
}
/**
* Runs the logout command and parses the passed flags
* @returns {Promise<void>} - logout command
* @memberof Logout
*/
async run() {
try {
const { flags: inputFlags } = await this.parse(Logout);
this.logoutController.logout(inputFlags);
}
catch (error) {
this.exit(1);
}
}
}
exports.default = Logout;
Logout.description = 'Performs the logout of your account';
Logout.flags = {
help: core_1.Flags.help({ char: 'h' }),
accountId: core_1.Flags.string({
char: 'a',
description: 'Account which will be logged out',
}),
delete: core_1.Flags.boolean({
char: 'd',
description: 'Deletes the account credentials from the local machine',
}),
};
Logout.examples = [
'> <%= config.bin %> logout',
'> <%= config.bin %> logout --accountId 123456789',
'> <%= config.bin %> logout --accountId 123456789 --delete',
'> <%= config.bin %> logout -a 123456789 -d',
];
//# sourceMappingURL=logout.js.map