mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Migrate NodeConnectionType to const object type (no-changelog) (#14078)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -3,7 +3,8 @@ import { DateTime, Duration, Interval } from 'luxon';
|
||||
import { ensureError } from '@/errors/ensure-error';
|
||||
import { ExpressionError } from '@/errors/expression.error';
|
||||
import {
|
||||
NodeConnectionType,
|
||||
NodeConnectionTypes,
|
||||
type NodeConnectionType,
|
||||
type IExecuteData,
|
||||
type INode,
|
||||
type IPinData,
|
||||
@@ -38,7 +39,7 @@ const getProxyFromFixture = (
|
||||
) => {
|
||||
const taskData = run?.data.resultData.runData[activeNode]?.[opts?.runIndex ?? 0];
|
||||
const lastNodeConnectionInputData =
|
||||
taskData?.data?.[opts?.connectionType ?? NodeConnectionType.Main]?.[0];
|
||||
taskData?.data?.[opts?.connectionType ?? NodeConnectionTypes.Main]?.[0];
|
||||
|
||||
let executeData: IExecuteData | undefined;
|
||||
|
||||
@@ -47,7 +48,7 @@ const getProxyFromFixture = (
|
||||
data: taskData.data!,
|
||||
node: workflow.nodes.find((node) => node.name === activeNode) as INode,
|
||||
source: {
|
||||
[opts?.connectionType ?? NodeConnectionType.Main]: taskData.source,
|
||||
[opts?.connectionType ?? NodeConnectionTypes.Main]: taskData.source,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -519,7 +520,7 @@ describe('WorkflowDataProxy', () => {
|
||||
const fixture = loadFixture('from_ai_multiple_items');
|
||||
const getFromAIProxy = (runIndex = 0) =>
|
||||
getProxyFromFixture(fixture.workflow, fixture.run, 'Google Sheets1', 'manual', {
|
||||
connectionType: NodeConnectionType.AiTool,
|
||||
connectionType: NodeConnectionTypes.AiTool,
|
||||
throwOnMissingExecutionData: false,
|
||||
runIndex,
|
||||
});
|
||||
@@ -555,7 +556,7 @@ describe('WorkflowDataProxy', () => {
|
||||
describe('$rawParameter', () => {
|
||||
const fixture = loadFixture('rawParameter');
|
||||
const proxy = getProxyFromFixture(fixture.workflow, fixture.run, 'Execute Workflow', 'manual', {
|
||||
connectionType: NodeConnectionType.Main,
|
||||
connectionType: NodeConnectionTypes.Main,
|
||||
throwOnMissingExecutionData: false,
|
||||
runIndex: 0,
|
||||
});
|
||||
@@ -582,7 +583,7 @@ describe('WorkflowDataProxy', () => {
|
||||
'Execute Workflow',
|
||||
'manual',
|
||||
{
|
||||
connectionType: NodeConnectionType.Main,
|
||||
connectionType: NodeConnectionTypes.Main,
|
||||
throwOnMissingExecutionData: false,
|
||||
runIndex: 0,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user