mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
;zap: Missing change for $mode
This commit is contained in:
parent
5398a06ff2
commit
5b371ce994
|
@ -299,7 +299,7 @@ export function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExe
|
||||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||||
* @returns {(ICredentialDataDecryptedObject | undefined)}
|
* @returns {(ICredentialDataDecryptedObject | undefined)}
|
||||||
*/
|
*/
|
||||||
export function getCredentials(workflow: Workflow, node: INode, type: string, additionalData: IWorkflowExecuteAdditionalData, runExecutionData?: IRunExecutionData | null, runIndex?: number, connectionInputData?: INodeExecutionData[], itemIndex?: number): ICredentialDataDecryptedObject | undefined {
|
export function getCredentials(workflow: Workflow, node: INode, type: string, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, runExecutionData?: IRunExecutionData | null, runIndex?: number, connectionInputData?: INodeExecutionData[], itemIndex?: number): ICredentialDataDecryptedObject | undefined {
|
||||||
|
|
||||||
// Get the NodeType as it has the information if the credentials are required
|
// Get the NodeType as it has the information if the credentials are required
|
||||||
const nodeType = workflow.nodeTypes.getByName(node.type);
|
const nodeType = workflow.nodeTypes.getByName(node.type);
|
||||||
|
@ -353,7 +353,7 @@ export function getCredentials(workflow: Workflow, node: INode, type: string, ad
|
||||||
|
|
||||||
const name = node.credentials[type];
|
const name = node.credentials[type];
|
||||||
|
|
||||||
const decryptedDataObject = additionalData.credentialsHelper.getDecrypted(name, type, false, expressionResolveValues);
|
const decryptedDataObject = additionalData.credentialsHelper.getDecrypted(name, type, mode, false, expressionResolveValues);
|
||||||
|
|
||||||
return decryptedDataObject;
|
return decryptedDataObject;
|
||||||
}
|
}
|
||||||
|
@ -538,7 +538,7 @@ export function getExecutePollFunctions(workflow: Workflow, node: INode, additio
|
||||||
throw new Error('Overwrite NodeExecuteFunctions.getExecutePullFunctions.__emit function!');
|
throw new Error('Overwrite NodeExecuteFunctions.getExecutePullFunctions.__emit function!');
|
||||||
},
|
},
|
||||||
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
||||||
return getCredentials(workflow, node, type, additionalData);
|
return getCredentials(workflow, node, type, additionalData, mode);
|
||||||
},
|
},
|
||||||
getMode: (): WorkflowExecuteMode => {
|
getMode: (): WorkflowExecuteMode => {
|
||||||
return mode;
|
return mode;
|
||||||
|
@ -601,7 +601,7 @@ export function getExecuteTriggerFunctions(workflow: Workflow, node: INode, addi
|
||||||
throw new Error('Overwrite NodeExecuteFunctions.getExecuteTriggerFunctions.emit function!');
|
throw new Error('Overwrite NodeExecuteFunctions.getExecuteTriggerFunctions.emit function!');
|
||||||
},
|
},
|
||||||
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
||||||
return getCredentials(workflow, node, type, additionalData);
|
return getCredentials(workflow, node, type, additionalData, mode);
|
||||||
},
|
},
|
||||||
getNode: () => {
|
getNode: () => {
|
||||||
return getNode(node);
|
return getNode(node);
|
||||||
|
@ -676,7 +676,7 @@ export function getExecuteFunctions(workflow: Workflow, runExecutionData: IRunEx
|
||||||
return NodeHelpers.getContext(runExecutionData, type, node);
|
return NodeHelpers.getContext(runExecutionData, type, node);
|
||||||
},
|
},
|
||||||
getCredentials(type: string, itemIndex?: number): ICredentialDataDecryptedObject | undefined {
|
getCredentials(type: string, itemIndex?: number): ICredentialDataDecryptedObject | undefined {
|
||||||
return getCredentials(workflow, node, type, additionalData, runExecutionData, runIndex, connectionInputData, itemIndex);
|
return getCredentials(workflow, node, type, additionalData, mode, runExecutionData, runIndex, connectionInputData, itemIndex);
|
||||||
},
|
},
|
||||||
getInputData: (inputIndex = 0, inputName = 'main') => {
|
getInputData: (inputIndex = 0, inputName = 'main') => {
|
||||||
|
|
||||||
|
@ -771,7 +771,7 @@ export function getExecuteSingleFunctions(workflow: Workflow, runExecutionData:
|
||||||
return NodeHelpers.getContext(runExecutionData, type, node);
|
return NodeHelpers.getContext(runExecutionData, type, node);
|
||||||
},
|
},
|
||||||
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
||||||
return getCredentials(workflow, node, type, additionalData, runExecutionData, runIndex, connectionInputData, itemIndex);
|
return getCredentials(workflow, node, type, additionalData, mode, runExecutionData, runIndex, connectionInputData, itemIndex);
|
||||||
},
|
},
|
||||||
getInputData: (inputIndex = 0, inputName = 'main') => {
|
getInputData: (inputIndex = 0, inputName = 'main') => {
|
||||||
if (!inputData.hasOwnProperty(inputName)) {
|
if (!inputData.hasOwnProperty(inputName)) {
|
||||||
|
@ -851,7 +851,7 @@ export function getLoadOptionsFunctions(workflow: Workflow, node: INode, additio
|
||||||
return ((workflow: Workflow, node: INode) => {
|
return ((workflow: Workflow, node: INode) => {
|
||||||
const that = {
|
const that = {
|
||||||
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
||||||
return getCredentials(workflow, node, type, additionalData);
|
return getCredentials(workflow, node, type, additionalData, 'internal');
|
||||||
},
|
},
|
||||||
getCurrentNodeParameter: (parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object | undefined => {
|
getCurrentNodeParameter: (parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object | undefined => {
|
||||||
const nodeParameters = additionalData.currentNodeParameters;
|
const nodeParameters = additionalData.currentNodeParameters;
|
||||||
|
@ -910,7 +910,7 @@ export function getExecuteHookFunctions(workflow: Workflow, node: INode, additio
|
||||||
return ((workflow: Workflow, node: INode) => {
|
return ((workflow: Workflow, node: INode) => {
|
||||||
const that = {
|
const that = {
|
||||||
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
||||||
return getCredentials(workflow, node, type, additionalData);
|
return getCredentials(workflow, node, type, additionalData, mode);
|
||||||
},
|
},
|
||||||
getMode: (): WorkflowExecuteMode => {
|
getMode: (): WorkflowExecuteMode => {
|
||||||
return mode;
|
return mode;
|
||||||
|
@ -984,7 +984,7 @@ export function getExecuteWebhookFunctions(workflow: Workflow, node: INode, addi
|
||||||
return additionalData.httpRequest.body;
|
return additionalData.httpRequest.body;
|
||||||
},
|
},
|
||||||
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
getCredentials(type: string): ICredentialDataDecryptedObject | undefined {
|
||||||
return getCredentials(workflow, node, type, additionalData);
|
return getCredentials(workflow, node, type, additionalData, mode);
|
||||||
},
|
},
|
||||||
getHeaderData(): object {
|
getHeaderData(): object {
|
||||||
if (additionalData.httpRequest === undefined) {
|
if (additionalData.httpRequest === undefined) {
|
||||||
|
|
Loading…
Reference in a new issue