refactor(core): Use IWorkflowBase over WorkflowEntity in most places (#13225)

This commit is contained in:
Tomi Turtiainen
2025-02-13 10:54:11 +02:00
committed by GitHub
parent 11cf1cd23a
commit f001edb2a2
54 changed files with 190 additions and 192 deletions

View File

@@ -2,12 +2,11 @@ import { Container } from '@n8n/di';
import { mock } from 'jest-mock-extended';
import { Logger } from 'n8n-core';
import { NodeApiError, Workflow } from 'n8n-workflow';
import type { IWebhookData, WorkflowActivateMode } from 'n8n-workflow';
import type { IWebhookData, IWorkflowBase, WorkflowActivateMode } from 'n8n-workflow';
import { ActiveExecutions } from '@/active-executions';
import { ActiveWorkflowManager } from '@/active-workflow-manager';
import type { WebhookEntity } from '@/databases/entities/webhook-entity';
import type { WorkflowEntity } from '@/databases/entities/workflow-entity';
import { ExecutionService } from '@/executions/execution.service';
import { ExternalHooks } from '@/external-hooks';
import { NodeTypes } from '@/node-types';
@@ -36,8 +35,8 @@ const externalHooks = mockInstance(ExternalHooks);
let activeWorkflowManager: ActiveWorkflowManager;
let createActiveWorkflow: () => Promise<WorkflowEntity>;
let createInactiveWorkflow: () => Promise<WorkflowEntity>;
let createActiveWorkflow: () => Promise<IWorkflowBase>;
let createInactiveWorkflow: () => Promise<IWorkflowBase>;
beforeAll(async () => {
await testDb.init();