UNPKG

liveperson-functions-cli

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