11import { invariant , singleDebounce } from '@zenstackhq/common-helpers' ;
22import { ZModelLanguageMetaData } from '@zenstackhq/language' ;
3- import { type AbstractDeclaration , isPlugin , LiteralExpr , Plugin , type Model } from '@zenstackhq/language/ast' ;
3+ import { isPlugin , LiteralExpr , Plugin , type AbstractDeclaration , type Model } from '@zenstackhq/language/ast' ;
44import { getLiteral , getLiteralArray } from '@zenstackhq/language/utils' ;
55import { type CliPlugin } from '@zenstackhq/sdk' ;
6+ import { watch } from 'chokidar' ;
67import colors from 'colors' ;
78import { createJiti } from 'jiti' ;
89import fs from 'node:fs' ;
910import path from 'node:path' ;
1011import { pathToFileURL } from 'node:url' ;
11- import { watch } from 'chokidar' ;
1212import ora , { type Ora } from 'ora' ;
13+ import semver from 'semver' ;
1314import { CliError } from '../cli-error' ;
1415import * as corePlugins from '../plugins' ;
15- import { getOutputPath , getSchemaFile , getZenStackPackages , loadSchemaDocument } from './action-utils' ;
16- import semver from 'semver' ;
17- import { startNotificationFetch } from './action-utils' ;
16+ import {
17+ getOutputPath ,
18+ getSchemaFile ,
19+ getZenStackPackages ,
20+ loadSchemaDocument ,
21+ startUsageTipsFetch ,
22+ } from './action-utils' ;
1823
1924type Options = {
2025 schema ?: string ;
@@ -25,7 +30,7 @@ type Options = {
2530 liteOnly ?: boolean ;
2631 generateModels ?: boolean ;
2732 generateInput ?: boolean ;
28- offline ?: boolean ;
33+ tips ?: boolean ;
2934} ;
3035
3136/**
@@ -38,12 +43,11 @@ export async function run(options: Options) {
3843 console . warn ( colors . yellow ( `Failed to check for mismatched ZenStack packages: ${ err } ` ) ) ;
3944 }
4045
41- const maybeShowNotification =
42- ! options . offline && ! options . silent && ! options . watch ? startNotificationFetch ( ) : undefined ;
46+ const maybeShowUsageTips = options . tips && ! options . silent && ! options . watch ? startUsageTipsFetch ( ) : undefined ;
4347
4448 const model = await pureGenerate ( options , false ) ;
4549
46- await maybeShowNotification ?.( ) ;
50+ await maybeShowUsageTips ?.( ) ;
4751
4852 if ( options . watch ) {
4953 const logsEnabled = ! options . silent ;
0 commit comments