make file structure in tsc/ava the same, reduce logging#1456
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes the TypeScript compilation output structure and reduces logging verbosity. The key change is adding rootDir: "./" to tsconfig.json, which changes the compiled output structure from dist/ to dist/src/, requiring updates to file path references throughout the codebase.
- Added
rootDir: "./"to TypeScript configuration to align test and compilation output structures - Reduced logging noise by removing console statements and setting LOG_LEVEL to 'warn' in tests
- Updated file path references to accommodate the new compilation structure
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docker-compose.tst.yml | Adds LOG_LEVEL environment variable set to 'warn' to reduce test log verbosity |
| backend/tsconfig.json | Adds rootDir configuration to standardize output directory structure |
| backend/src/middlewares/logging-middleware/app-logger-middlewate.ts | Changes from logger.log() to logger.info() for HTTP request logging |
| backend/src/entities/logging/winston-logger.ts | Adds info() method to provide explicit info-level logging interface |
| backend/src/entities/email/template-engine/nunjucks.module.ts | Updates template path resolution with additional parent directory traversal and adds existence assertion |
| backend/src/entities/connection/ssl-certificate/read-certificate.ts | Adds extra parent directory traversal to certificate path to match new compilation structure |
| backend/src/authorization/auth.middleware.ts | Removes debug console.log statement |
| backend/src/authorization/auth-with-api.middleware.ts | Removes debug console.info statement |
| backend/package.json | Updates migration script paths from dist/shared/ to dist/src/shared/ to reflect new output structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public info(message: any, ...optionalParams: any[]) { | ||
| this.logger.info(message, ...optionalParams); | ||
| } | ||
|
|
There was a problem hiding this comment.
The newly added info method is functionally identical to the existing log method (lines 17-19), as both simply delegate to this.logger.info(). This creates unnecessary duplication. Consider whether both methods are needed, or if the middleware should continue using the log method instead.
| public info(message: any, ...optionalParams: any[]) { | |
| this.logger.info(message, ...optionalParams); | |
| } |
No description provided.