Rename function and fix styling

This commit is contained in:
Jan Oberhauser 2019-10-20 21:42:34 +02:00
parent f0c75ec9b7
commit e3b71c2ed4
4 changed files with 14 additions and 10 deletions

View file

@ -17,13 +17,13 @@ import {
import {
IDataObject,
INodeParameters,
IRun,
ITaskData,
IWorkflowCredentials,
IWorkflowExecuteAdditionalData,
IWorkflowExecuteHooks,
WorkflowExecuteMode,
INodeParameters,
} from 'n8n-workflow';
import * as config from '../config';
@ -264,7 +264,7 @@ export async function getBase(mode: WorkflowExecuteMode, credentials: IWorkflowC
timezone,
webhookBaseUrl,
webhookTestBaseUrl,
currentNodeParameters
currentNodeParameters,
};
}

View file

@ -513,12 +513,15 @@ export function getLoadOptionsFunctions(workflow: Workflow, node: INode, additio
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
return getCredentials(workflow, node, type, additionalData);
},
getCurrentNodeParameters : (parameterName : string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object => {
getCurrentNodeParameter: (parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object | undefined => {
const nodeParameters = JSON.parse('' + additionalData.currentNodeParameters);
if (nodeParameters && nodeParameters[parameterName]) {
return nodeParameters[parameterName];
}
return false;
return undefined;
},
getCurrentNodeParameters: (): INodeParameters | undefined => {
return JSON.parse('' + additionalData.currentNodeParameters);
},
getNodeParameter: (parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object => { //tslint:disable-line:no-any
const runExecutionData: IRunExecutionData | null = null;

View file

@ -181,7 +181,8 @@ export interface IExecuteSingleFunctions {
export interface ILoadOptionsFunctions {
getCredentials(type: string): ICredentialDataDecryptedObject | undefined;
getNodeParameter(parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
getCurrentNodeParameters(parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
getCurrentNodeParameter(parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object | undefined;
getCurrentNodeParameters(): INodeParameters | undefined;
getTimezone(): string;
helpers: {
[key: string]: ((...args: any[]) => any) | undefined; //tslint:disable-line:no-any