1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const tslib_1 = require("tslib");
|
4 | const path_1 = require("path");
|
5 | const yargs_1 = tslib_1.__importDefault(require("yargs"));
|
6 | const command_1 = require("../cli/command");
|
7 | const generate_1 = require("./generate");
|
8 | const init_1 = require("./init");
|
9 | const validate_1 = require("./validate");
|
10 | const migrate_1 = require("./migrate");
|
11 | exports.rootCmd = yargs_1.default
|
12 | .scriptName("kosko")
|
13 | .exitProcess(false)
|
14 | .option("cwd", {
|
15 | type: "string",
|
16 | describe: "Path of working directory",
|
17 | global: true,
|
18 | default: process.cwd(),
|
19 | defaultDescription: "CWD",
|
20 | coerce(arg) {
|
21 | return path_1.isAbsolute(arg) ? arg : path_1.resolve(arg);
|
22 | }
|
23 | })
|
24 | .option("silent", {
|
25 | type: "boolean",
|
26 | describe: "Disable log output",
|
27 | global: true,
|
28 | default: false
|
29 | })
|
30 | .group(["cwd", "silent", "help", "version"], "Global Options:")
|
31 | .command(command_1.wrapCommand(init_1.initCmd))
|
32 | .command(command_1.wrapCommand(generate_1.generateCmd))
|
33 | .command(command_1.wrapCommand(validate_1.validateCmd))
|
34 | .command(command_1.wrapCommand(migrate_1.migrateCmd))
|
35 | .demandCommand();
|
36 |
|
\ | No newline at end of file |