@basictech/react 0.8.0-beta.4 → 0.9.0-beta.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/changelog.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # 1.3.4
2
2
 
3
+ ## 0.9.0-beta.0
4
+
5
+ ### Major Changes (breaking)
6
+
7
+ Ground-up rewrite for the server's Sync/2 sync engine and Step 2 auth upgrade.
8
+ The legacy dexie-syncable `/ws` protocol was removed server-side (clean
9
+ break), so 0.8.x sync no longer works against production.
10
+
11
+ - **New sync engine** (`core/sync/`): implements the Sync/2 client contract
12
+ (SYNC_V2.md) — snapshot bootstrap, multiplexed WebSocket subscriptions,
13
+ client-minted idempotent ops (`put`/`patch`/`delete`), persisted pending
14
+ queue with optimistic rebase, ordered apply with echo confirmation,
15
+ poison-op handling for terminal rejections, and re-bootstrap recovery
16
+ (`SNAPSHOT_REQUIRED`/`RESET_REQUIRED`). Local persistence is plain Dexie
17
+ (dexie-syncable/dexie-observable removed).
18
+ - **New public API**: `db.table(name)` with `create/put/patch/delete/get/
19
+ getAll/find`; `useAuth`, `useDb`, `useSyncStatus`, `useShares`, `useShare`;
20
+ `useBasic` remains the umbrella hook. `useQuery` still provides live reads.
21
+ - **Shares v1**: list shares and mount shared data via `useShare(shareId)` —
22
+ separate local keyspace per mount, guest writes when permitted, revocation
23
+ handling.
24
+ - **Auth updates**: `signOut()` revokes server-side via `POST /auth/logout`;
25
+ sign-out (incl. cross-tab) tears down local data without page reloads;
26
+ token-endpoint 429s are treated as transient; `CONNECTION_REVOKED` from
27
+ sync triggers session reconciliation.
28
+ - **REST mode**: `mode="rest"` replaces `dbMode="remote"`, backed by the
29
+ REST v2 surface (`/account/:project_id/db/...`), including
30
+ snapshot/changes endpoints.
31
+ - Tests: vitest unit suite + integration suite against the Sync/2 reference
32
+ server (`basic-server/sync-playground`).
33
+
3
34
  ## 0.8.0-beta.4
4
35
 
5
36
  ### Patch Changes