@nestjs/schematics 12.0.0-alpha.3 → 12.0.0-alpha.4
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/dist/lib/decorator/files/js/__name__.decorator.js +2 -2
- package/dist/lib/decorator/files/ts/__name__.decorator.ts +2 -2
- package/dist/lib/library/files/ts/tsconfig.lib.json +1 -1
- package/dist/lib/library/library.factory.js +6 -0
- package/dist/lib/library/schema.json +5 -0
- package/package.json +1 -1
- /package/dist/lib/library/files/ts/src/{__name__.service.spec.ts → __name__.service.__specFileSuffix__.ts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Reflector } from '@nestjs/core';
|
|
2
2
|
|
|
3
|
-
export const <%= classify(name) %> = (
|
|
3
|
+
export const <%= classify(name) %> = Reflector.createDecorator();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Reflector } from '@nestjs/core';
|
|
2
2
|
|
|
3
|
-
export const <%= classify(name) %> =
|
|
3
|
+
export const <%= classify(name) %> = Reflector.createDecorator<string[]>();
|
|
@@ -46,6 +46,7 @@ function transform(options) {
|
|
|
46
46
|
? join(normalize(defaultSourceRoot), target.path)
|
|
47
47
|
: normalize(defaultSourceRoot);
|
|
48
48
|
target.prefix = target.prefix || getDefaultLibraryPrefix();
|
|
49
|
+
target.specFileSuffix = normalizeToKebabOrSnakeCase(target.specFileSuffix ?? 'spec');
|
|
49
50
|
return target;
|
|
50
51
|
}
|
|
51
52
|
function updatePackageJson(options) {
|
|
@@ -145,6 +146,11 @@ function updateTsConfig(packageName, _packagePrefix, root) {
|
|
|
145
146
|
}
|
|
146
147
|
delete tsconfig.compilerOptions.baseUrl;
|
|
147
148
|
delete tsconfig.compilerOptions.paths;
|
|
149
|
+
if (!tsconfig.files) {
|
|
150
|
+
tsconfig.files = [];
|
|
151
|
+
}
|
|
152
|
+
delete tsconfig.include;
|
|
153
|
+
delete tsconfig.exclude;
|
|
148
154
|
if (!tsconfig.references) {
|
|
149
155
|
tsconfig.references = [];
|
|
150
156
|
}
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
"type": "string",
|
|
32
32
|
"format": "path",
|
|
33
33
|
"description": "The libraries root directory."
|
|
34
|
+
},
|
|
35
|
+
"specFileSuffix": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"default": "spec",
|
|
38
|
+
"description": "Specifies the file suffix of spec files."
|
|
34
39
|
}
|
|
35
40
|
},
|
|
36
41
|
"required": ["name", "prefix"]
|
package/package.json
CHANGED
|
File without changes
|