diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a247d9..d84f63e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,5 +38,8 @@ jobs: - name: Typecheck run: task typecheck + - name: Build + run: pnpm build + - name: Integration Tests run: task ci-test diff --git a/package.json b/package.json index 03d6fa5..ccf2bfa 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "nest build", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", - "migrate": "ts-node tools/migrate.ts", + "migrate": "node dist/src/tools/migrate.js", "start": "nest start", "start:debug": "nest start --debug --watch", "start:dev": "nest start --watch", diff --git a/src/infrastructure/logging/logger.module.ts b/src/infrastructure/logging/logger.module.ts index 7034e9c..b86aeaa 100644 --- a/src/infrastructure/logging/logger.module.ts +++ b/src/infrastructure/logging/logger.module.ts @@ -15,11 +15,9 @@ import { LoggerModule } from 'nestjs-pino'; return { pinoHttp: { - // Correlation ID: Ensure each request gets a unique ID genReqId: (req: IncomingMessage) => { return req.headers['x-correlation-id'] || randomUUID(); }, - // PII Masking: auto mask sensitive fields redact: { paths: [ 'req.headers.authorization', @@ -34,7 +32,6 @@ import { LoggerModule } from 'nestjs-pino'; ], censor: '***', }, - // Pretty Print ONLY when not in production and NOT in test transport: !isProduction && !isTest ? { @@ -45,7 +42,6 @@ import { LoggerModule } from 'nestjs-pino'; }, } : undefined, - // JSON format is default in pino for production and tests }, }; }, diff --git a/src/main.ts b/src/main.ts index 282c8be..8b89b69 100644 --- a/src/main.ts +++ b/src/main.ts @@ -23,7 +23,8 @@ async function bootstrap() { const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('docs', app, document); - await app.listen(process.env.PORT || 3000); + const port = Number(process.env.PORT) || 3000; + await app.listen(port); } bootstrap().catch((error: unknown) => { diff --git a/tools/migrate.ts b/src/tools/migrate.ts similarity index 100% rename from tools/migrate.ts rename to src/tools/migrate.ts