Add Flow.getSetting for resolving env-var properties

This lays the groundwork for subflow-specific settings
This commit is contained in:
Nick O'Leary
2019-01-16 22:38:04 +00:00
parent 81f4e0de56
commit 6286b34d00
6 changed files with 38 additions and 15 deletions

View File

@@ -300,7 +300,7 @@ describe('Flow', function() {
{id:"5",x:10,y:10,z:"t1",type:"test",foo:"$(NODE_RED_TEST_VALUE_NONE)",wires:[]},
{id:"6",x:10,y:10,z:"t1",type:"test",foo:["$(NODE_RED_TEST_VALUE)"],wires:[]}
]);
var flow = Flow.create({},config,config.flows["t1"]);
var flow = Flow.create({getSetting:v=>process.env[v]},config,config.flows["t1"]);
flow.start();
var activeNodes = flow.getActiveNodes();