@prenta/core 8.21.4 → 8.21.6
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 +14 -0
- package/dist/presence/index.d.ts +9 -1
- package/dist/presence/index.d.ts.map +1 -1
- package/dist/presence/index.js +131 -14
- package/dist/presence/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @actuate-media/cms-core
|
|
2
2
|
|
|
3
|
+
## 8.21.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c9b397e: Expire presence records for editors who never reconnect. When the presence stream closed itself and the browser did not come back, the editor's record was only removed while another stream was open on the same document. With none open it stayed in memory for the life of the server process. A one-off sweep now removes it after the 60-second stale timeout.
|
|
8
|
+
|
|
9
|
+
## 8.21.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 761c0e0: Close the presence event stream before Vercel's 30-second function limit. The stream that shows who else is editing a document had no lifetime at all, so on Vercel the platform killed it mid-response and logged "Task timed out after 30 seconds" for every open document editor. It now closes cleanly after 20 seconds on Vercel and four minutes elsewhere, and clears its timers and update subscription when it does. `createSSEPresenceAdapter` takes an optional `{ maxLifetimeMs }` to override that.
|
|
14
|
+
|
|
15
|
+
The admin's presence indicator used to close its connection on the first stream error, so it never reconnected and went quiet for the rest of the editing session. It now lets the browser reconnect and keeps showing the current collaborators in the meantime. On the server, a user stays in the presence list across that reconnect, and a disconnect no longer removes a user who still has another connection open, such as a second tab or a newer connection that replaced a dropped one.
|
|
16
|
+
|
|
3
17
|
## 8.21.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/presence/index.d.ts
CHANGED
|
@@ -14,7 +14,15 @@ export interface PresenceProvider {
|
|
|
14
14
|
heartbeat(documentId: string, userId: string): Promise<void>;
|
|
15
15
|
onUpdate(documentId: string, callback: (users: PresenceUser[]) => void): () => void;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @param options.maxLifetimeMs How long each presence stream stays open
|
|
19
|
+
* before the server closes it cleanly, in ms. Defaults to
|
|
20
|
+
* `resolveSseMaxLifetimeMs()`: 20 s on Vercel, so the stream ends
|
|
21
|
+
* before the function's `maxDuration` cap, and four minutes elsewhere.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createSSEPresenceAdapter(options?: {
|
|
24
|
+
maxLifetimeMs?: number;
|
|
25
|
+
}): {
|
|
18
26
|
provider: PresenceProvider;
|
|
19
27
|
handleSSE: (request: Request, documentId: string, user: {
|
|
20
28
|
userId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presence/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presence/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,IAAI,CAAA;IACjB,QAAQ,EAAE,IAAI,CAAA;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7F,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;IACvD,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CACpF;AAMD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG;IAClF,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,SAAS,EAAE,CACT,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KACnC,QAAQ,CAAA;CACd,CA+MA"}
|
package/dist/presence/index.js
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
|
+
import { encodeSseEvent, resolveSseMaxLifetimeMs } from '../realtime/sse.js';
|
|
1
2
|
const STALE_TIMEOUT_MS = 60_000;
|
|
2
|
-
|
|
3
|
+
const encoder = new TextEncoder();
|
|
4
|
+
/**
|
|
5
|
+
* @param options.maxLifetimeMs How long each presence stream stays open
|
|
6
|
+
* before the server closes it cleanly, in ms. Defaults to
|
|
7
|
+
* `resolveSseMaxLifetimeMs()`: 20 s on Vercel, so the stream ends
|
|
8
|
+
* before the function's `maxDuration` cap, and four minutes elsewhere.
|
|
9
|
+
*/
|
|
10
|
+
export function createSSEPresenceAdapter(options = {}) {
|
|
3
11
|
const connections = new Map();
|
|
4
12
|
const subscribers = new Map();
|
|
13
|
+
// Open streams per document and user. A user can hold more than one:
|
|
14
|
+
// two tabs, or a reconnect that lands before the server notices the
|
|
15
|
+
// old connection dropped. They only leave when the last one goes.
|
|
16
|
+
const openStreams = new Map();
|
|
17
|
+
// Open streams per document, whoever holds them. While a document has
|
|
18
|
+
// at least one, that stream's interval sweeps its stale users.
|
|
19
|
+
const openStreamsByDocument = new Map();
|
|
20
|
+
// One pending sweep per document that has users on record but no open
|
|
21
|
+
// stream left to sweep them.
|
|
22
|
+
const orphanSweeps = new Map();
|
|
5
23
|
function broadcast(documentId) {
|
|
6
24
|
const users = Array.from(connections.get(documentId)?.values() ?? []);
|
|
7
25
|
const subs = subscribers.get(documentId);
|
|
@@ -28,19 +46,53 @@ export function createSSEPresenceAdapter() {
|
|
|
28
46
|
changed = true;
|
|
29
47
|
}
|
|
30
48
|
}
|
|
49
|
+
if (docConns.size === 0)
|
|
50
|
+
connections.delete(documentId);
|
|
31
51
|
if (changed)
|
|
32
52
|
broadcast(documentId);
|
|
33
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Expire a document's users once nothing else will. A stream that
|
|
56
|
+
* closes itself keeps its user on record so a reconnect does not make
|
|
57
|
+
* them blink out. If the browser never comes back and no other stream
|
|
58
|
+
* is open on the document, no interval is left to sweep that record,
|
|
59
|
+
* so it would stay in memory for the life of the process. This runs
|
|
60
|
+
* one sweep after the stale timeout, and again for as long as a
|
|
61
|
+
* heartbeat keeps a user fresh without a stream.
|
|
62
|
+
*/
|
|
63
|
+
function scheduleOrphanSweep(documentId) {
|
|
64
|
+
if (orphanSweeps.has(documentId))
|
|
65
|
+
return;
|
|
66
|
+
if (!connections.get(documentId)?.size)
|
|
67
|
+
return;
|
|
68
|
+
const timer = setTimeout(() => {
|
|
69
|
+
orphanSweeps.delete(documentId);
|
|
70
|
+
// A stream opened in the meantime sweeps on its own interval.
|
|
71
|
+
if (openStreamsByDocument.has(documentId))
|
|
72
|
+
return;
|
|
73
|
+
expireStale(documentId);
|
|
74
|
+
scheduleOrphanSweep(documentId);
|
|
75
|
+
}, STALE_TIMEOUT_MS + 1_000);
|
|
76
|
+
timer.unref?.();
|
|
77
|
+
orphanSweeps.set(documentId, timer);
|
|
78
|
+
}
|
|
34
79
|
const provider = {
|
|
35
80
|
async join(documentId, user) {
|
|
36
81
|
if (!connections.has(documentId))
|
|
37
82
|
connections.set(documentId, new Map());
|
|
83
|
+
const docConns = connections.get(documentId);
|
|
38
84
|
const now = new Date();
|
|
39
|
-
|
|
85
|
+
// A rejoin (the browser reconnecting after the stream's bounded
|
|
86
|
+
// lifetime) keeps the original `connectedAt`.
|
|
87
|
+
const connectedAt = docConns.get(user.userId)?.connectedAt ?? now;
|
|
88
|
+
docConns.set(user.userId, { ...user, connectedAt, lastSeen: now });
|
|
40
89
|
broadcast(documentId);
|
|
41
90
|
},
|
|
42
91
|
async leave(documentId, userId) {
|
|
43
|
-
connections.get(documentId)
|
|
92
|
+
const docConns = connections.get(documentId);
|
|
93
|
+
docConns?.delete(userId);
|
|
94
|
+
if (docConns?.size === 0)
|
|
95
|
+
connections.delete(documentId);
|
|
44
96
|
broadcast(documentId);
|
|
45
97
|
},
|
|
46
98
|
async getPresent(documentId) {
|
|
@@ -63,30 +115,95 @@ export function createSSEPresenceAdapter() {
|
|
|
63
115
|
},
|
|
64
116
|
};
|
|
65
117
|
function handleSSE(request, documentId, user) {
|
|
66
|
-
|
|
67
|
-
|
|
118
|
+
const maxLifetimeMs = resolveSseMaxLifetimeMs(options.maxLifetimeMs);
|
|
119
|
+
const streamKey = JSON.stringify([documentId, user.userId]);
|
|
120
|
+
let unsubscribe;
|
|
121
|
+
let interval;
|
|
122
|
+
let lifetime;
|
|
123
|
+
let torn = false;
|
|
124
|
+
// Single teardown path shared by the lifetime timer (the server
|
|
125
|
+
// closing the stream before the platform's max-duration cap) and
|
|
126
|
+
// `cancel()` (the client disconnecting). `cancel()` does not run
|
|
127
|
+
// when the controller closes itself, so without this the update
|
|
128
|
+
// subscription and the stale-sweep interval would leak on every
|
|
129
|
+
// server-initiated close.
|
|
130
|
+
const teardown = () => {
|
|
131
|
+
if (torn)
|
|
132
|
+
return;
|
|
133
|
+
torn = true;
|
|
134
|
+
if (interval)
|
|
135
|
+
clearInterval(interval);
|
|
136
|
+
if (lifetime)
|
|
137
|
+
clearTimeout(lifetime);
|
|
138
|
+
if (unsubscribe)
|
|
139
|
+
unsubscribe();
|
|
140
|
+
const remaining = (openStreams.get(streamKey) ?? 1) - 1;
|
|
141
|
+
if (remaining > 0)
|
|
142
|
+
openStreams.set(streamKey, remaining);
|
|
143
|
+
else
|
|
144
|
+
openStreams.delete(streamKey);
|
|
145
|
+
const remainingForDocument = (openStreamsByDocument.get(documentId) ?? 1) - 1;
|
|
146
|
+
if (remainingForDocument > 0)
|
|
147
|
+
openStreamsByDocument.set(documentId, remainingForDocument);
|
|
148
|
+
else
|
|
149
|
+
openStreamsByDocument.delete(documentId);
|
|
150
|
+
};
|
|
151
|
+
// Called after teardown, once the caller has decided whether the
|
|
152
|
+
// user leaves. If this was the document's last stream and users are
|
|
153
|
+
// still on record, nothing else will sweep them.
|
|
154
|
+
const sweepIfOrphaned = () => {
|
|
155
|
+
if (!openStreamsByDocument.has(documentId))
|
|
156
|
+
scheduleOrphanSweep(documentId);
|
|
157
|
+
};
|
|
68
158
|
const stream = new ReadableStream({
|
|
69
159
|
start(controller) {
|
|
70
|
-
|
|
160
|
+
openStreams.set(streamKey, (openStreams.get(streamKey) ?? 0) + 1);
|
|
161
|
+
openStreamsByDocument.set(documentId, (openStreamsByDocument.get(documentId) ?? 0) + 1);
|
|
162
|
+
void provider.join(documentId, { userId: user.userId, name: user.name, documentId });
|
|
71
163
|
const send = (users) => {
|
|
164
|
+
if (torn)
|
|
165
|
+
return;
|
|
72
166
|
try {
|
|
73
|
-
const data =
|
|
74
|
-
|
|
167
|
+
const data = users.map((u) => ({
|
|
168
|
+
userId: u.userId,
|
|
169
|
+
name: u.name,
|
|
170
|
+
connectedAt: u.connectedAt,
|
|
171
|
+
}));
|
|
172
|
+
controller.enqueue(encoder.encode(encodeSseEvent(data, 'presence')));
|
|
75
173
|
}
|
|
76
174
|
catch {
|
|
77
175
|
/* closed stream */
|
|
78
176
|
}
|
|
79
177
|
};
|
|
80
|
-
provider.getPresent(documentId).then(send);
|
|
178
|
+
void provider.getPresent(documentId).then(send);
|
|
81
179
|
unsubscribe = provider.onUpdate(documentId, send);
|
|
82
180
|
interval = setInterval(() => expireStale(documentId), 30_000);
|
|
181
|
+
lifetime = setTimeout(() => {
|
|
182
|
+
// The user stays in the presence list: their browser's
|
|
183
|
+
// `EventSource` reconnects within a few seconds and rejoins.
|
|
184
|
+
// Calling `leave` here would make them blink out of every
|
|
185
|
+
// collaborator's indicator on each reconnect. If they never
|
|
186
|
+
// come back, the stale sweep removes them: another open
|
|
187
|
+
// stream's interval, or the orphan sweep scheduled below when
|
|
188
|
+
// this was the document's last stream.
|
|
189
|
+
teardown();
|
|
190
|
+
sweepIfOrphaned();
|
|
191
|
+
try {
|
|
192
|
+
controller.close();
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
/* already closed */
|
|
196
|
+
}
|
|
197
|
+
}, maxLifetimeMs);
|
|
83
198
|
},
|
|
84
199
|
cancel() {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
200
|
+
// Client disconnect: the user closed the tab or navigated away.
|
|
201
|
+
teardown();
|
|
202
|
+
// `leave` removes the record synchronously, so the check below
|
|
203
|
+
// sees the document without this user.
|
|
204
|
+
if (!openStreams.has(streamKey))
|
|
205
|
+
void provider.leave(documentId, user.userId);
|
|
206
|
+
sweepIfOrphaned();
|
|
90
207
|
},
|
|
91
208
|
});
|
|
92
209
|
return new Response(stream, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/presence/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/presence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAoB5E,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAE/B,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,UAAU,wBAAw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