liveperson-functions-cli
Version:
LivePerson Functions CLI
48 lines • 1.73 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Deploy = void 0;
const core_1 = require("@oclif/core");
const deploy_controller_1 = require("../controller/deployment/deploy.controller");
const utils_1 = require("../shared/utils");
class Deploy extends core_1.Command {
constructor() {
super(...arguments);
this.deployController = new deploy_controller_1.DeployController();
}
/**
* Runs the deploy command and parses the passed functions and flags
* @returns {Promise<void>} - deploy command
* @memberof Deploy
*/
async run() {
try {
const { flags: inputFlags } = await this.parse(Deploy);
const lambdaFunctions = (0, utils_1.parseInput)(Deploy.flags, this.argv);
await this.deployController.deploy({ lambdaFunctions, inputFlags });
}
catch (error) {
this.exit(1);
}
}
}
exports.Deploy = Deploy;
Deploy.description = 'Deploys a function or multiple functions on the LivePerson Functions platform';
Deploy.flags = {
help: core_1.Flags.help({ char: 'h' }),
yes: core_1.Flags.boolean({
char: 'y',
description: 'Agrees to the approval of the deployment and prevents the confirmation dialog',
}),
'no-watch': core_1.Flags.boolean({
char: 'w',
description: "Don't watch deployment process",
}),
};
Deploy.strict = false;
Deploy.args = [{ name: '...functions' }];
Deploy.examples = [
'> <%= config.bin %> deploy exampleFunction',
'> <%= config.bin %> deploy exampleFunction --yes --no-watch',
'> <%= config.bin %> deploy exampleFunction1 exampleFunction2 -y -w',
];
//# sourceMappingURL=deploy.js.map