@nestjs/schematics 8.0.0 → 8.0.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/index.js CHANGED
@@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
7
7
  o[k2] = m[k];
8
8
  }));
9
9
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./utils"), exports);
@@ -22,17 +22,17 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@nestjs/testing": "^8.0.0",
25
- "@babel/core": "7.14.6",
26
- "@babel/node": "7.14.7",
27
- "@babel/plugin-proposal-decorators": "7.14.5",
28
- "@babel/plugin-transform-runtime": "7.14.5",
29
- "@babel/preset-env": "7.14.7",
30
- "@babel/register": "7.14.5",
31
- "@babel/runtime": "7.14.6",
32
- "jest": "27.0.6",
33
- "nodemon": "2.0.9",
34
- "prettier": "2.3.2",
35
- "supertest": "6.1.3"
25
+ "@babel/core": "7.15.8",
26
+ "@babel/node": "7.15.8",
27
+ "@babel/plugin-proposal-decorators": "7.15.8",
28
+ "@babel/plugin-transform-runtime": "7.15.8",
29
+ "@babel/preset-env": "7.15.8",
30
+ "@babel/register": "7.15.3",
31
+ "@babel/runtime": "7.15.4",
32
+ "jest": "27.2.5",
33
+ "nodemon": "2.0.13",
34
+ "prettier": "2.4.1",
35
+ "supertest": "6.1.6"
36
36
  },
37
37
  "jest": {
38
38
  "moduleFileExtensions": [
@@ -33,16 +33,17 @@
33
33
  "@nestjs/schematics": "^8.0.0",
34
34
  "@nestjs/testing": "^8.0.0",
35
35
  "@types/express": "^4.17.13",
36
- "@types/jest": "^26.0.24",
36
+ "@types/jest": "^27.0.1",
37
37
  "@types/node": "^16.0.0",
38
38
  "@types/supertest": "^2.0.11",
39
- "@typescript-eslint/eslint-plugin": "^4.28.2",
40
- "@typescript-eslint/parser": "^4.28.2",
41
- "eslint": "^7.30.0",
39
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
40
+ "@typescript-eslint/parser": "^5.0.0",
41
+ "eslint": "^8.0.1",
42
42
  "eslint-config-prettier": "^8.3.0",
43
- "eslint-plugin-prettier": "^3.4.0",
44
- "jest": "^27.0.6",
43
+ "eslint-plugin-prettier": "^4.0.0",
44
+ "jest": "^27.2.5",
45
45
  "prettier": "^2.3.2",
46
+ "source-map-support": "^0.5.20",
46
47
  "supertest": "^6.1.3",
47
48
  "ts-jest": "^27.0.3",
48
49
  "ts-loader": "^9.2.3",
@@ -10,6 +10,12 @@
10
10
  "sourceMap": true,
11
11
  "outDir": "./dist",
12
12
  "baseUrl": "./",
13
- "incremental": true
13
+ "incremental": true,
14
+ "skipLibCheck": true,
15
+ "strictNullChecks": <%= strict %>,
16
+ "noImplicitAny": <%= strict %>,
17
+ "strictBindCallApply": <%= strict %>,
18
+ "forceConsistentCasingInFileNames": <%= strict %>,
19
+ "noFallthroughCasesInSwitch": <%= strict %>
14
20
  }
15
21
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestApplication",
3
+ "$id": "SchematicsNestApplication",
4
4
  "title": "Nest Application Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -25,7 +25,12 @@
25
25
  },
26
26
  "directory": {
27
27
  "type": "string",
28
- "description": "Nest application destination directory"
28
+ "description": "Nest application destination directory."
29
+ },
30
+ "strict": {
31
+ "type": "boolean",
32
+ "description": "With TypeScript strict mode.",
33
+ "default": false
29
34
  },
30
35
  "version": {
31
36
  "type": "string",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestClass",
3
+ "$id": "SchematicsNestClass",
4
4
  "title": "Nest Class Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestModule",
3
+ "$id": "SchematicsNestModule",
4
4
  "title": "Nest Module Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestController",
3
+ "$id": "SchematicsNestController",
4
4
  "title": "Nest Controller Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestDecorator",
3
+ "$id": "SchematicsNestDecorator",
4
4
  "title": "Nest Decorator Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestFilter",
3
+ "$id": "SchematicsNestFilter",
4
4
  "title": "Nest Filter Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestGateway",
3
+ "$id": "SchematicsNestGateway",
4
4
  "title": "Nest Gateway Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestGuard",
3
+ "$id": "SchematicsNestGuard",
4
4
  "title": "Nest Guard Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestInterceptor",
3
+ "$id": "SchematicsNestInterceptor",
4
4
  "title": "Nest Interceptor Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestInterface",
3
+ "$id": "SchematicsNestInterface",
4
4
  "title": "Nest Interface Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -64,10 +64,9 @@ function updateJestConfig(jestOptions, options, packageKey, distRoot) {
64
64
  if (!jestOptions.moduleNameMapper) {
65
65
  jestOptions.moduleNameMapper = {};
66
66
  }
67
- const deepPackagePath = packageKey + '/(.*)';
67
+ const packageKeyRegex = '^' + packageKey + '(|/.*)$';
68
68
  const packageRoot = core_1.join('<rootDir>', distRoot);
69
- jestOptions.moduleNameMapper[deepPackagePath] = core_1.join(packageRoot, '$1');
70
- jestOptions.moduleNameMapper[packageKey] = packageRoot;
69
+ jestOptions.moduleNameMapper[packageKeyRegex] = core_1.join(packageRoot, '$1');
71
70
  }
72
71
  function updateNpmScripts(scripts, options) {
73
72
  if (!scripts) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestLibrary",
3
+ "$id": "SchematicsNestLibrary",
4
4
  "title": "Nest Library Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestMiddleware",
3
+ "$id": "SchematicsNestMiddleware",
4
4
  "title": "Nest Middleware Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestModule",
3
+ "$id": "SchematicsNestModule",
4
4
  "title": "Nest Module Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestPipe",
3
+ "$id": "SchematicsNestPipe",
4
4
  "title": "Nest Pipe Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestProvider",
3
+ "$id": "SchematicsNestProvider",
4
4
  "title": "Nest Provider Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestResolver",
3
+ "$id": "SchematicsNestResolver",
4
4
  "title": "Nest Resolver Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestResource",
3
+ "$id": "SchematicsNestResource",
4
4
  "title": "Nest Resource Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestService",
3
+ "$id": "SchematicsNestService",
4
4
  "title": "Nest Service Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,7 +1,7 @@
1
1
  import { Test, TestingModule } from '@nestjs/testing';
2
2
  import { INestApplication } from '@nestjs/common';
3
3
  import * as request from 'supertest';
4
- import { <%= classify(name)%>Module } from './../src/<%= classify(name)%>.module';
4
+ import { <%= classify(name)%>Module } from './../src/<%= name %>.module';
5
5
 
6
6
  describe('<%= classify(name)%>Controller (e2e)', () => {
7
7
  let app: INestApplication;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsNestSubApp",
3
+ "$id": "SchematicsNestSubApp",
4
4
  "title": "Nest SubApp Options Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
7
7
  o[k2] = m[k];
8
8
  }));
9
9
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./metadata.manager"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/schematics",
3
- "version": "8.0.0",
3
+ "version": "8.0.4",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@schematics)",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -40,33 +40,33 @@
40
40
  },
41
41
  "homepage": "https://github.com/nestjs/schematics#readme",
42
42
  "dependencies": {
43
- "@angular-devkit/core": "12.0.5",
44
- "@angular-devkit/schematics": "12.0.5",
43
+ "@angular-devkit/core": "12.2.10",
44
+ "@angular-devkit/schematics": "12.2.10",
45
45
  "fs-extra": "10.0.0",
46
46
  "jsonc-parser": "3.0.0",
47
47
  "pluralize": "8.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@commitlint/cli": "12.1.4",
51
- "@commitlint/config-angular": "12.1.4",
52
- "@types/fs-extra": "9.0.12",
53
- "@types/jest": "26.0.24",
50
+ "@commitlint/cli": "13.2.1",
51
+ "@commitlint/config-angular": "13.2.0",
52
+ "@types/fs-extra": "9.0.13",
53
+ "@types/jest": "27.0.2",
54
54
  "@types/node": "16.0.0",
55
- "@typescript-eslint/eslint-plugin": "4.28.2",
56
- "@typescript-eslint/parser": "4.28.2",
55
+ "@typescript-eslint/eslint-plugin": "5.0.0",
56
+ "@typescript-eslint/parser": "5.0.0",
57
57
  "cpx": "1.5.0",
58
- "eslint": "7.30.0",
58
+ "eslint": "8.0.1",
59
59
  "eslint-config-prettier": "8.3.0",
60
- "eslint-plugin-import": "2.23.4",
60
+ "eslint-plugin-import": "2.25.2",
61
61
  "gulp": "4.0.2",
62
62
  "gulp-clean": "0.4.0",
63
- "husky": "7.0.1",
64
- "jest": "27.0.6",
63
+ "husky": "7.0.2",
64
+ "jest": "27.2.5",
65
65
  "nyc": "15.1.0",
66
- "release-it": "14.10.0",
67
- "ts-jest": "27.0.3",
68
- "ts-node": "10.0.0",
69
- "typescript": "3.9.10"
66
+ "release-it": "14.11.6",
67
+ "ts-jest": "27.0.7",
68
+ "ts-node": "10.3.0",
69
+ "typescript": "4.3.5"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "typescript": "^3.4.5 || ^4.3.5"