cross-tab-worker-databus 0.21.30 → 0.21.32
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 +51 -0
- package/dist/centrifuge.js +1 -1
- package/dist/{chunk-ESJJV7F4.js → chunk-PNEOQX4O.js} +2 -26
- package/dist/chunk-PNEOQX4O.js.map +7 -0
- package/dist/cjs/centrifuge.cjs +1 -25
- package/dist/cjs/centrifuge.cjs.map +2 -2
- package/dist/cjs/index.cjs +1 -25
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/core/cluster.d.ts +0 -1
- package/dist/core/cluster.d.ts.map +1 -1
- package/dist/core/trace.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/docs/architecture.md +2 -0
- package/docs/release-checklist.md +4 -2
- package/docs/roadmap.md +20 -3
- package/docs/zh/architecture.md +2 -0
- package/docs/zh/release-checklist.md +4 -2
- package/docs/zh/roadmap.md +20 -3
- package/package.json +1 -1
- package/dist/chunk-ESJJV7F4.js.map +0 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -767,7 +767,6 @@ var WorkerClusterRuntime = class {
|
|
|
767
767
|
this.routeOwnerCache.delete(oldest);
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
wildcardPublishCache = /* @__PURE__ */ new Map();
|
|
771
770
|
// Reverse mapping: opaque topicKey → plaintext topic. A bounded cache with
|
|
772
771
|
// FIFO eviction — NOT authoritative. It can hold a topicKey that is also in
|
|
773
772
|
// assignedTopics (the owned guard prevents evicting those), because it is
|
|
@@ -844,7 +843,6 @@ var WorkerClusterRuntime = class {
|
|
|
844
843
|
this.subscribedTopics.clear();
|
|
845
844
|
this.assignedTopics.clear();
|
|
846
845
|
this.routeOwnerCache.clear();
|
|
847
|
-
this.wildcardPublishCache.clear();
|
|
848
846
|
this.knownTopics.clear();
|
|
849
847
|
this.suspended = false;
|
|
850
848
|
}
|
|
@@ -912,7 +910,6 @@ var WorkerClusterRuntime = class {
|
|
|
912
910
|
this.handoffAssignedTopics();
|
|
913
911
|
this.assignedTopics.clear();
|
|
914
912
|
this.routeOwnerCache.clear();
|
|
915
|
-
this.wildcardPublishCache.clear();
|
|
916
913
|
this.removeStorage(this.workerStorageKey(this.workerId));
|
|
917
914
|
this.flushStorage();
|
|
918
915
|
this.notifyRegistry();
|
|
@@ -1019,16 +1016,6 @@ var WorkerClusterRuntime = class {
|
|
|
1019
1016
|
if (this.assignedTopics.has(topicKey)) {
|
|
1020
1017
|
return this.sendControl(this.workerId, CONTROL_ACTION.PUBLISH, topic, topicKey, data, metadata);
|
|
1021
1018
|
}
|
|
1022
|
-
const cachedPattern = this.wildcardPublishCache.get(topic);
|
|
1023
|
-
if (cachedPattern === void 0) {
|
|
1024
|
-
for (const pattern of this.assignedTopics.values()) {
|
|
1025
|
-
if (pattern !== topic && topicMatchesPattern(pattern, topic)) {
|
|
1026
|
-
this.wildcardPublishCache.set(topic, pattern);
|
|
1027
|
-
return this.sendControl(this.workerId, CONTROL_ACTION.PUBLISH, topic, topicKey, data, metadata);
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
this.wildcardPublishCache.set(topic, null);
|
|
1031
|
-
}
|
|
1032
1019
|
return this.sendControl(this.resolvePublishTarget(topic, topicKey), CONTROL_ACTION.PUBLISH, topic, topicKey, data, metadata);
|
|
1033
1020
|
}
|
|
1034
1021
|
/**
|
|
@@ -1053,17 +1040,6 @@ var WorkerClusterRuntime = class {
|
|
|
1053
1040
|
this.dispatchLocalPublishBatch(topic, topicKey, items);
|
|
1054
1041
|
return true;
|
|
1055
1042
|
}
|
|
1056
|
-
const cachedPattern = this.wildcardPublishCache.get(topic);
|
|
1057
|
-
if (cachedPattern === void 0) {
|
|
1058
|
-
for (const pattern of this.assignedTopics.values()) {
|
|
1059
|
-
if (pattern !== topic && topicMatchesPattern(pattern, topic)) {
|
|
1060
|
-
this.wildcardPublishCache.set(topic, pattern);
|
|
1061
|
-
this.dispatchLocalPublishBatch(topic, topicKey, items);
|
|
1062
|
-
return true;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
this.wildcardPublishCache.set(topic, null);
|
|
1066
|
-
}
|
|
1067
1043
|
const target = this.resolvePublishTarget(topic, topicKey);
|
|
1068
1044
|
if (target === this.workerId) {
|
|
1069
1045
|
this.dispatchLocalPublishBatch(topic, topicKey, items);
|
|
@@ -2594,7 +2570,7 @@ var SDK_VERSION = (
|
|
|
2594
2570
|
// declaration's type is `string | undefined` and the export's is `string`
|
|
2595
2571
|
// (dropping the conditional is TS2322, measured). Recorded here so the leg reads
|
|
2596
2572
|
// as a shape the harness cannot reach rather than as a case nobody exercised.
|
|
2597
|
-
true ? "0.21.
|
|
2573
|
+
true ? "0.21.32" : ""
|
|
2598
2574
|
);
|
|
2599
2575
|
|
|
2600
2576
|
// src/core/data-bus.ts
|