@jcbuisson/express-x-client 3.1.9 → 3.1.10

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/client.mts +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcbuisson/express-x-client",
3
- "version": "3.1.9",
3
+ "version": "3.1.10",
4
4
  "type": "module",
5
5
  "description": "Client library for ExpressX framework",
6
6
  "main": "src/client.mts",
package/src/client.mts CHANGED
@@ -441,10 +441,9 @@ export function offlinePlugin(app) {
441
441
  // 3- update elements of cache with server's newer version
442
442
  for (const [elt, serverMeta] of updateClient) {
443
443
  const value = { ...elt }
444
- delete value.uid
445
444
  delete value.__deleted__
446
- await idbValues.update(elt.uid, value)
447
- await idbMetadata.update(elt.uid, { updated_at: serverMeta.updated_at })
445
+ await idbValues.put(value)
446
+ await idbMetadata.put({ uid: elt.uid, ...serverMeta })
448
447
  }
449
448
 
450
449
  // 4- create elements of `addDatabase` with full data from cache