cry-synced-db-client 0.1.194 → 0.1.195
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 +28 -0
- package/dist/index.js +1 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Versions
|
|
2
2
|
|
|
3
|
+
## 0.1.195 (2026-06-09)
|
|
4
|
+
|
|
5
|
+
### `ensureItemsAreLoaded` always fetches all IDs from server
|
|
6
|
+
|
|
7
|
+
`findById` / `findByIds` z `referToServer: true` (privzeto) sedaj **vedno
|
|
8
|
+
awaitata** server klic za vse zahtevane ID-je. Prej je `ensureItemsAreLoaded`
|
|
9
|
+
preverila Dexie in klicala server samo za ID-je, ki v Dexie niso obstajali.
|
|
10
|
+
To je pomenilo, da je ob in-mem cache missu (item ni v in-mem, ampak je v
|
|
11
|
+
Dexie) `referToServer` vrnil stale podatke brez server klica.
|
|
12
|
+
|
|
13
|
+
Popravek: `ensureItemsAreLoaded` ne preverja več Dexie pred server klicem
|
|
14
|
+
— vedno fetča vse ID-je iz `restInterface.findByIds`, jih shrani v Dexie +
|
|
15
|
+
in-mem. `referToServer` zdaj resnično awaita sveže podatke s serverja.
|
|
16
|
+
|
|
17
|
+
Internal: `ensureItemsAreLoaded` — odstranjena Dexie pre-check (`getByIds`
|
|
18
|
+
→ `missingIds`).
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## 0.1.194 (2026-06-09)
|
|
22
|
+
|
|
23
|
+
### Preload status `ready` fix
|
|
24
|
+
|
|
25
|
+
`ready` flag na `CollectionPreloadStatus` se sedaj nastavi na `true` že ko
|
|
26
|
+
je `state === "hydrated"`, ne glede na `itemCount` ali `everDownloaded`.
|
|
27
|
+
Prazen (še nikoli sinhroniziran) direktorij je še vedno ready — svežina
|
|
28
|
+
podatkov je globalni koncept (`lastSuccessfulServerSync`).
|
|
29
|
+
|
|
30
|
+
|
|
3
31
|
## 0.1.193 (2026-05-25)
|
|
4
32
|
|
|
5
33
|
Adds per-collection preload status reporting (non-breaking, additive).
|
package/dist/index.js
CHANGED
|
@@ -5745,17 +5745,9 @@ var _SyncedDb = class _SyncedDb {
|
|
|
5745
5745
|
this.assertCollection(collection);
|
|
5746
5746
|
if ((_a = this.collections.get(collection)) == null ? void 0 : _a.writeOnly) return;
|
|
5747
5747
|
if (ids.length === 0) return;
|
|
5748
|
-
const localItems = await this.dexieDb.getByIds(collection, ids);
|
|
5749
|
-
const missingIds = [];
|
|
5750
|
-
for (let i = 0; i < ids.length; i++) {
|
|
5751
|
-
if (!localItems[i]) {
|
|
5752
|
-
missingIds.push(ids[i]);
|
|
5753
|
-
}
|
|
5754
|
-
}
|
|
5755
|
-
if (missingIds.length === 0) return;
|
|
5756
5748
|
if (!this.isOnline()) return;
|
|
5757
5749
|
const serverItems = await this.connectionManager.withRestTimeout(
|
|
5758
|
-
this.restInterface.findByIds(collection,
|
|
5750
|
+
this.restInterface.findByIds(collection, ids),
|
|
5759
5751
|
"ensureItemsAreLoaded"
|
|
5760
5752
|
);
|
|
5761
5753
|
if (!serverItems || serverItems.length === 0) return;
|