@node-red/runtime
Advanced tools
Comparing version 1.3.5 to 1.3.6
@@ -372,3 +372,3 @@ /** | ||
// console.log((new Error().stack).toString().split("\n").slice(1,3).join("\n")) | ||
if ((this.flow.configs && this.flow.configs[id]) || (this.flow.nodes && this.flow.nodes[id])) { | ||
if ((this.flow.configs && this.flow.configs[id]) || (this.flow.nodes && this.flow.nodes[id] && this.flow.nodes[id].type.substring(0,8) != "subflow:")) { | ||
// This is a node owned by this flow, so return whatever we have got | ||
@@ -378,3 +378,3 @@ // During a stop/restart, activeNodes could be null for this id | ||
} else if (this.activeNodes[id]) { | ||
// TEMP: this is a subflow internal node within this flow | ||
// TEMP: this is a subflow internal node within this flow or subflow instance node | ||
return this.activeNodes[id]; | ||
@@ -381,0 +381,0 @@ } else if (this.subflowInstanceNodes[id]) { |
@@ -700,3 +700,5 @@ /** | ||
nodes.forEach(function(n) { | ||
n.z = id; | ||
if (n.type !== 'tab') { | ||
n.z = id; | ||
} | ||
}); | ||
@@ -703,0 +705,0 @@ } |
@@ -113,3 +113,3 @@ /** | ||
case "number": nodePropType = "num"; break; | ||
case "boolean": nodePropType = "bool"; nodePropValue = nodeProp?"true":"false"; break; | ||
case "boolean": nodePropType = "bool"; nodePropValue == nodeProp?"true":"false"; break; | ||
default: | ||
@@ -116,0 +116,0 @@ nodePropType = config[nodeProp.name].type; |
@@ -218,2 +218,18 @@ /** | ||
function validateContextKey(key) { | ||
try { | ||
const keys = Array.isArray(key) ? key : [key]; | ||
if(!keys.length) { return false }; //no key to get/set | ||
for (let index = 0; index < keys.length; index++) { | ||
const k = keys[index]; | ||
if (typeof k !== "string" || !k.length) { | ||
return false; //not string or zero-length | ||
} | ||
} | ||
} catch (error) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
function createContext(id,seed,parent) { | ||
@@ -255,2 +271,3 @@ // Seed is only set for global context - sourced from functionGlobalContext | ||
} | ||
Object.defineProperties(obj, { | ||
@@ -260,3 +277,2 @@ get: { | ||
var context; | ||
if (!callback && typeof storage === 'function') { | ||
@@ -269,3 +285,10 @@ callback = storage; | ||
} | ||
if (!validateContextKey(key)) { | ||
var err = Error("Invalid context key"); | ||
if(callback) { | ||
return callback(err); | ||
} else { | ||
throw err; | ||
} | ||
} | ||
if (!Array.isArray(key)) { | ||
@@ -344,3 +367,2 @@ var keyParts = util.parseContextStore(key); | ||
var context; | ||
if (!callback && typeof storage === 'function') { | ||
@@ -353,3 +375,10 @@ callback = storage; | ||
} | ||
if (!validateContextKey(key)) { | ||
var err = Error("Invalid context key"); | ||
if(callback) { | ||
return callback(err); | ||
} else { | ||
throw err; | ||
} | ||
} | ||
if (!Array.isArray(key)) { | ||
@@ -356,0 +385,0 @@ var keyParts = util.parseContextStore(key); |
@@ -294,3 +294,3 @@ /** | ||
} | ||
var m = /^(.*): (.*)$/.exec(l); | ||
var m = /^(.*?): (.*)$/.exec(l); | ||
if (m) { | ||
@@ -297,0 +297,0 @@ // git 2.1.4 (Debian Stable) doesn't support %D for refs - so filter out |
{ | ||
"name": "@node-red/runtime", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"license": "Apache-2.0", | ||
@@ -19,4 +19,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@node-red/registry": "1.3.5", | ||
"@node-red/util": "1.3.5", | ||
"@node-red/registry": "1.3.6", | ||
"@node-red/util": "1.3.6", | ||
"async-mutex": "0.3.1", | ||
@@ -23,0 +23,0 @@ "clone": "2.1.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
538192
12659
+ Added@node-red/registry@1.3.6(transitive)
+ Added@node-red/util@1.3.6(transitive)
+ Addedtar@6.1.2(transitive)
- Removed@node-red/registry@1.3.5(transitive)
- Removed@node-red/util@1.3.5(transitive)
- Removedtar@6.1.0(transitive)
Updated@node-red/registry@1.3.6
Updated@node-red/util@1.3.6