diff --git a/apps/server/doc/summary.json b/apps/server/doc/summary.json index 834b92cb5f4..2c7489c537a 100644 --- a/apps/server/doc/summary.json +++ b/apps/server/doc/summary.json @@ -61,7 +61,7 @@ }, { "title": "S3ClientModule", - "file": "../src/shared/infra/s3-client/README.md" + "file": "../src/infra/s3-client/README.md" } ] } diff --git a/apps/server/src/apps/helpers/prometheus-metrics.spec.ts b/apps/server/src/apps/helpers/prometheus-metrics.spec.ts index 0c4530f99b8..396fc4865b6 100644 --- a/apps/server/src/apps/helpers/prometheus-metrics.spec.ts +++ b/apps/server/src/apps/helpers/prometheus-metrics.spec.ts @@ -5,7 +5,7 @@ import { PrometheusMetricsConfig, createAPIResponseTimeMetricMiddleware, createPrometheusMetricsApp, -} from '@shared/infra/metrics'; +} from '@infra/metrics'; import { Logger } from '@src/core/logger'; import express, { Express, NextFunction, Request, RequestHandler, Response } from 'express'; import { @@ -15,9 +15,9 @@ import { createAndStartPrometheusMetricsAppIfEnabled, } from './prometheus-metrics'; -jest.mock('@shared/infra/metrics', () => { +jest.mock('@infra/metrics', () => { const moduleMock: unknown = { - ...jest.requireActual('@shared/infra/metrics'), + ...jest.requireActual('@infra/metrics'), createAPIResponseTimeMetricMiddleware: jest.fn(), createPrometheusMetricsApp: jest.fn(), }; diff --git a/apps/server/src/apps/helpers/prometheus-metrics.ts b/apps/server/src/apps/helpers/prometheus-metrics.ts index 751cada4c2f..56d04b85d89 100644 --- a/apps/server/src/apps/helpers/prometheus-metrics.ts +++ b/apps/server/src/apps/helpers/prometheus-metrics.ts @@ -4,7 +4,7 @@ import { PrometheusMetricsConfig, createAPIResponseTimeMetricMiddleware, createPrometheusMetricsApp, -} from '@shared/infra/metrics'; +} from '@infra/metrics'; import { LogMessage, Loggable, Logger } from '@src/core/logger'; import { AppStartLoggable } from './app-start-loggable'; diff --git a/apps/server/src/apps/server.app.ts b/apps/server/src/apps/server.app.ts index bd235d5261f..9538d6c8515 100644 --- a/apps/server/src/apps/server.app.ts +++ b/apps/server/src/apps/server.app.ts @@ -5,7 +5,7 @@ import { MikroORM } from '@mikro-orm/core'; import { NestFactory } from '@nestjs/core'; import { ExpressAdapter } from '@nestjs/platform-express'; import { enableOpenApiDocs } from '@shared/controller/swagger'; -import { Mail, MailService } from '@shared/infra/mail'; +import { Mail, MailService } from '@infra/mail'; import { LegacyLogger, Logger } from '@src/core/logger'; import { AccountService } from '@modules/account/services/account.service'; import { TeamService } from '@modules/teams/service/team.service'; diff --git a/apps/server/src/console/api-test/database-management.console.api.spec.ts b/apps/server/src/console/api-test/database-management.console.api.spec.ts index 6a2a8de7e7f..ea3cc340616 100644 --- a/apps/server/src/console/api-test/database-management.console.api.spec.ts +++ b/apps/server/src/console/api-test/database-management.console.api.spec.ts @@ -1,5 +1,5 @@ import { INestApplicationContext } from '@nestjs/common'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { ServerConsoleModule } from '@src/console/console.module'; import { CommanderError } from 'commander'; import { BootstrapConsole, ConsoleService } from 'nestjs-console'; diff --git a/apps/server/src/console/api-test/server-console.api.spec.ts b/apps/server/src/console/api-test/server-console.api.spec.ts index 0621a809c36..d9b71bd2fbc 100644 --- a/apps/server/src/console/api-test/server-console.api.spec.ts +++ b/apps/server/src/console/api-test/server-console.api.spec.ts @@ -2,7 +2,7 @@ import { INestApplicationContext } from '@nestjs/common'; import { BootstrapConsole, ConsoleService } from 'nestjs-console'; import { ServerConsoleModule } from '@src/console/console.module'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { execute, TestBootstrapConsole } from './test-bootstrap.console'; describe('ServerConsole (API)', () => { diff --git a/apps/server/src/console/api-test/test-bootstrap.console.ts b/apps/server/src/console/api-test/test-bootstrap.console.ts index edb196b6a54..f346720bd22 100644 --- a/apps/server/src/console/api-test/test-bootstrap.console.ts +++ b/apps/server/src/console/api-test/test-bootstrap.console.ts @@ -1,6 +1,6 @@ import { createMock } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { DatabaseManagementUc } from '@modules/management/uc/database-management.uc'; import { AbstractBootstrapConsole, BootstrapConsole } from 'nestjs-console'; diff --git a/apps/server/src/console/console.module.ts b/apps/server/src/console/console.module.ts index 2cad08943eb..9d30db8fedb 100644 --- a/apps/server/src/console/console.module.ts +++ b/apps/server/src/console/console.module.ts @@ -4,8 +4,8 @@ import { MikroOrmModule } from '@mikro-orm/nestjs'; import { Module, NotFoundException } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { ALL_ENTITIES } from '@shared/domain'; -import { ConsoleWriterModule } from '@shared/infra/console/console-writer/console-writer.module'; -import { KeycloakModule } from '@shared/infra/identity-management/keycloak/keycloak.module'; +import { ConsoleWriterModule } from '@infra/console/console-writer/console-writer.module'; +import { KeycloakModule } from '@infra/identity-management/keycloak/keycloak.module'; import { DB_PASSWORD, DB_URL, DB_USERNAME, createConfigModuleOptions } from '@src/config'; import { FilesModule } from '@modules/files'; import { FileEntity } from '@modules/files/entity'; diff --git a/apps/server/src/console/server.console.spec.ts b/apps/server/src/console/server.console.spec.ts index 60efe0c962f..46ba3fff065 100644 --- a/apps/server/src/console/server.console.spec.ts +++ b/apps/server/src/console/server.console.spec.ts @@ -1,5 +1,5 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { ServerConsoleModule } from './console.module'; import { ServerConsole } from './server.console'; diff --git a/apps/server/src/console/server.console.ts b/apps/server/src/console/server.console.ts index 0b0d0b45c4a..32ff8182241 100644 --- a/apps/server/src/console/server.console.ts +++ b/apps/server/src/console/server.console.ts @@ -1,6 +1,6 @@ /* eslint-disable no-console */ import { Command, Console } from 'nestjs-console'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; @Console({ command: 'server', description: 'sample server console' }) export class ServerConsole { diff --git a/apps/server/src/core/error/filter/global-error.filter.ts b/apps/server/src/core/error/filter/global-error.filter.ts index 56760b18dd9..314c8247d18 100644 --- a/apps/server/src/core/error/filter/global-error.filter.ts +++ b/apps/server/src/core/error/filter/global-error.filter.ts @@ -1,6 +1,6 @@ import { ArgumentsHost, Catch, ExceptionFilter, HttpException, InternalServerErrorException } from '@nestjs/common'; import { ApiValidationError, BusinessError } from '@shared/common'; -import { IError, RpcMessage } from '@shared/infra/rabbitmq/rpc-message'; +import { IError, RpcMessage } from '@infra/rabbitmq/rpc-message'; import { ErrorLogger, Loggable } from '@src/core/logger'; import { LoggingUtils } from '@src/core/logger/logging.utils'; import { Response } from 'express'; diff --git a/apps/server/src/shared/infra/antivirus/antivirus.module.spec.ts b/apps/server/src/infra/antivirus/antivirus.module.spec.ts similarity index 100% rename from apps/server/src/shared/infra/antivirus/antivirus.module.spec.ts rename to apps/server/src/infra/antivirus/antivirus.module.spec.ts diff --git a/apps/server/src/shared/infra/antivirus/antivirus.module.ts b/apps/server/src/infra/antivirus/antivirus.module.ts similarity index 100% rename from apps/server/src/shared/infra/antivirus/antivirus.module.ts rename to apps/server/src/infra/antivirus/antivirus.module.ts diff --git a/apps/server/src/shared/infra/antivirus/antivirus.service.spec.ts b/apps/server/src/infra/antivirus/antivirus.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/antivirus/antivirus.service.spec.ts rename to apps/server/src/infra/antivirus/antivirus.service.spec.ts diff --git a/apps/server/src/shared/infra/antivirus/antivirus.service.ts b/apps/server/src/infra/antivirus/antivirus.service.ts similarity index 100% rename from apps/server/src/shared/infra/antivirus/antivirus.service.ts rename to apps/server/src/infra/antivirus/antivirus.service.ts diff --git a/apps/server/src/shared/infra/antivirus/index.ts b/apps/server/src/infra/antivirus/index.ts similarity index 100% rename from apps/server/src/shared/infra/antivirus/index.ts rename to apps/server/src/infra/antivirus/index.ts diff --git a/apps/server/src/shared/infra/antivirus/interfaces/antivirus.ts b/apps/server/src/infra/antivirus/interfaces/antivirus.ts similarity index 100% rename from apps/server/src/shared/infra/antivirus/interfaces/antivirus.ts rename to apps/server/src/infra/antivirus/interfaces/antivirus.ts diff --git a/apps/server/src/shared/infra/antivirus/interfaces/index.ts b/apps/server/src/infra/antivirus/interfaces/index.ts similarity index 96% rename from apps/server/src/shared/infra/antivirus/interfaces/index.ts rename to apps/server/src/infra/antivirus/interfaces/index.ts index 6c4771f9cd5..b41764286b4 100644 --- a/apps/server/src/shared/infra/antivirus/interfaces/index.ts +++ b/apps/server/src/infra/antivirus/interfaces/index.ts @@ -1 +1 @@ -export * from './antivirus'; +export * from './antivirus'; diff --git a/apps/server/src/shared/infra/cache/cache.module.ts b/apps/server/src/infra/cache/cache.module.ts similarity index 100% rename from apps/server/src/shared/infra/cache/cache.module.ts rename to apps/server/src/infra/cache/cache.module.ts diff --git a/apps/server/src/shared/infra/cache/index.ts b/apps/server/src/infra/cache/index.ts similarity index 100% rename from apps/server/src/shared/infra/cache/index.ts rename to apps/server/src/infra/cache/index.ts diff --git a/apps/server/src/shared/infra/cache/interface/cache-store-type.enum.ts b/apps/server/src/infra/cache/interface/cache-store-type.enum.ts similarity index 100% rename from apps/server/src/shared/infra/cache/interface/cache-store-type.enum.ts rename to apps/server/src/infra/cache/interface/cache-store-type.enum.ts diff --git a/apps/server/src/shared/infra/cache/interface/index.ts b/apps/server/src/infra/cache/interface/index.ts similarity index 100% rename from apps/server/src/shared/infra/cache/interface/index.ts rename to apps/server/src/infra/cache/interface/index.ts diff --git a/apps/server/src/shared/infra/cache/service/cache.service.ts b/apps/server/src/infra/cache/service/cache.service.ts similarity index 100% rename from apps/server/src/shared/infra/cache/service/cache.service.ts rename to apps/server/src/infra/cache/service/cache.service.ts diff --git a/apps/server/src/shared/infra/calendar/calendar.module.ts b/apps/server/src/infra/calendar/calendar.module.ts similarity index 58% rename from apps/server/src/shared/infra/calendar/calendar.module.ts rename to apps/server/src/infra/calendar/calendar.module.ts index feb0611fcdc..b4eddacef92 100644 --- a/apps/server/src/shared/infra/calendar/calendar.module.ts +++ b/apps/server/src/infra/calendar/calendar.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { HttpModule } from '@nestjs/axios'; -import { CalendarService } from '@shared/infra/calendar/service/calendar.service'; -import { CalendarMapper } from '@shared/infra/calendar/mapper/calendar.mapper'; +import { CalendarService } from './service/calendar.service'; +import { CalendarMapper } from './mapper/calendar.mapper'; @Module({ imports: [HttpModule], diff --git a/apps/server/src/shared/infra/calendar/dto/calendar-event.dto.ts b/apps/server/src/infra/calendar/dto/calendar-event.dto.ts similarity index 100% rename from apps/server/src/shared/infra/calendar/dto/calendar-event.dto.ts rename to apps/server/src/infra/calendar/dto/calendar-event.dto.ts diff --git a/apps/server/src/shared/infra/calendar/index.ts b/apps/server/src/infra/calendar/index.ts similarity index 100% rename from apps/server/src/shared/infra/calendar/index.ts rename to apps/server/src/infra/calendar/index.ts diff --git a/apps/server/src/shared/infra/calendar/interface/calendar-event.interface.ts b/apps/server/src/infra/calendar/interface/calendar-event.interface.ts similarity index 100% rename from apps/server/src/shared/infra/calendar/interface/calendar-event.interface.ts rename to apps/server/src/infra/calendar/interface/calendar-event.interface.ts diff --git a/apps/server/src/shared/infra/calendar/mapper/calendar.mapper.spec.ts b/apps/server/src/infra/calendar/mapper/calendar.mapper.spec.ts similarity index 80% rename from apps/server/src/shared/infra/calendar/mapper/calendar.mapper.spec.ts rename to apps/server/src/infra/calendar/mapper/calendar.mapper.spec.ts index 512173c8ccb..9679ce0a4fa 100644 --- a/apps/server/src/shared/infra/calendar/mapper/calendar.mapper.spec.ts +++ b/apps/server/src/infra/calendar/mapper/calendar.mapper.spec.ts @@ -1,6 +1,6 @@ -import { ICalendarEvent } from '@shared/infra/calendar/interface/calendar-event.interface'; +import { ICalendarEvent } from '@infra/calendar/interface/calendar-event.interface'; import { Test, TestingModule } from '@nestjs/testing'; -import { CalendarMapper } from '@shared/infra/calendar/mapper/calendar.mapper'; +import { CalendarMapper } from './calendar.mapper'; describe('CalendarMapper', () => { let module: TestingModule; diff --git a/apps/server/src/shared/infra/calendar/mapper/calendar.mapper.ts b/apps/server/src/infra/calendar/mapper/calendar.mapper.ts similarity index 62% rename from apps/server/src/shared/infra/calendar/mapper/calendar.mapper.ts rename to apps/server/src/infra/calendar/mapper/calendar.mapper.ts index 8a71dbcb75f..a75ff01eae6 100644 --- a/apps/server/src/shared/infra/calendar/mapper/calendar.mapper.ts +++ b/apps/server/src/infra/calendar/mapper/calendar.mapper.ts @@ -1,6 +1,6 @@ -import { ICalendarEvent } from '@shared/infra/calendar/interface/calendar-event.interface'; +import { ICalendarEvent } from '@infra/calendar/interface/calendar-event.interface'; import { Injectable } from '@nestjs/common'; -import { CalendarEventDto } from '@shared/infra/calendar/dto/calendar-event.dto'; +import { CalendarEventDto } from '../dto/calendar-event.dto'; @Injectable() export class CalendarMapper { diff --git a/apps/server/src/shared/infra/calendar/service/calendar.service.spec.ts b/apps/server/src/infra/calendar/service/calendar.service.spec.ts similarity index 90% rename from apps/server/src/shared/infra/calendar/service/calendar.service.spec.ts rename to apps/server/src/infra/calendar/service/calendar.service.spec.ts index 43ca5ad06d4..ed6bb4620bc 100644 --- a/apps/server/src/shared/infra/calendar/service/calendar.service.spec.ts +++ b/apps/server/src/infra/calendar/service/calendar.service.spec.ts @@ -3,12 +3,12 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { HttpService } from '@nestjs/axios'; import { InternalServerErrorException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { CalendarEventDto, CalendarService } from '@shared/infra/calendar'; -import { ICalendarEvent } from '@shared/infra/calendar/interface/calendar-event.interface'; -import { CalendarMapper } from '@shared/infra/calendar/mapper/calendar.mapper'; +import { CalendarEventDto, CalendarService } from '@infra/calendar'; import { axiosResponseFactory } from '@shared/testing'; import { AxiosResponse } from 'axios'; import { of, throwError } from 'rxjs'; +import { CalendarMapper } from '../mapper/calendar.mapper'; +import { ICalendarEvent } from '../interface/calendar-event.interface'; describe('CalendarServiceSpec', () => { let module: TestingModule; diff --git a/apps/server/src/shared/infra/calendar/service/calendar.service.ts b/apps/server/src/infra/calendar/service/calendar.service.ts similarity index 91% rename from apps/server/src/shared/infra/calendar/service/calendar.service.ts rename to apps/server/src/infra/calendar/service/calendar.service.ts index b79564634a5..3bf2a6576be 100644 --- a/apps/server/src/shared/infra/calendar/service/calendar.service.ts +++ b/apps/server/src/infra/calendar/service/calendar.service.ts @@ -2,12 +2,12 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { HttpService } from '@nestjs/axios'; import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { EntityId } from '@shared/domain'; -import { CalendarEventDto } from '@shared/infra/calendar/dto/calendar-event.dto'; -import { CalendarMapper } from '@shared/infra/calendar/mapper/calendar.mapper'; import { ErrorUtils } from '@src/core/error/utils'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Observable, firstValueFrom } from 'rxjs'; import { URL, URLSearchParams } from 'url'; +import { CalendarMapper } from '../mapper/calendar.mapper'; +import { CalendarEventDto } from '../dto/calendar-event.dto'; import { ICalendarEvent } from '../interface/calendar-event.interface'; @Injectable() diff --git a/apps/server/src/shared/infra/collaborative-storage/collaborative-storage-adapter.module.ts b/apps/server/src/infra/collaborative-storage/collaborative-storage-adapter.module.ts similarity index 75% rename from apps/server/src/shared/infra/collaborative-storage/collaborative-storage-adapter.module.ts rename to apps/server/src/infra/collaborative-storage/collaborative-storage-adapter.module.ts index 84e4f4596d6..f60ff664654 100644 --- a/apps/server/src/shared/infra/collaborative-storage/collaborative-storage-adapter.module.ts +++ b/apps/server/src/infra/collaborative-storage/collaborative-storage-adapter.module.ts @@ -1,14 +1,14 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { HttpModule } from '@nestjs/axios'; import { Module, Provider } from '@nestjs/common'; -import { CollaborativeStorageAdapterMapper } from '@shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper'; -import { NextcloudClient } from '@shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client'; -import { NextcloudStrategy } from '@shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy'; import { LtiToolRepo } from '@shared/repo/ltitool/'; import { LoggerModule } from '@src/core/logger'; import { ToolModule } from '@modules/tool'; import { PseudonymModule } from '@modules/pseudonym'; import { UserModule } from '@modules/user'; +import { NextcloudStrategy } from './strategy/nextcloud/nextcloud.strategy'; +import { NextcloudClient } from './strategy/nextcloud/nextcloud.client'; +import { CollaborativeStorageAdapterMapper } from './mapper'; import { CollaborativeStorageAdapter } from './collaborative-storage.adapter'; const storageStrategy: Provider = { diff --git a/apps/server/src/shared/infra/collaborative-storage/collaborative-storage.adapter.spec.ts b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.spec.ts similarity index 89% rename from apps/server/src/shared/infra/collaborative-storage/collaborative-storage.adapter.spec.ts rename to apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.spec.ts index c33f9be282a..3b9ba2175e6 100644 --- a/apps/server/src/shared/infra/collaborative-storage/collaborative-storage.adapter.spec.ts +++ b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.spec.ts @@ -2,11 +2,11 @@ import { createMock } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain'; -import { CollaborativeStorageAdapter } from '@shared/infra/collaborative-storage/collaborative-storage.adapter'; -import { CollaborativeStorageAdapterMapper } from '@shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper'; -import { ICollaborativeStorageStrategy } from '@shared/infra/collaborative-storage/strategy/base.interface.strategy'; import { LegacyLogger } from '@src/core/logger'; -import { TeamDto } from '@modules/collaborative-storage/services/dto/team.dto'; +import { TeamDto } from '@modules/collaborative-storage/services/dto/team.dto'; // invalid import please fix +import { CollaborativeStorageAdapter } from './collaborative-storage.adapter'; +import { CollaborativeStorageAdapterMapper } from './mapper/collaborative-storage-adapter.mapper'; +import { ICollaborativeStorageStrategy } from './strategy/base.interface.strategy'; class TestStrategy implements ICollaborativeStorageStrategy { baseURL: string; diff --git a/apps/server/src/shared/infra/collaborative-storage/collaborative-storage.adapter.ts b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.ts similarity index 88% rename from apps/server/src/shared/infra/collaborative-storage/collaborative-storage.adapter.ts rename to apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.ts index 9edcafbdc12..b50657f393e 100644 --- a/apps/server/src/shared/infra/collaborative-storage/collaborative-storage.adapter.ts +++ b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.ts @@ -1,10 +1,10 @@ import { TeamPermissionsDto } from '@modules/collaborative-storage/services/dto/team-permissions.dto'; import { TeamDto } from '@modules/collaborative-storage/services/dto/team.dto'; -import { ICollaborativeStorageStrategy } from '@shared/infra/collaborative-storage/strategy/base.interface.strategy'; import { Inject, Injectable } from '@nestjs/common'; -import { CollaborativeStorageAdapterMapper } from '@shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper'; import { LegacyLogger } from '@src/core/logger'; import { RoleDto } from '@modules/role/service/dto/role.dto'; +import { CollaborativeStorageAdapterMapper } from './mapper/collaborative-storage-adapter.mapper'; +import { ICollaborativeStorageStrategy } from './strategy/base.interface.strategy'; /** * Provides an Adapter to an external collaborative storage. diff --git a/apps/server/src/shared/infra/collaborative-storage/dto/team-role-permissions.dto.ts b/apps/server/src/infra/collaborative-storage/dto/team-role-permissions.dto.ts similarity index 100% rename from apps/server/src/shared/infra/collaborative-storage/dto/team-role-permissions.dto.ts rename to apps/server/src/infra/collaborative-storage/dto/team-role-permissions.dto.ts diff --git a/apps/server/src/infra/collaborative-storage/index.ts b/apps/server/src/infra/collaborative-storage/index.ts new file mode 100644 index 00000000000..49dea4522b3 --- /dev/null +++ b/apps/server/src/infra/collaborative-storage/index.ts @@ -0,0 +1,2 @@ +export { CollaborativeStorageAdapter } from './collaborative-storage.adapter'; +export { CollaborativeStorageAdapterModule } from './collaborative-storage-adapter.module'; diff --git a/apps/server/src/shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.spec.ts b/apps/server/src/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.spec.ts similarity index 89% rename from apps/server/src/shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.spec.ts rename to apps/server/src/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.spec.ts index cba6ef365c2..bea98c50ebe 100644 --- a/apps/server/src/shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.spec.ts +++ b/apps/server/src/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.spec.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain'; -import { CollaborativeStorageAdapterMapper } from '@shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper'; +import { CollaborativeStorageAdapterMapper } from '@infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper'; describe('TeamStorage Mapper', () => { let module: TestingModule; diff --git a/apps/server/src/shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.ts b/apps/server/src/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.ts similarity index 100% rename from apps/server/src/shared/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.ts rename to apps/server/src/infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper.ts diff --git a/apps/server/src/infra/collaborative-storage/mapper/index.ts b/apps/server/src/infra/collaborative-storage/mapper/index.ts new file mode 100644 index 00000000000..08f05350be2 --- /dev/null +++ b/apps/server/src/infra/collaborative-storage/mapper/index.ts @@ -0,0 +1 @@ +export * from './collaborative-storage-adapter.mapper'; diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/base.interface.strategy.ts b/apps/server/src/infra/collaborative-storage/strategy/base.interface.strategy.ts similarity index 100% rename from apps/server/src/shared/infra/collaborative-storage/strategy/base.interface.strategy.ts rename to apps/server/src/infra/collaborative-storage/strategy/base.interface.strategy.ts diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/httpRequests/NextcloudGroups.http b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/httpRequests/NextcloudGroups.http similarity index 100% rename from apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/httpRequests/NextcloudGroups.http rename to apps/server/src/infra/collaborative-storage/strategy/nextcloud/httpRequests/NextcloudGroups.http diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts similarity index 99% rename from apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts rename to apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts index 5aa4cb8b09d..225ddac258d 100644 --- a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts +++ b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts @@ -3,11 +3,11 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { NotFoundException, NotImplementedException, UnprocessableEntityException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { NextcloudClient } from '@shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client'; import { axiosResponseFactory } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { AxiosResponse } from 'axios'; import { Observable, of } from 'rxjs'; +import { NextcloudClient } from './nextcloud.client'; import { GroupUsers, GroupfoldersCreated, diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts similarity index 99% rename from apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts rename to apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts index 75caf1bc0e4..ab4a139224c 100644 --- a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts +++ b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts @@ -15,7 +15,7 @@ import { NextcloudGroups, OcsResponse, SuccessfulRes, -} from '@shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.interface'; +} from '@infra/collaborative-storage/strategy/nextcloud/nextcloud.interface'; import { ErrorUtils } from '@src/core/error/utils'; import { LegacyLogger } from '@src/core/logger'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.interface.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.interface.ts similarity index 100% rename from apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.interface.ts rename to apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.interface.ts diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts similarity index 98% rename from apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts rename to apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts index 7684b14dbb0..706e360b700 100644 --- a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts +++ b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts @@ -3,9 +3,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { LtiPrivacyPermission, LtiRoleType, Pseudonym, RoleName, User, UserDO } from '@shared/domain'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; -import { TeamRolePermissionsDto } from '@shared/infra/collaborative-storage/dto/team-role-permissions.dto'; -import { NextcloudClient } from '@shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.client'; -import { NextcloudStrategy } from '@shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy'; import { LtiToolRepo } from '@shared/repo'; import { ltiToolDOFactory, pseudonymFactory, setupEntities, userDoFactory, userFactory } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; @@ -13,6 +10,9 @@ import { TeamDto, TeamUserDto } from '@modules/collaborative-storage/services/dt import { PseudonymService } from '@modules/pseudonym'; import { ExternalToolService } from '@modules/tool/external-tool/service'; import { UserService } from '@modules/user'; +import { NextcloudStrategy } from './nextcloud.strategy'; +import { NextcloudClient } from './nextcloud.client'; +import { TeamRolePermissionsDto } from '../../dto/team-role-permissions.dto'; class NextcloudStrategySpec extends NextcloudStrategy { static specGenerateGroupId(dto: TeamRolePermissionsDto): string { diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts similarity index 100% rename from apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts rename to apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts diff --git a/apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/test.json b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/test.json similarity index 100% rename from apps/server/src/shared/infra/collaborative-storage/strategy/nextcloud/test.json rename to apps/server/src/infra/collaborative-storage/strategy/nextcloud/test.json diff --git a/apps/server/src/shared/infra/console/console-writer/console-writer.module.spec.ts b/apps/server/src/infra/console/console-writer/console-writer.module.spec.ts similarity index 100% rename from apps/server/src/shared/infra/console/console-writer/console-writer.module.spec.ts rename to apps/server/src/infra/console/console-writer/console-writer.module.spec.ts diff --git a/apps/server/src/shared/infra/console/console-writer/console-writer.module.ts b/apps/server/src/infra/console/console-writer/console-writer.module.ts similarity index 100% rename from apps/server/src/shared/infra/console/console-writer/console-writer.module.ts rename to apps/server/src/infra/console/console-writer/console-writer.module.ts diff --git a/apps/server/src/shared/infra/console/console-writer/console-writer.service.spec.ts b/apps/server/src/infra/console/console-writer/console-writer.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/console/console-writer/console-writer.service.spec.ts rename to apps/server/src/infra/console/console-writer/console-writer.service.spec.ts diff --git a/apps/server/src/shared/infra/console/console-writer/console-writer.service.ts b/apps/server/src/infra/console/console-writer/console-writer.service.ts similarity index 100% rename from apps/server/src/shared/infra/console/console-writer/console-writer.service.ts rename to apps/server/src/infra/console/console-writer/console-writer.service.ts diff --git a/apps/server/src/shared/infra/console/console-writer/index.ts b/apps/server/src/infra/console/console-writer/index.ts similarity index 100% rename from apps/server/src/shared/infra/console/console-writer/index.ts rename to apps/server/src/infra/console/console-writer/index.ts diff --git a/apps/server/src/shared/infra/console/index.ts b/apps/server/src/infra/console/index.ts similarity index 100% rename from apps/server/src/shared/infra/console/index.ts rename to apps/server/src/infra/console/index.ts diff --git a/apps/server/src/shared/infra/database/index.ts b/apps/server/src/infra/database/index.ts similarity index 100% rename from apps/server/src/shared/infra/database/index.ts rename to apps/server/src/infra/database/index.ts diff --git a/apps/server/src/shared/infra/database/management/database-management.module.spec.ts b/apps/server/src/infra/database/management/database-management.module.spec.ts similarity index 90% rename from apps/server/src/shared/infra/database/management/database-management.module.spec.ts rename to apps/server/src/infra/database/management/database-management.module.spec.ts index 2ea05d7a121..1f80c58b5d4 100644 --- a/apps/server/src/shared/infra/database/management/database-management.module.spec.ts +++ b/apps/server/src/infra/database/management/database-management.module.spec.ts @@ -1,5 +1,5 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { DatabaseManagementModule } from './database-management.module'; import { DatabaseManagementService } from './database-management.service'; diff --git a/apps/server/src/shared/infra/database/management/database-management.module.ts b/apps/server/src/infra/database/management/database-management.module.ts similarity index 100% rename from apps/server/src/shared/infra/database/management/database-management.module.ts rename to apps/server/src/infra/database/management/database-management.module.ts diff --git a/apps/server/src/shared/infra/database/management/database-management.service.spec.ts b/apps/server/src/infra/database/management/database-management.service.spec.ts similarity index 97% rename from apps/server/src/shared/infra/database/management/database-management.service.spec.ts rename to apps/server/src/infra/database/management/database-management.service.spec.ts index 2487fda1280..7bbe7bdc5e3 100644 --- a/apps/server/src/shared/infra/database/management/database-management.service.spec.ts +++ b/apps/server/src/infra/database/management/database-management.service.spec.ts @@ -1,6 +1,6 @@ import { MikroORM } from '@mikro-orm/core'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ObjectId } from 'mongodb'; import { DatabaseManagementService } from './database-management.service'; diff --git a/apps/server/src/shared/infra/database/management/database-management.service.ts b/apps/server/src/infra/database/management/database-management.service.ts similarity index 100% rename from apps/server/src/shared/infra/database/management/database-management.service.ts rename to apps/server/src/infra/database/management/database-management.service.ts diff --git a/apps/server/src/shared/infra/database/management/index.ts b/apps/server/src/infra/database/management/index.ts similarity index 100% rename from apps/server/src/shared/infra/database/management/index.ts rename to apps/server/src/infra/database/management/index.ts diff --git a/apps/server/src/shared/infra/database/mongo-memory-database/index.ts b/apps/server/src/infra/database/mongo-memory-database/index.ts similarity index 100% rename from apps/server/src/shared/infra/database/mongo-memory-database/index.ts rename to apps/server/src/infra/database/mongo-memory-database/index.ts diff --git a/apps/server/src/shared/infra/database/mongo-memory-database/mongo-memory-database.module.ts b/apps/server/src/infra/database/mongo-memory-database/mongo-memory-database.module.ts similarity index 100% rename from apps/server/src/shared/infra/database/mongo-memory-database/mongo-memory-database.module.ts rename to apps/server/src/infra/database/mongo-memory-database/mongo-memory-database.module.ts diff --git a/apps/server/src/shared/infra/database/mongo-memory-database/types.ts b/apps/server/src/infra/database/mongo-memory-database/types.ts similarity index 100% rename from apps/server/src/shared/infra/database/mongo-memory-database/types.ts rename to apps/server/src/infra/database/mongo-memory-database/types.ts diff --git a/apps/server/src/shared/infra/encryption/encryption.interface.ts b/apps/server/src/infra/encryption/encryption.interface.ts similarity index 100% rename from apps/server/src/shared/infra/encryption/encryption.interface.ts rename to apps/server/src/infra/encryption/encryption.interface.ts diff --git a/apps/server/src/shared/infra/encryption/encryption.module.spec.ts b/apps/server/src/infra/encryption/encryption.module.spec.ts similarity index 100% rename from apps/server/src/shared/infra/encryption/encryption.module.spec.ts rename to apps/server/src/infra/encryption/encryption.module.spec.ts diff --git a/apps/server/src/shared/infra/encryption/encryption.module.ts b/apps/server/src/infra/encryption/encryption.module.ts similarity index 100% rename from apps/server/src/shared/infra/encryption/encryption.module.ts rename to apps/server/src/infra/encryption/encryption.module.ts diff --git a/apps/server/src/shared/infra/encryption/encryption.service.spec.ts b/apps/server/src/infra/encryption/encryption.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/encryption/encryption.service.spec.ts rename to apps/server/src/infra/encryption/encryption.service.spec.ts diff --git a/apps/server/src/shared/infra/encryption/encryption.service.ts b/apps/server/src/infra/encryption/encryption.service.ts similarity index 100% rename from apps/server/src/shared/infra/encryption/encryption.service.ts rename to apps/server/src/infra/encryption/encryption.service.ts diff --git a/apps/server/src/shared/infra/encryption/index.ts b/apps/server/src/infra/encryption/index.ts similarity index 97% rename from apps/server/src/shared/infra/encryption/index.ts rename to apps/server/src/infra/encryption/index.ts index 201f12060e4..39019741bd0 100644 --- a/apps/server/src/shared/infra/encryption/index.ts +++ b/apps/server/src/infra/encryption/index.ts @@ -1,3 +1,3 @@ -export * from './encryption.module'; -export * from './encryption.interface'; -export * from './encryption.service'; +export * from './encryption.module'; +export * from './encryption.interface'; +export * from './encryption.service'; diff --git a/apps/server/src/shared/infra/feathers/feathers-service.provider.spec.ts b/apps/server/src/infra/feathers/feathers-service.provider.spec.ts similarity index 100% rename from apps/server/src/shared/infra/feathers/feathers-service.provider.spec.ts rename to apps/server/src/infra/feathers/feathers-service.provider.spec.ts diff --git a/apps/server/src/shared/infra/feathers/feathers-service.provider.ts b/apps/server/src/infra/feathers/feathers-service.provider.ts similarity index 100% rename from apps/server/src/shared/infra/feathers/feathers-service.provider.ts rename to apps/server/src/infra/feathers/feathers-service.provider.ts diff --git a/apps/server/src/shared/infra/feathers/feathers.module.ts b/apps/server/src/infra/feathers/feathers.module.ts similarity index 100% rename from apps/server/src/shared/infra/feathers/feathers.module.ts rename to apps/server/src/infra/feathers/feathers.module.ts diff --git a/apps/server/src/shared/infra/feathers/index.ts b/apps/server/src/infra/feathers/index.ts similarity index 100% rename from apps/server/src/shared/infra/feathers/index.ts rename to apps/server/src/infra/feathers/index.ts diff --git a/apps/server/src/shared/infra/file-system/file-system.adapter.spec.ts b/apps/server/src/infra/file-system/file-system.adapter.spec.ts similarity index 100% rename from apps/server/src/shared/infra/file-system/file-system.adapter.spec.ts rename to apps/server/src/infra/file-system/file-system.adapter.spec.ts diff --git a/apps/server/src/shared/infra/file-system/file-system.adapter.ts b/apps/server/src/infra/file-system/file-system.adapter.ts similarity index 100% rename from apps/server/src/shared/infra/file-system/file-system.adapter.ts rename to apps/server/src/infra/file-system/file-system.adapter.ts diff --git a/apps/server/src/shared/infra/file-system/file-system.module.spec.ts b/apps/server/src/infra/file-system/file-system.module.spec.ts similarity index 100% rename from apps/server/src/shared/infra/file-system/file-system.module.spec.ts rename to apps/server/src/infra/file-system/file-system.module.spec.ts diff --git a/apps/server/src/shared/infra/file-system/file-system.module.ts b/apps/server/src/infra/file-system/file-system.module.ts similarity index 100% rename from apps/server/src/shared/infra/file-system/file-system.module.ts rename to apps/server/src/infra/file-system/file-system.module.ts diff --git a/apps/server/src/shared/infra/file-system/index.ts b/apps/server/src/infra/file-system/index.ts similarity index 100% rename from apps/server/src/shared/infra/file-system/index.ts rename to apps/server/src/infra/file-system/index.ts diff --git a/apps/server/src/shared/infra/file-system/utf-8-test-file.txt b/apps/server/src/infra/file-system/utf-8-test-file.txt similarity index 100% rename from apps/server/src/shared/infra/file-system/utf-8-test-file.txt rename to apps/server/src/infra/file-system/utf-8-test-file.txt diff --git a/apps/server/src/shared/infra/identity-management/identity-management-oauth.service.ts b/apps/server/src/infra/identity-management/identity-management-oauth.service.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/identity-management-oauth.service.ts rename to apps/server/src/infra/identity-management/identity-management-oauth.service.ts diff --git a/apps/server/src/shared/infra/identity-management/identity-management.config.ts b/apps/server/src/infra/identity-management/identity-management.config.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/identity-management.config.ts rename to apps/server/src/infra/identity-management/identity-management.config.ts diff --git a/apps/server/src/shared/infra/identity-management/identity-management.module.spec.ts b/apps/server/src/infra/identity-management/identity-management.module.spec.ts similarity index 92% rename from apps/server/src/shared/infra/identity-management/identity-management.module.spec.ts rename to apps/server/src/infra/identity-management/identity-management.module.spec.ts index 9bbfe6d1f93..e81186d7562 100644 --- a/apps/server/src/shared/infra/identity-management/identity-management.module.spec.ts +++ b/apps/server/src/infra/identity-management/identity-management.module.spec.ts @@ -1,5 +1,5 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ConfigModule } from '@nestjs/config'; import { IdentityManagementService } from './identity-management.service'; import { IdentityManagementModule } from './identity-management.module'; diff --git a/apps/server/src/shared/infra/identity-management/identity-management.module.ts b/apps/server/src/infra/identity-management/identity-management.module.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/identity-management.module.ts rename to apps/server/src/infra/identity-management/identity-management.module.ts diff --git a/apps/server/src/shared/infra/identity-management/identity-management.service.ts b/apps/server/src/infra/identity-management/identity-management.service.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/identity-management.service.ts rename to apps/server/src/infra/identity-management/identity-management.service.ts diff --git a/apps/server/src/shared/infra/identity-management/index.ts b/apps/server/src/infra/identity-management/index.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/index.ts rename to apps/server/src/infra/identity-management/index.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-administration/interface/keycloak-settings.interface.ts b/apps/server/src/infra/identity-management/keycloak-administration/interface/keycloak-settings.interface.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-administration/interface/keycloak-settings.interface.ts rename to apps/server/src/infra/identity-management/keycloak-administration/interface/keycloak-settings.interface.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-administration/keycloak-administration.module.spec.ts b/apps/server/src/infra/identity-management/keycloak-administration/keycloak-administration.module.spec.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-administration/keycloak-administration.module.spec.ts rename to apps/server/src/infra/identity-management/keycloak-administration/keycloak-administration.module.spec.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-administration/keycloak-administration.module.ts b/apps/server/src/infra/identity-management/keycloak-administration/keycloak-administration.module.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-administration/keycloak-administration.module.ts rename to apps/server/src/infra/identity-management/keycloak-administration/keycloak-administration.module.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-administration/keycloak-config.ts b/apps/server/src/infra/identity-management/keycloak-administration/keycloak-config.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-administration/keycloak-config.ts rename to apps/server/src/infra/identity-management/keycloak-administration/keycloak-config.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service.spec.ts b/apps/server/src/infra/identity-management/keycloak-administration/service/keycloak-administration.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service.spec.ts rename to apps/server/src/infra/identity-management/keycloak-administration/service/keycloak-administration.service.spec.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service.ts b/apps/server/src/infra/identity-management/keycloak-administration/service/keycloak-administration.service.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service.ts rename to apps/server/src/infra/identity-management/keycloak-administration/service/keycloak-administration.service.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.spec.ts similarity index 98% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.spec.ts index 16c5c9c2d1a..9b3120b8b8c 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.spec.ts @@ -1,6 +1,6 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { LegacyLogger } from '@src/core/logger'; import { KeycloakConfigurationUc } from '../uc/keycloak-configuration.uc'; import { KeycloakConsole } from './keycloak-configuration.console'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts b/apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts similarity index 98% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts index 1d597e7020a..85d3f7a5a3c 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts @@ -1,4 +1,4 @@ -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { LegacyLogger } from '@src/core/logger'; import { Command, CommandOption, Console } from 'nestjs-console'; import { KeycloakConfigurationUc } from '../uc/keycloak-configuration.uc'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.spec.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.spec.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts b/apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/interface/json-account.interface.ts b/apps/server/src/infra/identity-management/keycloak-configuration/interface/json-account.interface.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/interface/json-account.interface.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/interface/json-account.interface.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/interface/json-user.interface.ts b/apps/server/src/infra/identity-management/keycloak-configuration/interface/json-user.interface.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/interface/json-user.interface.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/interface/json-user.interface.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/interface/keycloak-configuration-input-files.interface.ts b/apps/server/src/infra/identity-management/keycloak-configuration/interface/keycloak-configuration-input-files.interface.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/interface/keycloak-configuration-input-files.interface.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/interface/keycloak-configuration-input-files.interface.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-config.ts b/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-config.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-config.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/keycloak-config.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-configuration.module.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.spec.ts similarity index 94% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-configuration.module.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.spec.ts index 3e31e5dcb08..f1d0ee3808e 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-configuration.module.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.spec.ts @@ -1,5 +1,5 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ConfigModule } from '@nestjs/config'; import { KeycloakConfigurationModule } from './keycloak-configuration.module'; import { KeycloakConsole } from './console/keycloak-configuration.console'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts b/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts similarity index 93% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts index 2012dad00a5..4e570b30dcf 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { LoggerModule } from '@src/core/logger'; -import { EncryptionModule } from '@shared/infra/encryption'; -import { ConsoleWriterModule } from '@shared/infra/console'; +import { EncryptionModule } from '@infra/encryption'; +import { ConsoleWriterModule } from '@infra/console'; import { AccountModule } from '@modules/account'; import { SystemModule } from '@modules/system'; import { KeycloakAdministrationModule } from '../keycloak-administration/keycloak-administration.module'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.spec.ts similarity index 98% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.spec.ts index b28d74ca3d5..94ef9c042a4 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.spec.ts @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest'; import IdentityProviderRepresentation from '@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation'; import { ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { DefaultEncryptionService, SymetricKeyEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, SymetricKeyEncryptionService } from '@infra/encryption'; import { OidcConfigDto } from '@modules/system/service'; import { OidcIdentityProviderMapper } from './identity-provider.mapper'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.ts b/apps/server/src/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.ts similarity index 92% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.ts index 75737263cac..6573ed35a5b 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/mapper/identity-provider.mapper.ts @@ -1,6 +1,6 @@ import IdentityProviderRepresentation from '@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation'; import { Inject } from '@nestjs/common'; -import { DefaultEncryptionService, IEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, IEncryptionService } from '@infra/encryption'; import { OidcConfigDto } from '@modules/system/service'; export class OidcIdentityProviderMapper { diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.integration.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.integration.spec.ts similarity index 98% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.integration.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.integration.spec.ts index ad5af6a1d75..98ed3552918 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.integration.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.integration.spec.ts @@ -4,7 +4,7 @@ import AuthenticationExecutionExportRepresentation from '@keycloak/keycloak-admi import AuthenticationFlowRepresentation from '@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { SystemRepo } from '@shared/repo/system/system.repo'; import { systemFactory } from '@shared/testing/factory'; import { LoggerModule } from '@src/core/logger'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.spec.ts similarity index 99% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.spec.ts index 1388392995e..61e475fe3e3 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.spec.ts @@ -10,7 +10,7 @@ import { HttpService } from '@nestjs/axios'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { SystemEntity, SystemTypeEnum } from '@shared/domain'; -import { SymetricKeyEncryptionService } from '@shared/infra/encryption'; +import { SymetricKeyEncryptionService } from '@infra/encryption'; import { systemFactory } from '@shared/testing'; import { SystemOidcMapper } from '@modules/system/mapper/system-oidc.mapper'; import { SystemOidcService } from '@modules/system/service/system-oidc.service'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-configuration.service.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.integration.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.integration.spec.ts similarity index 98% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.integration.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.integration.spec.ts index baf86c58ccf..eba5e20fcd0 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.integration.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.integration.spec.ts @@ -3,7 +3,7 @@ import KeycloakAdminClient from '@keycloak/keycloak-admin-client'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { Account } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { accountFactory, cleanupCollections } from '@shared/testing'; import { LoggerModule } from '@src/core/logger'; import { v1 } from 'uuid'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.spec.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.integration.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.integration.spec.ts similarity index 97% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.integration.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.integration.spec.ts index 87f28a28d76..11858b56a2b 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.integration.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.integration.spec.ts @@ -2,7 +2,7 @@ import KeycloakAdminClient from '@keycloak/keycloak-admin-client'; import { faker } from '@faker-js/faker'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { LoggerModule } from '@src/core/logger'; import { v1 } from 'uuid'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.spec.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.spec.ts b/apps/server/src/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.spec.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.spec.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.spec.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.uc.ts b/apps/server/src/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.uc.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.uc.ts rename to apps/server/src/infra/identity-management/keycloak-configuration/uc/keycloak-configuration.uc.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak/keycloak.module.spec.ts b/apps/server/src/infra/identity-management/keycloak/keycloak.module.spec.ts similarity index 94% rename from apps/server/src/shared/infra/identity-management/keycloak/keycloak.module.spec.ts rename to apps/server/src/infra/identity-management/keycloak/keycloak.module.spec.ts index 6bed42efdd6..282d6dd0e40 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak/keycloak.module.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak/keycloak.module.spec.ts @@ -1,6 +1,6 @@ import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { KeycloakModule } from './keycloak.module'; import { KeycloakIdentityManagementService } from './service/keycloak-identity-management.service'; import { KeycloakIdentityManagementOauthService } from './service/keycloak-identity-management-oauth.service'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak/keycloak.module.ts b/apps/server/src/infra/identity-management/keycloak/keycloak.module.ts similarity index 92% rename from apps/server/src/shared/infra/identity-management/keycloak/keycloak.module.ts rename to apps/server/src/infra/identity-management/keycloak/keycloak.module.ts index 4f7407f80c9..c2fd27be29e 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak/keycloak.module.ts +++ b/apps/server/src/infra/identity-management/keycloak/keycloak.module.ts @@ -1,6 +1,6 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; -import { EncryptionModule } from '@shared/infra/encryption'; +import { EncryptionModule } from '@infra/encryption'; import { LoggerModule } from '@src/core/logger'; import { KeycloakAdministrationModule } from '../keycloak-administration/keycloak-administration.module'; import { KeycloakIdentityManagementOauthService } from './service/keycloak-identity-management-oauth.service'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.integration.spec.ts b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.integration.spec.ts similarity index 96% rename from apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.integration.spec.ts rename to apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.integration.spec.ts index 9e4cf5567c1..40456bbb184 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.integration.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.integration.spec.ts @@ -1,7 +1,7 @@ import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { KeycloakModule } from '@shared/infra/identity-management/keycloak/keycloak.module'; +import { MongoMemoryDatabaseModule } from '@infra/database'; +import { KeycloakModule } from '@infra/identity-management/keycloak/keycloak.module'; import { LoggerModule } from '@src/core/logger'; import { v1 } from 'uuid'; import { KeycloakAdministrationModule } from '../../keycloak-administration/keycloak-administration.module'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.spec.ts b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.spec.ts similarity index 99% rename from apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.spec.ts rename to apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.spec.ts index f9c3745ce64..9ccd20b6f99 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.spec.ts @@ -3,7 +3,7 @@ import KeycloakAdminClient from '@keycloak/keycloak-admin-client'; import { HttpService } from '@nestjs/axios'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { DefaultEncryptionService, IEncryptionService, SymetricKeyEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, IEncryptionService, SymetricKeyEncryptionService } from '@infra/encryption'; import { AxiosResponse } from 'axios'; import { of } from 'rxjs'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.ts b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.ts similarity index 97% rename from apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.ts rename to apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.ts index 7e10179b2cd..9eab3a4f60a 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.ts +++ b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management-oauth.service.ts @@ -1,7 +1,7 @@ import { HttpService } from '@nestjs/axios'; import { Inject, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { DefaultEncryptionService, IEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, IEncryptionService } from '@infra/encryption'; import { OauthConfigDto } from '@modules/system/service'; import qs from 'qs'; import { lastValueFrom } from 'rxjs'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management.service.integration.spec.ts b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management.service.integration.spec.ts similarity index 96% rename from apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management.service.integration.spec.ts rename to apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management.service.integration.spec.ts index fd66603f730..c5f83c35f17 100644 --- a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management.service.integration.spec.ts +++ b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management.service.integration.spec.ts @@ -4,8 +4,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpModule } from '@nestjs/axios'; import { Test, TestingModule } from '@nestjs/testing'; import { IdmAccount, IdmAccountUpdate } from '@shared/domain'; -import { KeycloakAdministrationService } from '@shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service'; -import { KeycloakModule } from '@shared/infra/identity-management/keycloak/keycloak.module'; +import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service'; +import { KeycloakModule } from '@infra/identity-management/keycloak/keycloak.module'; import { ServerModule } from '@modules/server'; import { v1 } from 'uuid'; import { IdentityManagementService } from '../../identity-management.service'; diff --git a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management.service.spec.ts b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management.service.spec.ts rename to apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management.service.spec.ts diff --git a/apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management.service.ts b/apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management.service.ts similarity index 100% rename from apps/server/src/shared/infra/identity-management/keycloak/service/keycloak-identity-management.service.ts rename to apps/server/src/infra/identity-management/keycloak/service/keycloak-identity-management.service.ts diff --git a/apps/server/src/shared/infra/index.ts b/apps/server/src/infra/index.ts similarity index 100% rename from apps/server/src/shared/infra/index.ts rename to apps/server/src/infra/index.ts diff --git a/apps/server/src/shared/infra/mail/index.ts b/apps/server/src/infra/mail/index.ts similarity index 100% rename from apps/server/src/shared/infra/mail/index.ts rename to apps/server/src/infra/mail/index.ts diff --git a/apps/server/src/shared/infra/mail/mail.interface.ts b/apps/server/src/infra/mail/mail.interface.ts similarity index 100% rename from apps/server/src/shared/infra/mail/mail.interface.ts rename to apps/server/src/infra/mail/mail.interface.ts diff --git a/apps/server/src/shared/infra/mail/mail.module.spec.ts b/apps/server/src/infra/mail/mail.module.spec.ts similarity index 90% rename from apps/server/src/shared/infra/mail/mail.module.spec.ts rename to apps/server/src/infra/mail/mail.module.spec.ts index 09cd1b6a9cc..3514b0e1043 100644 --- a/apps/server/src/shared/infra/mail/mail.module.spec.ts +++ b/apps/server/src/infra/mail/mail.module.spec.ts @@ -1,6 +1,6 @@ import { Configuration } from '@hpi-schul-cloud/commons'; import { Test, TestingModule } from '@nestjs/testing'; -import { RabbitMQWrapperTestModule } from '@shared/infra/rabbitmq/rabbitmq.module'; +import { RabbitMQWrapperTestModule } from '@infra/rabbitmq'; import { MailModule } from './mail.module'; import { MailService } from './mail.service'; diff --git a/apps/server/src/shared/infra/mail/mail.module.ts b/apps/server/src/infra/mail/mail.module.ts similarity index 100% rename from apps/server/src/shared/infra/mail/mail.module.ts rename to apps/server/src/infra/mail/mail.module.ts diff --git a/apps/server/src/shared/infra/mail/mail.service.spec.ts b/apps/server/src/infra/mail/mail.service.spec.ts similarity index 100% rename from apps/server/src/shared/infra/mail/mail.service.spec.ts rename to apps/server/src/infra/mail/mail.service.spec.ts diff --git a/apps/server/src/shared/infra/mail/mail.service.ts b/apps/server/src/infra/mail/mail.service.ts similarity index 100% rename from apps/server/src/shared/infra/mail/mail.service.ts rename to apps/server/src/infra/mail/mail.service.ts diff --git a/apps/server/src/shared/infra/metrics/index.ts b/apps/server/src/infra/metrics/index.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/index.ts rename to apps/server/src/infra/metrics/index.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/app.spec.ts b/apps/server/src/infra/metrics/prometheus/app.spec.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/app.spec.ts rename to apps/server/src/infra/metrics/prometheus/app.spec.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/app.ts b/apps/server/src/infra/metrics/prometheus/app.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/app.ts rename to apps/server/src/infra/metrics/prometheus/app.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/config.spec.ts b/apps/server/src/infra/metrics/prometheus/config.spec.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/config.spec.ts rename to apps/server/src/infra/metrics/prometheus/config.spec.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/config.ts b/apps/server/src/infra/metrics/prometheus/config.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/config.ts rename to apps/server/src/infra/metrics/prometheus/config.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/handler.spec.ts b/apps/server/src/infra/metrics/prometheus/handler.spec.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/handler.spec.ts rename to apps/server/src/infra/metrics/prometheus/handler.spec.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/handler.ts b/apps/server/src/infra/metrics/prometheus/handler.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/handler.ts rename to apps/server/src/infra/metrics/prometheus/handler.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/index.ts b/apps/server/src/infra/metrics/prometheus/index.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/index.ts rename to apps/server/src/infra/metrics/prometheus/index.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/middleware.spec.ts b/apps/server/src/infra/metrics/prometheus/middleware.spec.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/middleware.spec.ts rename to apps/server/src/infra/metrics/prometheus/middleware.spec.ts diff --git a/apps/server/src/shared/infra/metrics/prometheus/middleware.ts b/apps/server/src/infra/metrics/prometheus/middleware.ts similarity index 100% rename from apps/server/src/shared/infra/metrics/prometheus/middleware.ts rename to apps/server/src/infra/metrics/prometheus/middleware.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/index.ts b/apps/server/src/infra/oauth-provider/dto/index.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/index.ts rename to apps/server/src/infra/oauth-provider/dto/index.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/interface/oauth-client.interface.ts b/apps/server/src/infra/oauth-provider/dto/interface/oauth-client.interface.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/interface/oauth-client.interface.ts rename to apps/server/src/infra/oauth-provider/dto/interface/oauth-client.interface.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/interface/oidc-context.interface.ts b/apps/server/src/infra/oauth-provider/dto/interface/oidc-context.interface.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/interface/oidc-context.interface.ts rename to apps/server/src/infra/oauth-provider/dto/interface/oidc-context.interface.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/request/accept-consent-request.body.ts b/apps/server/src/infra/oauth-provider/dto/request/accept-consent-request.body.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/request/accept-consent-request.body.ts rename to apps/server/src/infra/oauth-provider/dto/request/accept-consent-request.body.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/request/accept-login-request.body.ts b/apps/server/src/infra/oauth-provider/dto/request/accept-login-request.body.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/request/accept-login-request.body.ts rename to apps/server/src/infra/oauth-provider/dto/request/accept-login-request.body.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/request/reject-request.body.ts b/apps/server/src/infra/oauth-provider/dto/request/reject-request.body.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/request/reject-request.body.ts rename to apps/server/src/infra/oauth-provider/dto/request/reject-request.body.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/response/consent-session.response.ts b/apps/server/src/infra/oauth-provider/dto/response/consent-session.response.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/response/consent-session.response.ts rename to apps/server/src/infra/oauth-provider/dto/response/consent-session.response.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/response/consent.response.ts b/apps/server/src/infra/oauth-provider/dto/response/consent.response.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/response/consent.response.ts rename to apps/server/src/infra/oauth-provider/dto/response/consent.response.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/response/introspect.response.ts b/apps/server/src/infra/oauth-provider/dto/response/introspect.response.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/response/introspect.response.ts rename to apps/server/src/infra/oauth-provider/dto/response/introspect.response.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/response/login.response.ts b/apps/server/src/infra/oauth-provider/dto/response/login.response.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/response/login.response.ts rename to apps/server/src/infra/oauth-provider/dto/response/login.response.ts diff --git a/apps/server/src/shared/infra/oauth-provider/dto/response/redirect.response.ts b/apps/server/src/infra/oauth-provider/dto/response/redirect.response.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/dto/response/redirect.response.ts rename to apps/server/src/infra/oauth-provider/dto/response/redirect.response.ts diff --git a/apps/server/src/shared/infra/oauth-provider/hydra/hydra.adapter.spec.ts b/apps/server/src/infra/oauth-provider/hydra/hydra.adapter.spec.ts similarity index 98% rename from apps/server/src/shared/infra/oauth-provider/hydra/hydra.adapter.spec.ts rename to apps/server/src/infra/oauth-provider/hydra/hydra.adapter.spec.ts index 0e244b37d16..7e30c5668c7 100644 --- a/apps/server/src/shared/infra/oauth-provider/hydra/hydra.adapter.spec.ts +++ b/apps/server/src/infra/oauth-provider/hydra/hydra.adapter.spec.ts @@ -11,12 +11,12 @@ import { ProviderOauthClient, ProviderRedirectResponse, RejectRequestBody, -} from '@shared/infra/oauth-provider/dto'; -import { ProviderConsentSessionResponse } from '@shared/infra/oauth-provider/dto/response/consent-session.response'; -import { HydraAdapter } from '@shared/infra/oauth-provider/hydra/hydra.adapter'; +} from '@infra/oauth-provider/dto'; import { axiosResponseFactory } from '@shared/testing'; import { AxiosRequestConfig, Method, RawAxiosRequestHeaders } from 'axios'; import { of } from 'rxjs'; +import { HydraAdapter } from './hydra.adapter'; +import { ProviderConsentSessionResponse } from '../dto/response/consent-session.response'; import resetAllMocks = jest.resetAllMocks; class HydraAdapterSpec extends HydraAdapter { diff --git a/apps/server/src/shared/infra/oauth-provider/hydra/hydra.adapter.ts b/apps/server/src/infra/oauth-provider/hydra/hydra.adapter.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/hydra/hydra.adapter.ts rename to apps/server/src/infra/oauth-provider/hydra/hydra.adapter.ts diff --git a/apps/server/src/shared/infra/oauth-provider/index.ts b/apps/server/src/infra/oauth-provider/index.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/index.ts rename to apps/server/src/infra/oauth-provider/index.ts diff --git a/apps/server/src/shared/infra/oauth-provider/oauth-provider-service.module.ts b/apps/server/src/infra/oauth-provider/oauth-provider-service.module.ts similarity index 61% rename from apps/server/src/shared/infra/oauth-provider/oauth-provider-service.module.ts rename to apps/server/src/infra/oauth-provider/oauth-provider-service.module.ts index 646ad228245..521f9216050 100644 --- a/apps/server/src/shared/infra/oauth-provider/oauth-provider-service.module.ts +++ b/apps/server/src/infra/oauth-provider/oauth-provider-service.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; -import { OauthProviderService } from '@shared/infra/oauth-provider/oauth-provider.service'; -import { HydraAdapter } from '@shared/infra/oauth-provider/hydra/hydra.adapter'; import { HttpModule } from '@nestjs/axios'; +import { OauthProviderService } from './oauth-provider.service'; +import { HydraAdapter } from './hydra/hydra.adapter'; @Module({ imports: [HttpModule], diff --git a/apps/server/src/shared/infra/oauth-provider/oauth-provider.service.ts b/apps/server/src/infra/oauth-provider/oauth-provider.service.ts similarity index 100% rename from apps/server/src/shared/infra/oauth-provider/oauth-provider.service.ts rename to apps/server/src/infra/oauth-provider/oauth-provider.service.ts diff --git a/apps/server/src/shared/infra/preview-generator/index.ts b/apps/server/src/infra/preview-generator/index.ts similarity index 97% rename from apps/server/src/shared/infra/preview-generator/index.ts rename to apps/server/src/infra/preview-generator/index.ts index 570b38cc9bd..c5d413789be 100644 --- a/apps/server/src/shared/infra/preview-generator/index.ts +++ b/apps/server/src/infra/preview-generator/index.ts @@ -1,4 +1,4 @@ -export * from './interface'; -export * from './preview-generator-consumer.module'; -export * from './preview-generator-producer.module'; -export * from './preview.producer'; +export * from './interface'; +export * from './preview-generator-consumer.module'; +export * from './preview-generator-producer.module'; +export * from './preview.producer'; diff --git a/apps/server/src/shared/infra/preview-generator/interface/index.ts b/apps/server/src/infra/preview-generator/interface/index.ts similarity index 96% rename from apps/server/src/shared/infra/preview-generator/interface/index.ts rename to apps/server/src/infra/preview-generator/interface/index.ts index 37aae418ee2..45799160cd5 100644 --- a/apps/server/src/shared/infra/preview-generator/interface/index.ts +++ b/apps/server/src/infra/preview-generator/interface/index.ts @@ -1 +1 @@ -export * from './preview'; +export * from './preview'; diff --git a/apps/server/src/shared/infra/preview-generator/interface/preview-consumer-config.ts b/apps/server/src/infra/preview-generator/interface/preview-consumer-config.ts similarity index 79% rename from apps/server/src/shared/infra/preview-generator/interface/preview-consumer-config.ts rename to apps/server/src/infra/preview-generator/interface/preview-consumer-config.ts index 2924fc945bc..3e08b89075c 100644 --- a/apps/server/src/shared/infra/preview-generator/interface/preview-consumer-config.ts +++ b/apps/server/src/infra/preview-generator/interface/preview-consumer-config.ts @@ -1,4 +1,4 @@ -import { S3Config } from '@shared/infra/s3-client'; +import { S3Config } from '@infra/s3-client'; export interface PreviewModuleConfig { NEST_LOG_LEVEL: string; diff --git a/apps/server/src/shared/infra/preview-generator/interface/preview.ts b/apps/server/src/infra/preview-generator/interface/preview.ts similarity index 100% rename from apps/server/src/shared/infra/preview-generator/interface/preview.ts rename to apps/server/src/infra/preview-generator/interface/preview.ts diff --git a/apps/server/src/shared/infra/preview-generator/loggable/preview-actions.loggable.spec.ts b/apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.spec.ts similarity index 100% rename from apps/server/src/shared/infra/preview-generator/loggable/preview-actions.loggable.spec.ts rename to apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.spec.ts diff --git a/apps/server/src/shared/infra/preview-generator/loggable/preview-actions.loggable.ts b/apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.ts similarity index 100% rename from apps/server/src/shared/infra/preview-generator/loggable/preview-actions.loggable.ts rename to apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.ts diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator-consumer.module.ts b/apps/server/src/infra/preview-generator/preview-generator-consumer.module.ts similarity index 89% rename from apps/server/src/shared/infra/preview-generator/preview-generator-consumer.module.ts rename to apps/server/src/infra/preview-generator/preview-generator-consumer.module.ts index 9d352b81d9d..ca4df0d074c 100644 --- a/apps/server/src/shared/infra/preview-generator/preview-generator-consumer.module.ts +++ b/apps/server/src/infra/preview-generator/preview-generator-consumer.module.ts @@ -1,7 +1,7 @@ import { DynamicModule, Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; -import { RabbitMQWrapperModule } from '@shared/infra/rabbitmq'; -import { S3ClientAdapter, S3ClientModule } from '@shared/infra/s3-client'; +import { RabbitMQWrapperModule } from '@infra/rabbitmq'; +import { S3ClientAdapter, S3ClientModule } from '@infra/s3-client'; import { createConfigModuleOptions } from '@src/config'; import { Logger, LoggerModule } from '@src/core/logger'; import { PreviewConfig } from './interface/preview-consumer-config'; diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator-producer.module.ts b/apps/server/src/infra/preview-generator/preview-generator-producer.module.ts similarity index 100% rename from apps/server/src/shared/infra/preview-generator/preview-generator-producer.module.ts rename to apps/server/src/infra/preview-generator/preview-generator-producer.module.ts diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator.builder.spec.ts b/apps/server/src/infra/preview-generator/preview-generator.builder.spec.ts similarity index 100% rename from apps/server/src/shared/infra/preview-generator/preview-generator.builder.spec.ts rename to apps/server/src/infra/preview-generator/preview-generator.builder.spec.ts diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator.builder.ts b/apps/server/src/infra/preview-generator/preview-generator.builder.ts similarity index 87% rename from apps/server/src/shared/infra/preview-generator/preview-generator.builder.ts rename to apps/server/src/infra/preview-generator/preview-generator.builder.ts index 4c5561ed089..088f9e7ab08 100644 --- a/apps/server/src/shared/infra/preview-generator/preview-generator.builder.ts +++ b/apps/server/src/infra/preview-generator/preview-generator.builder.ts @@ -1,4 +1,4 @@ -import { File } from '@shared/infra/s3-client'; +import { File } from '@infra/s3-client'; import { PassThrough } from 'stream'; import { PreviewOptions } from './interface'; diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator.consumer.spec.ts b/apps/server/src/infra/preview-generator/preview-generator.consumer.spec.ts similarity index 100% rename from apps/server/src/shared/infra/preview-generator/preview-generator.consumer.spec.ts rename to apps/server/src/infra/preview-generator/preview-generator.consumer.spec.ts diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator.consumer.ts b/apps/server/src/infra/preview-generator/preview-generator.consumer.ts similarity index 92% rename from apps/server/src/shared/infra/preview-generator/preview-generator.consumer.ts rename to apps/server/src/infra/preview-generator/preview-generator.consumer.ts index 8fc08d261f3..d34fc8bc37c 100644 --- a/apps/server/src/shared/infra/preview-generator/preview-generator.consumer.ts +++ b/apps/server/src/infra/preview-generator/preview-generator.consumer.ts @@ -1,7 +1,7 @@ import { RabbitPayload, RabbitRPC } from '@golevelup/nestjs-rabbitmq'; import { Injectable } from '@nestjs/common'; import { Logger } from '@src/core/logger'; -import { FilesPreviewEvents, FilesPreviewExchange } from '@src/shared/infra/rabbitmq'; +import { FilesPreviewEvents, FilesPreviewExchange } from '@infra/rabbitmq'; import { PreviewFileOptions } from './interface'; import { PreviewActionsLoggable } from './loggable/preview-actions.loggable'; import { PreviewGeneratorService } from './preview-generator.service'; diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator.service.spec.ts b/apps/server/src/infra/preview-generator/preview-generator.service.spec.ts similarity index 98% rename from apps/server/src/shared/infra/preview-generator/preview-generator.service.spec.ts rename to apps/server/src/infra/preview-generator/preview-generator.service.spec.ts index b8eeea612f5..016c261b122 100644 --- a/apps/server/src/shared/infra/preview-generator/preview-generator.service.spec.ts +++ b/apps/server/src/infra/preview-generator/preview-generator.service.spec.ts @@ -1,6 +1,6 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { GetFile, S3ClientAdapter } from '@shared/infra/s3-client'; +import { GetFile, S3ClientAdapter } from '@infra/s3-client'; import { Logger } from '@src/core/logger'; import { Readable } from 'node:stream'; import { PreviewGeneratorService } from './preview-generator.service'; diff --git a/apps/server/src/shared/infra/preview-generator/preview-generator.service.ts b/apps/server/src/infra/preview-generator/preview-generator.service.ts similarity index 96% rename from apps/server/src/shared/infra/preview-generator/preview-generator.service.ts rename to apps/server/src/infra/preview-generator/preview-generator.service.ts index 72dac25f076..83dca461a2f 100644 --- a/apps/server/src/shared/infra/preview-generator/preview-generator.service.ts +++ b/apps/server/src/infra/preview-generator/preview-generator.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { GetFile, S3ClientAdapter } from '@shared/infra/s3-client'; +import { GetFile, S3ClientAdapter } from '@infra/s3-client'; import { Logger } from '@src/core/logger'; import { subClass } from 'gm'; import { PassThrough } from 'stream'; diff --git a/apps/server/src/shared/infra/preview-generator/preview.producer.spec.ts b/apps/server/src/infra/preview-generator/preview.producer.spec.ts similarity index 100% rename from apps/server/src/shared/infra/preview-generator/preview.producer.spec.ts rename to apps/server/src/infra/preview-generator/preview.producer.spec.ts diff --git a/apps/server/src/shared/infra/preview-generator/preview.producer.ts b/apps/server/src/infra/preview-generator/preview.producer.ts similarity index 97% rename from apps/server/src/shared/infra/preview-generator/preview.producer.ts rename to apps/server/src/infra/preview-generator/preview.producer.ts index 602e2503185..28cf6930830 100644 --- a/apps/server/src/shared/infra/preview-generator/preview.producer.ts +++ b/apps/server/src/infra/preview-generator/preview.producer.ts @@ -1,7 +1,7 @@ import { AmqpConnection } from '@golevelup/nestjs-rabbitmq'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { FilesPreviewEvents, FilesPreviewExchange, RpcMessageProducer } from '@shared/infra/rabbitmq'; +import { FilesPreviewEvents, FilesPreviewExchange, RpcMessageProducer } from '@infra/rabbitmq'; import { Logger } from '@src/core/logger'; import { PreviewFileOptions, PreviewResponseMessage } from './interface'; import { PreviewModuleConfig } from './interface/preview-consumer-config'; diff --git a/apps/server/src/shared/infra/rabbitmq/error.mapper.spec.ts b/apps/server/src/infra/rabbitmq/error.mapper.spec.ts similarity index 97% rename from apps/server/src/shared/infra/rabbitmq/error.mapper.spec.ts rename to apps/server/src/infra/rabbitmq/error.mapper.spec.ts index c3cf506e541..884dfb35158 100644 --- a/apps/server/src/shared/infra/rabbitmq/error.mapper.spec.ts +++ b/apps/server/src/infra/rabbitmq/error.mapper.spec.ts @@ -4,7 +4,7 @@ import { ForbiddenException, InternalServerErrorException, } from '@nestjs/common'; -import { IError } from '@shared/infra/rabbitmq'; +import { IError } from '@infra/rabbitmq'; import _ from 'lodash'; import { ErrorMapper } from './error.mapper'; diff --git a/apps/server/src/shared/infra/rabbitmq/error.mapper.ts b/apps/server/src/infra/rabbitmq/error.mapper.ts similarity index 94% rename from apps/server/src/shared/infra/rabbitmq/error.mapper.ts rename to apps/server/src/infra/rabbitmq/error.mapper.ts index 60f2e73795e..6f7083d3ad9 100644 --- a/apps/server/src/shared/infra/rabbitmq/error.mapper.ts +++ b/apps/server/src/infra/rabbitmq/error.mapper.ts @@ -1,6 +1,6 @@ import { BadRequestException, ForbiddenException, InternalServerErrorException } from '@nestjs/common'; import { ErrorUtils } from '@src/core/error/utils'; -import { IError } from '@shared/infra/rabbitmq'; +import { IError } from '@infra/rabbitmq'; export class ErrorMapper { static mapRpcErrorResponseToDomainError( diff --git a/apps/server/src/shared/infra/rabbitmq/exchange/files-preview.ts b/apps/server/src/infra/rabbitmq/exchange/files-preview.ts similarity index 100% rename from apps/server/src/shared/infra/rabbitmq/exchange/files-preview.ts rename to apps/server/src/infra/rabbitmq/exchange/files-preview.ts diff --git a/apps/server/src/shared/infra/rabbitmq/exchange/files-storage.ts b/apps/server/src/infra/rabbitmq/exchange/files-storage.ts similarity index 100% rename from apps/server/src/shared/infra/rabbitmq/exchange/files-storage.ts rename to apps/server/src/infra/rabbitmq/exchange/files-storage.ts diff --git a/apps/server/src/shared/infra/rabbitmq/exchange/index.ts b/apps/server/src/infra/rabbitmq/exchange/index.ts similarity index 97% rename from apps/server/src/shared/infra/rabbitmq/exchange/index.ts rename to apps/server/src/infra/rabbitmq/exchange/index.ts index 0cf6bd00d13..48658a3f0a7 100644 --- a/apps/server/src/shared/infra/rabbitmq/exchange/index.ts +++ b/apps/server/src/infra/rabbitmq/exchange/index.ts @@ -1,2 +1,2 @@ -export * from './files-preview'; -export * from './files-storage'; +export * from './files-preview'; +export * from './files-storage'; diff --git a/apps/server/src/shared/infra/rabbitmq/index.ts b/apps/server/src/infra/rabbitmq/index.ts similarity index 100% rename from apps/server/src/shared/infra/rabbitmq/index.ts rename to apps/server/src/infra/rabbitmq/index.ts diff --git a/apps/server/src/shared/infra/rabbitmq/rabbitmq.module.ts b/apps/server/src/infra/rabbitmq/rabbitmq.module.ts similarity index 100% rename from apps/server/src/shared/infra/rabbitmq/rabbitmq.module.ts rename to apps/server/src/infra/rabbitmq/rabbitmq.module.ts diff --git a/apps/server/src/shared/infra/rabbitmq/rpc-message-producer.spec.ts b/apps/server/src/infra/rabbitmq/rpc-message-producer.spec.ts similarity index 100% rename from apps/server/src/shared/infra/rabbitmq/rpc-message-producer.spec.ts rename to apps/server/src/infra/rabbitmq/rpc-message-producer.spec.ts diff --git a/apps/server/src/shared/infra/rabbitmq/rpc-message-producer.ts b/apps/server/src/infra/rabbitmq/rpc-message-producer.ts similarity index 100% rename from apps/server/src/shared/infra/rabbitmq/rpc-message-producer.ts rename to apps/server/src/infra/rabbitmq/rpc-message-producer.ts diff --git a/apps/server/src/shared/infra/rabbitmq/rpc-message.ts b/apps/server/src/infra/rabbitmq/rpc-message.ts similarity index 100% rename from apps/server/src/shared/infra/rabbitmq/rpc-message.ts rename to apps/server/src/infra/rabbitmq/rpc-message.ts diff --git a/apps/server/src/shared/infra/redis/index.ts b/apps/server/src/infra/redis/index.ts similarity index 100% rename from apps/server/src/shared/infra/redis/index.ts rename to apps/server/src/infra/redis/index.ts diff --git a/apps/server/src/shared/infra/redis/interface/redis.constants.ts b/apps/server/src/infra/redis/interface/redis.constants.ts similarity index 100% rename from apps/server/src/shared/infra/redis/interface/redis.constants.ts rename to apps/server/src/infra/redis/interface/redis.constants.ts diff --git a/apps/server/src/shared/infra/redis/redis.module.ts b/apps/server/src/infra/redis/redis.module.ts similarity index 100% rename from apps/server/src/shared/infra/redis/redis.module.ts rename to apps/server/src/infra/redis/redis.module.ts diff --git a/apps/server/src/shared/infra/s3-client/README.md b/apps/server/src/infra/s3-client/README.md similarity index 100% rename from apps/server/src/shared/infra/s3-client/README.md rename to apps/server/src/infra/s3-client/README.md diff --git a/apps/server/src/shared/infra/s3-client/constants.ts b/apps/server/src/infra/s3-client/constants.ts similarity index 100% rename from apps/server/src/shared/infra/s3-client/constants.ts rename to apps/server/src/infra/s3-client/constants.ts diff --git a/apps/server/src/shared/infra/s3-client/index.ts b/apps/server/src/infra/s3-client/index.ts similarity index 97% rename from apps/server/src/shared/infra/s3-client/index.ts rename to apps/server/src/infra/s3-client/index.ts index a2bfb7428c3..89943618d9e 100644 --- a/apps/server/src/shared/infra/s3-client/index.ts +++ b/apps/server/src/infra/s3-client/index.ts @@ -1,3 +1,3 @@ -export * from './interface'; -export * from './s3-client.adapter'; -export * from './s3-client.module'; +export * from './interface'; +export * from './s3-client.adapter'; +export * from './s3-client.module'; diff --git a/apps/server/src/shared/infra/s3-client/interface/index.ts b/apps/server/src/infra/s3-client/interface/index.ts similarity index 100% rename from apps/server/src/shared/infra/s3-client/interface/index.ts rename to apps/server/src/infra/s3-client/interface/index.ts diff --git a/apps/server/src/shared/infra/s3-client/s3-client.adapter.spec.ts b/apps/server/src/infra/s3-client/s3-client.adapter.spec.ts similarity index 99% rename from apps/server/src/shared/infra/s3-client/s3-client.adapter.spec.ts rename to apps/server/src/infra/s3-client/s3-client.adapter.spec.ts index 87de7afb1c3..7986e692ca9 100644 --- a/apps/server/src/shared/infra/s3-client/s3-client.adapter.spec.ts +++ b/apps/server/src/infra/s3-client/s3-client.adapter.spec.ts @@ -6,9 +6,8 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ErrorUtils } from '@src/core/error/utils'; import { LegacyLogger } from '@src/core/logger'; import { Readable } from 'node:stream'; -import { FileDto } from '../../../modules/files-storage/dto'; import { S3_CLIENT, S3_CONFIG } from './constants'; -import { S3Config } from './interface'; +import { File, S3Config } from './interface'; import { S3ClientAdapter } from './s3-client.adapter'; const createParameter = () => { @@ -190,11 +189,10 @@ describe('S3ClientAdapter', () => { describe('create', () => { const createFile = () => { const readable = Readable.from('ddd'); - const file = new FileDto({ + const file: File = { data: readable, - name: 'test.txt', mimeType: 'text/plain', - }); + }; return { file }; }; diff --git a/apps/server/src/shared/infra/s3-client/s3-client.adapter.ts b/apps/server/src/infra/s3-client/s3-client.adapter.ts similarity index 100% rename from apps/server/src/shared/infra/s3-client/s3-client.adapter.ts rename to apps/server/src/infra/s3-client/s3-client.adapter.ts diff --git a/apps/server/src/shared/infra/s3-client/s3-client.module.spec.ts b/apps/server/src/infra/s3-client/s3-client.module.spec.ts similarity index 100% rename from apps/server/src/shared/infra/s3-client/s3-client.module.spec.ts rename to apps/server/src/infra/s3-client/s3-client.module.spec.ts diff --git a/apps/server/src/shared/infra/s3-client/s3-client.module.ts b/apps/server/src/infra/s3-client/s3-client.module.ts similarity index 100% rename from apps/server/src/shared/infra/s3-client/s3-client.module.ts rename to apps/server/src/infra/s3-client/s3-client.module.ts diff --git a/apps/server/src/modules/account/account.module.spec.ts b/apps/server/src/modules/account/account.module.spec.ts index 74a8d25568b..8acbff04090 100644 --- a/apps/server/src/modules/account/account.module.spec.ts +++ b/apps/server/src/modules/account/account.module.spec.ts @@ -1,6 +1,6 @@ import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { AccountModule } from './account.module'; import { AccountIdmToDtoMapper, AccountIdmToDtoMapperDb, AccountIdmToDtoMapperIdm } from './mapper'; import { AccountService } from './services/account.service'; diff --git a/apps/server/src/modules/account/account.module.ts b/apps/server/src/modules/account/account.module.ts index 6c98d7f76e3..2e11af11c6d 100644 --- a/apps/server/src/modules/account/account.module.ts +++ b/apps/server/src/modules/account/account.module.ts @@ -2,7 +2,7 @@ import { Module } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { PermissionService } from '@shared/domain'; import { SystemRepo, UserRepo } from '@shared/repo'; -import { IdentityManagementModule } from '@shared/infra/identity-management'; +import { IdentityManagementModule } from '@infra/identity-management'; import { LoggerModule } from '@src/core/logger/logger.module'; import { AccountRepo } from './repo/account.repo'; import { AccountService } from './services/account.service'; diff --git a/apps/server/src/modules/account/repo/account.repo.integration.spec.ts b/apps/server/src/modules/account/repo/account.repo.integration.spec.ts index bf4a44119fe..77acc53a3b1 100644 --- a/apps/server/src/modules/account/repo/account.repo.integration.spec.ts +++ b/apps/server/src/modules/account/repo/account.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Account, User } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { accountFactory, cleanupCollections, userFactory } from '@shared/testing'; import { AccountRepo } from './account.repo'; diff --git a/apps/server/src/modules/account/services/account-db.service.spec.ts b/apps/server/src/modules/account/services/account-db.service.spec.ts index 64075bcb40c..107273797f9 100644 --- a/apps/server/src/modules/account/services/account-db.service.spec.ts +++ b/apps/server/src/modules/account/services/account-db.service.spec.ts @@ -4,7 +4,7 @@ import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityNotFoundError } from '@shared/common'; import { Account, EntityId, Permission, Role, RoleName, SchoolEntity, User } from '@shared/domain'; -import { IdentityManagementService } from '@shared/infra/identity-management/identity-management.service'; +import { IdentityManagementService } from '@infra/identity-management/identity-management.service'; import { accountFactory, schoolFactory, setupEntities, userFactory } from '@shared/testing'; import { AccountEntityToDtoMapper } from '@modules/account/mapper'; import { AccountDto } from '@modules/account/services/dto'; diff --git a/apps/server/src/modules/account/services/account-idm.service.integration.spec.ts b/apps/server/src/modules/account/services/account-idm.service.integration.spec.ts index 4761bbd80ca..06ad0943c22 100644 --- a/apps/server/src/modules/account/services/account-idm.service.integration.spec.ts +++ b/apps/server/src/modules/account/services/account-idm.service.integration.spec.ts @@ -4,11 +4,10 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { IdmAccount } from '@shared/domain'; -import { KeycloakAdministrationService } from '@shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service'; +import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service'; import { AccountSaveDto } from '@modules/account/services/dto'; import { LoggerModule } from '@src/core/logger'; -import { IdentityManagementModule } from '@shared/infra/identity-management'; -import { IdentityManagementService } from '../../../shared/infra/identity-management/identity-management.service'; +import { IdentityManagementModule, IdentityManagementService } from '@infra/identity-management'; import { AccountIdmToDtoMapper, AccountIdmToDtoMapperDb } from '../mapper'; import { AccountServiceIdm } from './account-idm.service'; import { AbstractAccountService } from './account.service.abstract'; diff --git a/apps/server/src/modules/account/services/account-idm.service.spec.ts b/apps/server/src/modules/account/services/account-idm.service.spec.ts index 4b997d1b3fe..9b8705089b3 100644 --- a/apps/server/src/modules/account/services/account-idm.service.spec.ts +++ b/apps/server/src/modules/account/services/account-idm.service.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityNotFoundError } from '@shared/common'; import { IdmAccount } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { IdentityManagementOauthService, IdentityManagementService } from '@shared/infra/identity-management'; +import { MongoMemoryDatabaseModule } from '@infra/database'; +import { IdentityManagementOauthService, IdentityManagementService } from '@infra/identity-management'; import { NotImplementedException } from '@nestjs/common'; import { LoggerModule } from '@src/core/logger'; import { ConfigModule } from '@nestjs/config'; diff --git a/apps/server/src/modules/account/services/account-idm.service.ts b/apps/server/src/modules/account/services/account-idm.service.ts index 68bcfb42bae..2136326e038 100644 --- a/apps/server/src/modules/account/services/account-idm.service.ts +++ b/apps/server/src/modules/account/services/account-idm.service.ts @@ -2,7 +2,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { Injectable, NotImplementedException } from '@nestjs/common'; import { EntityNotFoundError } from '@shared/common'; import { Counted, EntityId, IdmAccount, IdmAccountUpdate } from '@shared/domain'; -import { IdentityManagementService, IdentityManagementOauthService } from '@shared/infra/identity-management'; +import { IdentityManagementService, IdentityManagementOauthService } from '@infra/identity-management'; import { LegacyLogger } from '@src/core/logger'; import { AccountIdmToDtoMapper } from '../mapper'; import { AbstractAccountService } from './account.service.abstract'; diff --git a/apps/server/src/modules/account/services/account-lookup.service.spec.ts b/apps/server/src/modules/account/services/account-lookup.service.spec.ts index cfef246d3e3..c3351a6b0c3 100644 --- a/apps/server/src/modules/account/services/account-lookup.service.spec.ts +++ b/apps/server/src/modules/account/services/account-lookup.service.spec.ts @@ -4,7 +4,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { IdmAccount } from '@shared/domain'; -import { IdentityManagementService } from '@shared/infra/identity-management'; +import { IdentityManagementService } from '@infra/identity-management'; import { AccountLookupService } from './account-lookup.service'; describe('AccountLookupService', () => { diff --git a/apps/server/src/modules/account/services/account-lookup.service.ts b/apps/server/src/modules/account/services/account-lookup.service.ts index b1549590c5b..ed67d03232d 100644 --- a/apps/server/src/modules/account/services/account-lookup.service.ts +++ b/apps/server/src/modules/account/services/account-lookup.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { EntityId } from '@shared/domain'; -import { IdentityManagementService } from '@shared/infra/identity-management'; +import { IdentityManagementService } from '@infra/identity-management'; import { IServerConfig } from '@modules/server/server.config'; import { ObjectId } from 'bson'; diff --git a/apps/server/src/modules/account/services/account.service.integration.spec.ts b/apps/server/src/modules/account/services/account.service.integration.spec.ts index d001925000b..ccaf450ffed 100644 --- a/apps/server/src/modules/account/services/account.service.integration.spec.ts +++ b/apps/server/src/modules/account/services/account.service.integration.spec.ts @@ -4,10 +4,10 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { Account, IdmAccount } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { IdentityManagementModule } from '@shared/infra/identity-management'; -import { IdentityManagementService } from '@shared/infra/identity-management/identity-management.service'; -import { KeycloakAdministrationService } from '@shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service'; +import { MongoMemoryDatabaseModule } from '@infra/database'; +import { IdentityManagementModule } from '@infra/identity-management'; +import { IdentityManagementService } from '@infra/identity-management/identity-management.service'; +import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service'; import { UserRepo } from '@shared/repo'; import { accountFactory, cleanupCollections } from '@shared/testing'; import { ObjectId } from 'bson'; diff --git a/apps/server/src/modules/authentication/authentication.module.ts b/apps/server/src/modules/authentication/authentication.module.ts index 26d20a4dfc8..8f2bdcd3b0d 100644 --- a/apps/server/src/modules/authentication/authentication.module.ts +++ b/apps/server/src/modules/authentication/authentication.module.ts @@ -1,8 +1,8 @@ import { Module } from '@nestjs/common'; import { JwtModule, JwtModuleOptions } from '@nestjs/jwt'; import { PassportModule } from '@nestjs/passport'; -import { CacheWrapperModule } from '@shared/infra/cache'; -import { IdentityManagementModule } from '@shared/infra/identity-management'; +import { CacheWrapperModule } from '@infra/cache'; +import { IdentityManagementModule } from '@infra/identity-management'; import { LegacySchoolRepo, SystemRepo, UserRepo } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; import { AccountModule } from '@modules/account'; diff --git a/apps/server/src/modules/authentication/index.ts b/apps/server/src/modules/authentication/index.ts index 904c64ff97b..59e749c7abc 100644 --- a/apps/server/src/modules/authentication/index.ts +++ b/apps/server/src/modules/authentication/index.ts @@ -1,2 +1,3 @@ export { ICurrentUser } from './interface'; export { JWT, CurrentUser, Authenticate } from './decorator'; +export { AuthenticationModule } from './authentication.module'; diff --git a/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.spec.ts b/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.spec.ts index 936deb866e4..6638e0470b2 100644 --- a/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.spec.ts +++ b/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { CACHE_MANAGER } from '@nestjs/cache-manager'; import { Test, TestingModule } from '@nestjs/testing'; -import { CacheService } from '@shared/infra/cache'; -import { CacheStoreType } from '@shared/infra/cache/interface/cache-store-type.enum'; +import { CacheService } from '@infra/cache'; +import { CacheStoreType } from '@infra/cache/interface/cache-store-type.enum'; import { feathersRedis } from '@src/imports-from-feathers'; import { Cache } from 'cache-manager'; import { JwtValidationAdapter } from './jwt-validation.adapter'; diff --git a/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.ts b/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.ts index 3af5db2061b..dee98747c46 100644 --- a/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.ts +++ b/apps/server/src/modules/authentication/strategy/jwt-validation.adapter.ts @@ -1,7 +1,7 @@ import { CACHE_MANAGER } from '@nestjs/cache-manager'; import { Inject, Injectable } from '@nestjs/common'; -import { CacheService } from '@shared/infra/cache'; -import { CacheStoreType } from '@shared/infra/cache/interface/cache-store-type.enum'; +import { CacheService } from '@infra/cache'; +import { CacheStoreType } from '@infra/cache/interface/cache-store-type.enum'; import { addTokenToWhitelist, createRedisIdentifierFromJwtData, diff --git a/apps/server/src/modules/authentication/strategy/local.strategy.spec.ts b/apps/server/src/modules/authentication/strategy/local.strategy.spec.ts index d1330270fb7..121d2874fe9 100644 --- a/apps/server/src/modules/authentication/strategy/local.strategy.spec.ts +++ b/apps/server/src/modules/authentication/strategy/local.strategy.spec.ts @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { UnauthorizedException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { RoleName, User } from '@shared/domain'; -import { IdentityManagementOauthService } from '@shared/infra/identity-management'; +import { IdentityManagementOauthService } from '@infra/identity-management'; import { UserRepo } from '@shared/repo'; import { accountFactory, setupEntities, userFactory } from '@shared/testing'; import { AccountEntityToDtoMapper } from '@modules/account/mapper'; diff --git a/apps/server/src/modules/authentication/strategy/local.strategy.ts b/apps/server/src/modules/authentication/strategy/local.strategy.ts index 7963a5166e7..28ed573b45e 100644 --- a/apps/server/src/modules/authentication/strategy/local.strategy.ts +++ b/apps/server/src/modules/authentication/strategy/local.strategy.ts @@ -6,7 +6,7 @@ import bcrypt from 'bcryptjs'; import { UserRepo } from '@shared/repo'; import { AccountDto } from '@modules/account/services/dto'; import { GuardAgainst } from '@shared/common/utils/guard-against'; -import { IdentityManagementOauthService, IIdentityManagementConfig } from '@shared/infra/identity-management'; +import { IdentityManagementOauthService, IIdentityManagementConfig } from '@infra/identity-management'; import { CurrentUserMapper } from '../mapper'; import { ICurrentUser } from '../interface'; import { AuthenticationService } from '../services/authentication.service'; diff --git a/apps/server/src/modules/authorization/authorization.module.ts b/apps/server/src/modules/authorization/authorization.module.ts index c555f13dc7b..d01cd9363f4 100644 --- a/apps/server/src/modules/authorization/authorization.module.ts +++ b/apps/server/src/modules/authorization/authorization.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { UserRepo } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; -import { FeathersModule } from '@shared/infra/feathers'; +import { FeathersModule } from '@infra/feathers'; import { BoardDoRule, ContextExternalToolRule, diff --git a/apps/server/src/modules/authorization/feathers/feathers-auth.provider.spec.ts b/apps/server/src/modules/authorization/feathers/feathers-auth.provider.spec.ts index ccf1f2177aa..f035fa5a867 100644 --- a/apps/server/src/modules/authorization/feathers/feathers-auth.provider.spec.ts +++ b/apps/server/src/modules/authorization/feathers/feathers-auth.provider.spec.ts @@ -2,7 +2,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { NotFoundException } from '@nestjs/common/exceptions/not-found.exception'; import { Test, TestingModule } from '@nestjs/testing'; import { NewsTargetModel } from '@shared/domain'; -import { FeathersServiceProvider } from '@shared/infra/feathers'; +import { FeathersServiceProvider } from '@infra/feathers'; import { FeathersAuthProvider } from './feathers-auth.provider'; describe('FeathersAuthProvider', () => { diff --git a/apps/server/src/modules/authorization/feathers/feathers-auth.provider.ts b/apps/server/src/modules/authorization/feathers/feathers-auth.provider.ts index 1f3f40886eb..4e4f87c56d1 100644 --- a/apps/server/src/modules/authorization/feathers/feathers-auth.provider.ts +++ b/apps/server/src/modules/authorization/feathers/feathers-auth.provider.ts @@ -1,7 +1,7 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import { BaseEntity, EntityId, NewsTargetModel } from '@shared/domain'; import { ObjectId } from '@mikro-orm/mongodb'; -import { FeathersServiceProvider } from '@shared/infra/feathers'; +import { FeathersServiceProvider } from '@infra/feathers'; interface User { _id: ObjectId; diff --git a/apps/server/src/modules/board/board.module.ts b/apps/server/src/modules/board/board.module.ts index 7722326a21d..ffa1e7ad580 100644 --- a/apps/server/src/modules/board/board.module.ts +++ b/apps/server/src/modules/board/board.module.ts @@ -3,7 +3,7 @@ import { ContextExternalToolModule } from '@modules/tool/context-external-tool'; import { UserModule } from '@modules/user'; import { Module } from '@nestjs/common'; import { ContentElementFactory } from '@shared/domain'; -import { ConsoleWriterModule } from '@shared/infra/console'; +import { ConsoleWriterModule } from '@infra/console'; import { CourseRepo } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; import { BoardDoRepo, BoardNodeRepo, RecursiveDeleteVisitor } from './repo'; diff --git a/apps/server/src/modules/board/repo/board-do.repo.spec.ts b/apps/server/src/modules/board/repo/board-do.repo.spec.ts index 3874e9301ba..2f9a6633e69 100644 --- a/apps/server/src/modules/board/repo/board-do.repo.spec.ts +++ b/apps/server/src/modules/board/repo/board-do.repo.spec.ts @@ -14,7 +14,7 @@ import { ColumnBoard, RichTextElementNode, } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cardFactory, cardNodeFactory, diff --git a/apps/server/src/modules/board/repo/board-node.repo.spec.ts b/apps/server/src/modules/board/repo/board-node.repo.spec.ts index 656d751f01d..2ebed80d0af 100644 --- a/apps/server/src/modules/board/repo/board-node.repo.spec.ts +++ b/apps/server/src/modules/board/repo/board-node.repo.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { ColumnBoardNode } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cardNodeFactory, cleanupCollections, diff --git a/apps/server/src/modules/board/repo/recursive-delete.visitor.spec.ts b/apps/server/src/modules/board/repo/recursive-delete.visitor.spec.ts index 6236d5de8bb..4b0688f0a0d 100644 --- a/apps/server/src/modules/board/repo/recursive-delete.visitor.spec.ts +++ b/apps/server/src/modules/board/repo/recursive-delete.visitor.spec.ts @@ -3,7 +3,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { FileDto, FilesStorageClientAdapterService } from '@modules/files-storage-client'; import { ContextExternalToolService } from '@modules/tool/context-external-tool/service'; import { Test, TestingModule } from '@nestjs/testing'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { columnBoardFactory, columnFactory, diff --git a/apps/server/src/modules/board/service/board-do-copy-service/board-do-copy.service.spec.ts b/apps/server/src/modules/board/service/board-do-copy-service/board-do-copy.service.spec.ts index d7c71352166..40a62ede2ed 100644 --- a/apps/server/src/modules/board/service/board-do-copy-service/board-do-copy.service.spec.ts +++ b/apps/server/src/modules/board/service/board-do-copy-service/board-do-copy.service.spec.ts @@ -18,7 +18,7 @@ import { RichTextElement, SubmissionContainerElement, } from '@shared/domain'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { cardFactory, columnBoardFactory, diff --git a/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts b/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts index ba76693bb93..137f189319c 100644 --- a/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts +++ b/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts @@ -12,7 +12,7 @@ import { SubmissionItem, } from '@shared/domain'; import { LinkElement } from '@shared/domain/domainobject/board/link-element.do'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { CopyElementType, CopyStatus, CopyStatusEnum } from '@modules/copy-helper'; import { ObjectId } from 'bson'; import { SchoolSpecificFileCopyService } from './school-specific-file-copy.interface'; diff --git a/apps/server/src/modules/board/uc/board-management.uc.spec.ts b/apps/server/src/modules/board/uc/board-management.uc.spec.ts index 7c3464a8a52..83948e0ae1e 100644 --- a/apps/server/src/modules/board/uc/board-management.uc.spec.ts +++ b/apps/server/src/modules/board/uc/board-management.uc.spec.ts @@ -1,8 +1,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { ConsoleWriterService } from '@shared/infra/console'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { ConsoleWriterService } from '@infra/console'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { courseFactory } from '@shared/testing'; import { BoardManagementUc } from '@modules/management/uc/board-management.uc'; diff --git a/apps/server/src/modules/class/repo/classes.repo.spec.ts b/apps/server/src/modules/class/repo/classes.repo.spec.ts index 7801045aff0..df0191d24ef 100644 --- a/apps/server/src/modules/class/repo/classes.repo.spec.ts +++ b/apps/server/src/modules/class/repo/classes.repo.spec.ts @@ -4,7 +4,7 @@ import { Test } from '@nestjs/testing'; import { TestingModule } from '@nestjs/testing/testing-module'; import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { SchoolEntity } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, schoolFactory } from '@shared/testing'; import { Class } from '../domain'; import { ClassEntity } from '../entity'; diff --git a/apps/server/src/modules/collaborative-storage/collaborative-storage.module.ts b/apps/server/src/modules/collaborative-storage/collaborative-storage.module.ts index eedf1b5638e..a654ff86bdc 100644 --- a/apps/server/src/modules/collaborative-storage/collaborative-storage.module.ts +++ b/apps/server/src/modules/collaborative-storage/collaborative-storage.module.ts @@ -1,14 +1,13 @@ import { Module } from '@nestjs/common'; -import { CollaborativeStorageAdapterModule } from '@shared/infra/collaborative-storage/collaborative-storage-adapter.module'; +import { CollaborativeStorageAdapterModule } from '@infra/collaborative-storage'; import { TeamsRepo } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; import { AuthorizationModule } from '@modules/authorization'; -import { TeamPermissionsMapper } from '@modules/collaborative-storage/mapper/team-permissions.mapper'; -import { TeamMapper } from '@modules/collaborative-storage/mapper/team.mapper'; -import { CollaborativeStorageService } from '@modules/collaborative-storage/services/collaborative-storage.service'; -import { RoleModule } from '@modules/role/role.module'; -import { CollaborativeStorageController } from './controller/collaborative-storage.controller'; -import { CollaborativeStorageUc } from './uc/collaborative-storage.uc'; +import { RoleModule } from '@modules/role'; +import { CollaborativeStorageService } from './services'; +import { TeamPermissionsMapper, TeamMapper } from './mapper'; +import { CollaborativeStorageController } from './controller'; +import { CollaborativeStorageUc } from './uc'; @Module({ imports: [CollaborativeStorageAdapterModule, AuthorizationModule, LoggerModule, RoleModule], diff --git a/apps/server/src/modules/collaborative-storage/controller/index.ts b/apps/server/src/modules/collaborative-storage/controller/index.ts new file mode 100644 index 00000000000..6e3d2c24555 --- /dev/null +++ b/apps/server/src/modules/collaborative-storage/controller/index.ts @@ -0,0 +1 @@ +export * from './collaborative-storage.controller'; diff --git a/apps/server/src/modules/collaborative-storage/index.ts b/apps/server/src/modules/collaborative-storage/index.ts index 55ed293fd82..6a36bd891cf 100644 --- a/apps/server/src/modules/collaborative-storage/index.ts +++ b/apps/server/src/modules/collaborative-storage/index.ts @@ -1,2 +1,2 @@ -export * from './collaborative-storage.module'; -export * from './services'; +export { CollaborativeStorageModule } from './collaborative-storage.module'; +export { CollaborativeStorageService, TeamDto, TeamPermissionsDto, TeamUserDto } from './services'; diff --git a/apps/server/src/modules/collaborative-storage/mapper/index.ts b/apps/server/src/modules/collaborative-storage/mapper/index.ts new file mode 100644 index 00000000000..df052363bc4 --- /dev/null +++ b/apps/server/src/modules/collaborative-storage/mapper/index.ts @@ -0,0 +1,2 @@ +export * from './team-permissions.mapper'; +export * from './team.mapper'; diff --git a/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.spec.ts b/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.spec.ts index 4f95ae44a11..a1f8757f576 100644 --- a/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.spec.ts +++ b/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.spec.ts @@ -3,7 +3,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { RoleName, TeamEntity } from '@shared/domain'; -import { CollaborativeStorageAdapter } from '@shared/infra/collaborative-storage'; +import { CollaborativeStorageAdapter } from '@infra/collaborative-storage'; import { TeamsRepo } from '@shared/repo'; import { setupEntities } from '@shared/testing'; import { teamFactory } from '@shared/testing/factory/team.factory'; diff --git a/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.ts b/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.ts index f9807cf691c..8f32f0ffc5f 100644 --- a/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.ts +++ b/apps/server/src/modules/collaborative-storage/services/collaborative-storage.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { EntityId, Permission } from '@shared/domain'; -import { CollaborativeStorageAdapter } from '@shared/infra/collaborative-storage'; +import { CollaborativeStorageAdapter } from '@infra/collaborative-storage'; import { TeamsRepo } from '@shared/repo'; import { LegacyLogger } from '@src/core/logger'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; diff --git a/apps/server/src/modules/collaborative-storage/uc/index.ts b/apps/server/src/modules/collaborative-storage/uc/index.ts new file mode 100644 index 00000000000..b08c347bf88 --- /dev/null +++ b/apps/server/src/modules/collaborative-storage/uc/index.ts @@ -0,0 +1 @@ +export * from './collaborative-storage.uc'; diff --git a/apps/server/src/modules/deletion/repo/deletion-log.repo.spec.ts b/apps/server/src/modules/deletion/repo/deletion-log.repo.spec.ts index 5bc151c3541..bba32408e84 100644 --- a/apps/server/src/modules/deletion/repo/deletion-log.repo.spec.ts +++ b/apps/server/src/modules/deletion/repo/deletion-log.repo.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test } from '@nestjs/testing'; import { TestingModule } from '@nestjs/testing/testing-module'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections } from '@shared/testing'; import { DeletionLogMapper } from './mapper'; import { DeletionLogEntity } from '../entity'; diff --git a/apps/server/src/modules/deletion/repo/deletion-request.repo.spec.ts b/apps/server/src/modules/deletion/repo/deletion-request.repo.spec.ts index 579dc0ec403..c3018180218 100644 --- a/apps/server/src/modules/deletion/repo/deletion-request.repo.spec.ts +++ b/apps/server/src/modules/deletion/repo/deletion-request.repo.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test } from '@nestjs/testing'; import { TestingModule } from '@nestjs/testing/testing-module'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections } from '@shared/testing'; import { DeletionRequestMapper } from './mapper'; import { DeletionRequestRepo } from './deletion-request.repo'; diff --git a/apps/server/src/modules/files-storage-client/dto/file.dto.spec.ts b/apps/server/src/modules/files-storage-client/dto/file.dto.spec.ts index 509eee7f49f..0017e0aaa42 100644 --- a/apps/server/src/modules/files-storage-client/dto/file.dto.spec.ts +++ b/apps/server/src/modules/files-storage-client/dto/file.dto.spec.ts @@ -1,4 +1,4 @@ -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { FileDto } from './file.dto'; describe('FileDto', () => { diff --git a/apps/server/src/modules/files-storage-client/dto/file.dto.ts b/apps/server/src/modules/files-storage-client/dto/file.dto.ts index 5ac6e76181f..38d6daf4c3b 100644 --- a/apps/server/src/modules/files-storage-client/dto/file.dto.ts +++ b/apps/server/src/modules/files-storage-client/dto/file.dto.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { IFileDomainObjectProps } from '../interfaces'; export class FileDto { diff --git a/apps/server/src/modules/files-storage-client/interfaces/file-domain-object-props.ts b/apps/server/src/modules/files-storage-client/interfaces/file-domain-object-props.ts index 35513f27b02..f302e53e9a0 100644 --- a/apps/server/src/modules/files-storage-client/interfaces/file-domain-object-props.ts +++ b/apps/server/src/modules/files-storage-client/interfaces/file-domain-object-props.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; export interface IFileDomainObjectProps { id: EntityId; diff --git a/apps/server/src/modules/files-storage-client/interfaces/file-request-info.ts b/apps/server/src/modules/files-storage-client/interfaces/file-request-info.ts index d45df0aef3d..12a7898d9cf 100644 --- a/apps/server/src/modules/files-storage-client/interfaces/file-request-info.ts +++ b/apps/server/src/modules/files-storage-client/interfaces/file-request-info.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; export interface IFileRequestInfo { schoolId: EntityId; diff --git a/apps/server/src/modules/files-storage-client/mapper/copy-files-of-parent-param.builder.spec.ts b/apps/server/src/modules/files-storage-client/mapper/copy-files-of-parent-param.builder.spec.ts index 9cb8f09553f..ccce67a089a 100644 --- a/apps/server/src/modules/files-storage-client/mapper/copy-files-of-parent-param.builder.spec.ts +++ b/apps/server/src/modules/files-storage-client/mapper/copy-files-of-parent-param.builder.spec.ts @@ -1,5 +1,5 @@ import { ObjectId } from '@mikro-orm/mongodb'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { lessonFactory, setupEntities, taskFactory } from '@shared/testing'; import { CopyFilesOfParentParamBuilder } from './copy-files-of-parent-param.builder'; import { FileParamBuilder } from './files-storage-param.builder'; diff --git a/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.spec.ts b/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.spec.ts index 2a7d100ca86..f48d66dce48 100644 --- a/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.spec.ts +++ b/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.spec.ts @@ -1,4 +1,4 @@ -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { ICopyFileDomainObjectProps, IFileDomainObjectProps } from '../interfaces'; import { FilesStorageClientMapper } from './files-storage-client.mapper'; diff --git a/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.ts b/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.ts index 2c73ec3824e..233e47fd4c8 100644 --- a/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.ts +++ b/apps/server/src/modules/files-storage-client/mapper/files-storage-client.mapper.ts @@ -1,5 +1,5 @@ import { LessonEntity, Submission, Task } from '@shared/domain'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { CopyFileDto, FileDto } from '../dto'; import { EntitiesWithFiles, ICopyFileDomainObjectProps, IFileDomainObjectProps } from '../interfaces'; diff --git a/apps/server/src/modules/files-storage-client/mapper/files-storage-param.builder.spec.ts b/apps/server/src/modules/files-storage-client/mapper/files-storage-param.builder.spec.ts index 72a639620f1..23ce4f7e175 100644 --- a/apps/server/src/modules/files-storage-client/mapper/files-storage-param.builder.spec.ts +++ b/apps/server/src/modules/files-storage-client/mapper/files-storage-param.builder.spec.ts @@ -1,4 +1,4 @@ -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { lessonFactory, setupEntities, taskFactory } from '@shared/testing'; import { FileParamBuilder } from './files-storage-param.builder'; diff --git a/apps/server/src/modules/files-storage-client/service/files-storage.producer.spec.ts b/apps/server/src/modules/files-storage-client/service/files-storage.producer.spec.ts index 7e4ed5a1c83..ef2ac9c9d1d 100644 --- a/apps/server/src/modules/files-storage-client/service/files-storage.producer.spec.ts +++ b/apps/server/src/modules/files-storage-client/service/files-storage.producer.spec.ts @@ -3,7 +3,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { ErrorMapper, FileRecordParentType, FilesStorageEvents, FilesStorageExchange } from '@shared/infra/rabbitmq'; +import { ErrorMapper, FileRecordParentType, FilesStorageEvents, FilesStorageExchange } from '@infra/rabbitmq'; import { setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FilesStorageProducer } from './files-storage.producer'; diff --git a/apps/server/src/modules/files-storage-client/service/files-storage.producer.ts b/apps/server/src/modules/files-storage-client/service/files-storage.producer.ts index ea049442df4..34927c01831 100644 --- a/apps/server/src/modules/files-storage-client/service/files-storage.producer.ts +++ b/apps/server/src/modules/files-storage-client/service/files-storage.producer.ts @@ -11,7 +11,7 @@ import { IFileDO, IFileRecordParams, RpcMessageProducer, -} from '@src/shared/infra/rabbitmq'; +} from '@infra/rabbitmq'; import { IFilesStorageClientConfig } from '../interfaces'; @Injectable() diff --git a/apps/server/src/modules/files-storage/controller/api-test/files-storage-copy-files.api.spec.ts b/apps/server/src/modules/files-storage/controller/api-test/files-storage-copy-files.api.spec.ts index 22a7a11fb5b..4a966165633 100644 --- a/apps/server/src/modules/files-storage/controller/api-test/files-storage-copy-files.api.spec.ts +++ b/apps/server/src/modules/files-storage/controller/api-test/files-storage-copy-files.api.spec.ts @@ -6,8 +6,8 @@ import { ExecutionContext, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { ApiValidationError } from '@shared/common'; import { EntityId, Permission } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, courseFactory, diff --git a/apps/server/src/modules/files-storage/controller/api-test/files-storage-delete-files.api.spec.ts b/apps/server/src/modules/files-storage/controller/api-test/files-storage-delete-files.api.spec.ts index 0557843b8eb..6c1087ce371 100644 --- a/apps/server/src/modules/files-storage/controller/api-test/files-storage-delete-files.api.spec.ts +++ b/apps/server/src/modules/files-storage/controller/api-test/files-storage-delete-files.api.spec.ts @@ -6,8 +6,8 @@ import { ExecutionContext, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { ApiValidationError } from '@shared/common'; import { EntityId, Permission } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, fileRecordFactory, diff --git a/apps/server/src/modules/files-storage/controller/api-test/files-storage-download-upload.api.spec.ts b/apps/server/src/modules/files-storage/controller/api-test/files-storage-download-upload.api.spec.ts index e86b778e0ce..27661af51f8 100644 --- a/apps/server/src/modules/files-storage/controller/api-test/files-storage-download-upload.api.spec.ts +++ b/apps/server/src/modules/files-storage/controller/api-test/files-storage-download-upload.api.spec.ts @@ -6,8 +6,8 @@ import { ExecutionContext, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { ApiValidationError } from '@shared/common'; import { EntityId, Permission } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, mapUserToCurrentUser, roleFactory, schoolFactory, userFactory } from '@shared/testing'; import NodeClam from 'clamscan'; import { Request } from 'express'; diff --git a/apps/server/src/modules/files-storage/controller/api-test/files-storage-preview.api.spec.ts b/apps/server/src/modules/files-storage/controller/api-test/files-storage-preview.api.spec.ts index e87aa5ddbe6..f63eef6ac68 100644 --- a/apps/server/src/modules/files-storage/controller/api-test/files-storage-preview.api.spec.ts +++ b/apps/server/src/modules/files-storage/controller/api-test/files-storage-preview.api.spec.ts @@ -6,9 +6,9 @@ import { ExecutionContext, INestApplication, NotFoundException, StreamableFile } import { Test, TestingModule } from '@nestjs/testing'; import { ApiValidationError } from '@shared/common'; import { EntityId, Permission } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { PreviewProducer } from '@shared/infra/preview-generator'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { PreviewProducer } from '@infra/preview-generator'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, mapUserToCurrentUser, roleFactory, schoolFactory, userFactory } from '@shared/testing'; import NodeClam from 'clamscan'; import { Request } from 'express'; diff --git a/apps/server/src/modules/files-storage/controller/api-test/files-storage-restore-files.api.spec.ts b/apps/server/src/modules/files-storage/controller/api-test/files-storage-restore-files.api.spec.ts index 496f399d41b..9e666437748 100644 --- a/apps/server/src/modules/files-storage/controller/api-test/files-storage-restore-files.api.spec.ts +++ b/apps/server/src/modules/files-storage/controller/api-test/files-storage-restore-files.api.spec.ts @@ -6,8 +6,8 @@ import { ExecutionContext, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { ApiValidationError } from '@shared/common'; import { EntityId, Permission } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, fileRecordFactory, diff --git a/apps/server/src/modules/files-storage/controller/dto/file-storage.params.ts b/apps/server/src/modules/files-storage/controller/dto/file-storage.params.ts index 6555b7bd0f9..913a259e9c3 100644 --- a/apps/server/src/modules/files-storage/controller/dto/file-storage.params.ts +++ b/apps/server/src/modules/files-storage/controller/dto/file-storage.params.ts @@ -1,7 +1,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { StringToBoolean } from '@shared/controller'; import { EntityId } from '@shared/domain'; -import { ScanResult } from '@shared/infra/antivirus'; +import { ScanResult } from '@infra/antivirus'; import { Allow, IsBoolean, IsEnum, IsMongoId, IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator'; import { FileRecordParentType } from '../../entity'; import { PreviewOutputMimeTypes, PreviewWidth } from '../../interface'; diff --git a/apps/server/src/modules/files-storage/controller/files-storage.consumer.ts b/apps/server/src/modules/files-storage/controller/files-storage.consumer.ts index aabefa60f16..fc500fedee1 100644 --- a/apps/server/src/modules/files-storage/controller/files-storage.consumer.ts +++ b/apps/server/src/modules/files-storage/controller/files-storage.consumer.ts @@ -2,9 +2,9 @@ import { RabbitPayload, RabbitRPC } from '@golevelup/nestjs-rabbitmq'; import { MikroORM, UseRequestContext } from '@mikro-orm/core'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain'; -import { RpcMessage } from '@shared/infra/rabbitmq/rpc-message'; +import { RpcMessage } from '@infra/rabbitmq/rpc-message'; import { LegacyLogger } from '@src/core/logger'; -import { FilesStorageEvents, FilesStorageExchange, ICopyFileDO, IFileDO } from '@src/shared/infra/rabbitmq'; +import { FilesStorageEvents, FilesStorageExchange, ICopyFileDO, IFileDO } from '@infra/rabbitmq'; import { FilesStorageMapper } from '../mapper'; import { FilesStorageService } from '../service/files-storage.service'; import { PreviewService } from '../service/preview.service'; diff --git a/apps/server/src/modules/files-storage/dto/file.dto.ts b/apps/server/src/modules/files-storage/dto/file.dto.ts index 9668ac3af72..ecdc3a73296 100644 --- a/apps/server/src/modules/files-storage/dto/file.dto.ts +++ b/apps/server/src/modules/files-storage/dto/file.dto.ts @@ -1,4 +1,4 @@ -import { File } from '@shared/infra/s3-client'; +import { File } from '@infra/s3-client'; import { Readable } from 'stream'; export class FileDto implements File { diff --git a/apps/server/src/modules/files-storage/files-preview-amqp.module.ts b/apps/server/src/modules/files-storage/files-preview-amqp.module.ts index 411a26e76d6..78a1aec0129 100644 --- a/apps/server/src/modules/files-storage/files-preview-amqp.module.ts +++ b/apps/server/src/modules/files-storage/files-preview-amqp.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { PreviewGeneratorConsumerModule } from '@shared/infra/preview-generator'; +import { PreviewGeneratorConsumerModule } from '@infra/preview-generator'; import { defaultConfig, s3Config } from './files-storage.config'; @Module({ diff --git a/apps/server/src/modules/files-storage/files-storage-test.module.ts b/apps/server/src/modules/files-storage/files-storage-test.module.ts index 6f3d865ebb2..f219c8bccac 100644 --- a/apps/server/src/modules/files-storage/files-storage-test.module.ts +++ b/apps/server/src/modules/files-storage/files-storage-test.module.ts @@ -1,11 +1,10 @@ import { DynamicModule, Module } from '@nestjs/common'; import { ALL_ENTITIES } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { MongoDatabaseModuleOptions } from '@shared/infra/database/mongo-memory-database/types'; -import { RabbitMQWrapperTestModule } from '@shared/infra/rabbitmq/rabbitmq.module'; +import { MongoMemoryDatabaseModule, MongoDatabaseModuleOptions } from '@infra/database'; +import { RabbitMQWrapperTestModule } from '@infra/rabbitmq'; import { CoreModule } from '@src/core'; import { LoggerModule } from '@src/core/logger'; -import { AuthenticationModule } from '@modules/authentication/authentication.module'; +import { AuthenticationModule } from '@modules/authentication'; import { AuthorizationModule } from '@modules/authorization'; import { FileRecord } from './entity'; import { FilesStorageApiModule } from './files-storage-api.module'; diff --git a/apps/server/src/modules/files-storage/files-storage.config.ts b/apps/server/src/modules/files-storage/files-storage.config.ts index 7fac8ded763..985b07f0ef1 100644 --- a/apps/server/src/modules/files-storage/files-storage.config.ts +++ b/apps/server/src/modules/files-storage/files-storage.config.ts @@ -1,5 +1,5 @@ import { Configuration } from '@hpi-schul-cloud/commons'; -import { S3Config } from '@shared/infra/s3-client'; +import { S3Config } from '@infra/s3-client'; import { ICoreModuleConfig } from '@src/core'; export const FILES_STORAGE_S3_CONNECTION = 'FILES_STORAGE_S3_CONNECTION'; diff --git a/apps/server/src/modules/files-storage/files-storage.module.ts b/apps/server/src/modules/files-storage/files-storage.module.ts index ccdaeb7f9fa..a7432172a21 100644 --- a/apps/server/src/modules/files-storage/files-storage.module.ts +++ b/apps/server/src/modules/files-storage/files-storage.module.ts @@ -4,17 +4,16 @@ import { MikroOrmModule, MikroOrmModuleSyncOptions } from '@mikro-orm/nestjs'; import { Module, NotFoundException } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { ALL_ENTITIES } from '@shared/domain'; -import { AntivirusModule } from '@shared/infra/antivirus/antivirus.module'; -import { PreviewGeneratorProducerModule } from '@shared/infra/preview-generator'; -import { RabbitMQWrapperModule } from '@shared/infra/rabbitmq/rabbitmq.module'; -import { S3ClientModule } from '@shared/infra/s3-client'; +import { AntivirusModule } from '@infra/antivirus'; +import { PreviewGeneratorProducerModule } from '@infra/preview-generator'; +import { RabbitMQWrapperModule } from '@infra/rabbitmq'; +import { S3ClientModule } from '@infra/s3-client'; import { DB_PASSWORD, DB_URL, DB_USERNAME, createConfigModuleOptions } from '@src/config'; import { LoggerModule } from '@src/core/logger'; import { FileRecord, FileRecordSecurityCheck } from './entity'; import { config, s3Config } from './files-storage.config'; import { FileRecordRepo } from './repo'; -import { FilesStorageService } from './service/files-storage.service'; -import { PreviewService } from './service/preview.service'; +import { FilesStorageService, PreviewService } from './service'; const imports = [ LoggerModule, diff --git a/apps/server/src/modules/files-storage/helper/path.ts b/apps/server/src/modules/files-storage/helper/path.ts index 3ae81aef62d..f11a3ce7b2a 100644 --- a/apps/server/src/modules/files-storage/helper/path.ts +++ b/apps/server/src/modules/files-storage/helper/path.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain'; -import { CopyFiles } from '@shared/infra/s3-client'; +import { CopyFiles } from '@infra/s3-client'; import { FileRecord } from '../entity'; import { ErrorType } from '../error'; diff --git a/apps/server/src/modules/files-storage/helper/test-helper.ts b/apps/server/src/modules/files-storage/helper/test-helper.ts index a66bec17de2..77671a2d552 100644 --- a/apps/server/src/modules/files-storage/helper/test-helper.ts +++ b/apps/server/src/modules/files-storage/helper/test-helper.ts @@ -1,4 +1,4 @@ -import { GetFile } from '@shared/infra/s3-client'; +import { GetFile } from '@infra/s3-client'; import { Readable } from 'stream'; import { GetFileResponse } from '../interface'; diff --git a/apps/server/src/modules/files-storage/mapper/file-response.builder.ts b/apps/server/src/modules/files-storage/mapper/file-response.builder.ts index 02344e4b3cb..7ad856deb97 100644 --- a/apps/server/src/modules/files-storage/mapper/file-response.builder.ts +++ b/apps/server/src/modules/files-storage/mapper/file-response.builder.ts @@ -1,4 +1,4 @@ -import { GetFile } from '@shared/infra/s3-client'; +import { GetFile } from '@infra/s3-client'; import { GetFileResponse } from '../interface'; export class FileResponseBuilder { diff --git a/apps/server/src/modules/files-storage/mapper/preview.builder.ts b/apps/server/src/modules/files-storage/mapper/preview.builder.ts index 83a16448a98..aea85be53d8 100644 --- a/apps/server/src/modules/files-storage/mapper/preview.builder.ts +++ b/apps/server/src/modules/files-storage/mapper/preview.builder.ts @@ -1,4 +1,4 @@ -import { PreviewFileOptions } from '@shared/infra/preview-generator'; +import { PreviewFileOptions } from '@infra/preview-generator'; import { PreviewParams } from '../controller/dto'; import { FileRecord } from '../entity'; import { createPath, createPreviewFilePath, createPreviewNameHash, getFormat } from '../helper'; diff --git a/apps/server/src/modules/files-storage/repo/filerecord.repo.integration.spec.ts b/apps/server/src/modules/files-storage/repo/filerecord.repo.integration.spec.ts index 735359db012..d1dbe490c25 100644 --- a/apps/server/src/modules/files-storage/repo/filerecord.repo.integration.spec.ts +++ b/apps/server/src/modules/files-storage/repo/filerecord.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { cleanupCollections, fileRecordFactory } from '@shared/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { FileRecord, FileRecordParentType } from '../entity'; import { FileRecordRepo } from './filerecord.repo'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-copy.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-copy.service.spec.ts index 4ba05e540a8..51e2535e557 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-copy.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-copy.service.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FileRecordParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-delete.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-delete.service.spec.ts index 3705f93b51c..353b77837d9 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-delete.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-delete.service.spec.ts @@ -3,8 +3,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { InternalServerErrorException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FileRecordParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-download.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-download.service.spec.ts index bcee168c2b9..4c5f08e39ef 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-download.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-download.service.spec.ts @@ -3,8 +3,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { NotAcceptableException, NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { GetFile, S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { GetFile, S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FileRecordParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-get.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-get.service.spec.ts index 95f7c2d204c..546ac842799 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-get.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-get.service.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FileRecordParams, SingleFileParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-restore.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-restore.service.spec.ts index c82f96074f1..3b6dec255fa 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-restore.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-restore.service.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FileRecordParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-update.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-update.service.spec.ts index 8523c7388fd..eefd8176169 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-update.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-update.service.spec.ts @@ -3,8 +3,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { ConflictException, NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import _ from 'lodash'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-upload.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-upload.service.spec.ts index 022e6a4bf0d..765de1077bd 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-upload.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-upload.service.spec.ts @@ -3,8 +3,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { BadRequestException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { readableStreamWithFileTypeFactory } from '@shared/testing/factory/readable-stream-with-file-type.factory'; import { LegacyLogger } from '@src/core/logger'; diff --git a/apps/server/src/modules/files-storage/service/files-storage.service.ts b/apps/server/src/modules/files-storage/service/files-storage.service.ts index 209f1804d3e..6eb9e89ea96 100644 --- a/apps/server/src/modules/files-storage/service/files-storage.service.ts +++ b/apps/server/src/modules/files-storage/service/files-storage.service.ts @@ -8,8 +8,8 @@ import { } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Counted, EntityId } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { LegacyLogger } from '@src/core/logger'; import FileType from 'file-type-cjs/file-type-cjs-index'; import { PassThrough, Readable } from 'stream'; diff --git a/apps/server/src/modules/files-storage/service/index.ts b/apps/server/src/modules/files-storage/service/index.ts new file mode 100644 index 00000000000..f5f1eb61392 --- /dev/null +++ b/apps/server/src/modules/files-storage/service/index.ts @@ -0,0 +1,2 @@ +export * from './files-storage.service'; +export * from './preview.service'; diff --git a/apps/server/src/modules/files-storage/service/preview.service.spec.ts b/apps/server/src/modules/files-storage/service/preview.service.spec.ts index f02f48aee21..a5fed69ef51 100644 --- a/apps/server/src/modules/files-storage/service/preview.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/preview.service.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { NotFoundException, UnprocessableEntityException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { PreviewProducer } from '@shared/infra/preview-generator'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { PreviewProducer } from '@infra/preview-generator'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FileRecordParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/service/preview.service.ts b/apps/server/src/modules/files-storage/service/preview.service.ts index e27fbc0645a..0a9ba63e8e1 100644 --- a/apps/server/src/modules/files-storage/service/preview.service.ts +++ b/apps/server/src/modules/files-storage/service/preview.service.ts @@ -1,6 +1,6 @@ import { Inject, Injectable, NotFoundException, UnprocessableEntityException } from '@nestjs/common'; -import { PreviewProducer } from '@shared/infra/preview-generator'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { PreviewProducer } from '@infra/preview-generator'; +import { S3ClientAdapter } from '@infra/s3-client'; import { LegacyLogger } from '@src/core/logger'; import { PreviewParams } from '../controller/dto'; import { FileRecord, PreviewStatus } from '../entity'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-copy.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-copy.uc.spec.ts index 2b7f1052121..cefaba3ac24 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-copy.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-copy.uc.spec.ts @@ -4,8 +4,8 @@ import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId, Permission } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { Action } from '@modules/authorization'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-delete.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-delete.uc.spec.ts index b12006367aa..ef0dc16c1b6 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-delete.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-delete.uc.spec.ts @@ -5,8 +5,8 @@ import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Counted, EntityId } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { FileRecordParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-download-preview.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-download-preview.uc.spec.ts index f0aa9dcc25a..d34f004d73b 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-download-preview.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-download-preview.uc.spec.ts @@ -3,8 +3,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { AuthorizationReferenceService } from '@modules/authorization/domain'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-download.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-download.uc.spec.ts index 51ad0fd0b77..bcb5b2ec827 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-download.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-download.uc.spec.ts @@ -3,8 +3,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { AuthorizationReferenceService } from '@modules/authorization/domain'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-get.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-get.uc.spec.ts index 60d3fdd1a64..a4f3e0f8b2f 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-get.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-get.uc.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { AuthorizationReferenceService } from '@modules/authorization/domain'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-restore.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-restore.uc.spec.ts index b66c9c8821d..dc811c566a4 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-restore.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-restore.uc.spec.ts @@ -3,8 +3,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { AuthorizationReferenceService } from '@modules/authorization/domain'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-update.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-update.uc.spec.ts index c59f37d2599..5b126c8ea2a 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-update.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-update.uc.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { Test, TestingModule } from '@nestjs/testing'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { AuthorizationReferenceService } from '@modules/authorization/domain'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage-upload.uc.spec.ts b/apps/server/src/modules/files-storage/uc/files-storage-upload.uc.spec.ts index 43d9e9b7750..1125e7644bb 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage-upload.uc.spec.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage-upload.uc.spec.ts @@ -4,8 +4,8 @@ import { HttpService } from '@nestjs/axios'; import { ForbiddenException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission } from '@shared/domain'; -import { AntivirusService } from '@shared/infra/antivirus'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { AntivirusService } from '@infra/antivirus'; +import { S3ClientAdapter } from '@infra/s3-client'; import { AxiosHeadersKeyValue, axiosResponseFactory, fileRecordFactory, setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { Action } from '@modules/authorization'; diff --git a/apps/server/src/modules/files/repo/files.repo.spec.ts b/apps/server/src/modules/files/repo/files.repo.spec.ts index ea33ae7917a..0ef8136918d 100644 --- a/apps/server/src/modules/files/repo/files.repo.spec.ts +++ b/apps/server/src/modules/files/repo/files.repo.spec.ts @@ -1,6 +1,6 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { StorageProviderEntity } from '@shared/domain'; import { FileEntity } from '../entity'; import { fileEntityFactory, filePermissionEntityFactory } from '../entity/testing'; diff --git a/apps/server/src/modules/fwu-learning-contents/controller/api-test/fwu-learning-contents.api.spec.ts b/apps/server/src/modules/fwu-learning-contents/controller/api-test/fwu-learning-contents.api.spec.ts index 9eee09a30af..1c9921dbff5 100644 --- a/apps/server/src/modules/fwu-learning-contents/controller/api-test/fwu-learning-contents.api.spec.ts +++ b/apps/server/src/modules/fwu-learning-contents/controller/api-test/fwu-learning-contents.api.spec.ts @@ -2,7 +2,7 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { INestApplication, NotFoundException } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { JwtAuthGuard } from '@modules/authentication/guard/jwt-auth.guard'; import { Readable } from 'stream'; import request from 'supertest'; diff --git a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents-test.module.ts b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents-test.module.ts index 62e25bef4e2..d644ca2a57c 100644 --- a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents-test.module.ts +++ b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents-test.module.ts @@ -2,10 +2,10 @@ import { HttpModule } from '@nestjs/axios'; import { DynamicModule, Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { Account, Role, SchoolEntity, SchoolYearEntity, SystemEntity, User } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { MongoDatabaseModuleOptions } from '@shared/infra/database/mongo-memory-database/types'; -import { RabbitMQWrapperTestModule } from '@shared/infra/rabbitmq'; -import { S3ClientModule } from '@shared/infra/s3-client'; +import { MongoMemoryDatabaseModule } from '@infra/database'; +import { MongoDatabaseModuleOptions } from '@infra/database/mongo-memory-database/types'; +import { RabbitMQWrapperTestModule } from '@infra/rabbitmq'; +import { S3ClientModule } from '@infra/s3-client'; import { createConfigModuleOptions } from '@src/config'; import { CoreModule } from '@src/core'; import { LoggerModule } from '@src/core/logger'; diff --git a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.config.ts b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.config.ts index 56ae93e0205..6cfcb03b74f 100644 --- a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.config.ts +++ b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.config.ts @@ -1,5 +1,5 @@ import { Configuration } from '@hpi-schul-cloud/commons'; -import { S3Config } from '@shared/infra/s3-client'; +import { S3Config } from '@infra/s3-client'; export const FWU_CONTENT_S3_CONNECTION = 'FWU_CONTENT_S3_CONNECTION'; diff --git a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.module.ts b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.module.ts index b15c8a04054..a991ca56503 100644 --- a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.module.ts +++ b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.module.ts @@ -4,8 +4,8 @@ import { HttpModule } from '@nestjs/axios'; import { Module, NotFoundException } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { Account, Role, SchoolEntity, SchoolYearEntity, SystemEntity, User } from '@shared/domain'; -import { RabbitMQWrapperModule } from '@shared/infra/rabbitmq'; -import { S3ClientModule } from '@shared/infra/s3-client'; +import { RabbitMQWrapperModule } from '@infra/rabbitmq'; +import { S3ClientModule } from '@infra/s3-client'; import { DB_PASSWORD, DB_URL, DB_USERNAME, createConfigModuleOptions } from '@src/config'; import { CoreModule } from '@src/core'; import { LoggerModule } from '@src/core/logger'; diff --git a/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.spec.ts b/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.spec.ts index 80240e0ea8e..e7606aeb245 100644 --- a/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.spec.ts +++ b/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.spec.ts @@ -1,6 +1,6 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { LegacyLogger } from '@src/core/logger'; import { Readable } from 'stream'; import { FWU_CONTENT_S3_CONNECTION } from '../fwu-learning-contents.config'; diff --git a/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.ts b/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.ts index afab92d46a5..6cdc20b9321 100644 --- a/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.ts +++ b/apps/server/src/modules/fwu-learning-contents/uc/fwu-learning-contents.uc.ts @@ -1,5 +1,5 @@ import { Inject, Injectable } from '@nestjs/common'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { LegacyLogger } from '@src/core/logger'; import { FWU_CONTENT_S3_CONNECTION } from '../fwu-learning-contents.config'; diff --git a/apps/server/src/modules/group/repo/group.repo.spec.ts b/apps/server/src/modules/group/repo/group.repo.spec.ts index 358b3c13983..1bcc024514a 100644 --- a/apps/server/src/modules/group/repo/group.repo.spec.ts +++ b/apps/server/src/modules/group/repo/group.repo.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { ExternalSource, SchoolEntity, UserDO, User } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, groupEntityFactory, diff --git a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-ajax.api.spec.ts b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-ajax.api.spec.ts index 543db38ebbf..0c7251e6134 100644 --- a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-ajax.api.spec.ts +++ b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-ajax.api.spec.ts @@ -3,7 +3,7 @@ import { H5PAjaxEndpoint } from '@lumieducation/h5p-server'; import { EntityManager } from '@mikro-orm/core'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { TestApiClient, UserAndAccountTestFactory } from '@shared/testing'; import { H5PEditorTestModule } from '../../h5p-editor-test.module'; import { H5P_CONTENT_S3_CONNECTION, H5P_LIBRARIES_S3_CONNECTION } from '../../h5p-editor.config'; diff --git a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-delete.api.spec.ts b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-delete.api.spec.ts index 9f3b0017d08..e2af08f3fd5 100644 --- a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-delete.api.spec.ts +++ b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-delete.api.spec.ts @@ -3,7 +3,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { ExecutionContext, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, mapUserToCurrentUser, roleFactory, schoolFactory, userFactory } from '@shared/testing'; import { ICurrentUser } from '@src/modules/authentication'; import { JwtAuthGuard } from '@src/modules/authentication/guard/jwt-auth.guard'; diff --git a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-files.api.spec.ts b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-files.api.spec.ts index 702aac1a717..05132888f71 100644 --- a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-files.api.spec.ts +++ b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-files.api.spec.ts @@ -4,7 +4,7 @@ import { ContentMetadata } from '@lumieducation/h5p-server/build/src/ContentMeta import { EntityManager } from '@mikro-orm/mongodb'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { courseFactory, h5pContentFactory, diff --git a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-editor.api.spec.ts b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-editor.api.spec.ts index 737266f300d..3f738fd67c0 100644 --- a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-editor.api.spec.ts +++ b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-editor.api.spec.ts @@ -3,7 +3,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { ExecutionContext, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, mapUserToCurrentUser, roleFactory, schoolFactory, userFactory } from '@shared/testing'; import { ICurrentUser } from '@src/modules/authentication'; import { JwtAuthGuard } from '@src/modules/authentication/guard/jwt-auth.guard'; diff --git a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-player.api.spec.ts b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-player.api.spec.ts index 708dfef968a..6e98bb6905a 100644 --- a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-player.api.spec.ts +++ b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-get-player.api.spec.ts @@ -4,7 +4,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { ExecutionContext, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { cleanupCollections, mapUserToCurrentUser, roleFactory, schoolFactory, userFactory } from '@shared/testing'; import { ICurrentUser } from '@src/modules/authentication'; import { JwtAuthGuard } from '@src/modules/authentication/guard/jwt-auth.guard'; diff --git a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-save-create.api.spec.ts b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-save-create.api.spec.ts index 9981a13e81f..0e1d5a13686 100644 --- a/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-save-create.api.spec.ts +++ b/apps/server/src/modules/h5p-editor/controller/api-test/h5p-editor-save-create.api.spec.ts @@ -3,7 +3,7 @@ import { IContentMetadata } from '@lumieducation/h5p-server'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { TestApiClient, UserAndAccountTestFactory } from '@shared/testing'; import { H5PContentParentType } from '../../entity'; import { H5PEditorTestModule } from '../../h5p-editor-test.module'; diff --git a/apps/server/src/modules/h5p-editor/controller/dto/h5p-file.dto.ts b/apps/server/src/modules/h5p-editor/controller/dto/h5p-file.dto.ts index 1ac4fc092e3..277c233dfa4 100644 --- a/apps/server/src/modules/h5p-editor/controller/dto/h5p-file.dto.ts +++ b/apps/server/src/modules/h5p-editor/controller/dto/h5p-file.dto.ts @@ -1,5 +1,5 @@ import { Readable } from 'stream'; -import { File } from '@shared/infra/s3-client'; +import { File } from '@infra/s3-client'; export class H5pFileDto implements File { constructor(file: H5pFileDto) { diff --git a/apps/server/src/modules/h5p-editor/h5p-editor-test.module.ts b/apps/server/src/modules/h5p-editor/h5p-editor-test.module.ts index 62cd06dcf6e..49d53c57726 100644 --- a/apps/server/src/modules/h5p-editor/h5p-editor-test.module.ts +++ b/apps/server/src/modules/h5p-editor/h5p-editor-test.module.ts @@ -1,14 +1,14 @@ import { DynamicModule, Module } from '@nestjs/common'; import { ALL_ENTITIES } from '@shared/domain'; -import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { RabbitMQWrapperTestModule } from '@shared/infra/rabbitmq'; -import { S3ClientModule } from '@shared/infra/s3-client'; +import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@infra/database'; +import { RabbitMQWrapperTestModule } from '@infra/rabbitmq'; +import { S3ClientModule } from '@infra/s3-client'; import { CoreModule } from '@src/core'; import { LoggerModule } from '@src/core/logger'; -import { AuthenticationModule } from '@modules/authentication/authentication.module'; +import { AuthenticationModule } from '@modules/authentication'; import { AuthorizationReferenceModule } from '@modules/authorization/authorization-reference.module'; import { UserModule } from '@modules/user'; -import { AuthenticationApiModule } from '../authentication/authentication-api.module'; +import { AuthenticationApiModule } from '@modules/authentication/authentication-api.module'; import { H5PEditorModule } from './h5p-editor.module'; import { H5PContentRepo, LibraryRepo, TemporaryFileRepo } from './repo'; import { ContentStorage, LibraryStorage, TemporaryFileStorage } from './service'; diff --git a/apps/server/src/modules/h5p-editor/h5p-editor.config.ts b/apps/server/src/modules/h5p-editor/h5p-editor.config.ts index f02084aa4e5..9509cf66a76 100644 --- a/apps/server/src/modules/h5p-editor/h5p-editor.config.ts +++ b/apps/server/src/modules/h5p-editor/h5p-editor.config.ts @@ -1,5 +1,5 @@ import { Configuration } from '@hpi-schul-cloud/commons'; -import { S3Config } from '@shared/infra/s3-client'; +import { S3Config } from '@infra/s3-client'; const h5pEditorConfig = { NEST_LOG_LEVEL: Configuration.get('NEST_LOG_LEVEL') as string, diff --git a/apps/server/src/modules/h5p-editor/h5p-editor.module.ts b/apps/server/src/modules/h5p-editor/h5p-editor.module.ts index 34efcedd69e..c80ff8bd6c0 100644 --- a/apps/server/src/modules/h5p-editor/h5p-editor.module.ts +++ b/apps/server/src/modules/h5p-editor/h5p-editor.module.ts @@ -3,14 +3,14 @@ import { MikroOrmModule, MikroOrmModuleSyncOptions } from '@mikro-orm/nestjs'; import { Module, NotFoundException } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { ALL_ENTITIES } from '@shared/domain'; -import { RabbitMQWrapperModule } from '@shared/infra/rabbitmq'; +import { RabbitMQWrapperModule } from '@infra/rabbitmq'; import { DB_PASSWORD, DB_URL, DB_USERNAME, createConfigModuleOptions } from '@src/config'; import { CoreModule } from '@src/core'; import { Logger } from '@src/core/logger'; import { AuthorizationReferenceModule } from '@modules/authorization/authorization-reference.module'; import { UserModule } from '@modules/user'; -import { S3ClientModule } from '@shared/infra/s3-client'; -import { AuthenticationModule } from '../authentication/authentication.module'; +import { S3ClientModule } from '@infra/s3-client'; +import { AuthenticationModule } from '@modules/authentication'; import { H5PEditorController } from './controller/h5p-editor.controller'; import { H5PContent, InstalledLibrary, H5pEditorTempFile } from './entity'; import { config, s3ConfigContent, s3ConfigLibraries } from './h5p-editor.config'; diff --git a/apps/server/src/modules/h5p-editor/repo/h5p-content.repo.integration.spec.ts b/apps/server/src/modules/h5p-editor/repo/h5p-content.repo.integration.spec.ts index e06836ced99..f9672ffb3ce 100644 --- a/apps/server/src/modules/h5p-editor/repo/h5p-content.repo.integration.spec.ts +++ b/apps/server/src/modules/h5p-editor/repo/h5p-content.repo.integration.spec.ts @@ -1,6 +1,6 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, h5pContentFactory } from '@shared/testing'; import { H5PContent } from '../entity'; import { H5PContentRepo } from './h5p-content.repo'; diff --git a/apps/server/src/modules/h5p-editor/repo/library.repo.spec.ts b/apps/server/src/modules/h5p-editor/repo/library.repo.spec.ts index 78d219aa557..79bcde09fe9 100644 --- a/apps/server/src/modules/h5p-editor/repo/library.repo.spec.ts +++ b/apps/server/src/modules/h5p-editor/repo/library.repo.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { cleanupCollections } from '@shared/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ILibraryMetadata } from '@lumieducation/h5p-server'; import { LibraryRepo } from './library.repo'; diff --git a/apps/server/src/modules/h5p-editor/repo/temporary-file.repo.integration.spec.ts b/apps/server/src/modules/h5p-editor/repo/temporary-file.repo.integration.spec.ts index ccaff625d66..e5e763b6216 100644 --- a/apps/server/src/modules/h5p-editor/repo/temporary-file.repo.integration.spec.ts +++ b/apps/server/src/modules/h5p-editor/repo/temporary-file.repo.integration.spec.ts @@ -1,6 +1,6 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, h5pTemporaryFileFactory } from '@shared/testing'; import { H5pEditorTempFile } from '../entity'; import { TemporaryFileRepo } from './temporary-file.repo'; diff --git a/apps/server/src/modules/h5p-editor/service/contentStorage.service.spec.ts b/apps/server/src/modules/h5p-editor/service/contentStorage.service.spec.ts index a02c8867cd0..df19f05ae21 100644 --- a/apps/server/src/modules/h5p-editor/service/contentStorage.service.spec.ts +++ b/apps/server/src/modules/h5p-editor/service/contentStorage.service.spec.ts @@ -4,7 +4,7 @@ import { IContentMetadata, ILibraryName, IUser, LibraryName } from '@lumieducati import { HttpException, InternalServerErrorException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { IEntity } from '@shared/domain'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { ObjectID } from 'bson'; import { Readable } from 'stream'; import { GetH5PFileResponse } from '../controller/dto'; diff --git a/apps/server/src/modules/h5p-editor/service/contentStorage.service.ts b/apps/server/src/modules/h5p-editor/service/contentStorage.service.ts index 95895b867c8..753f40201e3 100644 --- a/apps/server/src/modules/h5p-editor/service/contentStorage.service.ts +++ b/apps/server/src/modules/h5p-editor/service/contentStorage.service.ts @@ -17,7 +17,7 @@ import { NotFoundException, UnprocessableEntityException, } from '@nestjs/common'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { ErrorUtils } from '@src/core/error/utils'; import { Readable } from 'stream'; import { H5pFileDto } from '../controller/dto/h5p-file.dto'; diff --git a/apps/server/src/modules/h5p-editor/service/libraryStorage.service.spec.ts b/apps/server/src/modules/h5p-editor/service/libraryStorage.service.spec.ts index afde26d59b0..1b7910f057d 100644 --- a/apps/server/src/modules/h5p-editor/service/libraryStorage.service.spec.ts +++ b/apps/server/src/modules/h5p-editor/service/libraryStorage.service.spec.ts @@ -6,7 +6,7 @@ import { H5pError, ILibraryMetadata, ILibraryName } from '@lumieducation/h5p-ser import { NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { FileMetadata, InstalledLibrary } from '../entity/library.entity'; import { H5P_LIBRARIES_S3_CONNECTION } from '../h5p-editor.config'; import { LibraryRepo } from '../repo/library.repo'; diff --git a/apps/server/src/modules/h5p-editor/service/libraryStorage.service.ts b/apps/server/src/modules/h5p-editor/service/libraryStorage.service.ts index 6839a9d2a27..aff2b76ae16 100644 --- a/apps/server/src/modules/h5p-editor/service/libraryStorage.service.ts +++ b/apps/server/src/modules/h5p-editor/service/libraryStorage.service.ts @@ -10,7 +10,7 @@ import { type ILibraryStorage, } from '@lumieducation/h5p-server'; import { ConflictException, Inject, Injectable, NotFoundException } from '@nestjs/common'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import mime from 'mime'; import path from 'node:path/posix'; import { Readable } from 'stream'; diff --git a/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.spec.ts b/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.spec.ts index bcbdfa9945c..b7d65e25cb4 100644 --- a/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.spec.ts +++ b/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.spec.ts @@ -2,7 +2,7 @@ import { ServiceOutputTypes } from '@aws-sdk/client-s3'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { IUser } from '@lumieducation/h5p-server'; import { Test, TestingModule } from '@nestjs/testing'; -import { File, S3ClientAdapter } from '@shared/infra/s3-client'; +import { File, S3ClientAdapter } from '@infra/s3-client'; import { ReadStream } from 'fs'; import { Readable } from 'node:stream'; import { GetH5pFileResponse } from '../controller/dto'; diff --git a/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts b/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts index 6bfa164e630..7921b52a27b 100644 --- a/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts +++ b/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts @@ -1,6 +1,6 @@ import { ITemporaryFile, ITemporaryFileStorage, IUser } from '@lumieducation/h5p-server'; import { Inject, Injectable, NotAcceptableException } from '@nestjs/common'; -import { S3ClientAdapter } from '@shared/infra/s3-client'; +import { S3ClientAdapter } from '@infra/s3-client'; import { ReadStream } from 'fs'; import { Readable } from 'stream'; import { H5pFileDto } from '../controller/dto/h5p-file.dto'; diff --git a/apps/server/src/modules/learnroom/service/column-board-target.service.spec.ts b/apps/server/src/modules/learnroom/service/column-board-target.service.spec.ts index 64db859ddac..8a586c39eb6 100644 --- a/apps/server/src/modules/learnroom/service/column-board-target.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/column-board-target.service.spec.ts @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { ColumnBoardTarget } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, columnBoardTargetFactory } from '@shared/testing'; import { ColumnBoardService } from '@modules/board'; import { ColumnBoardTargetService } from './column-board-target.service'; diff --git a/apps/server/src/modules/legacy-school/repo/schoolyear.repo.integration.spec.ts b/apps/server/src/modules/legacy-school/repo/schoolyear.repo.integration.spec.ts index 5439fdef9f6..1688e9e6d97 100644 --- a/apps/server/src/modules/legacy-school/repo/schoolyear.repo.integration.spec.ts +++ b/apps/server/src/modules/legacy-school/repo/schoolyear.repo.integration.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolYearEntity } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections } from '@shared/testing'; import { schoolYearFactory } from '@shared/testing/factory/schoolyear.factory'; import { SchoolYearRepo } from './schoolyear.repo'; diff --git a/apps/server/src/modules/lesson/lesson.module.ts b/apps/server/src/modules/lesson/lesson.module.ts index 2e246c63211..dde1eb157ec 100644 --- a/apps/server/src/modules/lesson/lesson.module.ts +++ b/apps/server/src/modules/lesson/lesson.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { FeathersServiceProvider } from '@shared/infra/feathers'; +import { FeathersServiceProvider } from '@infra/feathers'; import { LessonRepo } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; import { CopyHelperModule } from '@modules/copy-helper'; diff --git a/apps/server/src/modules/lesson/service/etherpad.service.spec.ts b/apps/server/src/modules/lesson/service/etherpad.service.spec.ts index 81a903008c6..02bc68e67bf 100644 --- a/apps/server/src/modules/lesson/service/etherpad.service.spec.ts +++ b/apps/server/src/modules/lesson/service/etherpad.service.spec.ts @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain'; -import { FeathersServiceProvider } from '@shared/infra/feathers/feathers-service.provider'; +import { FeathersServiceProvider } from '@infra/feathers/feathers-service.provider'; import { LegacyLogger } from '@src/core/logger'; import { EtherpadService } from './etherpad.service'; diff --git a/apps/server/src/modules/lesson/service/etherpad.service.ts b/apps/server/src/modules/lesson/service/etherpad.service.ts index d630a93420e..62e0773071b 100644 --- a/apps/server/src/modules/lesson/service/etherpad.service.ts +++ b/apps/server/src/modules/lesson/service/etherpad.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { FeathersServiceProvider } from '@shared/infra/feathers/feathers-service.provider'; +import { FeathersServiceProvider } from '@infra/feathers'; import { LegacyLogger } from '@src/core/logger'; export type PadResponse = { data: { padID: string } }; diff --git a/apps/server/src/modules/lesson/service/nexboard.service.spec.ts b/apps/server/src/modules/lesson/service/nexboard.service.spec.ts index a4f40bd1989..8085a5fdd89 100644 --- a/apps/server/src/modules/lesson/service/nexboard.service.spec.ts +++ b/apps/server/src/modules/lesson/service/nexboard.service.spec.ts @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain'; -import { FeathersServiceProvider } from '@shared/infra/feathers/feathers-service.provider'; +import { FeathersServiceProvider } from '@infra/feathers'; import { LegacyLogger } from '@src/core/logger'; import { NexboardService } from './nexboard.service'; diff --git a/apps/server/src/modules/lesson/service/nexboard.service.ts b/apps/server/src/modules/lesson/service/nexboard.service.ts index 01ca20647ad..31da21a9f92 100644 --- a/apps/server/src/modules/lesson/service/nexboard.service.ts +++ b/apps/server/src/modules/lesson/service/nexboard.service.ts @@ -1,4 +1,4 @@ -import { FeathersServiceProvider } from '@shared/infra/feathers/feathers-service.provider'; +import { FeathersServiceProvider } from '@infra/feathers/feathers-service.provider'; import { LegacyLogger } from '@src/core/logger'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; diff --git a/apps/server/src/modules/management/console/board-management.console.spec.ts b/apps/server/src/modules/management/console/board-management.console.spec.ts index d6027bece93..4fe62db18a5 100644 --- a/apps/server/src/modules/management/console/board-management.console.spec.ts +++ b/apps/server/src/modules/management/console/board-management.console.spec.ts @@ -1,6 +1,6 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { ObjectId } from 'bson'; import { BoardManagementUc } from '../uc/board-management.uc'; import { BoardManagementConsole } from './board-management.console'; diff --git a/apps/server/src/modules/management/console/board-management.console.ts b/apps/server/src/modules/management/console/board-management.console.ts index f2762eccb17..83e5d4d7961 100644 --- a/apps/server/src/modules/management/console/board-management.console.ts +++ b/apps/server/src/modules/management/console/board-management.console.ts @@ -1,4 +1,4 @@ -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { ObjectId } from 'bson'; import { Command, Console } from 'nestjs-console'; import { BoardManagementUc } from '../uc/board-management.uc'; diff --git a/apps/server/src/modules/management/console/database-management.console.spec.ts b/apps/server/src/modules/management/console/database-management.console.spec.ts index f987bddff41..44517e19396 100644 --- a/apps/server/src/modules/management/console/database-management.console.spec.ts +++ b/apps/server/src/modules/management/console/database-management.console.spec.ts @@ -1,6 +1,6 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { DatabaseManagementUc } from '../uc/database-management.uc'; import { DatabaseManagementConsole } from './database-management.console'; diff --git a/apps/server/src/modules/management/console/database-management.console.ts b/apps/server/src/modules/management/console/database-management.console.ts index 29d98005bfe..780072aa837 100644 --- a/apps/server/src/modules/management/console/database-management.console.ts +++ b/apps/server/src/modules/management/console/database-management.console.ts @@ -1,4 +1,4 @@ -import { ConsoleWriterService } from '@shared/infra/console/console-writer/console-writer.service'; +import { ConsoleWriterService } from '@infra/console/console-writer/console-writer.service'; import { Command, Console } from 'nestjs-console'; import { DatabaseManagementUc } from '../uc/database-management.uc'; diff --git a/apps/server/src/modules/management/management-server.module.ts b/apps/server/src/modules/management/management-server.module.ts index b7481646c11..c24bf90cc09 100644 --- a/apps/server/src/modules/management/management-server.module.ts +++ b/apps/server/src/modules/management/management-server.module.ts @@ -2,8 +2,8 @@ import { Dictionary, IPrimaryKey } from '@mikro-orm/core'; import { MikroOrmModule, MikroOrmModuleSyncOptions } from '@mikro-orm/nestjs'; import { DynamicModule, Module, NotFoundException } from '@nestjs/common'; import { ALL_ENTITIES } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { MongoDatabaseModuleOptions } from '@shared/infra/database/mongo-memory-database/types'; +import { MongoMemoryDatabaseModule } from '@infra/database'; +import { MongoDatabaseModuleOptions } from '@infra/database/mongo-memory-database/types'; import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/config'; import { ManagementModule } from './management.module'; diff --git a/apps/server/src/modules/management/management.module.ts b/apps/server/src/modules/management/management.module.ts index fc4c8bc08d3..c1ed6aed227 100644 --- a/apps/server/src/modules/management/management.module.ts +++ b/apps/server/src/modules/management/management.module.ts @@ -1,11 +1,11 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; -import { ConsoleWriterService } from '@shared/infra/console'; -import { DatabaseManagementModule, DatabaseManagementService } from '@shared/infra/database'; -import { EncryptionModule } from '@shared/infra/encryption'; -import { FileSystemModule } from '@shared/infra/file-system'; -import { KeycloakConfigurationModule } from '@shared/infra/identity-management/keycloak-configuration/keycloak-configuration.module'; +import { ConsoleWriterService } from '@infra/console'; +import { DatabaseManagementModule, DatabaseManagementService } from '@infra/database'; +import { EncryptionModule } from '@infra/encryption'; +import { FileSystemModule } from '@infra/file-system'; +import { KeycloakConfigurationModule } from '@infra/identity-management/keycloak-configuration/keycloak-configuration.module'; import { createConfigModuleOptions } from '@src/config'; import { LoggerModule } from '@src/core/logger'; import { serverConfig } from '@modules/server'; diff --git a/apps/server/src/modules/management/uc/board-management.uc.ts b/apps/server/src/modules/management/uc/board-management.uc.ts index d57af94e6e9..8fa595690e8 100644 --- a/apps/server/src/modules/management/uc/board-management.uc.ts +++ b/apps/server/src/modules/management/uc/board-management.uc.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Injectable } from '@nestjs/common'; import { BoardExternalReferenceType, BoardNode, Course, EntityId, InputFormat } from '@shared/domain'; -import { ConsoleWriterService } from '@shared/infra/console'; +import { ConsoleWriterService } from '@infra/console'; import { cardNodeFactory, columnBoardNodeFactory, diff --git a/apps/server/src/modules/management/uc/database-management.uc.spec.ts b/apps/server/src/modules/management/uc/database-management.uc.spec.ts index d74ecb0475e..0aa2c005a39 100644 --- a/apps/server/src/modules/management/uc/database-management.uc.spec.ts +++ b/apps/server/src/modules/management/uc/database-management.uc.spec.ts @@ -4,13 +4,9 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { StorageProviderEntity, SystemEntity } from '@shared/domain'; -import { DatabaseManagementService } from '@shared/infra/database'; -import { - DefaultEncryptionService, - LdapEncryptionService, - SymetricKeyEncryptionService, -} from '@shared/infra/encryption'; -import { FileSystemAdapter } from '@shared/infra/file-system'; +import { DatabaseManagementService } from '@infra/database'; +import { DefaultEncryptionService, LdapEncryptionService, SymetricKeyEncryptionService } from '@infra/encryption'; +import { FileSystemAdapter } from '@infra/file-system'; import { setupEntities } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { ObjectId } from 'mongodb'; diff --git a/apps/server/src/modules/management/uc/database-management.uc.ts b/apps/server/src/modules/management/uc/database-management.uc.ts index 5a51d249de9..7b3d034c504 100644 --- a/apps/server/src/modules/management/uc/database-management.uc.ts +++ b/apps/server/src/modules/management/uc/database-management.uc.ts @@ -3,9 +3,9 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Inject, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { StorageProviderEntity, SystemEntity } from '@shared/domain'; -import { DatabaseManagementService } from '@shared/infra/database'; -import { DefaultEncryptionService, IEncryptionService, LdapEncryptionService } from '@shared/infra/encryption'; -import { FileSystemAdapter } from '@shared/infra/file-system'; +import { DatabaseManagementService } from '@infra/database'; +import { DefaultEncryptionService, IEncryptionService, LdapEncryptionService } from '@infra/encryption'; +import { FileSystemAdapter } from '@infra/file-system'; import { LegacyLogger } from '@src/core/logger'; import { orderBy } from 'lodash'; import { BsonConverter } from '../converter/bson.converter'; diff --git a/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor.module.ts b/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor.module.ts index 817d7257330..a85e71c526f 100644 --- a/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor.module.ts +++ b/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor.module.ts @@ -1,7 +1,7 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; -import { ConsoleWriterModule } from '@shared/infra/console'; +import { ConsoleWriterModule } from '@infra/console'; import { createConfigModuleOptions } from '@src/config'; import { LoggerModule } from '@src/core/logger'; import { AuthenticationModule } from '../authentication/authentication.module'; diff --git a/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.spec.ts b/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.spec.ts index 83a3e3ac47b..bc993271066 100644 --- a/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.spec.ts +++ b/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.spec.ts @@ -20,7 +20,7 @@ import { ProviderConsentSessionResponse, ProviderLoginResponse, ProviderRedirectResponse, -} from '@shared/infra/oauth-provider/dto'; +} from '@infra/oauth-provider/dto'; import { OauthProviderConsentFlowUc } from '@modules/oauth-provider/uc/oauth-provider.consent-flow.uc'; import { ICurrentUser } from '@modules/authentication'; import { OauthProviderUc } from '@modules/oauth-provider/uc/oauth-provider.uc'; diff --git a/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.ts b/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.ts index 054cca37ffa..97b16e8e49f 100644 --- a/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.ts +++ b/apps/server/src/modules/oauth-provider/controller/oauth-provider.controller.ts @@ -1,14 +1,14 @@ import { Configuration } from '@hpi-schul-cloud/commons'; import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query } from '@nestjs/common'; import { ICurrentUser, Authenticate, CurrentUser } from '@modules/authentication'; -// import should be @shared/infra/oauth-provider +// import should be @infra/oauth-provider import { ProviderConsentResponse, ProviderLoginResponse, ProviderOauthClient, ProviderRedirectResponse, ProviderConsentSessionResponse, -} from '@shared/infra/oauth-provider/dto'; +} from '@infra/oauth-provider/dto'; import { ApiTags } from '@nestjs/swagger'; import { OauthProviderLogoutFlowUc } from '../uc/oauth-provider.logout-flow.uc'; import { OauthProviderLoginFlowUc } from '../uc/oauth-provider.login-flow.uc'; diff --git a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.spec.ts b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.spec.ts index 14db6718476..d34571dcbb7 100644 --- a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.spec.ts +++ b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.spec.ts @@ -1,4 +1,4 @@ -import { AcceptLoginRequestBody } from '@shared/infra/oauth-provider/dto'; +import { AcceptLoginRequestBody } from '@infra/oauth-provider/dto'; import { LoginRequestBody } from '../controller/dto'; import { OauthProviderRequestMapper } from './oauth-provider-request.mapper'; diff --git a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.ts b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.ts index e0d4c4aaef4..aa8aa988408 100644 --- a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.ts +++ b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-request.mapper.ts @@ -1,4 +1,4 @@ -import { AcceptLoginRequestBody } from '@shared/infra/oauth-provider/dto'; +import { AcceptLoginRequestBody } from '@infra/oauth-provider/dto'; import { LoginRequestBody } from '@modules/oauth-provider/controller/dto'; export class OauthProviderRequestMapper { diff --git a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.spec.ts b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.spec.ts index 13119635f75..f28ab378771 100644 --- a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.spec.ts +++ b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.spec.ts @@ -5,7 +5,7 @@ import { ProviderLoginResponse, ProviderOauthClient, ProviderRedirectResponse, -} from '@shared/infra/oauth-provider/dto'; +} from '@infra/oauth-provider/dto'; import { ConsentResponse, ConsentSessionResponse, diff --git a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.ts b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.ts index 01038c23526..c97b86366b0 100644 --- a/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.ts +++ b/apps/server/src/modules/oauth-provider/mapper/oauth-provider-response.mapper.ts @@ -5,7 +5,7 @@ import { ProviderLoginResponse, ProviderOauthClient, ProviderRedirectResponse, -} from '@shared/infra/oauth-provider/dto'; +} from '@infra/oauth-provider/dto'; import { ConsentResponse, ConsentSessionResponse, diff --git a/apps/server/src/modules/oauth-provider/oauth-provider-api.module.ts b/apps/server/src/modules/oauth-provider/oauth-provider-api.module.ts index ccbd1566cda..bf131e22eee 100644 --- a/apps/server/src/modules/oauth-provider/oauth-provider-api.module.ts +++ b/apps/server/src/modules/oauth-provider/oauth-provider-api.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { OauthProviderServiceModule } from '@shared/infra/oauth-provider'; +import { OauthProviderServiceModule } from '@infra/oauth-provider'; import { LoggerModule } from '@src/core/logger'; import { AuthorizationModule } from '@modules/authorization'; import { PseudonymModule } from '@modules/pseudonym'; diff --git a/apps/server/src/modules/oauth-provider/oauth-provider.module.ts b/apps/server/src/modules/oauth-provider/oauth-provider.module.ts index 4289644d29e..7483ad140e5 100644 --- a/apps/server/src/modules/oauth-provider/oauth-provider.module.ts +++ b/apps/server/src/modules/oauth-provider/oauth-provider.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { OauthProviderServiceModule } from '@shared/infra/oauth-provider'; +import { OauthProviderServiceModule } from '@infra/oauth-provider'; import { TeamsRepo } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; import { LtiToolModule } from '@modules/lti-tool'; diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.spec.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.spec.ts index 6ce203ab5b7..d2eb1636e53 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.spec.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { UnauthorizedException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission, User } from '@shared/domain'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; -import { ProviderOauthClient } from '@shared/infra/oauth-provider/dto'; +import { OauthProviderService } from '@infra/oauth-provider'; +import { ProviderOauthClient } from '@infra/oauth-provider/dto'; import { setupEntities, userFactory } from '@shared/testing'; import { AuthorizationService } from '@modules/authorization'; import { ICurrentUser } from '@modules/authentication'; diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.ts index 3595f00679b..18fd23ae788 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.client-crud.uc.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { OauthProviderService } from '@shared/infra/oauth-provider/index'; +import { OauthProviderService } from '@infra/oauth-provider/index'; import { Permission, User } from '@shared/domain/index'; import { AuthorizationService } from '@modules/authorization'; -import { ProviderOauthClient } from '@shared/infra/oauth-provider/dto'; +import { ProviderOauthClient } from '@infra/oauth-provider/dto'; import { ICurrentUser } from '@modules/authentication'; @Injectable() diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.spec.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.spec.ts index b397b048dd4..e56700477a8 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.spec.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.spec.ts @@ -1,12 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { OauthProviderService } from '@shared/infra/oauth-provider/index'; +import { OauthProviderService } from '@infra/oauth-provider'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AcceptQuery, ConsentRequestBody } from '@modules/oauth-provider/controller/dto'; -import { - AcceptConsentRequestBody, - ProviderConsentResponse, - ProviderRedirectResponse, -} from '@shared/infra/oauth-provider/dto'; +import { AcceptConsentRequestBody, ProviderConsentResponse, ProviderRedirectResponse } from '@infra/oauth-provider/dto'; import { OauthProviderConsentFlowUc } from '@modules/oauth-provider/uc/oauth-provider.consent-flow.uc'; import { ICurrentUser } from '@modules/authentication'; import { ForbiddenException } from '@nestjs/common'; diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.ts index eb91d8132fe..126f68f1b80 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.consent-flow.uc.ts @@ -3,12 +3,12 @@ import { ProviderConsentResponse, ProviderRedirectResponse, RejectRequestBody, -} from '@shared/infra/oauth-provider/dto'; +} from '@infra/oauth-provider/dto'; import { AcceptQuery, ConsentRequestBody } from '@modules/oauth-provider/controller/dto'; import { ICurrentUser } from '@modules/authentication'; import { ForbiddenException, Injectable } from '@nestjs/common'; import { IdTokenService } from '@modules/oauth-provider/service/id-token.service'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; +import { OauthProviderService } from '@infra/oauth-provider'; import { IdToken } from '@modules/oauth-provider/interface/id-token'; @Injectable() diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.spec.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.spec.ts index a9225031d04..1c160b021d7 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.spec.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.spec.ts @@ -2,8 +2,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { InternalServerErrorException, UnprocessableEntityException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { LtiToolDO, Permission, Pseudonym, UserDO } from '@shared/domain'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; -import { ProviderLoginResponse, ProviderRedirectResponse } from '@shared/infra/oauth-provider/dto'; +import { OauthProviderService } from '@infra/oauth-provider'; +import { ProviderLoginResponse, ProviderRedirectResponse } from '@infra/oauth-provider/dto'; import { externalToolFactory, ltiToolDOFactory, diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.ts index dade1cb3f07..cfe208c477c 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.login-flow.uc.ts @@ -1,12 +1,8 @@ import { Injectable, InternalServerErrorException, UnprocessableEntityException } from '@nestjs/common'; import { Permission, Pseudonym, User, UserDO } from '@shared/domain'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; -import { - AcceptLoginRequestBody, - ProviderLoginResponse, - ProviderRedirectResponse, -} from '@shared/infra/oauth-provider/dto'; +import { OauthProviderService } from '@infra/oauth-provider'; +import { AcceptLoginRequestBody, ProviderLoginResponse, ProviderRedirectResponse } from '@infra/oauth-provider/dto'; import { AuthorizationService } from '@modules/authorization'; import { AcceptQuery, LoginRequestBody, OAuthRejectableBody } from '@modules/oauth-provider/controller/dto'; import { OauthProviderRequestMapper } from '@modules/oauth-provider/mapper/oauth-provider-request.mapper'; diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.spec.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.spec.ts index 778112840b2..62171565cda 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.spec.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.spec.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing'; import { OauthProviderLogoutFlowUc } from '@modules/oauth-provider/uc/oauth-provider.logout-flow.uc'; -import { OauthProviderService } from '@shared/infra/oauth-provider/index'; +import { OauthProviderService } from '@infra/oauth-provider/index'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; describe('OauthProviderUc', () => { diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.ts index 68f1eb95bf9..30f45ba4188 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.logout-flow.uc.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; -import { ProviderRedirectResponse } from '@shared/infra/oauth-provider/dto'; +import { OauthProviderService } from '@infra/oauth-provider'; +import { ProviderRedirectResponse } from '@infra/oauth-provider/dto'; @Injectable() export class OauthProviderLogoutFlowUc { diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.spec.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.spec.ts index f1205db3d28..2faf242f0e5 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.spec.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.spec.ts @@ -1,8 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing'; import { OauthProviderUc } from '@modules/oauth-provider/uc/oauth-provider.uc'; -import { OauthProviderService } from '@shared/infra/oauth-provider/index'; +import { OauthProviderService } from '@infra/oauth-provider/index'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; -import { ProviderConsentSessionResponse } from '@shared/infra/oauth-provider/dto'; +import { ProviderConsentSessionResponse } from '@infra/oauth-provider/dto'; describe('OauthProviderUc', () => { let module: TestingModule; diff --git a/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.ts b/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.ts index 74bf0543d90..39ad1effd7f 100644 --- a/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.ts +++ b/apps/server/src/modules/oauth-provider/uc/oauth-provider.uc.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; +import { OauthProviderService } from '@infra/oauth-provider'; import { EntityId } from '@shared/domain'; -import { ProviderConsentSessionResponse } from '@shared/infra/oauth-provider/dto/'; +import { ProviderConsentSessionResponse } from '@infra/oauth-provider/dto/'; @Injectable() export class OauthProviderUc { diff --git a/apps/server/src/modules/oauth/controller/api-test/oauth-sso.api.spec.ts b/apps/server/src/modules/oauth/controller/api-test/oauth-sso.api.spec.ts index eaaf07f4500..a259c405cfb 100644 --- a/apps/server/src/modules/oauth/controller/api-test/oauth-sso.api.spec.ts +++ b/apps/server/src/modules/oauth/controller/api-test/oauth-sso.api.spec.ts @@ -5,7 +5,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { Account, EntityId, SchoolEntity, SystemEntity, User } from '@shared/domain'; import { UserLoginMigrationEntity } from '@shared/domain/entity/user-login-migration.entity'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { KeycloakAdministrationService } from '@shared/infra/identity-management/keycloak-administration/service/keycloak-administration.service'; +import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service'; import { accountFactory, cleanupCollections, diff --git a/apps/server/src/modules/oauth/oauth.module.ts b/apps/server/src/modules/oauth/oauth.module.ts index 273a099159b..ae0f0eda48d 100644 --- a/apps/server/src/modules/oauth/oauth.module.ts +++ b/apps/server/src/modules/oauth/oauth.module.ts @@ -1,7 +1,7 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; -import { CacheWrapperModule } from '@shared/infra/cache'; -import { EncryptionModule } from '@shared/infra/encryption'; +import { CacheWrapperModule } from '@infra/cache'; +import { EncryptionModule } from '@infra/encryption'; import { LtiToolRepo } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; import { AuthorizationModule } from '@modules/authorization'; diff --git a/apps/server/src/modules/oauth/service/hydra.service.spec.ts b/apps/server/src/modules/oauth/service/hydra.service.spec.ts index 3886aa40a58..2dc2a22a6ce 100644 --- a/apps/server/src/modules/oauth/service/hydra.service.spec.ts +++ b/apps/server/src/modules/oauth/service/hydra.service.spec.ts @@ -6,7 +6,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { LtiPrivacyPermission, LtiRoleType, OauthConfig } from '@shared/domain'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; -import { DefaultEncryptionService, SymetricKeyEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, SymetricKeyEncryptionService } from '@infra/encryption'; import { LtiToolRepo } from '@shared/repo'; import { axiosResponseFactory } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; diff --git a/apps/server/src/modules/oauth/service/hydra.service.ts b/apps/server/src/modules/oauth/service/hydra.service.ts index 9b335604825..360926d080a 100644 --- a/apps/server/src/modules/oauth/service/hydra.service.ts +++ b/apps/server/src/modules/oauth/service/hydra.service.ts @@ -4,7 +4,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Injectable } from '@nestjs/common/decorators/core/injectable.decorator'; import { OauthConfig } from '@shared/domain'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; -import { DefaultEncryptionService, IEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, IEncryptionService } from '@infra/encryption'; import { LtiToolRepo } from '@shared/repo'; import { LegacyLogger } from '@src/core/logger'; import { AuthorizationParams } from '@modules/oauth/controller/dto/authorization.params'; diff --git a/apps/server/src/modules/oauth/service/oauth.service.spec.ts b/apps/server/src/modules/oauth/service/oauth.service.spec.ts index 2743037e214..9c4b45582df 100644 --- a/apps/server/src/modules/oauth/service/oauth.service.spec.ts +++ b/apps/server/src/modules/oauth/service/oauth.service.spec.ts @@ -4,7 +4,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, OauthConfig, SchoolFeatures, SystemEntity } from '@shared/domain'; import { UserDO } from '@shared/domain/domainobject/user.do'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { DefaultEncryptionService, IEncryptionService, SymetricKeyEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, IEncryptionService, SymetricKeyEncryptionService } from '@infra/encryption'; import { legacySchoolDoFactory, setupEntities, systemFactory, userDoFactory } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { ProvisioningDto, ProvisioningService } from '@modules/provisioning'; diff --git a/apps/server/src/modules/oauth/service/oauth.service.ts b/apps/server/src/modules/oauth/service/oauth.service.ts index 28a24c0534a..190c962cd97 100644 --- a/apps/server/src/modules/oauth/service/oauth.service.ts +++ b/apps/server/src/modules/oauth/service/oauth.service.ts @@ -2,7 +2,7 @@ import { Configuration } from '@hpi-schul-cloud/commons'; import { Inject } from '@nestjs/common'; import { Injectable } from '@nestjs/common/decorators/core/injectable.decorator'; import { EntityId, LegacySchoolDo, OauthConfig, SchoolFeatures, UserDO } from '@shared/domain'; -import { DefaultEncryptionService, IEncryptionService } from '@shared/infra/encryption'; +import { DefaultEncryptionService, IEncryptionService } from '@infra/encryption'; import { LegacyLogger } from '@src/core/logger'; import { ProvisioningService } from '@modules/provisioning'; import { OauthDataDto } from '@modules/provisioning/dto'; diff --git a/apps/server/src/modules/pseudonym/repo/external-tool-pseudonym.repo.integration.spec.ts b/apps/server/src/modules/pseudonym/repo/external-tool-pseudonym.repo.integration.spec.ts index 9d3711aff02..324e444afcb 100644 --- a/apps/server/src/modules/pseudonym/repo/external-tool-pseudonym.repo.integration.spec.ts +++ b/apps/server/src/modules/pseudonym/repo/external-tool-pseudonym.repo.integration.spec.ts @@ -3,7 +3,7 @@ import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Page, Pseudonym } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, externalToolPseudonymEntityFactory, pseudonymFactory, userFactory } from '@shared/testing'; import { pseudonymEntityFactory } from '@shared/testing/factory/pseudonym.factory'; import { LegacyLogger } from '@src/core/logger'; diff --git a/apps/server/src/modules/pseudonym/repo/pseudonyms.repo.spec.ts b/apps/server/src/modules/pseudonym/repo/pseudonyms.repo.spec.ts index 548ba1b0512..8246479da4a 100644 --- a/apps/server/src/modules/pseudonym/repo/pseudonyms.repo.spec.ts +++ b/apps/server/src/modules/pseudonym/repo/pseudonyms.repo.spec.ts @@ -3,7 +3,7 @@ import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Pseudonym } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, pseudonymFactory, userFactory } from '@shared/testing'; import { pseudonymEntityFactory } from '@shared/testing/factory/pseudonym.factory'; import { LegacyLogger } from '@src/core/logger'; diff --git a/apps/server/src/modules/server/server.config.ts b/apps/server/src/modules/server/server.config.ts index 09dd2210928..becc7ec78fc 100644 --- a/apps/server/src/modules/server/server.config.ts +++ b/apps/server/src/modules/server/server.config.ts @@ -1,5 +1,5 @@ import { Configuration } from '@hpi-schul-cloud/commons'; -import type { IIdentityManagementConfig } from '@shared/infra/identity-management'; +import type { IIdentityManagementConfig } from '@infra/identity-management'; import type { ICoreModuleConfig } from '@src/core'; import type { IAccountConfig } from '@modules/account'; import type { IFilesStorageClientConfig } from '@modules/files-storage-client'; diff --git a/apps/server/src/modules/server/server.module.ts b/apps/server/src/modules/server/server.module.ts index 9454fa06154..a812ff773b2 100644 --- a/apps/server/src/modules/server/server.module.ts +++ b/apps/server/src/modules/server/server.module.ts @@ -28,10 +28,10 @@ import { VideoConferenceApiModule } from '@modules/video-conference/video-confer import { DynamicModule, Inject, MiddlewareConsumer, Module, NestModule, NotFoundException } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { ALL_ENTITIES } from '@shared/domain'; -import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@shared/infra/database'; -import { MailModule } from '@shared/infra/mail'; -import { RabbitMQWrapperModule, RabbitMQWrapperTestModule } from '@shared/infra/rabbitmq'; -import { RedisModule, REDIS_CLIENT } from '@shared/infra/redis'; +import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@infra/database'; +import { MailModule } from '@infra/mail'; +import { RabbitMQWrapperModule, RabbitMQWrapperTestModule } from '@infra/rabbitmq'; +import { RedisModule, REDIS_CLIENT } from '@infra/redis'; import { createConfigModuleOptions, DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/config'; import { CoreModule } from '@src/core'; import { LegacyLogger, LoggerModule } from '@src/core/logger'; diff --git a/apps/server/src/modules/sharing/repo/share-token.repo.integration.spec.ts b/apps/server/src/modules/sharing/repo/share-token.repo.integration.spec.ts index 4bd73e6c2a8..f5e01b0e9ea 100644 --- a/apps/server/src/modules/sharing/repo/share-token.repo.integration.spec.ts +++ b/apps/server/src/modules/sharing/repo/share-token.repo.integration.spec.ts @@ -1,7 +1,7 @@ import { createMock } from '@golevelup/ts-jest'; import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, schoolFactory, shareTokenFactory } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { ShareTokenContextType } from '../domainobject/share-token.do'; diff --git a/apps/server/src/modules/system/service/system.service.spec.ts b/apps/server/src/modules/system/service/system.service.spec.ts index ead44bf6133..89ef533058b 100644 --- a/apps/server/src/modules/system/service/system.service.spec.ts +++ b/apps/server/src/modules/system/service/system.service.spec.ts @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityNotFoundError } from '@shared/common'; import { OauthConfig, SystemEntity, SystemTypeEnum } from '@shared/domain'; -import { IdentityManagementOauthService } from '@shared/infra/identity-management'; +import { IdentityManagementOauthService } from '@infra/identity-management'; import { SystemRepo } from '@shared/repo'; import { systemFactory } from '@shared/testing'; import { SystemMapper } from '../mapper/system.mapper'; diff --git a/apps/server/src/modules/system/service/system.service.ts b/apps/server/src/modules/system/service/system.service.ts index 960c15f7945..bfb6a2ec7bf 100644 --- a/apps/server/src/modules/system/service/system.service.ts +++ b/apps/server/src/modules/system/service/system.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { EntityNotFoundError } from '@shared/common'; import { EntityId, SystemEntity, SystemTypeEnum } from '@shared/domain'; -import { IdentityManagementOauthService } from '@shared/infra/identity-management/identity-management-oauth.service'; +import { IdentityManagementOauthService } from '@infra/identity-management/identity-management-oauth.service'; import { SystemRepo } from '@shared/repo'; import { SystemMapper } from '@modules/system/mapper/system.mapper'; import { SystemDto } from '@modules/system/service/dto/system.dto'; diff --git a/apps/server/src/modules/system/system.module.ts b/apps/server/src/modules/system/system.module.ts index 64caef0df61..37ca8d7a858 100644 --- a/apps/server/src/modules/system/system.module.ts +++ b/apps/server/src/modules/system/system.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { IdentityManagementModule } from '@shared/infra/identity-management/identity-management.module'; +import { IdentityManagementModule } from '@infra/identity-management/identity-management.module'; import { SystemRepo } from '@shared/repo'; import { SystemService } from '@modules/system/service/system.service'; import { SystemOidcService } from './service/system-oidc.service'; diff --git a/apps/server/src/modules/task/service/submission.service.spec.ts b/apps/server/src/modules/task/service/submission.service.spec.ts index 4d7373570cf..abf5ed9f152 100644 --- a/apps/server/src/modules/task/service/submission.service.spec.ts +++ b/apps/server/src/modules/task/service/submission.service.spec.ts @@ -1,7 +1,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; import { Counted, Submission } from '@shared/domain'; -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { SubmissionRepo } from '@shared/repo'; import { setupEntities, submissionFactory, taskFactory } from '@shared/testing'; import { FileDto, FilesStorageClientAdapterService } from '@modules/files-storage-client'; diff --git a/apps/server/src/modules/tool/external-tool/external-tool.module.ts b/apps/server/src/modules/tool/external-tool/external-tool.module.ts index 7db5c25a252..2fbd2f28edd 100644 --- a/apps/server/src/modules/tool/external-tool/external-tool.module.ts +++ b/apps/server/src/modules/tool/external-tool/external-tool.module.ts @@ -1,8 +1,8 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { LoggerModule } from '@src/core/logger'; -import { OauthProviderServiceModule } from '@shared/infra/oauth-provider'; -import { EncryptionModule } from '@shared/infra/encryption'; +import { OauthProviderServiceModule } from '@infra/oauth-provider'; +import { EncryptionModule } from '@infra/encryption'; import { ExternalToolRepo } from '@shared/repo'; import { ToolConfigModule } from '../tool-config.module'; import { diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.spec.ts b/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.spec.ts index 53a07c02e30..fb506a22f8c 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.spec.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.spec.ts @@ -1,5 +1,5 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { ProviderOauthClient } from '@shared/infra/oauth-provider/dto'; +import { ProviderOauthClient } from '@infra/oauth-provider/dto'; import { ExternalToolServiceMapper } from './external-tool-service.mapper'; import { TokenEndpointAuthMethod, ToolConfigType } from '../../common/enum'; import { Oauth2ToolConfig } from '../domain'; diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.ts b/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.ts index 31ff93db828..c531f33c483 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool-service.mapper.ts @@ -1,4 +1,4 @@ -import { ProviderOauthClient } from '@shared/infra/oauth-provider/dto'; +import { ProviderOauthClient } from '@infra/oauth-provider/dto'; import { Injectable } from '@nestjs/common'; import { Oauth2ToolConfig } from '../domain'; diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool.service.spec.ts b/apps/server/src/modules/tool/external-tool/service/external-tool.service.spec.ts index 4db2a5be0b0..ddb88ca4ff3 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool.service.spec.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool.service.spec.ts @@ -2,9 +2,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { UnprocessableEntityException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { IFindOptions, Page, SortOrder } from '@shared/domain'; -import { DefaultEncryptionService, IEncryptionService } from '@shared/infra/encryption'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; -import { ProviderOauthClient } from '@shared/infra/oauth-provider/dto'; +import { DefaultEncryptionService, IEncryptionService } from '@infra/encryption'; +import { OauthProviderService } from '@infra/oauth-provider'; +import { ProviderOauthClient } from '@infra/oauth-provider/dto'; import { ContextExternalToolRepo, ExternalToolRepo, SchoolExternalToolRepo } from '@shared/repo'; import { externalToolFactory, diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts b/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts index fcc1a7e2d5c..0aa6181682c 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts @@ -1,8 +1,8 @@ import { Inject, Injectable, UnprocessableEntityException } from '@nestjs/common'; import { EntityId, IFindOptions, Page } from '@shared/domain'; -import { DefaultEncryptionService, IEncryptionService } from '@shared/infra/encryption'; -import { OauthProviderService } from '@shared/infra/oauth-provider'; -import { ProviderOauthClient } from '@shared/infra/oauth-provider/dto'; +import { DefaultEncryptionService, IEncryptionService } from '@infra/encryption'; +import { OauthProviderService } from '@infra/oauth-provider'; +import { ProviderOauthClient } from '@infra/oauth-provider/dto'; import { ContextExternalToolRepo, ExternalToolRepo, SchoolExternalToolRepo } from '@shared/repo'; import { LegacyLogger } from '@src/core/logger'; import { TokenEndpointAuthMethod } from '../../common/enum'; diff --git a/apps/server/src/modules/user-import/uc/user-import.uc.spec.ts b/apps/server/src/modules/user-import/uc/user-import.uc.spec.ts index 3c3baa56475..ff4aa4c266c 100644 --- a/apps/server/src/modules/user-import/uc/user-import.uc.spec.ts +++ b/apps/server/src/modules/user-import/uc/user-import.uc.spec.ts @@ -16,7 +16,7 @@ import { SystemEntity, User, } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ImportUserRepo, SystemRepo, UserRepo } from '@shared/repo'; import { federalStateFactory, importUserFactory, schoolFactory, userFactory } from '@shared/testing'; import { systemFactory } from '@shared/testing/factory/system.factory'; diff --git a/apps/server/src/modules/video-conference/service/video-conference.service.spec.ts b/apps/server/src/modules/video-conference/service/video-conference.service.spec.ts index c7a1ed30668..28711a06c1a 100644 --- a/apps/server/src/modules/video-conference/service/video-conference.service.spec.ts +++ b/apps/server/src/modules/video-conference/service/video-conference.service.spec.ts @@ -12,7 +12,7 @@ import { VideoConferenceDO, VideoConferenceScope, } from '@shared/domain'; -import { CalendarEventDto, CalendarService } from '@shared/infra/calendar'; +import { CalendarEventDto, CalendarService } from '@infra/calendar'; import { TeamsRepo, VideoConferenceRepo } from '@shared/repo'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; import { LegacySchoolService } from '@modules/legacy-school'; diff --git a/apps/server/src/modules/video-conference/service/video-conference.service.ts b/apps/server/src/modules/video-conference/service/video-conference.service.ts index 22e7a7462f1..401cc0a0015 100644 --- a/apps/server/src/modules/video-conference/service/video-conference.service.ts +++ b/apps/server/src/modules/video-conference/service/video-conference.service.ts @@ -14,7 +14,7 @@ import { VideoConferenceOptionsDO, VideoConferenceScope, } from '@shared/domain'; -import { CalendarEventDto, CalendarService } from '@shared/infra/calendar'; +import { CalendarEventDto, CalendarService } from '@infra/calendar'; import { TeamsRepo, VideoConferenceRepo } from '@shared/repo'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; import { CourseService } from '@modules/learnroom'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.spec.ts b/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.spec.ts index 994c8042a6d..bf1fd3e1394 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.spec.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.spec.ts @@ -14,8 +14,8 @@ import { VideoConferenceDO, } from '@shared/domain'; import { VideoConferenceScope } from '@shared/domain/interface'; -import { CalendarService } from '@shared/infra/calendar'; -import { CalendarEventDto } from '@shared/infra/calendar/dto/calendar-event.dto'; +import { CalendarService } from '@infra/calendar'; +import { CalendarEventDto } from '@infra/calendar/dto/calendar-event.dto'; import { TeamsRepo, VideoConferenceRepo } from '@shared/repo'; import { roleFactory, setupEntities, userDoFactory } from '@shared/testing'; import { teamFactory } from '@shared/testing/factory/team.factory'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.ts b/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.ts index 41e011c4acd..95470053e6d 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-deprecated.uc.ts @@ -13,8 +13,8 @@ import { VideoConferenceOptionsDO, } from '@shared/domain'; import { VideoConferenceScope } from '@shared/domain/interface'; -import { CalendarService } from '@shared/infra/calendar'; -import { CalendarEventDto } from '@shared/infra/calendar/dto/calendar-event.dto'; +import { CalendarService } from '@infra/calendar'; +import { CalendarEventDto } from '@infra/calendar/dto/calendar-event.dto'; import { TeamsRepo } from '@shared/repo'; import { VideoConferenceRepo } from '@shared/repo/videoconference/video-conference.repo'; import { ICurrentUser } from '@modules/authentication'; diff --git a/apps/server/src/modules/video-conference/video-conference.module.ts b/apps/server/src/modules/video-conference/video-conference.module.ts index c9708b16dc9..d7e4671c0f2 100644 --- a/apps/server/src/modules/video-conference/video-conference.module.ts +++ b/apps/server/src/modules/video-conference/video-conference.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { HttpModule } from '@nestjs/axios'; -import { CalendarModule } from '@shared/infra/calendar'; +import { CalendarModule } from '@infra/calendar'; import { VideoConferenceRepo } from '@shared/repo/videoconference/video-conference.repo'; import { AuthorizationModule } from '@modules/authorization'; import { AuthorizationReferenceModule } from '@modules/authorization/authorization-reference.module'; diff --git a/apps/server/src/shared/domain/entity/all-entities.spec.ts b/apps/server/src/shared/domain/entity/all-entities.spec.ts index 33d924b20ce..b7a27fd58b4 100644 --- a/apps/server/src/shared/domain/entity/all-entities.spec.ts +++ b/apps/server/src/shared/domain/entity/all-entities.spec.ts @@ -1,7 +1,7 @@ import { MikroORM } from '@mikro-orm/core'; import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ALL_ENTITIES } from '.'; describe('BaseRepo', () => { diff --git a/apps/server/src/shared/infra/collaborative-storage/index.ts b/apps/server/src/shared/infra/collaborative-storage/index.ts deleted file mode 100644 index ea5aa25514c..00000000000 --- a/apps/server/src/shared/infra/collaborative-storage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './collaborative-storage.adapter'; diff --git a/apps/server/src/shared/repo/base.do.repo.integration.spec.ts b/apps/server/src/shared/repo/base.do.repo.integration.spec.ts index 563940a571e..1ca91bd184e 100644 --- a/apps/server/src/shared/repo/base.do.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/base.do.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Entity, EntityName, Property } from '@mikro-orm/core'; import { BaseDO, BaseEntityWithTimestamps } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { Injectable } from '@nestjs/common'; import { BaseDORepo } from '@shared/repo/base.do.repo'; import { LegacyLogger } from '@src/core/logger'; diff --git a/apps/server/src/shared/repo/base.repo.integration.spec.ts b/apps/server/src/shared/repo/base.repo.integration.spec.ts index 0c0e041f575..372a6ba4cda 100644 --- a/apps/server/src/shared/repo/base.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/base.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Entity, EntityName, Property } from '@mikro-orm/core'; import { BaseEntity } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { Injectable } from '@nestjs/common'; import { BaseRepo } from './base.repo'; diff --git a/apps/server/src/shared/repo/board/board.repo.spec.ts b/apps/server/src/shared/repo/board/board.repo.spec.ts index 51ce325e90a..7d5f4b71e41 100644 --- a/apps/server/src/shared/repo/board/board.repo.spec.ts +++ b/apps/server/src/shared/repo/board/board.repo.spec.ts @@ -10,7 +10,7 @@ import { cleanupCollections, } from '@shared/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { BoardRepo } from './board.repo'; diff --git a/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.integration.spec.ts b/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.integration.spec.ts index 0a9151d8c9c..854c3958135 100644 --- a/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ExternalToolRepoMapper } from '@shared/repo/externaltool/external-tool.repo.mapper'; import { cleanupCollections, diff --git a/apps/server/src/shared/repo/course/course.repo.integration.spec.ts b/apps/server/src/shared/repo/course/course.repo.integration.spec.ts index 5474c4ec19d..2a77ad1f078 100644 --- a/apps/server/src/shared/repo/course/course.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/course/course.repo.integration.spec.ts @@ -3,7 +3,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Course, EntityId, SortOrder } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, courseFactory, courseGroupFactory, userFactory } from '@shared/testing'; import { CourseRepo } from './course.repo'; diff --git a/apps/server/src/shared/repo/coursegroup/coursegroup.repo.integration.spec.ts b/apps/server/src/shared/repo/coursegroup/coursegroup.repo.integration.spec.ts index 459a2add113..805088480fd 100644 --- a/apps/server/src/shared/repo/coursegroup/coursegroup.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/coursegroup/coursegroup.repo.integration.spec.ts @@ -1,6 +1,6 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { EntityId, CourseGroup, Course } from '@shared/domain'; import { courseFactory, courseGroupFactory } from '@shared/testing'; import { CourseGroupRepo } from './coursegroup.repo'; diff --git a/apps/server/src/shared/repo/dashboard/dashboard.model.mapper.spec.ts b/apps/server/src/shared/repo/dashboard/dashboard.model.mapper.spec.ts index 4f242caecd8..32b35ced07e 100644 --- a/apps/server/src/shared/repo/dashboard/dashboard.model.mapper.spec.ts +++ b/apps/server/src/shared/repo/dashboard/dashboard.model.mapper.spec.ts @@ -1,6 +1,6 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { InternalServerErrorException } from '@nestjs/common'; import { DashboardEntity, diff --git a/apps/server/src/shared/repo/dashboard/dashboard.repo.integration.spec.ts b/apps/server/src/shared/repo/dashboard/dashboard.repo.integration.spec.ts index 1b3e2aefd63..3ca95112f4d 100644 --- a/apps/server/src/shared/repo/dashboard/dashboard.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/dashboard/dashboard.repo.integration.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { DashboardEntity, DashboardGridElementModel, GridElement } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { courseFactory, userFactory } from '@shared/testing'; import { DashboardModelMapper } from './dashboard.model.mapper'; import { DashboardRepo } from './dashboard.repo'; diff --git a/apps/server/src/shared/repo/externaltool/external-tool.repo.integration.spec.ts b/apps/server/src/shared/repo/externaltool/external-tool.repo.integration.spec.ts index 56cba80ec69..1654da1b5b7 100644 --- a/apps/server/src/shared/repo/externaltool/external-tool.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/externaltool/external-tool.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest'; import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { IFindOptions, Page, SortOrder } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ExternalToolRepo, ExternalToolRepoMapper } from '@shared/repo'; import { cleanupCollections, externalToolEntityFactory } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; diff --git a/apps/server/src/shared/repo/federalstate/federal-state.repo.spec.ts b/apps/server/src/shared/repo/federalstate/federal-state.repo.spec.ts index bfd6b6e358e..0b5742c7621 100644 --- a/apps/server/src/shared/repo/federalstate/federal-state.repo.spec.ts +++ b/apps/server/src/shared/repo/federalstate/federal-state.repo.spec.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { EntityManager } from '@mikro-orm/mongodb'; import { FederalStateEntity } from '@shared/domain'; import { cleanupCollections, federalStateFactory } from '@shared/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { FederalStateRepo } from './federal-state.repo'; describe('FederalStateRepo', () => { diff --git a/apps/server/src/shared/repo/importuser/importuser.repo.integration.spec.ts b/apps/server/src/shared/repo/importuser/importuser.repo.integration.spec.ts index 7f02bf4ea01..148984c393a 100644 --- a/apps/server/src/shared/repo/importuser/importuser.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/importuser/importuser.repo.integration.spec.ts @@ -12,7 +12,7 @@ import { SchoolEntity, User, } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ImportUserRepo } from '.'; describe('ImportUserRepo', () => { diff --git a/apps/server/src/shared/repo/lesson/lesson.repo.integration.spec.ts b/apps/server/src/shared/repo/lesson/lesson.repo.integration.spec.ts index 5143eb6fba8..eae071d55ae 100644 --- a/apps/server/src/shared/repo/lesson/lesson.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/lesson/lesson.repo.integration.spec.ts @@ -3,7 +3,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ComponentType, IComponentProperties, LessonEntity } from '@shared/domain'; import { cleanupCollections, courseFactory, lessonFactory, materialFactory, taskFactory } from '@shared/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { LessonRepo } from './lesson.repo'; diff --git a/apps/server/src/shared/repo/ltitool/ltitool.repo.spec.ts b/apps/server/src/shared/repo/ltitool/ltitool.repo.spec.ts index c8b8a7aea50..97fc81e9ea1 100644 --- a/apps/server/src/shared/repo/ltitool/ltitool.repo.spec.ts +++ b/apps/server/src/shared/repo/ltitool/ltitool.repo.spec.ts @@ -5,7 +5,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ILtiToolProperties, LtiTool } from '@shared/domain'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; import { LtiPrivacyPermission, LtiRoleType } from '@shared/domain/entity/ltitool.entity'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { LtiToolRepo } from '@shared/repo/ltitool/ltitool.repo'; import { cleanupCollections } from '@shared/testing'; import { ltiToolFactory } from '@shared/testing/factory/ltitool.factory'; diff --git a/apps/server/src/shared/repo/materials/materials.repo.integration.spec.ts b/apps/server/src/shared/repo/materials/materials.repo.integration.spec.ts index 13556fad62c..0b6b26ff39f 100644 --- a/apps/server/src/shared/repo/materials/materials.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/materials/materials.repo.integration.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Material } from '@shared/domain/entity/materials.entity'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections } from '@shared/testing'; import { MaterialsRepo } from './materials.repo'; diff --git a/apps/server/src/shared/repo/news/news-inheritance.spec.ts b/apps/server/src/shared/repo/news/news-inheritance.spec.ts index 53eb2aa4dd4..d9d5a003d5d 100644 --- a/apps/server/src/shared/repo/news/news-inheritance.spec.ts +++ b/apps/server/src/shared/repo/news/news-inheritance.spec.ts @@ -2,7 +2,7 @@ import { Collection, Entity, Enum, ManyToMany, ManyToOne, Property } from '@mikr import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { BaseEntityWithTimestamps } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections } from '@shared/testing'; @Entity({ tableName: 'users' }) diff --git a/apps/server/src/shared/repo/news/news.repo.integration.spec.ts b/apps/server/src/shared/repo/news/news.repo.integration.spec.ts index 93bff583f4e..d68e50e0df1 100644 --- a/apps/server/src/shared/repo/news/news.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/news/news.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { News, NewsTargetModel, SortOrder } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { courseNewsFactory, schoolNewsFactory, diff --git a/apps/server/src/shared/repo/role/role.repo.integration.spec.ts b/apps/server/src/shared/repo/role/role.repo.integration.spec.ts index 04834698419..65bc0931a6e 100644 --- a/apps/server/src/shared/repo/role/role.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/role/role.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { NotFoundError, NullCacheAdapter, ValidationError } from '@mikro-orm/cor import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Role, RoleName } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, roleFactory } from '@shared/testing'; import { RoleRepo } from './role.repo'; diff --git a/apps/server/src/shared/repo/school/legacy-school.repo.integration.spec.ts b/apps/server/src/shared/repo/school/legacy-school.repo.integration.spec.ts index e9f14ba3315..775c193675d 100644 --- a/apps/server/src/shared/repo/school/legacy-school.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/school/legacy-school.repo.integration.spec.ts @@ -13,7 +13,7 @@ import { SystemEntity, UserLoginMigrationEntity, } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { legacySchoolDoFactory, schoolFactory, diff --git a/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.integration.spec.ts b/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.integration.spec.ts index a2844e8e426..47196013b63 100644 --- a/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.integration.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { type SchoolEntity } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { ExternalToolRepoMapper } from '@shared/repo/externaltool/external-tool.repo.mapper'; import { cleanupCollections, diff --git a/apps/server/src/shared/repo/storageprovider/storageprovider.repo.spec.ts b/apps/server/src/shared/repo/storageprovider/storageprovider.repo.spec.ts index 707ff1b778d..1f24fe0bd0b 100644 --- a/apps/server/src/shared/repo/storageprovider/storageprovider.repo.spec.ts +++ b/apps/server/src/shared/repo/storageprovider/storageprovider.repo.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { StorageProviderEntity } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, storageProviderFactory } from '@shared/testing'; import { StorageProviderRepo } from './storageprovider.repo'; diff --git a/apps/server/src/shared/repo/submission/submission.repo.integration.spec.ts b/apps/server/src/shared/repo/submission/submission.repo.integration.spec.ts index 772c9d4ea1b..547fe2f05a1 100644 --- a/apps/server/src/shared/repo/submission/submission.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/submission/submission.repo.integration.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Submission } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, courseFactory, diff --git a/apps/server/src/shared/repo/system/system.repo.integration.spec.ts b/apps/server/src/shared/repo/system/system.repo.integration.spec.ts index 7c3c10a2fab..d8a5c1d87e3 100644 --- a/apps/server/src/shared/repo/system/system.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/system/system.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { SystemEntity, SystemTypeEnum } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { SystemRepo } from '@shared/repo'; import { systemFactory } from '@shared/testing/factory/system.factory'; diff --git a/apps/server/src/shared/repo/task/task.repo.integration.spec.ts b/apps/server/src/shared/repo/task/task.repo.integration.spec.ts index 52f20ab2cab..b975f485dea 100644 --- a/apps/server/src/shared/repo/task/task.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/task/task.repo.integration.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { SortOrder, Task } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, courseFactory, diff --git a/apps/server/src/shared/repo/teams/team.repo.integration.spec.ts b/apps/server/src/shared/repo/teams/team.repo.integration.spec.ts index 8d68ea8cf21..92e3d9d63c7 100644 --- a/apps/server/src/shared/repo/teams/team.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/teams/team.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId, TeamEntity, TeamUserEntity } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { TeamsRepo } from '@shared/repo'; import { cleanupCollections, roleFactory } from '@shared/testing'; import { teamFactory } from '@shared/testing/factory/team.factory'; diff --git a/apps/server/src/shared/repo/user/user-do.repo.integration.spec.ts b/apps/server/src/shared/repo/user/user-do.repo.integration.spec.ts index ddcfb55b520..43d46a95383 100644 --- a/apps/server/src/shared/repo/user/user-do.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/user/user-do.repo.integration.spec.ts @@ -16,7 +16,7 @@ import { } from '@shared/domain'; import { Page } from '@shared/domain/domainobject/page'; import { UserDO } from '@shared/domain/domainobject/user.do'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { UserDORepo } from '@shared/repo/user/user-do.repo'; import { cleanupCollections, diff --git a/apps/server/src/shared/repo/user/user.repo.integration.spec.ts b/apps/server/src/shared/repo/user/user.repo.integration.spec.ts index d469b59c14b..ea10e6e5b3e 100644 --- a/apps/server/src/shared/repo/user/user.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/user/user.repo.integration.spec.ts @@ -2,7 +2,7 @@ import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { MatchCreator, SortOrder, SystemEntity, User } from '@shared/domain'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, importUserFactory, roleFactory, schoolFactory, userFactory } from '@shared/testing'; import { systemFactory } from '@shared/testing/factory/system.factory'; import { UserRepo } from './user.repo'; diff --git a/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.integration.spec.ts b/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.integration.spec.ts index 230e715307a..266cd0381c1 100644 --- a/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.integration.spec.ts @@ -3,7 +3,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity, SystemEntity, UserLoginMigrationDO } from '@shared/domain'; import { UserLoginMigrationEntity } from '@shared/domain/entity/user-login-migration.entity'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections, schoolFactory, systemFactory } from '@shared/testing'; import { LegacyLogger } from '@src/core/logger'; import { userLoginMigrationFactory } from '../../testing/factory/user-login-migration.factory'; diff --git a/apps/server/src/shared/repo/videoconference/video-conference.repo.spec.ts b/apps/server/src/shared/repo/videoconference/video-conference.repo.spec.ts index 239b80fc3e9..06e4f057fa7 100644 --- a/apps/server/src/shared/repo/videoconference/video-conference.repo.spec.ts +++ b/apps/server/src/shared/repo/videoconference/video-conference.repo.spec.ts @@ -1,7 +1,7 @@ import { VideoConferenceRepo } from '@shared/repo'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { MongoMemoryDatabaseModule } from '@shared/infra/database'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { cleanupCollections } from '@shared/testing'; import { IVideoConferenceProperties, diff --git a/apps/server/src/shared/testing/factory/filerecord.factory.ts b/apps/server/src/shared/testing/factory/filerecord.factory.ts index 36811ed9752..4e12787f661 100644 --- a/apps/server/src/shared/testing/factory/filerecord.factory.ts +++ b/apps/server/src/shared/testing/factory/filerecord.factory.ts @@ -1,4 +1,4 @@ -import { FileRecordParentType } from '@shared/infra/rabbitmq'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { FileRecord, FileRecordSecurityCheck, IFileRecordProperties } from '@modules/files-storage/entity'; import { ObjectId } from 'bson'; import { DeepPartial } from 'fishery'; diff --git a/jest.config.ts b/jest.config.ts index 032f4828dde..9ee33256a5e 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -26,6 +26,7 @@ let config: Config.InitialOptions = { '^@shared/(.*)$': '/apps/server/src/shared/$1', '^@src/(.*)$': '/apps/server/src/$1', '^@modules/(.*)$': '/apps/server/src/modules/$1', + '^@infra/(.*)$': '/apps/server/src/infra/$1', }, maxWorkers: 2, // limited for not taking all workers within of a single github action }; diff --git a/tsconfig.json b/tsconfig.json index 9bb7c6f72f0..147df972b6f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,7 @@ "@shared/*": ["apps/server/src/shared/*"], "@src/*": ["apps/server/src/*"], "@modules/*": ["apps/server/src/modules/*"], + "@infra/*": ["apps/server/src/infra/*"], }, } }