Expand module APIs across pear, network, experimental, and ops categories.
Add batch helpers, counts, and management utilities so modules expose consistent peer, lease, queue, and telemetry surfaces. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -66,6 +66,15 @@ class HyperPearUpdateGossip extends EventEmitter {
|
||||
return n
|
||||
}
|
||||
|
||||
publishBatch (updates) {
|
||||
if (!Array.isArray(updates)) throw new Error('updates array required')
|
||||
return updates.map((u) => this.publishUpdate(u.version, u.manifest))
|
||||
}
|
||||
|
||||
listVersions () {
|
||||
return this._history.map((u) => u.version)
|
||||
}
|
||||
|
||||
subscribe (fn) {
|
||||
if (typeof fn !== 'function') throw new Error('fn must be a function')
|
||||
this._subs.add(fn)
|
||||
|
||||
Reference in New Issue
Block a user