Make special variables like $node, $parameter, ... accessible

in Function Nodes
This commit is contained in:
Jan Oberhauser
2019-09-04 14:53:39 +02:00
parent c1e753e9d1
commit 48ccb36536
5 changed files with 37 additions and 6 deletions

View File

@@ -1,8 +1,9 @@
import {
IDataObject,
INodeExecutionData,
NodeHelpers,
IRunExecutionData,
IWorkflowDataProxyData,
NodeHelpers,
Workflow,
} from './';
@@ -184,12 +185,12 @@ export class WorkflowDataProxy {
return executionData[that.itemIndex].json;
} else if (name === 'binary') {
// Binary-Data
if (!executionData[that.itemIndex].binary) {
throw new Error(`No binary data for node "${nodeName}" has been found!`);
}
const returnData: IDataObject = {};
if (!executionData[that.itemIndex].binary) {
return returnData;
}
const binaryKeyData = executionData[that.itemIndex].binary!;
for (const keyName of Object.keys(binaryKeyData)) {
@@ -263,7 +264,7 @@ export class WorkflowDataProxy {
* @returns
* @memberof WorkflowDataGetter
*/
getDataProxy() {
getDataProxy(): IWorkflowDataProxyData {
const that = this;
const base = {