refactor: Use NodeConnectionType consistently across the code base (no-changelog) (#10595)

This commit is contained in:
Ricardo Espinoza
2024-08-29 09:55:53 -04:00
committed by GitHub
parent 1491cbd228
commit c4eb3746d7
521 changed files with 2259 additions and 1999 deletions

View File

@@ -38,7 +38,6 @@ import { extension, lookup } from 'mime-types';
import type {
BinaryHelperFunctions,
CloseFunction,
ConnectionTypes,
ContextType,
EventNamesAiNodesType,
FieldType,
@@ -105,6 +104,7 @@ import type {
SchedulingFunctions,
} from 'n8n-workflow';
import {
NodeConnectionType,
ExpressionError,
LoggerProxy as Logger,
NodeApiError,
@@ -2623,13 +2623,13 @@ const addExecutionDataFunctions = async (
nodeName: string,
data: INodeExecutionData[][] | ExecutionBaseError,
runExecutionData: IRunExecutionData,
connectionType: ConnectionTypes,
connectionType: NodeConnectionType,
additionalData: IWorkflowExecuteAdditionalData,
sourceNodeName: string,
sourceNodeRunIndex: number,
currentNodeRunIndex: number,
): Promise<void> => {
if (connectionType === 'main') {
if (connectionType === NodeConnectionType.Main) {
throw new ApplicationError('Setting type is not supported for main connection', {
extra: { type },
});
@@ -2732,7 +2732,7 @@ async function getInputConnectionData(
executeData: IExecuteData | undefined,
mode: WorkflowExecuteMode,
closeFunctions: CloseFunction[],
inputName: ConnectionTypes,
inputName: NodeConnectionType,
itemIndex: number,
): Promise<unknown> {
const node = this.getNode();
@@ -3676,7 +3676,7 @@ export function getExecuteFunctions(
},
async getInputConnectionData(
inputName: ConnectionTypes,
inputName: NodeConnectionType,
itemIndex: number,
): Promise<unknown> {
return await getInputConnectionData.call(
@@ -3817,7 +3817,7 @@ export function getExecuteFunctions(
},
addInputData(
connectionType: ConnectionTypes,
connectionType: NodeConnectionType,
data: INodeExecutionData[][] | ExecutionBaseError,
): { index: number } {
const nodeName = this.getNode().name;
@@ -3847,7 +3847,7 @@ export function getExecuteFunctions(
return { index: currentNodeRunIndex };
},
addOutputData(
connectionType: ConnectionTypes,
connectionType: NodeConnectionType,
currentNodeRunIndex: number,
data: INodeExecutionData[][] | ExecutionBaseError,
): void {
@@ -4238,7 +4238,7 @@ export function getExecuteWebhookFunctions(
return additionalData.httpRequest.headers;
},
async getInputConnectionData(
inputName: ConnectionTypes,
inputName: NodeConnectionType,
itemIndex: number,
): Promise<unknown> {
// To be able to use expressions like "$json.sessionId" set the