@electric-sql/client 1.4.1 → 1.4.2
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 +3 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.legacy-esm.js +3 -2
- package/dist/index.legacy-esm.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +6 -4
- package/src/shape.ts +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -1290,7 +1290,7 @@ var ShapeStream = class {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
subscribe(callback, onError = () => {
|
|
1292
1292
|
}) {
|
|
1293
|
-
const subscriptionId =
|
|
1293
|
+
const subscriptionId = {};
|
|
1294
1294
|
__privateGet(this, _subscribers).set(subscriptionId, [callback, onError]);
|
|
1295
1295
|
if (!__privateGet(this, _started)) __privateMethod(this, _ShapeStream_instances, start_fn).call(this);
|
|
1296
1296
|
return () => {
|
|
@@ -1774,6 +1774,7 @@ onMessages_fn = async function(batch, isSseMessage = false) {
|
|
|
1774
1774
|
if (__privateGet(this, _ShapeStream_instances, replayMode_get) && !isSseMessage) {
|
|
1775
1775
|
const currentCursor = __privateGet(this, _liveCacheBuster);
|
|
1776
1776
|
if (currentCursor === __privateGet(this, _lastSeenCursor)) {
|
|
1777
|
+
__privateSet(this, _lastSeenCursor, void 0);
|
|
1777
1778
|
return;
|
|
1778
1779
|
}
|
|
1779
1780
|
}
|
|
@@ -2132,7 +2133,7 @@ var Shape = class {
|
|
|
2132
2133
|
await this.stream.requestSnapshot(params);
|
|
2133
2134
|
}
|
|
2134
2135
|
subscribe(callback) {
|
|
2135
|
-
const subscriptionId =
|
|
2136
|
+
const subscriptionId = {};
|
|
2136
2137
|
__privateGet(this, _subscribers2).set(subscriptionId, callback);
|
|
2137
2138
|
return () => {
|
|
2138
2139
|
__privateGet(this, _subscribers2).delete(subscriptionId);
|