SSR WARNING: the shared bus is a module global — one per Node process, not
per request. The set-render-reset pattern (see ssr.ts) is only safe when
requests render strictly one at a time. Under CONCURRENT SSR renders,
interleaved requests stomp each other's bus: handlers and state leak across
requests. For concurrent servers, don't use the shared bus on the server —
create a bus per request and pass it explicitly (every composable and plugin
accepts a bus option / argument).
Accepts either bus flavor — the composables' dispatch path already handles
thenable results (runDispatch awaits them), so an AsyncCommandBus works at
runtime; previously callers had to cast. getCommandBus()'s static type
stays CommandBus for compatibility.
Replace the shared bus instance.
SSR WARNING: the shared bus is a module global — one per Node process, not per request. The set-render-reset pattern (see ssr.ts) is only safe when requests render strictly one at a time. Under CONCURRENT SSR renders, interleaved requests stomp each other's bus: handlers and state leak across requests. For concurrent servers, don't use the shared bus on the server — create a bus per request and pass it explicitly (every composable and plugin accepts a
busoption / argument).Accepts either bus flavor — the composables' dispatch path already handles thenable results (
runDispatchawaits them), so an AsyncCommandBus works at runtime; previously callers had to cast.getCommandBus()'s static type staysCommandBusfor compatibility.