@nx/nest 17.0.4 → 17.0.6
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/LICENSE +1 -1
- package/README.md +4 -9
- package/package.json +6 -6
- package/src/generators/application/application.js +2 -9
- package/src/generators/application/lib/normalize-options.js +1 -7
- package/src/generators/application/schema.d.ts +0 -1
- package/src/generators/application/schema.json +1 -1
- package/src/generators/class/schema.json +3 -3
- package/src/generators/controller/schema.json +3 -3
- package/src/generators/decorator/schema.json +3 -3
- package/src/generators/filter/schema.json +3 -3
- package/src/generators/gateway/schema.json +3 -3
- package/src/generators/guard/schema.json +3 -3
- package/src/generators/init/init.d.ts +1 -1
- package/src/generators/init/init.js +12 -4
- package/src/generators/init/lib/add-dependencies.d.ts +1 -2
- package/src/generators/init/lib/add-dependencies.js +11 -3
- package/src/generators/init/lib/index.d.ts +1 -0
- package/src/generators/init/lib/index.js +1 -0
- package/src/generators/init/lib/normalize-options.d.ts +2 -0
- package/src/generators/init/lib/normalize-options.js +10 -0
- package/src/generators/init/schema.d.ts +1 -1
- package/src/generators/init/schema.json +8 -7
- package/src/generators/interceptor/schema.json +3 -3
- package/src/generators/interface/schema.json +3 -3
- package/src/generators/library/lib/normalize-options.js +1 -8
- package/src/generators/library/library.js +11 -21
- package/src/generators/library/schema.d.ts +0 -1
- package/src/generators/library/schema.json +1 -1
- package/src/generators/middleware/schema.json +3 -3
- package/src/generators/module/schema.json +3 -3
- package/src/generators/pipe/schema.json +3 -3
- package/src/generators/provider/schema.json +3 -3
- package/src/generators/resolver/schema.json +3 -3
- package/src/generators/resource/schema.json +3 -3
- package/src/generators/service/schema.json +3 -3
- package/src/generators/utils/types.d.ts +2 -2
- package/src/utils/ensure-dependencies.d.ts +0 -2
- package/src/utils/ensure-dependencies.js +0 -18
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
<p style="text-align: center;">
|
|
2
|
-
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
|
4
|
-
<img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
|
5
|
-
</picture>
|
|
6
|
-
</p>
|
|
1
|
+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
|
|
7
2
|
|
|
8
3
|
<div style="text-align: center;">
|
|
9
4
|
|
|
@@ -20,9 +15,9 @@
|
|
|
20
15
|
|
|
21
16
|
<hr>
|
|
22
17
|
|
|
23
|
-
# Nx: Smart
|
|
18
|
+
# Nx: Smart, Fast and Extensible Build System
|
|
24
19
|
|
|
25
|
-
Nx is a build system with
|
|
20
|
+
Nx is a next generation build system with first class monorepo support and powerful integrations.
|
|
26
21
|
|
|
27
22
|
This package is a [NestJS plugin for Nx](https://nx.dev/nest/overview).
|
|
28
23
|
|
|
@@ -64,5 +59,5 @@ npx nx@latest init
|
|
|
64
59
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
65
60
|
|
|
66
61
|
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
67
|
-
width="100%" alt="Nx - Smart
|
|
62
|
+
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
68
63
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nest",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "v17.0.6",
|
|
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": {
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@nestjs/schematics": "^9.1.0",
|
|
34
|
-
"@nx/devkit": "
|
|
35
|
-
"@nx/js": "
|
|
36
|
-
"@nx/eslint": "
|
|
37
|
-
"@nx/node": "
|
|
34
|
+
"@nx/devkit": "v17.0.6",
|
|
35
|
+
"@nx/js": "v17.0.6",
|
|
36
|
+
"@nx/eslint": "v17.0.6",
|
|
37
|
+
"@nx/node": "v17.0.6",
|
|
38
38
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nrwl/nest": "
|
|
40
|
+
"@nrwl/nest": "v17.0.6"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
@@ -5,10 +5,8 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const node_1 = require("@nx/node");
|
|
6
6
|
const init_1 = require("../init/init");
|
|
7
7
|
const lib_1 = require("./lib");
|
|
8
|
-
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
9
8
|
async function applicationGenerator(tree, rawOptions) {
|
|
10
9
|
return await applicationGeneratorInternal(tree, {
|
|
11
|
-
addPlugin: false,
|
|
12
10
|
projectNameAndRootFormat: 'derived',
|
|
13
11
|
...rawOptions,
|
|
14
12
|
});
|
|
@@ -16,23 +14,18 @@ async function applicationGenerator(tree, rawOptions) {
|
|
|
16
14
|
exports.applicationGenerator = applicationGenerator;
|
|
17
15
|
async function applicationGeneratorInternal(tree, rawOptions) {
|
|
18
16
|
const options = await (0, lib_1.normalizeOptions)(tree, rawOptions);
|
|
19
|
-
const tasks = [];
|
|
20
17
|
const initTask = await (0, init_1.initGenerator)(tree, {
|
|
21
18
|
skipPackageJson: options.skipPackageJson,
|
|
19
|
+
unitTestRunner: options.unitTestRunner,
|
|
22
20
|
skipFormat: true,
|
|
23
21
|
});
|
|
24
|
-
tasks.push(initTask);
|
|
25
22
|
const nodeApplicationTask = await (0, node_1.applicationGenerator)(tree, (0, lib_1.toNodeApplicationGeneratorOptions)(options));
|
|
26
|
-
tasks.push(nodeApplicationTask);
|
|
27
23
|
(0, lib_1.createFiles)(tree, options);
|
|
28
24
|
(0, lib_1.updateTsConfig)(tree, options);
|
|
29
|
-
if (!options.skipPackageJson) {
|
|
30
|
-
tasks.push((0, ensure_dependencies_1.ensureDependencies)(tree));
|
|
31
|
-
}
|
|
32
25
|
if (!options.skipFormat) {
|
|
33
26
|
await (0, devkit_1.formatFiles)(tree);
|
|
34
27
|
}
|
|
35
|
-
return (0, devkit_1.runTasksInSerial)(
|
|
28
|
+
return (0, devkit_1.runTasksInSerial)(initTask, nodeApplicationTask);
|
|
36
29
|
}
|
|
37
30
|
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
38
31
|
exports.default = applicationGenerator;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toNodeApplicationGeneratorOptions = exports.normalizeOptions = void 0;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
5
|
const eslint_1 = require("@nx/eslint");
|
|
7
6
|
async function normalizeOptions(tree, options) {
|
|
@@ -15,11 +14,7 @@ async function normalizeOptions(tree, options) {
|
|
|
15
14
|
});
|
|
16
15
|
options.rootProject = appProjectRoot === '.';
|
|
17
16
|
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
18
|
-
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
19
|
-
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
20
|
-
nxJson.useInferencePlugins !== false;
|
|
21
17
|
return {
|
|
22
|
-
addPlugin,
|
|
23
18
|
...options,
|
|
24
19
|
strict: options.strict ?? false,
|
|
25
20
|
appProjectName,
|
|
@@ -45,9 +40,8 @@ function toNodeApplicationGeneratorOptions(options) {
|
|
|
45
40
|
e2eTestRunner: options.e2eTestRunner,
|
|
46
41
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
47
42
|
rootProject: options.rootProject,
|
|
48
|
-
bundler: 'webpack',
|
|
43
|
+
bundler: 'webpack',
|
|
49
44
|
isNest: true,
|
|
50
|
-
addPlugin: options.addPlugin,
|
|
51
45
|
};
|
|
52
46
|
}
|
|
53
47
|
exports.toNodeApplicationGeneratorOptions = toNodeApplicationGeneratorOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestClassGenerator",
|
|
4
4
|
"title": "Nest Class Options Schema",
|
|
5
5
|
"description": "Nest Class Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestControllerGenerator",
|
|
4
4
|
"title": "Nest Controller Options Schema",
|
|
5
5
|
"description": "Nest Controller Options Schema.",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"$source": "projectName"
|
|
23
23
|
},
|
|
24
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
|
|
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 v18."
|
|
26
26
|
},
|
|
27
27
|
"nameAndDirectoryFormat": {
|
|
28
28
|
"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`).",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": false
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestDecoratorGenerator",
|
|
4
4
|
"title": "Nest Decorator Options Schema",
|
|
5
5
|
"description": "Nest Decorator Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"flat": {
|
|
44
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
|
|
45
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
46
46
|
"type": "boolean",
|
|
47
47
|
"default": true
|
|
48
48
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestFilterGenerator",
|
|
4
4
|
"title": "Nest Filter Options Schema",
|
|
5
5
|
"description": "Nest Filter Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestGatewayGenerator",
|
|
4
4
|
"title": "Nest Gateway Options Schema",
|
|
5
5
|
"description": "Nest Gateway Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestGuardGenerator",
|
|
4
4
|
"title": "Nest Guard Options Schema",
|
|
5
5
|
"description": "Nest Guard Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
2
|
import type { InitGeneratorOptions } from './schema';
|
|
3
|
-
export declare function initGenerator(tree: Tree,
|
|
3
|
+
export declare function initGenerator(tree: Tree, rawOptions: InitGeneratorOptions): Promise<GeneratorCallback>;
|
|
4
4
|
export default initGenerator;
|
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const node_1 = require("@nx/node");
|
|
5
6
|
const lib_1 = require("./lib");
|
|
6
|
-
async function initGenerator(tree,
|
|
7
|
-
|
|
7
|
+
async function initGenerator(tree, rawOptions) {
|
|
8
|
+
const options = (0, lib_1.normalizeOptions)(rawOptions);
|
|
9
|
+
const tasks = [];
|
|
10
|
+
const nodeInitTask = await (0, node_1.initGenerator)(tree, {
|
|
11
|
+
...options,
|
|
12
|
+
skipFormat: true,
|
|
13
|
+
});
|
|
14
|
+
tasks.push(nodeInitTask);
|
|
8
15
|
if (!options.skipPackageJson) {
|
|
9
|
-
installPackagesTask = (0, lib_1.addDependencies)(tree
|
|
16
|
+
const installPackagesTask = (0, lib_1.addDependencies)(tree);
|
|
17
|
+
tasks.push(installPackagesTask);
|
|
10
18
|
}
|
|
11
19
|
if (!options.skipFormat) {
|
|
12
20
|
await (0, devkit_1.formatFiles)(tree);
|
|
13
21
|
}
|
|
14
|
-
return
|
|
22
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
15
23
|
}
|
|
16
24
|
exports.initGenerator = initGenerator;
|
|
17
25
|
exports.default = initGenerator;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import type { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
|
-
|
|
3
|
-
export declare function addDependencies(tree: Tree, options: InitGeneratorOptions): GeneratorCallback;
|
|
2
|
+
export declare function addDependencies(tree: Tree): GeneratorCallback;
|
|
@@ -3,10 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addDependencies = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("../../../utils/versions");
|
|
6
|
-
function addDependencies(tree
|
|
7
|
-
return (0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
6
|
+
function addDependencies(tree) {
|
|
7
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
8
|
+
'@nestjs/common': versions_1.nestJsVersion,
|
|
9
|
+
'@nestjs/core': versions_1.nestJsVersion,
|
|
10
|
+
'@nestjs/platform-express': versions_1.nestJsVersion,
|
|
11
|
+
'reflect-metadata': versions_1.reflectMetadataVersion,
|
|
12
|
+
rxjs: versions_1.rxjsVersion,
|
|
13
|
+
tslib: versions_1.tsLibVersion,
|
|
14
|
+
}, {
|
|
8
15
|
'@nestjs/schematics': versions_1.nestJsSchematicsVersion,
|
|
16
|
+
'@nestjs/testing': versions_1.nestJsVersion,
|
|
9
17
|
'@nx/nest': versions_1.nxVersion,
|
|
10
|
-
}
|
|
18
|
+
});
|
|
11
19
|
}
|
|
12
20
|
exports.addDependencies = addDependencies;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeOptions = void 0;
|
|
4
|
+
function normalizeOptions(options) {
|
|
5
|
+
return {
|
|
6
|
+
...options,
|
|
7
|
+
unitTestRunner: options.unitTestRunner ?? 'jest',
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
exports.normalizeOptions = normalizeOptions;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestInitGenerator",
|
|
4
4
|
"title": "Init Nest Plugin",
|
|
5
5
|
"description": "Init Nest Plugin.",
|
|
6
6
|
"cli": "nx",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
|
+
"unitTestRunner": {
|
|
10
|
+
"description": "Adds the specified unit test runner.",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": ["jest", "none"],
|
|
13
|
+
"default": "jest"
|
|
14
|
+
},
|
|
9
15
|
"skipFormat": {
|
|
10
16
|
"description": "Skip formatting files.",
|
|
11
17
|
"type": "boolean",
|
|
@@ -16,13 +22,8 @@
|
|
|
16
22
|
"type": "boolean",
|
|
17
23
|
"default": false,
|
|
18
24
|
"x-priority": "internal"
|
|
19
|
-
},
|
|
20
|
-
"keepExistingVersions": {
|
|
21
|
-
"type": "boolean",
|
|
22
|
-
"x-priority": "internal",
|
|
23
|
-
"description": "Keep existing dependencies versions",
|
|
24
|
-
"default": false
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
+
"additionalProperties": false,
|
|
27
28
|
"required": []
|
|
28
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestInterceptorGenerator",
|
|
4
4
|
"title": "Nest Interceptor Options Schema",
|
|
5
5
|
"description": "Nest Interceptor Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestInterfaceGenerator",
|
|
4
4
|
"title": "Nest Interface Options Schema",
|
|
5
5
|
"description": "Nest Interface Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"flat": {
|
|
44
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
|
|
45
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
46
46
|
"type": "boolean",
|
|
47
47
|
"default": true
|
|
48
48
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toJsLibraryGeneratorOptions = exports.normalizeOptions = void 0;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
5
|
const get_npm_scope_1 = require("@nx/js/src/utils/package-json/get-npm-scope");
|
|
7
6
|
const eslint_1 = require("@nx/eslint");
|
|
@@ -14,10 +13,6 @@ async function normalizeOptions(tree, options) {
|
|
|
14
13
|
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
15
14
|
callingGenerator: '@nx/nest:library',
|
|
16
15
|
});
|
|
17
|
-
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
18
|
-
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
19
|
-
nxJson.useInferencePlugins !== false;
|
|
20
|
-
options.addPlugin ??= addPlugin;
|
|
21
16
|
const fileName = options.simpleName
|
|
22
17
|
? projectNames.projectSimpleName
|
|
23
18
|
: projectNames.projectFileName;
|
|
@@ -32,7 +27,7 @@ async function normalizeOptions(tree, options) {
|
|
|
32
27
|
global: options.global ?? false,
|
|
33
28
|
linter: options.linter ?? eslint_1.Linter.EsLint,
|
|
34
29
|
parsedTags,
|
|
35
|
-
prefix: (0, get_npm_scope_1.getNpmScope)(tree),
|
|
30
|
+
prefix: (0, get_npm_scope_1.getNpmScope)(tree),
|
|
36
31
|
projectName,
|
|
37
32
|
projectRoot,
|
|
38
33
|
importPath,
|
|
@@ -54,7 +49,6 @@ function toJsLibraryGeneratorOptions(options) {
|
|
|
54
49
|
publishable: options.publishable,
|
|
55
50
|
skipFormat: true,
|
|
56
51
|
skipTsConfig: options.skipTsConfig,
|
|
57
|
-
skipPackageJson: options.skipPackageJson,
|
|
58
52
|
strict: options.strict,
|
|
59
53
|
tags: options.tags,
|
|
60
54
|
testEnvironment: options.testEnvironment,
|
|
@@ -62,7 +56,6 @@ function toJsLibraryGeneratorOptions(options) {
|
|
|
62
56
|
config: options.standaloneConfig ? 'project' : 'workspace',
|
|
63
57
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
64
58
|
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
65
|
-
addPlugin: options.addPlugin,
|
|
66
59
|
};
|
|
67
60
|
}
|
|
68
61
|
exports.toJsLibraryGeneratorOptions = toJsLibraryGeneratorOptions;
|
|
@@ -3,38 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.libraryGeneratorInternal = exports.libraryGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
|
-
const lib_1 = require("
|
|
7
|
-
const
|
|
8
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
9
|
-
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
6
|
+
const lib_1 = require("../init/lib");
|
|
7
|
+
const lib_2 = require("./lib");
|
|
10
8
|
async function libraryGenerator(tree, rawOptions) {
|
|
11
9
|
return await libraryGeneratorInternal(tree, {
|
|
12
|
-
addPlugin: false,
|
|
13
10
|
projectNameAndRootFormat: 'derived',
|
|
14
11
|
...rawOptions,
|
|
15
12
|
});
|
|
16
13
|
}
|
|
17
14
|
exports.libraryGenerator = libraryGenerator;
|
|
18
15
|
async function libraryGeneratorInternal(tree, rawOptions) {
|
|
19
|
-
const options = await (0,
|
|
20
|
-
await (0, js_1.libraryGenerator)(tree, (0,
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
(0,
|
|
24
|
-
(0,
|
|
25
|
-
(0,
|
|
26
|
-
(0,
|
|
27
|
-
(0, lib_1.addProject)(tree, options);
|
|
16
|
+
const options = await (0, lib_2.normalizeOptions)(tree, rawOptions);
|
|
17
|
+
await (0, js_1.libraryGenerator)(tree, (0, lib_2.toJsLibraryGeneratorOptions)(options));
|
|
18
|
+
const installDepsTask = (0, lib_1.addDependencies)(tree);
|
|
19
|
+
(0, lib_2.deleteFiles)(tree, options);
|
|
20
|
+
(0, lib_2.createFiles)(tree, options);
|
|
21
|
+
(0, lib_2.addExportsToBarrelFile)(tree, options);
|
|
22
|
+
(0, lib_2.updateTsConfig)(tree, options);
|
|
23
|
+
(0, lib_2.addProject)(tree, options);
|
|
28
24
|
if (!options.skipFormat) {
|
|
29
25
|
await (0, devkit_1.formatFiles)(tree);
|
|
30
26
|
}
|
|
31
|
-
return
|
|
32
|
-
initTask,
|
|
33
|
-
depsTask,
|
|
34
|
-
() => {
|
|
35
|
-
(0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
|
|
36
|
-
},
|
|
37
|
-
]);
|
|
27
|
+
return installDepsTask;
|
|
38
28
|
}
|
|
39
29
|
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
40
30
|
exports.default = libraryGenerator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestMiddlewareGenerator",
|
|
4
4
|
"title": "Nest Middleware Options Schema",
|
|
5
5
|
"description": "Nest Middleware Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestModuleGenerator",
|
|
4
4
|
"title": "Nest Module Options Schema",
|
|
5
5
|
"description": "Nest Module Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"flat": {
|
|
44
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
|
|
45
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
46
46
|
"type": "boolean",
|
|
47
47
|
"default": false
|
|
48
48
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestPipeGenerator",
|
|
4
4
|
"title": "Nest Pipe Options Schema",
|
|
5
5
|
"description": "Nest Pipe Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestProviderGenerator",
|
|
4
4
|
"title": "Nest Provider Options Schema",
|
|
5
5
|
"description": "Nest Provider Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": true
|
|
54
54
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestResolverGenerator",
|
|
4
4
|
"title": "Nest Resolver Options Schema",
|
|
5
5
|
"description": "Nest Resolver Options Schema.",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"$source": "projectName"
|
|
23
23
|
},
|
|
24
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
|
|
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 v18."
|
|
26
26
|
},
|
|
27
27
|
"directory": {
|
|
28
28
|
"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.",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"flat": {
|
|
45
45
|
"description": "Flag to indicate if a directory is created.",
|
|
46
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx
|
|
46
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
47
47
|
"type": "boolean",
|
|
48
48
|
"default": false
|
|
49
49
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestResourceGenerator",
|
|
4
4
|
"title": "Nest Resource Options Schema",
|
|
5
5
|
"description": "Nest Resource Options Schema.",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"$source": "projectName"
|
|
23
23
|
},
|
|
24
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
|
|
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 v18."
|
|
26
26
|
},
|
|
27
27
|
"directory": {
|
|
28
28
|
"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.",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"flat": {
|
|
45
45
|
"description": "Flag to indicate if a directory is created.",
|
|
46
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx
|
|
46
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
47
47
|
"type": "boolean",
|
|
48
48
|
"default": false
|
|
49
49
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxNestServiceGenerator",
|
|
4
4
|
"title": "Nest Service Options Schema",
|
|
5
5
|
"description": "Nest Service Options Schema.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"$source": "projectName"
|
|
28
28
|
},
|
|
29
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
|
|
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 v18."
|
|
31
31
|
},
|
|
32
32
|
"directory": {
|
|
33
33
|
"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.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"flat": {
|
|
50
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
|
|
51
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.",
|
|
52
52
|
"type": "boolean",
|
|
53
53
|
"default": false
|
|
54
54
|
},
|
|
@@ -9,11 +9,11 @@ export type NestGeneratorOptions = {
|
|
|
9
9
|
skipFormat?: boolean;
|
|
10
10
|
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx
|
|
12
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.
|
|
13
13
|
*/
|
|
14
14
|
flat?: boolean;
|
|
15
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
|
|
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 v18.
|
|
17
17
|
*/
|
|
18
18
|
project?: string;
|
|
19
19
|
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureDependencies = void 0;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const versions_1 = require("./versions");
|
|
6
|
-
function ensureDependencies(tree) {
|
|
7
|
-
return (0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
8
|
-
'@nestjs/common': versions_1.nestJsVersion,
|
|
9
|
-
'@nestjs/core': versions_1.nestJsVersion,
|
|
10
|
-
'@nestjs/platform-express': versions_1.nestJsVersion,
|
|
11
|
-
'reflect-metadata': versions_1.reflectMetadataVersion,
|
|
12
|
-
rxjs: versions_1.rxjsVersion,
|
|
13
|
-
tslib: versions_1.tsLibVersion,
|
|
14
|
-
}, {
|
|
15
|
-
'@nestjs/testing': versions_1.nestJsVersion,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
exports.ensureDependencies = ensureDependencies;
|