refactor: migrate discord-gateway from winston to @bete/shared/logger and utils

- Replace all local logger imports (../../shared/logger/logger.js) with @bete/shared/logger across 26 files
- Remove winston dependency, add pino to discord-gateway package.json
- Delete shared/logger/logger.ts (winston-based, 132 lines) and serialization.ts (109 lines)
- Replace local retryWithBackoff imports with @bete/shared/utils across 6 files
- Delete shared/utils/retry.ts (42 lines)
- Add CustomLogger type alias to @bete/shared/logger for backwards compatibility
- Remove logger param from all retryWithBackoff calls and uploadToTele interfaces
- Frontend: convert entity type files to re-exports from shared/api/client.ts
- Full monorepo typecheck clean (4/4 packages)

35 files changed, 42 insertions(+), 488 deletions(-)
This commit is contained in:
MythEclipse
2026-06-02 21:23:12 +07:00
parent 2d79d8aefd
commit 19028cf244
35 changed files with 42 additions and 488 deletions
@@ -1,5 +1,5 @@
import { executeAll, executeGet } from "../../shared/database/drizzle.js";
import { createChildLogger } from "../../shared/logger/logger.js";
import { createChildLogger } from "@bete/shared/logger";
import type { MessageRecord } from "./types.js";
const logger = createChildLogger("analytics-store");
@@ -1,5 +1,5 @@
import type { WebSocket } from "ws";
import { createChildLogger } from "../../shared/logger/logger.js";
import { createChildLogger } from "@bete/shared/logger";
import type { MediaState } from "../voice-recording/mediaTypes.js";
import type {
AnalysisQueueStatus,
@@ -1,6 +1,6 @@
import type { Client, Message } from "discord.js-selfbot-v13";
import { config } from "../../shared/config/config.js";
import { createChildLogger } from "../../shared/logger/logger.js";
import { createChildLogger } from "@bete/shared/logger";
import { queueMessageAnalysis } from "../ai-moderation/aiAnalyzer.js";
import { processAttachmentUpload } from "../attachment-upload/attachmentUploader.js";
import type { EventBroadcaster } from "../event-broadcaster/eventBroadcaster.js";
@@ -17,7 +17,7 @@ import {
moderationActionsTable,
retentionPoliciesTable,
} from "../../shared/database/schema.js";
import { createChildLogger } from "../../shared/logger/logger.js";
import { createChildLogger } from "@bete/shared/logger";
import { decodeCursor, encodeCursor } from "../message-capture/pagination.js";
import type {
AttachmentRecord,