diff --git a/commands/generate.command.ts b/commands/generate.command.ts index ed697a834..103270bda 100644 --- a/commands/generate.command.ts +++ b/commands/generate.command.ts @@ -48,6 +48,8 @@ export class GenerateCommand extends AbstractCommand { '-c, --collection [collectionName]', 'Schematics collection to use.', ) + .option('--type ', 'Transport layer type (rest, graphql, microservice)') + .option('--crud [value]', 'Generate CRUD entry points') .action( async ( schematic: string, @@ -93,6 +95,18 @@ export class GenerateCommand extends AbstractCommand { value: command.skipImport, }); + options.push({ + name: 'type', + value: command.type, + }); + + if (command.crud !== undefined) { + options.push({ + name: 'crud', + value: command.crud === true || command.crud === 'true', + }); + } + const inputs: Input[] = []; inputs.push({ name: 'schematic', value: schematic }); inputs.push({ name: 'name', value: name });