express-generator-typescript 1.9.7 → 1.9.8

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.
@@ -29,7 +29,45 @@
29
29
  "@util": "dist/util"
30
30
  },
31
31
  "dependencies": {
32
+ "bcrypt": "^5.0.1",
33
+ "command-line-args": "^5.2.1",
34
+ "cookie-parser": "^1.4.6",
35
+ "dotenv": "^16.0.2",
36
+ "express": "^4.18.1",
37
+ "express-async-errors": "^3.1.1",
38
+ "helmet": "^6.0.0",
39
+ "http-status-codes": "^2.2.0",
40
+ "jet-logger": "^1.2.3",
41
+ "jsonfile": "^6.1.0",
42
+ "jsonwebtoken": "^8.5.1",
43
+ "module-alias": "^2.2.2",
44
+ "morgan": "^1.10.0",
45
+ "randomstring": "^1.2.2"
32
46
  },
33
47
  "devDependencies": {
48
+ "@types/bcrypt": "^5.0.0",
49
+ "@types/command-line-args": "^5.2.0",
50
+ "@types/cookie-parser": "^1.4.3",
51
+ "@types/express": "^4.17.13",
52
+ "@types/find": "^0.2.1",
53
+ "@types/fs-extra": "^9.0.13",
54
+ "@types/jasmine": "^4.3.0",
55
+ "@types/jsonfile": "^6.1.0",
56
+ "@types/jsonwebtoken": "^8.5.9",
57
+ "@types/morgan": "^1.9.3",
58
+ "@types/node": "^18.7.14",
59
+ "@types/randomstring": "^1.1.8",
60
+ "@types/supertest": "^2.0.12",
61
+ "@typescript-eslint/eslint-plugin": "^5.36.1",
62
+ "@typescript-eslint/parser": "^5.36.1",
63
+ "eslint": "^8.23.0",
64
+ "find": "^0.3.0",
65
+ "fs-extra": "^10.1.0",
66
+ "jasmine": "^4.3.0",
67
+ "nodemon": "^2.0.19",
68
+ "supertest": "^6.2.4",
69
+ "ts-node": "^10.9.1",
70
+ "tsconfig-paths": "^4.1.0",
71
+ "typescript": "^4.8.2"
34
72
  }
35
73
  }
@@ -11,6 +11,15 @@ const ncp = require('ncp').ncp;
11
11
  const fs = require('fs');
12
12
 
13
13
 
14
+ // **** Variables **** //
15
+
16
+ const ncpOpts = {
17
+ filter: new RegExp('^((?!node_modules).)*$'),
18
+ };
19
+
20
+
21
+ // **** Functions **** //
22
+
14
23
  /**
15
24
  * Entry point
16
25
  */
@@ -38,25 +47,24 @@ function copyProjectFiles(destination, withAuth, useSocketIo) {
38
47
  }
39
48
  const source = path.join(__dirname, prjFolder);
40
49
  // Return
41
- return new Promise((resolve, reject) => {
50
+ return new Promise((res, rej) => {
42
51
  ncp.limit = 16;
43
- ncp(source, destination, (err) => {
44
- if (err) {
45
- reject(err);
46
- }
47
- resolve();
52
+ ncp(source, destination, ncpOpts, (err) => {
53
+ return (!!err ? rej(err) : res());
48
54
  });
49
55
  });
50
56
  }
51
57
 
52
58
  /**
53
- * Set project name in package.json.
59
+ * Set update the package.json file.
54
60
  */
55
61
  function updatePackageJson(destination) {
56
62
  let file = editJsonFile(destination + '/package.json', {
57
63
  autosave: true
58
64
  });
59
65
  file.set('name', path.basename(destination));
66
+ file.set('dependencies', {});
67
+ file.set('devDependencies', {});
60
68
  }
61
69
 
62
70
  /**
@@ -89,10 +97,7 @@ function getDepStrings(withAuth, useSocketIo) {
89
97
  dependencies += ' socket.io socket.io-client';
90
98
  }
91
99
  // Return
92
- return {
93
- dependencies,
94
- devDependencies,
95
- };
100
+ return { dependencies, devDependencies };
96
101
  }
97
102
 
98
103
  /**