@nestjs/schematics 7.2.3 → 7.2.7
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/application/files/ts/.eslintrc.js +1 -0
- package/dist/lib/application/files/ts/package.json +1 -1
- package/dist/lib/class/schema.json +2 -0
- package/dist/lib/controller/schema.json +3 -0
- package/dist/lib/decorator/schema.json +1 -0
- package/dist/lib/filter/schema.json +2 -0
- package/dist/lib/gateway/schema.json +2 -0
- package/dist/lib/guard/schema.json +2 -0
- package/dist/lib/interceptor/schema.json +2 -0
- package/dist/lib/interface/schema.json +1 -0
- package/dist/lib/middleware/schema.json +2 -0
- package/dist/lib/module/schema.json +2 -0
- package/dist/lib/pipe/schema.json +2 -0
- package/dist/lib/provider/provider.factory.js +2 -2
- package/dist/lib/provider/schema.json +2 -0
- package/dist/lib/resolver/schema.json +2 -0
- package/dist/lib/resource/schema.json +5 -2
- package/dist/lib/service/schema.json +2 -0
- package/dist/utils/module.declarator.js +1 -1
- package/package.json +13 -13
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^4.6.1",
|
|
40
40
|
"@typescript-eslint/parser": "^4.6.1",
|
|
41
41
|
"eslint": "^7.12.1",
|
|
42
|
-
"eslint-config-prettier": "7.
|
|
42
|
+
"eslint-config-prettier": "7.2.0",
|
|
43
43
|
"eslint-plugin-prettier": "^3.1.4",
|
|
44
44
|
"jest": "^26.6.3",
|
|
45
45
|
"prettier": "^2.1.2",
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"x-prompt": "What name would you like to use for the class?"
|
|
15
15
|
},
|
|
16
16
|
"flat": {
|
|
17
|
+
"type": "boolean",
|
|
17
18
|
"default": true,
|
|
18
19
|
"description": "Flag to indicate if a directory is created."
|
|
19
20
|
},
|
|
20
21
|
"spec": {
|
|
22
|
+
"type": "boolean",
|
|
21
23
|
"default": true,
|
|
22
24
|
"description": "Specifies if a spec file is generated."
|
|
23
25
|
},
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"description": "Nest controller source root directory."
|
|
28
28
|
},
|
|
29
29
|
"skipImport": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"description": "Flag to skip the module import.",
|
|
31
32
|
"default": false
|
|
32
33
|
},
|
|
@@ -35,10 +36,12 @@
|
|
|
35
36
|
"description": "Allows specification of the declaring module."
|
|
36
37
|
},
|
|
37
38
|
"flat": {
|
|
39
|
+
"type": "boolean",
|
|
38
40
|
"default": false,
|
|
39
41
|
"description": "Flag to indicate if a directory is created."
|
|
40
42
|
},
|
|
41
43
|
"spec": {
|
|
44
|
+
"type": "boolean",
|
|
42
45
|
"default": true,
|
|
43
46
|
"description": "Specifies if a spec file is generated."
|
|
44
47
|
}
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest filter source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": true,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest gateway source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": true,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest guard source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": true,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest interceptor source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": true,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest middleware source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": true,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -32,10 +32,12 @@
|
|
|
32
32
|
"description": "Nest module source root directory."
|
|
33
33
|
},
|
|
34
34
|
"skipImport": {
|
|
35
|
+
"type": "boolean",
|
|
35
36
|
"description": "Flag to skip the module import.",
|
|
36
37
|
"default": false
|
|
37
38
|
},
|
|
38
39
|
"flat": {
|
|
40
|
+
"type": "boolean",
|
|
39
41
|
"default": false,
|
|
40
42
|
"description": "Flag to indicate if a directory is created."
|
|
41
43
|
}
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest pipe source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": true,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -30,7 +30,7 @@ function transform(options) {
|
|
|
30
30
|
target.className = core_1.strings.classify(target.name).replace('.', '');
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
target.className = target.name;
|
|
33
|
+
target.className = core_1.strings.classify(target.name);
|
|
34
34
|
}
|
|
35
35
|
target.path = core_1.strings.dasherize(location.path);
|
|
36
36
|
target.language = target.language !== undefined ? target.language : 'ts';
|
|
@@ -41,7 +41,7 @@ function transform(options) {
|
|
|
41
41
|
}
|
|
42
42
|
function generate(options) {
|
|
43
43
|
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
44
|
-
options.spec ? schematics_1.noop() : schematics_1.filter(path => !path.endsWith('.spec.ts')),
|
|
44
|
+
options.spec ? schematics_1.noop() : schematics_1.filter((path) => !path.endsWith('.spec.ts')),
|
|
45
45
|
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
46
46
|
schematics_1.move(options.path),
|
|
47
47
|
])(context);
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest provider source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": true,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
},
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest resolver source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": false,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -27,16 +27,18 @@
|
|
|
27
27
|
"description": "Application language (ts/js)."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": false,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if specs file are generated."
|
|
36
38
|
},
|
|
37
39
|
"type": {
|
|
38
|
-
"description": "The transport layer.",
|
|
39
40
|
"type": "string",
|
|
41
|
+
"description": "The transport layer.",
|
|
40
42
|
"default": "rest",
|
|
41
43
|
"enum": [
|
|
42
44
|
"rest",
|
|
@@ -70,12 +72,13 @@
|
|
|
70
72
|
}
|
|
71
73
|
},
|
|
72
74
|
"skipImport": {
|
|
75
|
+
"type": "boolean",
|
|
73
76
|
"description": "Flag to skip the module import.",
|
|
74
77
|
"default": false
|
|
75
78
|
},
|
|
76
79
|
"crud": {
|
|
77
|
-
"description": "When true, CRUD entry points are generated.",
|
|
78
80
|
"type": "boolean",
|
|
81
|
+
"description": "When true, CRUD entry points are generated.",
|
|
79
82
|
"default": true,
|
|
80
83
|
"x-prompt": {
|
|
81
84
|
"message": "Would you like to generate CRUD entry points?",
|
|
@@ -27,10 +27,12 @@
|
|
|
27
27
|
"description": "Nest service source root directory."
|
|
28
28
|
},
|
|
29
29
|
"flat": {
|
|
30
|
+
"type": "boolean",
|
|
30
31
|
"default": false,
|
|
31
32
|
"description": "Flag to indicate if a directory is created."
|
|
32
33
|
},
|
|
33
34
|
"spec": {
|
|
35
|
+
"type": "boolean",
|
|
34
36
|
"default": true,
|
|
35
37
|
"description": "Specifies if a spec file is generated."
|
|
36
38
|
}
|
|
@@ -20,7 +20,7 @@ class ModuleDeclarator {
|
|
|
20
20
|
if (options.className) {
|
|
21
21
|
target.symbol = options.className;
|
|
22
22
|
}
|
|
23
|
-
if (options.type !== undefined) {
|
|
23
|
+
else if (options.type !== undefined) {
|
|
24
24
|
target.symbol = strings_1.classify(options.name).concat(strings_1.capitalize(options.type));
|
|
25
25
|
}
|
|
26
26
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/schematics",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.7",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@schematics)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -40,31 +40,31 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/nestjs/schematics#readme",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@angular-devkit/core": "11.0
|
|
44
|
-
"@angular-devkit/schematics": "11.0
|
|
45
|
-
"fs-extra": "9.0
|
|
43
|
+
"@angular-devkit/core": "11.1.0",
|
|
44
|
+
"@angular-devkit/schematics": "11.1.0",
|
|
45
|
+
"fs-extra": "9.1.0",
|
|
46
46
|
"pluralize": "8.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@commitlint/cli": "^11.0.0",
|
|
50
50
|
"@commitlint/config-angular": "^11.0.0",
|
|
51
|
-
"@types/fs-extra": "9.0.
|
|
52
|
-
"@types/jest": "26.0.
|
|
53
|
-
"@types/node": "14.14.
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "4.
|
|
55
|
-
"@typescript-eslint/parser": "4.
|
|
51
|
+
"@types/fs-extra": "9.0.6",
|
|
52
|
+
"@types/jest": "26.0.20",
|
|
53
|
+
"@types/node": "14.14.22",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "4.14.0",
|
|
55
|
+
"@typescript-eslint/parser": "4.14.0",
|
|
56
56
|
"cpx": "1.5.0",
|
|
57
|
-
"eslint": "7.
|
|
58
|
-
"eslint-config-prettier": "7.
|
|
57
|
+
"eslint": "7.18.0",
|
|
58
|
+
"eslint-config-prettier": "7.2.0",
|
|
59
59
|
"eslint-plugin-import": "2.22.1",
|
|
60
60
|
"gulp": "4.0.2",
|
|
61
61
|
"gulp-clean": "0.4.0",
|
|
62
|
-
"husky": "4.3.
|
|
62
|
+
"husky": "4.3.8",
|
|
63
63
|
"jest": "26.6.3",
|
|
64
64
|
"nyc": "15.1.0",
|
|
65
65
|
"release-it": "^14.2.1",
|
|
66
66
|
"ts-jest": "26.4.4",
|
|
67
|
-
"ts-node": "9.1.
|
|
67
|
+
"ts-node": "9.1.1",
|
|
68
68
|
"typescript": "3.9.7"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|