express-generator-typescript 2.1.12 → 2.2.0
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/tests/auth.spec.ts +2 -2
- package/lib/project-files/spec/tests/users.spec.ts +1 -1
- package/lib/project-files/src/{shared → configurations}/EnvVars.ts +0 -0
- package/lib/project-files/src/{shared → declarations}/enums.ts +0 -0
- package/lib/project-files/src/{shared → declarations}/errors.ts +0 -0
- package/lib/project-files/src/{shared → declarations}/functions.ts +0 -0
- package/lib/project-files/src/{shared → declarations}/types.ts +0 -0
- package/lib/project-files/src/index.ts +1 -1
- package/lib/project-files/src/models/User.ts +1 -1
- package/lib/project-files/src/repos/user-repo.ts +1 -1
- package/lib/project-files/src/routes/auth-routes.ts +2 -2
- package/lib/project-files/src/routes/middlware/adminMw.ts +1 -1
- package/lib/project-files/src/routes/middlware/validate.ts +2 -2
- package/lib/project-files/src/routes/user-routes.ts +1 -1
- package/lib/project-files/src/server.ts +3 -3
- package/lib/project-files/src/services/auth-service.ts +1 -1
- package/lib/project-files/src/services/user-service.ts +1 -1
- package/lib/project-files/src/util/jwt-util.ts +1 -1
- package/lib/project-files/tsconfig.json +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import logger from 'jet-logger';
|
|
|
5
5
|
|
|
6
6
|
import app from '@server';
|
|
7
7
|
import userRepo from '@repos/user-repo';
|
|
8
|
-
import EnvVars from '
|
|
8
|
+
import EnvVars from 'src/configurations/EnvVars';
|
|
9
9
|
import User, { UserRoles } from '@models/User';
|
|
10
10
|
import authRoutes from '@routes/auth-routes';
|
|
11
11
|
import { pwdSaltRounds } from 'spec/support/login-agent';
|
|
12
|
-
import { UnauthorizedError } from '
|
|
12
|
+
import { UnauthorizedError } from 'src/declarations/errors';
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
// **** Variables **** //
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import StatusCodes from 'http-status-codes';
|
|
2
2
|
|
|
3
3
|
import authService from '@services/auth-service';
|
|
4
|
-
import EnvVars from '
|
|
5
|
-
import { IReq, IRes } from '
|
|
4
|
+
import EnvVars from 'src/configurations/EnvVars';
|
|
5
|
+
import { IReq, IRes } from 'src/declarations/types';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
// **** Types **** //
|
|
@@ -6,7 +6,7 @@ import StatusCodes from 'http-status-codes';
|
|
|
6
6
|
import { Request, Response, NextFunction } from 'express';
|
|
7
7
|
import { JwtPayload } from 'jsonwebtoken';
|
|
8
8
|
|
|
9
|
-
import EnvVars from '
|
|
9
|
+
import EnvVars from 'src/configurations/EnvVars';
|
|
10
10
|
import jwtUtil from '@util/jwt-util';
|
|
11
11
|
import { IUser, UserRoles } from '@models/User';
|
|
12
12
|
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
|
|
37
37
|
import { Request, Response, NextFunction, RequestHandler } from 'express';
|
|
38
38
|
|
|
39
|
-
import { ParamInvalidError, ValidatorFnError } from '
|
|
40
|
-
import { TAll } from '
|
|
39
|
+
import { ParamInvalidError, ValidatorFnError } from 'src/declarations/errors';
|
|
40
|
+
import { TAll } from 'src/declarations/types';
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
// **** Types **** //
|
|
@@ -2,7 +2,7 @@ import StatusCodes from 'http-status-codes';
|
|
|
2
2
|
|
|
3
3
|
import userService from '@services/user-service';
|
|
4
4
|
import { IUser } from '@models/User';
|
|
5
|
-
import { IReq, IRes } from '
|
|
5
|
+
import { IReq, IRes } from 'src/declarations/types';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
// **** Variables **** //
|
|
@@ -9,10 +9,10 @@ import 'express-async-errors';
|
|
|
9
9
|
|
|
10
10
|
import BaseRouter from './routes/api';
|
|
11
11
|
import logger from 'jet-logger';
|
|
12
|
-
import EnvVars from '
|
|
13
|
-
import { CustomError } from '
|
|
12
|
+
import EnvVars from 'src/configurations/EnvVars';
|
|
13
|
+
import { CustomError } from 'src/declarations/errors';
|
|
14
14
|
|
|
15
|
-
import { NodeEnvs } from '
|
|
15
|
+
import { NodeEnvs } from 'src/declarations/enums';
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
// **** Init express **** //
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-generator-typescript",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
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",
|