express-generator-typescript 2.6.1 → 2.6.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.
- package/lib/project-files/spec/support/Paths.ts +1 -1
- package/lib/project-files/spec/tests/users.spec.ts +2 -2
- package/lib/project-files/src/{util → common/util}/route-errors.ts +1 -1
- package/lib/project-files/src/index.ts +1 -1
- package/lib/project-files/src/models/User.ts +3 -4
- package/lib/project-files/src/models/common/types/index.ts +5 -0
- package/lib/project-files/src/repos/MockOrm.ts +2 -2
- package/lib/project-files/src/repos/UserRepo.ts +1 -1
- package/lib/project-files/src/repos/database.test.json +1 -1
- package/lib/project-files/src/routes/UserRoutes.ts +3 -3
- package/lib/project-files/src/routes/{util → common/util}/index.ts +1 -1
- package/lib/project-files/src/routes/index.ts +1 -1
- package/lib/project-files/src/server.ts +5 -5
- package/lib/project-files/src/services/UserService.ts +2 -2
- package/package.json +1 -1
- /package/lib/project-files/src/{constants → common/constants}/ENV.ts +0 -0
- /package/lib/project-files/src/{constants → common/constants}/HttpStatusCodes.ts +0 -0
- /package/lib/project-files/src/{constants → common/constants}/Paths.ts +0 -0
- /package/lib/project-files/src/{constants → common/constants}/index.ts +0 -0
- /package/lib/project-files/src/{util → common/util}/misc.ts +0 -0
- /package/lib/project-files/src/{util → common/util}/validators.ts +0 -0
- /package/lib/project-files/src/routes/{types → common/types}/index.ts +0 -0
|
@@ -8,8 +8,8 @@ import UserRepo from '@src/repos/UserRepo';
|
|
|
8
8
|
import User, { IUser } from '@src/models/User';
|
|
9
9
|
import { USER_NOT_FOUND_ERR } from '@src/services/UserService';
|
|
10
10
|
|
|
11
|
-
import HttpStatusCodes from '@src/constants/HttpStatusCodes';
|
|
12
|
-
import { ValidationError } from '@src/util/route-errors';
|
|
11
|
+
import HttpStatusCodes from '@src/common/constants/HttpStatusCodes';
|
|
12
|
+
import { ValidationError } from '@src/common/util/route-errors';
|
|
13
13
|
|
|
14
14
|
import Paths from 'spec/support/Paths';
|
|
15
15
|
import { cleanDatabase, parseValidationErr, TRes } from 'spec/support';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IParseObjectError } from 'jet-validators/utils';
|
|
2
2
|
|
|
3
|
-
import HttpStatusCodes from '@src/constants/HttpStatusCodes';
|
|
3
|
+
import HttpStatusCodes from '@src/common/constants/HttpStatusCodes';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
/******************************************************************************
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { isString } from 'jet-validators';
|
|
2
2
|
import { parseObject, TParseOnError } from 'jet-validators/utils';
|
|
3
3
|
|
|
4
|
-
import { isRelationalKey, transIsDate } from '@src/util/validators';
|
|
4
|
+
import { isRelationalKey, transIsDate } from '@src/common/util/validators';
|
|
5
|
+
import { IModel } from './common/types';
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
/******************************************************************************
|
|
@@ -20,11 +21,9 @@ const DEFAULT_USER_VALS = (): IUser => ({
|
|
|
20
21
|
Types
|
|
21
22
|
******************************************************************************/
|
|
22
23
|
|
|
23
|
-
export interface IUser {
|
|
24
|
-
id: number;
|
|
24
|
+
export interface IUser extends IModel {
|
|
25
25
|
name: string;
|
|
26
26
|
email: string;
|
|
27
|
-
created: Date;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import jsonfile from 'jsonfile';
|
|
2
2
|
|
|
3
|
-
import ENV from '@src/constants/ENV';
|
|
4
|
-
import { NodeEnvs } from '@src/constants';
|
|
3
|
+
import ENV from '@src/common/constants/ENV';
|
|
4
|
+
import { NodeEnvs } from '@src/common/constants';
|
|
5
5
|
import { IUser } from '@src/models/User';
|
|
6
6
|
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"users":[{"id":
|
|
1
|
+
{"users":[{"id":391221599752,"name":"John Smith","created":"2025-04-22T17:16:32.105Z","email":"john.smith@gmail.com"},{"id":604903419745,"name":"Gordan Freeman","created":"2025-04-22T17:16:32.105Z","email":"gordan.freeman@gmail.com"}]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { isNumber } from 'jet-validators';
|
|
2
2
|
import { transform } from 'jet-validators/utils';
|
|
3
3
|
|
|
4
|
-
import HttpStatusCodes from '@src/constants/HttpStatusCodes';
|
|
4
|
+
import HttpStatusCodes from '@src/common/constants/HttpStatusCodes';
|
|
5
5
|
import UserService from '@src/services/UserService';
|
|
6
6
|
import User from '@src/models/User';
|
|
7
7
|
|
|
8
|
-
import { IReq, IRes } from './types';
|
|
9
|
-
import { parseReq } from './util';
|
|
8
|
+
import { IReq, IRes } from './common/types';
|
|
9
|
+
import { parseReq } from './common/util';
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
/******************************************************************************
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseObject, TSchema } from 'jet-validators/utils';
|
|
2
2
|
|
|
3
|
-
import { ValidationError } from '@src/util/route-errors';
|
|
3
|
+
import { ValidationError } from '@src/common/util/route-errors';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
/******************************************************************************
|
|
@@ -8,11 +8,11 @@ import 'express-async-errors';
|
|
|
8
8
|
|
|
9
9
|
import BaseRouter from '@src/routes';
|
|
10
10
|
|
|
11
|
-
import Paths from '@src/constants/Paths';
|
|
12
|
-
import ENV from '@src/constants/ENV';
|
|
13
|
-
import HttpStatusCodes from '@src/constants/HttpStatusCodes';
|
|
14
|
-
import { RouteError } from '@src/util/route-errors';
|
|
15
|
-
import { NodeEnvs } from '@src/constants';
|
|
11
|
+
import Paths from '@src/common/constants/Paths';
|
|
12
|
+
import ENV from '@src/common/constants/ENV';
|
|
13
|
+
import HttpStatusCodes from '@src/common/constants/HttpStatusCodes';
|
|
14
|
+
import { RouteError } from '@src/common/util/route-errors';
|
|
15
|
+
import { NodeEnvs } from '@src/common/constants';
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
/******************************************************************************
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RouteError } from '@src/util/route-errors';
|
|
2
|
-
import HttpStatusCodes from '@src/constants/HttpStatusCodes';
|
|
1
|
+
import { RouteError } from '@src/common/util/route-errors';
|
|
2
|
+
import HttpStatusCodes from '@src/common/constants/HttpStatusCodes';
|
|
3
3
|
|
|
4
4
|
import UserRepo from '@src/repos/UserRepo';
|
|
5
5
|
import { IUser } from '@src/models/User';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-generator-typescript",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
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",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|