import { Command , flags } from '@oclif/command' ; import { cleanJsFile } from '../utils/cleanJsFile' ; import { genServer } from '../generators/server' ; import { genConfig } from '../generators/config' ; import { genControllers } from '../generators/controllers' ; import { genResolvers } from '../generators/resolvers' ; import { genSchedules } from '../generators/schedules' ; import { genEvents } from '../generators/events' ; import { genConfigs } from '../generators/configs' ; export default class Gen extends Command { static description = 'Generate some files' ; static examples = [ '$ tie gen' ] ; static flags = { } ; static args = [ { name : 'file' } ] ; async run ( ) { const cwd = process . cwd ( ) ; cleanJsFile ( cwd ) ; await Promise . all ( [ genControllers ( ) , genResolvers ( ) , genSchedules ( ) , genEvents ( ) , genServer ( ) , genConfigs ( ) , ] ) ; await genConfig ( ) ; } }