@prenta/core 8.21.5 → 8.21.7
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 +12 -0
- package/dist/presence/index.d.ts.map +1 -1
- package/dist/presence/index.js +66 -3
- package/dist/presence/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @actuate-media/cms-core
|
|
2
2
|
|
|
3
|
+
## 8.21.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b3207f8: Remove a document's presence subscriber set when its last subscriber leaves. Each document that had been opened in the editor left an empty set in memory for the life of the server process. On a long-running server this grew with the number of documents edited; it did not affect what editors saw.
|
|
8
|
+
|
|
9
|
+
## 8.21.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 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.
|
|
14
|
+
|
|
3
15
|
## 8.21.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
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,aA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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,CAqNA"}
|
package/dist/presence/index.js
CHANGED
|
@@ -14,6 +14,12 @@ export function createSSEPresenceAdapter(options = {}) {
|
|
|
14
14
|
// two tabs, or a reconnect that lands before the server notices the
|
|
15
15
|
// old connection dropped. They only leave when the last one goes.
|
|
16
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();
|
|
17
23
|
function broadcast(documentId) {
|
|
18
24
|
const users = Array.from(connections.get(documentId)?.values() ?? []);
|
|
19
25
|
const subs = subscribers.get(documentId);
|
|
@@ -40,9 +46,36 @@ export function createSSEPresenceAdapter(options = {}) {
|
|
|
40
46
|
changed = true;
|
|
41
47
|
}
|
|
42
48
|
}
|
|
49
|
+
if (docConns.size === 0)
|
|
50
|
+
connections.delete(documentId);
|
|
43
51
|
if (changed)
|
|
44
52
|
broadcast(documentId);
|
|
45
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
|
+
}
|
|
46
79
|
const provider = {
|
|
47
80
|
async join(documentId, user) {
|
|
48
81
|
if (!connections.has(documentId))
|
|
@@ -56,7 +89,10 @@ export function createSSEPresenceAdapter(options = {}) {
|
|
|
56
89
|
broadcast(documentId);
|
|
57
90
|
},
|
|
58
91
|
async leave(documentId, userId) {
|
|
59
|
-
connections.get(documentId)
|
|
92
|
+
const docConns = connections.get(documentId);
|
|
93
|
+
docConns?.delete(userId);
|
|
94
|
+
if (docConns?.size === 0)
|
|
95
|
+
connections.delete(documentId);
|
|
60
96
|
broadcast(documentId);
|
|
61
97
|
},
|
|
62
98
|
async getPresent(documentId) {
|
|
@@ -74,7 +110,15 @@ export function createSSEPresenceAdapter(options = {}) {
|
|
|
74
110
|
subscribers.set(documentId, new Set());
|
|
75
111
|
subscribers.get(documentId).add(callback);
|
|
76
112
|
return () => {
|
|
77
|
-
subscribers.get(documentId)
|
|
113
|
+
const subs = subscribers.get(documentId);
|
|
114
|
+
if (!subs)
|
|
115
|
+
return;
|
|
116
|
+
subs.delete(callback);
|
|
117
|
+
// Drop the document's entry with its last subscriber. Otherwise
|
|
118
|
+
// every document ever opened leaves an empty set behind for the
|
|
119
|
+
// life of the process.
|
|
120
|
+
if (subs.size === 0)
|
|
121
|
+
subscribers.delete(documentId);
|
|
78
122
|
};
|
|
79
123
|
},
|
|
80
124
|
};
|
|
@@ -106,10 +150,23 @@ export function createSSEPresenceAdapter(options = {}) {
|
|
|
106
150
|
openStreams.set(streamKey, remaining);
|
|
107
151
|
else
|
|
108
152
|
openStreams.delete(streamKey);
|
|
153
|
+
const remainingForDocument = (openStreamsByDocument.get(documentId) ?? 1) - 1;
|
|
154
|
+
if (remainingForDocument > 0)
|
|
155
|
+
openStreamsByDocument.set(documentId, remainingForDocument);
|
|
156
|
+
else
|
|
157
|
+
openStreamsByDocument.delete(documentId);
|
|
158
|
+
};
|
|
159
|
+
// Called after teardown, once the caller has decided whether the
|
|
160
|
+
// user leaves. If this was the document's last stream and users are
|
|
161
|
+
// still on record, nothing else will sweep them.
|
|
162
|
+
const sweepIfOrphaned = () => {
|
|
163
|
+
if (!openStreamsByDocument.has(documentId))
|
|
164
|
+
scheduleOrphanSweep(documentId);
|
|
109
165
|
};
|
|
110
166
|
const stream = new ReadableStream({
|
|
111
167
|
start(controller) {
|
|
112
168
|
openStreams.set(streamKey, (openStreams.get(streamKey) ?? 0) + 1);
|
|
169
|
+
openStreamsByDocument.set(documentId, (openStreamsByDocument.get(documentId) ?? 0) + 1);
|
|
113
170
|
void provider.join(documentId, { userId: user.userId, name: user.name, documentId });
|
|
114
171
|
const send = (users) => {
|
|
115
172
|
if (torn)
|
|
@@ -134,8 +191,11 @@ export function createSSEPresenceAdapter(options = {}) {
|
|
|
134
191
|
// `EventSource` reconnects within a few seconds and rejoins.
|
|
135
192
|
// Calling `leave` here would make them blink out of every
|
|
136
193
|
// collaborator's indicator on each reconnect. If they never
|
|
137
|
-
// come back, the stale sweep removes them
|
|
194
|
+
// come back, the stale sweep removes them: another open
|
|
195
|
+
// stream's interval, or the orphan sweep scheduled below when
|
|
196
|
+
// this was the document's last stream.
|
|
138
197
|
teardown();
|
|
198
|
+
sweepIfOrphaned();
|
|
139
199
|
try {
|
|
140
200
|
controller.close();
|
|
141
201
|
}
|
|
@@ -147,8 +207,11 @@ export function createSSEPresenceAdapter(options = {}) {
|
|
|
147
207
|
cancel() {
|
|
148
208
|
// Client disconnect: the user closed the tab or navigated away.
|
|
149
209
|
teardown();
|
|
210
|
+
// `leave` removes the record synchronously, so the check below
|
|
211
|
+
// sees the document without this user.
|
|
150
212
|
if (!openStreams.has(streamKey))
|
|
151
213
|
void provider.leave(documentId, user.userId);
|
|
214
|
+
sweepIfOrphaned();
|
|
152
215
|
},
|
|
153
216
|
});
|
|
154
217
|
return new Response(stream, {
|
|
@@ -1 +1 @@
|
|
|
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,wBAAwB,CAAC,UAAsC,EAAE;IAQ/E,MAAM,WAAW,GAAG,IAAI,GAAG,EAAqC,CAAA;IAChE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAgD,CAAA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