@electric-sql/client 1.5.8 → 1.5.9
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/dist/cjs/index.cjs +4 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.browser.mjs +4 -4
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.legacy-esm.js +4 -1
- package/dist/index.legacy-esm.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +4 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -2056,7 +2056,6 @@ var ShapeStream = class {
|
|
|
2056
2056
|
));
|
|
2057
2057
|
__privateSet(this, _fetchClient2, createFetchWithConsumedMessages(__privateGet(this, _sseFetchClient)));
|
|
2058
2058
|
__privateMethod(this, _ShapeStream_instances, subscribeToVisibilityChanges_fn).call(this);
|
|
2059
|
-
__privateMethod(this, _ShapeStream_instances, subscribeToWakeDetection_fn).call(this);
|
|
2060
2059
|
}
|
|
2061
2060
|
get shapeHandle() {
|
|
2062
2061
|
return __privateGet(this, _syncState).handle;
|
|
@@ -2306,6 +2305,7 @@ _fastLoopMaxCount = new WeakMap();
|
|
|
2306
2305
|
start_fn = async function() {
|
|
2307
2306
|
var _a, _b;
|
|
2308
2307
|
__privateSet(this, _started, true);
|
|
2308
|
+
__privateMethod(this, _ShapeStream_instances, subscribeToWakeDetection_fn).call(this);
|
|
2309
2309
|
try {
|
|
2310
2310
|
await __privateMethod(this, _ShapeStream_instances, requestShape_fn).call(this);
|
|
2311
2311
|
} catch (err) {
|
|
@@ -2859,6 +2859,7 @@ subscribeToVisibilityChanges_fn = function() {
|
|
|
2859
2859
|
document.addEventListener(`visibilitychange`, visibilityHandler);
|
|
2860
2860
|
__privateSet(this, _unsubscribeFromVisibilityChanges, () => {
|
|
2861
2861
|
document.removeEventListener(`visibilitychange`, visibilityHandler);
|
|
2862
|
+
__privateSet(this, _unsubscribeFromVisibilityChanges, void 0);
|
|
2862
2863
|
});
|
|
2863
2864
|
}
|
|
2864
2865
|
};
|
|
@@ -2876,6 +2877,7 @@ subscribeToVisibilityChanges_fn = function() {
|
|
|
2876
2877
|
*/
|
|
2877
2878
|
subscribeToWakeDetection_fn = function() {
|
|
2878
2879
|
if (__privateMethod(this, _ShapeStream_instances, hasBrowserVisibilityAPI_fn).call(this)) return;
|
|
2880
|
+
if (__privateGet(this, _unsubscribeFromWakeDetection)) return;
|
|
2879
2881
|
const INTERVAL_MS = 2e3;
|
|
2880
2882
|
const WAKE_THRESHOLD_MS = 4e3;
|
|
2881
2883
|
let lastTickTime = Date.now();
|
|
@@ -2898,6 +2900,7 @@ subscribeToWakeDetection_fn = function() {
|
|
|
2898
2900
|
}
|
|
2899
2901
|
__privateSet(this, _unsubscribeFromWakeDetection, () => {
|
|
2900
2902
|
clearInterval(timer);
|
|
2903
|
+
__privateSet(this, _unsubscribeFromWakeDetection, void 0);
|
|
2901
2904
|
});
|
|
2902
2905
|
};
|
|
2903
2906
|
/**
|