@procedures/store 0.48.1 → 0.48.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @procedures/store
2
2
 
3
+ ## 0.48.2
4
+
5
+ ### Patch Changes
6
+
7
+ - bc7359f: `HybridStorage` gets the optional hook `onDropped`. The hook gets each queued write that leaves the queue with no send that the remote took. The causes are a conflict that the policy `remote` decides, a delete of the remote, and a refusal. Before this change, a conflict gave only a count, and a refusal with no `onRefused` gave nothing. The hook gets the id, the value, the reason and the sync, once for each id. `getMetadata()` gives the count as `stats.dropped`. The default policy does not change.
8
+ - Updated dependencies [08beec5]
9
+ - Updated dependencies [48b7127]
10
+ - Updated dependencies [9541575]
11
+ - @procedures/client@0.48.2
12
+ - @procedures/collections@0.48.2
13
+
3
14
  ## 0.48.1
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -255,6 +255,8 @@ await users.setMode("write-through"); // The switch sends the queue, then syncs
255
255
  - Another error, for example `TIMEOUT` or `UNAUTHORIZED`, keeps the write at the head of the queue. The next push sends it again.
256
256
  - After a refusal, the local copy gets the remote values of its ids again. An id that a later queued write changes keeps its local value.
257
257
  - The option `onRefused` gets each refusal: the write, its ids, the error, and `restored`. An error of the hook does not stop the push.
258
+ - The option `onDropped` gets each queued write that leaves the queue with no send that the remote took. The causes are a conflict that the policy `remote` decides, a delete of the remote, and a refusal. It gets one call for each id, with the value, the reason and the sync. `getMetadata()` gives the count as `stats.dropped`.
259
+ - The hook can write the value again. The sync waits for the hook, and an error of the hook does not stop the sync. After a crash, the hook can get a write again.
258
260
  - The option `queueStore` keeps the queue. The storage writes each change to the store before the write ends.
259
261
  - A new storage with the same store loads the queue, shows its writes, and sends them.
260
262
  - `MemoryQueueStore` is the default. `FileQueueStore` keeps the queue in a JSON Lines file, for Node.