refactor: centralize configuration

This commit is contained in:
2025-11-23 19:54:32 +02:00
parent 57a8501c88
commit 72dfa53f80
78 changed files with 2252 additions and 1385 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"dependencies": {
"@devscast/config": "catalog:",
"@basango/domain": "workspace:*",
"pino": "^10.1.0",
"pino-pretty": "^13.1.2"
},
+3 -6
View File
@@ -1,12 +1,9 @@
import { createEnvAccessor } from "@devscast/config";
import { config } from "@basango/domain/config";
import pino from "pino";
const env = createEnvAccessor(["LOG_LEVEL", "NODE_ENV"] as const);
export const logger = pino({
level: env("LOG_LEVEL", { default: "info" }),
// Use pretty printing in development, structured JSON in production
...(env("NODE_ENV") !== "production" && {
level: config.logger.level,
...(process.env.NODE_ENV !== "production" && {
transport: {
options: {
colorize: true,
+6
View File
@@ -1,4 +1,10 @@
{
"compilerOptions": {
"paths": {
"#domain/*": ["../domain/src/*"],
"#logger/*": ["./src/*"]
}
},
"exclude": ["node_modules"],
"extends": "@basango/tsconfig/base.json",
"include": ["src"]