Socket
Socket
Sign inDemoInstall

@node-red/runtime

Package Overview
Dependencies
90
Maintainers
2
Versions
102
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.3 to 3.1.4

locales/es-ES/runtime.json

2

lib/flows/Flow.js

@@ -488,3 +488,3 @@ /**

if (this._env.hasOwnProperty(key)) {
return this._env[key]
return (Object.hasOwn(this._env[key], 'value') && this._env[key].__clone__) ? clone(this._env[key].value) : this._env[key]
}

@@ -491,0 +491,0 @@ } else {

@@ -44,3 +44,3 @@ const flowUtil = require("./util");

if (this._env.hasOwnProperty(key)) {
return this._env[key]
return (Object.hasOwn(this._env[key], 'value') && this._env[key].__clone__) ? clone(this._env[key].value) : this._env[key]
}

@@ -47,0 +47,0 @@ } else {

@@ -377,3 +377,8 @@ /**

// Update the global flow
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
if (activeFlows['global']) {
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
} else {
log.debug("red/nodes/flows.start : starting flow : global");
activeFlows['global'] = Flow.create(flowAPI,activeFlowConfig);
}
for (id in activeFlowConfig.flows) {

@@ -380,0 +385,0 @@ if (activeFlowConfig.flows.hasOwnProperty(id)) {

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

type: this.subflowInstance.type,
g: this.subflowInstance.g,
z: this.subflowInstance.z,

@@ -379,3 +380,3 @@ name: this.subflowInstance.name,

if (this._env.hasOwnProperty(key)) {
return this._env[key]
return (Object.hasOwn(this._env[key], 'value') && this._env[key].__clone__) ? clone(this._env[key].value) : this._env[key]
}

@@ -382,0 +383,0 @@ } else {

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

if (!err) {
if (typeof result === 'object') {
result = { value: result, __clone__: true}
}
evaluatedEnv[name] = result

@@ -113,2 +116,5 @@ }

value = redUtil.evaluateNodeProperty(value, type, {_flow: flow}, null, null);
if (typeof value === 'object') {
value = { value: value, __clone__: true}
}
}

@@ -143,4 +149,9 @@ evaluatedEnv[name] = value

}
if (typeof value === 'object' && !value.__clone__) {
value = { value: value, __clone__: true}
}
evaluatedEnv[name] = value
}
// console.log(evaluatedEnv)

@@ -147,0 +158,0 @@ return evaluatedEnv

@@ -30,2 +30,3 @@ /*!

var os = require("os");
const crypto = require("crypto")

@@ -55,4 +56,4 @@ const {log,i18n,events,exec,util,hooks} = require("@node-red/util");

var server;
let userSettings;
/**

@@ -66,4 +67,5 @@ * Initialise the runtime module.

*/
function init(userSettings,httpServer,_adminApi) {
function init(_userSettings,httpServer,_adminApi) {
server = httpServer;
userSettings = _userSettings

@@ -140,3 +142,8 @@ if (server && server.on) {

.then(function() {
if (settings.available()) {
if (settings.get('instanceId') === undefined) {
settings.set('instanceId', crypto.randomBytes(8).toString('hex'))
}
userSettings.instanceId = settings.get('instanceId') || ''
}
if (log.metric()) {

@@ -143,0 +150,0 @@ runtimeMetricInterval = setInterval(function() {

@@ -387,6 +387,23 @@ /**

} else if (nodeType === "global-config") {
if (JSON.stringify(savedCredentials.map) !== JSON.stringify(newCreds.map)) {
savedCredentials.map = newCreds.map;
dirty = true;
}
const existingCredentialKeys = Object.keys(savedCredentials?.map || [])
const newCredentialKeys = Object.keys(newCreds?.map || [])
existingCredentialKeys.forEach(key => {
if (!newCreds.map?.[key]) {
// This key doesn't exist in the new credentials list - remove
delete savedCredentials.map[key]
delete savedCredentials.map[`has_${key}`]
dirty = true
}
})
newCredentialKeys.forEach(key => {
if (!/^has_/.test(key)) {
if (!savedCredentials.map?.[key] || newCreds.map[key] !== '__PWRD__') {
// This key either doesn't exist in current saved, or the
// value has been changed
savedCredentials.map[key] = newCreds.map[key]
savedCredentials.map[`has_${key}`] = newCreds.map[`has_${key}`]
dirty = true
}
}
})
} else {

@@ -393,0 +410,0 @@ var dashedType = nodeType.replace(/\s+/g, '-');

@@ -29,4 +29,4 @@ {

"invalid": "Nom de module invalide",
"installing": "Installation du module : __nom__, version : __version__",
"installed": "Module installé : __nom__",
"installing": "Installation du module : __name__, version : __version__",
"installed": "Module installé : __name__",
"install-failed": "L'installation a échoué",

@@ -33,0 +33,0 @@ "install-failed-long": "L'installation du module __name__ a échoué :",

{
"name": "@node-red/runtime",
"version": "3.1.3",
"version": "3.1.4",
"license": "Apache-2.0",

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

"dependencies": {
"@node-red/registry": "3.1.3",
"@node-red/util": "3.1.3",
"@node-red/registry": "3.1.4",
"@node-red/util": "3.1.4",
"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