feat(web-next): bindAll wires (realtime, realtimeRegistry) through every feature

Extends bindAll/bindAllProduction/bindAllDevSeed to accept BindAllDeps
and thread realtime + realtimeRegistry as the 6th and 7th positional args
into each per-feature binder. Adds bindRealtimeBridge stub (empty allowlist
in v1). bindAll accepts optional deps with InMemoryRealtimeBroadcaster
fallback so existing page-level callers stay type-safe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 22:51:39 +02:00
parent 5659a0f61b
commit 4032e5a722
3 changed files with 110 additions and 32 deletions

View File

@@ -7,6 +7,8 @@
import "reflect-metadata";
import { describe, it, expect, beforeEach } from "vitest";
import { bindAllDevSeed, __resetBindStateForTests } from "@/server/bind-production";
import { RecordingRealtimeBroadcaster } from "@repo/core-testing/instrumentation";
import { RealtimeHandlerRegistry } from "@repo/core-realtime";
import { authContainer } from "@repo/auth/di/container";
import { AUTH_SYMBOLS } from "@repo/auth/di/symbols";
import type { ISignUpController } from "@repo/auth";
@@ -20,7 +22,10 @@ describe("e2e: sign-up triggers welcome email via cross-feature event", () => {
});
it("delivers a welcome email after a successful sign-up", async () => {
await bindAllDevSeed();
await bindAllDevSeed({
realtime: new RecordingRealtimeBroadcaster(),
realtimeRegistry: new RealtimeHandlerRegistry(),
});
const mailer = marketingPagesContainer.get<RecordingMailerService>(
MARKETING_PAGES_SYMBOLS.IMailerService,