@mindconnect/mindconnect-nodejs
Version:
MindConnect Library for NodeJS (community based)
27 lines • 1.52 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const console_1 = require("console");
const command_utils_1 = require("./command-utils");
const magenta = command_utils_1.getColor("magenta");
const cyan = command_utils_1.getColor("cyan");
const green = command_utils_1.getColor("green");
const red = command_utils_1.getColor("red");
const blue = command_utils_1.getColor("blue");
exports.default = (program) => {
program.version("MindConnect NodeJS CLI - Version: 3.7.0");
program.on("--help", () => {
console_1.log(`\n Documentation:\n`);
console_1.log(` the ${magenta("magenta colored commands *")} require service credentials.`);
console_1.log(` the ${cyan("cyan colored commands ")}require mindconnectlib (agent) credentials`);
console_1.log(` the ${blue("blue colored commands @")} use analytical functions of MindSphere`);
console_1.log(` the ${green("green colored commands #")} are used to setup starter projects`);
console_1.log(` the service credentials should only be used in secure environments for setup tasks`);
console_1.log(` Full documentation: ${cyan("https://opensource.mindsphere.io")}\n`);
});
program.on("command:*", function () {
console.error(red(`Invalid command: ${program.args.join(" ")}`));
console.error("Use mc --help for a list of available commands");
process.exit(1);
});
};
//# sourceMappingURL=mc-version-help.js.map