@livestore/sync-cf 0.0.58-dev.6 → 0.0.58-dev.7
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/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/8ee300993f9a2c909aede59646369fa0cc28d25304b9b9af94f54d4543ad60f4.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/037646d8e1e6ad005a1f4ff1c53fd716bec6a458a8b35ebffd9d5b78ec4ea8a3.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/1471dd2fd02c2d9eb229fcf3cad5fd330cd295bfdee44481714d91b883756b11.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/23a5a193673cd4aa1f412953ff8ee7cf6169b146127a42e9b84ce79993672b0a.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/31569057f8ec82f1d479956671fe58b9f0f4e32a64a68c3ba9c3cb6744f74b3d.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/354c1d4fbf3d44a1e359b6595b4e7f2e0c320e607cad72290b0f842246dea4c3.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/472d06f3610154b855a10d98212ec0ae8aa4022def5c932134cafe07ddca6cc4.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/472d06f3610154b855a10d98212ec0ae8aa4022def5c932134cafe07ddca6cc4.sqlite-shm +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/472d06f3610154b855a10d98212ec0ae8aa4022def5c932134cafe07ddca6cc4.sqlite-wal +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/56fc052bba96d75e557bb09c4826387d0d3500ab0eb8de9e9b7379b795277338.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/70a851401fda75ce3a534dacc3f979fceaff8234430fc6333f22112519388493.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/82afe32c9f3dfe706e088859636f9137e1824b12206e1c0870eef31abcb77d2e.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/83b7880fabbc105109963ee7d1b9b8560b31a560b6b06cf2c326f4f1eca6e80f.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/985f28c526c3fe0133b72007b09233c1a827ae9a588ca5cff0e740f2f5da7dd3.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/a0f452412c79c524292ab9f6895e09605492f5980d8ad6cfc34c0fb88ee6d1cd.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/a58eeee7c3798f238d9446895cd2d0f140b06589dcdf9a777ed79131eb83ea5b.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/baf2225931d572afb47e60d5e189ae58b9764ea0a8a501e0ac202a35c2b35084.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/c27c5b00d9c92102951df7d882fb0b9c9f1a9466e0752265b255041c6c3dc739.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/c4aa0e61dcd784604bee52282348e0538ab69ec76e1652322bbccd539d9ff3ee.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/d2245ee36dd16e1f76180d89bd2503f0d4808a5986a58b8677f9a365a793acc6.sqlite +0 -0
- package/.wrangler/state/v3/do/websocket-server-WebSocketServer/d87433156774c933da83e962eba16107cf02ade2f133d7205963558fe47db3ff.sqlite +0 -0
- package/.wrangler/tmp/dev-33iU4b/index.js +42167 -0
- package/.wrangler/tmp/dev-33iU4b/index.js.map +8 -0
- package/.wrangler/tmp/dev-rI63Kk/index.js +42165 -0
- package/.wrangler/tmp/dev-rI63Kk/index.js.map +8 -0
- package/.wrangler/tmp/dev-txPodK/index.js +42118 -0
- package/.wrangler/tmp/dev-txPodK/index.js.map +8 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cf-worker/durable-object.d.ts +15 -5
- package/dist/cf-worker/durable-object.d.ts.map +1 -1
- package/dist/cf-worker/durable-object.js +100 -68
- package/dist/cf-worker/durable-object.js.map +1 -1
- package/dist/common/ws-message-types.d.ts +238 -50
- package/dist/common/ws-message-types.d.ts.map +1 -1
- package/dist/common/ws-message-types.js +4 -4
- package/dist/common/ws-message-types.js.map +1 -1
- package/dist/sync-impl/ws-impl.d.ts.map +1 -1
- package/dist/sync-impl/ws-impl.js +16 -13
- package/dist/sync-impl/ws-impl.js.map +1 -1
- package/package.json +4 -4
- package/src/cf-worker/durable-object.ts +123 -80
- package/src/common/ws-message-types.ts +15 -5
- package/src/sync-impl/ws-impl.ts +31 -20
- package/tsconfig.json +1 -0
|
@@ -2,42 +2,95 @@ import { Schema } from '@livestore/utils/effect';
|
|
|
2
2
|
export declare const PullReq: Schema.TaggedStruct<"WSMessage.PullReq", {
|
|
3
3
|
requestId: typeof Schema.String;
|
|
4
4
|
/** Omitting the cursor will start from the beginning */
|
|
5
|
-
cursor: Schema.optional<typeof Schema.
|
|
5
|
+
cursor: Schema.optional<typeof Schema.Number>;
|
|
6
6
|
}>;
|
|
7
7
|
export type PullReq = typeof PullReq.Type;
|
|
8
8
|
export declare const PullRes: Schema.TaggedStruct<"WSMessage.PullRes", {
|
|
9
9
|
requestId: typeof Schema.String;
|
|
10
|
-
events: Schema.Array$<Schema.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
events: Schema.Array$<Schema.SchemaClass<{
|
|
11
|
+
readonly id: {
|
|
12
|
+
readonly global: number;
|
|
13
|
+
readonly local: number;
|
|
14
|
+
};
|
|
15
|
+
readonly mutation: string;
|
|
16
|
+
readonly args: any;
|
|
17
|
+
readonly parentId: {
|
|
18
|
+
readonly global: number;
|
|
19
|
+
readonly local: number;
|
|
20
|
+
};
|
|
21
|
+
}, {
|
|
22
|
+
readonly id: {
|
|
23
|
+
readonly global: number;
|
|
24
|
+
readonly local: number;
|
|
25
|
+
};
|
|
26
|
+
readonly mutation: string;
|
|
27
|
+
readonly args: any;
|
|
28
|
+
readonly parentId: {
|
|
29
|
+
readonly global: number;
|
|
30
|
+
readonly local: number;
|
|
31
|
+
};
|
|
32
|
+
}, never>>;
|
|
15
33
|
hasMore: typeof Schema.Boolean;
|
|
16
34
|
}>;
|
|
17
35
|
export type PullRes = typeof PullRes.Type;
|
|
18
36
|
export declare const PushBroadcast: Schema.TaggedStruct<"WSMessage.PushBroadcast", {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
mutationEventEncoded: Schema.SchemaClass<{
|
|
38
|
+
readonly id: {
|
|
39
|
+
readonly global: number;
|
|
40
|
+
readonly local: number;
|
|
41
|
+
};
|
|
42
|
+
readonly mutation: string;
|
|
43
|
+
readonly args: any;
|
|
44
|
+
readonly parentId: {
|
|
45
|
+
readonly global: number;
|
|
46
|
+
readonly local: number;
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
readonly id: {
|
|
50
|
+
readonly global: number;
|
|
51
|
+
readonly local: number;
|
|
52
|
+
};
|
|
53
|
+
readonly mutation: string;
|
|
54
|
+
readonly args: any;
|
|
55
|
+
readonly parentId: {
|
|
56
|
+
readonly global: number;
|
|
57
|
+
readonly local: number;
|
|
58
|
+
};
|
|
59
|
+
}, never>;
|
|
25
60
|
persisted: typeof Schema.Boolean;
|
|
26
61
|
}>;
|
|
27
62
|
export type PushBroadcast = typeof PushBroadcast.Type;
|
|
28
63
|
export declare const PushReq: Schema.TaggedStruct<"WSMessage.PushReq", {
|
|
29
64
|
requestId: typeof Schema.String;
|
|
30
|
-
mutationEventEncoded: Schema.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
65
|
+
mutationEventEncoded: Schema.SchemaClass<{
|
|
66
|
+
readonly id: {
|
|
67
|
+
readonly global: number;
|
|
68
|
+
readonly local: number;
|
|
69
|
+
};
|
|
70
|
+
readonly mutation: string;
|
|
71
|
+
readonly args: any;
|
|
72
|
+
readonly parentId: {
|
|
73
|
+
readonly global: number;
|
|
74
|
+
readonly local: number;
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
readonly id: {
|
|
78
|
+
readonly global: number;
|
|
79
|
+
readonly local: number;
|
|
80
|
+
};
|
|
81
|
+
readonly mutation: string;
|
|
82
|
+
readonly args: any;
|
|
83
|
+
readonly parentId: {
|
|
84
|
+
readonly global: number;
|
|
85
|
+
readonly local: number;
|
|
86
|
+
};
|
|
87
|
+
}, never>;
|
|
35
88
|
persisted: typeof Schema.Boolean;
|
|
36
89
|
}>;
|
|
37
90
|
export type PushReq = typeof PushReq.Type;
|
|
38
91
|
export declare const PushAck: Schema.TaggedStruct<"WSMessage.PushAck", {
|
|
39
92
|
requestId: typeof Schema.String;
|
|
40
|
-
mutationId: typeof Schema.
|
|
93
|
+
mutationId: typeof Schema.Number;
|
|
41
94
|
}>;
|
|
42
95
|
export type PushAck = typeof PushAck.Type;
|
|
43
96
|
export declare const Error: Schema.TaggedStruct<"WSMessage.Error", {
|
|
@@ -76,34 +129,87 @@ export type AdminInfoRes = typeof AdminInfoRes.Type;
|
|
|
76
129
|
export declare const Message: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullReq", {
|
|
77
130
|
requestId: typeof Schema.String;
|
|
78
131
|
/** Omitting the cursor will start from the beginning */
|
|
79
|
-
cursor: Schema.optional<typeof Schema.
|
|
132
|
+
cursor: Schema.optional<typeof Schema.Number>;
|
|
80
133
|
}>, Schema.TaggedStruct<"WSMessage.PullRes", {
|
|
81
134
|
requestId: typeof Schema.String;
|
|
82
|
-
events: Schema.Array$<Schema.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
135
|
+
events: Schema.Array$<Schema.SchemaClass<{
|
|
136
|
+
readonly id: {
|
|
137
|
+
readonly global: number;
|
|
138
|
+
readonly local: number;
|
|
139
|
+
};
|
|
140
|
+
readonly mutation: string;
|
|
141
|
+
readonly args: any;
|
|
142
|
+
readonly parentId: {
|
|
143
|
+
readonly global: number;
|
|
144
|
+
readonly local: number;
|
|
145
|
+
};
|
|
146
|
+
}, {
|
|
147
|
+
readonly id: {
|
|
148
|
+
readonly global: number;
|
|
149
|
+
readonly local: number;
|
|
150
|
+
};
|
|
151
|
+
readonly mutation: string;
|
|
152
|
+
readonly args: any;
|
|
153
|
+
readonly parentId: {
|
|
154
|
+
readonly global: number;
|
|
155
|
+
readonly local: number;
|
|
156
|
+
};
|
|
157
|
+
}, never>>;
|
|
87
158
|
hasMore: typeof Schema.Boolean;
|
|
88
159
|
}>, Schema.TaggedStruct<"WSMessage.PushBroadcast", {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
160
|
+
mutationEventEncoded: Schema.SchemaClass<{
|
|
161
|
+
readonly id: {
|
|
162
|
+
readonly global: number;
|
|
163
|
+
readonly local: number;
|
|
164
|
+
};
|
|
165
|
+
readonly mutation: string;
|
|
166
|
+
readonly args: any;
|
|
167
|
+
readonly parentId: {
|
|
168
|
+
readonly global: number;
|
|
169
|
+
readonly local: number;
|
|
170
|
+
};
|
|
171
|
+
}, {
|
|
172
|
+
readonly id: {
|
|
173
|
+
readonly global: number;
|
|
174
|
+
readonly local: number;
|
|
175
|
+
};
|
|
176
|
+
readonly mutation: string;
|
|
177
|
+
readonly args: any;
|
|
178
|
+
readonly parentId: {
|
|
179
|
+
readonly global: number;
|
|
180
|
+
readonly local: number;
|
|
181
|
+
};
|
|
182
|
+
}, never>;
|
|
95
183
|
persisted: typeof Schema.Boolean;
|
|
96
184
|
}>, Schema.TaggedStruct<"WSMessage.PushReq", {
|
|
97
185
|
requestId: typeof Schema.String;
|
|
98
|
-
mutationEventEncoded: Schema.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
186
|
+
mutationEventEncoded: Schema.SchemaClass<{
|
|
187
|
+
readonly id: {
|
|
188
|
+
readonly global: number;
|
|
189
|
+
readonly local: number;
|
|
190
|
+
};
|
|
191
|
+
readonly mutation: string;
|
|
192
|
+
readonly args: any;
|
|
193
|
+
readonly parentId: {
|
|
194
|
+
readonly global: number;
|
|
195
|
+
readonly local: number;
|
|
196
|
+
};
|
|
197
|
+
}, {
|
|
198
|
+
readonly id: {
|
|
199
|
+
readonly global: number;
|
|
200
|
+
readonly local: number;
|
|
201
|
+
};
|
|
202
|
+
readonly mutation: string;
|
|
203
|
+
readonly args: any;
|
|
204
|
+
readonly parentId: {
|
|
205
|
+
readonly global: number;
|
|
206
|
+
readonly local: number;
|
|
207
|
+
};
|
|
208
|
+
}, never>;
|
|
103
209
|
persisted: typeof Schema.Boolean;
|
|
104
210
|
}>, Schema.TaggedStruct<"WSMessage.PushAck", {
|
|
105
211
|
requestId: typeof Schema.String;
|
|
106
|
-
mutationId: typeof Schema.
|
|
212
|
+
mutationId: typeof Schema.Number;
|
|
107
213
|
}>, Schema.TaggedStruct<"WSMessage.Error", {
|
|
108
214
|
requestId: typeof Schema.String;
|
|
109
215
|
message: typeof Schema.String;
|
|
@@ -127,30 +233,112 @@ export declare const Message: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullR
|
|
|
127
233
|
}>]>;
|
|
128
234
|
export type Message = typeof Message.Type;
|
|
129
235
|
export type MessageEncoded = typeof Message.Encoded;
|
|
130
|
-
export declare const
|
|
236
|
+
export declare const BackendToClientMessage: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullRes", {
|
|
131
237
|
requestId: typeof Schema.String;
|
|
132
|
-
events: Schema.Array$<Schema.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
238
|
+
events: Schema.Array$<Schema.SchemaClass<{
|
|
239
|
+
readonly id: {
|
|
240
|
+
readonly global: number;
|
|
241
|
+
readonly local: number;
|
|
242
|
+
};
|
|
243
|
+
readonly mutation: string;
|
|
244
|
+
readonly args: any;
|
|
245
|
+
readonly parentId: {
|
|
246
|
+
readonly global: number;
|
|
247
|
+
readonly local: number;
|
|
248
|
+
};
|
|
249
|
+
}, {
|
|
250
|
+
readonly id: {
|
|
251
|
+
readonly global: number;
|
|
252
|
+
readonly local: number;
|
|
253
|
+
};
|
|
254
|
+
readonly mutation: string;
|
|
255
|
+
readonly args: any;
|
|
256
|
+
readonly parentId: {
|
|
257
|
+
readonly global: number;
|
|
258
|
+
readonly local: number;
|
|
259
|
+
};
|
|
260
|
+
}, never>>;
|
|
137
261
|
hasMore: typeof Schema.Boolean;
|
|
138
262
|
}>, Schema.TaggedStruct<"WSMessage.PushBroadcast", {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
263
|
+
mutationEventEncoded: Schema.SchemaClass<{
|
|
264
|
+
readonly id: {
|
|
265
|
+
readonly global: number;
|
|
266
|
+
readonly local: number;
|
|
267
|
+
};
|
|
268
|
+
readonly mutation: string;
|
|
269
|
+
readonly args: any;
|
|
270
|
+
readonly parentId: {
|
|
271
|
+
readonly global: number;
|
|
272
|
+
readonly local: number;
|
|
273
|
+
};
|
|
274
|
+
}, {
|
|
275
|
+
readonly id: {
|
|
276
|
+
readonly global: number;
|
|
277
|
+
readonly local: number;
|
|
278
|
+
};
|
|
279
|
+
readonly mutation: string;
|
|
280
|
+
readonly args: any;
|
|
281
|
+
readonly parentId: {
|
|
282
|
+
readonly global: number;
|
|
283
|
+
readonly local: number;
|
|
284
|
+
};
|
|
285
|
+
}, never>;
|
|
145
286
|
persisted: typeof Schema.Boolean;
|
|
146
287
|
}>, Schema.TaggedStruct<"WSMessage.PushAck", {
|
|
147
288
|
requestId: typeof Schema.String;
|
|
148
|
-
mutationId: typeof Schema.
|
|
289
|
+
mutationId: typeof Schema.Number;
|
|
290
|
+
}>, Schema.TaggedStruct<"WSMessage.AdminResetRoomRes", {
|
|
291
|
+
requestId: typeof Schema.String;
|
|
292
|
+
}>, Schema.TaggedStruct<"WSMessage.AdminInfoRes", {
|
|
293
|
+
requestId: typeof Schema.String;
|
|
294
|
+
info: Schema.Struct<{
|
|
295
|
+
durableObjectId: typeof Schema.String;
|
|
296
|
+
}>;
|
|
149
297
|
}>, Schema.TaggedStruct<"WSMessage.Error", {
|
|
150
298
|
requestId: typeof Schema.String;
|
|
151
299
|
message: typeof Schema.String;
|
|
152
300
|
}>, Schema.TaggedStruct<"WSMessage.Pong", {
|
|
153
301
|
requestId: Schema.Literal<["ping"]>;
|
|
154
302
|
}>]>;
|
|
155
|
-
export type
|
|
303
|
+
export type BackendToClientMessage = typeof BackendToClientMessage.Type;
|
|
304
|
+
export declare const ClientToBackendMessage: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullReq", {
|
|
305
|
+
requestId: typeof Schema.String;
|
|
306
|
+
/** Omitting the cursor will start from the beginning */
|
|
307
|
+
cursor: Schema.optional<typeof Schema.Number>;
|
|
308
|
+
}>, Schema.TaggedStruct<"WSMessage.PushReq", {
|
|
309
|
+
requestId: typeof Schema.String;
|
|
310
|
+
mutationEventEncoded: Schema.SchemaClass<{
|
|
311
|
+
readonly id: {
|
|
312
|
+
readonly global: number;
|
|
313
|
+
readonly local: number;
|
|
314
|
+
};
|
|
315
|
+
readonly mutation: string;
|
|
316
|
+
readonly args: any;
|
|
317
|
+
readonly parentId: {
|
|
318
|
+
readonly global: number;
|
|
319
|
+
readonly local: number;
|
|
320
|
+
};
|
|
321
|
+
}, {
|
|
322
|
+
readonly id: {
|
|
323
|
+
readonly global: number;
|
|
324
|
+
readonly local: number;
|
|
325
|
+
};
|
|
326
|
+
readonly mutation: string;
|
|
327
|
+
readonly args: any;
|
|
328
|
+
readonly parentId: {
|
|
329
|
+
readonly global: number;
|
|
330
|
+
readonly local: number;
|
|
331
|
+
};
|
|
332
|
+
}, never>;
|
|
333
|
+
persisted: typeof Schema.Boolean;
|
|
334
|
+
}>, Schema.TaggedStruct<"WSMessage.AdminResetRoomReq", {
|
|
335
|
+
requestId: typeof Schema.String;
|
|
336
|
+
adminSecret: typeof Schema.String;
|
|
337
|
+
}>, Schema.TaggedStruct<"WSMessage.AdminInfoReq", {
|
|
338
|
+
requestId: typeof Schema.String;
|
|
339
|
+
adminSecret: typeof Schema.String;
|
|
340
|
+
}>, Schema.TaggedStruct<"WSMessage.Ping", {
|
|
341
|
+
requestId: Schema.Literal<["ping"]>;
|
|
342
|
+
}>]>;
|
|
343
|
+
export type ClientToBackendMessage = typeof ClientToBackendMessage.Type;
|
|
156
344
|
//# sourceMappingURL=ws-message-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-message-types.d.ts","sourceRoot":"","sources":["../../src/common/ws-message-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,eAAO,MAAM,OAAO;;IAElB,wDAAwD;;EAExD,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAEzC,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"ws-message-types.d.ts","sourceRoot":"","sources":["../../src/common/ws-message-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,eAAO,MAAM,OAAO;;IAElB,wDAAwD;;EAExD,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAEzC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAEzC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;EAGxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;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;;;;;;;;;;;IAQlC,CAAA;AACD,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAA;AAEvE,eAAO,MAAM,sBAAsB;;IAhHjC,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgHiD,CAAA;AAC3G,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { Schema } from '@livestore/utils/effect';
|
|
|
3
3
|
export const PullReq = Schema.TaggedStruct('WSMessage.PullReq', {
|
|
4
4
|
requestId: Schema.String,
|
|
5
5
|
/** Omitting the cursor will start from the beginning */
|
|
6
|
-
cursor: Schema.optional(Schema.
|
|
6
|
+
cursor: Schema.optional(Schema.Number),
|
|
7
7
|
});
|
|
8
8
|
export const PullRes = Schema.TaggedStruct('WSMessage.PullRes', {
|
|
9
9
|
requestId: Schema.String,
|
|
@@ -13,7 +13,6 @@ export const PullRes = Schema.TaggedStruct('WSMessage.PullRes', {
|
|
|
13
13
|
hasMore: Schema.Boolean,
|
|
14
14
|
});
|
|
15
15
|
export const PushBroadcast = Schema.TaggedStruct('WSMessage.PushBroadcast', {
|
|
16
|
-
requestId: Schema.String,
|
|
17
16
|
mutationEventEncoded: mutationEventSchemaEncodedAny,
|
|
18
17
|
persisted: Schema.Boolean,
|
|
19
18
|
});
|
|
@@ -24,7 +23,7 @@ export const PushReq = Schema.TaggedStruct('WSMessage.PushReq', {
|
|
|
24
23
|
});
|
|
25
24
|
export const PushAck = Schema.TaggedStruct('WSMessage.PushAck', {
|
|
26
25
|
requestId: Schema.String,
|
|
27
|
-
mutationId: Schema.
|
|
26
|
+
mutationId: Schema.Number,
|
|
28
27
|
});
|
|
29
28
|
export const Error = Schema.TaggedStruct('WSMessage.Error', {
|
|
30
29
|
requestId: Schema.String,
|
|
@@ -54,5 +53,6 @@ export const AdminInfoRes = Schema.TaggedStruct('WSMessage.AdminInfoRes', {
|
|
|
54
53
|
}),
|
|
55
54
|
});
|
|
56
55
|
export const Message = Schema.Union(PullReq, PullRes, PushBroadcast, PushReq, PushAck, Error, Ping, Pong, AdminResetRoomReq, AdminResetRoomRes, AdminInfoReq, AdminInfoRes);
|
|
57
|
-
export const
|
|
56
|
+
export const BackendToClientMessage = Schema.Union(PullRes, PushBroadcast, PushAck, AdminResetRoomRes, AdminInfoRes, Error, Pong);
|
|
57
|
+
export const ClientToBackendMessage = Schema.Union(PullReq, PushReq, AdminResetRoomReq, AdminInfoReq, Ping);
|
|
58
58
|
//# sourceMappingURL=ws-message-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-message-types.js","sourceRoot":"","sources":["../../src/common/ws-message-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC,mBAAmB,EAAE;IAC9D,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACvC,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC,mBAAmB,EAAE;IAC9D,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,cAAc;IACd,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC;IACnD,OAAO,EAAE,MAAM,CAAC,OAAO;CACxB,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,yBAAyB,EAAE;IAC1E,
|
|
1
|
+
{"version":3,"file":"ws-message-types.js","sourceRoot":"","sources":["../../src/common/ws-message-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B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AAK,CAChD,OAAO,EACP,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,YAAY,EACZ,KAAK,EACL,IAAI,CACL,CAAA;AAGD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-impl.d.ts","sourceRoot":"","sources":["../../src/sync-impl/ws-impl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"ws-impl.d.ts","sourceRoot":"","sources":["../../src/sync-impl/ws-impl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAY,MAAM,EAA0D,MAAM,yBAAyB,CAAA;AAKlH,MAAM,WAAW,aAAc,SAAQ,sBAAsB;IAC3D,IAAI,EAAE,IAAI,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf;AAED,UAAU,iBAAiB;IACzB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAgB,SAAQ,iBAAiB;KAAG;CACvD;AAED,eAAO,MAAM,UAAU,YAAa,aAAa,KAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAoFnG,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="dom" />
|
|
2
2
|
import { InvalidPullError, InvalidPushError } from '@livestore/common';
|
|
3
|
-
import { cuid } from '@livestore/utils/cuid';
|
|
4
3
|
import { Deferred, Effect, Option, PubSub, Queue, Schema, Stream, SubscriptionRef } from '@livestore/utils/effect';
|
|
4
|
+
import { nanoid } from '@livestore/utils/nanoid';
|
|
5
5
|
import { WSMessage } from '../common/index.js';
|
|
6
6
|
export const makeWsSync = (options) => Effect.gen(function* () {
|
|
7
7
|
const wsUrl = `${options.url}/websocket?room=${options.roomId}`;
|
|
@@ -10,16 +10,19 @@ export const makeWsSync = (options) => Effect.gen(function* () {
|
|
|
10
10
|
const api = {
|
|
11
11
|
isConnected,
|
|
12
12
|
pull: (args, { listenForNew }) => listenForNew
|
|
13
|
-
?
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
? Effect.gen(function* () {
|
|
14
|
+
const requestId = nanoid();
|
|
15
|
+
const cursor = Option.getOrUndefined(args)?.cursor.global;
|
|
16
|
+
yield* send(WSMessage.PullReq.make({ cursor, requestId }));
|
|
17
|
+
return Stream.fromPubSub(incomingMessages).pipe(Stream.filter((_) => (_._tag === 'WSMessage.PullRes' ? _.requestId === requestId : true)), Stream.tap((_) => _._tag === 'WSMessage.Error' ? new InvalidPullError({ message: _.message }) : Effect.void), Stream.filter(Schema.is(Schema.Union(WSMessage.PushBroadcast, WSMessage.PullRes))), Stream.map((msg) => msg._tag === 'WSMessage.PushBroadcast'
|
|
18
|
+
? [{ mutationEventEncoded: msg.mutationEventEncoded, persisted: msg.persisted, metadata }]
|
|
19
|
+
: msg.events.map((_) => ({ mutationEventEncoded: _, metadata, persisted: true }))), Stream.flattenIterables);
|
|
20
|
+
}).pipe(Stream.unwrap)
|
|
18
21
|
: Effect.gen(function* () {
|
|
19
|
-
const requestId =
|
|
20
|
-
const cursor = Option.getOrUndefined(args)?.cursor;
|
|
22
|
+
const requestId = nanoid();
|
|
23
|
+
const cursor = Option.getOrUndefined(args)?.cursor.global;
|
|
21
24
|
yield* send(WSMessage.PullReq.make({ cursor, requestId }));
|
|
22
|
-
return Stream.fromPubSub(incomingMessages).pipe(Stream.filter((_) => _.requestId === requestId), Stream.tap((_) => _._tag === 'WSMessage.Error' ? new InvalidPullError({ message: _.message }) : Effect.void), Stream.filter(Schema.is(WSMessage.PullRes)), Stream.takeUntil((_) => _.hasMore === false), Stream.map((_) => _.events), Stream.flattenIterables, Stream.map((mutationEventEncoded) => ({
|
|
25
|
+
return Stream.fromPubSub(incomingMessages).pipe(Stream.filter((_) => _._tag !== 'WSMessage.PushBroadcast' && _.requestId === requestId), Stream.tap((_) => _._tag === 'WSMessage.Error' ? new InvalidPullError({ message: _.message }) : Effect.void), Stream.filter(Schema.is(WSMessage.PullRes)), Stream.takeUntil((_) => _.hasMore === false), Stream.map((_) => _.events), Stream.flattenIterables, Stream.map((mutationEventEncoded) => ({
|
|
23
26
|
mutationEventEncoded,
|
|
24
27
|
metadata,
|
|
25
28
|
persisted: true,
|
|
@@ -27,10 +30,10 @@ export const makeWsSync = (options) => Effect.gen(function* () {
|
|
|
27
30
|
}).pipe(Stream.unwrap),
|
|
28
31
|
push: (mutationEventEncoded, persisted) => Effect.gen(function* () {
|
|
29
32
|
const ready = yield* Deferred.make();
|
|
30
|
-
const requestId =
|
|
31
|
-
yield* Stream.fromPubSub(incomingMessages).pipe(Stream.filter((_) => _.requestId === requestId), Stream.tap((_) => _._tag === 'WSMessage.Error'
|
|
33
|
+
const requestId = nanoid();
|
|
34
|
+
yield* Stream.fromPubSub(incomingMessages).pipe(Stream.filter((_) => _._tag !== 'WSMessage.PushBroadcast' && _.requestId === requestId), Stream.tap((_) => _._tag === 'WSMessage.Error'
|
|
32
35
|
? Deferred.fail(ready, new InvalidPushError({ message: _.message }))
|
|
33
|
-
: Effect.void), Stream.filter(Schema.is(WSMessage.PushAck)), Stream.filter((_) => _.mutationId === mutationEventEncoded.id), Stream.take(1), Stream.tap(() => Deferred.succeed(ready, void 0)), Stream.runDrain, Effect.tapCauseLogPretty, Effect.fork);
|
|
36
|
+
: Effect.void), Stream.filter(Schema.is(WSMessage.PushAck)), Stream.filter((_) => _.mutationId === mutationEventEncoded.id.global), Stream.take(1), Stream.tap(() => Deferred.succeed(ready, void 0)), Stream.runDrain, Effect.tapCauseLogPretty, Effect.fork);
|
|
34
37
|
yield* send(WSMessage.PushReq.make({ mutationEventEncoded, requestId, persisted }));
|
|
35
38
|
yield* Deferred.await(ready);
|
|
36
39
|
return { metadata };
|
|
@@ -61,7 +64,7 @@ const connect = (wsUrl) => Effect.gen(function* () {
|
|
|
61
64
|
const connectionClosed = yield* Deferred.make();
|
|
62
65
|
const pongMessages = yield* Queue.unbounded();
|
|
63
66
|
const messageHandler = (event) => {
|
|
64
|
-
const decodedEventRes = Schema.decodeUnknownEither(Schema.parseJson(WSMessage.
|
|
67
|
+
const decodedEventRes = Schema.decodeUnknownEither(Schema.parseJson(WSMessage.BackendToClientMessage))(event.data);
|
|
65
68
|
if (decodedEventRes._tag === 'Left') {
|
|
66
69
|
console.error('Sync: Invalid message received', decodedEventRes.left);
|
|
67
70
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-impl.js","sourceRoot":"","sources":["../../src/sync-impl/ws-impl.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAG3B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"ws-impl.js","sourceRoot":"","sources":["../../src/sync-impl/ws-impl.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAG3B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAClH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAgB9C,MAAM,CAAC,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AC,CAAA;QAC7B,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,0CAA0C,CAAC,CAAC,CAAA;QAEpE,KAAK,CAAC,CAAC,eAAe,CAAC,IAAI,CACzB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAClD,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC,EACtE,MAAM,CAAC,UAAU,CAClB,CAAA;QAED,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;IACzC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAEtB,KAAK,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,UAAU,CAAC,CAAA;IAErF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAA;AAChD,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/sync-cf",
|
|
3
|
-
"version": "0.0.58-dev.
|
|
3
|
+
"version": "0.0.58-dev.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@livestore/common": "0.0.58-dev.
|
|
13
|
-
"@livestore/utils": "0.0.58-dev.
|
|
12
|
+
"@livestore/common": "0.0.58-dev.7",
|
|
13
|
+
"@livestore/utils": "0.0.58-dev.7"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@cloudflare/workers-types": "4.20240729.0",
|
|
17
|
-
"wrangler": "^3.
|
|
17
|
+
"wrangler": "^3.76.0"
|
|
18
18
|
},
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|