Repository navigation
Expand file tree
/
Copy pathcli.ts
More file actions
43 lines (41 loc) · 1.67 KB
/
Copy pathcli.ts
File metadata and controls
43 lines (41 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
6117
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env node
import "reflect-metadata";
import {SchemaSyncCommand} from "./commands/SchemaSyncCommand";
import {SchemaDropCommand} from "./commands/SchemaDropCommand";
import {QueryCommand} from "./commands/QueryCommand";
import {EntityCreateCommand} from "./commands/EntityCreateCommand";
import {MigrationCreateCommand} from "./commands/MigrationCreateCommand";
import {MigrationRunCommand} from "./commands/MigrationRunCommand";
import {MigrationRevertCommand} from "./commands/MigrationRevertCommand";
import {SubscriberCreateCommand} from "./commands/SubscriberCreateCommand";
import {SchemaLogCommand} from "./commands/SchemaLogCommand";
import {MigrationGenerateCommand} from "./commands/MigrationGenerateCommand";
import {VersionCommand} from "./commands/VersionCommand";
import {InitCommand} from "./commands/InitCommand";
import {CacheClearCommand} from "./commands/CacheClearCommand";
require("yargs")
.usage("Usage: $0 <command> [options]")
.command(new SchemaSyncCommand())
.command(new SchemaLogCommand())
.command(new SchemaDropCommand())
.command(new QueryCommand())
.command(new EntityCreateCommand())
.command(new SubscriberCreateCommand())
.command(new MigrationCreateCommand())
.command(new MigrationGenerateCommand())
.command(new MigrationRunCommand())
.command(new MigrationRevertCommand())
.command(new VersionCommand())
.command(new CacheClearCommand())
.command(new InitCommand())
.demandCommand(1)
.strict()
.alias("v", "version")
.help("h")
.alias("h", "help")
.argv;
require("yargonaut")
.style("blue")
.style("yellow", "required")
.helpStyle("green")
.errorsStyle("red");