msbot
Version:
MSBot command line tool for manipulating Microsoft Bot Framework .bot files
39 lines • 1.37 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Copyright(c) Microsoft Corporation.All rights reserved.
* Licensed under the MIT License.
*/
// tslint:disable:no-console
const chalk = require("chalk");
const program = require("commander");
program.option('--prefix', 'Append [msbot] prefix to all messages');
program.Command.prototype.unknownOption = (flag) => {
console.error(chalk.default.redBright(`Unknown arguments: ${flag}`));
showErrorHelp();
};
program
.name('msbot update')
.command('appinsights', 'update Azure AppInsights')
.command('blob', 'update Azure Blob storage')
.command('cosmosdb', 'update Azure CosmosDB')
.command('dispatch', 'update Dispatch model')
.command('endpoint', 'update endpoint')
.command('generic', 'update generic service configuration')
.command('luis', 'update LUIS application')
.command('qna', 'update QNA service');
const args = program.parse(process.argv);
// args should be undefined is subcommand is executed
if (args) {
const a = process.argv.slice(2);
console.error(chalk.default.redBright(`Unknown arguments: ${a.join(' ')}`));
showErrorHelp();
}
function showErrorHelp() {
program.outputHelp((str) => {
console.error(str);
return '';
});
process.exit(1);
}
//# sourceMappingURL=msbot-update.js.map