UNPKG

@imqueue/cli

Version:

Command Line Interface for IMQ

26 lines 1.02 kB
"use strict"; var _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.handler = exports.describe = exports.command = void 0; const chalk_1 = require("chalk"); const lib_1 = require("../../lib"); // noinspection JSUnusedGlobalSymbols _a = { command: 'set <option> <value>', describe: 'Updates given config option with given value', handler(argv) { try { const config = (0, lib_1.loadConfig)(); config[argv.option] = (0, lib_1.prepareConfigValue)(argv.value); (0, lib_1.saveConfig)(config); process.stdout.write(chalk_1.default.green('Option ') + chalk_1.default.cyan(`${argv.option}`) + chalk_1.default.green(' is set to ') + chalk_1.default.cyan(`${argv.value}`) + '\n'); } catch (err) { (0, lib_1.printError)(err); } } }, exports.command = _a.command, exports.describe = _a.describe, exports.handler = _a.handler; //# sourceMappingURL=set.js.map