Skip to content

Commit

Permalink
EW-793 changing import path
Browse files Browse the repository at this point in the history
  • Loading branch information
psachmann committed Jun 21, 2024
1 parent f3cb026 commit 13f5013
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/learnroom/uc/course-import.uc.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 3 additions & 3 deletions apps/server/src/modules/learnroom/uc/course.uc.spec.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/modules/learnroom/uc/course.uc.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down

0 comments on commit 13f5013

Please sign in to comment.