mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 04:10:01 +00:00
refactor: Use NodeConnectionType consistently across the code base (no-changelog) (#10595)
This commit is contained in:
@@ -74,7 +74,6 @@ import type {
|
||||
ITelemetryTrackProperties,
|
||||
IWorkflowBase,
|
||||
Workflow,
|
||||
ConnectionTypes,
|
||||
INodeOutputConfiguration,
|
||||
IRun,
|
||||
} from 'n8n-workflow';
|
||||
@@ -2289,7 +2288,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
let outputs: Array<ConnectionTypes | INodeOutputConfiguration> = [];
|
||||
let outputs: Array<NodeConnectionType | INodeOutputConfiguration> = [];
|
||||
try {
|
||||
// It fails when the outputs are an expression. As those nodes have
|
||||
// normally no outputs by default and the only reason we need the
|
||||
@@ -2424,7 +2423,7 @@ export default defineComponent({
|
||||
sourceNodeOutputIndex: number,
|
||||
targetNodeName: string,
|
||||
targetNodeOuputIndex: number,
|
||||
type: ConnectionTypes,
|
||||
type: NodeConnectionType,
|
||||
): IConnection | undefined {
|
||||
const nodeConnections =
|
||||
this.workflowsStore.outgoingConnectionsByNodeName(sourceNodeName)[type];
|
||||
@@ -2531,7 +2530,7 @@ export default defineComponent({
|
||||
lastSelectedEndpoint.scope as NodeConnectionType,
|
||||
)
|
||||
) {
|
||||
const connectionType = lastSelectedEndpoint.scope as ConnectionTypes;
|
||||
const connectionType = lastSelectedEndpoint.scope as NodeConnectionType;
|
||||
const newNodeElement = this.instance.getManagedElement(newNodeData.id);
|
||||
const newNodeConnections = this.instance.getEndpoints(newNodeElement);
|
||||
const viableConnection = newNodeConnections.find((conn) => {
|
||||
@@ -2712,7 +2711,7 @@ export default defineComponent({
|
||||
if (targetNodeType?.inputs?.length) {
|
||||
const workflow = this.workflowHelpers.getCurrentWorkflow();
|
||||
const workflowNode = workflow.getNode(targetNode.name);
|
||||
let inputs: Array<ConnectionTypes | INodeInputConfiguration> = [];
|
||||
let inputs: Array<NodeConnectionType | INodeInputConfiguration> = [];
|
||||
if (targetNodeType && workflowNode) {
|
||||
inputs = NodeHelpers.getNodeInputs(workflow, workflowNode, targetNodeType);
|
||||
}
|
||||
@@ -3106,7 +3105,7 @@ export default defineComponent({
|
||||
NodeViewUtils.hideConnectionActions(connection);
|
||||
NodeViewUtils.resetConnection(connection);
|
||||
|
||||
const scope = connection.scope as ConnectionTypes;
|
||||
const scope = connection.scope as NodeConnectionType;
|
||||
const scopedEndpoints = Array.from(
|
||||
document.querySelectorAll(`[data-jtk-scope-${scope}=true]`),
|
||||
);
|
||||
@@ -3609,8 +3608,8 @@ export default defineComponent({
|
||||
|
||||
const workflow = this.workflowHelpers.getCurrentWorkflow();
|
||||
const workflowNode = workflow.getNode(node.name);
|
||||
let inputs: Array<ConnectionTypes | INodeInputConfiguration> = [];
|
||||
let outputs: Array<ConnectionTypes | INodeOutputConfiguration> = [];
|
||||
let inputs: Array<NodeConnectionType | INodeInputConfiguration> = [];
|
||||
let outputs: Array<NodeConnectionType | INodeOutputConfiguration> = [];
|
||||
if (nodeType && workflowNode) {
|
||||
inputs = NodeHelpers.getNodeInputs(workflow, workflowNode, nodeType);
|
||||
outputs = NodeHelpers.getNodeOutputs(workflow, workflowNode, nodeType);
|
||||
|
||||
Reference in New Issue
Block a user