UNPKG

liveperson-functions-cli

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