feat(editor): Change default node names depending on node operation and resource (#15954)

This commit is contained in:
Charlie Kolb
2025-06-10 08:50:46 +02:00
committed by GitHub
parent 33f8fab791
commit c92701cbdf
21 changed files with 574 additions and 182 deletions

View File

@@ -562,6 +562,11 @@ describe('ManualExecutionService', () => {
return null;
}),
getTriggerNodes: jest.fn().mockReturnValue([determinedStartNode]),
nodeTypes: {
getByNameAndVersion: jest
.fn()
.mockReturnValue({ description: { name: '', outputs: [] } }),
},
});
jest

View File

@@ -6,10 +6,9 @@ import {
filterDisabledNodes,
recreateNodeExecutionStack,
WorkflowExecute,
isTool,
rewireGraph,
} from 'n8n-core';
import { MANUAL_TRIGGER_NODE_TYPE } from 'n8n-workflow';
import { MANUAL_TRIGGER_NODE_TYPE, NodeHelpers } from 'n8n-workflow';
import type {
IExecuteData,
IPinData,
@@ -136,8 +135,12 @@ export class ManualExecutionService {
`Could not find a node named "${data.destinationNode}" in the workflow.`,
);
const destinationNodeType = workflow.nodeTypes.getByNameAndVersion(
destinationNode.type,
destinationNode.typeVersion,
);
// Rewire graph to be able to execute the destination tool node
if (isTool(destinationNode, workflow.nodeTypes)) {
if (NodeHelpers.isTool(destinationNodeType.description, destinationNode.parameters)) {
const graph = rewireGraph(
destinationNode,
DirectedGraph.fromWorkflow(workflow),