"use strict";
/** @format */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerCommandChecker = exports.i18n = exports.logger = void 0;
var logger_1 = __importDefault(require("./logger"));
__exportStar(require("./common"), exports);
__exportStar(require("./handler-set-config"), exports);
var logger_2 = require("./logger");
Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return __importDefault(logger_2).default; } });
var i18n_1 = require("./i18n");
Object.defineProperty(exports, "i18n", { enumerable: true, get: function () { return __importDefault(i18n_1).default; } });
function registerCommandChecker(program) {
    program.on('command:*', function (cmds) {
        var commands = program.commands.map(function (command) { return command.name(); });
        if (!commands.includes(cmds[0])) {
            logger_1.default.error("  error: unknown command ".concat(cmds[0]));
            program.help();
        }
    });
}
exports.registerCommandChecker = registerCommandChecker;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGNBQWM7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFZCxvREFBOEI7QUFDOUIsMkNBQXlCO0FBQ3pCLHVEQUFxQztBQUNyQyxtQ0FBNkM7QUFBcEMsaUhBQUEsT0FBTyxPQUFVO0FBQzFCLCtCQUF5QztBQUFoQyw2R0FBQSxPQUFPLE9BQVE7QUFFeEIsU0FBZ0Isc0JBQXNCLENBQUMsT0FBWTtJQUNqRCxPQUFPLENBQUMsRUFBRSxDQUFDLFdBQVcsRUFBRSxVQUFDLElBQVM7UUFDaEMsSUFBTSxRQUFRLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsVUFBQyxPQUFZLElBQUssT0FBQSxPQUFPLENBQUMsSUFBSSxFQUFFLEVBQWQsQ0FBYyxDQUFDLENBQUM7UUFDeEUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUU7WUFDL0IsZ0JBQU0sQ0FBQyxLQUFLLENBQUMsbUNBQTRCLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBRSxDQUFDLENBQUM7WUFDcEQsT0FBTyxDQUFDLElBQUksRUFBRSxDQUFDO1NBQ2hCO0lBQ0gsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDO0FBUkQsd0RBUUMifQ==