diff --git a/actions/generate.action.ts b/actions/generate.action.ts index 5c5f966b4..926d5eaab 100644 --- a/actions/generate.action.ts +++ b/actions/generate.action.ts @@ -4,6 +4,7 @@ import { Input } from '../commands'; import { getValueOrDefault } from '../lib/compiler/helpers/get-value-or-default'; import { AbstractCollection, + Collection, CollectionFactory, SchematicOption, } from '../lib/schematics'; @@ -35,7 +36,7 @@ const generateFiles = async (inputs: Input[]) => { const spec = inputs.find((option) => option.name === 'spec'); const collection: AbstractCollection = CollectionFactory.create( - collectionOption || configuration.collection, + collectionOption || configuration.collection || Collection.NESTJS, ); const schematicOptions: SchematicOption[] = mapSchematicOptions(inputs); schematicOptions.push( diff --git a/commands/generate.command.ts b/commands/generate.command.ts index eb60118e2..5d8175066 100644 --- a/commands/generate.command.ts +++ b/commands/generate.command.ts @@ -1,7 +1,6 @@ import * as chalk from 'chalk'; import * as Table from 'cli-table3'; import { Command, CommanderStatic } from 'commander'; -import { Collection } from '../lib/schematics'; import { NestCollection } from '../lib/schematics/nest.collection'; import { AbstractCommand } from './abstract.command'; import { Input } from './command.input'; @@ -58,7 +57,7 @@ export class GenerateCommand extends AbstractCommand { }); options.push({ name: 'collection', - value: command.collection || Collection.NESTJS, + value: command.collection, }); options.push({ name: 'project',