svelte-adapter-uws-extensions 0.5.0 → 0.5.2
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/package.json +2 -2
- package/redis/cursor.d.ts +15 -3
- package/redis/cursor.js +772 -724
- package/redis/pubsub.js +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-adapter-uws-extensions",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"tag": "latest"
|
|
6
6
|
},
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"node": ">=22.0.0"
|
|
155
155
|
},
|
|
156
156
|
"peerDependencies": {
|
|
157
|
-
"svelte-adapter-uws": "^0.5.
|
|
157
|
+
"svelte-adapter-uws": "^0.5.2"
|
|
158
158
|
},
|
|
159
159
|
"dependencies": {
|
|
160
160
|
"ioredis": "^5.0.0"
|
package/redis/cursor.d.ts
CHANGED
|
@@ -32,9 +32,20 @@ export interface RedisCursorOptions {
|
|
|
32
32
|
*/
|
|
33
33
|
select?: (userData: any) => any;
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* How often to flush coalesced cursor positions to Redis HSET, in ms.
|
|
37
|
+
* The wire/relay path runs on the per-flush cadence (`topicThrottle`) and
|
|
38
|
+
* does not wait for HSET; this timer only governs the Redis snapshot used
|
|
39
|
+
* for new-joiner reconcile and cross-instance startup reconcile. 100ms
|
|
40
|
+
* staleness on the reconcile path is fine for cursors.
|
|
41
|
+
* 0 disables coalescing and reverts to per-flush HSET (legacy behavior).
|
|
42
|
+
* @default 100
|
|
43
|
+
*/
|
|
44
|
+
snapshotIntervalMs?: number;
|
|
45
|
+
|
|
35
46
|
/**
|
|
36
47
|
* TTL in seconds for Redis hash entries.
|
|
37
|
-
* Entries are refreshed on every
|
|
48
|
+
* Entries are refreshed on every snapshot tick. Stale cursors from crashed
|
|
38
49
|
* instances are cleaned up automatically after this period.
|
|
39
50
|
* @default 30
|
|
40
51
|
*/
|
|
@@ -97,8 +108,9 @@ export interface RedisCursorTracker {
|
|
|
97
108
|
remove(ws: any, platform: Platform, topic?: string): Promise<void>;
|
|
98
109
|
|
|
99
110
|
/**
|
|
100
|
-
* Send
|
|
101
|
-
*
|
|
111
|
+
* Send the current catalog (users) + positions for a topic to a single
|
|
112
|
+
* connection as two ordered events on `__cursor:{topic}`: `catalog`
|
|
113
|
+
* (`[{key, user}, ...]`) followed by `bulk` (`[{key, data}, ...]`).
|
|
102
114
|
* Folded into `attach` for typical use; exposed for advanced callers
|
|
103
115
|
* that want to resend a snapshot without re-subscribing.
|
|
104
116
|
*/
|