Add first basic code for external hooks

This commit is contained in:
Jan Oberhauser
2020-05-04 08:56:01 +02:00
parent 582ff76799
commit a380a9a394
7 changed files with 126 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import {
ActiveWorkflowRunner,
CredentialTypes,
Db,
ExternalHooks,
GenericHelpers,
LoadNodesAndCredentials,
NodeTypes,
@@ -108,6 +109,12 @@ export class Start extends Command {
const loadNodesAndCredentials = LoadNodesAndCredentials();
await loadNodesAndCredentials.init();
// Load all external hooks
const externalHooks = ExternalHooks();
await externalHooks.init();
// await externalHooks.run('credentials.new');
// Add the found types to an instance other parts of the application can use
const nodeTypes = NodeTypes();
await nodeTypes.init(loadNodesAndCredentials.nodeTypes);