mirror of https://codeberg.org/pzp/pzp-dict.git
refactor secret-stack plugin shape
This commit is contained in:
parent
2f885fd807
commit
2d890eaba0
10
lib/index.js
10
lib/index.js
|
@ -63,15 +63,11 @@ function assertDBExists(peer) {
|
||||||
if (!peer.db) throw new Error('record plugin requires ppppp-db plugin')
|
if (!peer.db) throw new Error('record plugin requires ppppp-db plugin')
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
name: 'record',
|
|
||||||
manifest: {},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {{ db: PPPPPDB | null, close: ClosableHook }} peer
|
* @param {{ db: PPPPPDB | null, close: ClosableHook }} peer
|
||||||
* @param {any} config
|
* @param {any} config
|
||||||
*/
|
*/
|
||||||
init(peer, config) {
|
function initRecord(peer, config) {
|
||||||
assertDBExists(peer)
|
assertDBExists(peer)
|
||||||
|
|
||||||
//#region state
|
//#region state
|
||||||
|
@ -420,5 +416,7 @@ module.exports = {
|
||||||
|
|
||||||
_squeezePotential,
|
_squeezePotential,
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.name = 'record'
|
||||||
|
exports.init = initRecord
|
||||||
|
|
Loading…
Reference in New Issue