@dismissible/nestjs-api 0.0.2-canary.8976e84.0 → 0.0.2-canary.c91edbc.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/config/.env.yaml +17 -1
- package/package.json +13 -10
- package/scripts/performance-test.config.json +29 -0
- package/scripts/performance-test.ts +855 -0
- package/src/app-test.factory.ts +8 -1
- package/src/app.e2e-spec.ts +1 -1
- package/src/app.setup.ts +36 -0
- package/src/bootstrap.ts +8 -3
- package/src/config/default-app.config.ts +10 -0
- package/src/cors/cors.config.spec.ts +162 -0
- package/src/cors/cors.config.ts +37 -0
- package/src/cors/index.ts +1 -0
- package/src/health/health.controller.spec.ts +7 -31
- package/src/health/health.controller.ts +4 -5
- package/src/health/health.module.ts +2 -3
- package/src/health/index.ts +0 -1
- package/src/helmet/helmet.config.spec.ts +197 -0
- package/src/helmet/helmet.config.ts +60 -0
- package/src/helmet/index.ts +1 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/transform-boolean.decorator.spec.ts +47 -0
- package/src/utils/transform-boolean.decorator.ts +19 -0
- package/src/utils/transform-comma-separated.decorator.ts +16 -0
- package/src/health/health.service.spec.ts +0 -46
- package/src/health/health.service.ts +0 -16
package/config/.env.yaml
CHANGED
|
@@ -4,5 +4,21 @@ server:
|
|
|
4
4
|
swagger:
|
|
5
5
|
enabled: ${DISMISSIBLE_SWAGGER_ENABLED:-true}
|
|
6
6
|
|
|
7
|
+
helmet:
|
|
8
|
+
enabled: ${DISMISSIBLE_HELMET_ENABLED:-true}
|
|
9
|
+
contentSecurityPolicy: ${DISMISSIBLE_HELMET_CSP:-false}
|
|
10
|
+
crossOriginEmbedderPolicy: ${DISMISSIBLE_HELMET_COEP:-false}
|
|
11
|
+
hstsMaxAge: ${DISMISSIBLE_HELMET_HSTS_MAX_AGE:-31536000}
|
|
12
|
+
hstsIncludeSubDomains: ${DISMISSIBLE_HELMET_HSTS_INCLUDE_SUBDOMAINS:-true}
|
|
13
|
+
hstsPreload: ${DISMISSIBLE_HELMET_HSTS_PRELOAD:-false}
|
|
14
|
+
|
|
15
|
+
cors:
|
|
16
|
+
enabled: ${DISMISSIBLE_CORS_ENABLED:-true}
|
|
17
|
+
origins: ${DISMISSIBLE_CORS_ORIGINS:-http://localhost:3000}
|
|
18
|
+
methods: ${DISMISSIBLE_CORS_METHODS:-GET,POST,DELETE,OPTIONS}
|
|
19
|
+
allowedHeaders: ${DISMISSIBLE_CORS_ALLOWED_HEADERS:-Content-Type,Authorization,x-request-id}
|
|
20
|
+
credentials: ${DISMISSIBLE_CORS_CREDENTIALS:-true}
|
|
21
|
+
maxAge: ${DISMISSIBLE_CORS_MAX_AGE:-86400}
|
|
22
|
+
|
|
7
23
|
db:
|
|
8
|
-
connectionString: ${DISMISSIBLE_POSTGRES_STORAGE_CONNECTION_STRING:-'postgresql://postgres:postgres@localhost:5432/dismissible'}
|
|
24
|
+
connectionString: ${DISMISSIBLE_POSTGRES_STORAGE_CONNECTION_STRING:-'postgresql://postgres:postgres@localhost:5432/dismissible'}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dismissible/nestjs-api",
|
|
3
|
-
"version": "0.0.2-canary.
|
|
3
|
+
"version": "0.0.2-canary.c91edbc.0",
|
|
4
4
|
"description": "Dismissible API application",
|
|
5
5
|
"main": "./src/main.js",
|
|
6
6
|
"types": "./src/main.d.ts",
|
|
@@ -18,18 +18,21 @@
|
|
|
18
18
|
"start": "node src/main.js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dismissible/nestjs-dismissible": "^0.0.2-canary.
|
|
22
|
-
"@dismissible/nestjs-dismissible-item": "^0.0.2-canary.
|
|
23
|
-
"@dismissible/nestjs-storage": "^0.0.2-canary.
|
|
24
|
-
"@dismissible/nestjs-postgres-storage": "^0.0.2-canary.
|
|
25
|
-
"@dismissible/nestjs-logger": "^0.0.2-canary.
|
|
21
|
+
"@dismissible/nestjs-dismissible": "^0.0.2-canary.c91edbc.0",
|
|
22
|
+
"@dismissible/nestjs-dismissible-item": "^0.0.2-canary.c91edbc.0",
|
|
23
|
+
"@dismissible/nestjs-storage": "^0.0.2-canary.c91edbc.0",
|
|
24
|
+
"@dismissible/nestjs-postgres-storage": "^0.0.2-canary.c91edbc.0",
|
|
25
|
+
"@dismissible/nestjs-logger": "^0.0.2-canary.c91edbc.0",
|
|
26
26
|
"@nestjs/common": "^11.1.9",
|
|
27
27
|
"@nestjs/core": "^11.1.9",
|
|
28
|
-
"@nestjs/platform-
|
|
29
|
-
"
|
|
28
|
+
"@nestjs/platform-fastify": "^11.1.9",
|
|
29
|
+
"fastify": "^5.6.0",
|
|
30
|
+
"@fastify/helmet": "^13.0.0",
|
|
31
|
+
"@fastify/static": "^8.3.0",
|
|
32
|
+
"@nestjs/swagger": "^11.2.0",
|
|
30
33
|
"class-transformer": "^0.5.1",
|
|
31
|
-
"class-validator": "^0.14.
|
|
32
|
-
"nest-typed-config": "^2.
|
|
34
|
+
"class-validator": "^0.14.3",
|
|
35
|
+
"nest-typed-config": "^2.10.0",
|
|
33
36
|
"reflect-metadata": "^0.2.2",
|
|
34
37
|
"rxjs": "^7.8.2"
|
|
35
38
|
},
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": {
|
|
3
|
+
"light": {
|
|
4
|
+
"createCount": 50,
|
|
5
|
+
"getCount": 50,
|
|
6
|
+
"connections": 5,
|
|
7
|
+
"duration": 5
|
|
8
|
+
},
|
|
9
|
+
"medium": {
|
|
10
|
+
"createCount": 100,
|
|
11
|
+
"getCount": 100,
|
|
12
|
+
"connections": 10,
|
|
13
|
+
"duration": 10
|
|
14
|
+
},
|
|
15
|
+
"heavy": {
|
|
16
|
+
"createCount": 500,
|
|
17
|
+
"getCount": 500,
|
|
18
|
+
"connections": 25,
|
|
19
|
+
"duration": 30
|
|
20
|
+
},
|
|
21
|
+
"stress": {
|
|
22
|
+
"createCount": 1000,
|
|
23
|
+
"getCount": 1000,
|
|
24
|
+
"connections": 50,
|
|
25
|
+
"duration": 60
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"default": "medium"
|
|
29
|
+
}
|