UNPKG

@amaabca/lexcmdcli

Version:

CLI Tool for interacting with AWS Lex API

39 lines (38 loc) 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const command_1 = require("@oclif/command"); const lex_client_1 = require("../lex-client"); class Build extends command_1.Command { async run() { const { args, flags } = this.parse(Build); if (flags.verbose) { console.log(args); console.log(flags); } if (flags.botId && flags.alias) { const client = new lex_client_1.default({ verbose: flags.verbose }); await client.build(flags.botId, flags.alias); } else { this._help(); } } } exports.default = Build; Build.description = 'Command for deploying a V2 Lex Bot'; Build.examples = [ ` $ lexcmdcli build -b <BOT_ID> -a <ALIAS_NAME> $ lexcmdcli build -b <BOT_ID> -a <ALIAS_NAME> -l <LOCALE_ID> $ lexcmdcli build -b <BOT_ID> -a <ALIAS_NAME> -l <LOCALE_ID> -v `, ]; Build.flags = { help: command_1.flags.help({ char: 'h' }), verbose: command_1.flags.boolean({ char: 'v' }), botId: command_1.flags.string({ char: 'b' }), alias: command_1.flags.string({ char: 'a' }), locale: command_1.flags.string({ char: 'l' }), }; Build.usage = 'lexcmdcli build -b <BOT_ID> -a <ALIAS_NAME>'; Build.args = [];