Releases: napolab/y-durableobjects
Releases · napolab/y-durableobjects
v1.0.2
v1.0.1
v1.0.0
Major Changes
-
0446fbd: Add JS RPC Support for getYDoc and updateYDoc
-
Major Features:
- JS RPC APIs
getYDoc
andupdateYDoc
:- Implemented new JS RPC APIs to fetch (
getYDoc
) and update (updateYDoc
) YDocs within Durable Objects. - Allows manipulating YDocs from sources other than WebSocket, enhancing flexibility and control.
- Implemented new JS RPC APIs to fetch (
- JS RPC APIs
-
Hono Integration:
- Added examples for integrating
y-durableobjects
with Hono, using both shorthand and detailed methods. - Demonstrated how to handle WebSocket connections via fetch due to the current limitations of JS RPC (see Cloudflare issue).
- Added examples for integrating
-
Extending with JS RPC:
- Explained how to extend
y-durableobjects
for advanced operations, including accessing and manipulating protected fields:app
: The Hono app instance used to handle requests.doc
: An instance ofWSSharedDoc
managing the YDoc state.storage
: AYTransactionStorageImpl
instance for storing and retrieving YDoc updates.sessions
: A map to manage active WebSocket sessions.awarenessClients
: A set to track client awareness states.
- Provided a minimal example of creating a custom Durable Object by extending
YDurableObjects
.
- Explained how to extend
-
Client-side Typed Fetch with Hono RPC:
- Included a guide for creating a typed client using
hc
fromhono/client
to facilitate Hono RPC on the client side.
- Included a guide for creating a typed client using
-
Documentation Updates:
- Updated the README with detailed examples and explanations for the new features and integrations.
- Ensured clarity and ease of understanding for developers looking to utilize the new functionalities.
-