@nx/nest 19.4.3 → 19.5.0-beta.1
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/package.json +6 -6
- package/src/generators/application/application.js +2 -3
- package/src/generators/application/lib/create-files.js +1 -2
- package/src/generators/application/lib/normalize-options.js +2 -3
- package/src/generators/application/lib/update-tsconfig.js +1 -2
- package/src/generators/class/class.js +2 -3
- package/src/generators/controller/controller.js +2 -3
- package/src/generators/decorator/decorator.js +2 -3
- package/src/generators/filter/filter.js +2 -3
- package/src/generators/gateway/gateway.js +2 -3
- package/src/generators/guard/guard.js +2 -3
- package/src/generators/init/init.js +1 -2
- package/src/generators/init/lib/add-dependencies.js +1 -2
- package/src/generators/interceptor/interceptor.js +2 -3
- package/src/generators/interface/interface.js +2 -3
- package/src/generators/library/lib/add-exports-to-barrel.js +1 -2
- package/src/generators/library/lib/add-project.js +1 -2
- package/src/generators/library/lib/create-files.js +1 -2
- package/src/generators/library/lib/delete-files.js +1 -2
- package/src/generators/library/lib/normalize-options.js +2 -3
- package/src/generators/library/lib/update-tsconfig.js +1 -2
- package/src/generators/library/library.js +2 -3
- package/src/generators/middleware/middleware.js +2 -3
- package/src/generators/module/module.js +2 -3
- package/src/generators/pipe/pipe.js +2 -3
- package/src/generators/provider/provider.js +2 -3
- package/src/generators/resolver/resolver.js +2 -3
- package/src/generators/resource/resource.js +2 -3
- package/src/generators/service/service.js +2 -3
- package/src/generators/utils/normalize-options.js +2 -3
- package/src/generators/utils/run-nest-schematic.js +1 -2
- package/src/generators/utils/testing.js +1 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +1 -1
- package/src/migrations/update-16-4-0-cache-manager/nestjs-10-updates.js +3 -4
- package/src/utils/ensure-dependencies.js +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nest",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.5.0-beta.1",
|
|
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": "19.
|
|
36
|
-
"@nx/js": "19.
|
|
37
|
-
"@nx/eslint": "19.
|
|
38
|
-
"@nx/node": "19.
|
|
35
|
+
"@nx/devkit": "19.5.0-beta.1",
|
|
36
|
+
"@nx/js": "19.5.0-beta.1",
|
|
37
|
+
"@nx/eslint": "19.5.0-beta.1",
|
|
38
|
+
"@nx/node": "19.5.0-beta.1",
|
|
39
39
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
40
40
|
"tslib": "^2.3.0",
|
|
41
|
-
"@nrwl/nest": "19.
|
|
41
|
+
"@nrwl/nest": "19.5.0-beta.1"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.applicationGenerator = applicationGenerator;
|
|
4
|
+
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const node_1 = require("@nx/node");
|
|
6
7
|
const init_1 = require("../init/init");
|
|
@@ -13,7 +14,6 @@ async function applicationGenerator(tree, rawOptions) {
|
|
|
13
14
|
...rawOptions,
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
|
-
exports.applicationGenerator = applicationGenerator;
|
|
17
17
|
async function applicationGeneratorInternal(tree, rawOptions) {
|
|
18
18
|
const options = await (0, lib_1.normalizeOptions)(tree, rawOptions);
|
|
19
19
|
const tasks = [];
|
|
@@ -34,5 +34,4 @@ async function applicationGeneratorInternal(tree, rawOptions) {
|
|
|
34
34
|
}
|
|
35
35
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
36
36
|
}
|
|
37
|
-
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
38
37
|
exports.default = applicationGenerator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFiles =
|
|
3
|
+
exports.createFiles = createFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function createFiles(tree, options) {
|
|
6
6
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '..', 'files'), (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'src'), {
|
|
@@ -9,4 +9,3 @@ function createFiles(tree, options) {
|
|
|
9
9
|
root: options.appProjectRoot,
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
exports.createFiles = createFiles;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
exports.toNodeApplicationGeneratorOptions = toNodeApplicationGeneratorOptions;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
7
|
const eslint_1 = require("@nx/eslint");
|
|
@@ -29,7 +30,6 @@ async function normalizeOptions(tree, options) {
|
|
|
29
30
|
e2eTestRunner: options.e2eTestRunner ?? 'jest',
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
exports.normalizeOptions = normalizeOptions;
|
|
33
33
|
function toNodeApplicationGeneratorOptions(options) {
|
|
34
34
|
return {
|
|
35
35
|
name: options.name,
|
|
@@ -50,4 +50,3 @@ function toNodeApplicationGeneratorOptions(options) {
|
|
|
50
50
|
addPlugin: options.addPlugin,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
exports.toNodeApplicationGeneratorOptions = toNodeApplicationGeneratorOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTsConfig =
|
|
3
|
+
exports.updateTsConfig = updateTsConfig;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function updateTsConfig(tree, options) {
|
|
6
6
|
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json'), (json) => {
|
|
@@ -19,4 +19,3 @@ function updateTsConfig(tree, options) {
|
|
|
19
19
|
return json;
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
exports.updateTsConfig = updateTsConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.classGenerator = classGenerator;
|
|
4
|
+
exports.classGeneratorInternal = classGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function classGenerator(tree, rawOptions) {
|
|
6
7
|
await classGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function classGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.classGenerator = classGenerator;
|
|
12
12
|
async function classGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeClassOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'class', options);
|
|
15
15
|
}
|
|
16
|
-
exports.classGeneratorInternal = classGeneratorInternal;
|
|
17
16
|
exports.default = classGenerator;
|
|
18
17
|
async function normalizeClassOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'class', '@nx/nest:class', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.controllerGenerator = controllerGenerator;
|
|
4
|
+
exports.controllerGeneratorInternal = controllerGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function controllerGenerator(tree, rawOptions) {
|
|
6
7
|
await controllerGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function controllerGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.controllerGenerator = controllerGenerator;
|
|
12
12
|
async function controllerGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeControllerOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'controller', options);
|
|
15
15
|
}
|
|
16
|
-
exports.controllerGeneratorInternal = controllerGeneratorInternal;
|
|
17
16
|
exports.default = controllerGenerator;
|
|
18
17
|
async function normalizeControllerOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'controller', '@nx/nest:controller', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.decoratorGenerator = decoratorGenerator;
|
|
4
|
+
exports.decoratorGeneratorInternal = decoratorGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function decoratorGenerator(tree, rawOptions) {
|
|
6
7
|
await decoratorGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function decoratorGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.decoratorGenerator = decoratorGenerator;
|
|
12
12
|
async function decoratorGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeDecoratorOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'decorator', options);
|
|
15
15
|
}
|
|
16
|
-
exports.decoratorGeneratorInternal = decoratorGeneratorInternal;
|
|
17
16
|
exports.default = decoratorGenerator;
|
|
18
17
|
async function normalizeDecoratorOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'decorator', '@nx/nest:decorator', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.filterGenerator = filterGenerator;
|
|
4
|
+
exports.filterGeneratorInternal = filterGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function filterGenerator(tree, rawOptions) {
|
|
6
7
|
await filterGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function filterGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.filterGenerator = filterGenerator;
|
|
12
12
|
async function filterGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeFilterOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'filter', options);
|
|
15
15
|
}
|
|
16
|
-
exports.filterGeneratorInternal = filterGeneratorInternal;
|
|
17
16
|
exports.default = filterGenerator;
|
|
18
17
|
async function normalizeFilterOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'filter', '@nx/nest:filter', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.gatewayGenerator = gatewayGenerator;
|
|
4
|
+
exports.gatewayGeneratorInternal = gatewayGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function gatewayGenerator(tree, rawOptions) {
|
|
6
7
|
await gatewayGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function gatewayGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.gatewayGenerator = gatewayGenerator;
|
|
12
12
|
async function gatewayGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeGatewayOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'gateway', options);
|
|
15
15
|
}
|
|
16
|
-
exports.gatewayGeneratorInternal = gatewayGeneratorInternal;
|
|
17
16
|
exports.default = gatewayGenerator;
|
|
18
17
|
async function normalizeGatewayOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'gateway', '@nx/nest:gateway', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.guardGenerator = guardGenerator;
|
|
4
|
+
exports.guardGeneratorInternal = guardGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function guardGenerator(tree, rawOptions) {
|
|
6
7
|
await guardGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function guardGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.guardGenerator = guardGenerator;
|
|
12
12
|
async function guardGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeGuardOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'guard', options);
|
|
15
15
|
}
|
|
16
|
-
exports.guardGeneratorInternal = guardGeneratorInternal;
|
|
17
16
|
exports.default = guardGenerator;
|
|
18
17
|
async function normalizeGuardOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'guard', '@nx/nest:guard', options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initGenerator =
|
|
3
|
+
exports.initGenerator = initGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const lib_1 = require("./lib");
|
|
6
6
|
async function initGenerator(tree, options) {
|
|
@@ -13,5 +13,4 @@ async function initGenerator(tree, options) {
|
|
|
13
13
|
}
|
|
14
14
|
return installPackagesTask;
|
|
15
15
|
}
|
|
16
|
-
exports.initGenerator = initGenerator;
|
|
17
16
|
exports.default = initGenerator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addDependencies =
|
|
3
|
+
exports.addDependencies = addDependencies;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("../../../utils/versions");
|
|
6
6
|
function addDependencies(tree, options) {
|
|
@@ -9,4 +9,3 @@ function addDependencies(tree, options) {
|
|
|
9
9
|
'@nx/nest': versions_1.nxVersion,
|
|
10
10
|
}, undefined, options.keepExistingVersions);
|
|
11
11
|
}
|
|
12
|
-
exports.addDependencies = addDependencies;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.interceptorGenerator = interceptorGenerator;
|
|
4
|
+
exports.interceptorGeneratorInternal = interceptorGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function interceptorGenerator(tree, rawOptions) {
|
|
6
7
|
await interceptorGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function interceptorGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.interceptorGenerator = interceptorGenerator;
|
|
12
12
|
async function interceptorGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeInterceptorOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'interceptor', options);
|
|
15
15
|
}
|
|
16
|
-
exports.interceptorGeneratorInternal = interceptorGeneratorInternal;
|
|
17
16
|
exports.default = interceptorGenerator;
|
|
18
17
|
async function normalizeInterceptorOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'interceptor', '@nx/nest:interceptor', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.interfaceGenerator = interfaceGenerator;
|
|
4
|
+
exports.interfaceGeneratorInternal = interfaceGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function interfaceGenerator(tree, rawOptions) {
|
|
6
7
|
await interfaceGeneratorInternal(tree, {
|
|
@@ -8,10 +9,8 @@ async function interfaceGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.interfaceGenerator = interfaceGenerator;
|
|
12
12
|
async function interfaceGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await (0, utils_1.normalizeOptions)(tree, 'interface', '@nx/nest:interface', rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'interface', options);
|
|
15
15
|
}
|
|
16
|
-
exports.interfaceGeneratorInternal = interfaceGeneratorInternal;
|
|
17
16
|
exports.default = interfaceGenerator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addExportsToBarrelFile =
|
|
3
|
+
exports.addExportsToBarrelFile = addExportsToBarrelFile;
|
|
4
4
|
const js_1 = require("@nx/js");
|
|
5
5
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
6
6
|
let tsModule;
|
|
@@ -22,4 +22,3 @@ function addExportsToBarrelFile(tree, options) {
|
|
|
22
22
|
sourceFile = (0, js_1.addGlobal)(tree, sourceFile, indexPath, `export * from './lib/${options.fileName}.controller';`);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
exports.addExportsToBarrelFile = addExportsToBarrelFile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addProject =
|
|
3
|
+
exports.addProject = addProject;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function addProject(tree, options) {
|
|
6
6
|
if (!options.publishable && !options.buildable) {
|
|
@@ -20,4 +20,3 @@ function addProject(tree, options) {
|
|
|
20
20
|
};
|
|
21
21
|
(0, devkit_1.updateProjectConfiguration)(tree, options.projectName, project);
|
|
22
22
|
}
|
|
23
|
-
exports.addProject = addProject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFiles =
|
|
3
|
+
exports.createFiles = createFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function createFiles(tree, options) {
|
|
6
6
|
const substitutions = {
|
|
@@ -24,4 +24,3 @@ function createFiles(tree, options) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
exports.createFiles = createFiles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteFiles =
|
|
3
|
+
exports.deleteFiles = deleteFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function deleteFiles(tree, options) {
|
|
6
6
|
tree.delete((0, devkit_1.joinPathFragments)(options.projectRoot, 'src', 'lib', `${options.fileName}.ts`));
|
|
@@ -11,4 +11,3 @@ function deleteFiles(tree, options) {
|
|
|
11
11
|
tree.delete((0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
exports.deleteFiles = deleteFiles;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
exports.toJsLibraryGeneratorOptions = toJsLibraryGeneratorOptions;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
7
|
const get_npm_scope_1 = require("@nx/js/src/utils/package-json/get-npm-scope");
|
|
@@ -43,7 +44,6 @@ async function normalizeOptions(tree, options) {
|
|
|
43
44
|
};
|
|
44
45
|
return normalized;
|
|
45
46
|
}
|
|
46
|
-
exports.normalizeOptions = normalizeOptions;
|
|
47
47
|
function toJsLibraryGeneratorOptions(options) {
|
|
48
48
|
return {
|
|
49
49
|
name: options.name,
|
|
@@ -65,4 +65,3 @@ function toJsLibraryGeneratorOptions(options) {
|
|
|
65
65
|
addPlugin: options.addPlugin,
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
exports.toJsLibraryGeneratorOptions = toJsLibraryGeneratorOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTsConfig =
|
|
3
|
+
exports.updateTsConfig = updateTsConfig;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function updateTsConfig(tree, options) {
|
|
6
6
|
const project = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
|
|
@@ -19,4 +19,3 @@ function updateTsConfig(tree, options) {
|
|
|
19
19
|
return json;
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
exports.updateTsConfig = updateTsConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.libraryGenerator = libraryGenerator;
|
|
4
|
+
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const js_1 = require("@nx/js");
|
|
6
7
|
const lib_1 = require("./lib");
|
|
@@ -14,7 +15,6 @@ async function libraryGenerator(tree, rawOptions) {
|
|
|
14
15
|
...rawOptions,
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
|
-
exports.libraryGenerator = libraryGenerator;
|
|
18
18
|
async function libraryGeneratorInternal(tree, rawOptions) {
|
|
19
19
|
const options = await (0, lib_1.normalizeOptions)(tree, rawOptions);
|
|
20
20
|
await (0, js_1.libraryGenerator)(tree, (0, lib_1.toJsLibraryGeneratorOptions)(options));
|
|
@@ -36,5 +36,4 @@ async function libraryGeneratorInternal(tree, rawOptions) {
|
|
|
36
36
|
},
|
|
37
37
|
]);
|
|
38
38
|
}
|
|
39
|
-
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
40
39
|
exports.default = libraryGenerator;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.middlewareGenerator = middlewareGenerator;
|
|
4
|
+
exports.middlewareGeneratorInternal = middlewareGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function middlewareGenerator(tree, rawOptions) {
|
|
6
7
|
await middlewareGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function middlewareGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.middlewareGenerator = middlewareGenerator;
|
|
12
12
|
async function middlewareGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeMiddlewareOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'middleware', options);
|
|
15
15
|
}
|
|
16
|
-
exports.middlewareGeneratorInternal = middlewareGeneratorInternal;
|
|
17
16
|
exports.default = middlewareGenerator;
|
|
18
17
|
async function normalizeMiddlewareOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'middleware', '@nx/nest:middleware', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.moduleGenerator = moduleGenerator;
|
|
4
|
+
exports.moduleGeneratorInternal = moduleGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function moduleGenerator(tree, rawOptions) {
|
|
6
7
|
await moduleGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function moduleGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.moduleGenerator = moduleGenerator;
|
|
12
12
|
async function moduleGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeModuleOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'module', options);
|
|
15
15
|
}
|
|
16
|
-
exports.moduleGeneratorInternal = moduleGeneratorInternal;
|
|
17
16
|
exports.default = moduleGenerator;
|
|
18
17
|
async function normalizeModuleOptions(tree, options) {
|
|
19
18
|
const normalizedOption = await (0, utils_1.normalizeOptions)(tree, 'module', '@nx/nest:module', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.pipeGenerator = pipeGenerator;
|
|
4
|
+
exports.pipeGeneratorInternal = pipeGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function pipeGenerator(tree, rawOptions) {
|
|
6
7
|
await pipeGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function pipeGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.pipeGenerator = pipeGenerator;
|
|
12
12
|
async function pipeGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizePipeOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'pipe', options);
|
|
15
15
|
}
|
|
16
|
-
exports.pipeGeneratorInternal = pipeGeneratorInternal;
|
|
17
16
|
exports.default = pipeGenerator;
|
|
18
17
|
async function normalizePipeOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'pipe', '@nx/nest:pipe', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.providerGenerator = providerGenerator;
|
|
4
|
+
exports.providerGeneratorInternal = providerGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function providerGenerator(tree, rawOptions) {
|
|
6
7
|
await providerGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function providerGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.providerGenerator = providerGenerator;
|
|
12
12
|
async function providerGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeProviderOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'provider', options);
|
|
15
15
|
}
|
|
16
|
-
exports.providerGeneratorInternal = providerGeneratorInternal;
|
|
17
16
|
exports.default = providerGenerator;
|
|
18
17
|
async function normalizeProviderOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'provider', '@nx/nest:provider', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolverGenerator = resolverGenerator;
|
|
4
|
+
exports.resolverGeneratorInternal = resolverGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function resolverGenerator(tree, rawOptions) {
|
|
6
7
|
await resolverGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function resolverGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.resolverGenerator = resolverGenerator;
|
|
12
12
|
async function resolverGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeResolverOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'resolver', options);
|
|
15
15
|
}
|
|
16
|
-
exports.resolverGeneratorInternal = resolverGeneratorInternal;
|
|
17
16
|
exports.default = resolverGenerator;
|
|
18
17
|
async function normalizeResolverOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'resolver', '@nx/nest:resolver', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resourceGenerator = resourceGenerator;
|
|
4
|
+
exports.resourceGeneratorInternal = resourceGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function resourceGenerator(tree, rawOptions) {
|
|
6
7
|
await resourceGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function resourceGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.resourceGenerator = resourceGenerator;
|
|
12
12
|
async function resourceGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeResourceOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'resource', options);
|
|
15
15
|
}
|
|
16
|
-
exports.resourceGeneratorInternal = resourceGeneratorInternal;
|
|
17
16
|
exports.default = resourceGenerator;
|
|
18
17
|
async function normalizeResourceOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'resource', '@nx/nest:resource', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.serviceGenerator = serviceGenerator;
|
|
4
|
+
exports.serviceGeneratorInternal = serviceGeneratorInternal;
|
|
4
5
|
const utils_1 = require("../utils");
|
|
5
6
|
async function serviceGenerator(tree, rawOptions) {
|
|
6
7
|
await serviceGeneratorInternal(tree, {
|
|
@@ -8,12 +9,10 @@ async function serviceGenerator(tree, rawOptions) {
|
|
|
8
9
|
...rawOptions,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
exports.serviceGenerator = serviceGenerator;
|
|
12
12
|
async function serviceGeneratorInternal(tree, rawOptions) {
|
|
13
13
|
const options = await normalizeServiceOptions(tree, rawOptions);
|
|
14
14
|
return (0, utils_1.runNestSchematic)(tree, 'service', options);
|
|
15
15
|
}
|
|
16
|
-
exports.serviceGeneratorInternal = serviceGeneratorInternal;
|
|
17
16
|
exports.default = serviceGenerator;
|
|
18
17
|
async function normalizeServiceOptions(tree, options) {
|
|
19
18
|
const normalizedOptions = await (0, utils_1.normalizeOptions)(tree, 'service', '@nx/nest:service', options);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
exports.unitTestRunnerToSpec = unitTestRunnerToSpec;
|
|
4
5
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
5
6
|
async function normalizeOptions(tree, artifactType, callingGenerator, options) {
|
|
6
7
|
const { directory, fileName } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
|
@@ -21,8 +22,6 @@ async function normalizeOptions(tree, artifactType, callingGenerator, options) {
|
|
|
21
22
|
sourceRoot: directory,
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
|
-
exports.normalizeOptions = normalizeOptions;
|
|
25
25
|
function unitTestRunnerToSpec(unitTestRunner) {
|
|
26
26
|
return unitTestRunner !== undefined ? unitTestRunner === 'jest' : undefined;
|
|
27
27
|
}
|
|
28
|
-
exports.unitTestRunnerToSpec = unitTestRunnerToSpec;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runNestSchematic =
|
|
3
|
+
exports.runNestSchematic = runNestSchematic;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
async function runNestSchematic(tree, schematic, options) {
|
|
6
6
|
const { skipFormat, ...schematicOptions } = options;
|
|
@@ -12,4 +12,3 @@ async function runNestSchematic(tree, schematic, options) {
|
|
|
12
12
|
}
|
|
13
13
|
return result;
|
|
14
14
|
}
|
|
15
|
-
exports.runNestSchematic = runNestSchematic;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTreeWithNestApplication =
|
|
3
|
+
exports.createTreeWithNestApplication = createTreeWithNestApplication;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const testing_1 = require("@nx/devkit/testing");
|
|
6
6
|
function createTreeWithNestApplication(appName) {
|
|
@@ -13,4 +13,3 @@ function createTreeWithNestApplication(appName) {
|
|
|
13
13
|
});
|
|
14
14
|
return tree;
|
|
15
15
|
}
|
|
16
|
-
exports.createTreeWithNestApplication = createTreeWithNestApplication;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = replacePackage;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
|
|
5
6
|
async function replacePackage(tree) {
|
|
6
7
|
await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/nest', '@nx/nest');
|
|
7
8
|
await (0, devkit_1.formatFiles)(tree);
|
|
8
9
|
}
|
|
9
|
-
exports.default = replacePackage;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.updateNestJs10 = updateNestJs10;
|
|
4
|
+
exports.updateCacheManagerImport = updateCacheManagerImport;
|
|
5
|
+
exports.updateTsConfigTarget = updateTsConfigTarget;
|
|
4
6
|
const devkit_1 = require("@nx/devkit");
|
|
5
7
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
6
8
|
const typescript_1 = require("typescript");
|
|
@@ -38,7 +40,6 @@ async function updateNestJs10(tree) {
|
|
|
38
40
|
}, {})
|
|
39
41
|
: () => { };
|
|
40
42
|
}
|
|
41
|
-
exports.updateNestJs10 = updateNestJs10;
|
|
42
43
|
async function getNestProejcts() {
|
|
43
44
|
const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
|
|
44
45
|
return Object.entries(projectGraph.dependencies)
|
|
@@ -60,7 +61,6 @@ function updateCacheManagerImport(tree, filePath) {
|
|
|
60
61
|
return true;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
exports.updateCacheManagerImport = updateCacheManagerImport;
|
|
64
64
|
function updateTsConfigTarget(tree, tsConfigPath) {
|
|
65
65
|
(0, devkit_1.updateJson)(tree, tsConfigPath, (json) => {
|
|
66
66
|
if (!json.compilerOptions.target) {
|
|
@@ -77,5 +77,4 @@ function updateTsConfigTarget(tree, tsConfigPath) {
|
|
|
77
77
|
return json;
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
exports.updateTsConfigTarget = updateTsConfigTarget;
|
|
81
80
|
exports.default = updateNestJs10;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureDependencies =
|
|
3
|
+
exports.ensureDependencies = ensureDependencies;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("./versions");
|
|
6
6
|
function ensureDependencies(tree) {
|
|
@@ -15,4 +15,3 @@ function ensureDependencies(tree) {
|
|
|
15
15
|
'@nestjs/testing': versions_1.nestJsVersion,
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
exports.ensureDependencies = ensureDependencies;
|