create-express-mongo-ts 1.0.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/README.md +157 -0
- package/bin/cli.js +217 -0
- package/package.json +43 -0
- package/template/.dockerignore +2 -0
- package/template/.prettierignore +6 -0
- package/template/.prettierrc +8 -0
- package/template/Dockerfile +17 -0
- package/template/README.md +67 -0
- package/template/eslint.config.mts +34 -0
- package/template/jest.config.ts +201 -0
- package/template/keys/README.md +2 -0
- package/template/nodemon.json +5 -0
- package/template/package.json +65 -0
- package/template/src/app.ts +42 -0
- package/template/src/config.ts +31 -0
- package/template/src/core/ApiError.ts +118 -0
- package/template/src/core/ApiResponse.ts +140 -0
- package/template/src/core/asyncHandler.ts +15 -0
- package/template/src/core/authUtils.ts +68 -0
- package/template/src/core/jwtUtils.ts +96 -0
- package/template/src/core/logger.ts +48 -0
- package/template/src/core/utils.ts +12 -0
- package/template/src/database/index.ts +56 -0
- package/template/src/database/models/ApiKeys.ts +62 -0
- package/template/src/database/models/Keystore.ts +45 -0
- package/template/src/database/models/Role.ts +27 -0
- package/template/src/database/models/User.ts +64 -0
- package/template/src/database/repositories/ApiKeyRepo.ts +26 -0
- package/template/src/database/repositories/KeystoreRepo.ts +53 -0
- package/template/src/database/repositories/UserRepo.ts +63 -0
- package/template/src/helpers/generateApiKey.ts +23 -0
- package/template/src/helpers/validator.ts +38 -0
- package/template/src/index.ts +36 -0
- package/template/src/middlewares/authorize.middleware.ts +26 -0
- package/template/src/middlewares/error.middleware.ts +42 -0
- package/template/src/middlewares/permission.middleware.ts +20 -0
- package/template/src/middlewares/validator.middleware.ts +170 -0
- package/template/src/routes/auth/apiKey.ts +29 -0
- package/template/src/routes/auth/authentication.ts +45 -0
- package/template/src/routes/auth/index.ts +14 -0
- package/template/src/routes/auth/schema.ts +34 -0
- package/template/src/routes/auth/signin.ts +47 -0
- package/template/src/routes/auth/signout.ts +20 -0
- package/template/src/routes/auth/signup.ts +49 -0
- package/template/src/routes/auth/token.ts +68 -0
- package/template/src/routes/health/index.ts +14 -0
- package/template/src/routes/index.ts +19 -0
- package/template/src/types/ApiKey.ts +13 -0
- package/template/src/types/Keystore.ts +12 -0
- package/template/src/types/Role.ts +14 -0
- package/template/src/types/User.ts +16 -0
- package/template/src/types/app-requests.d.ts +22 -0
- package/template/src/types/permissions.ts +3 -0
- package/template/tsconfig.json +33 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "CommonJS",
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"allowJs": false,
|
|
7
|
+
"strictNullChecks": true,
|
|
8
|
+
"noImplicitAny": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"strictFunctionTypes": false,
|
|
11
|
+
"noImplicitThis": false,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"outDir": "dist",
|
|
16
|
+
"baseUrl": ".",
|
|
17
|
+
"removeComments": true,
|
|
18
|
+
"emitDecoratorMetadata": true,
|
|
19
|
+
"experimentalDecorators": true,
|
|
20
|
+
"allowSyntheticDefaultImports": true,
|
|
21
|
+
"incremental": true,
|
|
22
|
+
"skipLibCheck": true,
|
|
23
|
+
"strictBindCallApply": true,
|
|
24
|
+
"forceConsistentCasingInFileNames": true,
|
|
25
|
+
"noFallthroughCasesInSwitch": true
|
|
26
|
+
},
|
|
27
|
+
"include": [
|
|
28
|
+
"src/**/*"
|
|
29
|
+
],
|
|
30
|
+
"exclude": [
|
|
31
|
+
".templates"
|
|
32
|
+
]
|
|
33
|
+
}
|