@nx/nest 16.0.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/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/generators.json +211 -0
- package/index.d.ts +19 -0
- package/index.js +42 -0
- package/index.js.map +1 -0
- package/migrations.json +47 -0
- package/package.json +46 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +29 -0
- package/src/generators/application/application.js.map +1 -0
- package/src/generators/application/files/app/app.controller.spec.ts__tmpl__ +22 -0
- package/src/generators/application/files/app/app.controller.ts__tmpl__ +13 -0
- package/src/generators/application/files/app/app.module.ts__tmpl__ +11 -0
- package/src/generators/application/files/app/app.service.spec.ts__tmpl__ +21 -0
- package/src/generators/application/files/app/app.service.ts__tmpl__ +8 -0
- package/src/generators/application/files/main.ts__tmpl__ +20 -0
- package/src/generators/application/lib/create-files.d.ts +3 -0
- package/src/generators/application/lib/create-files.js +13 -0
- package/src/generators/application/lib/create-files.js.map +1 -0
- package/src/generators/application/lib/index.d.ts +3 -0
- package/src/generators/application/lib/index.js +7 -0
- package/src/generators/application/lib/index.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +5 -0
- package/src/generators/application/lib/normalize-options.js +38 -0
- package/src/generators/application/lib/normalize-options.js.map +1 -0
- package/src/generators/application/lib/update-tsconfig.d.ts +3 -0
- package/src/generators/application/lib/update-tsconfig.js +13 -0
- package/src/generators/application/lib/update-tsconfig.js.map +1 -0
- package/src/generators/application/schema.d.ts +20 -0
- package/src/generators/application/schema.json +75 -0
- package/src/generators/class/class.d.ts +6 -0
- package/src/generators/class/class.js +16 -0
- package/src/generators/class/class.js.map +1 -0
- package/src/generators/class/schema.json +57 -0
- package/src/generators/controller/controller.d.ts +9 -0
- package/src/generators/controller/controller.js +16 -0
- package/src/generators/controller/controller.js.map +1 -0
- package/src/generators/controller/schema.json +66 -0
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.d.ts +4 -0
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js +128 -0
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js.map +1 -0
- package/src/generators/convert-tslint-to-eslint/schema.json +44 -0
- package/src/generators/decorator/decorator.d.ts +6 -0
- package/src/generators/decorator/decorator.js +16 -0
- package/src/generators/decorator/decorator.js.map +1 -0
- package/src/generators/decorator/schema.json +51 -0
- package/src/generators/filter/filter.d.ts +6 -0
- package/src/generators/filter/filter.js +16 -0
- package/src/generators/filter/filter.js.map +1 -0
- package/src/generators/filter/schema.json +57 -0
- package/src/generators/gateway/gateway.d.ts +6 -0
- package/src/generators/gateway/gateway.js +16 -0
- package/src/generators/gateway/gateway.js.map +1 -0
- package/src/generators/gateway/schema.json +57 -0
- package/src/generators/guard/guard.d.ts +6 -0
- package/src/generators/guard/guard.js +16 -0
- package/src/generators/guard/guard.js.map +1 -0
- package/src/generators/guard/schema.json +57 -0
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +27 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/lib/add-dependencies.d.ts +2 -0
- package/src/generators/init/lib/add-dependencies.js +21 -0
- package/src/generators/init/lib/add-dependencies.js.map +1 -0
- package/src/generators/init/lib/index.d.ts +2 -0
- package/src/generators/init/lib/index.js +6 -0
- package/src/generators/init/lib/index.js.map +1 -0
- package/src/generators/init/lib/normalize-options.d.ts +2 -0
- package/src/generators/init/lib/normalize-options.js +9 -0
- package/src/generators/init/lib/normalize-options.js.map +1 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +29 -0
- package/src/generators/interceptor/interceptor.d.ts +6 -0
- package/src/generators/interceptor/interceptor.js +16 -0
- package/src/generators/interceptor/interceptor.js.map +1 -0
- package/src/generators/interceptor/schema.json +57 -0
- package/src/generators/interface/interface.d.ts +6 -0
- package/src/generators/interface/interface.js +13 -0
- package/src/generators/interface/interface.js.map +1 -0
- package/src/generators/interface/schema.json +46 -0
- package/src/generators/library/files/common/src/lib/__fileName__.module.ts__tmpl__ +11 -0
- package/src/generators/library/files/controller/src/lib/__fileName__.controller.spec.ts__tmpl__ +20 -0
- package/src/generators/library/files/controller/src/lib/__fileName__.controller.ts__tmpl__ +7 -0
- package/src/generators/library/files/service/src/lib/__fileName__.service.spec.ts__tmpl__ +18 -0
- package/src/generators/library/files/service/src/lib/__fileName__.service.ts__tmpl__ +4 -0
- package/src/generators/library/lib/add-exports-to-barrel.d.ts +3 -0
- package/src/generators/library/lib/add-exports-to-barrel.js +24 -0
- package/src/generators/library/lib/add-exports-to-barrel.js.map +1 -0
- package/src/generators/library/lib/add-project.d.ts +3 -0
- package/src/generators/library/lib/add-project.js +26 -0
- package/src/generators/library/lib/add-project.js.map +1 -0
- package/src/generators/library/lib/create-files.d.ts +3 -0
- package/src/generators/library/lib/create-files.js +22 -0
- package/src/generators/library/lib/create-files.js.map +1 -0
- package/src/generators/library/lib/delete-files.d.ts +3 -0
- package/src/generators/library/lib/delete-files.js +15 -0
- package/src/generators/library/lib/delete-files.js.map +1 -0
- package/src/generators/library/lib/index.d.ts +6 -0
- package/src/generators/library/lib/index.js +10 -0
- package/src/generators/library/lib/index.js.map +1 -0
- package/src/generators/library/lib/normalize-options.d.ts +5 -0
- package/src/generators/library/lib/normalize-options.js +46 -0
- package/src/generators/library/lib/normalize-options.js.map +1 -0
- package/src/generators/library/lib/update-tsconfig.d.ts +3 -0
- package/src/generators/library/lib/update-tsconfig.js +16 -0
- package/src/generators/library/lib/update-tsconfig.js.map +1 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +28 -0
- package/src/generators/library/library.js.map +1 -0
- package/src/generators/library/schema.d.ts +43 -0
- package/src/generators/library/schema.json +135 -0
- package/src/generators/middleware/middleware.d.ts +6 -0
- package/src/generators/middleware/middleware.js +16 -0
- package/src/generators/middleware/middleware.js.map +1 -0
- package/src/generators/middleware/schema.json +57 -0
- package/src/generators/module/module.d.ts +9 -0
- package/src/generators/module/module.js +16 -0
- package/src/generators/module/module.js.map +1 -0
- package/src/generators/module/schema.json +61 -0
- package/src/generators/pipe/pipe.d.ts +6 -0
- package/src/generators/pipe/pipe.js +16 -0
- package/src/generators/pipe/pipe.js.map +1 -0
- package/src/generators/pipe/schema.json +57 -0
- package/src/generators/provider/provider.d.ts +6 -0
- package/src/generators/provider/provider.js +16 -0
- package/src/generators/provider/provider.js.map +1 -0
- package/src/generators/provider/schema.json +57 -0
- package/src/generators/resolver/resolver.d.ts +6 -0
- package/src/generators/resolver/resolver.js +16 -0
- package/src/generators/resolver/resolver.js.map +1 -0
- package/src/generators/resolver/schema.json +57 -0
- package/src/generators/resource/resource.d.ts +6 -0
- package/src/generators/resource/resource.js +16 -0
- package/src/generators/resource/resource.js.map +1 -0
- package/src/generators/resource/schema.json +106 -0
- package/src/generators/service/schema.json +57 -0
- package/src/generators/service/service.d.ts +6 -0
- package/src/generators/service/service.js +16 -0
- package/src/generators/service/service.js.map +1 -0
- package/src/generators/utils/index.d.ts +3 -0
- package/src/generators/utils/index.js +7 -0
- package/src/generators/utils/index.js.map +1 -0
- package/src/generators/utils/normalize-options.d.ts +4 -0
- package/src/generators/utils/normalize-options.js +15 -0
- package/src/generators/utils/normalize-options.js.map +1 -0
- package/src/generators/utils/run-nest-schematic.d.ts +3 -0
- package/src/generators/utils/run-nest-schematic.js +19 -0
- package/src/generators/utils/run-nest-schematic.js.map +1 -0
- package/src/generators/utils/testing.d.ts +2 -0
- package/src/generators/utils/testing.js +17 -0
- package/src/generators/utils/testing.js.map +1 -0
- package/src/generators/utils/types.d.ts +32 -0
- package/src/generators/utils/types.js +3 -0
- package/src/generators/utils/types.js.map +1 -0
- package/src/migrations/update-13-2-0/update-to-nest-8.d.ts +2 -0
- package/src/migrations/update-13-2-0/update-to-nest-8.js +67 -0
- package/src/migrations/update-13-2-0/update-to-nest-8.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/versions.d.ts +5 -0
- package/src/utils/versions.js +9 -0
- package/src/utils/versions.js.map +1 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
|
+
export type PipeGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
+
export declare function pipeGenerator(tree: Tree, rawOptions: PipeGeneratorOptions): Promise<any>;
|
|
5
|
+
export default pipeGenerator;
|
|
6
|
+
export declare const pipeSchematic: (generatorOptions: PipeGeneratorOptions) => (tree: any, context: any) => Promise<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pipeSchematic = exports.pipeGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function pipeGenerator(tree, rawOptions) {
|
|
7
|
+
const options = normalizePipeOptions(tree, rawOptions);
|
|
8
|
+
return (0, utils_1.runNestSchematic)(tree, 'pipe', options);
|
|
9
|
+
}
|
|
10
|
+
exports.pipeGenerator = pipeGenerator;
|
|
11
|
+
exports.default = pipeGenerator;
|
|
12
|
+
exports.pipeSchematic = (0, devkit_1.convertNxGenerator)(pipeGenerator);
|
|
13
|
+
function normalizePipeOptions(tree, options) {
|
|
14
|
+
return Object.assign(Object.assign({}, (0, utils_1.normalizeOptions)(tree, options)), { language: options.language, spec: (0, utils_1.unitTestRunnerToSpec)(options.unitTestRunner) });
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/pipe/pipe.ts"],"names":[],"mappings":";;;AACA,uCAAgD;AAMhD,oCAIkB;AAKlB,SAAgB,aAAa,CAC3B,IAAU,EACV,UAAgC;IAEhC,MAAM,OAAO,GAAG,oBAAoB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEvD,OAAO,IAAA,wBAAgB,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAPD,sCAOC;AAED,kBAAe,aAAa,CAAC;AAEhB,QAAA,aAAa,GAAG,IAAA,2BAAkB,EAAC,aAAa,CAAC,CAAC;AAE/D,SAAS,oBAAoB,CAC3B,IAAU,EACV,OAA6B;IAE7B,uCACK,IAAA,wBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,KAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,IAAA,4BAAoB,EAAC,OAAO,CAAC,cAAc,CAAC,IAClD;AACJ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxNestPipeGenerator",
|
|
4
|
+
"title": "Nest Pipe Options Schema",
|
|
5
|
+
"description": "Nest Pipe Options Schema.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"description": "The name of the pipe.",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like to use?"
|
|
17
|
+
},
|
|
18
|
+
"project": {
|
|
19
|
+
"description": "The Nest project to target.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"$default": {
|
|
22
|
+
"$source": "projectName"
|
|
23
|
+
},
|
|
24
|
+
"alias": "p",
|
|
25
|
+
"x-prompt": "What Nest project would you like to target?"
|
|
26
|
+
},
|
|
27
|
+
"directory": {
|
|
28
|
+
"description": "Directory where the generated files are placed.",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"aliases": ["dir", "path"]
|
|
31
|
+
},
|
|
32
|
+
"skipFormat": {
|
|
33
|
+
"description": "Skip formatting files.",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false,
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
},
|
|
38
|
+
"unitTestRunner": {
|
|
39
|
+
"description": "Test runner to use for unit tests.",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["jest", "none"],
|
|
42
|
+
"default": "jest"
|
|
43
|
+
},
|
|
44
|
+
"flat": {
|
|
45
|
+
"description": "Flag to indicate if a directory is created.",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": true
|
|
48
|
+
},
|
|
49
|
+
"language": {
|
|
50
|
+
"description": "Nest pipe language.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["js", "ts"]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["name", "project"]
|
|
57
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
|
+
export type ProviderGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
+
export declare function providerGenerator(tree: Tree, rawOptions: ProviderGeneratorOptions): Promise<any>;
|
|
5
|
+
export default providerGenerator;
|
|
6
|
+
export declare const providerSchematic: (generatorOptions: ProviderGeneratorOptions) => (tree: any, context: any) => Promise<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.providerSchematic = exports.providerGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function providerGenerator(tree, rawOptions) {
|
|
7
|
+
const options = normalizeProviderOptions(tree, rawOptions);
|
|
8
|
+
return (0, utils_1.runNestSchematic)(tree, 'provider', options);
|
|
9
|
+
}
|
|
10
|
+
exports.providerGenerator = providerGenerator;
|
|
11
|
+
exports.default = providerGenerator;
|
|
12
|
+
exports.providerSchematic = (0, devkit_1.convertNxGenerator)(providerGenerator);
|
|
13
|
+
function normalizeProviderOptions(tree, options) {
|
|
14
|
+
return Object.assign(Object.assign({}, (0, utils_1.normalizeOptions)(tree, options)), { language: options.language, spec: (0, utils_1.unitTestRunnerToSpec)(options.unitTestRunner) });
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/provider/provider.ts"],"names":[],"mappings":";;;AACA,uCAAgD;AAMhD,oCAIkB;AAKlB,SAAgB,iBAAiB,CAC/B,IAAU,EACV,UAAoC;IAEpC,MAAM,OAAO,GAAG,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAE3D,OAAO,IAAA,wBAAgB,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAPD,8CAOC;AAED,kBAAe,iBAAiB,CAAC;AAEpB,QAAA,iBAAiB,GAAG,IAAA,2BAAkB,EAAC,iBAAiB,CAAC,CAAC;AAEvE,SAAS,wBAAwB,CAC/B,IAAU,EACV,OAAiC;IAEjC,uCACK,IAAA,wBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,KAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,IAAA,4BAAoB,EAAC,OAAO,CAAC,cAAc,CAAC,IAClD;AACJ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxNestProviderGenerator",
|
|
4
|
+
"title": "Nest Provider Options Schema",
|
|
5
|
+
"description": "Nest Provider Options Schema.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"description": "The name of the provider.",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like to use?"
|
|
17
|
+
},
|
|
18
|
+
"project": {
|
|
19
|
+
"description": "The Nest project to target.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"$default": {
|
|
22
|
+
"$source": "projectName"
|
|
23
|
+
},
|
|
24
|
+
"alias": "p",
|
|
25
|
+
"x-prompt": "What Nest project would you like to target?"
|
|
26
|
+
},
|
|
27
|
+
"directory": {
|
|
28
|
+
"description": "Directory where the generated files are placed.",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"aliases": ["dir", "path"]
|
|
31
|
+
},
|
|
32
|
+
"skipFormat": {
|
|
33
|
+
"description": "Skip formatting files.",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false,
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
},
|
|
38
|
+
"unitTestRunner": {
|
|
39
|
+
"description": "Test runner to use for unit tests.",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["jest", "none"],
|
|
42
|
+
"default": "jest"
|
|
43
|
+
},
|
|
44
|
+
"flat": {
|
|
45
|
+
"description": "Flag to indicate if a directory is created.",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": true
|
|
48
|
+
},
|
|
49
|
+
"language": {
|
|
50
|
+
"description": "Nest provider language.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["js", "ts"]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["name", "project"]
|
|
57
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
|
+
export type ResolverGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
+
export declare function resolverGenerator(tree: Tree, rawOptions: ResolverGeneratorOptions): Promise<any>;
|
|
5
|
+
export default resolverGenerator;
|
|
6
|
+
export declare const resolverSchematic: (generatorOptions: ResolverGeneratorOptions) => (tree: any, context: any) => Promise<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolverSchematic = exports.resolverGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function resolverGenerator(tree, rawOptions) {
|
|
7
|
+
const options = normalizeResolverOptions(tree, rawOptions);
|
|
8
|
+
return (0, utils_1.runNestSchematic)(tree, 'resolver', options);
|
|
9
|
+
}
|
|
10
|
+
exports.resolverGenerator = resolverGenerator;
|
|
11
|
+
exports.default = resolverGenerator;
|
|
12
|
+
exports.resolverSchematic = (0, devkit_1.convertNxGenerator)(resolverGenerator);
|
|
13
|
+
function normalizeResolverOptions(tree, options) {
|
|
14
|
+
return Object.assign(Object.assign({}, (0, utils_1.normalizeOptions)(tree, options)), { language: options.language, spec: (0, utils_1.unitTestRunnerToSpec)(options.unitTestRunner) });
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/resolver/resolver.ts"],"names":[],"mappings":";;;AACA,uCAAgD;AAMhD,oCAIkB;AAKlB,SAAgB,iBAAiB,CAC/B,IAAU,EACV,UAAoC;IAEpC,MAAM,OAAO,GAAG,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAE3D,OAAO,IAAA,wBAAgB,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAPD,8CAOC;AAED,kBAAe,iBAAiB,CAAC;AAEpB,QAAA,iBAAiB,GAAG,IAAA,2BAAkB,EAAC,iBAAiB,CAAC,CAAC;AAEvE,SAAS,wBAAwB,CAC/B,IAAU,EACV,OAAiC;IAEjC,uCACK,IAAA,wBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,KAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,IAAA,4BAAoB,EAAC,OAAO,CAAC,cAAc,CAAC,IAClD;AACJ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxNestResolverGenerator",
|
|
4
|
+
"title": "Nest Resolver Options Schema",
|
|
5
|
+
"description": "Nest Resolver Options Schema.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"description": "The name of the resolver.",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like to use?"
|
|
17
|
+
},
|
|
18
|
+
"project": {
|
|
19
|
+
"description": "The Nest project to target.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"$default": {
|
|
22
|
+
"$source": "projectName"
|
|
23
|
+
},
|
|
24
|
+
"alias": "p",
|
|
25
|
+
"x-prompt": "What Nest project would you like to target?"
|
|
26
|
+
},
|
|
27
|
+
"directory": {
|
|
28
|
+
"description": "Directory where the generated files are placed.",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"aliases": ["dir", "path"]
|
|
31
|
+
},
|
|
32
|
+
"skipFormat": {
|
|
33
|
+
"description": "Skip formatting files.",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false,
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
},
|
|
38
|
+
"unitTestRunner": {
|
|
39
|
+
"description": "Test runner to use for unit tests.",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["jest", "none"],
|
|
42
|
+
"default": "jest"
|
|
43
|
+
},
|
|
44
|
+
"flat": {
|
|
45
|
+
"description": "Flag to indicate if a directory is created.",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": false
|
|
48
|
+
},
|
|
49
|
+
"language": {
|
|
50
|
+
"description": "Nest resolver language.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["js", "ts"]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["name", "project"]
|
|
57
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import type { NestGeneratorWithLanguageOption, NestGeneratorWithResourceOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
|
+
export type ResourceGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption & NestGeneratorWithResourceOption;
|
|
4
|
+
export declare function resourceGenerator(tree: Tree, rawOptions: ResourceGeneratorOptions): Promise<any>;
|
|
5
|
+
export default resourceGenerator;
|
|
6
|
+
export declare const resourceSchematic: (generatorOptions: ResourceGeneratorOptions) => (tree: any, context: any) => Promise<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resourceSchematic = exports.resourceGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function resourceGenerator(tree, rawOptions) {
|
|
7
|
+
const options = normalizeResourceOptions(tree, rawOptions);
|
|
8
|
+
return (0, utils_1.runNestSchematic)(tree, 'resource', options);
|
|
9
|
+
}
|
|
10
|
+
exports.resourceGenerator = resourceGenerator;
|
|
11
|
+
exports.default = resourceGenerator;
|
|
12
|
+
exports.resourceSchematic = (0, devkit_1.convertNxGenerator)(resourceGenerator);
|
|
13
|
+
function normalizeResourceOptions(tree, options) {
|
|
14
|
+
return Object.assign(Object.assign({}, (0, utils_1.normalizeOptions)(tree, options)), { language: options.language, spec: (0, utils_1.unitTestRunnerToSpec)(options.unitTestRunner) });
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/resource/resource.ts"],"names":[],"mappings":";;;AACA,uCAAgD;AAOhD,oCAIkB;AAMlB,SAAgB,iBAAiB,CAC/B,IAAU,EACV,UAAoC;IAEpC,MAAM,OAAO,GAAG,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAE3D,OAAO,IAAA,wBAAgB,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAPD,8CAOC;AAED,kBAAe,iBAAiB,CAAC;AAEpB,QAAA,iBAAiB,GAAG,IAAA,2BAAkB,EAAC,iBAAiB,CAAC,CAAC;AAEvE,SAAS,wBAAwB,CAC/B,IAAU,EACV,OAAiC;IAEjC,uCACK,IAAA,wBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,KAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,IAAA,4BAAoB,EAAC,OAAO,CAAC,cAAc,CAAC,IAClD;AACJ,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxNestResourceGenerator",
|
|
4
|
+
"title": "Nest Resource Options Schema",
|
|
5
|
+
"description": "Nest Resource Options Schema.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The name of the resource.",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like to use for this resource (plural, e.g., `users`)?"
|
|
17
|
+
},
|
|
18
|
+
"project": {
|
|
19
|
+
"description": "The Nest project to target.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"$default": {
|
|
22
|
+
"$source": "projectName"
|
|
23
|
+
},
|
|
24
|
+
"alias": "p",
|
|
25
|
+
"x-prompt": "What Nest project would you like to target?"
|
|
26
|
+
},
|
|
27
|
+
"directory": {
|
|
28
|
+
"description": "Directory where the generated files are placed.",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"aliases": ["dir", "path"]
|
|
31
|
+
},
|
|
32
|
+
"skipFormat": {
|
|
33
|
+
"description": "Skip formatting files.",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false,
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
},
|
|
38
|
+
"unitTestRunner": {
|
|
39
|
+
"description": "Test runner to use for unit tests.",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["jest", "none"],
|
|
42
|
+
"default": "jest"
|
|
43
|
+
},
|
|
44
|
+
"flat": {
|
|
45
|
+
"description": "Flag to indicate if a directory is created.",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": false
|
|
48
|
+
},
|
|
49
|
+
"language": {
|
|
50
|
+
"description": "Nest class language.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["js", "ts"]
|
|
53
|
+
},
|
|
54
|
+
"type": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The transport layer.",
|
|
57
|
+
"default": "rest",
|
|
58
|
+
"enum": [
|
|
59
|
+
"rest",
|
|
60
|
+
"graphql-code-first",
|
|
61
|
+
"graphql-schema-first",
|
|
62
|
+
"microservice",
|
|
63
|
+
"ws"
|
|
64
|
+
],
|
|
65
|
+
"x-prompt": {
|
|
66
|
+
"message": "What transport layer do you use?",
|
|
67
|
+
"type": "list",
|
|
68
|
+
"items": [
|
|
69
|
+
{ "value": "rest", "label": "REST API" },
|
|
70
|
+
{
|
|
71
|
+
"value": "graphql-code-first",
|
|
72
|
+
"label": "GraphQL (code first)"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"value": "graphql-schema-first",
|
|
76
|
+
"label": "GraphQL (schema first)"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"value": "microservice",
|
|
80
|
+
"label": "Microservice (non-HTTP)"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"value": "ws",
|
|
84
|
+
"label": "WebSockets"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"skipImport": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"description": "Flag to skip the module import.",
|
|
92
|
+
"default": false
|
|
93
|
+
},
|
|
94
|
+
"crud": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"description": "When true, CRUD entry points are generated.",
|
|
97
|
+
"default": true,
|
|
98
|
+
"x-prompt": {
|
|
99
|
+
"message": "Would you like to generate CRUD entry points?",
|
|
100
|
+
"type": "confirmation"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": ["name", "project"]
|
|
106
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxNestServiceGenerator",
|
|
4
|
+
"title": "Nest Service Options Schema",
|
|
5
|
+
"description": "Nest Service Options Schema.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"description": "The name of the service.",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like to use?"
|
|
17
|
+
},
|
|
18
|
+
"project": {
|
|
19
|
+
"description": "The Nest project to target.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"$default": {
|
|
22
|
+
"$source": "projectName"
|
|
23
|
+
},
|
|
24
|
+
"alias": "p",
|
|
25
|
+
"x-prompt": "What Nest project would you like to target?"
|
|
26
|
+
},
|
|
27
|
+
"directory": {
|
|
28
|
+
"description": "Directory where the generated files are placed.",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"aliases": ["dir", "path"]
|
|
31
|
+
},
|
|
32
|
+
"skipFormat": {
|
|
33
|
+
"description": "Skip formatting files.",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false,
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
},
|
|
38
|
+
"unitTestRunner": {
|
|
39
|
+
"description": "Test runner to use for unit tests.",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["jest", "none"],
|
|
42
|
+
"default": "jest"
|
|
43
|
+
},
|
|
44
|
+
"flat": {
|
|
45
|
+
"description": "Flag to indicate if a directory is created.",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": false
|
|
48
|
+
},
|
|
49
|
+
"language": {
|
|
50
|
+
"description": "Nest service language.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["js", "ts"]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["name", "project"]
|
|
57
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import type { NestGeneratorWithLanguageOption, NestGeneratorWithTestOption } from '../utils';
|
|
3
|
+
export type ServiceGeneratorOptions = NestGeneratorWithLanguageOption & NestGeneratorWithTestOption;
|
|
4
|
+
export declare function serviceGenerator(tree: Tree, rawOptions: ServiceGeneratorOptions): Promise<any>;
|
|
5
|
+
export default serviceGenerator;
|
|
6
|
+
export declare const serviceSchematic: (generatorOptions: ServiceGeneratorOptions) => (tree: any, context: any) => Promise<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serviceSchematic = exports.serviceGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function serviceGenerator(tree, rawOptions) {
|
|
7
|
+
const options = normalizeServiceOptions(tree, rawOptions);
|
|
8
|
+
return (0, utils_1.runNestSchematic)(tree, 'service', options);
|
|
9
|
+
}
|
|
10
|
+
exports.serviceGenerator = serviceGenerator;
|
|
11
|
+
exports.default = serviceGenerator;
|
|
12
|
+
exports.serviceSchematic = (0, devkit_1.convertNxGenerator)(serviceGenerator);
|
|
13
|
+
function normalizeServiceOptions(tree, options) {
|
|
14
|
+
return Object.assign(Object.assign({}, (0, utils_1.normalizeOptions)(tree, options)), { language: options.language, spec: (0, utils_1.unitTestRunnerToSpec)(options.unitTestRunner) });
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/service/service.ts"],"names":[],"mappings":";;;AACA,uCAAgD;AAMhD,oCAIkB;AAKlB,SAAgB,gBAAgB,CAC9B,IAAU,EACV,UAAmC;IAEnC,MAAM,OAAO,GAAG,uBAAuB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAE1D,OAAO,IAAA,wBAAgB,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AAPD,4CAOC;AAED,kBAAe,gBAAgB,CAAC;AAEnB,QAAA,gBAAgB,GAAG,IAAA,2BAAkB,EAAC,gBAAgB,CAAC,CAAC;AAErE,SAAS,uBAAuB,CAC9B,IAAU,EACV,OAAgC;IAEhC,uCACK,IAAA,wBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,KAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,IAAA,4BAAoB,EAAC,OAAO,CAAC,cAAc,CAAC,IAClD;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./run-nest-schematic"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/utils/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,+DAAqC;AACrC,kDAAwB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import type { NestGeneratorOptions, NormalizedOptions, UnitTestRunner } from './types';
|
|
3
|
+
export declare function normalizeOptions(tree: Tree, options: NestGeneratorOptions): NormalizedOptions;
|
|
4
|
+
export declare function unitTestRunnerToSpec(unitTestRunner: UnitTestRunner | undefined): boolean | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unitTestRunnerToSpec = exports.normalizeOptions = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function normalizeOptions(tree, options) {
|
|
6
|
+
const { sourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
7
|
+
const normalizedOptions = Object.assign(Object.assign({}, options), { flat: options.flat, name: (0, devkit_1.names)(options.name).fileName, path: options.directory, skipFormat: options.skipFormat, sourceRoot });
|
|
8
|
+
return normalizedOptions;
|
|
9
|
+
}
|
|
10
|
+
exports.normalizeOptions = normalizeOptions;
|
|
11
|
+
function unitTestRunnerToSpec(unitTestRunner) {
|
|
12
|
+
return unitTestRunner !== undefined ? unitTestRunner === 'jest' : undefined;
|
|
13
|
+
}
|
|
14
|
+
exports.unitTestRunnerToSpec = unitTestRunnerToSpec;
|
|
15
|
+
//# sourceMappingURL=normalize-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/utils/normalize-options.ts"],"names":[],"mappings":";;;AACA,uCAA6D;AAO7D,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAA6B;IAE7B,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE,MAAM,iBAAiB,mCAClB,OAAO,KACV,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,IAAI,EAAE,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAClC,IAAI,EAAE,OAAO,CAAC,SAAS,EACvB,UAAU,EAAE,OAAO,CAAC,UAAU,EAC9B,UAAU,GACX,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAhBD,4CAgBC;AAED,SAAgB,oBAAoB,CAClC,cAA0C;IAE1C,OAAO,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9E,CAAC;AAJD,oDAIC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runNestSchematic = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
function runNestSchematic(tree, schematic, options) {
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const { skipFormat } = options, schematicOptions = tslib_1.__rest(options, ["skipFormat"]);
|
|
9
|
+
const { wrapAngularDevkitSchematic } = require('@nx/devkit/ngcli-adapter');
|
|
10
|
+
const nestSchematic = wrapAngularDevkitSchematic('@nestjs/schematics', schematic);
|
|
11
|
+
const result = yield nestSchematic(tree, schematicOptions);
|
|
12
|
+
if (!skipFormat) {
|
|
13
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.runNestSchematic = runNestSchematic;
|
|
19
|
+
//# sourceMappingURL=run-nest-schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-nest-schematic.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/utils/run-nest-schematic.ts"],"names":[],"mappings":";;;;AACA,uCAAyC;AAGzC,SAAsB,gBAAgB,CACpC,IAAU,EACV,SAAwB,EACxB,OAA0B;;QAE1B,MAAM,EAAE,UAAU,KAA0B,OAAO,EAA5B,gBAAgB,kBAAK,OAAO,EAA7C,cAAmC,CAAU,CAAC;QAEpD,MAAM,EAAE,0BAA0B,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;QAC3E,MAAM,aAAa,GAAG,0BAA0B,CAC9C,oBAAoB,EACpB,SAAS,CACV,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAE3D,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AAnBD,4CAmBC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTreeWithNestApplication = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const testing_1 = require("@nx/devkit/testing");
|
|
6
|
+
function createTreeWithNestApplication(appName) {
|
|
7
|
+
const tree = (0, testing_1.createTreeWithEmptyWorkspace)({ layout: 'apps-libs' });
|
|
8
|
+
(0, devkit_1.addProjectConfiguration)(tree, appName, {
|
|
9
|
+
root: `apps/${appName}`,
|
|
10
|
+
sourceRoot: `apps/${appName}/src`,
|
|
11
|
+
projectType: 'application',
|
|
12
|
+
targets: {},
|
|
13
|
+
});
|
|
14
|
+
return tree;
|
|
15
|
+
}
|
|
16
|
+
exports.createTreeWithNestApplication = createTreeWithNestApplication;
|
|
17
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/utils/testing.ts"],"names":[],"mappings":";;;AAAA,uCAA2D;AAC3D,gDAAkE;AAElE,SAAgB,6BAA6B,CAAC,OAAe;IAC3D,MAAM,IAAI,GAAG,IAAA,sCAA4B,EAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACnE,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,EAAE;QACrC,IAAI,EAAE,QAAQ,OAAO,EAAE;QACvB,UAAU,EAAE,QAAQ,OAAO,MAAM;QACjC,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC;AATD,sEASC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type Language = 'js' | 'ts';
|
|
2
|
+
export type UnitTestRunner = 'jest' | 'none';
|
|
3
|
+
export type NestSchematic = 'class' | 'controller' | 'decorator' | 'filter' | 'gateway' | 'guard' | 'interceptor' | 'interface' | 'middleware' | 'module' | 'pipe' | 'provider' | 'resolver' | 'resource' | 'service';
|
|
4
|
+
export type TransportLayer = 'rest' | 'graphql-code-first' | 'graphql-schema-first' | 'microservice' | 'ws';
|
|
5
|
+
export type NestGeneratorOptions = {
|
|
6
|
+
name: string;
|
|
7
|
+
project: string;
|
|
8
|
+
directory?: string;
|
|
9
|
+
flat?: boolean;
|
|
10
|
+
skipFormat?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type NestGeneratorWithLanguageOption = NestGeneratorOptions & {
|
|
13
|
+
language?: Language;
|
|
14
|
+
};
|
|
15
|
+
export type NestGeneratorWithTestOption = NestGeneratorOptions & {
|
|
16
|
+
unitTestRunner?: UnitTestRunner;
|
|
17
|
+
};
|
|
18
|
+
export type NestGeneratorWithResourceOption = NestGeneratorOptions & {
|
|
19
|
+
type?: TransportLayer;
|
|
20
|
+
crud?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type NormalizedOptions = {
|
|
23
|
+
name: string;
|
|
24
|
+
sourceRoot: string;
|
|
25
|
+
flat?: boolean;
|
|
26
|
+
language?: 'js' | 'ts';
|
|
27
|
+
module?: string;
|
|
28
|
+
path?: string;
|
|
29
|
+
skipFormat?: boolean;
|
|
30
|
+
skipImport?: boolean;
|
|
31
|
+
spec?: boolean;
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/nest/src/generators/utils/types.ts"],"names":[],"mappings":""}
|