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/centrifuge.cjs
CHANGED
|
@@ -871,7 +871,7 @@ var WorkerClusterRuntime = class {
|
|
|
871
871
|
*/
|
|
872
872
|
stop() {
|
|
873
873
|
this.lifecycleGeneration += 1;
|
|
874
|
-
if (!this.started && !this.suspended) return;
|
|
874
|
+
if (!this.started && !this.suspended && !this.lifecycleListening) return;
|
|
875
875
|
this.pause();
|
|
876
876
|
this.flushStorage();
|
|
877
877
|
this.removeLifecycleListeners();
|
|
@@ -899,6 +899,12 @@ var WorkerClusterRuntime = class {
|
|
|
899
899
|
this.channel = null;
|
|
900
900
|
}
|
|
901
901
|
if (!this.channel) this.storage = null;
|
|
902
|
+
if (!this.started) {
|
|
903
|
+
const channel = this.channel;
|
|
904
|
+
this.channel = null;
|
|
905
|
+
channel?.close();
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
902
908
|
this.channel?.addEventListener("message", this.handleMessage);
|
|
903
909
|
const now = this.environment.now();
|
|
904
910
|
this.currentRecord = {
|
|
@@ -914,6 +920,7 @@ var WorkerClusterRuntime = class {
|
|
|
914
920
|
if (!this.storage) this.sendControl(this.workerId, CONTROL_ACTION.SUBSCRIBE, topic, topicKey);
|
|
915
921
|
else this.writeSubscriber(topicKey);
|
|
916
922
|
}
|
|
923
|
+
if (!this.started) return;
|
|
917
924
|
this.reconcile();
|
|
918
925
|
this.heartbeatHandle = this.environment.setInterval(() => {
|
|
919
926
|
this.writeRecord(false);
|
|
@@ -2613,7 +2620,7 @@ var SDK_VERSION = (
|
|
|
2613
2620
|
// declaration's type is `string | undefined` and the export's is `string`
|
|
2614
2621
|
// (dropping the conditional is TS2322, measured). Recorded here so the leg reads
|
|
2615
2622
|
// as a shape the harness cannot reach rather than as a case nobody exercised.
|
|
2616
|
-
true ? "0.21.
|
|
2623
|
+
true ? "0.21.24" : ""
|
|
2617
2624
|
);
|
|
2618
2625
|
|
|
2619
2626
|
// src/core/data-bus.ts
|