cry-synced-db-client 0.1.96 → 0.1.98
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/index.js +7 -0
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -2637,6 +2637,9 @@ var _SyncEngine = class _SyncEngine {
|
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
|
+
if (updates.length === 0 && deletes.length === 0) {
|
|
2641
|
+
return { sentCount: 0 };
|
|
2642
|
+
}
|
|
2640
2643
|
const collectionBatches = [[{
|
|
2641
2644
|
collection,
|
|
2642
2645
|
batch: {
|
|
@@ -3679,6 +3682,10 @@ var SyncedDb = class _SyncedDb {
|
|
|
3679
3682
|
if ((_a = this.collections.get(collection)) == null ? void 0 : _a.writeOnly) {
|
|
3680
3683
|
return this.writeOnlyFindById(collection, id);
|
|
3681
3684
|
}
|
|
3685
|
+
if (!(opts == null ? void 0 : opts.returnDeleted) && !(opts == null ? void 0 : opts.returnArchived)) {
|
|
3686
|
+
const memItem = this.inMemDb.getById(collection, id);
|
|
3687
|
+
if (memItem) return memItem;
|
|
3688
|
+
}
|
|
3682
3689
|
if (((opts == null ? void 0 : opts.returnDeleted) || (opts == null ? void 0 : opts.returnArchived)) && this.isOnline()) {
|
|
3683
3690
|
try {
|
|
3684
3691
|
const serverItem = await this.connectionManager.withRestTimeout(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cry-synced-db-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.98",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -35,9 +35,8 @@
|
|
|
35
35
|
"vitest": "^4.1.2"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"cry-db": "^2.4.
|
|
38
|
+
"cry-db": "^2.4.24",
|
|
39
39
|
"cry-helpers": "^2.1.193",
|
|
40
|
-
"cry-synced-db-client": "0.1.84",
|
|
41
40
|
"msgpackr": "^1.11.9",
|
|
42
41
|
"notepack": "^0.0.2",
|
|
43
42
|
"notepack.io": "^3.0.1",
|