@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/index.mjs
CHANGED
|
@@ -1255,7 +1255,7 @@ var ShapeStream = class {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
subscribe(callback, onError = () => {
|
|
1257
1257
|
}) {
|
|
1258
|
-
const subscriptionId =
|
|
1258
|
+
const subscriptionId = {};
|
|
1259
1259
|
__privateGet(this, _subscribers).set(subscriptionId, [callback, onError]);
|
|
1260
1260
|
if (!__privateGet(this, _started)) __privateMethod(this, _ShapeStream_instances, start_fn).call(this);
|
|
1261
1261
|
return () => {
|
|
@@ -1739,6 +1739,7 @@ onMessages_fn = async function(batch, isSseMessage = false) {
|
|
|
1739
1739
|
if (__privateGet(this, _ShapeStream_instances, replayMode_get) && !isSseMessage) {
|
|
1740
1740
|
const currentCursor = __privateGet(this, _liveCacheBuster);
|
|
1741
1741
|
if (currentCursor === __privateGet(this, _lastSeenCursor)) {
|
|
1742
|
+
__privateSet(this, _lastSeenCursor, void 0);
|
|
1742
1743
|
return;
|
|
1743
1744
|
}
|
|
1744
1745
|
}
|
|
@@ -2097,7 +2098,7 @@ var Shape = class {
|
|
|
2097
2098
|
await this.stream.requestSnapshot(params);
|
|
2098
2099
|
}
|
|
2099
2100
|
subscribe(callback) {
|
|
2100
|
-
const subscriptionId =
|
|
2101
|
+
const subscriptionId = {};
|
|
2101
2102
|
__privateGet(this, _subscribers2).set(subscriptionId, callback);
|
|
2102
2103
|
return () => {
|
|
2103
2104
|
__privateGet(this, _subscribers2).delete(subscriptionId);
|