refactor(auth): binders take BindContext arg
This commit is contained in:
@@ -5,9 +5,8 @@ import {
|
||||
type ITracer,
|
||||
type ILogger,
|
||||
} from "@repo/core-shared/instrumentation";
|
||||
import type { BindContext } from "@repo/core-shared/di";
|
||||
import type { IEventBus } from "@repo/core-events";
|
||||
import type { IRealtimeBroadcaster, IRealtimeHandlerRegistry } from "@repo/core-realtime";
|
||||
import type { IJobQueue } from "@repo/core-shared/jobs";
|
||||
import { authContainer } from "./container.js";
|
||||
import { AUTH_SYMBOLS } from "./symbols.js";
|
||||
import { MockUsersRepository } from "../infrastructure/repositories/users.repository.mock.js";
|
||||
@@ -34,14 +33,9 @@ import type { IAuthenticationService } from "../application/services/authenticat
|
||||
* Idempotent: safe to call multiple times; each call rebuilds a fresh
|
||||
* populated repo and rebinds the symbol.
|
||||
*/
|
||||
export async function bindDevSeedAuth(
|
||||
tracer: ITracer,
|
||||
logger: ILogger,
|
||||
bus: IEventBus,
|
||||
queue: IJobQueue,
|
||||
realtime: IRealtimeBroadcaster,
|
||||
realtimeRegistry: IRealtimeHandlerRegistry,
|
||||
): Promise<void> {
|
||||
export async function bindDevSeedAuth(ctx: BindContext): Promise<void> {
|
||||
const { tracer, logger, bus, queue, realtime, realtimeRegistry } = ctx;
|
||||
|
||||
// Bind shared instrumentation into feature container
|
||||
if (authContainer.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
|
||||
authContainer.unbind(INSTRUMENTATION_SYMBOLS.TRACER);
|
||||
@@ -84,7 +78,7 @@ export async function bindDevSeedAuth(
|
||||
withCapture(
|
||||
logger,
|
||||
{ feature: "auth", layer: "use-case", name: "auth.signUp" },
|
||||
signUpUseCase(repo, authService, bus),
|
||||
signUpUseCase(repo, authService, bus as IEventBus),
|
||||
),
|
||||
);
|
||||
const wrappedSignOut = withSpan(
|
||||
|
||||
Reference in New Issue
Block a user