Update TypeScript configuration for stricter type checks and modify environment variable access. Exclude additional directories from compilation, enhance error handling in resolvers, and improve random element selection in mock data generation. Refactor locale handling in middleware and update GraphQL client to use bracket notation for environment variables.

This commit is contained in:
Peter Meier
2025-12-14 00:05:47 +01:00
parent 671a769e43
commit 2966725685
26 changed files with 115 additions and 76 deletions

View File

@@ -5,7 +5,7 @@ import winston from "winston";
* Erstellt JSON-Logs für bessere Analyse und Monitoring
*/
export const logger = winston.createLogger({
level: process.env.LOG_LEVEL || "info",
level: process.env["LOG_LEVEL"] || "info",
format: winston.format.combine(
winston.format.timestamp(),
winston.format.errors({ stack: true }),
@@ -13,7 +13,7 @@ export const logger = winston.createLogger({
),
defaultMeta: {
service: "graphql-middlelayer",
environment: process.env.NODE_ENV || "development",
environment: process.env["NODE_ENV"] || "development",
},
transports: [
// Console Output (für Development)
@@ -29,7 +29,7 @@ export const logger = winston.createLogger({
),
}),
// File Output (für Production)
...(process.env.NODE_ENV === "production"
...(process.env["NODE_ENV"] === "production"
? [
new winston.transports.File({
filename: "logs/error.log",