refactor(core): Move webhook repository to @n8n/db (#15318)

This commit is contained in:
Iván Ovejero
2025-05-12 17:30:59 +02:00
committed by GitHub
parent d683a54da0
commit b2d8a1cb10
4 changed files with 5 additions and 3 deletions

View File

@@ -1,10 +0,0 @@
import { WebhookEntity } from '@n8n/db';
import { Service } from '@n8n/di';
import { DataSource, Repository } from '@n8n/typeorm';
@Service()
export class WebhookRepository extends Repository<WebhookEntity> {
constructor(dataSource: DataSource) {
super(WebhookEntity, dataSource.manager);
}
}

View File

@@ -1,11 +1,11 @@
import { WebhookEntity } from '@n8n/db';
import type { WebhookRepository } from '@n8n/db';
import { mock } from 'jest-mock-extended';
import type { INode, INodeType, IWebhookData, IWorkflowExecuteAdditionalData } from 'n8n-workflow';
import { Workflow } from 'n8n-workflow';
import { v4 as uuid } from 'uuid';
import config from '@/config';
import type { WebhookRepository } from '@/databases/repositories/webhook.repository';
import type { NodeTypes } from '@/node-types';
import type { CacheService } from '@/services/cache/cache.service';
import { WebhookService } from '@/webhooks/webhook.service';

View File

@@ -1,4 +1,5 @@
import type { WebhookEntity } from '@n8n/db';
import { WebhookRepository } from '@n8n/db';
import { Service } from '@n8n/di';
import { HookContext, WebhookContext, Logger } from 'n8n-core';
import { Node, NodeHelpers, UnexpectedError } from 'n8n-workflow';
@@ -15,7 +16,6 @@ import type {
WorkflowExecuteMode,
} from 'n8n-workflow';
import { WebhookRepository } from '@/databases/repositories/webhook.repository';
import { NodeTypes } from '@/node-types';
import { CacheService } from '@/services/cache/cache.service';