cross-tab-worker-databus 0.21.22 → 0.21.24
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 +49 -0
- package/dist/centrifuge.js +1 -1
- package/dist/{chunk-ISYP7LVP.js → chunk-IFSC44DS.js} +10 -3
- package/dist/chunk-IFSC44DS.js.map +7 -0
- package/dist/cjs/centrifuge.cjs +9 -2
- package/dist/cjs/centrifuge.cjs.map +2 -2
- package/dist/cjs/index.cjs +9 -2
- 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/dist/utils/validation.d.ts.map +1 -1
- package/docs/api.md +2 -0
- package/docs/roadmap.md +17 -1
- package/docs/zh/api.md +2 -0
- package/docs/zh/roadmap.md +17 -1
- package/package.json +1 -1
- package/dist/chunk-ISYP7LVP.js.map +0 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -837,7 +837,7 @@ var WorkerClusterRuntime = class {
|
|
|
837
837
|
*/
|
|
838
838
|
stop() {
|
|
839
839
|
this.lifecycleGeneration += 1;
|
|
840
|
-
if (!this.started && !this.suspended) return;
|
|
840
|
+
if (!this.started && !this.suspended && !this.lifecycleListening) return;
|
|
841
841
|
this.pause();
|
|
842
842
|
this.flushStorage();
|
|
843
843
|
this.removeLifecycleListeners();
|
|
@@ -865,6 +865,12 @@ var WorkerClusterRuntime = class {
|
|
|
865
865
|
this.channel = null;
|
|
866
866
|
}
|
|
867
867
|
if (!this.channel) this.storage = null;
|
|
868
|
+
if (!this.started) {
|
|
869
|
+
const channel = this.channel;
|
|
870
|
+
this.channel = null;
|
|
871
|
+
channel?.close();
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
868
874
|
this.channel?.addEventListener("message", this.handleMessage);
|
|
869
875
|
const now = this.environment.now();
|
|
870
876
|
this.currentRecord = {
|
|
@@ -880,6 +886,7 @@ var WorkerClusterRuntime = class {
|
|
|
880
886
|
if (!this.storage) this.sendControl(this.workerId, CONTROL_ACTION.SUBSCRIBE, topic, topicKey);
|
|
881
887
|
else this.writeSubscriber(topicKey);
|
|
882
888
|
}
|
|
889
|
+
if (!this.started) return;
|
|
883
890
|
this.reconcile();
|
|
884
891
|
this.heartbeatHandle = this.environment.setInterval(() => {
|
|
885
892
|
this.writeRecord(false);
|
|
@@ -2579,7 +2586,7 @@ var SDK_VERSION = (
|
|
|
2579
2586
|
// declaration's type is `string | undefined` and the export's is `string`
|
|
2580
2587
|
// (dropping the conditional is TS2322, measured). Recorded here so the leg reads
|
|
2581
2588
|
// as a shape the harness cannot reach rather than as a case nobody exercised.
|
|
2582
|
-
true ? "0.21.
|
|
2589
|
+
true ? "0.21.24" : ""
|
|
2583
2590
|
);
|
|
2584
2591
|
|
|
2585
2592
|
// src/core/data-bus.ts
|