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/centrifuge.cjs
CHANGED
|
@@ -801,7 +801,6 @@ var WorkerClusterRuntime = class {
|
|
|
801
801
|
this.routeOwnerCache.delete(oldest);
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
wildcardPublishCache = /* @__PURE__ */ new Map();
|
|
805
804
|
// Reverse mapping: opaque topicKey → plaintext topic. A bounded cache with
|
|
806
805
|
// FIFO eviction — NOT authoritative. It can hold a topicKey that is also in
|
|
807
806
|
// assignedTopics (the owned guard prevents evicting those), because it is
|
|
@@ -878,7 +877,6 @@ var WorkerClusterRuntime = class {
|
|
|
878
877
|
this.subscribedTopics.clear();
|
|
879
878
|
this.assignedTopics.clear();
|
|
880
879
|
this.routeOwnerCache.clear();
|
|
881
|
-
this.wildcardPublishCache.clear();
|
|
882
880
|
this.knownTopics.clear();
|
|
883
881
|
this.suspended = false;
|
|
884
882
|
}
|
|
@@ -946,7 +944,6 @@ var WorkerClusterRuntime = class {
|
|
|
946
944
|
this.handoffAssignedTopics();
|
|
947
945
|
this.assignedTopics.clear();
|
|
948
946
|
this.routeOwnerCache.clear();
|
|
949
|
-
this.wildcardPublishCache.clear();
|
|
950
947
|
this.removeStorage(this.workerStorageKey(this.workerId));
|
|
951
948
|
this.flushStorage();
|
|
952
949
|
this.notifyRegistry();
|
|
@@ -1053,16 +1050,6 @@ var WorkerClusterRuntime = class {
|
|
|
1053
1050
|
if (this.assignedTopics.has(topicKey)) {
|
|
1054
1051
|
return this.sendControl(this.workerId, CONTROL_ACTION.PUBLISH, topic, topicKey, data, metadata);
|
|
1055
1052
|
}
|
|
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
|
-
return this.sendControl(this.workerId, CONTROL_ACTION.PUBLISH, topic, topicKey, data, metadata);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
this.wildcardPublishCache.set(topic, null);
|
|
1065
|
-
}
|
|
1066
1053
|
return this.sendControl(this.resolvePublishTarget(topic, topicKey), CONTROL_ACTION.PUBLISH, topic, topicKey, data, metadata);
|
|
1067
1054
|
}
|
|
1068
1055
|
/**
|
|
@@ -1087,17 +1074,6 @@ var WorkerClusterRuntime = class {
|
|
|
1087
1074
|
this.dispatchLocalPublishBatch(topic, topicKey, items);
|
|
1088
1075
|
return true;
|
|
1089
1076
|
}
|
|
1090
|
-
const cachedPattern = this.wildcardPublishCache.get(topic);
|
|
1091
|
-
if (cachedPattern === void 0) {
|
|
1092
|
-
for (const pattern of this.assignedTopics.values()) {
|
|
1093
|
-
if (pattern !== topic && topicMatchesPattern(pattern, topic)) {
|
|
1094
|
-
this.wildcardPublishCache.set(topic, pattern);
|
|
1095
|
-
this.dispatchLocalPublishBatch(topic, topicKey, items);
|
|
1096
|
-
return true;
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
this.wildcardPublishCache.set(topic, null);
|
|
1100
|
-
}
|
|
1101
1077
|
const target = this.resolvePublishTarget(topic, topicKey);
|
|
1102
1078
|
if (target === this.workerId) {
|
|
1103
1079
|
this.dispatchLocalPublishBatch(topic, topicKey, items);
|
|
@@ -2628,7 +2604,7 @@ var SDK_VERSION = (
|
|
|
2628
2604
|
// declaration's type is `string | undefined` and the export's is `string`
|
|
2629
2605
|
// (dropping the conditional is TS2322, measured). Recorded here so the leg reads
|
|
2630
2606
|
// as a shape the harness cannot reach rather than as a case nobody exercised.
|
|
2631
|
-
true ? "0.21.
|
|
2607
|
+
true ? "0.21.32" : ""
|
|
2632
2608
|
);
|
|
2633
2609
|
|
|
2634
2610
|
// src/core/data-bus.ts
|