Currently, update
event is supported only. and it will be emitted when plugin preferences has changed.
'use strict'
module.exports = (pluginContext) => {
const prefObj = pluginContext.preferences;
let useProxy = false;
function onPrefUpdate(pref) {
useProxy = pref.useProxy;
}
function startup() {
useProxy = prefObj.get('useProxy');
prefObj.on('update', onPrefUpdate);
}
function search(query, res) { ... }
function execute(id, payload) { ... }
return { startup, search, execute };
};