UNPKG

dbmaster-cli

Version:

Tool for converting tables between Fifa Soccer Games

27 lines (26 loc) 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CompareCommand = void 0; const actions_1 = require("../actions"); const interfaces_1 = require("../src/interfaces"); const abstract_command_1 = require("./abstract.command"); class CompareCommand extends abstract_command_1.AbstractCommand { load(program) { program .command('compare') .description('Compare Fifa table definitions') .requiredOption('-l, --left <string>', `Version of FIFA - left column (${Object.values(interfaces_1.Fifa).join(' | ')}).`) .requiredOption('-r, --right <string>', `Version of FIFA - right column (${Object.values(interfaces_1.Fifa).join(' | ')}).`) .requiredOption('-b, --table <string>', `Selected table (${Object.values(interfaces_1.Table).join(' | ')}).`) .requiredOption('-m, --mode <string>', `Selected mode (${Object.values(actions_1.CompareMode).join(' | ')}).`) .action(async (command) => { const options = []; options.push({ name: 'left', value: command.left }); options.push({ name: 'right', value: command.right }); options.push({ name: 'table', value: command.table }); options.push({ name: 'mode', value: command.mode }); await this.action.handle([], options); }); } } exports.CompareCommand = CompareCommand;