refactor(navigation): binders take BindContext arg

This commit is contained in:
2026-05-09 12:43:22 +02:00
parent fe6c41b69d
commit a439038748
3 changed files with 12 additions and 28 deletions

View File

@@ -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 { navigationContainer } from "./container.js";
import { NAVIGATION_SYMBOLS } from "./symbols.js";
import { MockHeaderRepository } from "../infrastructure/repositories/header.repository.mock.js";
@@ -27,14 +25,9 @@ import type { IHeaderRepository } from "../application/repositories/header.repos
* Idempotent: safe to call multiple times; each call rebuilds a fresh
* populated repo and rebinds the symbol.
*/
export async function bindDevSeedNavigation(
tracer: ITracer,
logger: ILogger,
bus: IEventBus,
queue: IJobQueue,
realtime: IRealtimeBroadcaster,
realtimeRegistry: IRealtimeHandlerRegistry,
): Promise<void> {
export async function bindDevSeedNavigation(ctx: BindContext): Promise<void> {
const { tracer, logger, bus, queue, realtime, realtimeRegistry } = ctx;
// Bind shared instrumentation into feature container
if (navigationContainer.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
navigationContainer.unbind(INSTRUMENTATION_SYMBOLS.TRACER);