@@ -25,8 +25,8 @@ const initAction = async (projectPath: string): Promise<void> => {
2525 await actions . init ( projectPath ) ;
2626} ;
2727
28- const validateAction = async ( options : Parameters < typeof actions . validate > [ 0 ] ) : Promise < void > => {
29- await actions . validate ( options ) ;
28+ const checkAction = async ( options : Parameters < typeof actions . check > [ 0 ] ) : Promise < void > => {
29+ await actions . check ( options ) ;
3030} ;
3131
3232export function createProgram ( ) {
@@ -40,26 +40,25 @@ export function createProgram() {
4040 . description (
4141 `${ colors . bold . blue (
4242 'ζ' ,
43- ) } ZenStack is a database access toolkit for TypeScript apps.\n\nDocumentation: https://zenstack.dev.`,
43+ ) } ZenStack is the data layer for modern TypeScript apps.\n\nDocumentation: https://zenstack.dev.`,
4444 )
4545 . showHelpAfterError ( )
4646 . showSuggestionAfterError ( ) ;
4747
4848 const schemaOption = new Option (
4949 '--schema <file>' ,
50- `schema file (with extension ${ schemaExtensions } ). Defaults to "schema.zmodel" unless specified in package.json.` ,
50+ `schema file (with extension ${ schemaExtensions } ). Defaults to "zenstack/ schema.zmodel" unless specified in package.json.` ,
5151 ) ;
5252
5353 program
5454 . command ( 'generate' )
55- . description ( 'Run code generation.' )
55+ . description ( 'Run code generation plugins .' )
5656 . addOption ( schemaOption )
57- . addOption ( new Option ( '--silent' , 'do not print any output' ) )
58- . addOption ( new Option ( '-o, --output <path>' , 'default output directory for core plugins' ) )
57+ . addOption ( new Option ( '-o, --output <path>' , 'default output directory for code generation' ) )
5958 . action ( generateAction ) ;
6059
61- const migrateCommand = program . command ( 'migrate' ) . description ( 'Update the database schema with migrations .' ) ;
62- const migrationsOption = new Option ( '--migrations <path>' , 'path for migrations' ) ;
60+ const migrateCommand = program . command ( 'migrate' ) . description ( 'Run database schema migration related tasks .' ) ;
61+ const migrationsOption = new Option ( '--migrations <path>' , 'path that contains the " migrations" directory ' ) ;
6362
6463 migrateCommand
6564 . command ( 'dev' )
@@ -98,22 +97,22 @@ export function createProgram() {
9897 . addOption ( migrationsOption )
9998 . addOption ( new Option ( '--applied <migration>' , 'record a specific migration as applied' ) )
10099 . addOption ( new Option ( '--rolled-back <migration>' , 'record a specific migration as rolled back' ) )
101- . description ( 'Resolve issues with database migrations in deployment databases' )
100+ . description ( 'Resolve issues with database migrations in deployment databases. ' )
102101 . action ( ( options ) => migrateAction ( 'resolve' , options ) ) ;
103102
104103 const dbCommand = program . command ( 'db' ) . description ( 'Manage your database schema during development.' ) ;
105104
106105 dbCommand
107106 . command ( 'push' )
108- . description ( 'Push the state from your schema to your database' )
107+ . description ( 'Push the state from your schema to your database. ' )
109108 . addOption ( schemaOption )
110109 . addOption ( new Option ( '--accept-data-loss' , 'ignore data loss warnings' ) )
111110 . addOption ( new Option ( '--force-reset' , 'force a reset of the database before push' ) )
112111 . action ( ( options ) => dbAction ( 'push' , options ) ) ;
113112
114113 program
115114 . command ( 'info' )
116- . description ( 'Get information of installed ZenStack and related packages.' )
115+ . description ( 'Get information of installed ZenStack packages.' )
117116 . argument ( '[path]' , 'project path' , '.' )
118117 . action ( infoAction ) ;
119118
@@ -123,7 +122,11 @@ export function createProgram() {
123122 . argument ( '[path]' , 'project path' , '.' )
124123 . action ( initAction ) ;
125124
126- program . command ( 'validate' ) . description ( 'Validate a ZModel schema.' ) . addOption ( schemaOption ) . action ( validateAction ) ;
125+ program
126+ . command ( 'check' )
127+ . description ( 'Check a ZModel schema for syntax or semantic errors.' )
128+ . addOption ( schemaOption )
129+ . action ( checkAction ) ;
127130
128131 return program ;
129132}
0 commit comments