fix: address Phase 1 spec review findings
- di-explainer.html: update stale JS data strings from positional-arg form (bindAllProduction(config), bindProductionBlog(config,tracer,...)) to ctx-arg form (bindAllProduction(deps), bindProductionBlog(ctx)) with a note on ctx shape. - auth/sign-up.use-case: change bus param from IEventBus to EventBusProtocol|undefined; guard bus.publish with if(bus) so the use case is safe when core-events is absent (Phase 3+). - auth/bind-production + bind-dev-seed: drop as IEventBus cast and unused IEventBus import; ctx.bus is now passed directly (typed as EventBusProtocol|undefined). - marketing-pages/bind-production + bind-dev-seed: drop as IJobQueue cast and unused IJobQueue import; wrap event-handler DI block in if(queue) guard so the handler is only bound when core-jobs is wired. - core-shared/src/index.ts: add `export * from "./di"` as the plan specified (subpath export alone is no longer the only access path). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
type ILogger,
|
||||
} from "@repo/core-shared/instrumentation";
|
||||
import type { BindContext } from "@repo/core-shared/di";
|
||||
import type { IEventBus } from "@repo/core-events";
|
||||
import { authContainer } from "./container.js";
|
||||
import { AUTH_SYMBOLS } from "./symbols.js";
|
||||
import { MockUsersRepository } from "../infrastructure/repositories/users.repository.mock.js";
|
||||
@@ -78,7 +77,7 @@ export async function bindDevSeedAuth(ctx: BindContext): Promise<void> {
|
||||
withCapture(
|
||||
logger,
|
||||
{ feature: "auth", layer: "use-case", name: "auth.signUp" },
|
||||
signUpUseCase(repo, authService, bus as IEventBus),
|
||||
signUpUseCase(repo, authService, bus),
|
||||
),
|
||||
);
|
||||
const wrappedSignOut = withSpan(
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
type ILogger,
|
||||
} from "@repo/core-shared/instrumentation";
|
||||
import type { BindProductionContext } from "@repo/core-shared/di";
|
||||
import type { IEventBus } from "@repo/core-events";
|
||||
import { authContainer } from "./container";
|
||||
import { AUTH_SYMBOLS } from "./symbols";
|
||||
import { UsersRepository } from "../infrastructure/repositories/users.repository";
|
||||
@@ -69,7 +68,7 @@ export function bindProductionAuth(ctx: BindProductionContext): void {
|
||||
withCapture(
|
||||
logger,
|
||||
{ feature: "auth", layer: "use-case", name: "auth.signUp" },
|
||||
signUpUseCase(repo, authService, bus as IEventBus),
|
||||
signUpUseCase(repo, authService, bus),
|
||||
),
|
||||
);
|
||||
const wrappedSignOut = withSpan(
|
||||
|
||||
Reference in New Issue
Block a user