mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move execution engine code out of n8n-workflow (no-changelog) (#12147)
This commit is contained in:
committed by
GitHub
parent
73f0c4cca9
commit
5a055ed526
@@ -24,7 +24,7 @@ import { predefinedNodesTypes } from './constants';
|
||||
const BASE_DIR = path.resolve(__dirname, '../../..');
|
||||
|
||||
class NodeTypesClass implements INodeTypes {
|
||||
constructor(private nodeTypes: INodeTypeData = predefinedNodesTypes) {}
|
||||
constructor(private nodeTypes: INodeTypeData) {}
|
||||
|
||||
getByName(nodeType: string): INodeType | IVersionedNodeType {
|
||||
return this.nodeTypes[nodeType].type;
|
||||
@@ -41,7 +41,7 @@ class NodeTypesClass implements INodeTypes {
|
||||
|
||||
let nodeTypesInstance: NodeTypesClass | undefined;
|
||||
|
||||
export function NodeTypes(nodeTypes?: INodeTypeData): INodeTypes {
|
||||
export function NodeTypes(nodeTypes: INodeTypeData = predefinedNodesTypes): INodeTypes {
|
||||
if (nodeTypesInstance === undefined || nodeTypes !== undefined) {
|
||||
nodeTypesInstance = new NodeTypesClass(nodeTypes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user