refactor(editor): Migrate nodeBase mixin to composable (no-changelog) (#9742)

This commit is contained in:
Alex Grozav
2024-06-18 16:35:26 +03:00
committed by GitHub
parent c58621ab79
commit b0d7cfa2ab
6 changed files with 1015 additions and 702 deletions

View File

@@ -10,7 +10,7 @@ import aiNodeTypesJson from '../../../@n8n/nodes-langchain/dist/types/nodes.json
const allNodeTypes = [...nodeTypesJson, ...aiNodeTypesJson];
function findNodeWithName(name: string): INodeTypeDescription {
export function findNodeTypeDescriptionByName(name: string): INodeTypeDescription {
return allNodeTypes.find((node) => node.name === name) as INodeTypeDescription;
}
@@ -18,25 +18,25 @@ export const testingNodeTypes: INodeTypeData = {
[MANUAL_TRIGGER_NODE_TYPE]: {
sourcePath: '',
type: {
description: findNodeWithName(MANUAL_TRIGGER_NODE_TYPE),
description: findNodeTypeDescriptionByName(MANUAL_TRIGGER_NODE_TYPE),
},
},
[SET_NODE_TYPE]: {
sourcePath: '',
type: {
description: findNodeWithName(SET_NODE_TYPE),
description: findNodeTypeDescriptionByName(SET_NODE_TYPE),
},
},
[CHAT_TRIGGER_NODE_TYPE]: {
sourcePath: '',
type: {
description: findNodeWithName(CHAT_TRIGGER_NODE_TYPE),
description: findNodeTypeDescriptionByName(CHAT_TRIGGER_NODE_TYPE),
},
},
[AGENT_NODE_TYPE]: {
sourcePath: '',
type: {
description: findNodeWithName(AGENT_NODE_TYPE),
description: findNodeTypeDescriptionByName(AGENT_NODE_TYPE),
},
},
};