Socket
Socket
Sign inDemoInstall

@node-red/runtime

Package Overview
Dependencies
90
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

75

lib/flows/Flow.js

@@ -609,6 +609,32 @@ /**

} else {
this.statusNodes.forEach(function(targetStatusNode) {
if (targetStatusNode.scope && targetStatusNode.scope.indexOf(reportingNode.id) === -1) {
const candidateNodes = [];
this.statusNodes.forEach(targetStatusNode => {
if (targetStatusNode.g && targetStatusNode.scope === 'group' && !reportingNode.g) {
// Status node inside a group, reporting node not in a group - skip it
return
}
if (Array.isArray(targetStatusNode.scope) && targetStatusNode.scope.indexOf(reportingNode.id) === -1) {
return;
}
let distance = 0
if (reportingNode.g) {
// Reporting node inside a group. Calculate the distance between it and the status node
let containingGroup = this.global.groups[reportingNode.g]
while (containingGroup && containingGroup.id !== targetStatusNode.g) {
distance++
containingGroup = this.global.groups[containingGroup.g]
}
if (!containingGroup && targetStatusNode.g && targetStatusNode.scope === 'group') {
// This status node is in a group, but not in the same hierachy
// the reporting node is in
return
}
}
candidateNodes.push({ d: distance, n: targetStatusNode })
})
candidateNodes.sort((A,B) => {
return A.d - B.d
})
candidateNodes.forEach(candidate => {
const targetStatusNode = candidate.n
var message = {

@@ -671,17 +697,42 @@ status: clone(statusMessage)

} else {
var handledByUncaught = false;
this.catchNodes.forEach(function(targetCatchNode) {
if (targetCatchNode.scope && targetCatchNode.scope.indexOf(reportingNode.id) === -1) {
const candidateNodes = [];
this.catchNodes.forEach(targetCatchNode => {
if (targetCatchNode.g && targetCatchNode.scope === 'group' && !reportingNode.g) {
// Catch node inside a group, reporting node not in a group - skip it
return
}
if (Array.isArray(targetCatchNode.scope) && targetCatchNode.scope.indexOf(reportingNode.id) === -1) {
// Catch node has a scope set and it doesn't include the reporting node
return;
}
if (!targetCatchNode.scope && targetCatchNode.uncaught && !handledByUncaught) {
let distance = 0
if (reportingNode.g) {
// Reporting node inside a group. Calculate the distance between it and the catch node
let containingGroup = this.global.groups[reportingNode.g]
while (containingGroup && containingGroup.id !== targetCatchNode.g) {
distance++
containingGroup = this.global.groups[containingGroup.g]
}
if (!containingGroup && targetCatchNode.g && targetCatchNode.scope === 'group') {
// This catch node is in a group, but not in the same hierachy
// the reporting node is in
return
}
}
candidateNodes.push({ d: distance, n: targetCatchNode })
})
candidateNodes.sort((A,B) => {
return A.d - B.d
})
let handledByUncaught = false
candidateNodes.forEach(candidate => {
const targetCatchNode = candidate.n
if (targetCatchNode.uncaught && !handledByUncaught) {
// This node only wants errors that haven't already been handled
if (handled) {
// This has been handled by a !uncaught catch node
return;
return
}
// This is an uncaught error
handledByUncaught = true;
handledByUncaught = true
}
var errorMessage;
let errorMessage;
if (msg) {

@@ -688,0 +739,0 @@ errorMessage = redUtil.cloneMessage(msg);

4

lib/flows/util.js

@@ -204,3 +204,5 @@ /**

n.subflow = subflowType;
flow.subflows[subflowType].instances.push(n)
if (flow.subflows[subflowType]) {
flow.subflows[subflowType].instances.push(n)
}
}

@@ -207,0 +209,0 @@ if (container) {

@@ -92,3 +92,12 @@ /*!

adminApp = express();
const defaultServerSettings = {
"x-powered-by": false
}
const serverSettings = Object.assign({},defaultServerSettings,userSettings.httpServerOptions||{});
for (let eOption in serverSettings) {
nodeApp.set(eOption, serverSettings[eOption]);
adminApp.set(eOption, serverSettings[eOption]);
}
if (_adminApi) {

@@ -95,0 +104,0 @@ adminApi = _adminApi;

{
"name": "@node-red/runtime",
"version": "3.1.0-beta.2",
"version": "3.1.0-beta.3",
"license": "Apache-2.0",

@@ -19,10 +19,10 @@ "main": "./lib/index.js",

"dependencies": {
"@node-red/registry": "3.1.0-beta.2",
"@node-red/util": "3.1.0-beta.2",
"@node-red/registry": "3.1.0-beta.3",
"@node-red/util": "3.1.0-beta.3",
"async-mutex": "0.4.0",
"clone": "2.1.2",
"express": "4.18.2",
"fs-extra": "10.1.0",
"fs-extra": "11.1.1",
"json-stringify-safe": "5.0.1"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc