mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Use NodeConnectionType consistently across the code base (no-changelog) (#10595)
This commit is contained in:
@@ -35,7 +35,6 @@ import type {
|
||||
IWorkflowExecuteAdditionalData,
|
||||
NodeParameterValue,
|
||||
ResourceMapperValue,
|
||||
ConnectionTypes,
|
||||
INodeTypeDescription,
|
||||
INodeOutputConfiguration,
|
||||
INodeInputConfiguration,
|
||||
@@ -1245,8 +1244,8 @@ export function getNodeWebhookUrl(
|
||||
}
|
||||
|
||||
export function getConnectionTypes(
|
||||
connections: Array<ConnectionTypes | INodeInputConfiguration | INodeOutputConfiguration>,
|
||||
): ConnectionTypes[] {
|
||||
connections: Array<NodeConnectionType | INodeInputConfiguration | INodeOutputConfiguration>,
|
||||
): NodeConnectionType[] {
|
||||
return connections
|
||||
.map((connection) => {
|
||||
if (typeof connection === 'string') {
|
||||
@@ -1261,7 +1260,7 @@ export function getNodeInputs(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
nodeTypeData: INodeTypeDescription,
|
||||
): Array<ConnectionTypes | INodeInputConfiguration> {
|
||||
): Array<NodeConnectionType | INodeInputConfiguration> {
|
||||
if (Array.isArray(nodeTypeData?.inputs)) {
|
||||
return nodeTypeData.inputs;
|
||||
}
|
||||
@@ -1273,7 +1272,7 @@ export function getNodeInputs(
|
||||
nodeTypeData.inputs,
|
||||
'internal',
|
||||
{},
|
||||
) || []) as ConnectionTypes[];
|
||||
) || []) as NodeConnectionType[];
|
||||
} catch (e) {
|
||||
console.warn('Could not calculate inputs dynamically for node: ', node.name);
|
||||
return [];
|
||||
@@ -1353,8 +1352,8 @@ export function getNodeOutputs(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
nodeTypeData: INodeTypeDescription,
|
||||
): Array<ConnectionTypes | INodeOutputConfiguration> {
|
||||
let outputs: Array<ConnectionTypes | INodeOutputConfiguration> = [];
|
||||
): Array<NodeConnectionType | INodeOutputConfiguration> {
|
||||
let outputs: Array<NodeConnectionType | INodeOutputConfiguration> = [];
|
||||
|
||||
if (Array.isArray(nodeTypeData.outputs)) {
|
||||
outputs = nodeTypeData.outputs;
|
||||
@@ -1366,7 +1365,7 @@ export function getNodeOutputs(
|
||||
nodeTypeData.outputs,
|
||||
'internal',
|
||||
{},
|
||||
) || []) as ConnectionTypes[];
|
||||
) || []) as NodeConnectionType[];
|
||||
} catch (e) {
|
||||
console.warn('Could not calculate outputs dynamically for node: ', node.name);
|
||||
}
|
||||
@@ -1389,7 +1388,7 @@ export function getNodeOutputs(
|
||||
...outputs,
|
||||
{
|
||||
category: 'error',
|
||||
type: 'main',
|
||||
type: NodeConnectionType.Main,
|
||||
displayName: 'Error',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user