chore: update dependencies and refactor import paths

- Updated package.json with latest dependency versions
- Added winston-daily-rotate-file type definitions
- Refactored import paths in tools and routes to use .js extensions
- Modified SSE routes to use getStatistics method
- Improved log rotation utility with more robust file cleanup
This commit is contained in:
jango-blockchained
2025-02-03 16:28:06 +01:00
parent 5362ed18ee
commit 5082f0d9fd
7 changed files with 52 additions and 35 deletions

View File

@@ -8,7 +8,7 @@
*/
import winston from 'winston';
import 'winston-daily-rotate-file';
import DailyRotateFile from 'winston-daily-rotate-file';
import { APP_CONFIG } from '../config/app.config.js';
/**
@@ -56,7 +56,7 @@ const format = winston.format.combine(
* Transport for daily rotating file
* Configures how logs are rotated and stored
*/
const dailyRotateFileTransport = new winston.transports.DailyRotateFile({
const dailyRotateFileTransport = new DailyRotateFile({
filename: 'logs/%DATE%.log',
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
@@ -73,7 +73,7 @@ const dailyRotateFileTransport = new winston.transports.DailyRotateFile({
* Transport for error logs
* Stores error logs in a separate file
*/
const errorFileTransport = new winston.transports.DailyRotateFile({
const errorFileTransport = new DailyRotateFile({
filename: 'logs/error-%DATE%.log',
datePattern: 'YYYY-MM-DD',
level: 'error',