@syncular/server-workers 0.15.45 → 0.15.47
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/README.md +19 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -113,7 +113,9 @@ wrangler d1 migrations apply syncular
|
|
|
113
113
|
|
|
114
114
|
The schema is plain SQLite DDL (shared with `bun:sqlite` via
|
|
115
115
|
`sqlite-dialect.ts`), so it is portable across the two SQLite-family
|
|
116
|
-
storages.
|
|
116
|
+
storages. Regenerate and apply a migration when upgrading Syncular adds a core
|
|
117
|
+
table. The durable reaction queue uses `sync_reactions`; a Worker running a
|
|
118
|
+
reaction planner or runner fails closed if that migration is absent.
|
|
117
119
|
|
|
118
120
|
## Storage: D1 (`D1ServerStorage`)
|
|
119
121
|
|
|
@@ -129,6 +131,19 @@ immediately (autocommit) and **buffers** writes, flushing them as one atomic
|
|
|
129
131
|
rolls back by never flushing). A read-your-own-writes overlay makes `getRow`
|
|
130
132
|
see buffered writes of the same commit.
|
|
131
133
|
|
|
134
|
+
Durable reactions use the same model. Planned rows join the source commit's
|
|
135
|
+
atomic batch. `ReactionRunner` claims due rows with one
|
|
136
|
+
`UPDATE ... RETURNING` statement, so concurrent Workers have no select/update
|
|
137
|
+
gap. Reaction handlers execute outside the source transaction. Run the runner
|
|
138
|
+
from a Worker scheduler, queue consumer, Workflow step, or Durable Object
|
|
139
|
+
alarm according to the application's hosting model.
|
|
140
|
+
|
|
141
|
+
Schedule `pruneReactions` per partition as a separate maintenance pass.
|
|
142
|
+
Defaults retain completed rows for 30 days and dead-lettered rows for 90 days,
|
|
143
|
+
with at most 1,000 deletions per pass. Repeat while `mayHaveMore` is true.
|
|
144
|
+
Pending and leased rows are never eligible. D1 executes each bounded cleanup
|
|
145
|
+
as one `DELETE ... RETURNING` statement.
|
|
146
|
+
|
|
132
147
|
**Concurrency posture.** Every push, not only whole-commit validation, must
|
|
133
148
|
serialize before operation reads and re-check idempotency under that boundary.
|
|
134
149
|
`createWorkersFetchHandler` forwards `/sync` to one DO per authenticated
|
|
@@ -316,9 +331,10 @@ WRANGLER_SMOKE=1`-gated test wrapping exactly this recipe.
|
|
|
316
331
|
The server core this entry loads (handler, realtime session, D1 storage,
|
|
317
332
|
memory stores, signed-URL/segment/blob machinery) is free of Bun- and
|
|
318
333
|
Node-only builtins — SigV4 and all hashing use Web Crypto, base64 uses
|
|
319
|
-
`btoa`/`atob`, and the SQLite-family stores that need `bun:sqlite`
|
|
334
|
+
`btoa`/`atob`, and the SQLite-family stores that need `bun:sqlite` or
|
|
335
|
+
`node:sqlite`
|
|
320
336
|
(`SqliteServerStorage`, `SqliteSegmentStore`, `SqliteBlobStore`,
|
|
321
337
|
`SqliteLeaseStore`, `buildSqliteImage`) live in separate modules a Bun/Node
|
|
322
|
-
host
|
|
338
|
+
host imports through `@syncular/server/sqlite`. This is enforced by a
|
|
323
339
|
static import-graph scan in
|
|
324
340
|
`packages/server/test/runtime-neutrality.test.ts`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/server-workers",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.47",
|
|
4
4
|
"description": "Cloudflare Workers adapter for the Syncular sync server",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"!dist/**/*.test.d.ts"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@syncular/server": "0.15.
|
|
49
|
-
"@syncular/server-hono": "0.15.
|
|
48
|
+
"@syncular/server": "0.15.47",
|
|
49
|
+
"@syncular/server-hono": "0.15.47"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@syncular/core": "0.15.
|
|
52
|
+
"@syncular/core": "0.15.47"
|
|
53
53
|
}
|
|
54
54
|
}
|