mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
ci(core): Reduce memory usage in tests (part-2) (no-changelog) (#7671)
This also gets rid of `Db.collection`, which was another source of circular dependencies.
This commit is contained in:
committed by
GitHub
parent
37dd658dc5
commit
000e76e3b4
@@ -30,7 +30,7 @@ import type { ActiveWorkflowRunner } from '@/ActiveWorkflowRunner';
|
||||
import type { WorkflowExecute } from 'n8n-core';
|
||||
|
||||
import type PCancelable from 'p-cancelable';
|
||||
import type { FindOperator, Repository } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
|
||||
import type { ChildProcess } from 'child_process';
|
||||
|
||||
@@ -40,26 +40,10 @@ import type { Role } from '@db/entities/Role';
|
||||
import type { SharedCredentials } from '@db/entities/SharedCredentials';
|
||||
import type { TagEntity } from '@db/entities/TagEntity';
|
||||
import type { User } from '@db/entities/User';
|
||||
import type {
|
||||
AuthIdentityRepository,
|
||||
AuthProviderSyncHistoryRepository,
|
||||
CredentialsRepository,
|
||||
EventDestinationsRepository,
|
||||
ExecutionDataRepository,
|
||||
ExecutionMetadataRepository,
|
||||
ExecutionRepository,
|
||||
InstalledNodesRepository,
|
||||
InstalledPackagesRepository,
|
||||
RoleRepository,
|
||||
SettingsRepository,
|
||||
SharedCredentialsRepository,
|
||||
SharedWorkflowRepository,
|
||||
UserRepository,
|
||||
VariablesRepository,
|
||||
WorkflowRepository,
|
||||
WorkflowStatisticsRepository,
|
||||
WorkflowTagMappingRepository,
|
||||
} from '@db/repositories';
|
||||
import type { CredentialsRepository } from '@db/repositories/credentials.repository';
|
||||
import type { SettingsRepository } from '@db/repositories/settings.repository';
|
||||
import type { UserRepository } from '@db/repositories/user.repository';
|
||||
import type { WorkflowRepository } from '@db/repositories/workflow.repository';
|
||||
import type { LICENSE_FEATURES, LICENSE_QUOTAS } from './constants';
|
||||
import type { WorkflowWithSharingsAndCredentials } from './workflows/workflows.types';
|
||||
|
||||
@@ -71,33 +55,6 @@ export interface ICredentialsOverwrite {
|
||||
[key: string]: ICredentialDataDecryptedObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @important Do not add to these collections. Inject the repository as a dependency instead.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
export interface IDatabaseCollections extends Record<string, Repository<any>> {
|
||||
AuthIdentity: AuthIdentityRepository;
|
||||
AuthProviderSyncHistory: AuthProviderSyncHistoryRepository;
|
||||
Credentials: CredentialsRepository;
|
||||
EventDestinations: EventDestinationsRepository;
|
||||
Execution: ExecutionRepository;
|
||||
ExecutionData: ExecutionDataRepository;
|
||||
ExecutionMetadata: ExecutionMetadataRepository;
|
||||
InstalledNodes: InstalledNodesRepository;
|
||||
InstalledPackages: InstalledPackagesRepository;
|
||||
Role: RoleRepository;
|
||||
Settings: SettingsRepository;
|
||||
SharedCredentials: SharedCredentialsRepository;
|
||||
SharedWorkflow: SharedWorkflowRepository;
|
||||
User: UserRepository;
|
||||
Variables: VariablesRepository;
|
||||
Workflow: WorkflowRepository;
|
||||
WorkflowStatistics: WorkflowStatisticsRepository;
|
||||
WorkflowTagMapping: WorkflowTagMappingRepository;
|
||||
}
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
||||
// ----------------------------------
|
||||
// tags
|
||||
// ----------------------------------
|
||||
@@ -285,7 +242,14 @@ export interface IExternalHooksFileData {
|
||||
}
|
||||
|
||||
export interface IExternalHooksFunctions {
|
||||
dbCollections: IDatabaseCollections;
|
||||
dbCollections: {
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
User: UserRepository;
|
||||
Settings: SettingsRepository;
|
||||
Credentials: CredentialsRepository;
|
||||
Workflow: WorkflowRepository;
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
};
|
||||
}
|
||||
|
||||
export interface IExternalHooksClass {
|
||||
|
||||
Reference in New Issue
Block a user