express-generator-typescript 2.5.5 → 2.5.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.
@@ -17,23 +17,11 @@ function apiCb(
17
17
  if (printErr) {
18
18
  logger.err(err);
19
19
  }
20
- _strToDate(res.body, dateParam);
20
+ _iterate(res.body, dateParam);
21
21
  return cb(res);
22
22
  };
23
23
  }
24
24
 
25
- /**
26
- * When date objects get sent through supertest they are converted to
27
- * iso-strings. This will cause "toEqual()"" tests to fail, so we need to
28
- * convert them back to Date objects.
29
- */
30
- function _strToDate(
31
- param: unknown,
32
- prop: string,
33
- ): void {
34
- return _iterate(param, prop);
35
- }
36
-
37
25
  /**
38
26
  * Interate object recursively and convert string-dates to "Date" objects.
39
27
  */
@@ -52,7 +40,7 @@ function _iterate(param: unknown, prop: string): void {
52
40
  // Check valid string or Date object. If undefined just skip
53
41
  const val = paramF[prop];
54
42
  if (val !== undefined && !_isValidDate(val)) {
55
- throw new Error('Property must be a valid date-string or Date() object');
43
+ throw new Error('Property must be a valid date-string or Date object.');
56
44
  }
57
45
  // Convert and iterate
58
46
  if (typeof val !== 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-generator-typescript",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
4
4
  "description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
5
5
  "scripts": {
6
6
  "express-generator-typescript": "node bin/cli.js",
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- const dotenv_1 = __importDefault(require("dotenv"));
8
- const module_alias_1 = __importDefault(require("module-alias"));
9
- const NODE_ENV = (process.env.NODE_ENV ?? 'development');
10
- const result2 = dotenv_1.default.config({
11
- path: path_1.default.join(__dirname, `./config/.env.${NODE_ENV}`),
12
- });
13
- if (result2.error) {
14
- throw result2.error;
15
- }
16
- if (__filename.endsWith('js')) {
17
- module_alias_1.default.addAlias('@src', __dirname + '/dist');
18
- }