"use strict";
/** @format */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGNBQWM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRWQsb0RBQThCO0FBQzlCLDJDQUF5QjtBQUN6Qix1REFBcUM7QUFDckMsbUNBQTZDO0FBQXBDLGlIQUFBLE9BQU8sT0FBVTtBQUMxQiwrQkFBeUM7QUFBaEMsNkdBQUEsT0FBTyxPQUFRO0FBRXhCLFNBQWdCLHNCQUFzQixDQUFDLE9BQVk7SUFDakQsT0FBTyxDQUFDLEVBQUUsQ0FBQyxXQUFXLEVBQUUsVUFBQyxJQUFTO1FBQ2hDLElBQU0sUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLFVBQUMsT0FBWSxJQUFLLE9BQUEsT0FBTyxDQUFDLElBQUksRUFBRSxFQUFkLENBQWMsQ0FBQyxDQUFDO1FBQ3hFLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFO1lBQy9CLGdCQUFNLENBQUMsS0FBSyxDQUFDLG1DQUE0QixJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUUsQ0FBQyxDQUFDO1lBQ3BELE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQztTQUNoQjtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQVJELHdEQVFDIn0=