feat(auth): signUp publishes userSignedUpEvent

signUpUseCase now takes an IEventBus and publishes userSignedUpEvent
after creating the user (synthesizing email from username since auth
is username-based). Use case mocks-default in module.ts get a fresh
InMemoryEventBus per resolution; bind-production / bind-dev-seed wire
the shared bus passed by bindAll. Tests updated to inject
RecordingEventBus, including a new test that asserts publish on
success and silence on failure.
This commit is contained in:
2026-05-08 16:28:21 +02:00
parent 7f63adf740
commit c1b8a7e434
7 changed files with 67 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ export async function bindDevSeedAuth(
withCapture(
logger,
{ feature: "auth", layer: "use-case", name: "auth.signUp" },
signUpUseCase(repo, authService),
signUpUseCase(repo, authService, bus),
),
);
const wrappedSignOut = withSpan(