Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@node-red/runtime

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-red/runtime - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

1

lib/flows/util.js

@@ -86,2 +86,3 @@ /**

try {
Object.defineProperty(conf,'_module', {value: typeRegistry.getNodeInfo(type), enumerable: false, writable: true })
Object.defineProperty(conf,'_flow', {value: flow, enumerable: false, writable: true })

@@ -88,0 +89,0 @@ newNode = new nodeTypeConstructor(conf);

@@ -62,2 +62,5 @@ /**

}
if (n._module) {
Object.defineProperty(this,'_module', {value: n._module, enumerable: false, writable: true })
}
this.updateWires(n.wires);

@@ -500,3 +503,8 @@ }

}
self._flow.log(o);
// See https://github.com/node-red/node-red/issues/3327
try {
self._flow.log(o);
} catch(err) {
logUnexpectedError(self, err)
}
}

@@ -581,2 +589,57 @@ /**

function inspectObject(flow) {
try {
let properties = new Set()
let currentObj = flow
do {
if (!Object.getPrototypeOf(currentObj)) { break }
Object.getOwnPropertyNames(currentObj).map(item => properties.add(item))
} while ((currentObj = Object.getPrototypeOf(currentObj)))
let propList = [...properties.keys()].map(item => `${item}[${(typeof flow[item])[0]}]`)
propList.sort();
let result = [];
let line = "";
while (propList.length > 0) {
let prop = propList.shift()
if (line.length+prop.length > 80) {
result.push(line)
line = "";
} else {
line += " "+prop
}
}
if (line.length > 0) {
result.push(line);
}
return result.join("\n ")
} catch(err) {
return "Failed to capture object properties: "+err.toString()
}
}
function logUnexpectedError(node, error) {
let moduleInfo = node._module?`${node._module.module}@${node._module.version}`:"undefined"
Log.error(`
********************************************************************
Unexpected Node Error
${error.stack}
Node:
Type: ${node.type}
Module: ${moduleInfo}
ID: ${node._alias||node.id}
Properties:
${inspectObject(node)}
Flow: ${node._flow?node._flow.path:'undefined'}
Type: ${node._flow?node._flow.TYPE:'undefined'}
Properties:
${node._flow?inspectObject(node._flow):'undefined'}
Please report this issue, including the information logged above:
https://github.com/node-red/node-red/issues/
********************************************************************
`)
}
module.exports = Node;

8

package.json
{
"name": "@node-red/runtime",
"version": "2.1.4",
"version": "2.1.5",
"license": "Apache-2.0",

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

"dependencies": {
"@node-red/registry": "2.1.4",
"@node-red/util": "2.1.4",
"@node-red/registry": "2.1.5",
"@node-red/util": "2.1.5",
"async-mutex": "0.3.2",
"clone": "2.1.2",
"express": "4.17.1",
"express": "4.17.2",
"fs-extra": "10.0.0",

@@ -26,0 +26,0 @@ "json-stringify-safe": "5.0.1"

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc