liveperson-functions-cli
Version:
LivePerson Functions CLI
43 lines • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@oclif/core");
const push_controller_1 = require("../controller/push.controller");
const utils_1 = require("../shared/utils");
class Push extends core_1.Command {
constructor() {
super(...arguments);
this.pushController = new push_controller_1.PushController();
}
async run() {
try {
const { flags: inputFlags } = await this.parse(Push);
const lambdaFunctions = (0, utils_1.parseInput)(Push.flags, this.argv);
await this.pushController.push({ lambdaFunctions, inputFlags });
}
catch (error) {
this.exit(1);
}
}
}
exports.default = Push;
Push.description = 'Push local functions to the LivePerson functions platform';
Push.flags = {
help: core_1.Flags.help({ char: 'h' }),
yes: core_1.Flags.boolean({
char: 'y',
description: 'Agrees to the approval of the push and prevents the confirmation dialog',
}),
'no-watch': core_1.Flags.boolean({
char: 'w',
description: "Don't watch push process",
}),
all: core_1.Flags.boolean({ char: 'a', description: 'Pushes all functions' }),
};
Push.strict = false;
Push.args = [{ name: '...functions' }];
Push.examples = [
'> <%= config.bin %> push exampleFunction',
'> <%= config.bin %> push exampleFunction --yes --no-watch',
'> <%= config.bin %> push exampleFunction1 exampleFunction2 -y -w',
];
//# sourceMappingURL=push.js.map