mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
chore: Correct naming of annotation-related files (#10946)
This commit is contained in:
parent
262693be65
commit
efc5d859eb
|
@ -71,5 +71,11 @@ module.exports = {
|
|||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['./test/**/*.ts', './src/**/__tests__/**/*.ts'],
|
||||
rules: {
|
||||
'n8n-local-rules/no-dynamic-import-template': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Delete, Get, Patch, Post, RestController, GlobalScope } from '@/decorators';
|
||||
import { AnnotationTagsRequest } from '@/requests';
|
||||
import { AnnotationTagService } from '@/services/annotation-tag.service';
|
||||
import { AnnotationTagService } from '@/services/annotation-tag.service.ee';
|
||||
|
||||
@RestController('/annotation-tags')
|
||||
export class AnnotationTagsController {
|
|
@ -1,8 +1,8 @@
|
|||
import { Column, Entity, Index, ManyToMany, OneToMany } from '@n8n/typeorm';
|
||||
import { IsString, Length } from 'class-validator';
|
||||
|
||||
import type { AnnotationTagMapping } from '@/databases/entities/annotation-tag-mapping';
|
||||
import type { ExecutionAnnotation } from '@/databases/entities/execution-annotation';
|
||||
import type { AnnotationTagMapping } from '@/databases/entities/annotation-tag-mapping.ee';
|
||||
import type { ExecutionAnnotation } from '@/databases/entities/execution-annotation.ee';
|
||||
|
||||
import { WithTimestampsAndStringId } from './abstract-entity';
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { Entity, JoinColumn, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
|
||||
import type { AnnotationTagEntity } from './annotation-tag-entity';
|
||||
import type { ExecutionAnnotation } from './execution-annotation';
|
||||
import type { AnnotationTagEntity } from './annotation-tag-entity.ee';
|
||||
import type { ExecutionAnnotation } from './execution-annotation.ee';
|
||||
|
||||
/**
|
||||
* This entity represents the junction table between the execution annotations and the tags
|
|
@ -12,8 +12,8 @@ import {
|
|||
} from '@n8n/typeorm';
|
||||
import type { AnnotationVote } from 'n8n-workflow';
|
||||
|
||||
import type { AnnotationTagEntity } from './annotation-tag-entity';
|
||||
import type { AnnotationTagMapping } from './annotation-tag-mapping';
|
||||
import type { AnnotationTagEntity } from './annotation-tag-entity.ee';
|
||||
import type { AnnotationTagMapping } from './annotation-tag-mapping.ee';
|
||||
import { ExecutionEntity } from './execution-entity';
|
||||
|
||||
@Entity({ name: 'execution_annotations' })
|
|
@ -12,7 +12,7 @@ import {
|
|||
} from '@n8n/typeorm';
|
||||
import { ExecutionStatus, WorkflowExecuteMode } from 'n8n-workflow';
|
||||
|
||||
import type { ExecutionAnnotation } from '@/databases/entities/execution-annotation';
|
||||
import type { ExecutionAnnotation } from '@/databases/entities/execution-annotation.ee';
|
||||
|
||||
import { datetimeColumnType } from './abstract-entity';
|
||||
import type { ExecutionData } from './execution-data';
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { AnnotationTagEntity } from './annotation-tag-entity';
|
||||
import { AnnotationTagMapping } from './annotation-tag-mapping';
|
||||
import { AnnotationTagEntity } from './annotation-tag-entity.ee';
|
||||
import { AnnotationTagMapping } from './annotation-tag-mapping.ee';
|
||||
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 { ExecutionAnnotation } from './execution-annotation';
|
||||
import { ExecutionAnnotation } from './execution-annotation.ee';
|
||||
import { ExecutionData } from './execution-data';
|
||||
import { ExecutionEntity } from './execution-entity';
|
||||
import { ExecutionMetadata } from './execution-metadata';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { AnnotationTagMapping } from '@/databases/entities/annotation-tag-mapping';
|
||||
import { AnnotationTagMapping } from '@/databases/entities/annotation-tag-mapping.ee';
|
||||
|
||||
@Service()
|
||||
export class AnnotationTagMappingRepository extends Repository<AnnotationTagMapping> {
|
|
@ -1,7 +1,7 @@
|
|||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity';
|
||||
import { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity.ee';
|
||||
|
||||
@Service()
|
||||
export class AnnotationTagRepository extends Repository<AnnotationTagEntity> {
|
|
@ -1,7 +1,7 @@
|
|||
import { DataSource, Repository } from '@n8n/typeorm';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { ExecutionAnnotation } from '@/databases/entities/execution-annotation';
|
||||
import { ExecutionAnnotation } from '@/databases/entities/execution-annotation.ee';
|
||||
|
||||
@Service()
|
||||
export class ExecutionAnnotationRepository extends Repository<ExecutionAnnotation> {
|
||||
|
|
|
@ -36,9 +36,9 @@ import type {
|
|||
import { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity';
|
||||
import { AnnotationTagMapping } from '@/databases/entities/annotation-tag-mapping';
|
||||
import { ExecutionAnnotation } from '@/databases/entities/execution-annotation';
|
||||
import { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity.ee';
|
||||
import { AnnotationTagMapping } from '@/databases/entities/annotation-tag-mapping.ee';
|
||||
import { ExecutionAnnotation } from '@/databases/entities/execution-annotation.ee';
|
||||
import { PostgresLiveRowsRetrievalError } from '@/errors/postgres-live-rows-retrieval.error';
|
||||
import type { ExecutionSummaries } from '@/executions/execution.types';
|
||||
import type {
|
||||
|
|
|
@ -21,7 +21,7 @@ import { ActiveExecutions } from '@/active-executions';
|
|||
import { ConcurrencyControlService } from '@/concurrency/concurrency-control.service';
|
||||
import config from '@/config';
|
||||
import type { User } from '@/databases/entities/user';
|
||||
import { AnnotationTagMappingRepository } from '@/databases/repositories/annotation-tag-mapping.repository';
|
||||
import { AnnotationTagMappingRepository } from '@/databases/repositories/annotation-tag-mapping.repository.ee';
|
||||
import { ExecutionAnnotationRepository } from '@/databases/repositories/execution-annotation.repository';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import type { IGetExecutionsQueryFilter } from '@/databases/repositories/execution.repository';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { validate } from 'class-validator';
|
||||
|
||||
import type { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity';
|
||||
import type { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity.ee';
|
||||
import type { CredentialsEntity } from '@/databases/entities/credentials-entity';
|
||||
import type { TagEntity } from '@/databases/entities/tag-entity';
|
||||
import type { User } from '@/databases/entities/user';
|
||||
|
|
|
@ -26,7 +26,7 @@ import type {
|
|||
import type PCancelable from 'p-cancelable';
|
||||
|
||||
import type { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import type { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity';
|
||||
import type { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity.ee';
|
||||
import type { AuthProviderType } from '@/databases/entities/auth-identity';
|
||||
import type { SharedCredentials } from '@/databases/entities/shared-credentials';
|
||||
import type { TagEntity } from '@/databases/entities/tag-entity';
|
||||
|
|
|
@ -35,7 +35,7 @@ import type { FrontendService } from '@/services/frontend.service';
|
|||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
|
||||
import '@/controllers/active-workflows.controller';
|
||||
import '@/controllers/annotation-tags.controller';
|
||||
import '@/controllers/annotation-tags.controller.ee';
|
||||
import '@/controllers/auth.controller';
|
||||
import '@/controllers/binary-data.controller';
|
||||
import '@/controllers/curl.controller';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Service } from 'typedi';
|
||||
|
||||
import type { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity';
|
||||
import { AnnotationTagRepository } from '@/databases/repositories/annotation-tag.repository';
|
||||
import type { AnnotationTagEntity } from '@/databases/entities/annotation-tag-entity.ee';
|
||||
import { AnnotationTagRepository } from '@/databases/repositories/annotation-tag.repository.ee';
|
||||
import { validateEntity } from '@/generic-helpers';
|
||||
import type { IAnnotationTagDb, IAnnotationTagWithCountDb } from '@/interfaces';
|
||||
|
|
@ -4,7 +4,7 @@ import Container from 'typedi';
|
|||
import type { ExecutionData } from '@/databases/entities/execution-data';
|
||||
import type { ExecutionEntity } from '@/databases/entities/execution-entity';
|
||||
import type { WorkflowEntity } from '@/databases/entities/workflow-entity';
|
||||
import { AnnotationTagRepository } from '@/databases/repositories/annotation-tag.repository';
|
||||
import { AnnotationTagRepository } from '@/databases/repositories/annotation-tag.repository.ee';
|
||||
import { ExecutionDataRepository } from '@/databases/repositories/execution-data.repository';
|
||||
import { ExecutionMetadataRepository } from '@/databases/repositories/execution-metadata.repository';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
|
|
|
@ -87,9 +87,18 @@ const repositories = [
|
|||
*/
|
||||
export async function truncate(names: Array<(typeof repositories)[number]>) {
|
||||
for (const name of names) {
|
||||
const RepositoryClass: Class<Repository<object>> =
|
||||
// eslint-disable-next-line n8n-local-rules/no-dynamic-import-template
|
||||
(await import(`@/databases/repositories/${kebabCase(name)}.repository`))[`${name}Repository`];
|
||||
let RepositoryClass: Class<Repository<object>>;
|
||||
|
||||
try {
|
||||
RepositoryClass = (await import(`@/databases/repositories/${kebabCase(name)}.repository`))[
|
||||
`${name}Repository`
|
||||
];
|
||||
} catch (e) {
|
||||
RepositoryClass = (await import(`@/databases/repositories/${kebabCase(name)}.repository.ee`))[
|
||||
`${name}Repository`
|
||||
];
|
||||
}
|
||||
|
||||
await Container.get(RepositoryClass).delete({});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ export const setupTestServer = ({
|
|||
for (const group of endpointGroups) {
|
||||
switch (group) {
|
||||
case 'annotationTags':
|
||||
await import('@/controllers/annotation-tags.controller');
|
||||
await import('@/controllers/annotation-tags.controller.ee');
|
||||
break;
|
||||
|
||||
case 'credentials':
|
||||
|
|
|
@ -48,7 +48,7 @@ import DuplicateWorkflowDialog from '@/components/DuplicateWorkflowDialog.vue';
|
|||
import ModalRoot from '@/components/ModalRoot.vue';
|
||||
import PersonalizationModal from '@/components/PersonalizationModal.vue';
|
||||
import WorkflowTagsManager from '@/components/TagsManager/WorkflowTagsManager.vue';
|
||||
import AnnotationTagsManager from '@/components/TagsManager/AnnotationTagsManager.vue';
|
||||
import AnnotationTagsManager from '@/components/TagsManager/AnnotationTagsManager.ee.vue';
|
||||
import UpdatesPanel from '@/components/UpdatesPanel.vue';
|
||||
import NpsSurvey from '@/components/NpsSurvey.vue';
|
||||
import WorkflowLMChat from '@/components/WorkflowLMChat/WorkflowLMChat.vue';
|
||||
|
|
|
@ -15,7 +15,7 @@ import { usePostHog } from '@/stores/posthog.store';
|
|||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import type { Placement } from '@floating-ui/core';
|
||||
import { useDebounce } from '@/composables/useDebounce';
|
||||
import AnnotationTagsDropdown from '@/components/AnnotationTagsDropdown.vue';
|
||||
import AnnotationTagsDropdown from '@/components/AnnotationTagsDropdown.ee.vue';
|
||||
|
||||
export type ExecutionFilterProps = {
|
||||
workflows?: Array<IWorkflowDb | IWorkflowShortResponse>;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { ref, computed } from 'vue';
|
||||
import type { AnnotationVote, ExecutionSummary } from 'n8n-workflow';
|
||||
import { useExecutionsStore } from '@/stores/executions.store';
|
||||
import AnnotationTagsDropdown from '@/components/AnnotationTagsDropdown.vue';
|
||||
import AnnotationTagsDropdown from '@/components/AnnotationTagsDropdown.ee.vue';
|
||||
import { createEventBus } from 'n8n-design-system';
|
||||
import VoteButtons from '@/components/executions/workflow/VoteButtons.vue';
|
||||
import { useToast } from '@/composables/useToast';
|
Loading…
Reference in a new issue