@protobase/client 0.133.2 → 0.133.3
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/live.d.ts +4 -1
- package/dist/live.js +1 -1
- package/package.json +3 -3
package/dist/live.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ export type LiveChange = {
|
|
|
11
11
|
export type LiveHandlers = {
|
|
12
12
|
/** The records that changed, in commit order, of the live resources the caller may read. */
|
|
13
13
|
onChanges: (changes: LiveChange[]) => void;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Read everything shown again: changes went by while the connection was down for longer than the server keeps them,
|
|
16
|
+
* or the caller's access changed (`live.refresh({ user })` on the server), so a read with `Prefer: live` gets new tokens.
|
|
17
|
+
*/
|
|
15
18
|
onResync: () => void;
|
|
16
19
|
/** The stream failed, with why, or ended (`undefined`); it is followed again after a pause. */
|
|
17
20
|
onRetry?: (error: unknown) => void;
|
package/dist/live.js
CHANGED
|
@@ -21,7 +21,7 @@ const followLive = (send, handlers, retryDelay = backoff) => {
|
|
|
21
21
|
const onEvent = (event) => {
|
|
22
22
|
failures = 0;
|
|
23
23
|
cursor = event.cursor;
|
|
24
|
-
if (event.type === "resync") handlers.onResync();
|
|
24
|
+
if (event.type === "resync" || event.type === "refresh") handlers.onResync();
|
|
25
25
|
if (event.type === "changes") handlers.onChanges(event.changes);
|
|
26
26
|
};
|
|
27
27
|
const follow = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/client",
|
|
3
|
-
"version": "0.133.
|
|
3
|
+
"version": "0.133.3",
|
|
4
4
|
"description": "Typed fetch client for the Protobase REST API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@better-auth/passkey": "^1.7.12",
|
|
34
|
-
"@protobase/layout": "0.133.
|
|
35
|
-
"@protobase/schema": "0.133.
|
|
34
|
+
"@protobase/layout": "0.133.3",
|
|
35
|
+
"@protobase/schema": "0.133.3",
|
|
36
36
|
"@simplewebauthn/browser": "^13.3.0",
|
|
37
37
|
"better-auth": "^1.7.12"
|
|
38
38
|
}
|