evaluate env var after path initialization

This commit is contained in:
Hiroyasu Nishiyama 2022-02-15 14:23:01 +09:00
parent bffb91f196
commit 6a41cbebc9
1 changed files with 6 additions and 5 deletions

View File

@ -77,15 +77,16 @@ function createNode(flow,config) {
if (typeof nodeTypeConstructor === "function") {
var conf = clone(config);
delete conf.credentials;
for (var p in conf) {
if (conf.hasOwnProperty(p)) {
mapEnvVarProperties(conf,p,flow,conf);
}
}
try {
Object.defineProperty(conf,'_module', {value: typeRegistry.getNodeInfo(type), enumerable: false, writable: true })
Object.defineProperty(conf,'_flow', {value: flow, enumerable: false, writable: true })
Object.defineProperty(conf,'_path', {value: `${flow.path}/${config._alias||config.id}`, enumerable: false, writable: true })
for (var p in conf) {
if (conf.hasOwnProperty(p)) {
mapEnvVarProperties(conf,p,flow,conf);
}
}
newNode = new nodeTypeConstructor(conf);
} catch (err) {
Log.log({