fix(nest): add missing resource generator option (#8310)

Co-authored-by: hoonoh <hoonoh@users.noreply.github.com>
This commit is contained in:
Hoon Oh 2022-01-14 00:15:50 +09:00 committed by GitHub
parent a7a7c55ff5
commit f30b8a318d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import type { Tree } from '@nrwl/devkit';
import { convertNxGenerator } from '@nrwl/devkit';
import type {
NestGeneratorWithLanguageOption,
NestGeneratorWithResourceOption,
NestGeneratorWithTestOption,
NormalizedOptions,
} from '../utils';
@ -12,7 +13,8 @@ import {
} from '../utils';
export type ResourceGeneratorOptions = NestGeneratorWithLanguageOption &
NestGeneratorWithTestOption;
NestGeneratorWithTestOption &
NestGeneratorWithResourceOption;
export function resourceGenerator(
tree: Tree,

View File

@ -16,6 +16,12 @@ export type NestSchematic =
| 'resolver'
| 'resource'
| 'service';
export type TransportLayer =
| 'rest'
| 'graphql-code-first'
| 'graphql-schema-first'
| 'microservice'
| 'ws';
export type NestGeneratorOptions = {
name: string;
@ -33,6 +39,11 @@ export type NestGeneratorWithTestOption = NestGeneratorOptions & {
unitTestRunner?: UnitTestRunner;
};
export type NestGeneratorWithResourceOption = NestGeneratorOptions & {
type?: TransportLayer;
crud?: boolean;
};
export type NormalizedOptions = {
name: string;
sourceRoot: string;