"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const commander = require("commander");
const logger_1 = require("./utils/logger");
const login_1 = require("./utils/login");
const validateEwizardInstance_1 = require("./utils/validateEwizardInstance");
commander
    .name('wiz login')
    .option('-i, --instance <instance>', 'instance', validateEwizardInstance_1.default)
    .option('-u, --user <user>', 'user')
    .option('-p, --password <password>', 'password')
    .parse(process.argv);
const { user, password, instance } = commander.opts();
login({ user, password, instance })
    .catch(logger_1.handleError)
    .finally(logger_1.closeLogger);
function login(env = {}) {
    return login_1.doLogin(env);
}
//# sourceMappingURL=wiz-login.js.map