Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
let deployed;
RED.events.on("runtime-event", deployed = function(data){
if (data.id === "runtime-deploy") {
RED.events.removeListener("runtime-event", deployed);
// console.log('flow deployed');
resolve();
}
})
RED.start();
});
})()
function clearHandlers(){
for(var key in handlers) RED.events.removeListener(key, handlers[key]);
}
function setHandlers(){