@syncular/server-workers 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/realtime-do.d.ts +5 -3
- package/package.json +4 -4
- package/src/realtime-do.ts +5 -2
package/dist/realtime-do.d.ts
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
* partition serialization may call `/__wake` after its own commit so sockets
|
|
72
72
|
* re-pull. See `durableObjectRealtimeNotifier` for that caller side.
|
|
73
73
|
*/
|
|
74
|
-
import { D1ServerStorage, type PruneOptions, type RealtimeHubConfig, type RemoteOperationRegistry } from '@syncular/server';
|
|
74
|
+
import { D1ServerStorage, type PruneOptions, type RealtimeHubConfig, type RemoteOperationRegistry, type RemoteOperationResolver } from '@syncular/server';
|
|
75
75
|
export interface DurableObjectStateLike {
|
|
76
76
|
acceptWebSocket(ws: WebSocketLike, tags?: string[]): void;
|
|
77
77
|
getWebSockets(tag?: string): WebSocketLike[];
|
|
@@ -120,9 +120,11 @@ export type RealtimeDOConfig = ({
|
|
|
120
120
|
/**
|
|
121
121
|
* Registered remote queries and commands (REMOTE.md). The Worker forwards
|
|
122
122
|
* `POST <mount>/operations` here, so a command applies on the partition
|
|
123
|
-
* FIFO and fans out to the partition's sockets like a pushed commit.
|
|
123
|
+
* FIFO and fans out to the partition's sockets like a pushed commit. A
|
|
124
|
+
* `RemoteOperationResolver` chooses the registry, the commit actor, and
|
|
125
|
+
* the scope resolver per request (REMOTE.md §5.1).
|
|
124
126
|
*/
|
|
125
|
-
readonly operations?: RemoteOperationRegistry;
|
|
127
|
+
readonly operations?: RemoteOperationRegistry | RemoteOperationResolver;
|
|
126
128
|
};
|
|
127
129
|
/**
|
|
128
130
|
* The subset of `RealtimeHubConfig` the DO host supplies (storage is wired by
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/server-workers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Cloudflare Workers adapter for the Syncular sync server",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"!dist/**/*.test.d.ts"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@syncular/server": "0.
|
|
49
|
-
"@syncular/server-hono": "0.
|
|
48
|
+
"@syncular/server": "0.34.0",
|
|
49
|
+
"@syncular/server-hono": "0.34.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@syncular/core": "0.
|
|
52
|
+
"@syncular/core": "0.34.0",
|
|
53
53
|
"miniflare": "4.20260701.0"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/realtime-do.ts
CHANGED
|
@@ -85,6 +85,7 @@ import {
|
|
|
85
85
|
type RealtimeHubConfig,
|
|
86
86
|
type RealtimeSession,
|
|
87
87
|
type RemoteOperationRegistry,
|
|
88
|
+
type RemoteOperationResolver,
|
|
88
89
|
RingBufferEvents,
|
|
89
90
|
SSP2_CONTENT_TYPE,
|
|
90
91
|
SyncError,
|
|
@@ -149,9 +150,11 @@ export type RealtimeDOConfig = (
|
|
|
149
150
|
/**
|
|
150
151
|
* Registered remote queries and commands (REMOTE.md). The Worker forwards
|
|
151
152
|
* `POST <mount>/operations` here, so a command applies on the partition
|
|
152
|
-
* FIFO and fans out to the partition's sockets like a pushed commit.
|
|
153
|
+
* FIFO and fans out to the partition's sockets like a pushed commit. A
|
|
154
|
+
* `RemoteOperationResolver` chooses the registry, the commit actor, and
|
|
155
|
+
* the scope resolver per request (REMOTE.md §5.1).
|
|
153
156
|
*/
|
|
154
|
-
readonly operations?: RemoteOperationRegistry;
|
|
157
|
+
readonly operations?: RemoteOperationRegistry | RemoteOperationResolver;
|
|
155
158
|
};
|
|
156
159
|
|
|
157
160
|
/**
|