refactor(blog): 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 { blogContainer } from "./container.js";
|
||||
import { BLOG_SYMBOLS } from "./symbols.js";
|
||||
import { MockArticlesRepository } from "../infrastructure/repositories/articles.repository.mock.js";
|
||||
@@ -30,14 +28,9 @@ import type { IArticlesRepository } from "../application/repositories/articles.r
|
||||
* Idempotent: safe to call multiple times; each call rebuilds a fresh
|
||||
* populated repo and rebinds the symbol.
|
||||
*/
|
||||
export async function bindDevSeedBlog(
|
||||
tracer: ITracer,
|
||||
logger: ILogger,
|
||||
bus: IEventBus,
|
||||
queue: IJobQueue,
|
||||
realtime: IRealtimeBroadcaster,
|
||||
realtimeRegistry: IRealtimeHandlerRegistry,
|
||||
): Promise<void> {
|
||||
export async function bindDevSeedBlog(ctx: BindContext): Promise<void> {
|
||||
const { tracer, logger, bus, queue, realtime, realtimeRegistry } = ctx;
|
||||
|
||||
// Bind shared instrumentation into feature container
|
||||
if (blogContainer.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
|
||||
blogContainer.unbind(INSTRUMENTATION_SYMBOLS.TRACER);
|
||||
|
||||
Reference in New Issue
Block a user