@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/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.14.0",
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.12.0",
72
- "@optimystic/db-p2p": "^1.12.0",
73
- "@optimystic/db-p2p-storage-fs": "^1.12.0",
74
- "@optimystic/db-p2p-storage-web": "^1.12.0",
75
- "@optimystic/quereus-plugin-crypto": "^1.12.0",
76
- "@optimystic/quereus-plugin-optimystic": "^1.12.0",
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
  },