refactor(core): Standardize filename casing for controllers and databases (no-changelog) (#10564)
This commit is contained in:
@@ -11,20 +11,20 @@ import {
|
||||
} from '@n8n/typeorm';
|
||||
import { IsEmail, IsString, Length } from 'class-validator';
|
||||
import type { IUser, IUserSettings } from 'n8n-workflow';
|
||||
import type { SharedWorkflow } from './SharedWorkflow';
|
||||
import type { SharedCredentials } from './SharedCredentials';
|
||||
import type { SharedWorkflow } from './shared-workflow';
|
||||
import type { SharedCredentials } from './shared-credentials';
|
||||
import { NoXss } from '@/validators/no-xss.validator';
|
||||
import { objectRetriever, lowerCaser } from '../utils/transformers';
|
||||
import { WithTimestamps, jsonColumnType } from './AbstractEntity';
|
||||
import { WithTimestamps, jsonColumnType } from './abstract-entity';
|
||||
import type { IPersonalizationSurveyAnswers } from '@/Interfaces';
|
||||
import type { AuthIdentity } from './AuthIdentity';
|
||||
import type { AuthIdentity } from './auth-identity';
|
||||
import {
|
||||
GLOBAL_OWNER_SCOPES,
|
||||
GLOBAL_MEMBER_SCOPES,
|
||||
GLOBAL_ADMIN_SCOPES,
|
||||
} from '@/permissions/global-roles';
|
||||
import { hasScope, type ScopeOptions, type Scope } from '@n8n/permissions';
|
||||
import type { ProjectRelation } from './ProjectRelation';
|
||||
import type { ProjectRelation } from './project-relation';
|
||||
import { NoUrl } from '@/validators/no-url.validator';
|
||||
|
||||
export type GlobalRole = 'global:owner' | 'global:admin' | 'global:member';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Column, Entity } from '@n8n/typeorm';
|
||||
import { WithStringId } from './AbstractEntity';
|
||||
import { WithStringId } from './abstract-entity';
|
||||
|
||||
@Entity()
|
||||
export class Variables extends WithStringId {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { User } from '@db/entities/User';
|
||||
import { User } from '@/databases/entities/User';
|
||||
|
||||
describe('User Entity', () => {
|
||||
describe('JSON.stringify', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn, Unique } from '@n8n/typeorm';
|
||||
import { WithTimestamps } from './AbstractEntity';
|
||||
import { WithTimestamps } from './abstract-entity';
|
||||
import { User } from './User';
|
||||
|
||||
export type AuthProviderType = 'ldap' | 'email' | 'saml'; // | 'google';
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from '@n8n/typeorm';
|
||||
import { datetimeColumnType } from './AbstractEntity';
|
||||
import { AuthProviderType } from './AuthIdentity';
|
||||
import { datetimeColumnType } from './abstract-entity';
|
||||
import { AuthProviderType } from './auth-identity';
|
||||
|
||||
export type RunningMode = 'dry' | 'live';
|
||||
export type SyncStatus = 'success' | 'error';
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Column, Entity, Index, OneToMany } from '@n8n/typeorm';
|
||||
import { IsObject, IsString, Length } from 'class-validator';
|
||||
import type { SharedCredentials } from './SharedCredentials';
|
||||
import { WithTimestampsAndStringId } from './AbstractEntity';
|
||||
import type { SharedCredentials } from './shared-credentials';
|
||||
import { WithTimestampsAndStringId } from './abstract-entity';
|
||||
import type { ICredentialsDb } from '@/Interfaces';
|
||||
|
||||
@Entity()
|
||||
@@ -1,6 +1,6 @@
|
||||
import { MessageEventBusDestinationOptions } from 'n8n-workflow';
|
||||
import { Column, Entity, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { WithTimestamps, jsonColumnType } from './AbstractEntity';
|
||||
import { WithTimestamps, jsonColumnType } from './abstract-entity';
|
||||
|
||||
@Entity({ name: 'event_destinations' })
|
||||
export class EventDestinations extends WithTimestamps {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { idStringifier } from '../utils/transformers';
|
||||
import { ExecutionEntity } from './ExecutionEntity';
|
||||
import { jsonColumnType } from './AbstractEntity';
|
||||
import { ExecutionEntity } from './execution-entity';
|
||||
import { jsonColumnType } from './abstract-entity';
|
||||
import { IWorkflowBase } from 'n8n-workflow';
|
||||
|
||||
@Entity()
|
||||
@@ -11,11 +11,11 @@ import {
|
||||
Relation,
|
||||
DeleteDateColumn,
|
||||
} from '@n8n/typeorm';
|
||||
import { datetimeColumnType } from './AbstractEntity';
|
||||
import { datetimeColumnType } from './abstract-entity';
|
||||
import { idStringifier } from '../utils/transformers';
|
||||
import type { ExecutionData } from './ExecutionData';
|
||||
import type { ExecutionMetadata } from './ExecutionMetadata';
|
||||
import { WorkflowEntity } from './WorkflowEntity';
|
||||
import type { ExecutionData } from './execution-data';
|
||||
import type { ExecutionMetadata } from './execution-metadata';
|
||||
import { WorkflowEntity } from './workflow-entity';
|
||||
|
||||
@Entity()
|
||||
@Index(['workflowId', 'id'])
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from '@n8n/typeorm';
|
||||
import { ExecutionEntity } from './ExecutionEntity';
|
||||
import { ExecutionEntity } from './execution-entity';
|
||||
|
||||
@Entity()
|
||||
export class ExecutionMetadata {
|
||||
@@ -1,27 +1,27 @@
|
||||
import { AuthIdentity } from './AuthIdentity';
|
||||
import { AuthProviderSyncHistory } from './AuthProviderSyncHistory';
|
||||
import { AuthUser } from './AuthUser';
|
||||
import { CredentialsEntity } from './CredentialsEntity';
|
||||
import { EventDestinations } from './EventDestinations';
|
||||
import { ExecutionEntity } from './ExecutionEntity';
|
||||
import { InstalledNodes } from './InstalledNodes';
|
||||
import { InstalledPackages } from './InstalledPackages';
|
||||
import { Settings } from './Settings';
|
||||
import { SharedCredentials } from './SharedCredentials';
|
||||
import { SharedWorkflow } from './SharedWorkflow';
|
||||
import { TagEntity } from './TagEntity';
|
||||
import { AuthIdentity } from './auth-identity';
|
||||
import { AuthProviderSyncHistory } from './auth-provider-sync-history';
|
||||
import { AuthUser } from './auth-user';
|
||||
import { CredentialsEntity } from './credentials-entity';
|
||||
import { EventDestinations } from './event-destinations';
|
||||
import { ExecutionEntity } from './execution-entity';
|
||||
import { InstalledNodes } from './installed-nodes';
|
||||
import { InstalledPackages } from './installed-packages';
|
||||
import { Settings } from './settings';
|
||||
import { SharedCredentials } from './shared-credentials';
|
||||
import { SharedWorkflow } from './shared-workflow';
|
||||
import { TagEntity } from './tag-entity';
|
||||
import { User } from './User';
|
||||
import { Variables } from './Variables';
|
||||
import { WebhookEntity } from './WebhookEntity';
|
||||
import { WorkflowEntity } from './WorkflowEntity';
|
||||
import { WorkflowTagMapping } from './WorkflowTagMapping';
|
||||
import { WorkflowStatistics } from './WorkflowStatistics';
|
||||
import { ExecutionMetadata } from './ExecutionMetadata';
|
||||
import { ExecutionData } from './ExecutionData';
|
||||
import { WorkflowHistory } from './WorkflowHistory';
|
||||
import { Project } from './Project';
|
||||
import { ProjectRelation } from './ProjectRelation';
|
||||
import { InvalidAuthToken } from './InvalidAuthToken';
|
||||
import { WebhookEntity } from './webhook-entity';
|
||||
import { WorkflowEntity } from './workflow-entity';
|
||||
import { WorkflowTagMapping } from './workflow-tag-mapping';
|
||||
import { WorkflowStatistics } from './workflow-statistics';
|
||||
import { ExecutionMetadata } from './execution-metadata';
|
||||
import { ExecutionData } from './execution-data';
|
||||
import { WorkflowHistory } from './workflow-history';
|
||||
import { Project } from './project';
|
||||
import { ProjectRelation } from './project-relation';
|
||||
import { InvalidAuthToken } from './invalid-auth-token';
|
||||
|
||||
export const entities = {
|
||||
AuthIdentity,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { InstalledPackages } from './InstalledPackages';
|
||||
import { InstalledPackages } from './installed-packages';
|
||||
|
||||
@Entity()
|
||||
export class InstalledNodes {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Column, Entity, JoinColumn, OneToMany, PrimaryColumn } from '@n8n/typeorm';
|
||||
import type { InstalledNodes } from './InstalledNodes';
|
||||
import { WithTimestamps } from './AbstractEntity';
|
||||
import type { InstalledNodes } from './installed-nodes';
|
||||
import { WithTimestamps } from './abstract-entity';
|
||||
|
||||
@Entity()
|
||||
export class InstalledPackages extends WithTimestamps {
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Column, Entity, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { datetimeColumnType } from './AbstractEntity';
|
||||
import { datetimeColumnType } from './abstract-entity';
|
||||
|
||||
@Entity()
|
||||
export class InvalidAuthToken {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { User } from './User';
|
||||
import { WithTimestamps } from './AbstractEntity';
|
||||
import { Project } from './Project';
|
||||
import { WithTimestamps } from './abstract-entity';
|
||||
import { Project } from './project';
|
||||
|
||||
// personalOwner is only used for personal projects
|
||||
export type ProjectRole =
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Column, Entity, OneToMany } from '@n8n/typeorm';
|
||||
import { WithTimestampsAndStringId } from './AbstractEntity';
|
||||
import type { ProjectRelation } from './ProjectRelation';
|
||||
import type { SharedCredentials } from './SharedCredentials';
|
||||
import type { SharedWorkflow } from './SharedWorkflow';
|
||||
import { WithTimestampsAndStringId } from './abstract-entity';
|
||||
import type { ProjectRelation } from './project-relation';
|
||||
import type { SharedCredentials } from './shared-credentials';
|
||||
import type { SharedWorkflow } from './shared-workflow';
|
||||
|
||||
export type ProjectType = 'personal' | 'team';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { CredentialsEntity } from './CredentialsEntity';
|
||||
import { WithTimestamps } from './AbstractEntity';
|
||||
import { Project } from './Project';
|
||||
import { CredentialsEntity } from './credentials-entity';
|
||||
import { WithTimestamps } from './abstract-entity';
|
||||
import { Project } from './project';
|
||||
|
||||
export type CredentialSharingRole = 'credential:owner' | 'credential:user';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { WorkflowEntity } from './WorkflowEntity';
|
||||
import { WithTimestamps } from './AbstractEntity';
|
||||
import { Project } from './Project';
|
||||
import { WorkflowEntity } from './workflow-entity';
|
||||
import { WithTimestamps } from './abstract-entity';
|
||||
import { Project } from './project';
|
||||
|
||||
export type WorkflowSharingRole = 'workflow:owner' | 'workflow:editor';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Column, Entity, Index, ManyToMany, OneToMany } from '@n8n/typeorm';
|
||||
import { IsString, Length } from 'class-validator';
|
||||
import type { WorkflowEntity } from './WorkflowEntity';
|
||||
import type { WorkflowTagMapping } from './WorkflowTagMapping';
|
||||
import { WithTimestampsAndStringId } from './AbstractEntity';
|
||||
import type { WorkflowEntity } from './workflow-entity';
|
||||
import type { WorkflowTagMapping } from './workflow-tag-mapping';
|
||||
import { WithTimestampsAndStringId } from './abstract-entity';
|
||||
|
||||
@Entity()
|
||||
export class TagEntity extends WithTimestampsAndStringId {
|
||||
@@ -5,12 +5,12 @@ import type { IBinaryKeyData, INode, IPairedItemData } from 'n8n-workflow';
|
||||
|
||||
import { Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, OneToMany } from '@n8n/typeorm';
|
||||
|
||||
import type { TagEntity } from './TagEntity';
|
||||
import type { SharedWorkflow } from './SharedWorkflow';
|
||||
import type { WorkflowStatistics } from './WorkflowStatistics';
|
||||
import type { WorkflowTagMapping } from './WorkflowTagMapping';
|
||||
import type { TagEntity } from './tag-entity';
|
||||
import type { SharedWorkflow } from './shared-workflow';
|
||||
import type { WorkflowStatistics } from './workflow-statistics';
|
||||
import type { WorkflowTagMapping } from './workflow-tag-mapping';
|
||||
import { objectRetriever, sqlite } from '../utils/transformers';
|
||||
import { WithTimestampsAndStringId, dbType, jsonColumnType } from './AbstractEntity';
|
||||
import { WithTimestampsAndStringId, dbType, jsonColumnType } from './abstract-entity';
|
||||
import type { IWorkflowDb } from '@/Interfaces';
|
||||
|
||||
@Entity()
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { WithTimestamps, jsonColumnType } from './AbstractEntity';
|
||||
import { WithTimestamps, jsonColumnType } from './abstract-entity';
|
||||
import { IConnections } from 'n8n-workflow';
|
||||
import type { INode } from 'n8n-workflow';
|
||||
import { WorkflowEntity } from './WorkflowEntity';
|
||||
import { WorkflowEntity } from './workflow-entity';
|
||||
|
||||
@Entity()
|
||||
export class WorkflowHistory extends WithTimestamps {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import { datetimeColumnType } from './AbstractEntity';
|
||||
import { WorkflowEntity } from './WorkflowEntity';
|
||||
import { datetimeColumnType } from './abstract-entity';
|
||||
import { WorkflowEntity } from './workflow-entity';
|
||||
|
||||
export const enum StatisticsNames {
|
||||
productionSuccess = 'production_success',
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Entity, JoinColumn, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
import type { TagEntity } from './TagEntity';
|
||||
import type { WorkflowEntity } from './WorkflowEntity';
|
||||
import type { TagEntity } from './tag-entity';
|
||||
import type { WorkflowEntity } from './workflow-entity';
|
||||
|
||||
@Entity({ name: 'workflows_tags' })
|
||||
export class WorkflowTagMapping {
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
import type { WorkflowEntity } from '@db/entities/workflow-entity';
|
||||
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
||||
|
||||
export class UniqueWorkflowNames1620821879465 implements ReversibleMigration {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { IWorkflowBase } from 'n8n-workflow';
|
||||
import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
|
||||
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
import type { CredentialsEntity } from '@/databases/entities/credentials-entity';
|
||||
import type { WorkflowEntity } from '@db/entities/workflow-entity';
|
||||
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
||||
|
||||
type Credential = Pick<CredentialsEntity, 'id' | 'name' | 'type'>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { INode } from 'n8n-workflow';
|
||||
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
import type { WorkflowEntity } from '@db/entities/workflow-entity';
|
||||
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
||||
import { StatisticsNames } from '@db/entities/WorkflowStatistics';
|
||||
import { StatisticsNames } from '@/databases/entities/workflow-statistics';
|
||||
|
||||
export class RemoveWorkflowDataLoadedFlag1671726148419 implements ReversibleMigration {
|
||||
async up({ escape, dbType, runQuery }: MigrationContext) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
import type { WorkflowEntity } from '@db/entities/workflow-entity';
|
||||
import type { MigrationContext, IrreversibleMigration } from '@db/types';
|
||||
|
||||
interface Workflow {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
||||
import type { ProjectRole } from '@/databases/entities/ProjectRelation';
|
||||
import type { ProjectRole } from '@/databases/entities/project-relation';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import { generateNanoId } from '@/databases/utils/generators';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { BinaryDataService } from 'n8n-core';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import { ExecutionEntity } from '@db/entities/ExecutionEntity';
|
||||
import { ExecutionEntity } from '@db/entities/execution-entity';
|
||||
import { ExecutionRepository } from '@db/repositories/execution.repository';
|
||||
import { mockInstance, mockEntityManager } from '@test/mocking';
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ import { In } from '@n8n/typeorm';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { hasScope } from '@n8n/permissions';
|
||||
|
||||
import type { User } from '@db/entities/User';
|
||||
import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
|
||||
import { SharedCredentials } from '@db/entities/SharedCredentials';
|
||||
import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import type { CredentialsEntity } from '@/databases/entities/credentials-entity';
|
||||
import { SharedCredentials } from '@/databases/entities/shared-credentials';
|
||||
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
|
||||
import { GLOBAL_MEMBER_SCOPES, GLOBAL_OWNER_SCOPES } from '@/permissions/global-roles';
|
||||
import { mockEntityManager } from '@test/mocking';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { Container } from 'typedi';
|
||||
import { type InsertResult, QueryFailedError } from '@n8n/typeorm';
|
||||
import { mock, mockClear } from 'jest-mock-extended';
|
||||
|
||||
import { StatisticsNames, WorkflowStatistics } from '@db/entities/WorkflowStatistics';
|
||||
import { WorkflowStatisticsRepository } from '@db/repositories/workflowStatistics.repository';
|
||||
import { StatisticsNames, WorkflowStatistics } from '@/databases/entities/workflow-statistics';
|
||||
import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository';
|
||||
|
||||
import { mockEntityManager } from '@test/mocking';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { AuthIdentity } from '../entities/AuthIdentity';
|
||||
import { AuthIdentity } from '../entities/auth-identity';
|
||||
|
||||
@Service()
|
||||
export class AuthIdentityRepository extends Repository<AuthIdentity> {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { AuthProviderSyncHistory } from '../entities/AuthProviderSyncHistory';
|
||||
import { AuthProviderSyncHistory } from '../entities/auth-provider-sync-history';
|
||||
|
||||
@Service()
|
||||
export class AuthProviderSyncHistoryRepository extends Repository<AuthProviderSyncHistory> {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { AuthUser } from '../entities/AuthUser';
|
||||
import { AuthUser } from '../entities/auth-user';
|
||||
|
||||
@Service()
|
||||
export class AuthUserRepository extends Repository<AuthUser> {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, In, Repository, Like } from '@n8n/typeorm';
|
||||
import type { FindManyOptions, FindOptionsWhere } from '@n8n/typeorm';
|
||||
import { CredentialsEntity } from '../entities/CredentialsEntity';
|
||||
import { CredentialsEntity } from '../entities/credentials-entity';
|
||||
import type { ListQuery } from '@/requests';
|
||||
import type { User } from '../entities/User';
|
||||
import type { Scope } from '@n8n/permissions';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { EventDestinations } from '../entities/EventDestinations';
|
||||
import { EventDestinations } from '../entities/event-destinations';
|
||||
|
||||
@Service()
|
||||
export class EventDestinationsRepository extends Repository<EventDestinations> {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, In, Repository } from '@n8n/typeorm';
|
||||
import { ExecutionData } from '../entities/ExecutionData';
|
||||
import { ExecutionData } from '../entities/execution-data';
|
||||
|
||||
@Service()
|
||||
export class ExecutionDataRepository extends Repository<ExecutionData> {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { ExecutionMetadata } from '../entities/ExecutionMetadata';
|
||||
import { ExecutionMetadata } from '../entities/execution-metadata';
|
||||
|
||||
@Service()
|
||||
export class ExecutionMetadataRepository extends Repository<ExecutionMetadata> {
|
||||
@@ -38,10 +38,10 @@ import type {
|
||||
} from '@/Interfaces';
|
||||
|
||||
import config from '@/config';
|
||||
import type { ExecutionData } from '../entities/ExecutionData';
|
||||
import { ExecutionEntity } from '../entities/ExecutionEntity';
|
||||
import { ExecutionMetadata } from '../entities/ExecutionMetadata';
|
||||
import { ExecutionDataRepository } from './executionData.repository';
|
||||
import type { ExecutionData } from '../entities/execution-data';
|
||||
import { ExecutionEntity } from '../entities/execution-entity';
|
||||
import { ExecutionMetadata } from '../entities/execution-metadata';
|
||||
import { ExecutionDataRepository } from './execution-data.repository';
|
||||
import { Logger } from '@/logger';
|
||||
import type { ExecutionSummaries } from '@/executions/execution.types';
|
||||
import { PostgresLiveRowsRetrievalError } from '@/errors/postgres-live-rows-retrieval.error';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { InstalledNodes } from '../entities/InstalledNodes';
|
||||
import { InstalledNodes } from '../entities/installed-nodes';
|
||||
|
||||
@Service()
|
||||
export class InstalledNodesRepository extends Repository<InstalledNodes> {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { InstalledPackages } from '../entities/InstalledPackages';
|
||||
import { InstalledNodesRepository } from './installedNodes.repository';
|
||||
import { InstalledPackages } from '../entities/installed-packages';
|
||||
import { InstalledNodesRepository } from './installed-nodes.repository';
|
||||
import type { PackageDirectoryLoader } from 'n8n-core';
|
||||
|
||||
@Service()
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { InvalidAuthToken } from '../entities/InvalidAuthToken';
|
||||
import { InvalidAuthToken } from '../entities/invalid-auth-token';
|
||||
|
||||
@Service()
|
||||
export class InvalidAuthTokenRepository extends Repository<InvalidAuthToken> {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, In, Repository } from '@n8n/typeorm';
|
||||
import { ProjectRelation, type ProjectRole } from '../entities/ProjectRelation';
|
||||
import { ProjectRelation, type ProjectRole } from '../entities/project-relation';
|
||||
|
||||
@Service()
|
||||
export class ProjectRelationRepository extends Repository<ProjectRelation> {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Service } from 'typedi';
|
||||
import type { EntityManager } from '@n8n/typeorm';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { Project } from '../entities/Project';
|
||||
import { Project } from '../entities/project';
|
||||
|
||||
@Service()
|
||||
export class ProjectRepository extends Repository<Project> {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { EXTERNAL_SECRETS_DB_KEY } from '@/external-secrets/constants';
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { ErrorReporterProxy as ErrorReporter } from 'n8n-workflow';
|
||||
import { Settings } from '../entities/Settings';
|
||||
import { Settings } from '../entities/settings';
|
||||
import config from '@/config';
|
||||
|
||||
@Service()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Service } from 'typedi';
|
||||
import type { EntityManager, FindOptionsRelations, FindOptionsWhere } from '@n8n/typeorm';
|
||||
import { DataSource, In, Not, Repository } from '@n8n/typeorm';
|
||||
import { type CredentialSharingRole, SharedCredentials } from '../entities/SharedCredentials';
|
||||
import { type CredentialSharingRole, SharedCredentials } from '../entities/shared-credentials';
|
||||
import type { User } from '../entities/User';
|
||||
import { RoleService } from '@/services/role.service';
|
||||
import type { Scope } from '@n8n/permissions';
|
||||
import type { Project } from '../entities/Project';
|
||||
import type { ProjectRole } from '../entities/ProjectRelation';
|
||||
import type { Project } from '../entities/project';
|
||||
import type { ProjectRole } from '../entities/project-relation';
|
||||
|
||||
@Service()
|
||||
export class SharedCredentialsRepository extends Repository<SharedCredentials> {
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository, In, Not } from '@n8n/typeorm';
|
||||
import type { EntityManager, FindManyOptions, FindOptionsWhere } from '@n8n/typeorm';
|
||||
import { SharedWorkflow, type WorkflowSharingRole } from '../entities/SharedWorkflow';
|
||||
import { SharedWorkflow, type WorkflowSharingRole } from '../entities/shared-workflow';
|
||||
import { type User } from '../entities/User';
|
||||
import type { Scope } from '@n8n/permissions';
|
||||
import { RoleService } from '@/services/role.service';
|
||||
import type { Project } from '../entities/Project';
|
||||
import type { Project } from '../entities/project';
|
||||
|
||||
@Service()
|
||||
export class SharedWorkflowRepository extends Repository<SharedWorkflow> {
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Service } from 'typedi';
|
||||
import type { EntityManager } from '@n8n/typeorm';
|
||||
import { DataSource, In, Repository } from '@n8n/typeorm';
|
||||
import { TagEntity } from '../entities/TagEntity';
|
||||
import type { WorkflowEntity } from '../entities/WorkflowEntity';
|
||||
import { TagEntity } from '../entities/tag-entity';
|
||||
import type { WorkflowEntity } from '../entities/workflow-entity';
|
||||
import intersection from 'lodash/intersection';
|
||||
|
||||
@Service()
|
||||
|
||||
@@ -4,8 +4,8 @@ import { DataSource, In, IsNull, Not, Repository } from '@n8n/typeorm';
|
||||
import type { ListQuery } from '@/requests';
|
||||
|
||||
import { type GlobalRole, User } from '../entities/User';
|
||||
import { Project } from '../entities/Project';
|
||||
import { ProjectRelation } from '../entities/ProjectRelation';
|
||||
import { Project } from '../entities/project';
|
||||
import { ProjectRelation } from '../entities/project-relation';
|
||||
|
||||
@Service()
|
||||
export class UserRepository extends Repository<User> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { WebhookEntity } from '../entities/WebhookEntity';
|
||||
import { WebhookEntity } from '../entities/webhook-entity';
|
||||
|
||||
@Service()
|
||||
export class WebhookRepository extends Repository<WebhookEntity> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, LessThan, Repository } from '@n8n/typeorm';
|
||||
import { WorkflowHistory } from '../entities/WorkflowHistory';
|
||||
import { WorkflowHistory } from '../entities/workflow-history';
|
||||
|
||||
@Service()
|
||||
export class WorkflowHistoryRepository extends Repository<WorkflowHistory> {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Service } from 'typedi';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { DataSource, MoreThanOrEqual, QueryFailedError, Repository } from '@n8n/typeorm';
|
||||
import { StatisticsNames, WorkflowStatistics } from '../entities/WorkflowStatistics';
|
||||
import { StatisticsNames, WorkflowStatistics } from '../entities/workflow-statistics';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
|
||||
type StatisticsInsertResult = 'insert' | 'failed' | 'alreadyExists';
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Service } from 'typedi';
|
||||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { WorkflowTagMapping } from '../entities/WorkflowTagMapping';
|
||||
import { WorkflowTagMapping } from '../entities/workflow-tag-mapping';
|
||||
|
||||
@Service()
|
||||
export class WorkflowTagMappingRepository extends Repository<WorkflowTagMapping> {
|
||||
@@ -14,8 +14,8 @@ import {
|
||||
import type { ListQuery } from '@/requests';
|
||||
import { isStringArray } from '@/utils';
|
||||
import config from '@/config';
|
||||
import { WorkflowEntity } from '../entities/WorkflowEntity';
|
||||
import { WebhookEntity } from '../entities/WebhookEntity';
|
||||
import { WorkflowEntity } from '../entities/workflow-entity';
|
||||
import { WebhookEntity } from '../entities/webhook-entity';
|
||||
|
||||
@Service()
|
||||
export class WorkflowRepository extends Repository<WorkflowEntity> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { UserSubscriber } from './UserSubscriber';
|
||||
import { UserSubscriber } from './user-subscriber';
|
||||
|
||||
export const subscribers = {
|
||||
UserSubscriber,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { EventSubscriber } from '@n8n/typeorm';
|
||||
import { ApplicationError, ErrorReporterProxy } from 'n8n-workflow';
|
||||
import { Logger } from '@/logger';
|
||||
|
||||
import { Project } from '../entities/Project';
|
||||
import { Project } from '../entities/project';
|
||||
import { User } from '../entities/User';
|
||||
import { UserRepository } from '../repositories/user.repository';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { IrreversibleMigration, ReversibleMigration } from '@/databases/types';
|
||||
import { wrapMigration } from '@/databases/utils/migrationHelpers';
|
||||
import { wrapMigration } from '@/databases/utils/migration-helpers';
|
||||
|
||||
describe('migrationHelpers.wrapMigration', () => {
|
||||
test('throws if passed a migration without up method', async () => {
|
||||
Reference in New Issue
Block a user