@nestjs/schematics 7.2.2 → 7.2.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/README.md CHANGED
@@ -32,3 +32,7 @@ Learn more in the [official documentation](https://docs.nestjs.com/).
32
32
 
33
33
  - Website - [https://nestjs.com](https://nestjs.com/)
34
34
  - Twitter - [@nestframework](https://twitter.com/nestframework)
35
+
36
+ ## License
37
+
38
+ Nest is [MIT licensed](LICENSE).
@@ -15,6 +15,7 @@ module.exports = {
15
15
  node: true,
16
16
  jest: true,
17
17
  },
18
+ ignorePatterns: ['.eslintrc.js'],
18
19
  rules: {
19
20
  '@typescript-eslint/interface-name-prefix': 'off',
20
21
  '@typescript-eslint/explicit-function-return-type': 'off',
@@ -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": "^6.15.0",
42
+ "eslint-config-prettier": "7.1.0",
43
43
  "eslint-plugin-prettier": "^3.1.4",
44
44
  "jest": "^26.6.3",
45
45
  "prettier": "^2.1.2",
@@ -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);
@@ -5,6 +5,7 @@ export interface DeclarationOptions {
5
5
  metadata: string;
6
6
  type?: string;
7
7
  name: string;
8
+ className?: string;
8
9
  path: Path;
9
10
  module: Path;
10
11
  symbol?: string;
@@ -17,7 +17,10 @@ class ModuleDeclarator {
17
17
  }
18
18
  computeSymbol(options) {
19
19
  const target = Object.assign({}, options);
20
- if (options.type !== undefined) {
20
+ if (options.className) {
21
+ target.symbol = options.className;
22
+ }
23
+ else if (options.type !== undefined) {
21
24
  target.symbol = strings_1.classify(options.name).concat(strings_1.capitalize(options.type));
22
25
  }
23
26
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/schematics",
3
- "version": "7.2.2",
3
+ "version": "7.2.6",
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.0",
44
- "@angular-devkit/schematics": "11.0.0",
43
+ "@angular-devkit/core": "11.0.5",
44
+ "@angular-devkit/schematics": "11.0.5",
45
45
  "fs-extra": "9.0.1",
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.4",
52
- "@types/jest": "26.0.15",
53
- "@types/node": "14.14.7",
54
- "@typescript-eslint/eslint-plugin": "4.7.0",
55
- "@typescript-eslint/parser": "4.7.0",
51
+ "@types/fs-extra": "9.0.6",
52
+ "@types/jest": "26.0.19",
53
+ "@types/node": "14.14.16",
54
+ "@typescript-eslint/eslint-plugin": "4.11.0",
55
+ "@typescript-eslint/parser": "4.11.0",
56
56
  "cpx": "1.5.0",
57
- "eslint": "7.13.0",
58
- "eslint-config-prettier": "6.15.0",
57
+ "eslint": "7.16.0",
58
+ "eslint-config-prettier": "7.1.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.0",
62
+ "husky": "4.3.6",
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.0.0",
67
+ "ts-node": "9.1.1",
68
68
  "typescript": "3.9.7"
69
69
  },
70
70
  "peerDependencies": {