fix(nest): add missing resource generator option (#8310)
Co-authored-by: hoonoh <hoonoh@users.noreply.github.com>
This commit is contained in:
parent
a7a7c55ff5
commit
f30b8a318d
@ -2,6 +2,7 @@ import type { Tree } from '@nrwl/devkit';
|
|||||||
import { convertNxGenerator } from '@nrwl/devkit';
|
import { convertNxGenerator } from '@nrwl/devkit';
|
||||||
import type {
|
import type {
|
||||||
NestGeneratorWithLanguageOption,
|
NestGeneratorWithLanguageOption,
|
||||||
|
NestGeneratorWithResourceOption,
|
||||||
NestGeneratorWithTestOption,
|
NestGeneratorWithTestOption,
|
||||||
NormalizedOptions,
|
NormalizedOptions,
|
||||||
} from '../utils';
|
} from '../utils';
|
||||||
@ -12,7 +13,8 @@ import {
|
|||||||
} from '../utils';
|
} from '../utils';
|
||||||
|
|
||||||
export type ResourceGeneratorOptions = NestGeneratorWithLanguageOption &
|
export type ResourceGeneratorOptions = NestGeneratorWithLanguageOption &
|
||||||
NestGeneratorWithTestOption;
|
NestGeneratorWithTestOption &
|
||||||
|
NestGeneratorWithResourceOption;
|
||||||
|
|
||||||
export function resourceGenerator(
|
export function resourceGenerator(
|
||||||
tree: Tree,
|
tree: Tree,
|
||||||
|
|||||||
@ -16,6 +16,12 @@ export type NestSchematic =
|
|||||||
| 'resolver'
|
| 'resolver'
|
||||||
| 'resource'
|
| 'resource'
|
||||||
| 'service';
|
| 'service';
|
||||||
|
export type TransportLayer =
|
||||||
|
| 'rest'
|
||||||
|
| 'graphql-code-first'
|
||||||
|
| 'graphql-schema-first'
|
||||||
|
| 'microservice'
|
||||||
|
| 'ws';
|
||||||
|
|
||||||
export type NestGeneratorOptions = {
|
export type NestGeneratorOptions = {
|
||||||
name: string;
|
name: string;
|
||||||
@ -33,6 +39,11 @@ export type NestGeneratorWithTestOption = NestGeneratorOptions & {
|
|||||||
unitTestRunner?: UnitTestRunner;
|
unitTestRunner?: UnitTestRunner;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type NestGeneratorWithResourceOption = NestGeneratorOptions & {
|
||||||
|
type?: TransportLayer;
|
||||||
|
crud?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
export type NormalizedOptions = {
|
export type NormalizedOptions = {
|
||||||
name: string;
|
name: string;
|
||||||
sourceRoot: string;
|
sourceRoot: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user