fix: add config.ts with config variable (BASE_DIR...)

This commit is contained in:
MasutaYunikon committed 2026-03-20 16:55:03 +01:00
1 parent d1ccc902da
commit 2efed9dcfc
8 files changed
+26 -32

No files matched your search

+2 -1
View File
@@ -8,6 +8,7 @@
import fs from 'fs'
import path from 'path'
import { BASE_DIR } from './config.js'
export type LogLevel = 'debug' | 'info' | 'warn' | 'error'
@@ -19,7 +20,7 @@ export interface LogEntry {
meta? : Record<string, any>
}
const LOGS_PATH = path.join(process.cwd(), 'config', 'logs.jsonl')
const LOGS_PATH = path.join(BASE_DIR, 'config', 'logs.jsonl')
const MAX_LINES = 2000 // rotation auto au-delà
const IS_PROD = process.env.NODE_ENV === 'production'