refactor(events): consume dunite-events, drop bunyip bus + SSE copies #497
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/DEV-528-consume-events"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Consumes the
dunite-eventsleaf crate (dunite #40, DEV-528) and removes bunyip's copies.services/event_bus.rskeeps the concreteBunyipEventenum (the SPA wire shape) and now implementsdunite_events::SseEventfor it (name+target_user).EventBusbecomes a type alias fordunite_events::EventBus<BunyipEvent>, so everyservices::EventBuspath (main.rs, the admin/user handlers, ~10 sites) is unchanged. The localEventBusstruct/impl and the bus unit tests are removed (parity tests live in the crate).handlers/events.rscollapses to a thin handler: authenticate, thendunite_events::sse::sse_response(&bus, user.0.sub). The local SSE framing (encode_event, the merged stream, keepalive, resync) is gone.Pins
Adds
dunite-eventsat1f536a2as a leaf dep to bunyip-domain (the bus alias +SseEventimpl) and bunyip-api (the SSE adapter). No dunite-core dep, so it pins independently.Validation
just check-containergreen:cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace --all-targets.#DEV-528