Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
[0.3.0] - 2026-08-14¶
Consolidates the 0.3.0-beta.1 … 0.3.0-beta.5 prereleases.
Added¶
- Offline recovery — on reconnect the SDK replays the messages missed while disconnected from Centrifugo's channel history, in order, before
CONNECTEDfires RECONNECTED_STALEevent — fires when the history window no longer covers the offline gap and messages are unrecoverable. Carrieschannels,missedPerChannel,totalMissed,offlineDurationMs. The SDK disconnects after emitting it; re-fetch application state, then callreconnect()reconnect()onJaduSpineanduseJaduSpine()— clears offset tracking so no history recovery runs after a post-stale state re-fetchAUTH_RETRYINGevent — fires on each auth retry attempt withattemptNumber,retryInMs,elapsedMsonError()onJaduSpineand theonErrorprop onJaduSpineProvidercentralise ERROR/AUTH_ERROR handling; ERROR events carry akindfield ("transport" | "connect" | "subscription" | "unknown")- GCP Cloud Run deployment path for Centrifugo —
cloudbuild.yaml,infra/docker/Dockerfile, entrypoint, and a deployment guide ininfra/DEPLOYMENT.md
Changed¶
- Requires Centrifugo history and recovery to be enabled on the
frontendandcustomnamespaces (allow_history_for_client,history_size,history_ttl,force_positioning,force_recovery). Seecentrifugo.config.example.json— offline recovery is inert without it - Playground gained an offline simulator and recovery status panel demonstrating the gap-detection flow
Fixed¶
recovered: trueis no longer trusted as proof of a complete replay. The flag only means the requested stream position was still valid — if older publications had been evicted, Centrifugo replays what it still has and still reports success. The SDK now counts the replayed publications and compares them against the offset delta, emittingRECONNECTED_STALEwhen they don't match. Previously a rude transport drop (as opposed to a cleandisconnect()) silently lost events.- Gap detection no longer depends on the server's
history_size. It uses the offset delta from the history reply rather than inferring loss from buffer fullness, which also removes a false positive that firedRECONNECTED_STALEwhenever the buffer happened to be exactly full. History is requested withlimit: -1, so there is no SDK-side cap to keep in sync with server config. - Auth retry attempts are counted per auth failure rather than accumulating across reconnects, and stream epoch changes are tracked so an epoch rotation is treated as a gap.
[0.2.4] - 2026-07-21¶
Fixed¶
subscribeToChannel()cleanup now usesclient.removeSubscription(), which unsubscribes when needed and fully deregisters the channel from the underlying Centrifuge client. Previously, resubscribing to the same channel after all consumers unmounted (e.g. auseProjectChannel-style hook navigating away from and back to the same project) threw"Subscription to the channel X already exists", sinceunsubscribe()alone left the channel registered in the client's internal map.
[0.2.0] - 2026-05-29¶
Added¶
CustomChannelclass for broadcasting to any named group (project rooms, shared feeds) without user-scopinguseChannelReact hook for subscribing to aCustomChannelfrom frontend components — multiple components share one underlying WebSocket subscription, cleaned up when the last unmountscustomCentrifugo namespace support — the SDK now emits channels under thecustom:prefix and documents the required Centrifugo namespace config
Changed¶
- React peer dependency now requires React 19 (
>=19.0.0)
[0.1.2] - 2026-01-01¶
Added¶
JaduSpineBackendsingleton for server-side usage — initialize once at startup and callJaduSpineBackend.publish()/broadcast()from anywhereJaduSpineProviderReact context anduseJaduSpinehook for sharing a single WebSocket connection across the app- JWT authentication support with playground auth flow
FrontendChannel,BackendChanneltyped channel classes withFrontendChannels/BackendChannelsenums- Restructured playground (backend + frontend) for local development
Changed¶
- Renamed source files to camelCase; extracted shared
debugLogger - Flattened workspace structure
[0.1.0] - 2026-01-01¶
Added¶
- Initial release of
@scenarix/jaduspine-sdk JaduSpineclass for WebSocket-based realtime messaging (frontend/bidirectional)- Connection management with automatic reconnection
- Channel subscription/unsubscription
- Message publishing and receiving
- Event-driven architecture with typed events
JaduSpineHttpclass for HTTP-based message publishing (backend/server-side)- Publish to single channel
- Broadcast to multiple channels
- Configurable retry logic with exponential backoff
SpineErrorcustom error class with error codesSpineErrorCodeenum for programmatic error handlingSpineUtilsutility class for message creation and validationEmittergeneric event emitter with type safetyVERSIONandSDK_NAMEexports for version tracking- Full TypeScript type definitions included
- Comprehensive JSDoc documentation