mirror of https://codeberg.org/pzp/pzp-dict.git
refactor secret-stack plugin shape
This commit is contained in:
parent
2f885fd807
commit
2d890eaba0
12
lib/index.js
12
lib/index.js
|
@ -63,15 +63,11 @@ function assertDBExists(peer) {
|
|||
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 {any} config
|
||||
*/
|
||||
init(peer, config) {
|
||||
function initRecord(peer, config) {
|
||||
assertDBExists(peer)
|
||||
|
||||
//#region state
|
||||
|
@ -420,5 +416,7 @@ module.exports = {
|
|||
|
||||
_squeezePotential,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
exports.name = 'record'
|
||||
exports.init = initRecord
|
||||
|
|
Loading…
Reference in New Issue