@node-red/runtime
Advanced tools
Comparing version 3.1.0-beta.1 to 3.1.0-beta.2
@@ -821,2 +821,12 @@ /** | ||
function deliverMessageToDestination(sendEvent) { | ||
if (sendEvent?.destination?.node) { | ||
try { | ||
sendEvent.destination.node.receive(sendEvent.msg); | ||
} catch(err) { | ||
Log.error(`Error delivering message to node:${sendEvent.destination.node._path} [${sendEvent.destination.node.type}]`) | ||
Log.error(err.stack) | ||
} | ||
} | ||
} | ||
function handlePreDeliver(flow,sendEvent, reportError) { | ||
@@ -831,11 +841,6 @@ // preDeliver - the local router has identified the node it is going to send to. At this point, the message has been cloned if needed. | ||
setImmediate(function() { | ||
if (sendEvent.destination.node) { | ||
sendEvent.destination.node.receive(sendEvent.msg); | ||
} | ||
deliverMessageToDestination(sendEvent) | ||
}) | ||
} else { | ||
if (sendEvent.destination.node) { | ||
sendEvent.destination.node.receive(sendEvent.msg); | ||
} | ||
deliverMessageToDestination(sendEvent) | ||
} | ||
@@ -842,0 +847,0 @@ // postDeliver - the message has been dispatched to be delivered asynchronously (unless the sync delivery flag is set, in which case it would be continue as synchronous delivery) |
@@ -477,3 +477,3 @@ /** | ||
let node = clone(def); | ||
let nid = redUtil.generateId(); | ||
let nid = `${subflowInstanceId}-${node.id}` //redUtil.generateId(); | ||
// console.log("Create Node In subflow",node._alias, "--->",nid, "(",node.type,")") | ||
@@ -480,0 +480,0 @@ // node_map[node.id] = node; |
@@ -592,13 +592,24 @@ /** | ||
function clean(flowConfig) { | ||
flowConfig = flowConfig || { allNodes: {} }; | ||
flowConfig = flowConfig || { allNodes: {}, subflows: {} }; | ||
const knownNodes = new Set(Object.keys(flowConfig.allNodes)) | ||
// We need to alias all of the subflow instance contents | ||
for (const subflow of Object.values(flowConfig.subflows || {})) { | ||
subflow.instances.forEach(instance => { | ||
for (const nodeId of Object.keys(subflow.nodes || {})) { | ||
knownNodes.add(`${instance.id}-${nodeId}`) | ||
} | ||
for (const nodeId of Object.keys(subflow.configs || {})) { | ||
knownNodes.add(`${instance.id}-${nodeId}`) | ||
} | ||
}) | ||
} | ||
var promises = []; | ||
for(var plugin in stores){ | ||
if(stores.hasOwnProperty(plugin)){ | ||
promises.push(stores[plugin].clean(Object.keys(flowConfig.allNodes))); | ||
} | ||
for (const store of Object.values(stores)){ | ||
promises.push(store.clean(Array.from(knownNodes))); | ||
} | ||
for (var id in contexts) { | ||
if (contexts.hasOwnProperty(id) && id !== "global") { | ||
for (const id of Object.keys(contexts)) { | ||
if (id !== "global") { | ||
var idParts = id.split(":"); | ||
if (!flowConfig.allNodes.hasOwnProperty(idParts[0])) { | ||
if (!knownNodes.has(idParts[0])) { | ||
delete contexts[id]; | ||
@@ -605,0 +616,0 @@ } |
{ | ||
"name": "@node-red/runtime", | ||
"version": "3.1.0-beta.1", | ||
"version": "3.1.0-beta.2", | ||
"license": "Apache-2.0", | ||
@@ -19,4 +19,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@node-red/registry": "3.1.0-beta.1", | ||
"@node-red/util": "3.1.0-beta.1", | ||
"@node-red/registry": "3.1.0-beta.2", | ||
"@node-red/util": "3.1.0-beta.2", | ||
"async-mutex": "0.4.0", | ||
@@ -23,0 +23,0 @@ "clone": "2.1.2", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
593798
55
13695
66
+ Added@node-red/registry@3.1.0-beta.2(transitive)
+ Added@node-red/util@3.1.0-beta.2(transitive)
+ Addedminipass@4.2.8(transitive)
+ Addedmoment-timezone@0.5.41(transitive)
+ Addedtar@6.1.13(transitive)
- Removed@node-red/registry@3.1.0-beta.1(transitive)
- Removed@node-red/util@3.1.0-beta.1(transitive)
- Removedmoment-timezone@0.5.39(transitive)
- Removedtar@6.1.12(transitive)
Updated@node-red/util@3.1.0-beta.2