Socket
Socket
Sign inDemoInstall

@node-red/runtime

Package Overview
Dependencies
90
Maintainers
2
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.0-beta.1 to 3.1.0-beta.2

locales/fr/runtime.json

19

lib/flows/Flow.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc