@nestjs/schematics 10.0.0 → 10.0.2

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.
@@ -22,16 +22,16 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@nestjs/testing": "^10.0.0",
25
- "@babel/core": "7.22.5",
26
- "@babel/node": "7.22.5",
27
- "@babel/plugin-proposal-decorators": "7.22.5",
28
- "@babel/plugin-transform-runtime": "7.22.5",
29
- "@babel/preset-env": "7.22.5",
25
+ "@babel/core": "7.22.9",
26
+ "@babel/node": "7.22.6",
27
+ "@babel/plugin-proposal-decorators": "7.22.7",
28
+ "@babel/plugin-transform-runtime": "7.22.9",
29
+ "@babel/preset-env": "7.22.9",
30
30
  "@babel/register": "7.22.5",
31
- "@babel/runtime": "7.22.5",
32
- "jest": "29.5.0",
33
- "nodemon": "2.0.22",
34
- "prettier": "2.8.8",
31
+ "@babel/runtime": "7.22.6",
32
+ "jest": "29.6.2",
33
+ "nodemon": "3.0.1",
34
+ "prettier": "3.0.1",
35
35
  "supertest": "6.3.3"
36
36
  },
37
37
  "jest": {
@@ -24,30 +24,30 @@
24
24
  "@nestjs/core": "^10.0.0",
25
25
  "@nestjs/platform-express": "^10.0.0",
26
26
  "reflect-metadata": "^0.1.13",
27
- "rxjs": "^7.2.0"
27
+ "rxjs": "^7.8.1"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@nestjs/cli": "^10.0.0",
31
31
  "@nestjs/schematics": "^10.0.0",
32
32
  "@nestjs/testing": "^10.0.0",
33
- "@types/express": "^4.17.13",
34
- "@types/jest": "29.5.2",
35
- "@types/node": "18.16.18",
36
- "@types/supertest": "^2.0.11",
37
- "@typescript-eslint/eslint-plugin": "^5.0.0",
38
- "@typescript-eslint/parser": "^5.0.0",
39
- "eslint": "^8.0.1",
40
- "eslint-config-prettier": "^8.3.0",
41
- "eslint-plugin-prettier": "^4.0.0",
42
- "jest": "29.5.0",
43
- "prettier": "^2.3.2",
44
- "source-map-support": "^0.5.20",
45
- "supertest": "^6.1.3",
46
- "ts-jest": "29.1.0",
47
- "ts-loader": "^9.2.3",
48
- "ts-node": "^10.0.0",
49
- "tsconfig-paths": "4.2.0",
50
- "typescript": "^5.0.0"
33
+ "@types/express": "^4.17.17",
34
+ "@types/jest": "^29.5.2",
35
+ "@types/node": "^20.3.1",
36
+ "@types/supertest": "^2.0.12",
37
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
38
+ "@typescript-eslint/parser": "^6.0.0",
39
+ "eslint": "^8.42.0",
40
+ "eslint-config-prettier": "^9.0.0",
41
+ "eslint-plugin-prettier": "^5.0.0",
42
+ "jest": "^29.5.0",
43
+ "prettier": "^3.0.0",
44
+ "source-map-support": "^0.5.21",
45
+ "supertest": "^6.3.3",
46
+ "ts-jest": "^29.1.0",
47
+ "ts-loader": "^9.4.3",
48
+ "ts-node": "^10.9.1",
49
+ "tsconfig-paths": "^4.2.0",
50
+ "typescript": "^5.1.3"
51
51
  },
52
52
  "jest": {
53
53
  "moduleFileExtensions": [
@@ -17,11 +17,12 @@ function transform(options) {
17
17
  return target;
18
18
  }
19
19
  function generate(options) {
20
+ const projectOrPath = options.project ?? '.';
20
21
  return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
21
22
  (0, schematics_1.template)({
22
23
  ...core_1.strings,
23
24
  ...options,
24
25
  }),
25
- (0, schematics_1.move)(options.project),
26
+ (0, schematics_1.move)(projectOrPath),
26
27
  ]);
27
28
  }
@@ -4,6 +4,6 @@ import { <%= classify(name) %>Service } from './<%= name %>.service';
4
4
 
5
5
  @Module({
6
6
  <% if (type === 'rest' || type === 'microservice') { %>controllers: [<%= classify(name) %>Controller],
7
- providers: [<%= classify(name) %>Service]<% } else if (type === 'graphql-code-first' || type === 'graphql-schema-first') { %>providers: [<%= classify(name) %>Resolver, <%= classify(name) %>Service]<% } else { %>providers: [<%= classify(name) %>Gateway, <%= classify(name) %>Service]<% } %>
7
+ providers: [<%= classify(name) %>Service],<% } else if (type === 'graphql-code-first' || type === 'graphql-schema-first') { %>providers: [<%= classify(name) %>Resolver, <%= classify(name) %>Service],<% } else { %>providers: [<%= classify(name) %>Gateway, <%= classify(name) %>Service],<% } %>
8
8
  })
9
9
  export class <%= classify(name) %>Module {}
@@ -178,12 +178,15 @@ function moveDefaultAppToApps(projectRoot, appName, sourceRoot = defaults_1.DEFA
178
178
  };
179
179
  }
180
180
  function moveDirectoryTo(srcDir, destination, tree) {
181
+ let srcDirExists = false;
181
182
  tree.getDir(srcDir).visit((filePath, file) => {
183
+ srcDirExists = true;
182
184
  const newFilePath = (0, core_1.join)(destination, filePath);
183
185
  tree.create(newFilePath, file.content);
184
- tree.delete(filePath);
185
186
  });
186
- tree.delete(srcDir);
187
+ if (srcDirExists) {
188
+ tree.delete(srcDir);
189
+ }
187
190
  }
188
191
  function addAppsToCliOptions(projectRoot, projectName, appName) {
189
192
  const rootPath = (0, core_1.join)(projectRoot, projectName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/schematics",
3
- "version": "10.0.0",
3
+ "version": "10.0.2",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@schematics)",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -41,32 +41,32 @@
41
41
  },
42
42
  "homepage": "https://github.com/nestjs/schematics#readme",
43
43
  "dependencies": {
44
- "@angular-devkit/core": "16.1.0",
45
- "@angular-devkit/schematics": "16.1.0",
44
+ "@angular-devkit/core": "16.1.8",
45
+ "@angular-devkit/schematics": "16.1.8",
46
46
  "comment-json": "4.2.3",
47
47
  "jsonc-parser": "3.2.0",
48
48
  "pluralize": "8.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@commitlint/cli": "17.6.5",
52
- "@commitlint/config-angular": "17.6.5",
53
- "@types/jest": "29.5.2",
54
- "@types/node": "18.16.18",
55
- "@typescript-eslint/eslint-plugin": "5.59.11",
56
- "@typescript-eslint/parser": "5.59.11",
51
+ "@commitlint/cli": "17.6.7",
52
+ "@commitlint/config-angular": "17.6.7",
53
+ "@types/jest": "29.5.3",
54
+ "@types/node": "18.17.3",
55
+ "@typescript-eslint/eslint-plugin": "6.2.1",
56
+ "@typescript-eslint/parser": "6.2.1",
57
57
  "cpx": "1.5.0",
58
- "eslint": "8.42.0",
59
- "eslint-config-prettier": "8.8.0",
60
- "eslint-plugin-import": "2.27.5",
58
+ "eslint": "8.46.0",
59
+ "eslint-config-prettier": "9.0.0",
60
+ "eslint-plugin-import": "2.28.0",
61
61
  "gulp": "4.0.2",
62
62
  "gulp-clean": "0.4.0",
63
63
  "husky": "8.0.3",
64
- "jest": "29.5.0",
64
+ "jest": "29.6.2",
65
65
  "nyc": "15.1.0",
66
- "release-it": "15.11.0",
67
- "ts-jest": "29.1.0",
66
+ "release-it": "16.1.3",
67
+ "ts-jest": "29.1.1",
68
68
  "ts-node": "10.9.1",
69
- "typescript": "5.1.3"
69
+ "typescript": "5.1.6"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "typescript": ">=4.8.2"