@serfab/quereus-plugin-sereus 1.16.0 → 1.17.0
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/README.md +4 -0
- package/dist/compose-strand.js +13 -10
- package/dist/compose-strand.js.map +1 -1
- package/dist/empty-collections.d.ts +23 -0
- package/dist/empty-collections.js +71 -0
- package/dist/empty-collections.js.map +1 -0
- package/dist/plugin-browser.js +25 -25
- package/dist/plugin-browser.js.map +4 -4
- package/dist/types.d.ts +10 -0
- package/package.json +1 -1
- package/src/compose-strand.ts +491 -484
- package/src/empty-collections.ts +89 -0
- package/src/types.ts +10 -0
package/dist/types.d.ts
CHANGED
|
@@ -108,6 +108,16 @@ export interface SereusPluginResult {
|
|
|
108
108
|
* fires for a forgotten one. Passed through like {@link onCommitDurability}.
|
|
109
109
|
*/
|
|
110
110
|
onCommitFullyHeld: (listener: CommitFullyHeldListener) => () => void;
|
|
111
|
+
/**
|
|
112
|
+
* Commit an empty collection for every table declared in the `Strand` and `App` schemas that
|
|
113
|
+
* has none yet (main, index and unique-enforcement trees), and resolve to how many were
|
|
114
|
+
* committed. A founder calls it before writing `Strand.Header`, so a read of a table nobody
|
|
115
|
+
* has written is answered from local storage rather than by the cohort proving absence.
|
|
116
|
+
*
|
|
117
|
+
* Run it only while no other writer can reach this connection's `Database`: each collection's
|
|
118
|
+
* `sync()` commits whatever is staged in it, outside any SQL transaction.
|
|
119
|
+
*/
|
|
120
|
+
createEmptyCollections: () => Promise<number>;
|
|
111
121
|
/** Shuts down the libp2p node and collection factory. Call when done. */
|
|
112
122
|
shutdown: () => Promise<void>;
|
|
113
123
|
}
|