refactor(media): binders take BindContext arg
This commit is contained in:
@@ -5,9 +5,7 @@ import {
|
||||
type ITracer,
|
||||
type ILogger,
|
||||
} from "@repo/core-shared/instrumentation";
|
||||
import type { IEventBus } from "@repo/core-events";
|
||||
import type { IRealtimeBroadcaster, IRealtimeHandlerRegistry } from "@repo/core-realtime";
|
||||
import type { IJobQueue } from "@repo/core-shared/jobs";
|
||||
import type { BindContext } from "@repo/core-shared/di";
|
||||
import { mediaContainer } from "./container.js";
|
||||
import { MEDIA_SYMBOLS } from "./symbols.js";
|
||||
import { MockMediaRepository } from "../infrastructure/repositories/media.repository.mock.js";
|
||||
@@ -30,14 +28,9 @@ import type { IMediaRepository } from "../application/repositories/media.reposit
|
||||
* Idempotent: safe to call multiple times; each call rebuilds a fresh
|
||||
* populated repo and rebinds the symbol.
|
||||
*/
|
||||
export async function bindDevSeedMedia(
|
||||
tracer: ITracer,
|
||||
logger: ILogger,
|
||||
bus: IEventBus,
|
||||
queue: IJobQueue,
|
||||
realtime: IRealtimeBroadcaster,
|
||||
realtimeRegistry: IRealtimeHandlerRegistry,
|
||||
): Promise<void> {
|
||||
export async function bindDevSeedMedia(ctx: BindContext): Promise<void> {
|
||||
const { tracer, logger, bus, queue, realtime, realtimeRegistry } = ctx;
|
||||
|
||||
// Bind shared instrumentation into feature container
|
||||
if (mediaContainer.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
|
||||
mediaContainer.unbind(INSTRUMENTATION_SYMBOLS.TRACER);
|
||||
|
||||
Reference in New Issue
Block a user