Skip to content

Commit

Permalink
updated the command script
Browse files Browse the repository at this point in the history
  • Loading branch information
vyyyy committed Nov 30, 2020
1 parent 18db728 commit a6e693d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions typescript/hx-adl/src/gen-sqlmigration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ import { snakeCase } from "change-case";

export function configureCli(program: Command) {
program
.command("sql [adlFiles...]")
.command("sql-migration [adlFiles...]")
.option('-I, --searchdir <path>', 'Add to adl searchpath', collect, [])
.option('--outfile <path>', 'the resulting sql file', 'create.sql')
.option('--outputdir <dir>', 'the directory into which the sql is written (deprecated)')
.option('--outmetadata <path>', 'sql to insert the model metadata')
.option('--outtemplatesql <paths>', 'generate extra sql from a mustache template', collect, [])
.option('--postgres', 'Generate sql for postgres')
.option('--postgres-v2', 'Generate sql for postgres (model version 2)')
.option('--mssql', 'Generate sql for microsoft sqlserver')
.option('--extension <ext>', 'Add to included sql extensions', collect, [])
.option('--migration', 'Generate sql for migration')
.description('Generate a db schema from ADL files')
Expand Down
2 changes: 2 additions & 0 deletions typescript/hx-adl/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import program from "commander";
import * as sqlmigration from "./gen-sqlmigration";
import * as sqlschema from "./gen-sqlschema";
import * as javatables from "./gen-javatables";
import * as javahttpreqs from "./gen-javahttpreqs";
Expand All @@ -9,6 +10,7 @@ import * as openapi from "./gen-openapi";

program.name("hx-adl");
program.version("1.0.0");
sqlmigration.configureCli(program);
sqlschema.configureCli(program);
javatables.configureCli(program);
javahttpreqs.configureCli(program);
Expand Down

0 comments on commit a6e693d

Please sign in to comment.