mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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
@@ -9,7 +9,7 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import type express from 'express';
|
||||
import get from 'lodash/get';
|
||||
import { BinaryDataService, ErrorReporter, NodeExecuteFunctions } from 'n8n-core';
|
||||
import { BinaryDataService, ErrorReporter } from 'n8n-core';
|
||||
import type {
|
||||
IBinaryData,
|
||||
IBinaryKeyData,
|
||||
@@ -35,7 +35,6 @@ import {
|
||||
createDeferredPromise,
|
||||
ExecutionCancelledError,
|
||||
FORM_NODE_TYPE,
|
||||
NodeHelpers,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
import { finished } from 'stream/promises';
|
||||
@@ -57,6 +56,7 @@ import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-da
|
||||
import * as WorkflowHelpers from '@/workflow-helpers';
|
||||
import { WorkflowRunner } from '@/workflow-runner';
|
||||
|
||||
import { WebhookService } from './webhook.service';
|
||||
import type { IWebhookResponseCallbackData, WebhookRequest } from './webhook.types';
|
||||
|
||||
/**
|
||||
@@ -88,7 +88,12 @@ export function getWorkflowWebhooks(
|
||||
}
|
||||
returnData.push.apply(
|
||||
returnData,
|
||||
NodeHelpers.getNodeWebhooks(workflow, node, additionalData, ignoreRestartWebhooks),
|
||||
Container.get(WebhookService).getNodeWebhooks(
|
||||
workflow,
|
||||
node,
|
||||
additionalData,
|
||||
ignoreRestartWebhooks,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -254,11 +259,11 @@ export async function executeWebhook(
|
||||
}
|
||||
|
||||
try {
|
||||
webhookResultData = await workflow.runWebhook(
|
||||
webhookResultData = await Container.get(WebhookService).runWebhook(
|
||||
workflow,
|
||||
webhookData,
|
||||
workflowStartNode,
|
||||
additionalData,
|
||||
NodeExecuteFunctions,
|
||||
executionMode,
|
||||
runExecutionData ?? null,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user