From 13f5013355c8106409ad8a1372526d418c587103 Mon Sep 17 00:00:00 2001 From: Patrick Sachmann <20001160+psachmann@users.noreply.github.com> Date: Fri, 21 Jun 2024 08:28:17 +0200 Subject: [PATCH] EW-793 changing import path --- .../mapper/common-cartridge-export.mapper.ts | 2 +- .../mapper/common-cartridge-import.mapper.spec.ts | 10 +++++----- .../mapper/common-cartridge-import.mapper.ts | 12 ++++++------ .../service/common-cartridge-export.service.spec.ts | 2 +- .../service/common-cartridge-export.service.ts | 8 ++++---- .../service/common-cartridge-import.service.spec.ts | 2 +- .../service/common-cartridge-import.service.ts | 12 ++++++------ .../learnroom/service/course-copy.service.spec.ts | 3 +-- .../modules/learnroom/uc/course-import.uc.spec.ts | 2 +- .../src/modules/learnroom/uc/course-import.uc.ts | 2 +- .../src/modules/learnroom/uc/course.uc.spec.ts | 6 +++--- apps/server/src/modules/learnroom/uc/course.uc.ts | 4 ++-- 12 files changed, 32 insertions(+), 33 deletions(-) diff --git a/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts b/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts index d2548360b09..ce3bdc4fd54 100644 --- a/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts +++ b/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts @@ -7,11 +7,11 @@ import { CommonCartridgeVersion, createIdentifier, } from '@modules/common-cartridge'; +import { CommonCartridgeOrganizationProps } from '@modules/common-cartridge/export/builders/common-cartridge-file-builder'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { LinkElement, RichTextElement } from '@shared/domain/domainobject'; import { ComponentProperties, ComponentType, Course, LessonEntity, Task } from '@shared/domain/entity'; -import { CommonCartridgeOrganizationProps } from '@src/modules/common-cartridge/export/builders/common-cartridge-file-builder'; import sanitizeHtml from 'sanitize-html'; import { LearnroomConfig } from '../learnroom.config'; diff --git a/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.spec.ts b/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.spec.ts index 561629d2fea..62c8db9d717 100644 --- a/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.spec.ts +++ b/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.spec.ts @@ -1,13 +1,13 @@ import { faker } from '@faker-js/faker'; -import { Test, TestingModule } from '@nestjs/testing'; -import { CardInitProps, ColumnInitProps, ContentElementType } from '@shared/domain/domainobject'; -import { InputFormat } from '@shared/domain/types'; -import { LinkContentBody, RichTextContentBody } from '@src/modules/board/controller/dto'; +import { LinkContentBody, RichTextContentBody } from '@modules/board/controller/dto'; import { CommonCartridgeImportOrganizationProps, CommonCartridgeImportResourceProps, CommonCartridgeResourceTypeV1P1, -} from '@src/modules/common-cartridge'; +} from '@modules/common-cartridge'; +import { Test, TestingModule } from '@nestjs/testing'; +import { CardInitProps, ColumnInitProps, ContentElementType } from '@shared/domain/domainobject'; +import { InputFormat } from '@shared/domain/types'; import { CommonCartridgeImportMapper } from './common-cartridge-import.mapper'; describe('CommonCartridgeImportMapper', () => { diff --git a/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts b/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts index bd387623c3b..ab9e7eb4108 100644 --- a/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts +++ b/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts @@ -1,13 +1,13 @@ -import { Injectable } from '@nestjs/common'; -import { CardInitProps, ColumnInitProps, ContentElementType } from '@shared/domain/domainobject'; -import { InputFormat } from '@shared/domain/types'; -import { AnyElementContentBody, LinkContentBody, RichTextContentBody } from '@src/modules/board/controller/dto'; -import { CommonCartridgeOrganizationProps, CommonCartridgeResourceTypeV1P1 } from '@src/modules/common-cartridge'; +import { AnyElementContentBody, LinkContentBody, RichTextContentBody } from '@modules/board/controller/dto'; +import { CommonCartridgeOrganizationProps, CommonCartridgeResourceTypeV1P1 } from '@modules/common-cartridge'; import { CommonCartridgeResourceProps, CommonCartridgeWebContentResourceProps, CommonCartridgeWebLinkResourceProps, -} from '@src/modules/common-cartridge/import/common-cartridge-import.types'; +} from '@modules/common-cartridge/import/common-cartridge-import.types'; +import { Injectable } from '@nestjs/common'; +import { CardInitProps, ColumnInitProps, ContentElementType } from '@shared/domain/domainobject'; +import { InputFormat } from '@shared/domain/types'; @Injectable() export class CommonCartridgeImportMapper { diff --git a/apps/server/src/modules/learnroom/service/common-cartridge-export.service.spec.ts b/apps/server/src/modules/learnroom/service/common-cartridge-export.service.spec.ts index 36eae5fc779..fb9869c9a95 100644 --- a/apps/server/src/modules/learnroom/service/common-cartridge-export.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/common-cartridge-export.service.spec.ts @@ -1,5 +1,6 @@ import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { ColumnBoardService } from '@modules/board'; import { CommonCartridgeVersion } from '@modules/common-cartridge'; import { CommonCartridgeExportService, CourseService, LearnroomConfig } from '@modules/learnroom'; import { LessonService } from '@modules/lesson'; @@ -18,7 +19,6 @@ import { setupEntities, taskFactory, } from '@shared/testing'; -import { ColumnBoardService } from '@src/modules/board'; import AdmZip from 'adm-zip'; import { CommonCartridgeExportMapper } from '../mapper/common-cartridge-export.mapper'; diff --git a/apps/server/src/modules/learnroom/service/common-cartridge-export.service.ts b/apps/server/src/modules/learnroom/service/common-cartridge-export.service.ts index 49e627541e2..474b5d7548d 100644 --- a/apps/server/src/modules/learnroom/service/common-cartridge-export.service.ts +++ b/apps/server/src/modules/learnroom/service/common-cartridge-export.service.ts @@ -1,4 +1,8 @@ +import { ColumnBoardService } from '@modules/board'; import { CommonCartridgeVersion } from '@modules/common-cartridge'; +import { CommonCartridgeFileBuilder } from '@modules/common-cartridge/export/builders/common-cartridge-file-builder'; +import { CommonCartridgeOrganizationNode } from '@modules/common-cartridge/export/builders/common-cartridge-organization-node'; +import { createIdentifier } from '@modules/common-cartridge/export/utils'; import { LessonService } from '@modules/lesson'; import { TaskService } from '@modules/task'; import { Injectable } from '@nestjs/common'; @@ -14,10 +18,6 @@ import { } from '@shared/domain/domainobject'; import { ComponentProperties } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; -import { ColumnBoardService } from '@src/modules/board'; -import { CommonCartridgeFileBuilder } from '@src/modules/common-cartridge/export/builders/common-cartridge-file-builder'; -import { CommonCartridgeOrganizationNode } from '@src/modules/common-cartridge/export/builders/common-cartridge-organization-node'; -import { createIdentifier } from '@src/modules/common-cartridge/export/utils'; import { CommonCartridgeExportMapper } from '../mapper/common-cartridge-export.mapper'; import { CourseService } from './course.service'; diff --git a/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts b/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts index 440457ca85a..5667d73b454 100644 --- a/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts @@ -1,8 +1,8 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { MikroORM } from '@mikro-orm/core'; +import { CardService, ColumnBoardService, ColumnService, ContentElementService } from '@modules/board'; import { Test, TestingModule } from '@nestjs/testing'; import { setupEntities, userFactory } from '@shared/testing'; -import { CardService, ColumnBoardService, ColumnService, ContentElementService } from '@src/modules/board'; import { readFile } from 'fs/promises'; import { CommonCartridgeImportMapper } from '../mapper/common-cartridge-import.mapper'; import { CommonCartridgeImportService } from './common-cartridge-import.service'; diff --git a/apps/server/src/modules/learnroom/service/common-cartridge-import.service.ts b/apps/server/src/modules/learnroom/service/common-cartridge-import.service.ts index a35a197202e..c9c3e093cb7 100644 --- a/apps/server/src/modules/learnroom/service/common-cartridge-import.service.ts +++ b/apps/server/src/modules/learnroom/service/common-cartridge-import.service.ts @@ -1,3 +1,9 @@ +import { CardService, ColumnBoardService, ColumnService, ContentElementService } from '@modules/board'; +import { + CommonCartridgeFileParser, + CommonCartridgeImportOrganizationProps, + DEFAULT_FILE_PARSER_OPTIONS, +} from '@modules/common-cartridge'; import { Injectable } from '@nestjs/common'; import { BoardExternalReferenceType, @@ -8,12 +14,6 @@ import { ContentElementType, } from '@shared/domain/domainobject'; import { Course, User } from '@shared/domain/entity'; -import { CardService, ColumnBoardService, ColumnService, ContentElementService } from '@src/modules/board'; -import { - CommonCartridgeFileParser, - CommonCartridgeImportOrganizationProps, - DEFAULT_FILE_PARSER_OPTIONS, -} from '@src/modules/common-cartridge'; import { CommonCartridgeImportMapper } from '../mapper/common-cartridge-import.mapper'; import { CourseService } from './course.service'; diff --git a/apps/server/src/modules/learnroom/service/course-copy.service.spec.ts b/apps/server/src/modules/learnroom/service/course-copy.service.spec.ts index cbd8bee44d6..91f85457879 100644 --- a/apps/server/src/modules/learnroom/service/course-copy.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/course-copy.service.spec.ts @@ -4,7 +4,7 @@ import { LessonCopyService } from '@modules/lesson/service'; import { ToolContextType } from '@modules/tool/common/enum'; import { ContextExternalTool } from '@modules/tool/context-external-tool/domain'; import { ContextExternalToolService } from '@modules/tool/context-external-tool/service'; -import { ToolFeatures } from '@modules/tool/tool-config'; +import { IToolFeatures, ToolFeatures } from '@modules/tool/tool-config'; import { Test, TestingModule } from '@nestjs/testing'; import { Course } from '@shared/domain/entity'; import { CourseRepo, LegacyBoardRepo, UserRepo } from '@shared/repo'; @@ -16,7 +16,6 @@ import { setupEntities, userFactory, } from '@shared/testing'; -import { IToolFeatures } from '@src/modules/tool/tool-config'; import { contextExternalToolFactory } from '../../tool/context-external-tool/testing'; import { BoardCopyService } from './board-copy.service'; import { CourseCopyService } from './course-copy.service'; diff --git a/apps/server/src/modules/learnroom/uc/course-import.uc.spec.ts b/apps/server/src/modules/learnroom/uc/course-import.uc.spec.ts index eedae71a09f..fe50b3f5926 100644 --- a/apps/server/src/modules/learnroom/uc/course-import.uc.spec.ts +++ b/apps/server/src/modules/learnroom/uc/course-import.uc.spec.ts @@ -1,12 +1,12 @@ import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { MikroORM } from '@mikro-orm/core'; +import { AuthorizationService } from '@modules/authorization'; import { NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface'; import { courseFactory, setupEntities, userFactory } from '@shared/testing'; -import { AuthorizationService } from '@src/modules/authorization'; import { LearnroomConfig } from '../learnroom.config'; import { CommonCartridgeImportService } from '../service'; import { CourseImportUc } from './course-import.uc'; diff --git a/apps/server/src/modules/learnroom/uc/course-import.uc.ts b/apps/server/src/modules/learnroom/uc/course-import.uc.ts index 4eccabe8132..33b0e9a3a63 100644 --- a/apps/server/src/modules/learnroom/uc/course-import.uc.ts +++ b/apps/server/src/modules/learnroom/uc/course-import.uc.ts @@ -1,8 +1,8 @@ +import { AuthorizationService } from '@modules/authorization'; import { Injectable, NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { AuthorizationService } from '@src/modules/authorization'; import { LearnroomConfig } from '../learnroom.config'; import { CommonCartridgeImportService } from '../service'; diff --git a/apps/server/src/modules/learnroom/uc/course.uc.spec.ts b/apps/server/src/modules/learnroom/uc/course.uc.spec.ts index 29b0a5be59b..3c2a082fd4a 100644 --- a/apps/server/src/modules/learnroom/uc/course.uc.spec.ts +++ b/apps/server/src/modules/learnroom/uc/course.uc.spec.ts @@ -1,12 +1,12 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { AuthorizationService } from '@modules/authorization'; +import { RoleDto, RoleService } from '@modules/role'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission, RoleName, SortOrder } from '@shared/domain/interface'; import { CourseRepo } from '@shared/repo'; import { courseFactory, setupEntities, UserAndAccountTestFactory } from '@shared/testing'; -import { AuthorizationService } from '@src/modules/authorization'; -import { RoleDto, RoleService } from '@src/modules/role'; -import { CourseUc } from './course.uc'; import { CourseService } from '../service'; +import { CourseUc } from './course.uc'; describe('CourseUc', () => { let module: TestingModule; diff --git a/apps/server/src/modules/learnroom/uc/course.uc.ts b/apps/server/src/modules/learnroom/uc/course.uc.ts index a60676803d9..ed7abf98a1d 100644 --- a/apps/server/src/modules/learnroom/uc/course.uc.ts +++ b/apps/server/src/modules/learnroom/uc/course.uc.ts @@ -1,11 +1,11 @@ +import { AuthorizationService } from '@modules/authorization'; +import { RoleService } from '@modules/role'; import { Injectable } from '@nestjs/common'; import { PaginationParams } from '@shared/controller/'; import { Course } from '@shared/domain/entity'; import { SortOrder } from '@shared/domain/interface'; import { Counted, EntityId } from '@shared/domain/types'; import { CourseRepo } from '@shared/repo'; -import { AuthorizationService } from '@src/modules/authorization'; -import { RoleService } from '@src/modules/role'; import { RoleNameMapper } from '../mapper/rolename.mapper'; import { CourseService } from '../service';