@serfab/quereus-plugin-sereus 1.14.0 → 1.15.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 +43 -26
- package/dist/compose-strand.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/plugin-browser.js +24 -24
- package/dist/plugin-browser.js.map +4 -4
- package/dist/types.d.ts +15 -0
- package/package.json +7 -7
- package/src/compose-strand.ts +484 -458
- package/src/index.ts +1 -0
- package/src/types.ts +15 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Libp2p } from '@libp2p/interface';
|
|
2
2
|
import type { IRepo } from '@optimystic/db-core';
|
|
3
3
|
import type { IRawStorage } from '@optimystic/db-p2p';
|
|
4
|
+
import type { SqlCommitDurabilityListener, CommitFullyHeldListener } from '@optimystic/quereus-plugin-optimystic/plugin';
|
|
4
5
|
/**
|
|
5
6
|
* Which Optimystic transactor a strand connection commits through — a choice of
|
|
6
7
|
* storage engine, nothing more. See {@link StrandConnectionOptions.transactor}.
|
|
@@ -93,6 +94,20 @@ export interface SereusPluginResult {
|
|
|
93
94
|
* given, `'network'` otherwise.
|
|
94
95
|
*/
|
|
95
96
|
transactor: StrandTransactor;
|
|
97
|
+
/**
|
|
98
|
+
* Be told, after every commit on this connection that wrote something, who holds what it
|
|
99
|
+
* wrote. Called once per such commit, synchronously, before the commit returns. The Optimystic
|
|
100
|
+
* plugin's listener of the same name, passed through; what the report means is in that
|
|
101
|
+
* plugin's README § "A commit's durability". Returns an idempotent unsubscribe.
|
|
102
|
+
*/
|
|
103
|
+
onCommitDurability: (listener: SqlCommitDurabilityListener) => () => void;
|
|
104
|
+
/**
|
|
105
|
+
* Be told once when a commit reported `followed` below full replication becomes held by
|
|
106
|
+
* every member of its cohort. Can fire inside the commit, right after its durability report.
|
|
107
|
+
* Followed commits live in memory: {@link shutdown} or a restart forgets them, and nothing
|
|
108
|
+
* fires for a forgotten one. Passed through like {@link onCommitDurability}.
|
|
109
|
+
*/
|
|
110
|
+
onCommitFullyHeld: (listener: CommitFullyHeldListener) => () => void;
|
|
96
111
|
/** Shuts down the libp2p node and collection factory. Call when done. */
|
|
97
112
|
shutdown: () => Promise<void>;
|
|
98
113
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serfab/quereus-plugin-sereus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Quereus plugin that connects to a Sereus strand for SQL access",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"@libp2p/circuit-relay-v2": "^4.2.13",
|
|
69
69
|
"@libp2p/interface": "^3.3.0",
|
|
70
70
|
"@libp2p/websockets": "^10.1.21",
|
|
71
|
-
"@optimystic/db-core": "^1.
|
|
72
|
-
"@optimystic/db-p2p": "^1.
|
|
73
|
-
"@optimystic/db-p2p-storage-fs": "^1.
|
|
74
|
-
"@optimystic/db-p2p-storage-web": "^1.
|
|
75
|
-
"@optimystic/quereus-plugin-crypto": "^1.
|
|
76
|
-
"@optimystic/quereus-plugin-optimystic": "^1.
|
|
71
|
+
"@optimystic/db-core": "^1.13.0",
|
|
72
|
+
"@optimystic/db-p2p": "^1.13.0",
|
|
73
|
+
"@optimystic/db-p2p-storage-fs": "^1.13.0",
|
|
74
|
+
"@optimystic/db-p2p-storage-web": "^1.13.0",
|
|
75
|
+
"@optimystic/quereus-plugin-crypto": "^1.13.0",
|
|
76
|
+
"@optimystic/quereus-plugin-optimystic": "^1.13.0",
|
|
77
77
|
"@quereus/quereus": "^4.20.1",
|
|
78
78
|
"debug": "^4.4.3"
|
|
79
79
|
},
|