liveperson-functions-cli
Version:
LivePerson Functions CLI
41 lines • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Init = void 0;
const core_1 = require("@oclif/core");
const init_controller_1 = require("../controller/init.controller");
const utils_1 = require("../shared/utils");
class Init extends core_1.Command {
constructor() {
super(...arguments);
this.initController = new init_controller_1.InitController();
}
/**
* Runs the init command and parses the passed functions
* @returns {Promise<void>} - init command
* @memberof Init
*/
async run() {
try {
const functionNames = (0, utils_1.parseInput)(Init.flags, this.argv);
await this.initController.init({ functionNames });
}
catch (error) {
this.exit(1);
}
}
}
exports.Init = Init;
Init.flags = {
help: core_1.Flags.help({
char: 'h',
description: 'Show help for the init command',
}),
};
Init.description = 'Initialize the project with the necessary data';
Init.strict = false;
Init.args = [{ name: '...functionNames' }];
Init.examples = [
'> <%= config.bin %> init <functionname>',
'> <%= config.bin %> init <functionname> <functionsname>',
];
//# sourceMappingURL=init.js.map