@syncular/server-workers 0.59.0 → 0.60.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.js +2 -2
- package/package.json +4 -4
- package/src/realtime-do.ts +2 -2
package/dist/realtime-do.js
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
*/
|
|
97
97
|
import { adapterSyncError, composeEvents, createRealtimeHub, D1ServerStorage, decodeRequestBody, encodeHeartbeat, errorBody, eraseScopeValue, handleRemoteOperation, handleSyncRequest, pruneCommitLog, RingBufferEvents, SSP2_CONTENT_TYPE, SyncError, SyncularAdmin, } from '@syncular/server';
|
|
98
98
|
import { createSyncularAdminRoutes } from '@syncular/server-hono';
|
|
99
|
-
import {
|
|
99
|
+
import { decodeRequest } from '@syncular/core';
|
|
100
100
|
/**
|
|
101
101
|
* Cloudflare's cap on a socket attachment's serialized size
|
|
102
102
|
* (https://developers.cloudflare.com/durable-objects/api/websockets/,
|
|
@@ -266,7 +266,7 @@ export class SyncularRealtimeHost {
|
|
|
266
266
|
// fails in the handler.
|
|
267
267
|
let pullOnly = false;
|
|
268
268
|
try {
|
|
269
|
-
pullOnly =
|
|
269
|
+
pullOnly = decodeRequest(bytes).frames.every((frame) => frame.type !== 'PUSH_COMMIT');
|
|
270
270
|
}
|
|
271
271
|
catch { }
|
|
272
272
|
if (pullOnly)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/server-workers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "Cloudflare Workers adapter for the Syncular sync server",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"!dist/**/*.test.d.ts"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@syncular/core": "0.
|
|
49
|
-
"@syncular/server": "0.
|
|
50
|
-
"@syncular/server-hono": "0.
|
|
48
|
+
"@syncular/core": "0.60.0",
|
|
49
|
+
"@syncular/server": "0.60.0",
|
|
50
|
+
"@syncular/server-hono": "0.60.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@electric-sql/pglite": "^0.5.4",
|
package/src/realtime-do.ts
CHANGED
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
type SyncRequestContext,
|
|
125
125
|
} from '@syncular/server';
|
|
126
126
|
import { createSyncularAdminRoutes } from '@syncular/server-hono';
|
|
127
|
-
import {
|
|
127
|
+
import { decodeRequest } from '@syncular/core';
|
|
128
128
|
|
|
129
129
|
// -- The Durable Object platform surface this class uses (structural) -------
|
|
130
130
|
// Declared locally so the package takes no `@cloudflare/workers-types`
|
|
@@ -451,7 +451,7 @@ export class SyncularRealtimeHost<
|
|
|
451
451
|
// fails in the handler.
|
|
452
452
|
let pullOnly = false;
|
|
453
453
|
try {
|
|
454
|
-
pullOnly =
|
|
454
|
+
pullOnly = decodeRequest(bytes).frames.every(
|
|
455
455
|
(frame) => frame.type !== 'PUSH_COMMIT',
|
|
456
456
|
);
|
|
457
457
|
} catch {}
|