@procedures/store 0.17.2 → 0.17.4

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 (39) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +92 -4
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/browser.d.ts +6 -2
  5. package/dist/browser.d.ts.map +1 -1
  6. package/dist/browser.js +5 -2
  7. package/dist/browser.js.map +1 -1
  8. package/dist/indexeddb/document-storage.d.ts +186 -0
  9. package/dist/indexeddb/document-storage.d.ts.map +1 -0
  10. package/dist/indexeddb/document-storage.js +598 -0
  11. package/dist/indexeddb/document-storage.js.map +1 -0
  12. package/dist/indexeddb/idb.d.ts +82 -9
  13. package/dist/indexeddb/idb.d.ts.map +1 -1
  14. package/dist/indexeddb/idb.js +100 -22
  15. package/dist/indexeddb/idb.js.map +1 -1
  16. package/dist/indexeddb.d.ts +8 -3
  17. package/dist/indexeddb.d.ts.map +1 -1
  18. package/dist/indexeddb.js +8 -3
  19. package/dist/indexeddb.js.map +1 -1
  20. package/dist/storage/hybrid.d.ts +9 -0
  21. package/dist/storage/hybrid.d.ts.map +1 -1
  22. package/dist/storage/hybrid.js +14 -0
  23. package/dist/storage/hybrid.js.map +1 -1
  24. package/dist/storage/index.d.ts +2 -0
  25. package/dist/storage/index.d.ts.map +1 -1
  26. package/dist/storage/index.js +2 -0
  27. package/dist/storage/index.js.map +1 -1
  28. package/dist/storage/tab-coordinator.d.ts +284 -0
  29. package/dist/storage/tab-coordinator.d.ts.map +1 -0
  30. package/dist/storage/tab-coordinator.js +584 -0
  31. package/dist/storage/tab-coordinator.js.map +1 -0
  32. package/package.json +5 -5
  33. package/src/browser.ts +13 -2
  34. package/src/indexeddb/document-storage.ts +689 -0
  35. package/src/indexeddb/idb.ts +136 -21
  36. package/src/indexeddb.ts +8 -3
  37. package/src/storage/hybrid.ts +14 -0
  38. package/src/storage/index.ts +10 -0
  39. package/src/storage/tab-coordinator.ts +692 -0
package/dist/browser.d.ts CHANGED
@@ -5,8 +5,10 @@
5
5
  * - `HybridStorage` keeps a local copy in front of a remote storage, with its errors and its types.
6
6
  * - `ApiStorage` is the remote storage over the collection procedures of a server.
7
7
  * - `EventsChangeFeed` pushes the remote changes to a `HybridStorage`.
8
- * - The entry also has all of `@procedures/store/indexeddb`: the IndexedDB stores and their
9
- * fallbacks in memory.
8
+ * - `TabCoordinator` lets one leader tab run the sync of a `HybridStorage`, and the other tabs
9
+ * copy its changes (roadmap CLI-25). It uses the Web Locks API and `BroadcastChannel`.
10
+ * - The entry also has all of `@procedures/store/indexeddb`: `IndexedDbStorage`, the IndexedDB
11
+ * stores and their fallbacks in memory.
10
12
  *
11
13
  * No module of this entry imports a module of Node, directly or through another module. The
12
14
  * modules import `@procedures/client/browser` and not the root of the client, because the root
@@ -18,6 +20,8 @@
18
20
  export * from "./indexeddb.js";
19
21
  export { HybridStorage, PendingWriteError, QueueFullError, MissingKeysError, QueueStoreError, ConflictError, ModeSwitchError, SyncStateError, } from "./storage/hybrid.js";
20
22
  export type { HybridStorageOptions, HybridMode, LocalCopyStorage } from "./storage/hybrid.js";
23
+ export { TabCoordinator } from "./storage/tab-coordinator.js";
24
+ export type { TabAbortSignalLike, TabChannelFactory, TabChannelLike, TabCoordinatorOptions, TabLockManagerLike, TabRole, } from "./storage/tab-coordinator.js";
21
25
  export type { ConflictResolution, SyncError, SyncStatus } from "./storage/types.js";
22
26
  export { ApiStorage } from "./storage/api.js";
23
27
  export type { ApiStorageOptions } from "./storage/api.js";
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,GACf,MAAM,qBAAqB,CAAC;A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,EACf,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,mBAAmB,CAAC"}
package/dist/browser.js CHANGED
@@ -5,8 +5,10 @@
5
5
  * - `HybridStorage` keeps a local copy in front of a remote storage, with its errors and its types.
6
6
  * - `ApiStorage` is the remote storage over the collection procedures of a server.
7
7
  * - `EventsChangeFeed` pushes the remote changes to a `HybridStorage`.
8
- * - The entry also has all of `@procedures/store/indexeddb`: the IndexedDB stores and their
9
- * fallbacks in memory.
8
+ * - `TabCoordinator` lets one leader tab run the sync of a `HybridStorage`, and the other tabs
9
+ * copy its changes (roadmap CLI-25). It uses the Web Locks API and `BroadcastChannel`.
10
+ * - The entry also has all of `@procedures/store/indexeddb`: `IndexedDbStorage`, the IndexedDB
11
+ * stores and their fallbacks in memory.
10
12
  *
11
13
  * No module of this entry imports a module of Node, directly or through another module. The
12
14
  * modules import `@procedures/client/browser` and not the root of the client, because the root
@@ -17,6 +19,7 @@
17
19
  */
18
20
  export * from "./indexeddb.js";
19
21
  export { HybridStorage, PendingWriteError, QueueFullError, MissingKeysError, QueueStoreError, ConflictError, ModeSwitchError, SyncStateError, } from "./storage/hybrid.js";
22
+ export { TabCoordinator } from "./storage/tab-coordinator.js";
20
23
  export { ApiStorage } from "./storage/api.js";
21
24
  export { EventsChangeFeed } from "./storage/feed.js";
22
25
  //# sourceMappingURL=browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,GACf,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAU9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,186 @@
1
+ /**
2
+ * A collection storage in IndexedDB, for a browser (roadmap CLI-22).
3
+ *
4
+ * `IndexedDbStorage` keeps the items of one collection in one database of IndexedDB. It implements
5
+ * `CollectionStorage`. Thus a `HybridStorage` of a browser app without SignalDB keeps its local copy
6
+ * in it, and the items stay after a reload of the page (server stack D9).
7
+ *
8
+ * The database has two object stores:
9
+ * - `items` has one record for each id, with the id as its key. The record of an item is
10
+ * `{ id, order, at, value }`. The record of a deleted id is a tombstone `{ id, deletedAt }`.
11
+ * - `log` has one record: the epoch of the database and the counters of the change log.
12
+ *
13
+ * The rules:
14
+ * - Each change takes the next number of the counter. `order` is the number of the first set of the
15
+ * id. The index `order` thus gives the entries in the order of the first set of each id, as a
16
+ * `Map` does. IndexedDB itself orders the records by their keys.
17
+ * - `at` and `deletedAt` are the numbers of the last change of each id. Their indexes give a delta
18
+ * of `getChangesSince()` without a read of the items that did not change.
19
+ * - Each write is one readwrite transaction: the reads, the test of the expected versions and the
20
+ * writes. Thus the writes of two tabs do not mix, a batch that fails changes nothing, and two
21
+ * patches at the same time keep each field.
22
+ * - The storage checks each record that it reads. A record of another application or of another
23
+ * version is an error, not an item.
24
+ * - Give each collection its own database. A database of one version has a fixed set of object
25
+ * stores: a new object store in an open database needs a version change, and the version change
26
+ * waits for the connections of the other tabs.
27
+ */
28
+ import type { CollectionStorage, StorageBatchWriteOptions, StorageChanges, StorageItemWriteOptions, StorageMetadata, StorageObserver, StorageWriteOptions } from "@procedures/collections";
29
+ import { type ListenerErrorHandler } from "@procedures/collections";
30
+ import { type StoragePatch, type StorageQueryOptions, type StorageQueryPolicy, type StorageSelector } from "@procedures/client/query";
31
+ import { type IndexedDbOptions } from "./idb.js";
32
+ /** The options of an `IndexedDbStorage`. */
33
+ export interface IndexedDbStorageOptions<T = unknown> extends IndexedDbOptions {
34
+ /**
35
+ * The query policy of `query()` for a call without a policy: the operators and the limits. The
36
+ * procedure `find` gives the policy of its host.
37
+ * @default DEFAULT_QUERY_POLICY: no `$regex`
38
+ */
39
+ queryPolicy?: StorageQueryPolicy | undefined;
40
+ /**
41
+ * The version of an item, for example `(item) => item.rev` (roadmap CLI-16). With it, `set`,
42
+ * `delete` and `setBatch` take an expected version: a write whose current item has another
43
+ * version changes nothing and rejects with `VersionConflictError`. The test and the write are one
44
+ * transaction, also for two tabs. Without it, a write with an expected version rejects with a
45
+ * `TypeError`. Give the `versionOf` of the `HybridStorage` to its local copy.
46
+ */
47
+ versionOf?: ((item: T) => string | undefined) | undefined;
48
+ /**
49
+ * The number of deletes that the change log keeps (roadmap R28). After more deletes, the log
50
+ * drops the oldest ones, and `getChangesSince` of an older version gives all items.
51
+ * @default 10000
52
+ */
53
+ maxTombstones?: number;
54
+ /**
55
+ * The function that gets the error of an observer of `observe()`. The default throws the error
56
+ * again in a microtask (`reportListenerError`). The write and the other observers do not fail.
57
+ */
58
+ onObserverError?: ListenerErrorHandler | undefined;
59
+ }
60
+ /**
61
+ * A collection storage in IndexedDB, for a browser (roadmap CLI-22).
62
+ *
63
+ * - The items stay after `close()` and after a reload of the page. A new storage of the same
64
+ * database reads them, and the versions of `getChangesSince()` stay valid.
65
+ * - Each write takes a copy of its value (`structuredClone`), and each read gives a new copy.
66
+ * - `query()` runs a selector, `observe()` tells each change of this storage with the origin of its
67
+ * write, and `patch()` changes an item in one transaction.
68
+ * - `observe()` does not tell the writes of another tab or of another storage of the same database.
69
+ * - After `close()`, each operation rejects, and a second `close()` does nothing.
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * import { ApiStorage, HybridStorage } from "@procedures/store/browser";
74
+ * import { IndexedDbQueueStore, IndexedDbStorage, IndexedDbSyncStateStore } from "@procedures/store/indexeddb";
75
+ *
76
+ * const users = new HybridStorage(new ApiStorage(client, { collection: "users" }), {
77
+ * local: new IndexedDbStorage("users"),
78
+ * queueStore: new IndexedDbQueueStore("users-queue"),
79
+ * syncState: new IndexedDbSyncStateStore("users-sync"),
80
+ * });
81
+ * ```
82
+ */
83
+ export declare class IndexedDbStorage<T> implements CollectionStorage<T> {
84
+ private readonly connection;
85
+ private readonly maxTombstones;
86
+ /** The query policy of a call without a policy */
87
+ private readonly queryPolicy;
88
+ /** The version of an item, for the preconditions of the writes (roadmap CLI-16) */
89
+ private readonly versionOf;
90
+ /** The observers of `observe()` */
91
+ private readonly observers;
92
+ private closed;
93
+ /**
94
+ * @param name - The name of the database: one database for each collection. The storage makes it at the first operation.
95
+ * @param options - The IndexedDB factory, the query policy, `versionOf` and the limit of the change log.
96
+ */
97
+ constructor(name: string, options?: IndexedDbStorageOptions<T>);
98
+ /** The name of the database. */
99
+ get name(): string;
100
+ get(id: string): Promise<T | undefined>;
101
+ getAll(): Promise<T[]>;
102
+ /** Every item with its id, in the order of the first set of each id. */
103
+ getEntries(): Promise<Array<[string, T]>>;
104
+ /** The ids of the items, in the order of the entries. The storage does not read the values. */
105
+ getIds(): Promise<string[]>;
106
+ /**
107
+ * The changes after a version (roadmap R28). A version of another database, or older than the
108
+ * dropped deletes, gives all items (`full: true`) in the order of the entries. A delta gives the
109
+ * changed items and the deleted ids in the order of the last change of each id. The reads run in
110
+ * one transaction, and a version stays valid after a reload.
111
+ */
112
+ getChangesSince(since?: string): Promise<StorageChanges<T>>;
113
+ /** The items for which the predicate gives true, in the order of the entries. The predicate gets a copy of each item. */
114
+ find(predicate: (item: T) => boolean): Promise<T[]>;
115
+ /**
116
+ * The entries whose items match the selector, with the order, the skip and the limit of
117
+ * `queryEntries()`, under the policy of the call or of the options. A query that is not correct
118
+ * rejects with a `TypeError` before the storage reads the database.
119
+ */
120
+ query(selector: StorageSelector, options?: StorageQueryOptions, policy?: StorageQueryPolicy): Promise<Array<[string, T]>>;
121
+ /**
122
+ * This method starts to send the changes of each write of this storage to the observer, before the
123
+ * write resolves. The observers share each batch. The writes of another tab do not give a batch.
124
+ */
125
+ observe(observer: StorageObserver<T>): () => void;
126
+ has(id: string): Promise<boolean>;
127
+ size(): Promise<number>;
128
+ set(id: string, value: T, options?: StorageItemWriteOptions): Promise<void>;
129
+ delete(id: string, options?: StorageItemWriteOptions): Promise<boolean>;
130
+ /** This method deletes each item. The change log gets a delete of each id, in the order of the entries. */
131
+ clear(options?: StorageWriteOptions): Promise<void>;
132
+ /**
133
+ * This method changes the item of the id in one transaction (a JSON Merge Patch, or the operations
134
+ * `$set`, `$unset`, `$remove` and `$insert`), and gives a copy of the new item. A missing id stays
135
+ * missing, and the result is undefined. A patch that cannot apply to the item changes nothing.
136
+ */
137
+ patch(id: string, fields: StoragePatch, options?: StorageWriteOptions): Promise<T | undefined>;
138
+ /**
139
+ * This method sets several items in one transaction. When one value has no copy, or one expected
140
+ * version has a conflict, nothing changes.
141
+ */
142
+ setBatch(items: Array<[string, T]>, options?: StorageBatchWriteOptions): Promise<void>;
143
+ /** This method deletes several items in one transaction. */
144
+ deleteBatch(ids: string[], options?: StorageWriteOptions): Promise<number>;
145
+ getBatch(ids: string[]): Promise<Map<string, T>>;
146
+ /**
147
+ * This method closes the database. The items stay in it: a new storage of the same database reads
148
+ * them. After `close()`, each operation rejects, and a second `close()` does nothing.
149
+ */
150
+ close(): Promise<void>;
151
+ getMetadata(): Promise<StorageMetadata>;
152
+ /** This method throws after `close()`. In an async method, the throw rejects the promise. */
153
+ private checkOpen;
154
+ private problem;
155
+ /** The record of an id, or undefined for no record. A record of another form throws. */
156
+ private storedRecord;
157
+ /** The records of the items, in the order of the entries. */
158
+ private liveRecords;
159
+ /** The record of an entry of the index `order` or `at`. A record of another form throws. */
160
+ private liveRecord;
161
+ /** The counter of the object store `log`. A missing counter or a counter of another form throws. */
162
+ private counter;
163
+ /** This method reads the records of an index from the highest key, while `take` gives true. */
164
+ private scanAfter;
165
+ /**
166
+ * The preconditions of a write. A storage without `versionOf` throws a `TypeError` before the
167
+ * write starts (roadmap CLI-16).
168
+ */
169
+ private preconditions;
170
+ /**
171
+ * This method tests the expected versions in the transaction of the write (roadmap CLI-16). A
172
+ * conflict throws `VersionConflictError`, and the transaction aborts.
173
+ */
174
+ private checkVersions;
175
+ /**
176
+ * One write in one readwrite transaction. The transaction reads the records of the ids, every
177
+ * item when `all` is true, and the counter. Then `change` writes with a `Writer`, the change log
178
+ * drops the oldest tombstones above the limit, and the counter is written. The observers get the
179
+ * changes after the commit, before the promise resolves. A throw of `change` aborts the
180
+ * transaction, and the promise rejects with its error.
181
+ */
182
+ private write;
183
+ /** This method drops the oldest tombstones above the limit, moves the floor of the change log, then calls `then`. */
184
+ private trim;
185
+ }
186
+ //# sourceMappingURL=document-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-storage.d.ts","sourceRoot":"","sources":["../../src/indexeddb/document-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EAGxB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAC;AAClC,O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