cca-auth-module 0.0.1
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/README.md +0 -0
- package/dist/application/dtos/LoginDTO.d.ts +7 -0
- package/dist/application/dtos/RegisterDTO.d.ts +8 -0
- package/dist/application/dtos/UserDTO.d.ts +8 -0
- package/dist/application/mappers/createUserMappings.d.ts +2 -0
- package/dist/application/mappers/utils/mapper.d.ts +1 -0
- package/dist/application/useCase/LoginUseCase.d.ts +20 -0
- package/dist/application/useCase/RefreshTokenUseCase.d.ts +15 -0
- package/dist/application/useCase/RegisterUseCase.d.ts +13 -0
- package/dist/application/validators/authValidation.d.ts +10 -0
- package/dist/domain/interfaces/IAuthService.d.ts +9 -0
- package/dist/domain/interfaces/IBaseContainerConfig.d.ts +9 -0
- package/dist/domain/interfaces/IConfigFinderOptions.d.ts +5 -0
- package/dist/domain/interfaces/IDecodedToken.d.ts +6 -0
- package/dist/domain/interfaces/IJwtAuth.d.ts +9 -0
- package/dist/domain/interfaces/IJwtConfig.d.ts +6 -0
- package/dist/domain/interfaces/IRefreshTokenRequest.d.ts +3 -0
- package/dist/domain/interfaces/IResponse.d.ts +4 -0
- package/dist/domain/interfaces/ITokenConfig.d.ts +6 -0
- package/dist/index.d.mts +118 -0
- package/dist/index.d.ts +118 -0
- package/dist/index.js +569 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +535 -0
- package/dist/index.mjs.map +1 -0
- package/dist/infrastructure/auth/JwtAuthService.d.ts +19 -0
- package/dist/infrastructure/container/createAuthContainer.d.ts +7 -0
- package/dist/infrastructure/repository/AuthRepository.d.ts +8 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/presentation/controller/AuthController.d.ts +15 -0
- package/dist/utils/ConfigFinder.d.ts +9 -0
- package/dist/utils/Errors.d.ts +21 -0
- package/package.json +38 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/application/dtos/UserDTO.ts":{"bytes":281,"imports":[{"path":"@automapper/classes","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/Errors.ts":{"bytes":1104,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/validators/authValidation.ts":{"bytes":4701,"imports":[{"path":"yup","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"src/utils/Errors.ts","kind":"import-statement","original":"../../utils/Errors"},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"../../utils/ConfigFinder","kind":"import-statement","external":true},{"path":"../dtos/RegisterDTO","kind":"import-statement","external":true},{"path":"../dtos/LoginDTO","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"fs/promises","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/dtos/RegisterDTO.ts":{"bytes":181,"imports":[{"path":"cca-entities","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/mappers/createUserMappings.ts":{"bytes":1183,"imports":[{"path":"@automapper/core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"src/application/dtos/RegisterDTO.ts","kind":"import-statement","original":"../dtos/RegisterDTO"},{"path":"src/application/dtos/UserDTO.ts","kind":"import-statement","original":"../dtos/UserDTO"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/mappers/utils/mapper.ts":{"bytes":272,"imports":[{"path":"@automapper/core","kind":"import-statement","external":true},{"path":"@automapper/classes","kind":"import-statement","external":true},{"path":"src/application/mappers/createUserMappings.ts","kind":"import-statement","original":"../createUserMappings"}],"format":"esm"},"src/application/useCase/LoginUseCase.ts":{"bytes":2092,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"../../infrastructure/auth/JwtAuthService","kind":"import-statement","external":true},{"path":"src/application/dtos/UserDTO.ts","kind":"import-statement","original":"../dtos/UserDTO"},{"path":"../dtos/LoginDTO","kind":"import-statement","external":true},{"path":"src/application/validators/authValidation.ts","kind":"import-statement","original":"../validators/authValidation"},{"path":"src/application/mappers/utils/mapper.ts","kind":"import-statement","original":"../mappers/utils/mapper"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/useCase/RegisterUseCase.ts":{"bytes":2284,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"src/application/mappers/utils/mapper.ts","kind":"import-statement","original":"../mappers/utils/mapper"},{"path":"src/application/dtos/RegisterDTO.ts","kind":"import-statement","original":"../dtos/RegisterDTO"},{"path":"src/application/validators/authValidation.ts","kind":"import-statement","original":"../validators/authValidation"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/useCase/RefreshTokenUseCase.ts":{"bytes":1623,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IDecodedToken","kind":"import-statement","external":true},{"path":"../../infrastructure/auth/JwtAuthService","kind":"import-statement","external":true},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/presentation/controller/AuthController.ts":{"bytes":2058,"imports":[{"path":"express","kind":"import-statement","external":true},{"path":"../../application/dtos/LoginDTO","kind":"import-statement","external":true},{"path":"../../application/dtos/RegisterDTO","kind":"import-statement","external":true},{"path":"../../application/useCase/RegisterUseCase","kind":"import-statement","external":true},{"path":"../../application/useCase/LoginUseCase","kind":"import-statement","external":true},{"path":"../../application/useCase/RefreshTokenUseCase","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IRefreshTokenRequest","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IDecodedToken","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/infrastructure/repository/AuthRepository.ts":{"bytes":675,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"typeorm","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/infrastructure/auth/JwtAuthService.ts":{"bytes":3672,"imports":[{"path":"jsonwebtoken","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IJwtConfig","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IAuthService","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IDecodedToken","kind":"import-statement","external":true},{"path":"src/utils/Errors.ts","kind":"import-statement","original":"../../utils/Errors"},{"path":"../repository/AuthRepository","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/infrastructure/container/createAuthContainer.ts":{"bytes":1602,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"src/application/useCase/LoginUseCase.ts","kind":"import-statement","original":"../../application/useCase/LoginUseCase"},{"path":"src/application/useCase/RegisterUseCase.ts","kind":"import-statement","original":"../../application/useCase/RegisterUseCase"},{"path":"src/application/useCase/RefreshTokenUseCase.ts","kind":"import-statement","original":"../../application/useCase/RefreshTokenUseCase"},{"path":"src/presentation/controller/AuthController.ts","kind":"import-statement","original":"../../presentation/controller/AuthController"},{"path":"src/infrastructure/repository/AuthRepository.ts","kind":"import-statement","original":"../repository/AuthRepository"},{"path":"src/infrastructure/auth/JwtAuthService.ts","kind":"import-statement","original":"../auth/JwtAuthService"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":122,"imports":[{"path":"src/infrastructure/container/createAuthContainer.ts","kind":"import-statement","original":"./infrastructure/container/createAuthContainer"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":35057},"dist/index.js":{"imports":[{"path":"cca-core","kind":"require-call","external":true},{"path":"cca-entities","kind":"require-call","external":true},{"path":"cca-core","kind":"require-call","external":true},{"path":"cca-entities","kind":"require-call","external":true},{"path":"@automapper/classes","kind":"require-call","external":true},{"path":"yup","kind":"require-call","external":true},{"path":"cca-entities","kind":"require-call","external":true},{"path":"bcrypt","kind":"require-call","external":true},{"path":"cca-core","kind":"require-call","external":true},{"path":"fs/promises","kind":"dynamic-import","external":true},{"path":"@automapper/core","kind":"require-call","external":true},{"path":"@automapper/classes","kind":"require-call","external":true},{"path":"@automapper/core","kind":"require-call","external":true},{"path":"cca-entities","kind":"require-call","external":true},{"path":"cca-core","kind":"require-call","external":true},{"path":"bcrypt","kind":"require-call","external":true},{"path":"cca-entities","kind":"require-call","external":true},{"path":"cca-core","kind":"require-call","external":true},{"path":"cca-core","kind":"require-call","external":true},{"path":"jsonwebtoken","kind":"require-call","external":true},{"path":"bcrypt","kind":"require-call","external":true},{"path":"cca-core","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":149},"src/infrastructure/container/createAuthContainer.ts":{"bytesInOutput":1146},"src/application/useCase/LoginUseCase.ts":{"bytesInOutput":1318},"src/application/dtos/UserDTO.ts":{"bytesInOutput":480},"src/application/validators/authValidation.ts":{"bytesInOutput":4139},"src/utils/Errors.ts":{"bytesInOutput":1362},"src/application/mappers/utils/mapper.ts":{"bytesInOutput":234},"src/application/mappers/createUserMappings.ts":{"bytesInOutput":1479},"src/application/dtos/RegisterDTO.ts":{"bytesInOutput":112},"src/application/useCase/RegisterUseCase.ts":{"bytesInOutput":1778},"src/application/useCase/RefreshTokenUseCase.ts":{"bytesInOutput":1164},"src/presentation/controller/AuthController.ts":{"bytesInOutput":1334},"src/infrastructure/repository/AuthRepository.ts":{"bytesInOutput":466},"src/infrastructure/auth/JwtAuthService.ts":{"bytesInOutput":2731}},"bytes":20738}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/application/dtos/UserDTO.ts":{"bytes":281,"imports":[{"path":"@automapper/classes","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/Errors.ts":{"bytes":1104,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/validators/authValidation.ts":{"bytes":4701,"imports":[{"path":"yup","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"src/utils/Errors.ts","kind":"import-statement","original":"../../utils/Errors"},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"../../utils/ConfigFinder","kind":"import-statement","external":true},{"path":"../dtos/RegisterDTO","kind":"import-statement","external":true},{"path":"../dtos/LoginDTO","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"fs/promises","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/dtos/RegisterDTO.ts":{"bytes":181,"imports":[{"path":"cca-entities","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/mappers/createUserMappings.ts":{"bytes":1183,"imports":[{"path":"@automapper/core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"src/application/dtos/RegisterDTO.ts","kind":"import-statement","original":"../dtos/RegisterDTO"},{"path":"src/application/dtos/UserDTO.ts","kind":"import-statement","original":"../dtos/UserDTO"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/mappers/utils/mapper.ts":{"bytes":272,"imports":[{"path":"@automapper/core","kind":"import-statement","external":true},{"path":"@automapper/classes","kind":"import-statement","external":true},{"path":"src/application/mappers/createUserMappings.ts","kind":"import-statement","original":"../createUserMappings"}],"format":"esm"},"src/application/useCase/LoginUseCase.ts":{"bytes":2092,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"../../infrastructure/auth/JwtAuthService","kind":"import-statement","external":true},{"path":"src/application/dtos/UserDTO.ts","kind":"import-statement","original":"../dtos/UserDTO"},{"path":"../dtos/LoginDTO","kind":"import-statement","external":true},{"path":"src/application/validators/authValidation.ts","kind":"import-statement","original":"../validators/authValidation"},{"path":"src/application/mappers/utils/mapper.ts","kind":"import-statement","original":"../mappers/utils/mapper"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/useCase/RegisterUseCase.ts":{"bytes":2284,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"src/application/mappers/utils/mapper.ts","kind":"import-statement","original":"../mappers/utils/mapper"},{"path":"src/application/dtos/RegisterDTO.ts","kind":"import-statement","original":"../dtos/RegisterDTO"},{"path":"src/application/validators/authValidation.ts","kind":"import-statement","original":"../validators/authValidation"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/application/useCase/RefreshTokenUseCase.ts":{"bytes":1623,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IDecodedToken","kind":"import-statement","external":true},{"path":"../../infrastructure/auth/JwtAuthService","kind":"import-statement","external":true},{"path":"../../infrastructure/repository/AuthRepository","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/presentation/controller/AuthController.ts":{"bytes":2058,"imports":[{"path":"express","kind":"import-statement","external":true},{"path":"../../application/dtos/LoginDTO","kind":"import-statement","external":true},{"path":"../../application/dtos/RegisterDTO","kind":"import-statement","external":true},{"path":"../../application/useCase/RegisterUseCase","kind":"import-statement","external":true},{"path":"../../application/useCase/LoginUseCase","kind":"import-statement","external":true},{"path":"../../application/useCase/RefreshTokenUseCase","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IRefreshTokenRequest","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IDecodedToken","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/infrastructure/repository/AuthRepository.ts":{"bytes":675,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"typeorm","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/infrastructure/auth/JwtAuthService.ts":{"bytes":3672,"imports":[{"path":"jsonwebtoken","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IJwtConfig","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IAuthService","kind":"import-statement","external":true},{"path":"../../domain/interfaces/IDecodedToken","kind":"import-statement","external":true},{"path":"src/utils/Errors.ts","kind":"import-statement","original":"../../utils/Errors"},{"path":"../repository/AuthRepository","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/infrastructure/container/createAuthContainer.ts":{"bytes":1602,"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"src/application/useCase/LoginUseCase.ts","kind":"import-statement","original":"../../application/useCase/LoginUseCase"},{"path":"src/application/useCase/RegisterUseCase.ts","kind":"import-statement","original":"../../application/useCase/RegisterUseCase"},{"path":"src/application/useCase/RefreshTokenUseCase.ts","kind":"import-statement","original":"../../application/useCase/RefreshTokenUseCase"},{"path":"src/presentation/controller/AuthController.ts","kind":"import-statement","original":"../../presentation/controller/AuthController"},{"path":"src/infrastructure/repository/AuthRepository.ts","kind":"import-statement","original":"../repository/AuthRepository"},{"path":"src/infrastructure/auth/JwtAuthService.ts","kind":"import-statement","original":"../auth/JwtAuthService"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":122,"imports":[{"path":"src/infrastructure/container/createAuthContainer.ts","kind":"import-statement","original":"./infrastructure/container/createAuthContainer"}],"format":"esm"}},"outputs":{"dist/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":35002},"dist/index.mjs":{"imports":[{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"@automapper/classes","kind":"import-statement","external":true},{"path":"yup","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"fs/promises","kind":"dynamic-import","external":true},{"path":"@automapper/core","kind":"import-statement","external":true},{"path":"@automapper/classes","kind":"import-statement","external":true},{"path":"@automapper/core","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"cca-entities","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true},{"path":"jsonwebtoken","kind":"import-statement","external":true},{"path":"bcrypt","kind":"import-statement","external":true},{"path":"cca-core","kind":"import-statement","external":true}],"exports":["createAuthContainer"],"entryPoint":"src/index.ts","inputs":{"src/infrastructure/container/createAuthContainer.ts":{"bytesInOutput":1113},"src/application/useCase/LoginUseCase.ts":{"bytesInOutput":1288},"src/application/dtos/UserDTO.ts":{"bytesInOutput":394},"src/application/validators/authValidation.ts":{"bytesInOutput":4043},"src/utils/Errors.ts":{"bytesInOutput":1362},"src/application/mappers/utils/mapper.ts":{"bytesInOutput":189},"src/application/mappers/createUserMappings.ts":{"bytesInOutput":1063},"src/application/dtos/RegisterDTO.ts":{"bytesInOutput":112},"src/application/useCase/RegisterUseCase.ts":{"bytesInOutput":1772},"src/application/useCase/RefreshTokenUseCase.ts":{"bytesInOutput":1169},"src/presentation/controller/AuthController.ts":{"bytesInOutput":1334},"src/infrastructure/repository/AuthRepository.ts":{"bytesInOutput":448},"src/infrastructure/auth/JwtAuthService.ts":{"bytesInOutput":2722},"src/index.ts":{"bytesInOutput":0}},"bytes":18458}}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NextFunction, Request, Response } from "express";
|
|
2
|
+
import { RegisterUseCase } from "../../application/useCase/RegisterUseCase";
|
|
3
|
+
import { LoginUseCase } from "../../application/useCase/LoginUseCase";
|
|
4
|
+
import { RefreshTokenUseCase } from "../../application/useCase/RefreshTokenUseCase";
|
|
5
|
+
import { IDecodedToken } from "../../domain/interfaces/IDecodedToken";
|
|
6
|
+
export declare class AuthController {
|
|
7
|
+
private loginUseCase;
|
|
8
|
+
private registerUseCase;
|
|
9
|
+
private refreshTokenUseCase;
|
|
10
|
+
constructor(loginUseCase: LoginUseCase, registerUseCase: RegisterUseCase, refreshTokenUseCase: RefreshTokenUseCase);
|
|
11
|
+
login: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
12
|
+
register: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
13
|
+
refreshToken: (req: Request, res: Response) => Promise<void>;
|
|
14
|
+
verifyToken: (token: string) => Promise<IDecodedToken>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IConfigFinderOptions } from '../domain/interfaces/IConfigFinderOptions';
|
|
2
|
+
export declare class ConfigFinder {
|
|
3
|
+
private readonly fileName;
|
|
4
|
+
private readonly maxDepth;
|
|
5
|
+
private readonly startPath;
|
|
6
|
+
constructor({ fileName, maxDepth, startPath }?: IConfigFinderOptions);
|
|
7
|
+
findConfig(): Promise<string>;
|
|
8
|
+
private searchConfigRecursive;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class AppError extends Error {
|
|
2
|
+
message: string;
|
|
3
|
+
statusCode: number;
|
|
4
|
+
name: string;
|
|
5
|
+
constructor(message: string, statusCode?: number, name?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class ValidationError extends AppError {
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class ConfigNotFoundException extends AppError {
|
|
11
|
+
constructor(message: string);
|
|
12
|
+
}
|
|
13
|
+
export declare class NotFoundError extends AppError {
|
|
14
|
+
constructor(message: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class ForbiddenError extends AppError {
|
|
17
|
+
constructor(message?: string);
|
|
18
|
+
}
|
|
19
|
+
export declare class UnauthorizedError extends AppError {
|
|
20
|
+
constructor(message?: string);
|
|
21
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cca-auth-module",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A TypeScript project using pnpm as the package manager.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/express": "^5.0.0",
|
|
15
|
+
"@types/node": "^22.10.9",
|
|
16
|
+
"typescript": "^5.7.3"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@automapper/classes": "^8.8.1",
|
|
20
|
+
"@automapper/core": "^8.8.1",
|
|
21
|
+
"@types/bcrypt": "^5.0.2",
|
|
22
|
+
"@types/jsonwebtoken": "^9.0.7",
|
|
23
|
+
"bcrypt": "^5.1.1",
|
|
24
|
+
"cca-core": "^0.1.9",
|
|
25
|
+
"cca-entities": "^0.0.9",
|
|
26
|
+
"express": "^4.21.2",
|
|
27
|
+
"pg": "^8.13.1",
|
|
28
|
+
"reflect-metadata": "0.1.13",
|
|
29
|
+
"tsup": "^8.3.5",
|
|
30
|
+
"typeorm": "^0.3.20",
|
|
31
|
+
"uuid": "^11.0.5",
|
|
32
|
+
"yup": "^1.6.1"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build:tsup": "tsup src/index.ts --format cjs,esm --dts --metafile",
|
|
36
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
37
|
+
}
|
|
38
|
+
}
|