cross-tab-worker-databus 0.21.4 → 0.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 +47 -0
- package/dist/centrifuge.js +1 -1
- package/dist/{chunk-WFVM7HPE.js → chunk-LXAHMO7L.js} +6 -4
- package/dist/chunk-LXAHMO7L.js.map +7 -0
- package/dist/cjs/centrifuge.cjs +5 -3
- package/dist/cjs/centrifuge.cjs.map +2 -2
- package/dist/cjs/index.cjs +5 -3
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/core/cluster.d.ts.map +1 -1
- package/dist/core/data-bus.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/docs/benchmarks.md +7 -7
- package/docs/roadmap.md +17 -1
- package/docs/zh/benchmarks.md +7 -7
- package/docs/zh/roadmap.md +17 -1
- package/package.json +1 -1
- package/dist/chunk-WFVM7HPE.js.map +0 -7
package/dist/cjs/centrifuge.cjs
CHANGED
|
@@ -1299,6 +1299,7 @@ var WorkerClusterRuntime = class {
|
|
|
1299
1299
|
/** Handle a point-to-point CONTROL message (SUBSCRIBE / UNSUBSCRIBE / PUBLISH). */
|
|
1300
1300
|
handleControlMessage(message) {
|
|
1301
1301
|
if (message.targetWorkerId !== this.workerId) return;
|
|
1302
|
+
if (message.topicKey !== void 0 && createOpaqueKey(message.topic) !== message.topicKey) return;
|
|
1302
1303
|
this.rememberTopic(message.topic);
|
|
1303
1304
|
switch (message.action) {
|
|
1304
1305
|
case CONTROL_ACTION.SUBSCRIBE: {
|
|
@@ -1315,7 +1316,8 @@ var WorkerClusterRuntime = class {
|
|
|
1315
1316
|
if (this.releaseHandoffOnUnsubscribe(message)) return;
|
|
1316
1317
|
break;
|
|
1317
1318
|
case CONTROL_ACTION.PUBLISH:
|
|
1318
|
-
if (message.items
|
|
1319
|
+
if (message.items !== void 0) {
|
|
1320
|
+
if (!Array.isArray(message.items) || message.items.length === 0) return;
|
|
1319
1321
|
if (this.handlers.onPublishBatch) {
|
|
1320
1322
|
this.handlers.onPublishBatch(message.topic, message.items);
|
|
1321
1323
|
return;
|
|
@@ -1376,6 +1378,7 @@ var WorkerClusterRuntime = class {
|
|
|
1376
1378
|
*/
|
|
1377
1379
|
handleRouteReleasedMessage(message) {
|
|
1378
1380
|
if (message.targetWorkerId !== this.workerId) return;
|
|
1381
|
+
if (createOpaqueKey(message.topic) !== message.topicKey) return;
|
|
1379
1382
|
const route = this.readRoute(message.topicKey);
|
|
1380
1383
|
if (!route || this.isStaleRouteRelease(route, message)) return;
|
|
1381
1384
|
this.assignedTopics.set(message.topicKey, message.topic);
|
|
@@ -2515,7 +2518,7 @@ var DedupManager = class {
|
|
|
2515
2518
|
};
|
|
2516
2519
|
|
|
2517
2520
|
// src/core/version.ts
|
|
2518
|
-
var SDK_VERSION = true ? "0.21.
|
|
2521
|
+
var SDK_VERSION = true ? "0.21.6" : "";
|
|
2519
2522
|
|
|
2520
2523
|
// src/core/data-bus.ts
|
|
2521
2524
|
var DEFAULT_REPLAY_MAX_PER_TOPIC = 100;
|
|
@@ -3575,7 +3578,6 @@ var CrossTabDataBus = class {
|
|
|
3575
3578
|
}
|
|
3576
3579
|
}
|
|
3577
3580
|
);
|
|
3578
|
-
void opening.catch(() => void 0);
|
|
3579
3581
|
return opening;
|
|
3580
3582
|
}
|
|
3581
3583
|
/**
|