@nx/nest 19.8.0 → 20.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators.json +15 -15
- package/package.json +6 -6
- package/src/generators/application/application.js +0 -1
- package/src/generators/application/lib/normalize-options.js +0 -1
- package/src/generators/class/class.d.ts +1 -2
- package/src/generators/class/class.js +1 -8
- package/src/generators/controller/controller.d.ts +1 -2
- package/src/generators/controller/controller.js +1 -8
- package/src/generators/controller/schema.json +0 -15
- package/src/generators/decorator/decorator.d.ts +1 -2
- package/src/generators/decorator/decorator.js +1 -8
- package/src/generators/decorator/schema.json +0 -15
- package/src/generators/filter/filter.d.ts +1 -2
- package/src/generators/filter/filter.js +1 -8
- package/src/generators/filter/schema.json +0 -15
- package/src/generators/gateway/gateway.d.ts +1 -2
- package/src/generators/gateway/gateway.js +1 -8
- package/src/generators/gateway/schema.json +0 -15
- package/src/generators/guard/guard.d.ts +1 -2
- package/src/generators/guard/guard.js +1 -8
- package/src/generators/guard/schema.json +0 -15
- package/src/generators/interceptor/interceptor.d.ts +1 -2
- package/src/generators/interceptor/interceptor.js +1 -8
- package/src/generators/interceptor/schema.json +0 -15
- package/src/generators/interface/interface.d.ts +1 -2
- package/src/generators/interface/interface.js +1 -8
- package/src/generators/library/lib/normalize-options.js +0 -1
- package/src/generators/library/library.js +0 -1
- package/src/generators/library/schema.json +1 -1
- package/src/generators/middleware/middleware.d.ts +1 -2
- package/src/generators/middleware/middleware.js +1 -8
- package/src/generators/middleware/schema.json +1 -16
- package/src/generators/module/module.d.ts +1 -2
- package/src/generators/module/module.js +1 -8
- package/src/generators/module/schema.json +0 -15
- package/src/generators/pipe/pipe.d.ts +1 -2
- package/src/generators/pipe/pipe.js +1 -8
- package/src/generators/pipe/schema.json +0 -15
- package/src/generators/provider/provider.d.ts +1 -2
- package/src/generators/provider/provider.js +1 -8
- package/src/generators/provider/schema.json +0 -15
- package/src/generators/resolver/resolver.d.ts +1 -2
- package/src/generators/resolver/resolver.js +1 -8
- package/src/generators/resolver/schema.json +0 -15
- package/src/generators/resource/resource.d.ts +1 -2
- package/src/generators/resource/resource.js +1 -8
- package/src/generators/resource/schema.json +0 -15
- package/src/generators/service/schema.json +0 -15
- package/src/generators/service/service.d.ts +1 -2
- package/src/generators/service/service.js +1 -8
- package/src/generators/utils/normalize-options.d.ts +1 -1
- package/src/generators/utils/normalize-options.js +1 -6
- package/src/generators/utils/types.d.ts +0 -8
package/generators.json
CHANGED
|
@@ -25,77 +25,77 @@
|
|
|
25
25
|
"description": "Create a new NestJS library."
|
|
26
26
|
},
|
|
27
27
|
"class": {
|
|
28
|
-
"factory": "./src/generators/class/class
|
|
28
|
+
"factory": "./src/generators/class/class",
|
|
29
29
|
"schema": "./src/generators/class/schema.json",
|
|
30
30
|
"description": "Run the `class` NestJS generator with Nx project support."
|
|
31
31
|
},
|
|
32
32
|
"controller": {
|
|
33
|
-
"factory": "./src/generators/controller/controller
|
|
33
|
+
"factory": "./src/generators/controller/controller",
|
|
34
34
|
"schema": "./src/generators/controller/schema.json",
|
|
35
35
|
"description": "Run the `controller` NestJS generator with Nx project support."
|
|
36
36
|
},
|
|
37
37
|
"decorator": {
|
|
38
|
-
"factory": "./src/generators/decorator/decorator
|
|
38
|
+
"factory": "./src/generators/decorator/decorator",
|
|
39
39
|
"schema": "./src/generators/decorator/schema.json",
|
|
40
40
|
"description": "Run the `decorator` NestJS generator with Nx project support."
|
|
41
41
|
},
|
|
42
42
|
"filter": {
|
|
43
|
-
"factory": "./src/generators/filter/filter
|
|
43
|
+
"factory": "./src/generators/filter/filter",
|
|
44
44
|
"schema": "./src/generators/filter/schema.json",
|
|
45
45
|
"description": "Run the `filter` NestJS generator with Nx project support."
|
|
46
46
|
},
|
|
47
47
|
"gateway": {
|
|
48
|
-
"factory": "./src/generators/gateway/gateway
|
|
48
|
+
"factory": "./src/generators/gateway/gateway",
|
|
49
49
|
"schema": "./src/generators/gateway/schema.json",
|
|
50
50
|
"description": "Run the `gateway` NestJS generator with Nx project support."
|
|
51
51
|
},
|
|
52
52
|
"guard": {
|
|
53
|
-
"factory": "./src/generators/guard/guard
|
|
53
|
+
"factory": "./src/generators/guard/guard",
|
|
54
54
|
"schema": "./src/generators/guard/schema.json",
|
|
55
55
|
"description": "Run the `guard` NestJS generator with Nx project support."
|
|
56
56
|
},
|
|
57
57
|
"interceptor": {
|
|
58
|
-
"factory": "./src/generators/interceptor/interceptor
|
|
58
|
+
"factory": "./src/generators/interceptor/interceptor",
|
|
59
59
|
"schema": "./src/generators/interceptor/schema.json",
|
|
60
60
|
"description": "Run the `interceptor` NestJS generator with Nx project support."
|
|
61
61
|
},
|
|
62
62
|
"interface": {
|
|
63
|
-
"factory": "./src/generators/interface/interface
|
|
63
|
+
"factory": "./src/generators/interface/interface",
|
|
64
64
|
"schema": "./src/generators/interface/schema.json",
|
|
65
65
|
"description": "Run the `interface` NestJS generator with Nx project support."
|
|
66
66
|
},
|
|
67
67
|
"middleware": {
|
|
68
|
-
"factory": "./src/generators/middleware/middleware
|
|
68
|
+
"factory": "./src/generators/middleware/middleware",
|
|
69
69
|
"schema": "./src/generators/middleware/schema.json",
|
|
70
70
|
"description": "Run the `middleware` NestJS generator with Nx project support."
|
|
71
71
|
},
|
|
72
72
|
"module": {
|
|
73
|
-
"factory": "./src/generators/module/module
|
|
73
|
+
"factory": "./src/generators/module/module",
|
|
74
74
|
"schema": "./src/generators/module/schema.json",
|
|
75
75
|
"description": "Run the `module` NestJS generator with Nx project support."
|
|
76
76
|
},
|
|
77
77
|
"pipe": {
|
|
78
|
-
"factory": "./src/generators/pipe/pipe
|
|
78
|
+
"factory": "./src/generators/pipe/pipe",
|
|
79
79
|
"schema": "./src/generators/pipe/schema.json",
|
|
80
80
|
"description": "Run the `pipe` NestJS generator with Nx project support."
|
|
81
81
|
},
|
|
82
82
|
"provider": {
|
|
83
|
-
"factory": "./src/generators/provider/provider
|
|
83
|
+
"factory": "./src/generators/provider/provider",
|
|
84
84
|
"schema": "./src/generators/provider/schema.json",
|
|
85
85
|
"description": "Run the `provider` NestJS generator with Nx project support."
|
|
86
86
|
},
|
|
87
87
|
"resolver": {
|
|
88
|
-
"factory": "./src/generators/resolver/resolver
|
|
88
|
+
"factory": "./src/generators/resolver/resolver",
|
|
89
89
|
"schema": "./src/generators/resolver/schema.json",
|
|
90
90
|
"description": "Run the `resolver` NestJS generator with Nx project support."
|
|
91
91
|
},
|
|
92
92
|
"resource": {
|
|
93
|
-
"factory": "./src/generators/resource/resource
|
|
93
|
+
"factory": "./src/generators/resource/resource",
|
|
94
94
|
"schema": "./src/generators/resource/schema.json",
|
|
95
95
|
"description": "Run the `resource` NestJS generator with Nx project support."
|
|
96
96
|
},
|
|
97
97
|
"service": {
|
|
98
|
-
"factory": "./src/generators/service/service
|
|
98
|
+
"factory": "./src/generators/service/service",
|
|
99
99
|
"schema": "./src/generators/service/schema.json",
|
|
100
100
|
"description": "Run the `service` NestJS generator with Nx project support."
|
|
101
101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nest",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0-beta.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Nest contains executors and generators for allowing your workspace to create powerful Nest best in class APIs.",
|
|
6
6
|
"repository": {
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@nestjs/schematics": "^9.1.0",
|
|
35
|
-
"@nx/devkit": "
|
|
36
|
-
"@nx/js": "
|
|
37
|
-
"@nx/eslint": "
|
|
38
|
-
"@nx/node": "
|
|
35
|
+
"@nx/devkit": "20.0.0-beta.0",
|
|
36
|
+
"@nx/js": "20.0.0-beta.0",
|
|
37
|
+
"@nx/eslint": "20.0.0-beta.0",
|
|
38
|
+
"@nx/node": "20.0.0-beta.0",
|
|
39
39
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
40
40
|
"tslib": "^2.3.0",
|
|
41
|
-
"@nrwl/nest": "
|
|
41
|
+
"@nrwl/nest": "20.0.0-beta.0"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
@@ -10,7 +10,6 @@ const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
|
10
10
|
async function applicationGenerator(tree, rawOptions) {
|
|
11
11
|
return await applicationGeneratorInternal(tree, {
|
|
12
12
|
addPlugin: false,
|
|
13
|
-
projectNameAndRootFormat: 'derived',
|
|
14
13
|
...rawOptions,
|
|
15
14
|
});
|
|
16
15
|
}
|
|
@@ -12,7 +12,6 @@ async function normalizeOptions(tree, options) {
|
|
|
12
12
|
directory: options.directory,
|
|
13
13
|
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
14
14
|
rootProject: options.rootProject,
|
|
15
|
-
callingGenerator: '@nx/nest:application',
|
|
16
15
|
});
|
|
17
16
|
options.rootProject = appProjectRoot === '.';
|
|
18
17
|
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type ClassGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function classGenerator(tree: Tree, rawOptions: ClassGeneratorOptions): Promise<
|
|
5
|
-
export declare function classGeneratorInternal(tree: Tree, rawOptions: ClassGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function classGenerator(tree: Tree, rawOptions: ClassGeneratorOptions): Promise<any>;
|
|
6
5
|
export default classGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.classGenerator = classGenerator;
|
|
4
|
-
exports.classGeneratorInternal = classGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function classGenerator(tree, rawOptions) {
|
|
7
|
-
await classGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function classGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeClassOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'class', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = classGenerator;
|
|
17
10
|
async function normalizeClassOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -4,6 +4,5 @@ export type ControllerGeneratorOptions = NestGeneratorWithLanguageOption & NestG
|
|
|
4
4
|
module?: string;
|
|
5
5
|
skipImport?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function controllerGenerator(tree: Tree, rawOptions: ControllerGeneratorOptions): Promise<
|
|
8
|
-
export declare function controllerGeneratorInternal(tree: Tree, rawOptions: ControllerGeneratorOptions): Promise<any>;
|
|
7
|
+
export declare function controllerGenerator(tree: Tree, rawOptions: ControllerGeneratorOptions): Promise<any>;
|
|
9
8
|
export default controllerGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.controllerGenerator = controllerGenerator;
|
|
4
|
-
exports.controllerGeneratorInternal = controllerGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function controllerGenerator(tree, rawOptions) {
|
|
7
|
-
await controllerGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function controllerGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeControllerOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'controller', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = controllerGenerator;
|
|
17
10
|
async function normalizeControllerOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -15,15 +15,6 @@
|
|
|
15
15
|
},
|
|
16
16
|
"x-prompt": "What name would you like to use?"
|
|
17
17
|
},
|
|
18
|
-
"project": {
|
|
19
|
-
"description": "The Nest project to target.",
|
|
20
|
-
"type": "string",
|
|
21
|
-
"$default": {
|
|
22
|
-
"$source": "projectName"
|
|
23
|
-
},
|
|
24
|
-
"alias": "p",
|
|
25
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
26
|
-
},
|
|
27
18
|
"nameAndDirectoryFormat": {
|
|
28
19
|
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
|
29
20
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": false
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest controller language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption } from '../utils';
|
|
3
3
|
export type DecoratorGeneratorOptions = NestGeneratorWithLanguageOption;
|
|
4
|
-
export declare function decoratorGenerator(tree: Tree, rawOptions: DecoratorGeneratorOptions): Promise<
|
|
5
|
-
export declare function decoratorGeneratorInternal(tree: Tree, rawOptions: DecoratorGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function decoratorGenerator(tree: Tree, rawOptions: DecoratorGeneratorOptions): Promise<any>;
|
|
6
5
|
export default decoratorGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decoratorGenerator = decoratorGenerator;
|
|
4
|
-
exports.decoratorGeneratorInternal = decoratorGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function decoratorGenerator(tree, rawOptions) {
|
|
7
|
-
await decoratorGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function decoratorGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeDecoratorOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'decorator', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = decoratorGenerator;
|
|
17
10
|
async function normalizeDecoratorOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -40,12 +31,6 @@
|
|
|
40
31
|
"default": false,
|
|
41
32
|
"x-priority": "internal"
|
|
42
33
|
},
|
|
43
|
-
"flat": {
|
|
44
|
-
"description": "Flag to indicate if a directory is created.",
|
|
45
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
46
|
-
"type": "boolean",
|
|
47
|
-
"default": true
|
|
48
|
-
},
|
|
49
34
|
"language": {
|
|
50
35
|
"description": "Nest decorator language.",
|
|
51
36
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type FilterGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function filterGenerator(tree: Tree, rawOptions: FilterGeneratorOptions): Promise<
|
|
5
|
-
export declare function filterGeneratorInternal(tree: Tree, rawOptions: FilterGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function filterGenerator(tree: Tree, rawOptions: FilterGeneratorOptions): Promise<any>;
|
|
6
5
|
export default filterGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.filterGenerator = filterGenerator;
|
|
4
|
-
exports.filterGeneratorInternal = filterGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function filterGenerator(tree, rawOptions) {
|
|
7
|
-
await filterGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function filterGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeFilterOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'filter', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = filterGenerator;
|
|
17
10
|
async function normalizeFilterOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": true
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest filter language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type GatewayGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function gatewayGenerator(tree: Tree, rawOptions: GatewayGeneratorOptions): Promise<
|
|
5
|
-
export declare function gatewayGeneratorInternal(tree: Tree, rawOptions: GatewayGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function gatewayGenerator(tree: Tree, rawOptions: GatewayGeneratorOptions): Promise<any>;
|
|
6
5
|
export default gatewayGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.gatewayGenerator = gatewayGenerator;
|
|
4
|
-
exports.gatewayGeneratorInternal = gatewayGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function gatewayGenerator(tree, rawOptions) {
|
|
7
|
-
await gatewayGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function gatewayGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeGatewayOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'gateway', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = gatewayGenerator;
|
|
17
10
|
async function normalizeGatewayOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": true
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest gateway language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type GuardGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function guardGenerator(tree: Tree, rawOptions: GuardGeneratorOptions): Promise<
|
|
5
|
-
export declare function guardGeneratorInternal(tree: Tree, rawOptions: GuardGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function guardGenerator(tree: Tree, rawOptions: GuardGeneratorOptions): Promise<any>;
|
|
6
5
|
export default guardGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.guardGenerator = guardGenerator;
|
|
4
|
-
exports.guardGeneratorInternal = guardGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function guardGenerator(tree, rawOptions) {
|
|
7
|
-
await guardGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function guardGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeGuardOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'guard', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = guardGenerator;
|
|
17
10
|
async function normalizeGuardOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": true
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest guard language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type InterceptorGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function interceptorGenerator(tree: Tree, rawOptions: InterceptorGeneratorOptions): Promise<
|
|
5
|
-
export declare function interceptorGeneratorInternal(tree: Tree, rawOptions: InterceptorGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function interceptorGenerator(tree: Tree, rawOptions: InterceptorGeneratorOptions): Promise<any>;
|
|
6
5
|
export default interceptorGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.interceptorGenerator = interceptorGenerator;
|
|
4
|
-
exports.interceptorGeneratorInternal = interceptorGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function interceptorGenerator(tree, rawOptions) {
|
|
7
|
-
await interceptorGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function interceptorGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeInterceptorOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'interceptor', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = interceptorGenerator;
|
|
17
10
|
async function normalizeInterceptorOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": true
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest interceptor language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorOptions } from '../utils';
|
|
3
3
|
export type InterfaceGeneratorOptions = NestGeneratorOptions;
|
|
4
|
-
export declare function interfaceGenerator(tree: Tree, rawOptions: InterfaceGeneratorOptions): Promise<
|
|
5
|
-
export declare function interfaceGeneratorInternal(tree: Tree, rawOptions: InterfaceGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function interfaceGenerator(tree: Tree, rawOptions: InterfaceGeneratorOptions): Promise<any>;
|
|
6
5
|
export default interfaceGenerator;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.interfaceGenerator = interfaceGenerator;
|
|
4
|
-
exports.interfaceGeneratorInternal = interfaceGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function interfaceGenerator(tree, rawOptions) {
|
|
7
|
-
await
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function interfaceGeneratorInternal(tree, rawOptions) {
|
|
13
|
-
const options = await (0, utils_1.normalizeOptions)(tree, 'interface', '@nx/nest:interface', rawOptions);
|
|
6
|
+
const options = await (0, utils_1.normalizeOptions)(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'interface', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = interfaceGenerator;
|
|
@@ -13,7 +13,6 @@ async function normalizeOptions(tree, options) {
|
|
|
13
13
|
directory: options.directory,
|
|
14
14
|
importPath: options.importPath,
|
|
15
15
|
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
16
|
-
callingGenerator: '@nx/nest:library',
|
|
17
16
|
});
|
|
18
17
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
19
18
|
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
@@ -11,7 +11,6 @@ const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
|
11
11
|
async function libraryGenerator(tree, rawOptions) {
|
|
12
12
|
return await libraryGeneratorInternal(tree, {
|
|
13
13
|
addPlugin: false,
|
|
14
|
-
projectNameAndRootFormat: 'derived',
|
|
15
14
|
...rawOptions,
|
|
16
15
|
});
|
|
17
16
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"projectNameAndRootFormat": {
|
|
31
31
|
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
32
32
|
"type": "string",
|
|
33
|
-
"enum": ["as-provided"
|
|
33
|
+
"enum": ["as-provided"]
|
|
34
34
|
},
|
|
35
35
|
"linter": {
|
|
36
36
|
"description": "The tool to use for running lint checks.",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type MiddlewareGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function middlewareGenerator(tree: Tree, rawOptions: MiddlewareGeneratorOptions): Promise<
|
|
5
|
-
export declare function middlewareGeneratorInternal(tree: Tree, rawOptions: MiddlewareGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function middlewareGenerator(tree: Tree, rawOptions: MiddlewareGeneratorOptions): Promise<any>;
|
|
6
5
|
export default middlewareGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.middlewareGenerator = middlewareGenerator;
|
|
4
|
-
exports.middlewareGeneratorInternal = middlewareGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function middlewareGenerator(tree, rawOptions) {
|
|
7
|
-
await middlewareGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function middlewareGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeMiddlewareOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'middleware', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = middlewareGenerator;
|
|
17
10
|
async function normalizeMiddlewareOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -18,16 +18,7 @@
|
|
|
18
18
|
"nameAndDirectoryFormat": {
|
|
19
19
|
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
|
20
20
|
"type": "string",
|
|
21
|
-
"enum": ["as-provided"
|
|
22
|
-
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
21
|
+
"enum": ["as-provided"]
|
|
31
22
|
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": true
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest middleware language.",
|
|
57
42
|
"type": "string",
|
|
@@ -4,6 +4,5 @@ export type ModuleGeneratorOptions = NestGeneratorWithLanguageOption & {
|
|
|
4
4
|
module?: string;
|
|
5
5
|
skipImport?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function moduleGenerator(tree: Tree, rawOptions: ModuleGeneratorOptions): Promise<
|
|
8
|
-
export declare function moduleGeneratorInternal(tree: Tree, rawOptions: ModuleGeneratorOptions): Promise<any>;
|
|
7
|
+
export declare function moduleGenerator(tree: Tree, rawOptions: ModuleGeneratorOptions): Promise<any>;
|
|
9
8
|
export default moduleGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.moduleGenerator = moduleGenerator;
|
|
4
|
-
exports.moduleGeneratorInternal = moduleGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function moduleGenerator(tree, rawOptions) {
|
|
7
|
-
await moduleGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function moduleGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeModuleOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'module', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = moduleGenerator;
|
|
17
10
|
async function normalizeModuleOptions(tree, options) {
|
|
18
|
-
const normalizedOption = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOption = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOption,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -40,12 +31,6 @@
|
|
|
40
31
|
"default": false,
|
|
41
32
|
"x-priority": "internal"
|
|
42
33
|
},
|
|
43
|
-
"flat": {
|
|
44
|
-
"description": "Flag to indicate if a directory is created.",
|
|
45
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
46
|
-
"type": "boolean",
|
|
47
|
-
"default": false
|
|
48
|
-
},
|
|
49
34
|
"language": {
|
|
50
35
|
"description": "Nest module language.",
|
|
51
36
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type PipeGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function pipeGenerator(tree: Tree, rawOptions: PipeGeneratorOptions): Promise<
|
|
5
|
-
export declare function pipeGeneratorInternal(tree: Tree, rawOptions: PipeGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function pipeGenerator(tree: Tree, rawOptions: PipeGeneratorOptions): Promise<any>;
|
|
6
5
|
export default pipeGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pipeGenerator = pipeGenerator;
|
|
4
|
-
exports.pipeGeneratorInternal = pipeGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function pipeGenerator(tree, rawOptions) {
|
|
7
|
-
await pipeGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function pipeGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizePipeOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'pipe', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = pipeGenerator;
|
|
17
10
|
async function normalizePipeOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": true
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest pipe language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type ProviderGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function providerGenerator(tree: Tree, rawOptions: ProviderGeneratorOptions): Promise<
|
|
5
|
-
export declare function providerGeneratorInternal(tree: Tree, rawOptions: ProviderGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function providerGenerator(tree: Tree, rawOptions: ProviderGeneratorOptions): Promise<any>;
|
|
6
5
|
export default providerGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.providerGenerator = providerGenerator;
|
|
4
|
-
exports.providerGeneratorInternal = providerGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function providerGenerator(tree, rawOptions) {
|
|
7
|
-
await providerGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function providerGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeProviderOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'provider', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = providerGenerator;
|
|
17
10
|
async function normalizeProviderOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": true
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest provider language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type ResolverGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function resolverGenerator(tree: Tree, rawOptions: ResolverGeneratorOptions): Promise<
|
|
5
|
-
export declare function resolverGeneratorInternal(tree: Tree, rawOptions: ResolverGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function resolverGenerator(tree: Tree, rawOptions: ResolverGeneratorOptions): Promise<any>;
|
|
6
5
|
export default resolverGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolverGenerator = resolverGenerator;
|
|
4
|
-
exports.resolverGeneratorInternal = resolverGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function resolverGenerator(tree, rawOptions) {
|
|
7
|
-
await resolverGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function resolverGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeResolverOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'resolver', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = resolverGenerator;
|
|
17
10
|
async function normalizeResolverOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -15,15 +15,6 @@
|
|
|
15
15
|
},
|
|
16
16
|
"x-prompt": "What name would you like to use?"
|
|
17
17
|
},
|
|
18
|
-
"project": {
|
|
19
|
-
"description": "The Nest project to target.",
|
|
20
|
-
"type": "string",
|
|
21
|
-
"$default": {
|
|
22
|
-
"$source": "projectName"
|
|
23
|
-
},
|
|
24
|
-
"alias": "p",
|
|
25
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
26
|
-
},
|
|
27
18
|
"nameAndDirectoryFormat": {
|
|
28
19
|
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
29
20
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": false
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest resolver language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithResourceOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type ResourceGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption & NestGeneratorWithResourceOption;
|
|
4
|
-
export declare function resourceGenerator(tree: Tree, rawOptions: ResourceGeneratorOptions): Promise<
|
|
5
|
-
export declare function resourceGeneratorInternal(tree: Tree, rawOptions: ResourceGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function resourceGenerator(tree: Tree, rawOptions: ResourceGeneratorOptions): Promise<any>;
|
|
6
5
|
export default resourceGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resourceGenerator = resourceGenerator;
|
|
4
|
-
exports.resourceGeneratorInternal = resourceGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function resourceGenerator(tree, rawOptions) {
|
|
7
|
-
await resourceGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function resourceGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeResourceOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'resource', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = resourceGenerator;
|
|
17
10
|
async function normalizeResourceOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -15,15 +15,6 @@
|
|
|
15
15
|
},
|
|
16
16
|
"x-prompt": "What name would you like to use for this resource (plural, e.g., `users`)?"
|
|
17
17
|
},
|
|
18
|
-
"project": {
|
|
19
|
-
"description": "The Nest project to target.",
|
|
20
|
-
"type": "string",
|
|
21
|
-
"$default": {
|
|
22
|
-
"$source": "projectName"
|
|
23
|
-
},
|
|
24
|
-
"alias": "p",
|
|
25
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
26
|
-
},
|
|
27
18
|
"nameAndDirectoryFormat": {
|
|
28
19
|
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
29
20
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": false
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest class language.",
|
|
57
42
|
"type": "string",
|
|
@@ -20,15 +20,6 @@
|
|
|
20
20
|
"type": "string",
|
|
21
21
|
"enum": ["as-provided", "derived"]
|
|
22
22
|
},
|
|
23
|
-
"project": {
|
|
24
|
-
"description": "The Nest project to target.",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "projectName"
|
|
28
|
-
},
|
|
29
|
-
"alias": "p",
|
|
30
|
-
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
|
|
31
|
-
},
|
|
32
23
|
"directory": {
|
|
33
24
|
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
|
|
34
25
|
"type": "string",
|
|
@@ -46,12 +37,6 @@
|
|
|
46
37
|
"enum": ["jest", "none"],
|
|
47
38
|
"default": "jest"
|
|
48
39
|
},
|
|
49
|
-
"flat": {
|
|
50
|
-
"description": "Flag to indicate if a directory is created.",
|
|
51
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": false
|
|
54
|
-
},
|
|
55
40
|
"language": {
|
|
56
41
|
"description": "Nest service language.",
|
|
57
42
|
"type": "string",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
3
|
export type ServiceGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
-
export declare function serviceGenerator(tree: Tree, rawOptions: ServiceGeneratorOptions): Promise<
|
|
5
|
-
export declare function serviceGeneratorInternal(tree: Tree, rawOptions: ServiceGeneratorOptions): Promise<any>;
|
|
4
|
+
export declare function serviceGenerator(tree: Tree, rawOptions: ServiceGeneratorOptions): Promise<any>;
|
|
6
5
|
export default serviceGenerator;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serviceGenerator = serviceGenerator;
|
|
4
|
-
exports.serviceGeneratorInternal = serviceGeneratorInternal;
|
|
5
4
|
const utils_1 = require("../utils");
|
|
6
5
|
async function serviceGenerator(tree, rawOptions) {
|
|
7
|
-
await serviceGeneratorInternal(tree, {
|
|
8
|
-
nameAndDirectoryFormat: 'derived',
|
|
9
|
-
...rawOptions,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function serviceGeneratorInternal(tree, rawOptions) {
|
|
13
6
|
const options = await normalizeServiceOptions(tree, rawOptions);
|
|
14
7
|
return (0, utils_1.runNestSchematic)(tree, 'service', options);
|
|
15
8
|
}
|
|
16
9
|
exports.default = serviceGenerator;
|
|
17
10
|
async function normalizeServiceOptions(tree, options) {
|
|
18
|
-
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree,
|
|
11
|
+
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, options);
|
|
19
12
|
return {
|
|
20
13
|
...normalizedOptions,
|
|
21
14
|
language: options.language,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { NestGeneratorOptions, NormalizedOptions, UnitTestRunner } from './types';
|
|
3
|
-
export declare function normalizeOptions(tree: Tree,
|
|
3
|
+
export declare function normalizeOptions(tree: Tree, options: NestGeneratorOptions): Promise<NormalizedOptions>;
|
|
4
4
|
export declare function unitTestRunnerToSpec(unitTestRunner: UnitTestRunner | undefined): boolean | undefined;
|
|
@@ -3,15 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
exports.unitTestRunnerToSpec = unitTestRunnerToSpec;
|
|
5
5
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
6
|
-
async function normalizeOptions(tree,
|
|
6
|
+
async function normalizeOptions(tree, options) {
|
|
7
7
|
const { directory, fileName } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
|
8
|
-
callingGenerator,
|
|
9
|
-
artifactType,
|
|
10
8
|
name: options.name,
|
|
11
9
|
directory: options.directory,
|
|
12
|
-
project: options.project,
|
|
13
|
-
flat: options.flat,
|
|
14
|
-
derivedDirectory: options.directory,
|
|
15
10
|
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
|
16
11
|
});
|
|
17
12
|
return {
|
|
@@ -8,14 +8,6 @@ export type NestGeneratorOptions = {
|
|
|
8
8
|
directory?: string;
|
|
9
9
|
skipFormat?: boolean;
|
|
10
10
|
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.
|
|
13
|
-
*/
|
|
14
|
-
flat?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20.
|
|
17
|
-
*/
|
|
18
|
-
project?: string;
|
|
19
11
|
};
|
|
20
12
|
export type NestGeneratorWithLanguageOption = NestGeneratorOptions & {
|
|
21
13
|
language?: Language;
|