refactor(gateway): drop shared barrel, migrate to granular imports + shared error helpers

- delete src/shared/index.ts fat barrel; point 10 importers at the exact
  module they use (redis-channels, moderation-types, utils/pagination)
- message-capture/types.ts re-exports from shared/moderation-types directly
- shared/errors: add errorMessage() + isTransientStreamError() helpers,
  replacing the repeated err-message and transient-code checks
- drop unused imports flagged by biome

No behavior change. typecheck + lint + 138 tests green.
This commit is contained in:
asepharyana committed 2026-09-24 14:58:19 +07:00
1 parent 8743fcc0b5
commit 6bf3b40cc7
13 files changed
+60 -26

No files matched your search

@@ -2,8 +2,11 @@ import { and, desc, eq, inArray, type SQL, sql } from "drizzle-orm";
import type { NodePgDatabase } from "drizzle-orm/node-postgres";
import type * as schema from "../../shared/database/schema.js";
import { messagesTable } from "../../shared/database/schema.js";
import { buildCursorCondition, pageResult } from "../../shared/index.js";
import { createChildLogger, type Logger } from "../../shared/logger/index.js";
import {
buildCursorCondition,
pageResult,
} from "../../shared/utils/pagination.js";
import type {
MessageQuery,
MessageRecord,