UNPKG

liveperson-functions-cli

Version:
49 lines 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Login = void 0; const core_1 = require("@oclif/core"); const login_controller_1 = require("../controller/login.controller"); class Login extends core_1.Command { constructor() { super(...arguments); this.loginController = new login_controller_1.LoginController(); } /** * Runs the login command and parses the passed flags * @returns {Promise<void>} - login command * @memberof Login */ async run() { try { const { flags: inputFlags } = await this.parse(Login); await this.loginController.loginByCommand({ inputFlags }); } catch (error) { this.exit(1); } } } exports.Login = Login; Login.description = 'Performs the login with LiveEngage Credentials'; Login.flags = { help: core_1.Flags.help({ char: 'h', description: 'Shows help for the login' }), password: core_1.Flags.string({ char: 'p', description: 'Password' }), username: core_1.Flags.string({ char: 'u', description: 'Username' }), accountId: core_1.Flags.string({ char: 'a', description: 'AccountId' }), token: core_1.Flags.string({ char: 't', description: 'Token for the SSO flow', hidden: true, }), userId: core_1.Flags.string({ char: 'i', description: 'UserId for the SSO flow', hidden: true, }), }; Login.examples = [ '> <%= config.bin %> login', '> <%= config.bin %> login --accountId 123456789 --username user@liveperson.com --password p4ssw0rd', '> <%= config.bin %> login -a 123456789 -u user@liveperson.com -p p4ssw0rd', ]; //# sourceMappingURL=login.js.map