diff --git a/.eslintrc.js b/.eslintrc.js index 4af6c734207..e51ca9340db 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -121,10 +121,6 @@ module.exports = { 'warn', { patterns: [ - { - group: ['@src/apps/**', '@src/core/**', '@src/modules/*/*', '@src/shared/**'], - message: 'Remove src/ from import path', - }, { group: ['@infra/*/*', '@modules/*/*', '!@modules/*/testing', '!*.module'], message: 'Do not deep import from a module', diff --git a/apps/server/doc/logging.md b/apps/server/doc/logging.md index bf0c543a224..262026d95f2 100644 --- a/apps/server/doc/logging.md +++ b/apps/server/doc/logging.md @@ -21,7 +21,7 @@ export class YourLoggable implements Loggable { ``` ```TypeScript -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; export class YourUc { constructor(private logger: Logger) { diff --git a/apps/server/doc/testing.md b/apps/server/doc/testing.md index eae32ccb0f3..757471b1b03 100644 --- a/apps/server/doc/testing.md +++ b/apps/server/doc/testing.md @@ -294,7 +294,7 @@ The basic structure of the repo integration test: 2. Get repo, orm and entityManager from testing module ```TypeScript - import { MongoMemoryDatabaseModule } from '@src/modules/database'; + import { MongoMemoryDatabaseModule } from '@modules/database'; let repo: NewsRepo; let em: EntityManager; diff --git a/apps/server/src/apps/admin-api-server.app.ts b/apps/server/src/apps/admin-api-server.app.ts index 06c29d86213..bcd69b68a56 100644 --- a/apps/server/src/apps/admin-api-server.app.ts +++ b/apps/server/src/apps/admin-api-server.app.ts @@ -1,9 +1,9 @@ /* istanbul ignore file */ +import { LegacyLogger, Logger } from '@core/logger'; import { Configuration } from '@hpi-schul-cloud/commons/lib'; +import { AdminApiServerModule } from '@modules/server/admin-api.server.app.module'; import { NestFactory } from '@nestjs/core'; import { ExpressAdapter } from '@nestjs/platform-express'; -import { LegacyLogger, Logger } from '@src/core/logger'; -import { AdminApiServerModule } from '@src/modules/server/admin-api.server.app.module'; import express from 'express'; import { install as sourceMapInstall } from 'source-map-support'; import { diff --git a/apps/server/src/apps/board-collaboration.app.ts b/apps/server/src/apps/board-collaboration.app.ts index 2712cfe4228..52756d7d293 100644 --- a/apps/server/src/apps/board-collaboration.app.ts +++ b/apps/server/src/apps/board-collaboration.app.ts @@ -6,11 +6,11 @@ import { NestFactory } from '@nestjs/core'; import { install as sourceMapInstall } from 'source-map-support'; // application imports +import { LegacyLogger, Logger } from '@core/logger'; import { RedisIoAdapter } from '@infra/socketio'; import { BoardCollaborationModule } from '@modules/board/board-collaboration.app.module'; import { ExpressAdapter } from '@nestjs/platform-express'; import { SwaggerDocumentOptions } from '@nestjs/swagger'; -import { LegacyLogger, Logger } from '@src/core/logger'; import express from 'express'; import { addPrometheusMetricsMiddlewaresIfEnabled, diff --git a/apps/server/src/apps/common-cartridge.app.ts b/apps/server/src/apps/common-cartridge.app.ts index 2488e613ce8..b400d8e1b15 100644 --- a/apps/server/src/apps/common-cartridge.app.ts +++ b/apps/server/src/apps/common-cartridge.app.ts @@ -1,9 +1,9 @@ /* istanbul ignore file */ /* eslint-disable no-console */ +import { LegacyLogger, Logger } from '@core/logger'; import { CommonCartridgeApiModule } from '@modules/common-cartridge/common-cartridge-api.app.module'; import { NestFactory } from '@nestjs/core'; import { ExpressAdapter } from '@nestjs/platform-express'; -import { LegacyLogger, Logger } from '@src/core/logger'; import express from 'express'; import { install as sourceMapInstall } from 'source-map-support'; import { diff --git a/apps/server/src/apps/files-storage.app.ts b/apps/server/src/apps/files-storage.app.ts index 2bfd2698051..642b0a03d1b 100644 --- a/apps/server/src/apps/files-storage.app.ts +++ b/apps/server/src/apps/files-storage.app.ts @@ -8,10 +8,10 @@ import express from 'express'; import { install as sourceMapInstall } from 'source-map-support'; // application imports +import { LegacyLogger } from '@core/logger'; import { FilesStorageApiModule } from '@modules/files-storage/files-storage-api.app.module'; import { API_VERSION_PATH } from '@modules/files-storage/files-storage.const'; import { SwaggerDocumentOptions } from '@nestjs/swagger'; -import { LegacyLogger } from '@src/core/logger'; import { enableOpenApiDocs } from './helpers'; import { createRequestLoggerMiddleware } from './helpers/request-logger-middleware'; diff --git a/apps/server/src/apps/fwu-learning-contents.app.ts b/apps/server/src/apps/fwu-learning-contents.app.ts index 11c56daa89c..f0ab985db7f 100644 --- a/apps/server/src/apps/fwu-learning-contents.app.ts +++ b/apps/server/src/apps/fwu-learning-contents.app.ts @@ -8,9 +8,10 @@ import express from 'express'; import { install as sourceMapInstall } from 'source-map-support'; // application imports +import { LegacyLogger } from '@core/logger'; import { FwuLearningContentsModule } from '@modules/fwu-learning-contents/fwu-learning-contents.app.module'; -import { LegacyLogger } from '@src/core/logger'; -import { createRequestLoggerMiddleware, enableOpenApiDocs } from './helpers'; +import { enableOpenApiDocs } from './helpers'; +import { createRequestLoggerMiddleware } from './helpers/request-logger-middleware'; async function bootstrap(): Promise { sourceMapInstall(); diff --git a/apps/server/src/apps/h5p-editor.app.ts b/apps/server/src/apps/h5p-editor.app.ts index bad0fec141c..187510e7c2d 100644 --- a/apps/server/src/apps/h5p-editor.app.ts +++ b/apps/server/src/apps/h5p-editor.app.ts @@ -8,9 +8,10 @@ import express from 'express'; import { install as sourceMapInstall } from 'source-map-support'; // application imports +import { LegacyLogger } from '@core/logger'; import { H5PEditorModule } from '@modules/h5p-editor/h5p-editor.app.module'; -import { LegacyLogger } from '@src/core/logger'; -import { createRequestLoggerMiddleware, enableOpenApiDocs } from './helpers'; +import { enableOpenApiDocs } from './helpers'; +import { createRequestLoggerMiddleware } from './helpers/request-logger-middleware'; async function bootstrap(): Promise { sourceMapInstall(); diff --git a/apps/server/src/apps/h5p-library-management.app.ts b/apps/server/src/apps/h5p-library-management.app.ts index dac94cd5a91..a43837697e2 100644 --- a/apps/server/src/apps/h5p-library-management.app.ts +++ b/apps/server/src/apps/h5p-library-management.app.ts @@ -1,9 +1,9 @@ /* istanbul ignore file */ /* eslint-disable no-console */ +import { LegacyLogger } from '@core/logger'; import { H5PLibraryManagementService } from '@modules/h5p-library-management'; import { H5PLibraryManagementModule } from '@modules/h5p-library-management/h5p-library-management.app.module'; import { NestFactory } from '@nestjs/core'; -import { LegacyLogger } from '@src/core/logger'; import { install as sourceMapInstall } from 'source-map-support'; async function bootstrap(): Promise { diff --git a/apps/server/src/apps/helpers/app-start-loggable.ts b/apps/server/src/apps/helpers/app-start-loggable.ts index ecea32701e7..7945812141f 100644 --- a/apps/server/src/apps/helpers/app-start-loggable.ts +++ b/apps/server/src/apps/helpers/app-start-loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage, LogMessageData } from '@src/core/logger'; +import { Loggable, LogMessage, LogMessageData } from '@core/logger'; interface AppStartInfo { appName: string; diff --git a/apps/server/src/apps/helpers/metrics/prometheus-metrics.spec.ts b/apps/server/src/apps/helpers/metrics/prometheus-metrics.spec.ts index 6635bba079f..de65e54c519 100644 --- a/apps/server/src/apps/helpers/metrics/prometheus-metrics.spec.ts +++ b/apps/server/src/apps/helpers/metrics/prometheus-metrics.spec.ts @@ -1,7 +1,7 @@ +import { Logger } from '@core/logger'; import { createMock } from '@golevelup/ts-jest'; import { Configuration } from '@hpi-schul-cloud/commons'; import { IConfig } from '@hpi-schul-cloud/commons/lib/interfaces/IConfig'; -import { Logger } from '@src/core/logger'; import express, { Express, NextFunction, Request, RequestHandler, Response } from 'express'; import { PrometheusMetricsConfig, diff --git a/apps/server/src/apps/helpers/metrics/prometheus-metrics.ts b/apps/server/src/apps/helpers/metrics/prometheus-metrics.ts index 4c82cf2536a..873b3243c02 100644 --- a/apps/server/src/apps/helpers/metrics/prometheus-metrics.ts +++ b/apps/server/src/apps/helpers/metrics/prometheus-metrics.ts @@ -1,6 +1,6 @@ import { Express } from 'express'; -import { LogMessage, Loggable, Logger } from '@src/core/logger'; +import { LogMessage, Loggable, Logger } from '@core/logger'; import { AppStartLoggable } from '../app-start-loggable'; import { PrometheusMetricsConfig, diff --git a/apps/server/src/apps/management.app.ts b/apps/server/src/apps/management.app.ts index a610cf8f52e..e92070bf208 100644 --- a/apps/server/src/apps/management.app.ts +++ b/apps/server/src/apps/management.app.ts @@ -4,9 +4,9 @@ import { NestFactory } from '@nestjs/core'; import { ExpressAdapter, NestExpressApplication } from '@nestjs/platform-express'; import express from 'express'; +import { LegacyLogger } from '@core/logger'; import { MikroORM } from '@mikro-orm/core'; import { ManagementServerModule } from '@modules/management/management-server.app.module'; -import { LegacyLogger } from '@src/core/logger'; import { install as sourceMapInstall } from 'source-map-support'; import { createRequestLoggerMiddleware, enableOpenApiDocs } from './helpers'; import legacyAppPromise = require('../../../../src/app'); diff --git a/apps/server/src/apps/server.app.ts b/apps/server/src/apps/server.app.ts index af7d65280e7..61aa39716a5 100644 --- a/apps/server/src/apps/server.app.ts +++ b/apps/server/src/apps/server.app.ts @@ -2,6 +2,7 @@ import { Mail, MailService } from '@infra/mail'; // application imports /* eslint-disable no-console */ +import { LegacyLogger, Logger } from '@core/logger'; import { MikroORM } from '@mikro-orm/core'; import { AccountService } from '@modules/account'; import { AccountUc } from '@modules/account/api/account.uc'; @@ -17,7 +18,6 @@ import { TeamService } from '@modules/teams/service/team.service'; import { ContextExternalToolService } from '@modules/tool/context-external-tool'; import { NestFactory } from '@nestjs/core'; import { ExpressAdapter } from '@nestjs/platform-express'; -import { LegacyLogger, Logger } from '@src/core/logger'; import express from 'express'; import { join } from 'path'; diff --git a/apps/server/src/config/mikro-orm-cli.config.ts b/apps/server/src/config/mikro-orm-cli.config.ts index 984f6f428ed..72a5b34502b 100644 --- a/apps/server/src/config/mikro-orm-cli.config.ts +++ b/apps/server/src/config/mikro-orm-cli.config.ts @@ -1,8 +1,8 @@ +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import type { MikroOrmModuleSyncOptions } from '@mikro-orm/nestjs/typings'; import { FileRecord } from '@modules/files-storage/entity'; import { FileEntity } from '@modules/files/entity'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import path from 'path'; const migrationsPath = path.resolve(__dirname, '..', 'migrations', 'mikro-orm'); diff --git a/apps/server/src/core/error/domain/domain-error-handler.spec.ts b/apps/server/src/core/error/domain/domain-error-handler.spec.ts index f67ee755384..11ac0cb2b9d 100644 --- a/apps/server/src/core/error/domain/domain-error-handler.spec.ts +++ b/apps/server/src/core/error/domain/domain-error-handler.spec.ts @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { BadRequestException, HttpStatus, InternalServerErrorException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { BusinessError } from '@shared/common'; -import { ErrorLogger, ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogger, ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import util from 'util'; import { AxiosError } from 'axios'; import { ErrorLoggable } from '../loggable/error.loggable'; diff --git a/apps/server/src/core/error/domain/domain-error-handler.ts b/apps/server/src/core/error/domain/domain-error-handler.ts index 778dd48026b..c0f1b4d9abb 100644 --- a/apps/server/src/core/error/domain/domain-error-handler.ts +++ b/apps/server/src/core/error/domain/domain-error-handler.ts @@ -1,7 +1,7 @@ +import { ErrorLogger, Loggable, LoggingUtils, LogMessageDataObject } from '@core/logger'; +import { ICurrentUser } from '@infra/auth-guard'; import { Injectable } from '@nestjs/common'; import { HttpArgumentsHost } from '@nestjs/common/interfaces'; -import { ErrorLogger, Loggable, LoggingUtils, LogMessageDataObject } from '@src/core/logger'; -import { ICurrentUser } from '@src/infra/auth-guard'; import { Request } from 'express'; import util from 'util'; import { ErrorLoggable } from '../loggable'; diff --git a/apps/server/src/core/error/filter/global-error.filter.spec.ts b/apps/server/src/core/error/filter/global-error.filter.spec.ts index 4e99f0ca396..c3e85c7e692 100644 --- a/apps/server/src/core/error/filter/global-error.filter.spec.ts +++ b/apps/server/src/core/error/filter/global-error.filter.spec.ts @@ -5,7 +5,7 @@ import { ArgumentsHost, BadRequestException, HttpStatus, InternalServerErrorExce import { Test, TestingModule } from '@nestjs/testing'; import { WsException } from '@nestjs/websockets'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { Response } from 'express'; import { AxiosError } from 'axios'; import { DomainErrorHandler } from '../domain'; diff --git a/apps/server/src/core/error/loggable/axios-error.loggable.ts b/apps/server/src/core/error/loggable/axios-error.loggable.ts index c7e2d2c0fd1..df5d03a9427 100644 --- a/apps/server/src/core/error/loggable/axios-error.loggable.ts +++ b/apps/server/src/core/error/loggable/axios-error.loggable.ts @@ -1,5 +1,5 @@ import { HttpException, HttpStatus } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { AxiosError } from 'axios'; export class AxiosErrorLoggable extends HttpException implements Loggable { diff --git a/apps/server/src/core/index.ts b/apps/server/src/core/index.ts index bceab23d256..a7f493efe12 100644 --- a/apps/server/src/core/index.ts +++ b/apps/server/src/core/index.ts @@ -1,3 +1,6 @@ -export { CoreModule } from './core.module'; -export { DomainErrorHandler } from './error'; -export { CoreModuleConfig } from './core.config'; +/** + + Import external dependencies directly, not from here. + Avoid loading all external references for testing. + Do not re-export here. + */ diff --git a/apps/server/src/infra/antivirus/antivirus.service.ts b/apps/server/src/infra/antivirus/antivirus.service.ts index 15fbcbf4c1e..601a8803bd1 100644 --- a/apps/server/src/infra/antivirus/antivirus.service.ts +++ b/apps/server/src/infra/antivirus/antivirus.service.ts @@ -1,6 +1,6 @@ import { AmqpConnection } from '@golevelup/nestjs-rabbitmq'; import { Inject, Injectable, InternalServerErrorException } from '@nestjs/common'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { API_VERSION_PATH, FilesStorageInternalActions } from '@modules/files-storage/files-storage.const'; import NodeClam from 'clamscan'; import { Readable } from 'stream'; diff --git a/apps/server/src/infra/auth-guard/adapter/jwt-validation.adapter.ts b/apps/server/src/infra/auth-guard/adapter/jwt-validation.adapter.ts index d31ddfa0eb7..acc0097b010 100644 --- a/apps/server/src/infra/auth-guard/adapter/jwt-validation.adapter.ts +++ b/apps/server/src/infra/auth-guard/adapter/jwt-validation.adapter.ts @@ -1,5 +1,5 @@ +import { ensureTokenIsWhitelisted } from '@imports-from-feathers'; import { Injectable } from '@nestjs/common'; -import { ensureTokenIsWhitelisted } from '@src/imports-from-feathers'; @Injectable() export class JwtValidationAdapter { diff --git a/apps/server/src/infra/authorization-client/error/authorization-error.loggable-exception.ts b/apps/server/src/infra/authorization-client/error/authorization-error.loggable-exception.ts index 2d35d90f7dc..d4a67ef6fdc 100644 --- a/apps/server/src/infra/authorization-client/error/authorization-error.loggable-exception.ts +++ b/apps/server/src/infra/authorization-client/error/authorization-error.loggable-exception.ts @@ -1,6 +1,6 @@ import { ForbiddenException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; import { AuthorizationBodyParams } from '../authorization-api-client'; export class AuthorizationErrorLoggableException extends ForbiddenException implements Loggable { diff --git a/apps/server/src/infra/authorization-client/error/authorization-forbidden.loggable-exception.ts b/apps/server/src/infra/authorization-client/error/authorization-forbidden.loggable-exception.ts index ffd44125976..becabc699ea 100644 --- a/apps/server/src/infra/authorization-client/error/authorization-forbidden.loggable-exception.ts +++ b/apps/server/src/infra/authorization-client/error/authorization-forbidden.loggable-exception.ts @@ -1,6 +1,6 @@ import { ForbiddenException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; import { AuthorizationBodyParams } from '../authorization-api-client'; export class AuthorizationForbiddenLoggableException extends ForbiddenException implements Loggable { diff --git a/apps/server/src/infra/cache/cache.module.ts b/apps/server/src/infra/cache/cache.module.ts index 88ac200c148..3cbe8d12406 100644 --- a/apps/server/src/infra/cache/cache.module.ts +++ b/apps/server/src/infra/cache/cache.module.ts @@ -1,7 +1,7 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { CacheModule, CacheModuleOptions } from '@nestjs/cache-manager'; import { Module } from '@nestjs/common'; -import { LegacyLogger, LoggerModule } from '@src/core/logger'; +import { LegacyLogger, LoggerModule } from '@core/logger'; import { redisStore } from 'cache-manager-redis-yet'; import { CacheStoreType } from './interface'; import { CacheService } from './service/cache.service'; diff --git a/apps/server/src/infra/calendar/calendar.config.ts b/apps/server/src/infra/calendar/calendar.config.ts index 5a66c0814ec..39a90ccef37 100644 --- a/apps/server/src/infra/calendar/calendar.config.ts +++ b/apps/server/src/infra/calendar/calendar.config.ts @@ -1,3 +1,3 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface CalendarConfig extends LoggerConfig {} diff --git a/apps/server/src/infra/calendar/calendar.module.ts b/apps/server/src/infra/calendar/calendar.module.ts index ac24f584c41..0426ed894c3 100644 --- a/apps/server/src/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 { CqrsModule } from '@nestjs/cqrs'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CalendarService } from './service/calendar.service'; import { CalendarMapper } from './mapper/calendar.mapper'; diff --git a/apps/server/src/infra/calendar/service/calendar.service.spec.ts b/apps/server/src/infra/calendar/service/calendar.service.spec.ts index 74780d5059d..3e277621178 100644 --- a/apps/server/src/infra/calendar/service/calendar.service.spec.ts +++ b/apps/server/src/infra/calendar/service/calendar.service.spec.ts @@ -11,7 +11,7 @@ import { HttpService } from '@nestjs/axios'; import { HttpStatus, InternalServerErrorException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { AxiosResponse } from 'axios'; import { of, throwError } from 'rxjs'; diff --git a/apps/server/src/infra/calendar/service/calendar.service.ts b/apps/server/src/infra/calendar/service/calendar.service.ts index df6bfdf73dc..75efb51894d 100644 --- a/apps/server/src/infra/calendar/service/calendar.service.ts +++ b/apps/server/src/infra/calendar/service/calendar.service.ts @@ -1,11 +1,11 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { HttpService } from '@nestjs/axios'; import { Injectable, InternalServerErrorException } from '@nestjs/common'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { firstValueFrom, Observable } from 'rxjs'; import { URL, URLSearchParams } from 'url'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { DataDeletionDomainOperationLoggable, DeletionService, diff --git a/apps/server/src/infra/collaborative-storage/collaborative-storage-adapter.module.ts b/apps/server/src/infra/collaborative-storage/collaborative-storage-adapter.module.ts index 3415d0dbdc3..2f6f712174a 100644 --- a/apps/server/src/infra/collaborative-storage/collaborative-storage-adapter.module.ts +++ b/apps/server/src/infra/collaborative-storage/collaborative-storage-adapter.module.ts @@ -5,7 +5,7 @@ import { UserModule } from '@modules/user'; import { HttpModule } from '@nestjs/axios'; import { Module, Provider } from '@nestjs/common'; import { LtiToolRepo } from '@shared/repo/ltitool/'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CollaborativeStorageAdapter } from './collaborative-storage.adapter'; import { CollaborativeStorageAdapterMapper } from './mapper'; import { NextcloudClient } from './strategy/nextcloud/nextcloud.client'; diff --git a/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.spec.ts b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.spec.ts index 7ab965a7676..e49d615a7ce 100644 --- a/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.spec.ts +++ b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.spec.ts @@ -3,7 +3,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { TeamDto } from '@modules/collaborative-storage/services/dto/team.dto'; // invalid import please fix import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain/interface'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { CollaborativeStorageAdapter } from './collaborative-storage.adapter'; import { CollaborativeStorageAdapterMapper } from './mapper/collaborative-storage-adapter.mapper'; import { CollaborativeStorageStrategy } from './strategy/base.interface.strategy'; diff --git a/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.ts b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.ts index 27cfdd1b201..9e7d77a9b97 100644 --- a/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.ts +++ b/apps/server/src/infra/collaborative-storage/collaborative-storage.adapter.ts @@ -2,7 +2,7 @@ import { TeamPermissionsDto } from '@modules/collaborative-storage/services/dto/ import { TeamDto } from '@modules/collaborative-storage/services/dto/team.dto'; import { RoleDto } from '@modules/role/service/dto/role.dto'; import { Inject, Injectable } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { CollaborativeStorageAdapterMapper } from './mapper/collaborative-storage-adapter.mapper'; import { CollaborativeStorageStrategy } from './strategy/base.interface.strategy'; diff --git a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts index b6bf832332a..7dd229e7d05 100644 --- a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts +++ b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.spec.ts @@ -3,7 +3,7 @@ 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 { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { AxiosResponse } from 'axios'; import { Observable, of } from 'rxjs'; diff --git a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts index ab4a139224c..c5b6786ebc6 100644 --- a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts +++ b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.client.ts @@ -16,8 +16,8 @@ import { OcsResponse, SuccessfulRes, } from '@infra/collaborative-storage/strategy/nextcloud/nextcloud.interface'; -import { ErrorUtils } from '@src/core/error/utils'; -import { LegacyLogger } from '@src/core/logger'; +import { ErrorUtils } from '@core/error/utils'; +import { LegacyLogger } from '@core/logger'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { parseInt } from 'lodash'; import { Observable, firstValueFrom } from 'rxjs'; diff --git a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts index 9b0ee9a5d95..c4a56e9d55c 100644 --- a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts +++ b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.spec.ts @@ -10,7 +10,7 @@ import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; import { LtiPrivacyPermission, LtiRoleType, User } from '@shared/domain/entity'; import { RoleName } from '@shared/domain/interface'; import { LtiToolRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { ltiToolDOFactory, pseudonymFactory } from '@testing/factory/domainobject'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { userFactory } from '@testing/factory/user.factory'; diff --git a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts index 7dd1b73873b..e3b46b71293 100644 --- a/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts +++ b/apps/server/src/infra/collaborative-storage/strategy/nextcloud/nextcloud.strategy.ts @@ -7,7 +7,7 @@ import { Injectable, UnprocessableEntityException } from '@nestjs/common'; import { Pseudonym, UserDO } from '@shared/domain/domainobject'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; import { LtiToolRepo } from '@shared/repo/ltitool/'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { TeamRolePermissionsDto } from '../../dto/team-role-permissions.dto'; import { CollaborativeStorageStrategy } from '../base.interface.strategy'; import { NextcloudClient } from './nextcloud.client'; diff --git a/apps/server/src/infra/encryption/encryption.module.ts b/apps/server/src/infra/encryption/encryption.module.ts index 0b1c990ef72..4f5d34e0b0f 100644 --- a/apps/server/src/infra/encryption/encryption.module.ts +++ b/apps/server/src/infra/encryption/encryption.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { LegacyLogger, LoggerModule } from '@src/core/logger'; +import { LegacyLogger, LoggerModule } from '@core/logger'; import { DefaultEncryptionService, LdapEncryptionService } from './encryption.interface'; import { SymmetricKeyEncryptionService } from './encryption.service'; diff --git a/apps/server/src/infra/encryption/encryption.service.spec.ts b/apps/server/src/infra/encryption/encryption.service.spec.ts index 3beb7033e33..66d4ed720b2 100644 --- a/apps/server/src/infra/encryption/encryption.service.spec.ts +++ b/apps/server/src/infra/encryption/encryption.service.spec.ts @@ -1,5 +1,5 @@ import { createMock } from '@golevelup/ts-jest'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { SymmetricKeyEncryptionService } from './encryption.service'; describe('SymetricKeyEncryptionService', () => { diff --git a/apps/server/src/infra/encryption/encryption.service.ts b/apps/server/src/infra/encryption/encryption.service.ts index 75619d9891a..55c99c58c38 100644 --- a/apps/server/src/infra/encryption/encryption.service.ts +++ b/apps/server/src/infra/encryption/encryption.service.ts @@ -1,7 +1,7 @@ import CryptoJs from 'crypto-js'; import { Injectable } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { EncryptionService } from './encryption.interface'; @Injectable() diff --git a/apps/server/src/infra/etherpad-client/loggable/etherpad-error-loggable-exception.ts b/apps/server/src/infra/etherpad-client/loggable/etherpad-error-loggable-exception.ts index 4ce8c6ba1da..4f5d022888b 100644 --- a/apps/server/src/infra/etherpad-client/loggable/etherpad-error-loggable-exception.ts +++ b/apps/server/src/infra/etherpad-client/loggable/etherpad-error-loggable-exception.ts @@ -1,5 +1,5 @@ import { HttpExceptionOptions, InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { EtherpadErrorType, EtherpadParams } from '../interface'; export class EtherpadErrorLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/infra/etherpad-client/loggable/etherpad-server-error-exception.spec.ts b/apps/server/src/infra/etherpad-client/loggable/etherpad-server-error-exception.spec.ts index b81c0398ed5..5fd70ccf9aa 100644 --- a/apps/server/src/infra/etherpad-client/loggable/etherpad-server-error-exception.spec.ts +++ b/apps/server/src/infra/etherpad-client/loggable/etherpad-server-error-exception.spec.ts @@ -1,4 +1,4 @@ -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { EtherpadErrorType } from '../interface'; import { EtherpadErrorLoggableException } from './etherpad-error-loggable-exception'; diff --git a/apps/server/src/infra/etherpad-client/mappers/etherpad-response.mapper.ts b/apps/server/src/infra/etherpad-client/mappers/etherpad-response.mapper.ts index 0857b3c502b..9ffda11a41b 100644 --- a/apps/server/src/infra/etherpad-client/mappers/etherpad-response.mapper.ts +++ b/apps/server/src/infra/etherpad-client/mappers/etherpad-response.mapper.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; import { TypeGuard } from '@shared/common'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { CreateAuthorUsingGET200ResponseData, CreateGroupUsingGET200ResponseData, diff --git a/apps/server/src/infra/identity-management/identity-management.module.ts b/apps/server/src/infra/identity-management/identity-management.module.ts index 9188e08bbe6..1a204c69430 100644 --- a/apps/server/src/infra/identity-management/identity-management.module.ts +++ b/apps/server/src/infra/identity-management/identity-management.module.ts @@ -1,6 +1,6 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { EncryptionModule } from '../encryption'; import { IdentityManagementOauthService } from './identity-management-oauth.service'; import { IdentityManagementService } from './identity-management.service'; diff --git a/apps/server/src/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 index 9b3120b8b8c..9f8a668b916 100644 --- a/apps/server/src/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,7 +1,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; import { ConsoleWriterService } from '@infra/console'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { KeycloakConfigurationUc } from '../uc/keycloak-configuration.uc'; import { KeycloakConsole } from './keycloak-configuration.console'; diff --git a/apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts b/apps/server/src/infra/identity-management/keycloak-configuration/console/keycloak-configuration.console.ts index 10daef11317..9f49a99c8a8 100644 --- a/apps/server/src/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,5 +1,5 @@ import { ConsoleWriterService } from '@infra/console'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { Command, CommandOption, Console } from 'nestjs-console'; import { KeycloakConfigurationUc } from '../uc/keycloak-configuration.uc'; diff --git a/apps/server/src/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 index 734e8f628b2..1d701022e9a 100644 --- a/apps/server/src/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 @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ServiceUnavailableException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { NodeEnvType } from '@modules/server/server.config'; import { KeycloakConfigurationUc } from '../uc/keycloak-configuration.uc'; import { KeycloakManagementController } from './keycloak-configuration.controller'; diff --git a/apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts b/apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts index 0ad7097dd83..1910ad495a9 100644 --- a/apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/controller/keycloak-configuration.controller.ts @@ -1,5 +1,5 @@ import { Controller, Post, ServiceUnavailableException } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { KeycloakConfigurationUc } from '../uc/keycloak-configuration.uc'; @Controller('management/idm') diff --git a/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts b/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts index 4e570b30dcf..b9bc6795f1d 100644 --- a/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/keycloak-configuration.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { EncryptionModule } from '@infra/encryption'; import { ConsoleWriterModule } from '@infra/console'; import { AccountModule } from '@modules/account'; diff --git a/apps/server/src/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 index f1f0b3ab11c..652ca981857 100644 --- a/apps/server/src/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 @@ -5,7 +5,7 @@ import AuthenticationFlowRepresentation from '@keycloak/keycloak-admin-client/li import { EntityManager } from '@mikro-orm/mongodb'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { systemEntityFactory } from '@testing/factory/systemEntityFactory'; import { v1 } from 'uuid'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; diff --git a/apps/server/src/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 index e235b1906e1..464a3f51dcf 100644 --- a/apps/server/src/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 @@ -1,11 +1,11 @@ +import { LoggerModule } from '@core/logger'; import { MongoMemoryDatabaseModule } from '@infra/database'; import KeycloakAdminClient from '@keycloak/keycloak-admin-client'; import { EntityManager } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LoggerModule } from '@src/core/logger'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { v1 } from 'uuid'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; diff --git a/apps/server/src/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 index 2aaf741feb0..94037ce867f 100644 --- a/apps/server/src/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 @@ -1,6 +1,6 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { AccountService, Account } from '@modules/account'; import KeycloakAdminClient from '@keycloak/keycloak-admin-client-cjs/keycloak-admin-client-cjs-index'; import { Users } from '@keycloak/keycloak-admin-client/lib/resources/users'; diff --git a/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts index ef4f8a44bb3..467f85f82ea 100644 --- a/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-migration.service.ts @@ -1,6 +1,6 @@ import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; import { Injectable } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { AccountService, Account } from '@modules/account'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; diff --git a/apps/server/src/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 index 11858b56a2b..37037838526 100644 --- a/apps/server/src/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 @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { MongoMemoryDatabaseModule } from '@infra/database'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { v1 } from 'uuid'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; import { KeycloakConfigurationModule } from '../keycloak-configuration.module'; diff --git a/apps/server/src/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 index f94513c1bd5..da85dfdd32e 100644 --- a/apps/server/src/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 @@ -4,7 +4,7 @@ import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRep import { AuthenticationManagement } from '@keycloak/keycloak-admin-client/lib/resources/authenticationManagement'; import { Users } from '@keycloak/keycloak-admin-client/lib/resources/users'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { v1 } from 'uuid'; import { IKeycloakSettings, diff --git a/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts index 5ba3071c2b4..5a68c8f1a17 100644 --- a/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts +++ b/apps/server/src/infra/identity-management/keycloak-configuration/service/keycloak-seed.service.ts @@ -1,6 +1,6 @@ import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; import { Inject } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import fs from 'node:fs/promises'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; import { JsonAccount } from '../interface/json-account.interface'; diff --git a/apps/server/src/infra/identity-management/keycloak/errors/idm-login-error.loggable.ts b/apps/server/src/infra/identity-management/keycloak/errors/idm-login-error.loggable.ts index 9c2096cd2e0..47b912e8ccb 100644 --- a/apps/server/src/infra/identity-management/keycloak/errors/idm-login-error.loggable.ts +++ b/apps/server/src/infra/identity-management/keycloak/errors/idm-login-error.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class IDMLoginError implements Loggable { constructor(private readonly error: Error) {} diff --git a/apps/server/src/infra/identity-management/keycloak/keycloak.module.ts b/apps/server/src/infra/identity-management/keycloak/keycloak.module.ts index c2fd27be29e..810746c93d8 100644 --- a/apps/server/src/infra/identity-management/keycloak/keycloak.module.ts +++ b/apps/server/src/infra/identity-management/keycloak/keycloak.module.ts @@ -1,7 +1,7 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { EncryptionModule } from '@infra/encryption'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { KeycloakAdministrationModule } from '../keycloak-administration/keycloak-administration.module'; import { KeycloakIdentityManagementOauthService } from './service/keycloak-identity-management-oauth.service'; import { KeycloakIdentityManagementService } from './service/keycloak-identity-management.service'; diff --git a/apps/server/src/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 index 40456bbb184..c23434ada92 100644 --- a/apps/server/src/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 @@ -2,7 +2,7 @@ import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { MongoMemoryDatabaseModule } from '@infra/database'; import { KeycloakModule } from '@infra/identity-management/keycloak/keycloak.module'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { v1 } from 'uuid'; import { KeycloakAdministrationModule } from '../../keycloak-administration/keycloak-administration.module'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; diff --git a/apps/server/src/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 index 471a791bb2a..b8013d2bd12 100644 --- a/apps/server/src/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 @@ -5,7 +5,7 @@ import { HttpService } from '@nestjs/axios'; import { Test, TestingModule } from '@nestjs/testing'; import { AxiosResponse } from 'axios'; import { of } from 'rxjs'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service'; import { KeycloakIdentityManagementOauthService } from './keycloak-identity-management-oauth.service'; diff --git a/apps/server/src/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 index 6310e50ab76..905d654e0bf 100644 --- a/apps/server/src/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 @@ -2,7 +2,7 @@ import { DefaultEncryptionService, EncryptionService } from '@infra/encryption'; import { OauthConfig } from '@modules/system/domain'; import { HttpService } from '@nestjs/axios'; import { Inject, Injectable } from '@nestjs/common'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import qs from 'qs'; import { lastValueFrom } from 'rxjs'; import { IdentityManagementOauthService } from '../../identity-management-oauth.service'; diff --git a/apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.ts b/apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.ts index e98f21d09be..3ecb29ebc2b 100644 --- a/apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.ts +++ b/apps/server/src/infra/preview-generator/loggable/preview-actions.loggable.ts @@ -1,4 +1,4 @@ -import { LogMessage, Loggable } from '@src/core/logger'; +import { LogMessage, Loggable } from '@core/logger'; import { PreviewFileOptions } from '../interface'; export class PreviewActionsLoggable implements Loggable { diff --git a/apps/server/src/infra/preview-generator/loggable/preview-exception.ts b/apps/server/src/infra/preview-generator/loggable/preview-exception.ts index fcfd1c023dc..653e4b0f04a 100644 --- a/apps/server/src/infra/preview-generator/loggable/preview-exception.ts +++ b/apps/server/src/infra/preview-generator/loggable/preview-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { PreviewFileOptions } from '../interface'; import { ErrorType } from '../interface/error-status.enum'; diff --git a/apps/server/src/infra/preview-generator/preview-generator-consumer.module.ts b/apps/server/src/infra/preview-generator/preview-generator-consumer.module.ts index abda8e8338c..4bf1545c336 100644 --- a/apps/server/src/infra/preview-generator/preview-generator-consumer.module.ts +++ b/apps/server/src/infra/preview-generator/preview-generator-consumer.module.ts @@ -2,7 +2,7 @@ import { RabbitMQWrapperModule } from '@infra/rabbitmq'; import { S3ClientAdapter, S3ClientModule } from '@infra/s3-client'; import { DynamicModule, Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; -import { Logger, LoggerModule } from '@src/core/logger'; +import { Logger, LoggerModule } from '@core/logger'; import { PreviewConfig } from './interface/preview-consumer-config'; import { PreviewGeneratorConsumer } from './preview-generator.consumer'; import { PreviewGeneratorService } from './preview-generator.service'; diff --git a/apps/server/src/infra/preview-generator/preview-generator-producer.module.ts b/apps/server/src/infra/preview-generator/preview-generator-producer.module.ts index d3f65299657..89f91d3d8c0 100644 --- a/apps/server/src/infra/preview-generator/preview-generator-producer.module.ts +++ b/apps/server/src/infra/preview-generator/preview-generator-producer.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { RabbitMQWrapperModule } from '../rabbitmq'; import { PreviewProducer } from './preview.producer'; diff --git a/apps/server/src/infra/preview-generator/preview-generator.consumer.spec.ts b/apps/server/src/infra/preview-generator/preview-generator.consumer.spec.ts index b1a24a30a57..3b3e5fe7c2e 100644 --- a/apps/server/src/infra/preview-generator/preview-generator.consumer.spec.ts +++ b/apps/server/src/infra/preview-generator/preview-generator.consumer.spec.ts @@ -1,6 +1,6 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { PreviewFileOptions, PreviewResponseMessage } from './interface'; import { PreviewGeneratorConsumer } from './preview-generator.consumer'; import { PreviewGeneratorService } from './preview-generator.service'; diff --git a/apps/server/src/infra/preview-generator/preview-generator.consumer.ts b/apps/server/src/infra/preview-generator/preview-generator.consumer.ts index 7e1a5c523ae..d7c252cb71f 100644 --- a/apps/server/src/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 { FilesPreviewEvents, FilesPreviewExchange } from '@infra/rabbitmq'; import { Injectable } from '@nestjs/common'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { PreviewFileOptions } from './interface'; import { PreviewActionsLoggable } from './loggable/preview-actions.loggable'; import { PreviewGeneratorService } from './preview-generator.service'; diff --git a/apps/server/src/infra/preview-generator/preview-generator.service.spec.ts b/apps/server/src/infra/preview-generator/preview-generator.service.spec.ts index eb8344e22f2..a0e68f36364 100644 --- a/apps/server/src/infra/preview-generator/preview-generator.service.spec.ts +++ b/apps/server/src/infra/preview-generator/preview-generator.service.spec.ts @@ -3,7 +3,7 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { GetFile, S3ClientAdapter } from '@infra/s3-client'; import { InternalServerErrorException, UnprocessableEntityException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { PassThrough, Readable } from 'node:stream'; import { ErrorType } from './interface/error-status.enum'; import { PreviewGeneratorService } from './preview-generator.service'; diff --git a/apps/server/src/infra/preview-generator/preview-generator.service.ts b/apps/server/src/infra/preview-generator/preview-generator.service.ts index d16cc5c8e0d..aec91994db5 100644 --- a/apps/server/src/infra/preview-generator/preview-generator.service.ts +++ b/apps/server/src/infra/preview-generator/preview-generator.service.ts @@ -1,6 +1,6 @@ import { GetFile, S3ClientAdapter } from '@infra/s3-client'; import { Injectable, UnprocessableEntityException } from '@nestjs/common'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import m, { subClass } from 'gm'; import { PassThrough } from 'stream'; import { PreviewFileOptions, PreviewInputMimeTypes, PreviewOptions, PreviewResponseMessage } from './interface'; diff --git a/apps/server/src/infra/preview-generator/preview.producer.spec.ts b/apps/server/src/infra/preview-generator/preview.producer.spec.ts index 2110dc5adf5..b544a45a2a7 100644 --- a/apps/server/src/infra/preview-generator/preview.producer.spec.ts +++ b/apps/server/src/infra/preview-generator/preview.producer.spec.ts @@ -3,7 +3,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { InternalServerErrorException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; import { ErrorMapper, FilesPreviewEvents, FilesPreviewExchange } from '../rabbitmq'; import { PreviewFileOptions } from './interface'; diff --git a/apps/server/src/infra/preview-generator/preview.producer.ts b/apps/server/src/infra/preview-generator/preview.producer.ts index 8c84e93b295..4b9fb788c77 100644 --- a/apps/server/src/infra/preview-generator/preview.producer.ts +++ b/apps/server/src/infra/preview-generator/preview.producer.ts @@ -2,7 +2,7 @@ import { AmqpConnection } from '@golevelup/nestjs-rabbitmq'; import { FilesPreviewEvents, FilesPreviewExchange, RpcMessageProducer } from '@infra/rabbitmq'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { PreviewFileOptions, PreviewResponseMessage } from './interface'; import { PreviewModuleConfig } from './interface/preview-consumer-config'; import { PreviewActionsLoggable } from './loggable/preview-actions.loggable'; diff --git a/apps/server/src/infra/rabbitmq/error.mapper.ts b/apps/server/src/infra/rabbitmq/error.mapper.ts index dcee0654e10..83a4d2d27ed 100644 --- a/apps/server/src/infra/rabbitmq/error.mapper.ts +++ b/apps/server/src/infra/rabbitmq/error.mapper.ts @@ -1,6 +1,6 @@ import { IError } from '@infra/rabbitmq'; import { BadRequestException, ForbiddenException, InternalServerErrorException } from '@nestjs/common'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; export class ErrorMapper { static mapRpcErrorResponseToDomainError( diff --git a/apps/server/src/infra/s3-client/s3-client.adapter.spec.ts b/apps/server/src/infra/s3-client/s3-client.adapter.spec.ts index 102886310d5..919f5f537dc 100644 --- a/apps/server/src/infra/s3-client/s3-client.adapter.spec.ts +++ b/apps/server/src/infra/s3-client/s3-client.adapter.spec.ts @@ -3,8 +3,8 @@ import { Upload } from '@aws-sdk/lib-storage'; import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { HttpException, InternalServerErrorException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { ErrorUtils } from '@src/core/error/utils'; -import { LegacyLogger } from '@src/core/logger'; +import { ErrorUtils } from '@core/error/utils'; +import { LegacyLogger } from '@core/logger'; import { Readable } from 'node:stream'; import { S3_CLIENT, S3_CONFIG } from './constants'; import { File, S3Config } from './interface'; diff --git a/apps/server/src/infra/s3-client/s3-client.adapter.ts b/apps/server/src/infra/s3-client/s3-client.adapter.ts index be9fa195448..336e3694fa1 100644 --- a/apps/server/src/infra/s3-client/s3-client.adapter.ts +++ b/apps/server/src/infra/s3-client/s3-client.adapter.ts @@ -15,8 +15,8 @@ import { import { Upload } from '@aws-sdk/lib-storage'; import { Inject, Injectable, InternalServerErrorException, NotFoundException } from '@nestjs/common'; import { TypeGuard } from '@shared/common'; -import { ErrorUtils } from '@src/core/error/utils'; -import { LegacyLogger } from '@src/core/logger'; +import { ErrorUtils } from '@core/error/utils'; +import { LegacyLogger } from '@core/logger'; import { Readable } from 'stream'; import { S3_CLIENT, S3_CONFIG } from './constants'; import { CopyFiles, File, GetFile, ListFiles, ObjectKeysRecursive, S3Config } from './interface'; diff --git a/apps/server/src/infra/s3-client/s3-client.module.spec.ts b/apps/server/src/infra/s3-client/s3-client.module.spec.ts index 39ebb4f7478..5ce0a06fc49 100644 --- a/apps/server/src/infra/s3-client/s3-client.module.spec.ts +++ b/apps/server/src/infra/s3-client/s3-client.module.spec.ts @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest'; import { Inject } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { S3ClientAdapter } from './s3-client.adapter'; import { S3ClientModule } from './s3-client.module'; diff --git a/apps/server/src/infra/s3-client/s3-client.module.ts b/apps/server/src/infra/s3-client/s3-client.module.ts index d4a366a9771..a428847e9e9 100644 --- a/apps/server/src/infra/s3-client/s3-client.module.ts +++ b/apps/server/src/infra/s3-client/s3-client.module.ts @@ -1,6 +1,6 @@ import { S3Client } from '@aws-sdk/client-s3'; import { DynamicModule, Module } from '@nestjs/common'; -import { LegacyLogger, LoggerModule } from '@src/core/logger'; +import { LegacyLogger, LoggerModule } from '@core/logger'; import { S3Config } from './interface'; import { S3ClientAdapter } from './s3-client.adapter'; diff --git a/apps/server/src/infra/schulconnex-client/loggable/schulconnex-configuration-missing.loggable.ts b/apps/server/src/infra/schulconnex-client/loggable/schulconnex-configuration-missing.loggable.ts index ec0e299c21b..22d7e18afd8 100644 --- a/apps/server/src/infra/schulconnex-client/loggable/schulconnex-configuration-missing.loggable.ts +++ b/apps/server/src/infra/schulconnex-client/loggable/schulconnex-configuration-missing.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchulconnexConfigurationMissingLoggable implements Loggable { getLogMessage(): LogMessage | ErrorLogMessage | ValidationErrorLogMessage { diff --git a/apps/server/src/infra/schulconnex-client/schulconnex-client.module.ts b/apps/server/src/infra/schulconnex-client/schulconnex-client.module.ts index bff42d9bbdb..58134a6092b 100644 --- a/apps/server/src/infra/schulconnex-client/schulconnex-client.module.ts +++ b/apps/server/src/infra/schulconnex-client/schulconnex-client.module.ts @@ -2,7 +2,7 @@ import { OauthAdapterService } from '@modules/oauth/service'; import { HttpModule, HttpService } from '@nestjs/axios'; import { DynamicModule, Module } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Logger, LoggerModule } from '@src/core/logger'; +import { Logger, LoggerModule } from '@core/logger'; import { SchulconnexRestClient } from './schulconnex-rest-client'; import { SchulconnexRestClientOptions } from './schulconnex-rest-client-options'; diff --git a/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.spec.ts b/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.spec.ts index fddba6e7090..3df7b192846 100644 --- a/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.spec.ts +++ b/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.spec.ts @@ -1,7 +1,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { OauthAdapterService, OAuthTokenDto } from '@modules/oauth'; import { HttpService } from '@nestjs/axios'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { of } from 'rxjs'; import { SchulconnexConfigurationMissingLoggable } from './loggable'; diff --git a/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts b/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts index d9a3b829cd3..734314fd83d 100644 --- a/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts +++ b/apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts @@ -2,7 +2,7 @@ import { OauthAdapterService, OAuthTokenDto } from '@modules/oauth'; import { OAuthGrantType } from '@modules/oauth/interface/oauth-grant-type.enum'; import { ClientCredentialsGrantTokenRequest } from '@modules/oauth/service/dto'; import { HttpService } from '@nestjs/axios'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { AxiosResponse } from 'axios'; import QueryString from 'qs'; import { lastValueFrom, Observable } from 'rxjs'; diff --git a/apps/server/src/infra/socketio/redis-ioadapter.spec.ts b/apps/server/src/infra/socketio/redis-ioadapter.spec.ts index 1141634c817..d18ff7a6025 100644 --- a/apps/server/src/infra/socketio/redis-ioadapter.spec.ts +++ b/apps/server/src/infra/socketio/redis-ioadapter.spec.ts @@ -1,7 +1,7 @@ -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { RedisIoAdapter } from './redis-ioadapter'; -jest.mock('@src/core/logger', () => { +jest.mock('@core/logger', () => { return { LegacyLogger: jest.fn().mockImplementation(() => { return { diff --git a/apps/server/src/infra/sync/console/sync.console.spec.ts b/apps/server/src/infra/sync/console/sync.console.spec.ts index 2688308f826..d8efab27047 100644 --- a/apps/server/src/infra/sync/console/sync.console.spec.ts +++ b/apps/server/src/infra/sync/console/sync.console.spec.ts @@ -1,6 +1,6 @@ import { createMock } from '@golevelup/ts-jest'; import { Test } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { SyncUc } from '../uc/sync.uc'; import { SyncConsole } from './sync.console'; diff --git a/apps/server/src/infra/sync/console/sync.console.ts b/apps/server/src/infra/sync/console/sync.console.ts index fd40c5a9a5a..8f2420d6f86 100644 --- a/apps/server/src/infra/sync/console/sync.console.ts +++ b/apps/server/src/infra/sync/console/sync.console.ts @@ -1,4 +1,4 @@ -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Command, Console } from 'nestjs-console'; import { SyncUc } from '../uc/sync.uc'; diff --git a/apps/server/src/infra/sync/errors/invalid-target.loggable.ts b/apps/server/src/infra/sync/errors/invalid-target.loggable.ts index e851baab768..8842de55765 100644 --- a/apps/server/src/infra/sync/errors/invalid-target.loggable.ts +++ b/apps/server/src/infra/sync/errors/invalid-target.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@core/logger'; import { SyncStrategyTarget } from '../sync-strategy.types'; export class InvalidTargetLoggable implements Loggable { diff --git a/apps/server/src/infra/sync/media-licenses/loggable/media-source-for-sync-not-found-loggable.exception.ts b/apps/server/src/infra/sync/media-licenses/loggable/media-source-for-sync-not-found-loggable.exception.ts index a3ce2b74c7c..91f5f45aecd 100644 --- a/apps/server/src/infra/sync/media-licenses/loggable/media-source-for-sync-not-found-loggable.exception.ts +++ b/apps/server/src/infra/sync/media-licenses/loggable/media-source-for-sync-not-found-loggable.exception.ts @@ -1,5 +1,5 @@ import { NotFoundException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class MediaSourceForSyncNotFoundLoggableException extends NotFoundException implements Loggable { constructor(private readonly mediaSourceName: string) { diff --git a/apps/server/src/infra/sync/media-licenses/loggable/school-for-school-media-license-sync-not-found.loggable.ts b/apps/server/src/infra/sync/media-licenses/loggable/school-for-school-media-license-sync-not-found.loggable.ts index ace24bcaa12..c85c6fa000b 100644 --- a/apps/server/src/infra/sync/media-licenses/loggable/school-for-school-media-license-sync-not-found.loggable.ts +++ b/apps/server/src/infra/sync/media-licenses/loggable/school-for-school-media-license-sync-not-found.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolForSchoolMediaLicenseSyncNotFoundLoggable implements Loggable { constructor(private readonly officialSchoolNumber: string) {} diff --git a/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.spec.ts b/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.spec.ts index efdec90b9be..87ee1d7a949 100644 --- a/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.spec.ts +++ b/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.spec.ts @@ -7,7 +7,7 @@ import { MediaSourceBasicAuthConfigNotFoundLoggableException } from '@modules/me import { mediaSourceFactory } from '@modules/media-source/testing'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AxiosErrorLoggable } from '@src/core/error/loggable'; +import { AxiosErrorLoggable } from '@core/error/loggable'; import { axiosErrorFactory } from '@testing/factory/axios-error.factory'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { AxiosResponse, RawAxiosRequestConfig } from 'axios'; diff --git a/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.ts b/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.ts index b0cb45dd153..c8cab8134b8 100644 --- a/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.ts +++ b/apps/server/src/infra/sync/media-licenses/service/vidis-fetch.service.ts @@ -4,7 +4,7 @@ import { VidisClientFactory, IDMBetreiberApiInterface, PageOfferDTO, OfferDTO } import { MediaSource, MediaSourceDataFormat } from '@modules/media-source'; import { MediaSourceBasicAuthConfigNotFoundLoggableException } from '@modules/media-source/loggable'; import { AxiosResponse, isAxiosError } from 'axios'; -import { AxiosErrorLoggable } from '@src/core/error/loggable'; +import { AxiosErrorLoggable } from '@core/error/loggable'; import { ConfigService } from '@nestjs/config'; import { VidisSyncConfig } from '../vidis-sync-config'; diff --git a/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.spec.ts b/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.spec.ts index 955fb48aad5..5d7ee4e20fa 100644 --- a/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.spec.ts +++ b/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.spec.ts @@ -7,7 +7,7 @@ import { MediaSchoolLicense, SchoolLicenseType } from '@modules/school-license'; import { MediaSchoolLicenseProps } from '@modules/school-license/domain'; import { School, SchoolService } from '@modules/school'; import { schoolFactory } from '@modules/school/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Test, TestingModule } from '@nestjs/testing'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { DeepPartial } from 'fishery'; diff --git a/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.ts b/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.ts index 0a826a245cd..a43436e4c96 100644 --- a/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.ts +++ b/apps/server/src/infra/sync/media-licenses/service/vidis-sync.service.ts @@ -2,7 +2,7 @@ import { MediaSource } from '@modules/media-source'; import { MediaSchoolLicenseService, MediaSchoolLicense, SchoolLicenseType } from '@modules/school-license'; import { School, SchoolService } from '@modules/school'; import { OfferDTO } from '@infra/vidis-client'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { ObjectId } from '@mikro-orm/mongodb'; import { Injectable } from '@nestjs/common'; import { SchoolForSchoolMediaLicenseSyncNotFoundLoggable } from '../loggable'; diff --git a/apps/server/src/infra/sync/service/sync.service.spec.ts b/apps/server/src/infra/sync/service/sync.service.spec.ts index 3c069beb4a8..73722be2dcc 100644 --- a/apps/server/src/infra/sync/service/sync.service.spec.ts +++ b/apps/server/src/infra/sync/service/sync.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { createMock } from '@golevelup/ts-jest'; import { faker } from '@faker-js/faker'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { SyncService } from './sync.service'; import { TspSyncStrategy } from '../tsp/tsp-sync.strategy'; import { SyncStrategyTarget } from '../sync-strategy.types'; diff --git a/apps/server/src/infra/sync/service/sync.service.ts b/apps/server/src/infra/sync/service/sync.service.ts index 04f7984aba1..44124cb37c5 100644 --- a/apps/server/src/infra/sync/service/sync.service.ts +++ b/apps/server/src/infra/sync/service/sync.service.ts @@ -1,5 +1,5 @@ import { Injectable, Optional } from '@nestjs/common'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { TspSyncStrategy } from '../tsp/tsp-sync.strategy'; import { SyncStrategy } from '../strategy/sync-strategy'; import { SyncStrategyTarget } from '../sync-strategy.types'; diff --git a/apps/server/src/infra/sync/sync.module.ts b/apps/server/src/infra/sync/sync.module.ts index 9a8d77f4061..c65bb4201a5 100644 --- a/apps/server/src/infra/sync/sync.module.ts +++ b/apps/server/src/infra/sync/sync.module.ts @@ -1,29 +1,29 @@ +import { LoggerModule } from '@core/logger'; import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { ConsoleWriterModule } from '@infra/console'; +import { EncryptionModule } from '@infra/encryption'; import { RabbitMQWrapperModule } from '@infra/rabbitmq'; import { TspClientModule } from '@infra/tsp-client/tsp-client.module'; -import { EncryptionModule } from '@infra/encryption'; import { VidisClientModule } from '@infra/vidis-client'; import { AccountModule } from '@modules/account'; import { LegacySchoolModule } from '@modules/legacy-school'; import { MediaSourceModule } from '@modules/media-source/media-source.module'; +import { ProvisioningModule } from '@modules/provisioning'; import { SchoolModule } from '@modules/school'; import { SchoolLicenseModule } from '@modules/school-license/school-license.module'; import { SystemModule } from '@modules/system'; import { UserModule } from '@modules/user'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; -import { ProvisioningModule } from '@src/modules/provisioning'; import { SyncConsole } from './console/sync.console'; +import { VidisFetchService, VidisSyncService, VidisSyncStrategy } from './media-licenses'; import { SyncService } from './service/sync.service'; +import { TspFetchService } from './tsp/tsp-fetch.service'; import { TspLegacyMigrationService } from './tsp/tsp-legacy-migration.service'; import { TspOauthDataMapper } from './tsp/tsp-oauth-data.mapper'; +import { TspSyncMigrationService } from './tsp/tsp-sync-migration.service'; import { TspSyncService } from './tsp/tsp-sync.service'; import { TspSyncStrategy } from './tsp/tsp-sync.strategy'; import { SyncUc } from './uc/sync.uc'; -import { TspFetchService } from './tsp/tsp-fetch.service'; -import { TspSyncMigrationService } from './tsp/tsp-sync-migration.service'; -import { VidisSyncService, VidisSyncStrategy, VidisFetchService } from './media-licenses'; @Module({ imports: [ diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-data-fetched.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-data-fetched.loggable.ts index e096993c328..3aecf21a4d2 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-data-fetched.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-data-fetched.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspDataFetchedLoggable implements Loggable { constructor( diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-start.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-start.loggable.ts index d70e760a188..6df32ccd8b8 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-start.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-start.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspLegacyMigrationStartLoggable implements Loggable { public getLogMessage(): LogMessage { diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-system-missing.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-system-missing.loggable.ts index b7c4dbf9b25..9d7dcca7115 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-system-missing.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-migration-system-missing.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspLegacyMigrationSystemMissingLoggable implements Loggable { public getLogMessage(): LogMessage { diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-count.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-count.loggable.ts index bea2c2a91b4..a68ce81733f 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-count.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-count.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspLegacySchoolMigrationCountLoggable implements Loggable { constructor(private readonly total: number) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-success.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-success.loggable.ts index bfd70da05d2..3e8ce6c2bd8 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-success.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-legacy-school-migration-success.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspLegacySchoolMigrationSuccessLoggable implements Loggable { constructor(private readonly total: number, private readonly migrated: number) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-migration-batch-summary.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-migration-batch-summary.loggable.ts index 475458d0d5f..74da5a5a68e 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-migration-batch-summary.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-migration-batch-summary.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspMigrationBatchSummaryLoggable implements Loggable { constructor( diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-migrations-fetched.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-migrations-fetched.loggable.ts index 34e55dc87bf..5432c904a30 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-migrations-fetched.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-migrations-fetched.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspMigrationsFetchedLoggable implements Loggable { constructor(private readonly tspUserMigrationCount: number) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-missing-external-id.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-missing-external-id.loggable.ts index 1ef7d8114b2..e5be8a2f6da 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-missing-external-id.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-missing-external-id.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspMissingExternalIdLoggable implements Loggable { constructor(private readonly objectType: string) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-schools-fetched.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-schools-fetched.loggable.ts index f2f5bf512a7..f5a194e5faf 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-schools-fetched.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-schools-fetched.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspSchoolsFetchedLoggable implements Loggable { constructor(private readonly tspSchoolCount: number, private readonly daysFetched: number) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-schools-synced.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-schools-synced.loggable.ts index 1068270a151..922b8b89be4 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-schools-synced.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-schools-synced.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspSchoolsSyncedLoggable implements Loggable { constructor( diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-schulnummer-missing.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-schulnummer-missing.loggable.ts index 3be67a149ee..37c6a73fc57 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-schulnummer-missing.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-schulnummer-missing.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspSchulnummerMissingLoggable implements Loggable { constructor(private readonly schulName?: string) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-synced-users.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-synced-users.loggable.ts index 58a15f94cfa..f71a3d535ba 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-synced-users.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-synced-users.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspSyncedUsersLoggable implements Loggable { constructor(private readonly syncedUsers: number) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-syncing-users.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-syncing-users.loggable.ts index 58efd8e41c8..fc94debfc55 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-syncing-users.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-syncing-users.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspSyncingUsersLoggable implements Loggable { constructor(private readonly syncingUsers: number) {} diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-system-not-found.loggable-exception.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-system-not-found.loggable-exception.ts index c65fd7ad992..b7c4962f1bd 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-system-not-found.loggable-exception.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-system-not-found.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError, ErrorLogMessage } from '@shared/common'; -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspSystemNotFoundLoggableException extends BusinessError implements Loggable { constructor() { diff --git a/apps/server/src/infra/sync/tsp/loggable/tsp-users-migrated.loggable.ts b/apps/server/src/infra/sync/tsp/loggable/tsp-users-migrated.loggable.ts index b92cedb192b..428da0118fd 100644 --- a/apps/server/src/infra/sync/tsp/loggable/tsp-users-migrated.loggable.ts +++ b/apps/server/src/infra/sync/tsp/loggable/tsp-users-migrated.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class TspUsersMigratedLoggable implements Loggable { constructor( diff --git a/apps/server/src/infra/sync/tsp/tsp-fetch.service.spec.ts b/apps/server/src/infra/sync/tsp/tsp-fetch.service.spec.ts index 4c7c76c8ea5..5a4ead3a491 100644 --- a/apps/server/src/infra/sync/tsp/tsp-fetch.service.spec.ts +++ b/apps/server/src/infra/sync/tsp/tsp-fetch.service.spec.ts @@ -1,8 +1,7 @@ +import { AxiosErrorLoggable, ErrorLoggable } from '@core/error/loggable'; +import { Logger } from '@core/logger'; import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; -import { Test, TestingModule } from '@nestjs/testing'; -import { AxiosErrorLoggable, ErrorLoggable } from '@src/core/error/loggable'; -import { Logger } from '@src/core/logger'; import { ExportApiInterface, RobjExportKlasse, @@ -12,9 +11,10 @@ import { RobjExportSchuelerMigration, RobjExportSchule, TspClientFactory, -} from '@src/infra/tsp-client'; -import { OauthConfigMissingLoggableException } from '@src/modules/oauth/loggable'; -import { systemFactory } from '@src/modules/system/testing'; +} from '@infra/tsp-client'; +import { OauthConfigMissingLoggableException } from '@modules/oauth/loggable'; +import { systemFactory } from '@modules/system/testing'; +import { Test, TestingModule } from '@nestjs/testing'; import { AxiosError, AxiosResponse } from 'axios'; import { TspFetchService } from './tsp-fetch.service'; diff --git a/apps/server/src/infra/sync/tsp/tsp-fetch.service.ts b/apps/server/src/infra/sync/tsp/tsp-fetch.service.ts index 13976ec0259..75db14b0241 100644 --- a/apps/server/src/infra/sync/tsp/tsp-fetch.service.ts +++ b/apps/server/src/infra/sync/tsp/tsp-fetch.service.ts @@ -1,6 +1,5 @@ -import { Injectable } from '@nestjs/common'; -import { AxiosErrorLoggable, ErrorLoggable } from '@src/core/error/loggable'; -import { Logger } from '@src/core/logger'; +import { AxiosErrorLoggable, ErrorLoggable } from '@core/error/loggable'; +import { Logger } from '@core/logger'; import { ExportApiInterface, RobjExportKlasse, @@ -10,9 +9,10 @@ import { RobjExportSchuelerMigration, RobjExportSchule, TspClientFactory, -} from '@src/infra/tsp-client'; -import { OauthConfigMissingLoggableException } from '@src/modules/oauth/loggable'; -import { System } from '@src/modules/system'; +} from '@infra/tsp-client'; +import { OauthConfigMissingLoggableException } from '@modules/oauth/loggable'; +import { System } from '@modules/system'; +import { Injectable } from '@nestjs/common'; import { AxiosError, AxiosResponse } from 'axios'; import moment from 'moment'; diff --git a/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.integration.spec.ts b/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.integration.spec.ts index 8b60134417e..1c82cdc2954 100644 --- a/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.integration.spec.ts +++ b/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.integration.spec.ts @@ -1,12 +1,12 @@ +import { Logger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { MongoMemoryDatabaseModule } from '@infra/database'; import { EntityManager } from '@mikro-orm/mongodb'; +import { SystemType } from '@modules/system'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain/entity'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; import { SchoolFeature } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; -import { SystemType } from '@src/modules/system'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { systemEntityFactory } from '@testing/factory/systemEntityFactory'; diff --git a/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.ts b/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.ts index 1bff95ef2b5..c98afed55b4 100644 --- a/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.ts +++ b/apps/server/src/infra/sync/tsp/tsp-legacy-migration.service.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Injectable } from '@nestjs/common'; import { EntityId, SchoolFeature } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { TspLegacyMigrationStartLoggable } from './loggable/tsp-legacy-migration-start.loggable'; import { TspLegacyMigrationSystemMissingLoggable } from './loggable/tsp-legacy-migration-system-missing.loggable'; import { TspLegacySchoolMigrationCountLoggable } from './loggable/tsp-legacy-school-migration-count.loggable'; diff --git a/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.spec.ts b/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.spec.ts index fda468415cb..f91a02cab01 100644 --- a/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.spec.ts +++ b/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.spec.ts @@ -1,5 +1,7 @@ +import { Logger } from '@core/logger'; import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { RobjExportKlasse, RobjExportLehrer, RobjExportSchueler } from '@infra/tsp-client'; import { ExternalClassDto, ExternalSchoolDto, @@ -7,14 +9,12 @@ import { OauthDataDto, ProvisioningSystemDto, } from '@modules/provisioning'; +import { BadDataLoggableException } from '@modules/provisioning/loggable'; +import { schoolFactory } from '@modules/school/testing'; +import { systemFactory } from '@modules/system/testing'; import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { Logger } from '@src/core/logger'; -import { RobjExportKlasse, RobjExportLehrer, RobjExportSchueler } from '@src/infra/tsp-client'; -import { BadDataLoggableException } from '@src/modules/provisioning/loggable'; -import { schoolFactory } from '@src/modules/school/testing'; -import { systemFactory } from '@src/modules/system/testing'; import { TspMissingExternalIdLoggable } from './loggable/tsp-missing-external-id.loggable'; import { TspOauthDataMapper } from './tsp-oauth-data.mapper'; diff --git a/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.ts b/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.ts index dcadb75014f..9a8a68f67ab 100644 --- a/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.ts +++ b/apps/server/src/infra/sync/tsp/tsp-oauth-data.mapper.ts @@ -1,3 +1,5 @@ +import { Logger } from '@core/logger'; +import { RobjExportKlasse, RobjExportLehrer, RobjExportSchueler } from '@infra/tsp-client'; import { ExternalClassDto, ExternalSchoolDto, @@ -5,14 +7,12 @@ import { OauthDataDto, ProvisioningSystemDto, } from '@modules/provisioning'; +import { BadDataLoggableException } from '@modules/provisioning/loggable'; import { School } from '@modules/school'; import { System } from '@modules/system'; import { Injectable } from '@nestjs/common'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { Logger } from '@src/core/logger'; -import { RobjExportKlasse, RobjExportLehrer, RobjExportSchueler } from '@src/infra/tsp-client'; -import { BadDataLoggableException } from '@src/modules/provisioning/loggable'; import { TspMissingExternalIdLoggable } from './loggable/tsp-missing-external-id.loggable'; @Injectable() diff --git a/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.spec.ts b/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.spec.ts index 2473509985c..79b79b586bb 100644 --- a/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.spec.ts +++ b/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.spec.ts @@ -1,12 +1,12 @@ +import { Logger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AccountService } from '@modules/account'; +import { accountDoFactory } from '@modules/account/testing'; import { systemFactory } from '@modules/system/testing'; import { UserService } from '@modules/user'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { UserSourceOptions } from '@shared/domain/domainobject/user-source-options.do'; -import { Logger } from '@src/core/logger'; -import { accountDoFactory } from '@src/modules/account/testing'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { TspSyncMigrationService } from './tsp-sync-migration.service'; import { TspSyncConfig } from './tsp-sync.config'; diff --git a/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.ts b/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.ts index a5d54f56b57..a76b06b5aa1 100644 --- a/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.ts +++ b/apps/server/src/infra/sync/tsp/tsp-sync-migration.service.ts @@ -1,12 +1,12 @@ +import { Logger } from '@core/logger'; import { Account, AccountService } from '@modules/account'; +import { BadDataLoggableException } from '@modules/provisioning/loggable'; import { System } from '@modules/system'; import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { UserDO } from '@shared/domain/domainobject'; import { UserSourceOptions } from '@shared/domain/domainobject/user-source-options.do'; -import { Logger } from '@src/core/logger'; -import { BadDataLoggableException } from '@src/modules/provisioning/loggable'; import { TspMigrationBatchSummaryLoggable } from './loggable/tsp-migration-batch-summary.loggable'; import { TspMigrationsFetchedLoggable } from './loggable/tsp-migrations-fetched.loggable'; import { TspSyncConfig } from './tsp-sync.config'; diff --git a/apps/server/src/infra/sync/tsp/tsp-sync.service.spec.ts b/apps/server/src/infra/sync/tsp/tsp-sync.service.spec.ts index 6871276568f..a225cef6236 100644 --- a/apps/server/src/infra/sync/tsp/tsp-sync.service.spec.ts +++ b/apps/server/src/infra/sync/tsp/tsp-sync.service.spec.ts @@ -1,14 +1,14 @@ import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { FederalStateService, SchoolYearService } from '@modules/legacy-school'; import { School, SchoolService } from '@modules/school'; +import { FileStorageType, SchoolProps } from '@modules/school/domain'; +import { FederalStateEntityMapper, SchoolYearEntityMapper } from '@modules/school/repo/mikro-orm/mapper'; +import { schoolFactory } from '@modules/school/testing'; import { SystemService, SystemType } from '@modules/system'; +import { systemFactory } from '@modules/system/testing'; import { Test, TestingModule } from '@nestjs/testing'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { FederalStateService, SchoolYearService } from '@src/modules/legacy-school'; -import { FileStorageType, SchoolProps } from '@src/modules/school/domain'; -import { FederalStateEntityMapper, SchoolYearEntityMapper } from '@src/modules/school/repo/mikro-orm/mapper'; -import { schoolFactory } from '@src/modules/school/testing'; -import { systemFactory } from '@src/modules/system/testing'; import { federalStateFactory } from '@testing/factory/federal-state.factory'; import { schoolYearFactory } from '@testing/factory/schoolyear.factory'; import { TspSyncService } from './tsp-sync.service'; diff --git a/apps/server/src/infra/sync/tsp/tsp-sync.service.ts b/apps/server/src/infra/sync/tsp/tsp-sync.service.ts index 51e4b6e78ae..1e285aa41c3 100644 --- a/apps/server/src/infra/sync/tsp/tsp-sync.service.ts +++ b/apps/server/src/infra/sync/tsp/tsp-sync.service.ts @@ -1,14 +1,14 @@ import { FederalStateService, SchoolYearService } from '@modules/legacy-school'; +import { FederalStateNames } from '@modules/legacy-school/types'; import { School, SchoolService } from '@modules/school'; +import { FederalState, FileStorageType } from '@modules/school/domain'; +import { SchoolFactory } from '@modules/school/domain/factory'; +import { SchoolPermissions } from '@modules/school/domain/type'; +import { FederalStateEntityMapper, SchoolYearEntityMapper } from '@modules/school/repo/mikro-orm/mapper'; import { System, SystemService, SystemType } from '@modules/system'; import { Injectable } from '@nestjs/common'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; import { SchoolFeature } from '@shared/domain/types'; -import { FederalStateNames } from '@src/modules/legacy-school/types'; -import { FederalState, FileStorageType } from '@src/modules/school/domain'; -import { SchoolFactory } from '@src/modules/school/domain/factory'; -import { SchoolPermissions } from '@src/modules/school/domain/type'; -import { FederalStateEntityMapper, SchoolYearEntityMapper } from '@src/modules/school/repo/mikro-orm/mapper'; import { ObjectId } from 'bson'; import { TspSystemNotFoundLoggableException } from './loggable/tsp-system-not-found.loggable-exception'; diff --git a/apps/server/src/infra/sync/tsp/tsp-sync.strategy.spec.ts b/apps/server/src/infra/sync/tsp/tsp-sync.strategy.spec.ts index d1a9942cc98..5588157f378 100644 --- a/apps/server/src/infra/sync/tsp/tsp-sync.strategy.spec.ts +++ b/apps/server/src/infra/sync/tsp/tsp-sync.strategy.spec.ts @@ -1,3 +1,4 @@ +import { Logger } from '@core/logger'; import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { @@ -8,25 +9,24 @@ import { RobjExportSchuelerMigration, RobjExportSchule, } from '@infra/tsp-client'; +import { Account } from '@modules/account'; +import { ExternalUserDto, OauthDataDto, ProvisioningService, ProvisioningSystemDto } from '@modules/provisioning'; +import { School } from '@modules/school'; +import { schoolFactory } from '@modules/school/testing'; +import { System } from '@modules/system'; +import { systemFactory } from '@modules/system/testing'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO } from '@shared/domain/domainobject'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { Logger } from '@src/core/logger'; -import { Account } from '@src/modules/account'; -import { ExternalUserDto, OauthDataDto, ProvisioningService, ProvisioningSystemDto } from '@src/modules/provisioning'; -import { School } from '@src/modules/school'; -import { schoolFactory } from '@src/modules/school/testing'; -import { System } from '@src/modules/system'; -import { systemFactory } from '@src/modules/system/testing'; import { SyncStrategyTarget } from '../sync-strategy.types'; import { TspFetchService } from './tsp-fetch.service'; import { TspLegacyMigrationService } from './tsp-legacy-migration.service'; import { TspOauthDataMapper } from './tsp-oauth-data.mapper'; +import { TspSyncMigrationService } from './tsp-sync-migration.service'; import { TspSyncConfig } from './tsp-sync.config'; import { TspSyncService } from './tsp-sync.service'; import { TspSyncStrategy } from './tsp-sync.strategy'; -import { TspSyncMigrationService } from './tsp-sync-migration.service'; describe(TspSyncStrategy.name, () => { let module: TestingModule; diff --git a/apps/server/src/infra/sync/tsp/tsp-sync.strategy.ts b/apps/server/src/infra/sync/tsp/tsp-sync.strategy.ts index 8ed097e6b27..99b545eda05 100644 --- a/apps/server/src/infra/sync/tsp/tsp-sync.strategy.ts +++ b/apps/server/src/infra/sync/tsp/tsp-sync.strategy.ts @@ -1,9 +1,9 @@ +import { Logger } from '@core/logger'; +import { ProvisioningService } from '@modules/provisioning'; import { School } from '@modules/school'; +import { System } from '@modules/system'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Logger } from '@src/core/logger'; -import { ProvisioningService } from '@src/modules/provisioning'; -import { System } from '@src/modules/system'; import pLimit from 'p-limit'; import { SyncStrategy } from '../strategy/sync-strategy'; import { SyncStrategyTarget } from '../sync-strategy.types'; diff --git a/apps/server/src/infra/tsp-client/tsp-client-factory.spec.ts b/apps/server/src/infra/tsp-client/tsp-client-factory.spec.ts index b8123894961..4001969e6fd 100644 --- a/apps/server/src/infra/tsp-client/tsp-client-factory.spec.ts +++ b/apps/server/src/infra/tsp-client/tsp-client-factory.spec.ts @@ -4,8 +4,8 @@ import { OauthAdapterService } from '@modules/oauth'; import { ServerConfig } from '@modules/server'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { AxiosErrorLoggable, ErrorLoggable } from '@src/core/error/loggable'; -import { Logger } from '@src/core/logger'; +import { AxiosErrorLoggable, ErrorLoggable } from '@core/error/loggable'; +import { Logger } from '@core/logger'; import axios, { AxiosError } from 'axios'; import { DefaultEncryptionService, EncryptionService } from '../encryption'; import { TspClientFactory } from './tsp-client-factory'; diff --git a/apps/server/src/infra/tsp-client/tsp-client-factory.ts b/apps/server/src/infra/tsp-client/tsp-client-factory.ts index 53d72673aed..f7f55d6bef9 100644 --- a/apps/server/src/infra/tsp-client/tsp-client-factory.ts +++ b/apps/server/src/infra/tsp-client/tsp-client-factory.ts @@ -1,10 +1,10 @@ +import { AxiosErrorLoggable, ErrorLoggable } from '@core/error/loggable'; +import { Logger } from '@core/logger'; +import { OauthAdapterService } from '@modules/oauth'; +import { OAuthGrantType } from '@modules/oauth/interface/oauth-grant-type.enum'; +import { ClientCredentialsGrantTokenRequest } from '@modules/oauth/service/dto'; import { Inject, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { AxiosErrorLoggable, ErrorLoggable } from '@src/core/error/loggable'; -import { Logger } from '@src/core/logger'; -import { OauthAdapterService } from '@src/modules/oauth'; -import { OAuthGrantType } from '@src/modules/oauth/interface/oauth-grant-type.enum'; -import { ClientCredentialsGrantTokenRequest } from '@src/modules/oauth/service/dto'; import { AxiosError } from 'axios'; import * as jwt from 'jsonwebtoken'; import { DefaultEncryptionService, EncryptionService } from '../encryption'; diff --git a/apps/server/src/infra/tsp-client/tsp-client.module.ts b/apps/server/src/infra/tsp-client/tsp-client.module.ts index 857f2b83dc3..be59be65e7c 100644 --- a/apps/server/src/infra/tsp-client/tsp-client.module.ts +++ b/apps/server/src/infra/tsp-client/tsp-client.module.ts @@ -1,6 +1,6 @@ import { OauthModule } from '@modules/oauth'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { EncryptionModule } from '../encryption'; import { TspClientFactory } from './tsp-client-factory'; diff --git a/apps/server/src/modules/account/account-api.module.ts b/apps/server/src/modules/account/account-api.module.ts index 4142238d305..d7268c5876a 100644 --- a/apps/server/src/modules/account/account-api.module.ts +++ b/apps/server/src/modules/account/account-api.module.ts @@ -1,7 +1,7 @@ import { AuthorizationModule } from '@modules/authorization'; import { Module } from '@nestjs/common'; import { UserRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { AccountUc } from './api/account.uc'; import { AccountModule } from './account.module'; import { AccountController } from './api/account.controller'; diff --git a/apps/server/src/modules/account/account-config.ts b/apps/server/src/modules/account/account-config.ts index e2623aa6f18..6df2288e7b7 100644 --- a/apps/server/src/modules/account/account-config.ts +++ b/apps/server/src/modules/account/account-config.ts @@ -1,4 +1,4 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; import { SystemConfig } from '@modules/system'; export interface AccountConfig extends LoggerConfig, SystemConfig { diff --git a/apps/server/src/modules/account/account.module.ts b/apps/server/src/modules/account/account.module.ts index 454a42ad96e..2f3424934c1 100644 --- a/apps/server/src/modules/account/account.module.ts +++ b/apps/server/src/modules/account/account.module.ts @@ -4,7 +4,7 @@ import { Module } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { CqrsModule } from '@nestjs/cqrs'; import { UserRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger/logger.module'; +import { LoggerModule } from '@core/logger/logger.module'; import { AccountConfig } from './account-config'; import { AccountServiceDb } from './domain/services/account-db.service'; import { AccountServiceIdm } from './domain/services/account-idm.service'; diff --git a/apps/server/src/modules/account/domain/error/deleted-account-with-user-id.loggable.ts b/apps/server/src/modules/account/domain/error/deleted-account-with-user-id.loggable.ts index ed6d9eab2a8..93e3e30d7f2 100644 --- a/apps/server/src/modules/account/domain/error/deleted-account-with-user-id.loggable.ts +++ b/apps/server/src/modules/account/domain/error/deleted-account-with-user-id.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class DeletedAccountWithUserIdLoggable implements Loggable { constructor(private readonly userId: string) {} diff --git a/apps/server/src/modules/account/domain/error/deleted-account.loggable.ts b/apps/server/src/modules/account/domain/error/deleted-account.loggable.ts index 35706fdfb79..0d8e6fa964d 100644 --- a/apps/server/src/modules/account/domain/error/deleted-account.loggable.ts +++ b/apps/server/src/modules/account/domain/error/deleted-account.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class DeletedAccountLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/deleted-user-data.loggable.ts b/apps/server/src/modules/account/domain/error/deleted-user-data.loggable.ts index 4ead185b6ef..6ba826dd354 100644 --- a/apps/server/src/modules/account/domain/error/deleted-user-data.loggable.ts +++ b/apps/server/src/modules/account/domain/error/deleted-user-data.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class DeletedUserDataLoggable implements Loggable { constructor(private readonly userId: string) {} diff --git a/apps/server/src/modules/account/domain/error/deleting-account-with-user-id.loggable.ts b/apps/server/src/modules/account/domain/error/deleting-account-with-user-id.loggable.ts index 1c911715ad0..d917ce5c56c 100644 --- a/apps/server/src/modules/account/domain/error/deleting-account-with-user-id.loggable.ts +++ b/apps/server/src/modules/account/domain/error/deleting-account-with-user-id.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class DeletingAccountWithUserIdLoggable implements Loggable { constructor(private readonly userId: string) {} diff --git a/apps/server/src/modules/account/domain/error/deleting-account.loggable.ts b/apps/server/src/modules/account/domain/error/deleting-account.loggable.ts index a1ad8a7e129..5a0660e1e3d 100644 --- a/apps/server/src/modules/account/domain/error/deleting-account.loggable.ts +++ b/apps/server/src/modules/account/domain/error/deleting-account.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class DeletingAccountLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/deleting-user-data.loggable.ts b/apps/server/src/modules/account/domain/error/deleting-user-data.loggable.ts index c722ce2f183..939c88b9ea7 100644 --- a/apps/server/src/modules/account/domain/error/deleting-user-data.loggable.ts +++ b/apps/server/src/modules/account/domain/error/deleting-user-data.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class DeletingUserDataLoggable implements Loggable { constructor(private readonly userId: string) {} diff --git a/apps/server/src/modules/account/domain/error/find-account-by-user-id.loggable.ts b/apps/server/src/modules/account/domain/error/find-account-by-user-id.loggable.ts index 0aa8da99e10..ece968c4a8c 100644 --- a/apps/server/src/modules/account/domain/error/find-account-by-user-id.loggable.ts +++ b/apps/server/src/modules/account/domain/error/find-account-by-user-id.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class FindAccountByDbcUserIdLoggable implements Loggable { constructor(private readonly userId: string) {} diff --git a/apps/server/src/modules/account/domain/error/get-idm-account-by-id.loggable.ts b/apps/server/src/modules/account/domain/error/get-idm-account-by-id.loggable.ts index 6bb45906231..7781b391a62 100644 --- a/apps/server/src/modules/account/domain/error/get-idm-account-by-id.loggable.ts +++ b/apps/server/src/modules/account/domain/error/get-idm-account-by-id.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class GetOptionalIdmAccountLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/idm-callback-loggable-exception.ts b/apps/server/src/modules/account/domain/error/idm-callback-loggable-exception.ts index 3a6d2223ad4..688e4ec9cb3 100644 --- a/apps/server/src/modules/account/domain/error/idm-callback-loggable-exception.ts +++ b/apps/server/src/modules/account/domain/error/idm-callback-loggable-exception.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@core/logger'; export class IdmCallbackLoggableException implements Loggable { constructor(private readonly callbackError: Error | unknown) {} diff --git a/apps/server/src/modules/account/domain/error/saved-account.loggable.ts b/apps/server/src/modules/account/domain/error/saved-account.loggable.ts index e10e4fda459..56a6b103af0 100644 --- a/apps/server/src/modules/account/domain/error/saved-account.loggable.ts +++ b/apps/server/src/modules/account/domain/error/saved-account.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class SavedAccountLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/saving-account.loggable.ts b/apps/server/src/modules/account/domain/error/saving-account.loggable.ts index dfe9be05ae1..c2a82f96759 100644 --- a/apps/server/src/modules/account/domain/error/saving-account.loggable.ts +++ b/apps/server/src/modules/account/domain/error/saving-account.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class SavingAccountLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/updated-account-password.loggable.ts b/apps/server/src/modules/account/domain/error/updated-account-password.loggable.ts index 72d2a99ef35..343df02050d 100644 --- a/apps/server/src/modules/account/domain/error/updated-account-password.loggable.ts +++ b/apps/server/src/modules/account/domain/error/updated-account-password.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UpdatedAccountPasswordLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/updated-account-username.loggable.ts b/apps/server/src/modules/account/domain/error/updated-account-username.loggable.ts index 7e346c0daed..1b094fa4ca1 100644 --- a/apps/server/src/modules/account/domain/error/updated-account-username.loggable.ts +++ b/apps/server/src/modules/account/domain/error/updated-account-username.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UpdatedAccountUsernameLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/updated-last-failed-login.loggable.ts b/apps/server/src/modules/account/domain/error/updated-last-failed-login.loggable.ts index f6d404b10a0..8374cd39c6d 100644 --- a/apps/server/src/modules/account/domain/error/updated-last-failed-login.loggable.ts +++ b/apps/server/src/modules/account/domain/error/updated-last-failed-login.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UpdatedLastFailedLoginLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/updating-account-password.loggable.ts b/apps/server/src/modules/account/domain/error/updating-account-password.loggable.ts index 8f0bb7cd8e8..fdc59a70dd7 100644 --- a/apps/server/src/modules/account/domain/error/updating-account-password.loggable.ts +++ b/apps/server/src/modules/account/domain/error/updating-account-password.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UpdatingAccountPasswordLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/updating-account-username.loggable.ts b/apps/server/src/modules/account/domain/error/updating-account-username.loggable.ts index 8f83855ce77..c1a0121431c 100644 --- a/apps/server/src/modules/account/domain/error/updating-account-username.loggable.ts +++ b/apps/server/src/modules/account/domain/error/updating-account-username.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UpdatingAccountUsernameLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/error/updating-last-failed-login.loggable.ts b/apps/server/src/modules/account/domain/error/updating-last-failed-login.loggable.ts index a294ce0dadb..61d13cb3bf4 100644 --- a/apps/server/src/modules/account/domain/error/updating-last-failed-login.loggable.ts +++ b/apps/server/src/modules/account/domain/error/updating-last-failed-login.loggable.ts @@ -1,4 +1,4 @@ -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UpdatingLastFailedLoginLoggable implements Loggable { constructor(private readonly accountId: string) {} diff --git a/apps/server/src/modules/account/domain/services/account-db.service.spec.ts b/apps/server/src/modules/account/domain/services/account-db.service.spec.ts index 5b2c33ec350..095f2551066 100644 --- a/apps/server/src/modules/account/domain/services/account-db.service.spec.ts +++ b/apps/server/src/modules/account/domain/services/account-db.service.spec.ts @@ -7,7 +7,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { EntityNotFoundError } from '@shared/common'; import { IdmAccount } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import bcrypt from 'bcryptjs'; diff --git a/apps/server/src/modules/account/domain/services/account-idm.service.integration.spec.ts b/apps/server/src/modules/account/domain/services/account-idm.service.integration.spec.ts index 48f9a9c65b2..a75cdf32d49 100644 --- a/apps/server/src/modules/account/domain/services/account-idm.service.integration.spec.ts +++ b/apps/server/src/modules/account/domain/services/account-idm.service.integration.spec.ts @@ -5,7 +5,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { IdmAccount } from '@shared/domain/interface'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { v1 } from 'uuid'; import { AccountIdmToDoMapper, AccountIdmToDoMapperDb } from '../../repo/micro-orm/mapper'; import { AccountServiceIdm } from './account-idm.service'; diff --git a/apps/server/src/modules/account/domain/services/account-idm.service.spec.ts b/apps/server/src/modules/account/domain/services/account-idm.service.spec.ts index 8baa91c6808..247c4582702 100644 --- a/apps/server/src/modules/account/domain/services/account-idm.service.spec.ts +++ b/apps/server/src/modules/account/domain/services/account-idm.service.spec.ts @@ -7,7 +7,7 @@ import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityNotFoundError } from '@shared/common'; import { IdmAccount } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Account, AccountSave } from '..'; import { AccountConfig } from '../../account-config'; import { AccountIdmToDoMapper, AccountIdmToDoMapperDb } from '../../repo/micro-orm/mapper'; diff --git a/apps/server/src/modules/account/domain/services/account-idm.service.ts b/apps/server/src/modules/account/domain/services/account-idm.service.ts index 3fa1c84e2d2..8f0a379bf2b 100644 --- a/apps/server/src/modules/account/domain/services/account-idm.service.ts +++ b/apps/server/src/modules/account/domain/services/account-idm.service.ts @@ -5,7 +5,7 @@ import { ConfigService } from '@nestjs/config/dist/config.service'; import { EntityNotFoundError } from '@shared/common'; import { IdmAccountUpdate } from '@shared/domain/interface'; import { Counted, EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Account, AccountSave } from '..'; import { AccountConfig } from '../../account-config'; import { AccountIdmToDoMapper } from '../../repo/micro-orm/mapper'; diff --git a/apps/server/src/modules/account/domain/services/account.service.integration.spec.ts b/apps/server/src/modules/account/domain/services/account.service.integration.spec.ts index f6b862e890a..4a72b7f603a 100644 --- a/apps/server/src/modules/account/domain/services/account.service.integration.spec.ts +++ b/apps/server/src/modules/account/domain/services/account.service.integration.spec.ts @@ -10,7 +10,7 @@ import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { IdmAccount } from '@shared/domain/interface'; import { UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { v1 } from 'uuid'; import { Account, AccountSave } from '..'; diff --git a/apps/server/src/modules/account/domain/services/account.service.spec.ts b/apps/server/src/modules/account/domain/services/account.service.spec.ts index e93f6c8b11b..5990bf2fbd0 100644 --- a/apps/server/src/modules/account/domain/services/account.service.spec.ts +++ b/apps/server/src/modules/account/domain/services/account.service.spec.ts @@ -17,7 +17,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { AuthorizationError, EntityNotFoundError, ForbiddenOperationError, ValidationError } from '@shared/common'; import { User } from '@shared/domain/entity'; import { UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/account/domain/services/account.service.ts b/apps/server/src/modules/account/domain/services/account.service.ts index 1c83edd9d19..0e78b35730c 100644 --- a/apps/server/src/modules/account/domain/services/account.service.ts +++ b/apps/server/src/modules/account/domain/services/account.service.ts @@ -17,7 +17,7 @@ import { AuthorizationError, EntityNotFoundError, ForbiddenOperationError, Valid import { User } from '@shared/domain/entity'; import { Counted, EntityId } from '@shared/domain/types'; import { UserRepo } from '@shared/repo/user/user.repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { isEmail, isNotEmpty } from 'class-validator'; import { Account, AccountSave, UpdateAccount, UpdateMyAccount } from '..'; import { AccountConfig } from '../../account-config'; diff --git a/apps/server/src/modules/alert/adapter/status.adapter.ts b/apps/server/src/modules/alert/adapter/status.adapter.ts index e164bada4b2..2f9efe6e353 100644 --- a/apps/server/src/modules/alert/adapter/status.adapter.ts +++ b/apps/server/src/modules/alert/adapter/status.adapter.ts @@ -1,7 +1,7 @@ import { HttpService } from '@nestjs/axios'; import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { firstValueFrom } from 'rxjs'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { ConfigService } from '@nestjs/config'; import { AlertConfig } from '../alert.config'; import { Importance } from './enum'; diff --git a/apps/server/src/modules/authentication/authentication-api-test.module.ts b/apps/server/src/modules/authentication/authentication-api-test.module.ts index f56fcabdc1a..5dc3d0dc2ef 100644 --- a/apps/server/src/modules/authentication/authentication-api-test.module.ts +++ b/apps/server/src/modules/authentication/authentication-api-test.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { SystemModule } from '@modules/system'; import { OauthModule } from '@modules/oauth'; import { AuthenticationTestModule } from './authentication-test.module'; diff --git a/apps/server/src/modules/authentication/authentication-api.module.ts b/apps/server/src/modules/authentication/authentication-api.module.ts index 249f9ce2b88..ba7e8077a9d 100644 --- a/apps/server/src/modules/authentication/authentication-api.module.ts +++ b/apps/server/src/modules/authentication/authentication-api.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { SystemModule } from '@modules/system'; import { OauthModule } from '@modules/oauth/oauth.module'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { AuthenticationModule } from './authentication.module'; import { LoginController, LogoutController } from './controllers'; import { LoginUc, LogoutUc } from './uc'; diff --git a/apps/server/src/modules/authentication/authentication-test.module.ts b/apps/server/src/modules/authentication/authentication-test.module.ts index 6a32df9c920..7014bad66ea 100644 --- a/apps/server/src/modules/authentication/authentication-test.module.ts +++ b/apps/server/src/modules/authentication/authentication-test.module.ts @@ -12,7 +12,7 @@ import { JwtModule } from '@nestjs/jwt'; import { PassportModule } from '@nestjs/passport'; import { HttpModule } from '@nestjs/axios'; import { LegacySchoolRepo, UserRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { Algorithm, SignOptions } from 'jsonwebtoken'; import { UserModule } from '../user'; import { JwtWhitelistAdapter } from './helper/jwt-whitelist.adapter'; diff --git a/apps/server/src/modules/authentication/authentication.module.ts b/apps/server/src/modules/authentication/authentication.module.ts index d910dfb1603..ff7b7f79049 100644 --- a/apps/server/src/modules/authentication/authentication.module.ts +++ b/apps/server/src/modules/authentication/authentication.module.ts @@ -12,7 +12,7 @@ import { ConfigService } from '@nestjs/config'; import { JwtModule } from '@nestjs/jwt'; import { PassportModule } from '@nestjs/passport'; import { LegacySchoolRepo, UserRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { Algorithm, SignOptions } from 'jsonwebtoken'; import { AuthenticationConfig } from './authentication-config'; import { JwtWhitelistAdapter } from './helper/jwt-whitelist.adapter'; diff --git a/apps/server/src/modules/authentication/errors/end-session-endpoint-not-found.loggable-exception.ts b/apps/server/src/modules/authentication/errors/end-session-endpoint-not-found.loggable-exception.ts index fe2b35bfb90..ace7ba7bacb 100644 --- a/apps/server/src/modules/authentication/errors/end-session-endpoint-not-found.loggable-exception.ts +++ b/apps/server/src/modules/authentication/errors/end-session-endpoint-not-found.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class EndSessionEndpointNotFoundLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly systemId: string) { diff --git a/apps/server/src/modules/authentication/errors/external-system-logout-failed.loggable-exception.ts b/apps/server/src/modules/authentication/errors/external-system-logout-failed.loggable-exception.ts index 87de7da97cc..e2b713e6e6a 100644 --- a/apps/server/src/modules/authentication/errors/external-system-logout-failed.loggable-exception.ts +++ b/apps/server/src/modules/authentication/errors/external-system-logout-failed.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { AxiosError } from 'axios'; export class ExternalSystemLogoutFailedLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/modules/authentication/errors/external-system-logout-is-disabled.loggable-exception.ts b/apps/server/src/modules/authentication/errors/external-system-logout-is-disabled.loggable-exception.ts index 38e48585d39..10dc2a72c7a 100644 --- a/apps/server/src/modules/authentication/errors/external-system-logout-is-disabled.loggable-exception.ts +++ b/apps/server/src/modules/authentication/errors/external-system-logout-is-disabled.loggable-exception.ts @@ -1,5 +1,5 @@ import { ForbiddenException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ExternalSystemLogoutIsDisabledLoggableException extends ForbiddenException implements Loggable { constructor() { diff --git a/apps/server/src/modules/authentication/errors/unauthorized.loggable-exception.ts b/apps/server/src/modules/authentication/errors/unauthorized.loggable-exception.ts index d28270f7896..96f1842acfa 100644 --- a/apps/server/src/modules/authentication/errors/unauthorized.loggable-exception.ts +++ b/apps/server/src/modules/authentication/errors/unauthorized.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnauthorizedException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class UnauthorizedLoggableException extends UnauthorizedException implements Loggable { constructor(private readonly username: string, private readonly systemId?: string) { diff --git a/apps/server/src/modules/authentication/helper/jwt-whitelist.adapter.ts b/apps/server/src/modules/authentication/helper/jwt-whitelist.adapter.ts index 8afa48e0131..81ec2c89264 100644 --- a/apps/server/src/modules/authentication/helper/jwt-whitelist.adapter.ts +++ b/apps/server/src/modules/authentication/helper/jwt-whitelist.adapter.ts @@ -1,6 +1,6 @@ +import { createRedisIdentifierFromJwtData, getRedisData, JwtRedisData } from '@imports-from-feathers'; import { CACHE_MANAGER } from '@nestjs/cache-manager'; import { Inject, Injectable } from '@nestjs/common'; -import { createRedisIdentifierFromJwtData, getRedisData, JwtRedisData } from '@src/imports-from-feathers'; import { Cache } from 'cache-manager'; @Injectable() diff --git a/apps/server/src/modules/authentication/loggable/account-not-found.loggable-exception.ts b/apps/server/src/modules/authentication/loggable/account-not-found.loggable-exception.ts index 3d1a76b3c7a..b58f1e27f58 100644 --- a/apps/server/src/modules/authentication/loggable/account-not-found.loggable-exception.ts +++ b/apps/server/src/modules/authentication/loggable/account-not-found.loggable-exception.ts @@ -1,7 +1,7 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class AccountNotFoundLoggableException extends BusinessError implements Loggable { constructor() { diff --git a/apps/server/src/modules/authentication/loggable/account-system-mismatch.loggable-exception.ts b/apps/server/src/modules/authentication/loggable/account-system-mismatch.loggable-exception.ts index 525abe10a77..0619f5f9df1 100644 --- a/apps/server/src/modules/authentication/loggable/account-system-mismatch.loggable-exception.ts +++ b/apps/server/src/modules/authentication/loggable/account-system-mismatch.loggable-exception.ts @@ -1,7 +1,7 @@ import { BadRequestException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class AccountSystemMismatchLoggableException extends BadRequestException implements Loggable { constructor(private readonly expectedSystemId?: EntityId, private readonly receivedSystemId?: EntityId) { diff --git a/apps/server/src/modules/authentication/loggable/invalid-token.loggable-exception.ts b/apps/server/src/modules/authentication/loggable/invalid-token.loggable-exception.ts index 04bf887b57d..bd03e53b015 100644 --- a/apps/server/src/modules/authentication/loggable/invalid-token.loggable-exception.ts +++ b/apps/server/src/modules/authentication/loggable/invalid-token.loggable-exception.ts @@ -1,6 +1,6 @@ import { BadRequestException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class InvalidTokenLoggableException extends BadRequestException implements Loggable { getLogMessage(): ErrorLogMessage { diff --git a/apps/server/src/modules/authentication/loggable/school-in-migration.loggable-exception.ts b/apps/server/src/modules/authentication/loggable/school-in-migration.loggable-exception.ts index 76f5baecb61..9a86379f568 100644 --- a/apps/server/src/modules/authentication/loggable/school-in-migration.loggable-exception.ts +++ b/apps/server/src/modules/authentication/loggable/school-in-migration.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class SchoolInMigrationLoggableException extends BusinessError implements Loggable { constructor() { diff --git a/apps/server/src/modules/authentication/loggable/shd-user-create-token.loggable.ts b/apps/server/src/modules/authentication/loggable/shd-user-create-token.loggable.ts index 3c3712bd5d1..f11a4614108 100644 --- a/apps/server/src/modules/authentication/loggable/shd-user-create-token.loggable.ts +++ b/apps/server/src/modules/authentication/loggable/shd-user-create-token.loggable.ts @@ -1,6 +1,6 @@ import { EntityId } from '@shared/domain/types'; -import { Loggable } from '@src/core/logger/interfaces'; -import { LogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { LogMessage } from '@core/logger/types'; export class ShdUserCreateTokenLoggable implements Loggable { constructor(private supportUserId: EntityId, private targetUserId: EntityId, private expiredIn: number) {} diff --git a/apps/server/src/modules/authentication/loggable/user-account-deactivated-exception.ts b/apps/server/src/modules/authentication/loggable/user-account-deactivated-exception.ts index 6966cbb4f81..a6e88a2e107 100644 --- a/apps/server/src/modules/authentication/loggable/user-account-deactivated-exception.ts +++ b/apps/server/src/modules/authentication/loggable/user-account-deactivated-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class UserAccountDeactivatedLoggableException extends BusinessError implements Loggable { constructor() { diff --git a/apps/server/src/modules/authentication/loggable/user-authenticated.loggable.ts b/apps/server/src/modules/authentication/loggable/user-authenticated.loggable.ts index 58045c197b1..4bd18b2d9d6 100644 --- a/apps/server/src/modules/authentication/loggable/user-authenticated.loggable.ts +++ b/apps/server/src/modules/authentication/loggable/user-authenticated.loggable.ts @@ -1,5 +1,5 @@ -import { Loggable } from '@src/core/logger/interfaces'; -import { LogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { LogMessage } from '@core/logger/types'; export class UserAuthenticatedLoggable implements Loggable { getLogMessage(): LogMessage { diff --git a/apps/server/src/modules/authentication/loggable/user-could-not-be-authenticated.loggable.exception.ts b/apps/server/src/modules/authentication/loggable/user-could-not-be-authenticated.loggable.exception.ts index 91e8e8c6219..af0473423bc 100644 --- a/apps/server/src/modules/authentication/loggable/user-could-not-be-authenticated.loggable.exception.ts +++ b/apps/server/src/modules/authentication/loggable/user-could-not-be-authenticated.loggable.exception.ts @@ -1,7 +1,7 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class LdapUserCouldNotBeAuthenticatedLoggableException extends BusinessError implements Loggable { constructor(private readonly error: Error) { diff --git a/apps/server/src/modules/authentication/services/authentication.service.spec.ts b/apps/server/src/modules/authentication/services/authentication.service.spec.ts index 06daf10162f..63077d81acb 100644 --- a/apps/server/src/modules/authentication/services/authentication.service.spec.ts +++ b/apps/server/src/modules/authentication/services/authentication.service.spec.ts @@ -13,7 +13,7 @@ import { UnauthorizedException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { JwtService } from '@nestjs/jwt'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { axiosErrorFactory } from '@testing/factory/axios-error.factory'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { currentUserFactory } from '@testing/factory/currentuser.factory'; diff --git a/apps/server/src/modules/authentication/services/authentication.service.ts b/apps/server/src/modules/authentication/services/authentication.service.ts index 3e1ba0a4d34..50654412461 100644 --- a/apps/server/src/modules/authentication/services/authentication.service.ts +++ b/apps/server/src/modules/authentication/services/authentication.service.ts @@ -9,7 +9,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { JwtService, JwtSignOptions } from '@nestjs/jwt'; import { User } from '@shared/domain/entity'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { randomUUID } from 'crypto'; import jwt, { JwtPayload } from 'jsonwebtoken'; import { firstValueFrom } from 'rxjs'; diff --git a/apps/server/src/modules/authentication/services/ldap.service.spec.ts b/apps/server/src/modules/authentication/services/ldap.service.spec.ts index 46dc5e147f6..15981e1c06c 100644 --- a/apps/server/src/modules/authentication/services/ldap.service.spec.ts +++ b/apps/server/src/modules/authentication/services/ldap.service.spec.ts @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest'; import { System } from '@modules/system'; import { systemFactory } from '@modules/system/testing'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { LdapUserCouldNotBeAuthenticatedLoggableException } from '../loggable'; import { LdapService } from './ldap.service'; diff --git a/apps/server/src/modules/authentication/services/ldap.service.ts b/apps/server/src/modules/authentication/services/ldap.service.ts index fc56ad12325..5cf2ec2179d 100644 --- a/apps/server/src/modules/authentication/services/ldap.service.ts +++ b/apps/server/src/modules/authentication/services/ldap.service.ts @@ -1,6 +1,6 @@ import type { System } from '@modules/system'; import { Injectable, UnauthorizedException } from '@nestjs/common'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Client, createClient } from 'ldapjs'; import { LdapConnectionError } from '../errors/ldap-connection.error'; import { LdapUserCouldNotBeAuthenticatedLoggableException, UserAuthenticatedLoggable } from '../loggable'; diff --git a/apps/server/src/modules/authentication/strategy/ldap.strategy.spec.ts b/apps/server/src/modules/authentication/strategy/ldap.strategy.spec.ts index 3b47b22107a..539f21f629f 100644 --- a/apps/server/src/modules/authentication/strategy/ldap.strategy.spec.ts +++ b/apps/server/src/modules/authentication/strategy/ldap.strategy.spec.ts @@ -11,7 +11,7 @@ import { LegacySchoolDo } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { RoleName } from '@shared/domain/interface'; import { LegacySchoolRepo, UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { legacySchoolDoFactory } from '@testing/factory/domainobject'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { userFactory } from '@testing/factory/user.factory'; diff --git a/apps/server/src/modules/authentication/strategy/ldap.strategy.ts b/apps/server/src/modules/authentication/strategy/ldap.strategy.ts index a80d909dda2..4ee8a7904f7 100644 --- a/apps/server/src/modules/authentication/strategy/ldap.strategy.ts +++ b/apps/server/src/modules/authentication/strategy/ldap.strategy.ts @@ -5,8 +5,8 @@ import { Injectable, UnauthorizedException } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { LegacySchoolDo } from '@shared/domain/domainobject'; import { LegacySchoolRepo, UserRepo } from '@shared/repo'; -import { ErrorLoggable } from '@src/core/error/loggable/error.loggable'; -import { Logger } from '@src/core/logger'; +import { ErrorLoggable } from '@core/error/loggable/error.loggable'; +import { Logger } from '@core/logger'; import { Strategy } from 'passport-custom'; import { TypeGuard } from '@shared/common'; import { LdapAuthorizationBodyParams } from '../controllers/dto'; diff --git a/apps/server/src/modules/authentication/uc/logout.uc.spec.ts b/apps/server/src/modules/authentication/uc/logout.uc.spec.ts index c17ed65c193..f9f750715c8 100644 --- a/apps/server/src/modules/authentication/uc/logout.uc.spec.ts +++ b/apps/server/src/modules/authentication/uc/logout.uc.spec.ts @@ -7,8 +7,8 @@ import { systemFactory } from '@modules/system/testing'; import { BadRequestException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { ErrorLoggable } from '@src/core/error/loggable'; -import { Logger } from '@src/core/logger'; +import { ErrorLoggable } from '@core/error/loggable'; +import { Logger } from '@core/logger'; import { currentUserFactory } from '@testing/factory/currentuser.factory'; import { JwtTestFactory } from '@testing/factory/jwt.test.factory'; import { ExternalSystemLogoutIsDisabledLoggableException } from '../errors'; diff --git a/apps/server/src/modules/authentication/uc/logout.uc.ts b/apps/server/src/modules/authentication/uc/logout.uc.ts index 0cf663b4f0a..398572c8fad 100644 --- a/apps/server/src/modules/authentication/uc/logout.uc.ts +++ b/apps/server/src/modules/authentication/uc/logout.uc.ts @@ -1,7 +1,7 @@ import { Account } from '@modules/account'; import { BadRequestException, Injectable } from '@nestjs/common'; -import { ErrorLoggable } from '@src/core/error/loggable'; -import { Logger } from '@src/core/logger'; +import { ErrorLoggable } from '@core/error/loggable'; +import { Logger } from '@core/logger'; import { ICurrentUser } from '@infra/auth-guard'; import { System, SystemService } from '@modules/system'; import { OauthSessionToken, OauthSessionTokenService } from '@modules/oauth'; diff --git a/apps/server/src/modules/authorization-reference/authorization-reference.config.ts b/apps/server/src/modules/authorization-reference/authorization-reference.config.ts index 8abda97c8d1..27ada50e350 100644 --- a/apps/server/src/modules/authorization-reference/authorization-reference.config.ts +++ b/apps/server/src/modules/authorization-reference/authorization-reference.config.ts @@ -1,3 +1,3 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface AuthorizationReferenceConfig extends LoggerConfig {} diff --git a/apps/server/src/modules/authorization-reference/authorization-reference.module.ts b/apps/server/src/modules/authorization-reference/authorization-reference.module.ts index 817dc754ed8..28a275e7eec 100644 --- a/apps/server/src/modules/authorization-reference/authorization-reference.module.ts +++ b/apps/server/src/modules/authorization-reference/authorization-reference.module.ts @@ -1,7 +1,7 @@ import { InstanceModule } from '@modules/instance'; import { Module } from '@nestjs/common'; import { CourseGroupRepo, CourseRepo, LegacySchoolRepo, SubmissionRepo, TaskRepo, UserRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { AuthorizationModule } from '@modules/authorization'; import { AuthorizationReferenceService, ReferenceLoader } from './domain'; diff --git a/apps/server/src/modules/authorization/authorization.config.ts b/apps/server/src/modules/authorization/authorization.config.ts index af29e70dbdf..5a28e198218 100644 --- a/apps/server/src/modules/authorization/authorization.config.ts +++ b/apps/server/src/modules/authorization/authorization.config.ts @@ -1,3 +1,3 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface AuthorizationConfig extends LoggerConfig {} diff --git a/apps/server/src/modules/authorization/authorization.module.ts b/apps/server/src/modules/authorization/authorization.module.ts index 73e6ad197ca..b9151b9fd94 100644 --- a/apps/server/src/modules/authorization/authorization.module.ts +++ b/apps/server/src/modules/authorization/authorization.module.ts @@ -1,7 +1,7 @@ import { FeathersModule } from '@infra/feathers'; import { Module } from '@nestjs/common'; import { UserRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { AuthorizationHelper, AuthorizationService, RuleManager, AuthorizationInjectionService } from './domain'; import { FeathersAuthorizationService, FeathersAuthProvider } from './feathers'; diff --git a/apps/server/src/modules/authorization/domain/error/forbidden.loggable-exception.ts b/apps/server/src/modules/authorization/domain/error/forbidden.loggable-exception.ts index 535fc67c692..67ece273f11 100644 --- a/apps/server/src/modules/authorization/domain/error/forbidden.loggable-exception.ts +++ b/apps/server/src/modules/authorization/domain/error/forbidden.loggable-exception.ts @@ -1,7 +1,7 @@ import { ForbiddenException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; import { AuthorizationContext } from '../type'; export class ForbiddenLoggableException extends ForbiddenException implements Loggable { diff --git a/apps/server/src/modules/board/board-api.module.ts b/apps/server/src/modules/board/board-api.module.ts index 693a5044990..59624e0fc3d 100644 --- a/apps/server/src/modules/board/board-api.module.ts +++ b/apps/server/src/modules/board/board-api.module.ts @@ -1,8 +1,10 @@ +import { LoggerModule } from '@core/logger'; import { AuthorizationModule } from '@modules/authorization'; +import { RoomMembershipModule } from '@modules/room-membership'; import { forwardRef, Module } from '@nestjs/common'; import { CourseRepo } from '@shared/repo/course'; -import { LoggerModule } from '@src/core/logger'; -import { RoomMembershipModule } from '@src/modules/room-membership'; +import { BoardContextApiHelperModule } from '../board-context'; +import { RoomModule } from '../room'; import { BoardModule } from './board.module'; import { BoardController, @@ -13,8 +15,6 @@ import { } from './controller'; import { BoardNodePermissionService } from './service'; import { BoardUc, CardUc, ColumnUc, ElementUc, SubmissionItemUc } from './uc'; -import { RoomModule } from '../room'; -import { BoardContextApiHelperModule } from '../board-context'; @Module({ imports: [ diff --git a/apps/server/src/modules/board/board-collaboration.app.module.ts b/apps/server/src/modules/board/board-collaboration.app.module.ts index 9c527e29d44..223fba15d06 100644 --- a/apps/server/src/modules/board/board-collaboration.app.module.ts +++ b/apps/server/src/modules/board/board-collaboration.app.module.ts @@ -1,3 +1,5 @@ +import { CoreModule } from '@core/core.module'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; import { MongoMemoryDatabaseModule } from '@infra/database'; import { RabbitMQWrapperModule } from '@infra/rabbitmq'; @@ -7,8 +9,6 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity/all-entities'; -import { CoreModule } from '@src/core'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import { AuthorizationModule } from '../authorization'; import { serverConfig } from '../server'; import { config } from './board-collaboration.config'; diff --git a/apps/server/src/modules/board/board-ws-api.module.ts b/apps/server/src/modules/board/board-ws-api.module.ts index 5e9821ecde6..40e6f1c2468 100644 --- a/apps/server/src/modules/board/board-ws-api.module.ts +++ b/apps/server/src/modules/board/board-ws-api.module.ts @@ -2,7 +2,7 @@ import { AuthorizationModule } from '@modules/authorization'; import { UserModule } from '@modules/user'; import { forwardRef, Module } from '@nestjs/common'; import { CourseRepo } from '@shared/repo/course'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { RoomMembershipModule } from '../room-membership'; import { BoardModule } from './board.module'; import { BoardCollaborationGateway } from './gateway/board-collaboration.gateway'; diff --git a/apps/server/src/modules/board/board.module.ts b/apps/server/src/modules/board/board.module.ts index 03f8dca192d..585ed59e801 100644 --- a/apps/server/src/modules/board/board.module.ts +++ b/apps/server/src/modules/board/board.module.ts @@ -9,7 +9,7 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; import { CourseRepo } from '@shared/repo/course'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { AuthorizationModule } from '../authorization'; import { RoomMembershipModule } from '../room-membership'; import { BoardNodeRule } from './authorisation/board-node.rule'; diff --git a/apps/server/src/modules/board/controller/api-test/board-update-title-in-room.api.spec.ts b/apps/server/src/modules/board/controller/api-test/board-update-title-in-room.api.spec.ts index 38ca8f4776a..d5c4a9d503c 100644 --- a/apps/server/src/modules/board/controller/api-test/board-update-title-in-room.api.spec.ts +++ b/apps/server/src/modules/board/controller/api-test/board-update-title-in-room.api.spec.ts @@ -1,13 +1,13 @@ import { EntityManager } from '@mikro-orm/mongodb'; +import { accountFactory } from '@modules/account/testing'; +import { GroupEntityTypes } from '@modules/group/entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; +import { roomEntityFactory } from '@modules/room/testing'; import { ServerTestModule } from '@modules/server/server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { ApiValidationError } from '@shared/common'; import { Permission, RoleName } from '@shared/domain/interface'; -import { accountFactory } from '@src/modules/account/testing'; -import { GroupEntityTypes } from '@src/modules/group/entity'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; -import { roomEntityFactory } from '@src/modules/room/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/board/controller/api-test/board-visibility-in-room.api.spec.ts b/apps/server/src/modules/board/controller/api-test/board-visibility-in-room.api.spec.ts index 6e397cbad00..dcad346497f 100644 --- a/apps/server/src/modules/board/controller/api-test/board-visibility-in-room.api.spec.ts +++ b/apps/server/src/modules/board/controller/api-test/board-visibility-in-room.api.spec.ts @@ -1,12 +1,12 @@ import { EntityManager } from '@mikro-orm/mongodb'; +import { accountFactory } from '@modules/account/testing'; +import { GroupEntityTypes } from '@modules/group/entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; +import { roomEntityFactory } from '@modules/room/testing'; import { ServerTestModule } from '@modules/server/server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; -import { accountFactory } from '@src/modules/account/testing'; -import { GroupEntityTypes } from '@src/modules/group/entity'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; -import { roomEntityFactory } from '@src/modules/room/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/board/loggable/media-board/invalid-board-type.loggable-exception.ts b/apps/server/src/modules/board/loggable/media-board/invalid-board-type.loggable-exception.ts index cc86268a8a9..aff19479c3c 100644 --- a/apps/server/src/modules/board/loggable/media-board/invalid-board-type.loggable-exception.ts +++ b/apps/server/src/modules/board/loggable/media-board/invalid-board-type.loggable-exception.ts @@ -1,6 +1,6 @@ import { BadRequestException } from '@nestjs/common'; import { Constructor, EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ColumnBoard, MediaBoard } from '../../domain'; export class InvalidBoardTypeLoggableException extends BadRequestException implements Loggable { diff --git a/apps/server/src/modules/board/loggable/media-board/media-board-element-already-exists-loggable-exception.ts b/apps/server/src/modules/board/loggable/media-board/media-board-element-already-exists-loggable-exception.ts index 79164e3703d..c956c17021b 100644 --- a/apps/server/src/modules/board/loggable/media-board/media-board-element-already-exists-loggable-exception.ts +++ b/apps/server/src/modules/board/loggable/media-board/media-board-element-already-exists-loggable-exception.ts @@ -1,6 +1,6 @@ import { BadRequestException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class MediaBoardElementAlreadyExistsLoggableException extends BadRequestException implements Loggable { constructor(private readonly mediaBoardId: EntityId, private readonly schoolExternalToolId: EntityId) { diff --git a/apps/server/src/modules/board/media-board-api.module.ts b/apps/server/src/modules/board/media-board-api.module.ts index 0f41b134cb4..766143dbc5d 100644 --- a/apps/server/src/modules/board/media-board-api.module.ts +++ b/apps/server/src/modules/board/media-board-api.module.ts @@ -1,7 +1,7 @@ import { AuthorizationModule } from '@modules/authorization'; import { UserLicenseModule } from '@modules/user-license'; import { forwardRef, Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { ToolModule } from '../tool'; import { BoardModule } from './board.module'; import { MediaBoardController, MediaElementController, MediaLineController } from './controller'; diff --git a/apps/server/src/modules/board/metrics/metrics.service.spec.ts b/apps/server/src/modules/board/metrics/metrics.service.spec.ts index dc3de9cd0c9..e21fa4d018b 100644 --- a/apps/server/src/modules/board/metrics/metrics.service.spec.ts +++ b/apps/server/src/modules/board/metrics/metrics.service.spec.ts @@ -1,7 +1,7 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; +import { UserService } from '@modules/user'; import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain/interface'; -import { UserService } from '@src/modules/user'; import { roleFactory } from '@testing/factory/role.factory'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { MetricsService } from './metrics.service'; diff --git a/apps/server/src/modules/board/metrics/metrics.service.ts b/apps/server/src/modules/board/metrics/metrics.service.ts index 99121a05290..14d875492c4 100644 --- a/apps/server/src/modules/board/metrics/metrics.service.ts +++ b/apps/server/src/modules/board/metrics/metrics.service.ts @@ -1,8 +1,8 @@ +import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { UserDO } from '@shared/domain/domainobject'; import { RoleName } from '@shared/domain/interface'; -import { UserService } from '@src/modules/user'; -import { Gauge, Summary, register, Counter } from 'prom-client'; +import { Counter, Gauge, Summary, register } from 'prom-client'; type ClientId = string; type Role = 'owner' | 'editor' | 'viewer'; diff --git a/apps/server/src/modules/board/service/column-board.service.spec.ts b/apps/server/src/modules/board/service/column-board.service.spec.ts index 5b0da8b87fe..64d59057a75 100644 --- a/apps/server/src/modules/board/service/column-board.service.spec.ts +++ b/apps/server/src/modules/board/service/column-board.service.spec.ts @@ -1,8 +1,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { ObjectId } from '@mikro-orm/mongodb'; +import { StorageLocation } from '@modules/files-storage/interface'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain/types'; -import { StorageLocation } from '@src/modules/files-storage/interface'; -import { ObjectId } from '@mikro-orm/mongodb'; import { CopyElementType, CopyStatus, CopyStatusEnum } from '../../copy-helper'; import { BoardExternalReference, BoardExternalReferenceType, ColumnBoard } from '../domain'; import { BoardNodeRepo } from '../repo'; diff --git a/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.spec.ts b/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.spec.ts index e4248daf5b5..141a01e23c5 100644 --- a/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.spec.ts +++ b/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.spec.ts @@ -11,7 +11,7 @@ import { } from '@modules/deletion'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; import { mediaBoardFactory } from '../../testing'; import { BoardNodeService } from '../board-node.service'; diff --git a/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.ts b/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.ts index 9ec1fde5598..2c05c54fccb 100644 --- a/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.ts +++ b/apps/server/src/modules/board/service/event/user-deleted-event-handler.service.ts @@ -14,7 +14,7 @@ import { import { Injectable } from '@nestjs/common'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { BoardExternalReferenceType, MediaBoard } from '../../domain'; import { BoardNodeService } from '../board-node.service'; import { MediaBoardService } from '../media-board/media-board.service'; diff --git a/apps/server/src/modules/board/service/internal/board-context.service.ts b/apps/server/src/modules/board/service/internal/board-context.service.ts index efb1e51ddf2..ac679bdfe65 100644 --- a/apps/server/src/modules/board/service/internal/board-context.service.ts +++ b/apps/server/src/modules/board/service/internal/board-context.service.ts @@ -1,8 +1,8 @@ +import { RoomMembershipService, UserWithRoomRoles } from '@modules/room-membership'; import { Injectable } from '@nestjs/common'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; import { CourseRepo } from '@shared/repo/course'; -import { RoomMembershipService, UserWithRoomRoles } from '@src/modules/room-membership'; import { AnyBoardNode, BoardExternalReferenceType, BoardRoles, UserWithBoardRoles } from '../../domain'; @Injectable() diff --git a/apps/server/src/modules/board/service/internal/board-node-copy-context.spec.ts b/apps/server/src/modules/board/service/internal/board-node-copy-context.spec.ts index c2e917b70cf..e97fb50fec4 100644 --- a/apps/server/src/modules/board/service/internal/board-node-copy-context.spec.ts +++ b/apps/server/src/modules/board/service/internal/board-node-copy-context.spec.ts @@ -1,8 +1,8 @@ import { createMock } from '@golevelup/ts-jest'; +import { FileRecordParentType } from '@infra/rabbitmq'; import { ObjectId } from '@mikro-orm/mongodb'; +import { FilesStorageClientAdapterService } from '@modules/files-storage-client'; import { StorageLocation } from '@modules/files-storage/interface'; -import { FileRecordParentType } from '@src/infra/rabbitmq'; -import { FilesStorageClientAdapterService } from '@src/modules/files-storage-client'; import { BoardNodeCopyContext, BoardNodeCopyContextProps } from './board-node-copy-context'; describe(BoardNodeCopyContext.name, () => { diff --git a/apps/server/src/modules/board/service/internal/board-node-copy-context.ts b/apps/server/src/modules/board/service/internal/board-node-copy-context.ts index d442cc35b7f..d09f7abb28c 100644 --- a/apps/server/src/modules/board/service/internal/board-node-copy-context.ts +++ b/apps/server/src/modules/board/service/internal/board-node-copy-context.ts @@ -1,8 +1,8 @@ +import { FileRecordParentType } from '@infra/rabbitmq'; import { FilesStorageClientAdapterService } from '@modules/files-storage-client'; import { CopyFileDto } from '@modules/files-storage-client/dto'; import { StorageLocation } from '@modules/files-storage/interface'; import { EntityId } from '@shared/domain/types'; -import { FileRecordParentType } from '@src/infra/rabbitmq'; import { CopyContext } from './board-node-copy.service'; export type StorageLocationReference = { diff --git a/apps/server/src/modules/board/service/internal/board-node-copy-general.service.spec.ts b/apps/server/src/modules/board/service/internal/board-node-copy-general.service.spec.ts index e1a61f1c06b..81265b9cf5e 100644 --- a/apps/server/src/modules/board/service/internal/board-node-copy-general.service.spec.ts +++ b/apps/server/src/modules/board/service/internal/board-node-copy-general.service.spec.ts @@ -1,13 +1,13 @@ import { createMock } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { CopyElementType, CopyHelperService, CopyStatus, CopyStatusEnum } from '@modules/copy-helper'; +import { FilesStorageClientAdapterService } from '@modules/files-storage-client'; import { StorageLocation } from '@modules/files-storage/interface'; import { ContextExternalToolService } from '@modules/tool/context-external-tool/service'; import { SchoolExternalToolService } from '@modules/tool/school-external-tool/service'; import { ToolConfig } from '@modules/tool/tool-config'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { FilesStorageClientAdapterService } from '@src/modules/files-storage-client'; import { setupEntities } from '@testing/setup-entities'; import { cardFactory, diff --git a/apps/server/src/modules/board/service/internal/board-node-delete-hooks.service.spec.ts b/apps/server/src/modules/board/service/internal/board-node-delete-hooks.service.spec.ts index febca79475a..70a8e50f23c 100644 --- a/apps/server/src/modules/board/service/internal/board-node-delete-hooks.service.spec.ts +++ b/apps/server/src/modules/board/service/internal/board-node-delete-hooks.service.spec.ts @@ -1,10 +1,10 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { TldrawClientAdapter } from '@infra/tldraw-client'; +import { CollaborativeTextEditorService } from '@modules/collaborative-text-editor'; +import { FilesStorageClientAdapterService } from '@modules/files-storage-client'; +import { ContextExternalToolService } from '@modules/tool/context-external-tool'; +import { contextExternalToolFactory } from '@modules/tool/context-external-tool/testing'; import { Test, TestingModule } from '@nestjs/testing'; -import { CollaborativeTextEditorService } from '@src/modules/collaborative-text-editor'; -import { FilesStorageClientAdapterService } from '@src/modules/files-storage-client'; -import { ContextExternalToolService } from '@src/modules/tool/context-external-tool'; -import { contextExternalToolFactory } from '@src/modules/tool/context-external-tool/testing'; import { setupEntities } from '@testing/setup-entities'; import { collaborativeTextEditorFactory, diff --git a/apps/server/src/modules/board/uc/board.uc.spec.ts b/apps/server/src/modules/board/uc/board.uc.spec.ts index 2df52e8d103..275981917d0 100644 --- a/apps/server/src/modules/board/uc/board.uc.spec.ts +++ b/apps/server/src/modules/board/uc/board.uc.spec.ts @@ -1,13 +1,13 @@ +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { Action, AuthorizationService } from '@modules/authorization'; +import { BoardContextApiHelperService } from '@modules/board-context'; +import { RoomService } from '@modules/room'; +import { RoomMembershipService } from '@modules/room-membership'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface'; import { CourseRepo } from '@shared/repo/course'; -import { LegacyLogger } from '@src/core/logger'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; -import { RoomService } from '@src/modules/room'; -import { RoomMembershipService } from '@src/modules/room-membership'; import { courseFactory } from '@testing/factory/course.factory'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/board/uc/board.uc.ts b/apps/server/src/modules/board/uc/board.uc.ts index cc5cf9a7b98..a0b8d0744fb 100644 --- a/apps/server/src/modules/board/uc/board.uc.ts +++ b/apps/server/src/modules/board/uc/board.uc.ts @@ -1,14 +1,14 @@ +import { LegacyLogger } from '@core/logger'; import { Action, AuthorizationService } from '@modules/authorization'; +import { BoardContextApiHelperService } from '@modules/board-context'; import { CopyStatus } from '@modules/copy-helper'; +import { StorageLocation } from '@modules/files-storage/interface'; +import { RoomService } from '@modules/room'; +import { RoomMembershipService } from '@modules/room-membership'; import { forwardRef, Inject, Injectable } from '@nestjs/common'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; import { CourseRepo } from '@shared/repo/course'; -import { LegacyLogger } from '@src/core/logger'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; -import { StorageLocation } from '@src/modules/files-storage/interface'; -import { RoomService } from '@src/modules/room'; -import { RoomMembershipService } from '@src/modules/room-membership'; import { CreateBoardBodyParams } from '../controller/dto'; import { BoardExternalReference, diff --git a/apps/server/src/modules/board/uc/card.uc.spec.ts b/apps/server/src/modules/board/uc/card.uc.spec.ts index 4533f5e95cd..a8308d88b98 100644 --- a/apps/server/src/modules/board/uc/card.uc.spec.ts +++ b/apps/server/src/modules/board/uc/card.uc.spec.ts @@ -1,7 +1,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Action, AuthorizationService } from '@modules/authorization'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import { BoardNodeAuthorizable, BoardNodeFactory, Card, ContentElementType } from '../domain'; diff --git a/apps/server/src/modules/board/uc/card.uc.ts b/apps/server/src/modules/board/uc/card.uc.ts index 6ab2f392766..b3e11e03253 100644 --- a/apps/server/src/modules/board/uc/card.uc.ts +++ b/apps/server/src/modules/board/uc/card.uc.ts @@ -1,7 +1,7 @@ import { Action, AuthorizationContext, AuthorizationService } from '@modules/authorization'; import { forwardRef, Inject, Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { AnyBoardNode, AnyContentElement, BoardNodeFactory, Card, ContentElementType } from '../domain'; import { BoardNodeAuthorizableService, BoardNodePermissionService, BoardNodeService } from '../service'; diff --git a/apps/server/src/modules/board/uc/column.uc.spec.ts b/apps/server/src/modules/board/uc/column.uc.spec.ts index 83f6c4baf4c..943674740e1 100644 --- a/apps/server/src/modules/board/uc/column.uc.spec.ts +++ b/apps/server/src/modules/board/uc/column.uc.spec.ts @@ -1,7 +1,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Action } from '@modules/authorization'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import { BoardNodeFactory, Card, Column, ContentElementType } from '../domain'; diff --git a/apps/server/src/modules/board/uc/column.uc.ts b/apps/server/src/modules/board/uc/column.uc.ts index 3f95c69cdbd..c2d628147b0 100644 --- a/apps/server/src/modules/board/uc/column.uc.ts +++ b/apps/server/src/modules/board/uc/column.uc.ts @@ -1,7 +1,7 @@ import { Action } from '@modules/authorization'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { BoardNodeFactory, Card, Column, ContentElementType } from '../domain'; import { BoardNodePermissionService, BoardNodeService } from '../service'; diff --git a/apps/server/src/modules/board/uc/element.uc.spec.ts b/apps/server/src/modules/board/uc/element.uc.spec.ts index 1ab2c4347ba..6519133f699 100644 --- a/apps/server/src/modules/board/uc/element.uc.spec.ts +++ b/apps/server/src/modules/board/uc/element.uc.spec.ts @@ -3,7 +3,7 @@ import { Action } from '@modules/authorization'; import { HttpService } from '@nestjs/axios'; import { Test, TestingModule } from '@nestjs/testing'; import { InputFormat } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import { RichTextContentBody } from '../controller/dto'; diff --git a/apps/server/src/modules/board/uc/element.uc.ts b/apps/server/src/modules/board/uc/element.uc.ts index 0d07c9c468c..2d27641e29b 100644 --- a/apps/server/src/modules/board/uc/element.uc.ts +++ b/apps/server/src/modules/board/uc/element.uc.ts @@ -1,7 +1,7 @@ import { Action } from '@modules/authorization'; import { ForbiddenException, Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { AnyElementContentBody } from '../controller/dto'; import { AnyContentElement, diff --git a/apps/server/src/modules/class/class.module.ts b/apps/server/src/modules/class/class.module.ts index d7b7b12873c..9a6027926b8 100644 --- a/apps/server/src/modules/class/class.module.ts +++ b/apps/server/src/modules/class/class.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CqrsModule } from '@nestjs/cqrs'; import { ClassService } from './service'; import { ClassesRepo } from './repo'; diff --git a/apps/server/src/modules/class/service/class.service.spec.ts b/apps/server/src/modules/class/service/class.service.spec.ts index 116e82a022d..98cc4c80b28 100644 --- a/apps/server/src/modules/class/service/class.service.spec.ts +++ b/apps/server/src/modules/class/service/class.service.spec.ts @@ -14,7 +14,7 @@ import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; import { Class } from '../domain'; import { classFactory } from '../domain/testing'; diff --git a/apps/server/src/modules/class/service/class.service.ts b/apps/server/src/modules/class/service/class.service.ts index c2cf861ea40..fe170771bde 100644 --- a/apps/server/src/modules/class/service/class.service.ts +++ b/apps/server/src/modules/class/service/class.service.ts @@ -15,7 +15,7 @@ import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Class } from '../domain'; import { ClassesRepo } from '../repo'; 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 a654ff86bdc..6bfff10a324 100644 --- a/apps/server/src/modules/collaborative-storage/collaborative-storage.module.ts +++ b/apps/server/src/modules/collaborative-storage/collaborative-storage.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { CollaborativeStorageAdapterModule } from '@infra/collaborative-storage'; import { TeamsRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { AuthorizationModule } from '@modules/authorization'; import { RoleModule } from '@modules/role'; import { CollaborativeStorageService } from './services'; diff --git a/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.spec.ts b/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.spec.ts index 5573a026e4c..ad428a111b3 100644 --- a/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.spec.ts +++ b/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.spec.ts @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest'; import { CollaborativeStorageController } from '@modules/collaborative-storage/controller/collaborative-storage.controller'; import { CollaborativeStorageUc } from '@modules/collaborative-storage/uc/collaborative-storage.uc'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { currentUserFactory } from '@testing/factory/currentuser.factory'; describe('CollaborativeStorage Controller', () => { diff --git a/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.ts b/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.ts index df17fb7abc3..565c86d412b 100644 --- a/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.ts +++ b/apps/server/src/modules/collaborative-storage/controller/collaborative-storage.controller.ts @@ -1,7 +1,7 @@ import { CurrentUser, ICurrentUser, JwtAuthentication } from '@infra/auth-guard'; import { Body, Controller, Param, Patch } from '@nestjs/common'; import { ApiResponse, ApiTags } from '@nestjs/swagger'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { CollaborativeStorageUc } from '../uc/collaborative-storage.uc'; import { TeamPermissionsBody } from './dto/team-permissions.body.params'; import { TeamRoleDto } from './dto/team-role.params'; 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 5063f10f63e..a4f9453474f 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 @@ -11,7 +11,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { TeamEntity } from '@shared/domain/entity'; import { RoleName } from '@shared/domain/interface'; import { TeamsRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { teamFactory } from '@testing/factory/team.factory'; import { setupEntities } from '@testing/setup-entities'; import { TeamDto } from './dto/team.dto'; 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 b5fdf8426c3..fc6bdea7ae3 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 @@ -5,7 +5,7 @@ import { Injectable } from '@nestjs/common'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; import { TeamsRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { TeamMapper } from '../mapper/team.mapper'; import { TeamPermissionsDto } from './dto/team-permissions.dto'; import { TeamDto } from './dto/team.dto'; diff --git a/apps/server/src/modules/collaborative-text-editor/api/tests/delete-sessions.api.spec.ts b/apps/server/src/modules/collaborative-text-editor/api/tests/delete-sessions.api.spec.ts index 895d3f75a35..f64d65e5a7c 100644 --- a/apps/server/src/modules/collaborative-text-editor/api/tests/delete-sessions.api.spec.ts +++ b/apps/server/src/modules/collaborative-text-editor/api/tests/delete-sessions.api.spec.ts @@ -1,9 +1,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { EtherpadClientAdapter } from '@infra/etherpad-client'; import { EntityManager } from '@mikro-orm/mongodb'; +import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { EtherpadClientAdapter } from '@src/infra/etherpad-client'; -import { ServerTestModule } from '@src/modules/server'; import { cleanupCollections } from '@testing/cleanup-collections'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; import { TestApiClient } from '@testing/test-api-client'; diff --git a/apps/server/src/modules/collaborative-text-editor/api/tests/get-collaborative-text-editor.api.spec.ts b/apps/server/src/modules/collaborative-text-editor/api/tests/get-collaborative-text-editor.api.spec.ts index cb29c7c06b2..3fc8d10a44d 100644 --- a/apps/server/src/modules/collaborative-text-editor/api/tests/get-collaborative-text-editor.api.spec.ts +++ b/apps/server/src/modules/collaborative-text-editor/api/tests/get-collaborative-text-editor.api.spec.ts @@ -1,17 +1,17 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Configuration } from '@hpi-schul-cloud/commons/lib'; +import { EtherpadClientAdapter } from '@infra/etherpad-client'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; -import { HttpStatus, INestApplication } from '@nestjs/common'; -import { Test } from '@nestjs/testing'; -import { EtherpadClientAdapter } from '@src/infra/etherpad-client'; -import { BoardExternalReferenceType } from '@src/modules/board'; +import { BoardExternalReferenceType } from '@modules/board'; import { cardEntityFactory, collaborativeTextEditorEntityFactory, columnBoardEntityFactory, columnEntityFactory, -} from '@src/modules/board/testing'; -import { ServerTestModule } from '@src/modules/server'; +} from '@modules/board/testing'; +import { ServerTestModule } from '@modules/server'; +import { HttpStatus, INestApplication } from '@nestjs/common'; +import { Test } from '@nestjs/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { courseFactory } from '@testing/factory/course.factory'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; diff --git a/apps/server/src/modules/collaborative-text-editor/collaborative-text-editor.module.ts b/apps/server/src/modules/collaborative-text-editor/collaborative-text-editor.module.ts index d077d2b1fc0..4e412836bbe 100644 --- a/apps/server/src/modules/collaborative-text-editor/collaborative-text-editor.module.ts +++ b/apps/server/src/modules/collaborative-text-editor/collaborative-text-editor.module.ts @@ -1,6 +1,6 @@ +import { LoggerModule } from '@core/logger'; +import { EtherpadClientModule } from '@infra/etherpad-client'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; -import { EtherpadClientModule } from '@src/infra/etherpad-client'; import { etherpadClientConfig } from './config'; import { CollaborativeTextEditorService } from './service/collaborative-text-editor.service'; diff --git a/apps/server/src/modules/collaborative-text-editor/config.ts b/apps/server/src/modules/collaborative-text-editor/config.ts index c695241e89c..a119416a48f 100644 --- a/apps/server/src/modules/collaborative-text-editor/config.ts +++ b/apps/server/src/modules/collaborative-text-editor/config.ts @@ -1,5 +1,5 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; -import { EtherpadClientConfig } from '@src/infra/etherpad-client'; +import { EtherpadClientConfig } from '@infra/etherpad-client'; export const etherpadClientConfig: EtherpadClientConfig = { apiKey: Configuration.has('ETHERPAD__API_KEY') ? (Configuration.get('ETHERPAD__API_KEY') as string) : undefined, diff --git a/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.spec.ts b/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.spec.ts index c063de3b820..c8a9c384d82 100644 --- a/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.spec.ts +++ b/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.spec.ts @@ -1,8 +1,8 @@ +import { Logger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { EtherpadClientAdapter } from '@infra/etherpad-client'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; -import { EtherpadClientAdapter } from '@src/infra/etherpad-client'; import { CollaborativeTextEditorParentType } from '../api/dto/get-collaborative-text-editor-for-parent.params'; import { CollaborativeTextEditorService } from './collaborative-text-editor.service'; diff --git a/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.ts b/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.ts index 477538a32b1..ed31d7b794f 100644 --- a/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.ts +++ b/apps/server/src/modules/collaborative-text-editor/service/collaborative-text-editor.service.ts @@ -1,8 +1,8 @@ +import { Logger } from '@core/logger'; +import { EtherpadClientAdapter } from '@infra/etherpad-client'; +import { ServerConfig } from '@modules/server'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Logger } from '@src/core/logger'; -import { EtherpadClientAdapter } from '@src/infra/etherpad-client'; -import { ServerConfig } from '@src/modules/server'; import { GetCollaborativeTextEditorForParentParams } from '../api/dto/get-collaborative-text-editor-for-parent.params'; import { CollaborativeTextEditor } from '../domain/do/collaborative-text-editor'; diff --git a/apps/server/src/modules/common-cartridge/common-cartridge-api.app.module.ts b/apps/server/src/modules/common-cartridge/common-cartridge-api.app.module.ts index 9dd00c7efd6..6ec0feebe14 100644 --- a/apps/server/src/modules/common-cartridge/common-cartridge-api.app.module.ts +++ b/apps/server/src/modules/common-cartridge/common-cartridge-api.app.module.ts @@ -1,10 +1,10 @@ +import { CoreModule } from '@core/core.module'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; import { AuthorizationClientModule } from '@infra/authorization-client'; import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { CoreModule } from '@src/core'; import { authorizationClientConfig } from '../files-storage/files-storage.config'; import { config } from './common-cartridge.config'; import { CommonCartridgeModule } from './common-cartridge.module'; diff --git a/apps/server/src/modules/common-cartridge/common-cartridge.config.ts b/apps/server/src/modules/common-cartridge/common-cartridge.config.ts index f5e137acd62..5ed7aea6556 100644 --- a/apps/server/src/modules/common-cartridge/common-cartridge.config.ts +++ b/apps/server/src/modules/common-cartridge/common-cartridge.config.ts @@ -1,5 +1,5 @@ import { Configuration } from '@hpi-schul-cloud/commons'; -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; import { JwtAuthGuardConfig } from '@infra/auth-guard'; import { CoursesClientConfig } from '@infra/courses-client'; import { Algorithm } from 'jsonwebtoken'; diff --git a/apps/server/src/modules/common-cartridge/common-cartridge.module.ts b/apps/server/src/modules/common-cartridge/common-cartridge.module.ts index 8b85c34fedc..15cb37295d1 100644 --- a/apps/server/src/modules/common-cartridge/common-cartridge.module.ts +++ b/apps/server/src/modules/common-cartridge/common-cartridge.module.ts @@ -1,11 +1,11 @@ import { Configuration } from '@hpi-schul-cloud/commons'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { CoursesClientModule } from '@infra/courses-client'; +import { RabbitMQWrapperModule } from '@infra/rabbitmq'; import { MikroOrmModule } from '@mikro-orm/nestjs'; import { Module } from '@nestjs/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; -import { RabbitMQWrapperModule } from '@src/infra/rabbitmq'; import { BoardClientModule } from './common-cartridge-client/board-client'; import { CardClientModule } from './common-cartridge-client/card-client/card-client.module'; import { LessonClientModule } from './common-cartridge-client/lesson-client/lesson-client.module'; diff --git a/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.api.spec.ts b/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.api.spec.ts index a32c37010aa..a1f118c50f2 100644 --- a/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.api.spec.ts +++ b/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.api.spec.ts @@ -1,10 +1,10 @@ import { faker } from '@faker-js/faker'; import { createMock } from '@golevelup/ts-jest'; import { ICurrentUser } from '@infra/auth-guard'; +import { CoursesApi } from '@infra/courses-client/generated'; import { INestApplication } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { CoursesApi } from '@src/infra/courses-client/generated'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import supertest from 'supertest'; import { CommonCartridgeApiModule } from '../common-cartridge-api.app.module'; diff --git a/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts b/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts index 0cf98875a0d..b08c72561c2 100644 --- a/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts +++ b/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts @@ -1,3 +1,4 @@ +import { CurrentUser, ICurrentUser, JwtAuthentication } from '@infra/auth-guard'; import { Body, Controller, @@ -9,6 +10,7 @@ import { UploadedFile, UseInterceptors, } from '@nestjs/common'; +import { FileInterceptor } from '@nestjs/platform-express'; import { ApiBadRequestResponse, ApiBody, @@ -21,10 +23,8 @@ import { ApiUnauthorizedResponse, } from '@nestjs/swagger'; import { Response } from 'express'; -import { FileInterceptor } from '@nestjs/platform-express'; -import { JwtAuthentication, CurrentUser, ICurrentUser } from '@src/infra/auth-guard'; import { CommonCartridgeUc } from '../uc/common-cartridge.uc'; -import { ExportCourseParams, CourseQueryParams, CourseExportBodyParams, CommonCartridgeImportBodyParams } from './dto'; +import { CommonCartridgeImportBodyParams, CourseExportBodyParams, CourseQueryParams, ExportCourseParams } from './dto'; import { CommonCartridgeFileValidatorPipe } from './utils'; @JwtAuthentication() diff --git a/apps/server/src/modules/common-cartridge/export/errors/element-type-not-supported.loggable-exception.ts b/apps/server/src/modules/common-cartridge/export/errors/element-type-not-supported.loggable-exception.ts index 19dd0ff941d..6cad565366b 100644 --- a/apps/server/src/modules/common-cartridge/export/errors/element-type-not-supported.loggable-exception.ts +++ b/apps/server/src/modules/common-cartridge/export/errors/element-type-not-supported.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { CommonCartridgeErrorEnum } from './error.enums'; export class ElementTypeNotSupportedLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/modules/common-cartridge/export/errors/intended-use-not-supported.loggable-exception.ts b/apps/server/src/modules/common-cartridge/export/errors/intended-use-not-supported.loggable-exception.ts index 5259bd517f1..d4922bc22ec 100644 --- a/apps/server/src/modules/common-cartridge/export/errors/intended-use-not-supported.loggable-exception.ts +++ b/apps/server/src/modules/common-cartridge/export/errors/intended-use-not-supported.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { CommonCartridgeErrorEnum } from './error.enums'; export class IntendedUseNotSupportedLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/modules/common-cartridge/export/errors/missing-metadata.loggable-exception.ts b/apps/server/src/modules/common-cartridge/export/errors/missing-metadata.loggable-exception.ts index 9ee3d6bcff0..33bbed75c16 100644 --- a/apps/server/src/modules/common-cartridge/export/errors/missing-metadata.loggable-exception.ts +++ b/apps/server/src/modules/common-cartridge/export/errors/missing-metadata.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { CommonCartridgeErrorEnum } from './error.enums'; export class MissingMetadataLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/modules/common-cartridge/export/errors/resource-type-not-supported.loggable-exception.ts b/apps/server/src/modules/common-cartridge/export/errors/resource-type-not-supported.loggable-exception.ts index 4d9d9d8a8e1..ad45eedcede 100644 --- a/apps/server/src/modules/common-cartridge/export/errors/resource-type-not-supported.loggable-exception.ts +++ b/apps/server/src/modules/common-cartridge/export/errors/resource-type-not-supported.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { CommonCartridgeErrorEnum } from './error.enums'; export class ResourceTypeNotSupportedLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/modules/common-cartridge/export/errors/version-not-supported.loggable-exception.ts b/apps/server/src/modules/common-cartridge/export/errors/version-not-supported.loggable-exception.ts index bb22519217e..0b31f428f07 100644 --- a/apps/server/src/modules/common-cartridge/export/errors/version-not-supported.loggable-exception.ts +++ b/apps/server/src/modules/common-cartridge/export/errors/version-not-supported.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; import { CommonCartridgeErrorEnum } from './error.enums'; export class VersionNotSupportedLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-manifest-not-found.exception.ts b/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-manifest-not-found.exception.ts index 473d56515c4..deb36deb6df 100644 --- a/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-manifest-not-found.exception.ts +++ b/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-manifest-not-found.exception.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class CommonCartridgeManifestNotFoundException extends BadRequestException implements Loggable { constructor() { diff --git a/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-resource-not-found.exception.ts b/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-resource-not-found.exception.ts index b5f2b4ed221..3fc41c5289d 100644 --- a/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-resource-not-found.exception.ts +++ b/apps/server/src/modules/common-cartridge/import/utils/common-cartridge-resource-not-found.exception.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class CommonCartridgeResourceNotFoundException extends BadRequestException implements Loggable { constructor() { diff --git a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts index 7ad2b5d7b36..5d5decd3ee3 100644 --- a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts +++ b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts @@ -1,27 +1,25 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; +import { CoursesClientAdapter } from '@infra/courses-client'; +import { CourseCommonCartridgeMetadataDto } from '@infra/courses-client/dto'; import { FilesStorageClientAdapterService } from '@modules/files-storage-client'; import { Test, TestingModule } from '@nestjs/testing'; import AdmZip from 'adm-zip'; -import { CoursesClientAdapter } from '@infra/courses-client'; -import { CourseCommonCartridgeMetadataDto } from '@src/infra/courses-client/dto'; import { BoardClientAdapter, BoardSkeletonDto } from '../common-cartridge-client/board-client'; -import { CommonCartridgeExportService } from './common-cartridge-export.service'; -import { CourseRoomsClientAdapter } from '../common-cartridge-client/room-client'; import { CardClientAdapter } from '../common-cartridge-client/card-client/card-client.adapter'; +import { + CardListResponseDto, + LinkElementContentDto, + RichTextElementContentDto, +} from '../common-cartridge-client/card-client/dto'; import { LessonClientAdapter } from '../common-cartridge-client/lesson-client/lesson-client.adapter'; -import { CommonCartridgeExportMapper } from './common-cartridge.mapper'; -import { CommonCartridgeVersion } from '../export/common-cartridge.enums'; +import { CourseRoomsClientAdapter } from '../common-cartridge-client/room-client'; import { - RoomBoardDto, - BoardTaskDto, - BoardLessonDto, BoardColumnBoardDto, + BoardLessonDto, + BoardTaskDto, + RoomBoardDto, } from '../common-cartridge-client/room-client/dto'; -import { - RichTextElementContentDto, - LinkElementContentDto, - CardListResponseDto, -} from '../common-cartridge-client/card-client/dto'; +import { CommonCartridgeVersion } from '../export/common-cartridge.enums'; import { boardCloumnBoardFactory, boardLessonFactory, @@ -32,6 +30,8 @@ import { listOfCardResponseFactory, roomFactory, } from '../testing/common-cartridge-dtos.factory'; +import { CommonCartridgeExportService } from './common-cartridge-export.service'; +import { CommonCartridgeExportMapper } from './common-cartridge.mapper'; describe('CommonCartridgeExportService', () => { let module: TestingModule; diff --git a/apps/server/src/modules/deletion-console/deletion-client/deletion.client.ts b/apps/server/src/modules/deletion-console/deletion-client/deletion.client.ts index 374169050cc..f18fd181ade 100644 --- a/apps/server/src/modules/deletion-console/deletion-client/deletion.client.ts +++ b/apps/server/src/modules/deletion-console/deletion-client/deletion.client.ts @@ -1,7 +1,7 @@ import { HttpService } from '@nestjs/axios'; import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { firstValueFrom } from 'rxjs'; import { AxiosResponse, HttpStatusCode } from 'axios'; import { DeletionRequestInput, DeletionRequestOutput } from './interface'; diff --git a/apps/server/src/modules/deletion-console/deletion-console.app.module.ts b/apps/server/src/modules/deletion-console/deletion-console.app.module.ts index 559e7dd6eac..a6d50aaee5a 100644 --- a/apps/server/src/modules/deletion-console/deletion-console.app.module.ts +++ b/apps/server/src/modules/deletion-console/deletion-console.app.module.ts @@ -1,3 +1,4 @@ +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { ConsoleWriterModule } from '@infra/console'; import { MikroOrmModule } from '@mikro-orm/nestjs'; import { AccountModule } from '@modules/account'; @@ -8,7 +9,6 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import { ConsoleModule } from 'nestjs-console'; import { FileEntity } from '../files/entity'; import { DeletionClient } from './deletion-client'; diff --git a/apps/server/src/modules/deletion/api/controller/api-test/deletion-executions.api.spec.ts b/apps/server/src/modules/deletion/api/controller/api-test/deletion-executions.api.spec.ts index 4921c07640c..7a3b20cb42d 100644 --- a/apps/server/src/modules/deletion/api/controller/api-test/deletion-executions.api.spec.ts +++ b/apps/server/src/modules/deletion/api/controller/api-test/deletion-executions.api.spec.ts @@ -1,6 +1,6 @@ import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { TestApiClient } from '@testing/test-api-client'; const baseRouteName = '/deletionExecutions'; diff --git a/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-create.api.spec.ts b/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-create.api.spec.ts index 801557318ad..53d5fc2af4f 100644 --- a/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-create.api.spec.ts +++ b/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-create.api.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; import { TestApiClient } from '@testing/test-api-client'; import { DomainName } from '../../../domain/types'; import { DeletionRequestEntity } from '../../../repo/entity'; diff --git a/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-delete.api.spec.ts b/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-delete.api.spec.ts index 8f8c67507d3..1bb5e54d882 100644 --- a/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-delete.api.spec.ts +++ b/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-delete.api.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { cleanupCollections } from '@testing/cleanup-collections'; import { TestApiClient } from '@testing/test-api-client'; import { DeletionRequestEntity } from '../../../repo/entity'; diff --git a/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-find.api.spec.ts b/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-find.api.spec.ts index b944e61260d..42196b14d5f 100644 --- a/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-find.api.spec.ts +++ b/apps/server/src/modules/deletion/api/controller/api-test/deletion-request-find.api.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/mongodb'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; import { cleanupCollections } from '@testing/cleanup-collections'; import { TestApiClient } from '@testing/test-api-client'; import { deletionRequestEntityFactory } from '../../../repo/entity/testing'; diff --git a/apps/server/src/modules/deletion/api/uc/deletion-request.uc.spec.ts b/apps/server/src/modules/deletion/api/uc/deletion-request.uc.spec.ts index bf791609047..fbbb8e65721 100644 --- a/apps/server/src/modules/deletion/api/uc/deletion-request.uc.spec.ts +++ b/apps/server/src/modules/deletion/api/uc/deletion-request.uc.spec.ts @@ -4,7 +4,7 @@ import { ConfigModule } from '@nestjs/config'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { createConfigModuleOptions } from '@shared/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; import { ObjectId } from 'bson'; import { DomainDeletionReportBuilder, DomainOperationReportBuilder } from '../../domain/builder'; diff --git a/apps/server/src/modules/deletion/api/uc/deletion-request.uc.ts b/apps/server/src/modules/deletion/api/uc/deletion-request.uc.ts index 05d6c9c13fb..68eb39e9c59 100644 --- a/apps/server/src/modules/deletion/api/uc/deletion-request.uc.ts +++ b/apps/server/src/modules/deletion/api/uc/deletion-request.uc.ts @@ -3,7 +3,7 @@ import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { DomainDeletionReportBuilder } from '../../domain/builder'; import { DeletionLog, DeletionRequest } from '../../domain/do'; import { DataDeletedEvent, UserDeletedEvent } from '../../domain/event'; diff --git a/apps/server/src/modules/deletion/deletion-api.module.ts b/apps/server/src/modules/deletion/deletion-api.module.ts index 2294ebe421e..4e33074f68e 100644 --- a/apps/server/src/modules/deletion/deletion-api.module.ts +++ b/apps/server/src/modules/deletion/deletion-api.module.ts @@ -7,7 +7,7 @@ import { RocketChatUserModule } from '@modules/rocketchat-user'; import { TeamsModule } from '@modules/teams'; import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { DeletionModule } from '.'; import { DeletionExecutionsController } from './api/controller/deletion-executions.controller'; import { DeletionRequestsController } from './api/controller/deletion-requests.controller'; diff --git a/apps/server/src/modules/deletion/deletion.config.ts b/apps/server/src/modules/deletion/deletion.config.ts index a8c78307587..5a02567c00a 100644 --- a/apps/server/src/modules/deletion/deletion.config.ts +++ b/apps/server/src/modules/deletion/deletion.config.ts @@ -1,12 +1,12 @@ +import { LoggerConfig } from '@core/logger'; import { XApiKeyAuthGuardConfig } from '@infra/auth-guard'; +import { CalendarConfig } from '@infra/calendar'; import { ClassConfig } from '@modules/class'; import { FilesConfig } from '@modules/files'; import { NewsConfig } from '@modules/news'; import { PseudonymConfig } from '@modules/pseudonym'; import { RocketChatUserConfig } from '@modules/rocketchat-user'; import { TeamsConfig } from '@modules/teams'; -import { LoggerConfig } from '@src/core/logger'; -import { CalendarConfig } from '@src/infra/calendar'; export interface DeletionConfig extends LoggerConfig, diff --git a/apps/server/src/modules/deletion/domain/loggable-exception/deletion-error.loggable-exception.ts b/apps/server/src/modules/deletion/domain/loggable-exception/deletion-error.loggable-exception.ts index 8805ceb93d4..483a5833d41 100644 --- a/apps/server/src/modules/deletion/domain/loggable-exception/deletion-error.loggable-exception.ts +++ b/apps/server/src/modules/deletion/domain/loggable-exception/deletion-error.loggable-exception.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class DeletionErrorLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly errorMessage: string) { diff --git a/apps/server/src/modules/deletion/domain/loggable/data-deletion-domain-operation-loggable.ts b/apps/server/src/modules/deletion/domain/loggable/data-deletion-domain-operation-loggable.ts index 851737b51cd..69a53d3ebdb 100644 --- a/apps/server/src/modules/deletion/domain/loggable/data-deletion-domain-operation-loggable.ts +++ b/apps/server/src/modules/deletion/domain/loggable/data-deletion-domain-operation-loggable.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@core/logger'; import { DomainName } from '../types/domain-name.enum'; import { StatusModel } from '../types'; diff --git a/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-log.entity.factory.ts b/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-log.entity.factory.ts index 02bdaf1e678..73c03ae2a0e 100644 --- a/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-log.entity.factory.ts +++ b/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-log.entity.factory.ts @@ -1,5 +1,5 @@ -import { DomainDeletionReportBuilder, DomainOperationReportBuilder } from '@src/modules/deletion/domain/builder'; -import { DomainName, OperationType } from '@src/modules/deletion/domain/types'; +import { DomainDeletionReportBuilder, DomainOperationReportBuilder } from '@modules/deletion/domain/builder'; +import { DomainName, OperationType } from '@modules/deletion/domain/types'; import { BaseFactory } from '@testing/factory/base.factory'; import { ObjectId } from 'bson'; import { DeletionLogEntity, DeletionLogEntityProps } from '../../deletion-log.entity'; diff --git a/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-request.entity.factory.ts b/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-request.entity.factory.ts index da60d815462..c4b47597550 100644 --- a/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-request.entity.factory.ts +++ b/apps/server/src/modules/deletion/repo/entity/testing/factory/deletion-request.entity.factory.ts @@ -1,4 +1,4 @@ -import { DomainName, StatusModel } from '@src/modules/deletion/domain/types'; +import { DomainName, StatusModel } from '@modules/deletion/domain/types'; import { BaseFactory } from '@testing/factory/base.factory'; import { ObjectId } from 'bson'; import { DeletionRequestEntity, DeletionRequestEntityProps } from '../../deletion-request.entity'; diff --git a/apps/server/src/modules/files-storage-client/files-storage-client.module.ts b/apps/server/src/modules/files-storage-client/files-storage-client.module.ts index 185654114c7..0bca78dd82c 100644 --- a/apps/server/src/modules/files-storage-client/files-storage-client.module.ts +++ b/apps/server/src/modules/files-storage-client/files-storage-client.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; // The files-storage-client should not know the copy-helper import { CopyHelperModule } from '@modules/copy-helper/copy-helper.module'; import { CqrsModule } from '@nestjs/cqrs'; diff --git a/apps/server/src/modules/files-storage-client/service/files-storage-client.service.spec.ts b/apps/server/src/modules/files-storage-client/service/files-storage-client.service.spec.ts index cbe5764240f..aa08cf26dc3 100644 --- a/apps/server/src/modules/files-storage-client/service/files-storage-client.service.spec.ts +++ b/apps/server/src/modules/files-storage-client/service/files-storage-client.service.spec.ts @@ -13,7 +13,7 @@ import { deletionRequestFactory } from '@modules/deletion/domain/testing'; import { StorageLocation } from '@modules/files-storage/interface'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { taskFactory } from '@testing/factory/task.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/files-storage-client/service/files-storage-client.service.ts b/apps/server/src/modules/files-storage-client/service/files-storage-client.service.ts index e9b2ec3be07..4cb1b7c1abf 100644 --- a/apps/server/src/modules/files-storage-client/service/files-storage-client.service.ts +++ b/apps/server/src/modules/files-storage-client/service/files-storage-client.service.ts @@ -1,3 +1,5 @@ +import { LegacyLogger } from '@core/logger'; +import { FileDO } from '@infra/rabbitmq'; import { MikroORM, UseRequestContext } from '@mikro-orm/core'; import { DataDeletedEvent, @@ -12,8 +14,6 @@ import { import { Injectable } from '@nestjs/common'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; -import { FileDO } from '@src/infra/rabbitmq'; import { CopyFileDto, FileDto } from '../dto'; import { CopyFilesRequestInfo } from '../interfaces/copy-file-request-info'; import { FilesStorageClientMapper } from '../mapper'; 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 a9df04db683..4d745780aae 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 @@ -5,7 +5,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { StorageLocation } from '@modules/files-storage/interface'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; 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 1bb0ca52a49..f1035301044 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 @@ -10,7 +10,7 @@ import { import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { FilesStorageClientConfig } from '../files-storage-client-config'; @Injectable() diff --git a/apps/server/src/modules/files-storage/controller/files-storage.consumer.spec.ts b/apps/server/src/modules/files-storage/controller/files-storage.consumer.spec.ts index c00d9dd432e..8e2691b7f5d 100644 --- a/apps/server/src/modules/files-storage/controller/files-storage.consumer.spec.ts +++ b/apps/server/src/modules/files-storage/controller/files-storage.consumer.spec.ts @@ -4,7 +4,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { ALL_ENTITIES } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { courseFactory } from '@testing/factory/course.factory'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 eb795f4de81..e882e840ac1 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 @@ -3,7 +3,7 @@ import { CopyFileDO, FileDO, FilesStorageEvents, FilesStorageExchange, RpcMessag import { MikroORM, UseRequestContext } from '@mikro-orm/core'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; 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/files-preview-amqp.app.module.ts b/apps/server/src/modules/files-storage/files-preview-amqp.app.module.ts index 95dd99c20f9..573ec7520dc 100644 --- a/apps/server/src/modules/files-storage/files-preview-amqp.app.module.ts +++ b/apps/server/src/modules/files-storage/files-preview-amqp.app.module.ts @@ -1,8 +1,8 @@ +import { CoreModule } from '@core/core.module'; import { PreviewGeneratorConsumerModule } from '@infra/preview-generator'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { CoreModule } from '@src/core'; import { config, defaultConfig, s3Config } from './files-storage.config'; @Module({ diff --git a/apps/server/src/modules/files-storage/files-storage-amqp.app.module.ts b/apps/server/src/modules/files-storage/files-storage-amqp.app.module.ts index 3f44a0b35bc..481b5d0a297 100644 --- a/apps/server/src/modules/files-storage/files-storage-amqp.app.module.ts +++ b/apps/server/src/modules/files-storage/files-storage-amqp.app.module.ts @@ -1,8 +1,8 @@ +import { CoreModule } from '@core/core.module'; +import { LoggerModule } from '@core/logger'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { CoreModule } from '@src/core'; -import { LoggerModule } from '@src/core/logger'; import { FilesStorageConsumer } from './controller'; import { config } from './files-storage.config'; import { FilesStorageModule } from './files-storage.module'; diff --git a/apps/server/src/modules/files-storage/files-storage-api.app.module.ts b/apps/server/src/modules/files-storage/files-storage-api.app.module.ts index c24c78113b9..129342f5c42 100644 --- a/apps/server/src/modules/files-storage/files-storage-api.app.module.ts +++ b/apps/server/src/modules/files-storage/files-storage-api.app.module.ts @@ -1,10 +1,10 @@ +import { CoreModule } from '@core/core.module'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; import { AuthorizationClientModule } from '@infra/authorization-client'; import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { CoreModule } from '@src/core'; import { FileSecurityController, FilesStorageConfigController, FilesStorageController } from './controller'; import { authorizationClientConfig, config } from './files-storage.config'; import { FilesStorageModule } from './files-storage.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 cd4cd4eb5ed..4d3175975d9 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,10 +1,10 @@ +import { CoreModule } from '@core/core.module'; +import { LoggerModule } from '@core/logger'; import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@infra/database'; import { RabbitMQWrapperTestModule } from '@infra/rabbitmq'; import { DynamicModule, Module } from '@nestjs/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { CoreModule } from '@src/core'; -import { LoggerModule } from '@src/core/logger'; import { FileRecord } from './entity'; import { FilesStorageApiModule } from './files-storage-api.app.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 0772476bb4d..d8928efff22 100644 --- a/apps/server/src/modules/files-storage/files-storage.config.ts +++ b/apps/server/src/modules/files-storage/files-storage.config.ts @@ -1,8 +1,8 @@ +import { CoreModuleConfig } from '@core/core.config'; import { Configuration } from '@hpi-schul-cloud/commons'; import { JwtAuthGuardConfig } from '@infra/auth-guard'; import { AuthorizationClientConfig } from '@infra/authorization-client'; import { S3Config } from '@infra/s3-client'; -import { CoreModuleConfig } from '@src/core'; import { Algorithm } from 'jsonwebtoken'; 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 fa1d304eae9..3ab25307edf 100644 --- a/apps/server/src/modules/files-storage/files-storage.module.ts +++ b/apps/server/src/modules/files-storage/files-storage.module.ts @@ -1,4 +1,6 @@ +import { LoggerModule } from '@core/logger'; import { Configuration } from '@hpi-schul-cloud/commons'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { AntivirusModule } from '@infra/antivirus'; import { PreviewGeneratorProducerModule } from '@infra/preview-generator'; import { RabbitMQWrapperModule } from '@infra/rabbitmq'; @@ -7,8 +9,6 @@ import { MikroOrmModule } from '@mikro-orm/nestjs'; import { Module } from '@nestjs/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { LoggerModule } from '@src/core/logger'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import { FileRecord, FileRecordSecurityCheck } from './entity'; import { s3Config } from './files-storage.config'; import { FileRecordRepo } from './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 36fe2584833..49c223d0c46 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 @@ -4,7 +4,7 @@ import { S3ClientAdapter } from '@infra/s3-client'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 7c5b2754a1f..894c3403c86 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 @@ -5,7 +5,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { InternalServerErrorException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 0b2c423f2d2..cef4e87c50f 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 @@ -5,7 +5,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { NotAcceptableException, NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 6b73b64af48..1df043f0f63 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 @@ -4,7 +4,7 @@ import { S3ClientAdapter } from '@infra/s3-client'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { FileRecordParams, SingleFileParams } from '../controller/dto'; diff --git a/apps/server/src/modules/files-storage/service/files-storage-remove-creator.service.spec.ts b/apps/server/src/modules/files-storage/service/files-storage-remove-creator.service.spec.ts index ddf4c050693..c33447a9011 100644 --- a/apps/server/src/modules/files-storage/service/files-storage-remove-creator.service.spec.ts +++ b/apps/server/src/modules/files-storage/service/files-storage-remove-creator.service.spec.ts @@ -4,7 +4,7 @@ import { S3ClientAdapter } from '@infra/s3-client'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { FileRecordParams } 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 c50ed14d720..f0f8af65477 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 @@ -4,7 +4,7 @@ import { S3ClientAdapter } from '@infra/s3-client'; import { ObjectId } from '@mikro-orm/mongodb'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 5158396aa02..fd9cf632e1e 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 @@ -5,7 +5,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { ConflictException, NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 b16bcf8f850..d49a8d8b25a 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 @@ -5,7 +5,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { BadRequestException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { readableStreamWithFileTypeFactory } from '@testing/factory/readable-stream-with-file-type.factory'; import { setupEntities } from '@testing/setup-entities'; 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 a7fe6a9018b..d47c8da4205 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 @@ -10,7 +10,7 @@ import { } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Counted, EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import FileType from 'file-type-cjs/file-type-cjs-index'; import { PassThrough, Readable } from 'stream'; import { 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 365ead83505..667bf196734 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 @@ -4,7 +4,7 @@ import { S3ClientAdapter } from '@infra/s3-client'; import { ObjectId } from '@mikro-orm/mongodb'; import { NotFoundException, UnprocessableEntityException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 fd00e578a9c..6e914e88282 100644 --- a/apps/server/src/modules/files-storage/service/preview.service.ts +++ b/apps/server/src/modules/files-storage/service/preview.service.ts @@ -1,7 +1,7 @@ import { PreviewProducer } from '@infra/preview-generator'; import { S3ClientAdapter } from '@infra/s3-client'; import { Inject, Injectable, NotFoundException, UnprocessableEntityException } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { PreviewParams } from '../controller/dto'; import { FileRecord, PreviewStatus } from '../entity'; import { ErrorType } from '../error'; 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 3339ff0b25d..4381103789d 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -8,8 +10,6 @@ import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain/types'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { CopyFilesOfParentParams, FileRecordParams } from '../controller/dto'; 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 8d10e3c187f..74a0cd5e38c 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -8,8 +10,6 @@ import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Counted, EntityId } from '@shared/domain/types'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; 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 55ca0f819ad..2b1f98e1ec4 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -7,8 +9,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { SingleFileParams } from '../controller/dto'; 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 3936cdc1b21..d176e75f361 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -7,8 +9,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { SingleFileParams } from '../controller/dto'; 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 c28369d875e..775bb5a1658 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -6,8 +8,6 @@ import { EntityManager } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { Test, TestingModule } from '@nestjs/testing'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { FileRecordParams } from '../controller/dto'; 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 1e27767f9c8..90b64bb0e4a 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -7,8 +9,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { FileRecordParams, SingleFileParams } from '../controller/dto'; 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 4d669f26252..213a01fdce4 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -6,8 +8,6 @@ import { EntityManager } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; import { HttpService } from '@nestjs/axios'; import { Test, TestingModule } from '@nestjs/testing'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; import { RenameFileParams, ScanResultParams, SingleFileParams } from '../controller/dto'; 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 ccb41b4e21b..9d1feb52c99 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 @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AntivirusService } from '@infra/antivirus'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; @@ -9,8 +11,6 @@ import { HttpService } from '@nestjs/axios'; import { ForbiddenException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { AxiosHeadersKeyValue, axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { fileRecordFactory } from '@testing/factory/filerecord.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/files-storage/uc/files-storage.uc.ts b/apps/server/src/modules/files-storage/uc/files-storage.uc.ts index 0ee2c516e63..acd021587fe 100644 --- a/apps/server/src/modules/files-storage/uc/files-storage.uc.ts +++ b/apps/server/src/modules/files-storage/uc/files-storage.uc.ts @@ -1,3 +1,5 @@ +import { DomainErrorHandler } from '@core/error'; +import { LegacyLogger } from '@core/logger'; import { AuthorizationBodyParamsReferenceType, AuthorizationClientAdapter, @@ -9,8 +11,6 @@ import { EntityManager, RequestContext } from '@mikro-orm/core'; import { HttpService } from '@nestjs/axios'; import { Injectable, NotFoundException } from '@nestjs/common'; import { Counted, EntityId } from '@shared/domain/types'; -import { DomainErrorHandler } from '@src/core'; -import { LegacyLogger } from '@src/core/logger'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; import busboy from 'busboy'; import { Request } from 'express'; diff --git a/apps/server/src/modules/files/files.config.ts b/apps/server/src/modules/files/files.config.ts index 1dd398a4c4c..802e0cc648d 100644 --- a/apps/server/src/modules/files/files.config.ts +++ b/apps/server/src/modules/files/files.config.ts @@ -1,3 +1,3 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface FilesConfig extends LoggerConfig {} diff --git a/apps/server/src/modules/files/files.module.ts b/apps/server/src/modules/files/files.module.ts index 9eaaf93b71b..397ef0ac0dd 100644 --- a/apps/server/src/modules/files/files.module.ts +++ b/apps/server/src/modules/files/files.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { StorageProviderRepo } from '@shared/repo/storageprovider'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CqrsModule } from '@nestjs/cqrs'; import { DeleteFilesConsole } from './job'; import { DeleteFilesUc } from './uc'; diff --git a/apps/server/src/modules/files/job/delete-files.console.spec.ts b/apps/server/src/modules/files/job/delete-files.console.spec.ts index f760e49e03f..c8c1c7463fa 100644 --- a/apps/server/src/modules/files/job/delete-files.console.spec.ts +++ b/apps/server/src/modules/files/job/delete-files.console.spec.ts @@ -1,6 +1,6 @@ import { createMock } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { DeleteFilesUc } from '../uc'; import { DeleteFilesConsole } from './delete-files.console'; diff --git a/apps/server/src/modules/files/job/delete-files.console.ts b/apps/server/src/modules/files/job/delete-files.console.ts index ea06c4e8094..a560dc9019e 100644 --- a/apps/server/src/modules/files/job/delete-files.console.ts +++ b/apps/server/src/modules/files/job/delete-files.console.ts @@ -1,5 +1,5 @@ import { Command, Console } from 'nestjs-console'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { DeleteFilesUc } from '../uc'; @Console({ command: 'files', description: 'file deletion console' }) diff --git a/apps/server/src/modules/files/service/files.service.spec.ts b/apps/server/src/modules/files/service/files.service.spec.ts index 362b1badd54..d449caa061f 100644 --- a/apps/server/src/modules/files/service/files.service.spec.ts +++ b/apps/server/src/modules/files/service/files.service.spec.ts @@ -11,7 +11,7 @@ import { import { deletionRequestFactory } from '@modules/deletion/domain/testing'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; import { FileEntity } from '../entity'; import { fileEntityFactory, filePermissionEntityFactory } from '../entity/testing'; diff --git a/apps/server/src/modules/files/service/files.service.ts b/apps/server/src/modules/files/service/files.service.ts index ef2fc35e2cd..6bdfa29617b 100644 --- a/apps/server/src/modules/files/service/files.service.ts +++ b/apps/server/src/modules/files/service/files.service.ts @@ -14,7 +14,7 @@ import { import { Injectable } from '@nestjs/common'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { FileEntity } from '../entity'; import { FilesRepo } from '../repo'; diff --git a/apps/server/src/modules/files/uc/delete-files.uc.spec.ts b/apps/server/src/modules/files/uc/delete-files.uc.spec.ts index 2362748861f..59466491c06 100644 --- a/apps/server/src/modules/files/uc/delete-files.uc.spec.ts +++ b/apps/server/src/modules/files/uc/delete-files.uc.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 { StorageProviderRepo } from '@shared/repo/storageprovider'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { storageProviderFactory } from '@testing/factory/storageprovider.factory'; import { fileEntityFactory, filePermissionEntityFactory } from '../entity/testing'; import { FilesRepo } from '../repo'; diff --git a/apps/server/src/modules/files/uc/delete-files.uc.ts b/apps/server/src/modules/files/uc/delete-files.uc.ts index 1adc9f84420..d038698feae 100644 --- a/apps/server/src/modules/files/uc/delete-files.uc.ts +++ b/apps/server/src/modules/files/uc/delete-files.uc.ts @@ -3,7 +3,7 @@ import { DeleteObjectCommand, S3Client } from '@aws-sdk/client-s3'; import { Injectable } from '@nestjs/common'; import { StorageProviderEntity } from '@shared/domain/entity'; import { StorageProviderRepo } from '@shared/repo/storageprovider'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { TypeGuard } from '@shared/common'; import { FileEntity } from '../entity'; import { FilesRepo } from '../repo'; 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 07cead5845c..0a7208efd08 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 @@ -1,8 +1,11 @@ +import { CoreModule } from '@core/core.module'; +import { LoggerModule } from '@core/logger'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; 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 { AccountEntity } from '@modules/account/domain/entity/account.entity'; import { AuthorizationModule } from '@modules/authorization'; import { SystemEntity } from '@modules/system/entity'; import { HttpModule } from '@nestjs/axios'; @@ -10,9 +13,6 @@ import { DynamicModule, Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; import { Role, SchoolEntity, SchoolYearEntity, User } from '@shared/domain/entity'; -import { CoreModule } from '@src/core'; -import { LoggerModule } from '@src/core/logger'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; import { FwuLearningContentsController } from './controller/fwu-learning-contents.controller'; import { config, s3Config } from './fwu-learning-contents.config'; import { FwuLearningContentsUc } from './uc/fwu-learning-contents.uc'; diff --git a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.app.module.ts b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.app.module.ts index f797cb60d96..edca23e162a 100644 --- a/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.app.module.ts +++ b/apps/server/src/modules/fwu-learning-contents/fwu-learning-contents.app.module.ts @@ -1,7 +1,11 @@ +import { CoreModule } from '@core/core.module'; +import { LoggerModule } from '@core/logger'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; import { RabbitMQWrapperModule } from '@infra/rabbitmq'; import { S3ClientModule } from '@infra/s3-client'; import { MikroOrmModule } from '@mikro-orm/nestjs'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; import { AuthorizationModule } from '@modules/authorization'; import { SystemEntity } from '@modules/system/entity'; import { HttpModule } from '@nestjs/axios'; @@ -10,10 +14,6 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { Role, SchoolEntity, SchoolYearEntity, User } from '@shared/domain/entity'; -import { CoreModule } from '@src/core'; -import { LoggerModule } from '@src/core/logger'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; import { FwuLearningContentsController } from './controller/fwu-learning-contents.controller'; import { config, s3Config } from './fwu-learning-contents.config'; import { FwuLearningContentsUc } from './uc/fwu-learning-contents.uc'; 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 e7606aeb245..39f8e65f925 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,7 +1,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Test, TestingModule } from '@nestjs/testing'; import { S3ClientAdapter } from '@infra/s3-client'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { Readable } from 'stream'; import { FWU_CONTENT_S3_CONNECTION } from '../fwu-learning-contents.config'; import { FwuLearningContentsUc } from './fwu-learning-contents.uc'; 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 6cdc20b9321..21d1f98375c 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,6 +1,6 @@ import { Inject, Injectable } from '@nestjs/common'; import { S3ClientAdapter } from '@infra/s3-client'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { FWU_CONTENT_S3_CONNECTION } from '../fwu-learning-contents.config'; @Injectable() diff --git a/apps/server/src/modules/group/controller/group.controller.ts b/apps/server/src/modules/group/controller/group.controller.ts index 14a7d0278d5..6b2033ee8be 100644 --- a/apps/server/src/modules/group/controller/group.controller.ts +++ b/apps/server/src/modules/group/controller/group.controller.ts @@ -5,7 +5,7 @@ import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { ApiValidationError } from '@shared/common'; import { Page } from '@shared/domain/domainobject'; import { IFindOptions } from '@shared/domain/interface'; -import { ErrorResponse } from '@src/core/error/dto'; +import { ErrorResponse } from '@core/error/dto'; import { ClassGroupUc, GroupUc } from '../uc'; import { ClassInfoDto, ResolvedGroupDto } from '../uc/dto'; import { diff --git a/apps/server/src/modules/group/group-api.module.ts b/apps/server/src/modules/group/group-api.module.ts index 613ae154602..4fdb242c8bc 100644 --- a/apps/server/src/modules/group/group-api.module.ts +++ b/apps/server/src/modules/group/group-api.module.ts @@ -7,7 +7,7 @@ import { SchoolModule } from '@modules/school'; import { SystemModule } from '@modules/system'; import { UserModule } from '@modules/user'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { GroupController } from './controller'; import { GroupModule } from './group.module'; import { ClassGroupUc, GroupUc } from './uc'; diff --git a/apps/server/src/modules/group/loggable/unknown-query-type-loggable-exception.ts b/apps/server/src/modules/group/loggable/unknown-query-type-loggable-exception.ts index 758b4c1fb6b..10807671fbc 100644 --- a/apps/server/src/modules/group/loggable/unknown-query-type-loggable-exception.ts +++ b/apps/server/src/modules/group/loggable/unknown-query-type-loggable-exception.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { InternalServerErrorException } from '@nestjs/common'; export class UnknownQueryTypeLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/modules/group/service/group.service.spec.ts b/apps/server/src/modules/group/service/group.service.spec.ts index 8ed3186838a..2e5f2570ae3 100644 --- a/apps/server/src/modules/group/service/group.service.spec.ts +++ b/apps/server/src/modules/group/service/group.service.spec.ts @@ -1,6 +1,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import type { ProvisioningConfig } from '@modules/provisioning'; +import { RoleDto, RoleService } from '@modules/role'; +import { UserService } from '@modules/user'; import { ConfigService } from '@nestjs/config'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; @@ -8,8 +10,6 @@ import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { Page } from '@shared/domain/domainobject'; import { IFindOptions, RoleName, SortOrder } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { RoleDto, RoleService } from '@src/modules/role'; -import { UserService } from '@src/modules/user'; import { groupFactory } from '@testing/factory/domainobject'; import { roleDtoFactory } from '@testing/factory/role-dto.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; diff --git a/apps/server/src/modules/group/service/group.service.ts b/apps/server/src/modules/group/service/group.service.ts index cad01692394..176457b68ae 100644 --- a/apps/server/src/modules/group/service/group.service.ts +++ b/apps/server/src/modules/group/service/group.service.ts @@ -1,6 +1,8 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { AuthorizationLoaderServiceGeneric } from '@modules/authorization'; import type { ProvisioningConfig } from '@modules/provisioning'; +import { RoleService } from '@modules/role'; +import { UserService } from '@modules/user/service/user.service'; import { BadRequestException, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { EventBus } from '@nestjs/cqrs'; @@ -9,8 +11,6 @@ import { Page } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { IFindOptions, RoleName } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { RoleService } from '@src/modules/role'; -import { UserService } from '@src/modules/user/service/user.service'; import { Group, GroupAggregateScope, diff --git a/apps/server/src/modules/group/uc/class-group.uc.ts b/apps/server/src/modules/group/uc/class-group.uc.ts index 09503f6c757..e75e133ad06 100644 --- a/apps/server/src/modules/group/uc/class-group.uc.ts +++ b/apps/server/src/modules/group/uc/class-group.uc.ts @@ -6,6 +6,7 @@ import { Course } from '@modules/learnroom/domain'; import { SchoolYearService } from '@modules/legacy-school'; import { ProvisioningConfig } from '@modules/provisioning'; import { School, SchoolService, SchoolYear } from '@modules/school/domain'; +import { System, SystemService } from '@modules/system'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { SortHelper } from '@shared/common'; @@ -13,7 +14,6 @@ import { Page, UserDO } from '@shared/domain/domainobject'; import { SchoolYearEntity, User } from '@shared/domain/entity'; import { Pagination, Permission, SortOrder } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { System, SystemService } from '@src/modules/system'; import { SchoolYearQueryType } from '../controller/dto/interface'; import { Group, GroupFilter, GroupTypes, GroupVisibilityPermission } from '../domain'; import { UnknownQueryTypeLoggableException } from '../loggable'; diff --git a/apps/server/src/modules/group/uc/group.uc.spec.ts b/apps/server/src/modules/group/uc/group.uc.spec.ts index 55688d6325e..7bca3497915 100644 --- a/apps/server/src/modules/group/uc/group.uc.spec.ts +++ b/apps/server/src/modules/group/uc/group.uc.spec.ts @@ -11,7 +11,7 @@ import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { Page, UserDO } from '@shared/domain/domainobject'; import { Role, User } from '@shared/domain/entity'; import { Permission, SortOrder } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { groupFactory } from '@testing/factory/domainobject'; import { roleDtoFactory } from '@testing/factory/role-dto.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/group/uc/group.uc.ts b/apps/server/src/modules/group/uc/group.uc.ts index 713af4461a6..2bddef706fd 100644 --- a/apps/server/src/modules/group/uc/group.uc.ts +++ b/apps/server/src/modules/group/uc/group.uc.ts @@ -8,7 +8,7 @@ import { Page, UserDO } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { IFindOptions, Permission, SortOrder } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Group, GroupUser, GroupVisibilityPermission } from '../domain'; import { GroupService } from '../service'; import { ResolvedGroupDto, ResolvedGroupUser } from './dto'; diff --git a/apps/server/src/modules/group/uc/mapper/group-uc.mapper.ts b/apps/server/src/modules/group/uc/mapper/group-uc.mapper.ts index aa2ba4d8b93..e1f52d5224a 100644 --- a/apps/server/src/modules/group/uc/mapper/group-uc.mapper.ts +++ b/apps/server/src/modules/group/uc/mapper/group-uc.mapper.ts @@ -1,9 +1,9 @@ import { Class } from '@modules/class/domain'; +import { Course } from '@modules/learnroom/domain'; import { System } from '@modules/system'; import { UserDO } from '@shared/domain/domainobject'; import { SchoolYearEntity } from '@shared/domain/entity'; import { RoleName } from '@shared/domain/interface'; -import { Course } from '@src/modules/learnroom/domain'; import { Group } from '../../domain'; import { ClassInfoDto, CourseInfoDto, ResolvedGroupDto, ResolvedGroupUser } from '../dto'; import { ClassRootType } from '../dto/class-root-type'; 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 8ef440c9d41..c7f84e1fdca 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,3 +1,5 @@ +import { CoreModule } from '@core/core.module'; +import { LoggerModule } from '@core/logger'; import { AuthorizationClientModule } from '@infra/authorization-client'; import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@infra/database'; import { RabbitMQWrapperTestModule } from '@infra/rabbitmq'; @@ -6,8 +8,6 @@ import { AuthenticationApiTestModule } from '@modules/authentication/authenticat import { UserModule } from '@modules/user'; import { DynamicModule, Module } from '@nestjs/common'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { CoreModule } from '@src/core'; -import { LoggerModule } from '@src/core/logger'; import { H5PEditorController } from './controller'; import { H5PContent } from './entity'; import { H5PEditorModule } from './h5p-editor.app.module'; diff --git a/apps/server/src/modules/h5p-editor/h5p-editor.app.module.ts b/apps/server/src/modules/h5p-editor/h5p-editor.app.module.ts index 2abf659cab3..b3e19f43b72 100644 --- a/apps/server/src/modules/h5p-editor/h5p-editor.app.module.ts +++ b/apps/server/src/modules/h5p-editor/h5p-editor.app.module.ts @@ -1,3 +1,6 @@ +import { CoreModule } from '@core/core.module'; +import { Logger } from '@core/logger'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; import { AuthorizationClientModule } from '@infra/authorization-client'; import { RabbitMQWrapperModule } from '@infra/rabbitmq'; @@ -9,9 +12,6 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { CoreModule } from '@src/core'; -import { Logger } from '@src/core/logger'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import { H5PEditorController } from './controller/h5p-editor.controller'; import { H5PContent, InstalledLibrary } from './entity'; import { authorizationClientConfig, config, s3ConfigContent, s3ConfigLibraries } from './h5p-editor.config'; 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 81b8e4b555a..324128db1a1 100644 --- a/apps/server/src/modules/h5p-editor/h5p-editor.config.ts +++ b/apps/server/src/modules/h5p-editor/h5p-editor.config.ts @@ -1,9 +1,9 @@ +import { CoreModuleConfig } from '@core/core.config'; import { Configuration } from '@hpi-schul-cloud/commons'; import { JwtAuthGuardConfig } from '@infra/auth-guard'; import { AuthorizationClientConfig } from '@infra/authorization-client'; import { S3Config } from '@infra/s3-client'; import { LanguageType } from '@shared/domain/interface'; -import { CoreModuleConfig } from '@src/core'; import { Algorithm } from 'jsonwebtoken'; export interface H5PEditorConfig extends CoreModuleConfig, AuthorizationClientConfig, JwtAuthGuardConfig { 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 ddb220acd20..894157b7c52 100644 --- a/apps/server/src/modules/h5p-editor/service/contentStorage.service.ts +++ b/apps/server/src/modules/h5p-editor/service/contentStorage.service.ts @@ -18,7 +18,7 @@ import { NotFoundException, UnprocessableEntityException, } from '@nestjs/common'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { Readable } from 'stream'; import { H5pFileDto } from '../controller/dto/h5p-file.dto'; import { H5PContent } from '../entity'; 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 88018659920..77591f2a2e0 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 @@ -8,7 +8,7 @@ import { NotAcceptableException, NotFoundException, } from '@nestjs/common'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { ReadStream } from 'fs'; import { Readable } from 'stream'; import { H5pFileDto } from '../controller/dto/h5p-file.dto'; diff --git a/apps/server/src/modules/h5p-editor/uc/h5p-ajax.uc.spec.ts b/apps/server/src/modules/h5p-editor/uc/h5p-ajax.uc.spec.ts index 35a177f6cc0..1078934512f 100644 --- a/apps/server/src/modules/h5p-editor/uc/h5p-ajax.uc.spec.ts +++ b/apps/server/src/modules/h5p-editor/uc/h5p-ajax.uc.spec.ts @@ -2,11 +2,11 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { ICurrentUser } from '@infra/auth-guard'; import { AuthorizationClientAdapter } from '@infra/authorization-client'; import { H5PAjaxEndpoint, H5PEditor, H5PPlayer, H5pError } from '@lumieducation/h5p-server'; +import { UserService } from '@modules/user'; import { HttpException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO } from '@shared/domain/domainobject'; import { LanguageType } from '@shared/domain/interface'; -import { UserService } from '@src/modules/user'; import { setupEntities } from '@testing/setup-entities'; import { H5PContentRepo } from '../repo'; import { LibraryStorage } from '../service'; diff --git a/apps/server/src/modules/h5p-editor/uc/h5p-delete.uc.spec.ts b/apps/server/src/modules/h5p-editor/uc/h5p-delete.uc.spec.ts index 4378f170392..7d20212a4c1 100644 --- a/apps/server/src/modules/h5p-editor/uc/h5p-delete.uc.spec.ts +++ b/apps/server/src/modules/h5p-editor/uc/h5p-delete.uc.spec.ts @@ -2,9 +2,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ICurrentUser } from '@infra/auth-guard'; import { AuthorizationClientAdapter, AuthorizationContextBuilder } from '@infra/authorization-client'; import { H5PEditor, H5PPlayer } from '@lumieducation/h5p-server'; +import { UserService } from '@modules/user'; import { ForbiddenException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { UserService } from '@src/modules/user'; import { h5pContentFactory } from '@testing/factory/h5p-content.factory'; import { setupEntities } from '@testing/setup-entities'; import { H5PAjaxEndpointProvider } from '../provider'; diff --git a/apps/server/src/modules/h5p-editor/uc/h5p-files.uc.spec.ts b/apps/server/src/modules/h5p-editor/uc/h5p-files.uc.spec.ts index 29f9a917a1a..c45b42ce7cb 100644 --- a/apps/server/src/modules/h5p-editor/uc/h5p-files.uc.spec.ts +++ b/apps/server/src/modules/h5p-editor/uc/h5p-files.uc.spec.ts @@ -2,9 +2,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ICurrentUser } from '@infra/auth-guard'; import { AuthorizationClientAdapter, AuthorizationContextBuilder } from '@infra/authorization-client'; import { H5PAjaxEndpoint, H5PEditor, IPlayerModel } from '@lumieducation/h5p-server'; +import { UserService } from '@modules/user'; import { ForbiddenException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { UserService } from '@src/modules/user'; import { h5pContentFactory } from '@testing/factory/h5p-content.factory'; import { setupEntities } from '@testing/setup-entities'; import { Request } from 'express'; diff --git a/apps/server/src/modules/h5p-editor/uc/h5p-get-editor.uc.spec.ts b/apps/server/src/modules/h5p-editor/uc/h5p-get-editor.uc.spec.ts index b34eac8fd78..00e861084eb 100644 --- a/apps/server/src/modules/h5p-editor/uc/h5p-get-editor.uc.spec.ts +++ b/apps/server/src/modules/h5p-editor/uc/h5p-get-editor.uc.spec.ts @@ -2,11 +2,11 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ICurrentUser } from '@infra/auth-guard'; import { AuthorizationClientAdapter, AuthorizationContextBuilder } from '@infra/authorization-client'; import { H5PEditor, H5PPlayer, IEditorModel } from '@lumieducation/h5p-server'; +import { UserService } from '@modules/user'; import { ForbiddenException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { LanguageType } from '@shared/domain/interface'; import { UserRepo } from '@shared/repo'; -import { UserService } from '@src/modules/user'; import { h5pContentFactory } from '@testing/factory/h5p-content.factory'; import { setupEntities } from '@testing/setup-entities'; import { H5PAjaxEndpointProvider } from '../provider'; diff --git a/apps/server/src/modules/h5p-editor/uc/h5p-get-player.uc.spec.ts b/apps/server/src/modules/h5p-editor/uc/h5p-get-player.uc.spec.ts index 232fae763e9..977052c20e3 100644 --- a/apps/server/src/modules/h5p-editor/uc/h5p-get-player.uc.spec.ts +++ b/apps/server/src/modules/h5p-editor/uc/h5p-get-player.uc.spec.ts @@ -2,9 +2,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ICurrentUser } from '@infra/auth-guard'; import { AuthorizationClientAdapter, AuthorizationContextBuilder } from '@infra/authorization-client'; import { H5PEditor, H5PPlayer, IPlayerModel } from '@lumieducation/h5p-server'; +import { UserService } from '@modules/user'; import { ForbiddenException, NotFoundException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { UserService } from '@src/modules/user'; import { h5pContentFactory } from '@testing/factory/h5p-content.factory'; import { setupEntities } from '@testing/setup-entities'; import { H5PAjaxEndpointProvider } from '../provider'; diff --git a/apps/server/src/modules/h5p-editor/uc/h5p-save-create.uc.spec.ts b/apps/server/src/modules/h5p-editor/uc/h5p-save-create.uc.spec.ts index a6f0214c81a..850d890d588 100644 --- a/apps/server/src/modules/h5p-editor/uc/h5p-save-create.uc.spec.ts +++ b/apps/server/src/modules/h5p-editor/uc/h5p-save-create.uc.spec.ts @@ -3,9 +3,9 @@ import { ICurrentUser } from '@infra/auth-guard'; import { AuthorizationClientAdapter, AuthorizationContextBuilder } from '@infra/authorization-client'; import { H5PEditor, H5PPlayer } from '@lumieducation/h5p-server'; import { ObjectId } from '@mikro-orm/mongodb'; +import { UserService } from '@modules/user'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { UserService } from '@src/modules/user'; import { h5pContentFactory } from '@testing/factory/h5p-content.factory'; import { setupEntities } from '@testing/setup-entities'; import { H5PContentParentType } from '../entity'; diff --git a/apps/server/src/modules/h5p-editor/uc/h5p.uc.ts b/apps/server/src/modules/h5p-editor/uc/h5p.uc.ts index ddbd75f0fe7..90fc6528884 100644 --- a/apps/server/src/modules/h5p-editor/uc/h5p.uc.ts +++ b/apps/server/src/modules/h5p-editor/uc/h5p.uc.ts @@ -20,6 +20,7 @@ import { ILibraryDetailedDataForClient, ILibraryOverviewForClient, } from '@lumieducation/h5p-server/build/src/types'; +import { UserService } from '@modules/user'; import { BadRequestException, HttpException, @@ -29,7 +30,6 @@ import { } from '@nestjs/common'; import { LanguageType } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { UserService } from '@src/modules/user'; import { Request } from 'express'; import { AjaxGetQueryParams, AjaxPostBodyParams, AjaxPostQueryParams } from '../controller/dto'; import { H5PContentParentType } from '../entity'; diff --git a/apps/server/src/modules/h5p-library-management/h5p-library-management.app.module.ts b/apps/server/src/modules/h5p-library-management/h5p-library-management.app.module.ts index ae96eb4ab8b..21c994c8a37 100644 --- a/apps/server/src/modules/h5p-library-management/h5p-library-management.app.module.ts +++ b/apps/server/src/modules/h5p-library-management/h5p-library-management.app.module.ts @@ -1,3 +1,5 @@ +import { CoreModule } from '@core/core.module'; +import { Logger } from '@core/logger'; import { RabbitMQWrapperModule } from '@infra/rabbitmq'; import { S3ClientModule } from '@infra/s3-client'; import { s3ConfigContent, s3ConfigLibraries } from '@modules/h5p-editor'; @@ -5,8 +7,6 @@ import { H5PEditorModule } from '@modules/h5p-editor/h5p-editor.app.module'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { CoreModule } from '@src/core'; -import { Logger } from '@src/core/logger'; import { H5PLibraryManagementService, h5PLibraryManagementConfig } from './service'; const imports = [ diff --git a/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts b/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts index 2a2326781f0..0fc4340af7e 100644 --- a/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts +++ b/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts @@ -1,11 +1,11 @@ -import { Test, TestingModule } from '@nestjs/testing'; import { createMock } from '@golevelup/ts-jest'; -import { ContentStorage, LibraryStorage } from '@src/modules/h5p-editor/service'; import { IHubContentType, ILibraryAdministrationOverviewItem } from '@lumieducation/h5p-server/build/src/types'; -import { ConfigService } from '@nestjs/config'; +import { ContentStorage, LibraryStorage } from '@modules/h5p-editor/service'; import { InternalServerErrorException } from '@nestjs/common'; -import { H5PLibraryManagementService, castToLibrariesContentType } from './h5p-library-management.service'; +import { ConfigService } from '@nestjs/config'; +import { Test, TestingModule } from '@nestjs/testing'; import { IH5PLibraryManagementConfig } from './h5p-library-management.config'; +import { H5PLibraryManagementService, castToLibrariesContentType } from './h5p-library-management.service'; jest.mock('@lumieducation/h5p-server', () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-return diff --git a/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.ts b/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.ts index b32f8d6f763..63c2fd16d79 100644 --- a/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.ts +++ b/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.ts @@ -10,9 +10,9 @@ import { import ContentManager from '@lumieducation/h5p-server/build/src/ContentManager'; import ContentTypeInformationRepository from '@lumieducation/h5p-server/build/src/ContentTypeInformationRepository'; import { IHubContentType } from '@lumieducation/h5p-server/build/src/types'; +import { ContentStorage, LibraryStorage } from '@modules/h5p-editor'; import { Injectable, InternalServerErrorException, NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { ContentStorage, LibraryStorage } from '@src/modules/h5p-editor'; import { readFileSync } from 'fs'; import { parse } from 'yaml'; import { IH5PLibraryManagementConfig } from './h5p-library-management.config'; diff --git a/apps/server/src/modules/health/controller/api-test/health-checks.api.spec.ts b/apps/server/src/modules/health/controller/api-test/health-checks.api.spec.ts index 9d60587607f..ea1cd206678 100644 --- a/apps/server/src/modules/health/controller/api-test/health-checks.api.spec.ts +++ b/apps/server/src/modules/health/controller/api-test/health-checks.api.spec.ts @@ -3,7 +3,7 @@ import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import request from 'supertest'; -import { InternalServerTestModule } from '@src/modules/internal-server/internal-server-test.module'; +import { InternalServerTestModule } from '@modules/internal-server/internal-server-test.module'; import { cleanupCollections } from '@testing/cleanup-collections'; import { HealthStatuses } from '../../domain'; import { HealthStatusResponse } from '../dto'; diff --git a/apps/server/src/modules/health/controller/health.controller.spec.ts b/apps/server/src/modules/health/controller/health.controller.spec.ts index 26c623419a0..f64ceb8c548 100644 --- a/apps/server/src/modules/health/controller/health.controller.spec.ts +++ b/apps/server/src/modules/health/controller/health.controller.spec.ts @@ -3,7 +3,7 @@ import { HttpStatus } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Response } from 'express'; -import { HealthUC } from '@src/modules/health/uc'; +import { HealthUC } from '@modules/health/uc'; import { setupEntities } from '@testing/setup-entities'; import { HealthStatus, HealthStatuses } from '../domain'; import { HealthController } from './health.controller'; diff --git a/apps/server/src/modules/health/health-api.module.ts b/apps/server/src/modules/health/health-api.module.ts index b2bc135cf98..1931b1b8b11 100644 --- a/apps/server/src/modules/health/health-api.module.ts +++ b/apps/server/src/modules/health/health-api.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { HealthController } from './controller'; import { HealthCheckRepo } from './repo'; import { HealthService } from './service'; diff --git a/apps/server/src/modules/health/uc/health.uc.spec.ts b/apps/server/src/modules/health/uc/health.uc.spec.ts index 591c4aa5b65..296351355b1 100644 --- a/apps/server/src/modules/health/uc/health.uc.spec.ts +++ b/apps/server/src/modules/health/uc/health.uc.spec.ts @@ -3,7 +3,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { IConfig } from '@hpi-schul-cloud/commons/lib/interfaces/IConfig'; import { Configuration } from '@hpi-schul-cloud/commons'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { HealthUC } from './health.uc'; import { HealthService } from '../service'; import { HealthStatuses } from '../domain'; diff --git a/apps/server/src/modules/health/uc/health.uc.ts b/apps/server/src/modules/health/uc/health.uc.ts index fedf18c1527..6874b4c1e58 100644 --- a/apps/server/src/modules/health/uc/health.uc.ts +++ b/apps/server/src/modules/health/uc/health.uc.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { Logger } from '@src/core/logger'; -import { ErrorLoggable } from '@src/core/error/loggable'; +import { Logger } from '@core/logger'; +import { ErrorLoggable } from '@core/error/loggable'; import { HealthService } from '../service'; import { HealthConfig } from '../health.config'; import { HealthStatuses, HealthStatusCheck, HealthStatus } from '../domain'; diff --git a/apps/server/src/modules/idp-console/api/loggable-exception/failed-update-lastsyncedat.loggable-exception.ts b/apps/server/src/modules/idp-console/api/loggable-exception/failed-update-lastsyncedat.loggable-exception.ts index bd4682092b9..ee4970b2bd1 100644 --- a/apps/server/src/modules/idp-console/api/loggable-exception/failed-update-lastsyncedat.loggable-exception.ts +++ b/apps/server/src/modules/idp-console/api/loggable-exception/failed-update-lastsyncedat.loggable-exception.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class FailedUpdateLastSyncedAtLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly systemId: string) { diff --git a/apps/server/src/modules/idp-console/api/loggable-exception/no-users-to-synchronization.loggable-exception.ts b/apps/server/src/modules/idp-console/api/loggable-exception/no-users-to-synchronization.loggable-exception.ts index 44632dc4639..e912921ed0f 100644 --- a/apps/server/src/modules/idp-console/api/loggable-exception/no-users-to-synchronization.loggable-exception.ts +++ b/apps/server/src/modules/idp-console/api/loggable-exception/no-users-to-synchronization.loggable-exception.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class NoUsersToSynchronizationLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly systemId: string) { diff --git a/apps/server/src/modules/idp-console/api/loggable-exception/synchronization-unknown-error.loggable-exception.ts b/apps/server/src/modules/idp-console/api/loggable-exception/synchronization-unknown-error.loggable-exception.ts index 2fa2d98f956..d5726c2dc39 100644 --- a/apps/server/src/modules/idp-console/api/loggable-exception/synchronization-unknown-error.loggable-exception.ts +++ b/apps/server/src/modules/idp-console/api/loggable-exception/synchronization-unknown-error.loggable-exception.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class SynchronizationUnknownErrorLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly systemId: string) { diff --git a/apps/server/src/modules/idp-console/api/loggable/start-synchronization-loggable.ts b/apps/server/src/modules/idp-console/api/loggable/start-synchronization-loggable.ts index e135d123b80..773997c92e1 100644 --- a/apps/server/src/modules/idp-console/api/loggable/start-synchronization-loggable.ts +++ b/apps/server/src/modules/idp-console/api/loggable/start-synchronization-loggable.ts @@ -1,4 +1,4 @@ -import { LogMessage, Loggable } from '@src/core/logger'; +import { LogMessage, Loggable } from '@core/logger'; export class StartSynchronizationLoggable implements Loggable { constructor(private readonly systemId: string) {} diff --git a/apps/server/src/modules/idp-console/api/loggable/sucess-synchronization-loggable.ts b/apps/server/src/modules/idp-console/api/loggable/sucess-synchronization-loggable.ts index 4933050a928..09790310674 100644 --- a/apps/server/src/modules/idp-console/api/loggable/sucess-synchronization-loggable.ts +++ b/apps/server/src/modules/idp-console/api/loggable/sucess-synchronization-loggable.ts @@ -1,4 +1,4 @@ -import { LogMessage, Loggable } from '@src/core/logger'; +import { LogMessage, Loggable } from '@core/logger'; export class SucessSynchronizationLoggable implements Loggable { constructor(private readonly systemId: string, private readonly usersSynchronizedCount?: number) {} diff --git a/apps/server/src/modules/idp-console/api/synchronization.uc.spec.ts b/apps/server/src/modules/idp-console/api/synchronization.uc.spec.ts index 09e8c835965..8e76335f472 100644 --- a/apps/server/src/modules/idp-console/api/synchronization.uc.spec.ts +++ b/apps/server/src/modules/idp-console/api/synchronization.uc.spec.ts @@ -1,13 +1,13 @@ +import { Logger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { SchulconnexResponse, SchulconnexRestClient } from '@infra/schulconnex-client'; import { schulconnexResponseFactory } from '@infra/schulconnex-client/testing'; +import { AccountService } from '@modules/account'; import { Synchronization, SynchronizationService, SynchronizationStatusModel } from '@modules/synchronization'; import { synchronizationFactory } from '@modules/synchronization/domain/testing'; import { UserService } from '@modules/user'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; -import { AccountService } from '@src/modules/account'; import { setupEntities } from '@testing/setup-entities'; import { ObjectId } from 'bson'; import { IdpConsoleConfig } from '../idp-console.config'; diff --git a/apps/server/src/modules/idp-console/api/synchronization.uc.ts b/apps/server/src/modules/idp-console/api/synchronization.uc.ts index 2cf733da3d5..156b2970ffe 100644 --- a/apps/server/src/modules/idp-console/api/synchronization.uc.ts +++ b/apps/server/src/modules/idp-console/api/synchronization.uc.ts @@ -3,8 +3,8 @@ import { Synchronization, SynchronizationService, SynchronizationStatusModel } f import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Logger } from '@src/core/logger'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Logger } from '@core/logger'; +import { ErrorLogMessage } from '@core/logger/types'; import { AccountService } from '@modules/account'; import { StartSynchronizationLoggable, SucessSynchronizationLoggable } from './loggable'; import { diff --git a/apps/server/src/modules/idp-console/idp-console.app.module.ts b/apps/server/src/modules/idp-console/idp-console.app.module.ts index da5c8382ee0..ff20f380b25 100644 --- a/apps/server/src/modules/idp-console/idp-console.app.module.ts +++ b/apps/server/src/modules/idp-console/idp-console.app.module.ts @@ -1,3 +1,5 @@ +import { LoggerModule } from '@core/logger'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { ConsoleWriterModule } from '@infra/console'; import { RabbitMQWrapperModule } from '@infra/rabbitmq'; import { SchulconnexClientModule } from '@infra/schulconnex-client/schulconnex-client.module'; @@ -10,8 +12,6 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { LoggerModule } from '@src/core/logger'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import { ConsoleModule } from 'nestjs-console'; import { IdpSyncConsole, SynchronizationUc } from './api'; import { idpConsoleConfigConfig } from './idp-console.config'; diff --git a/apps/server/src/modules/idp-console/idp-console.config.ts b/apps/server/src/modules/idp-console/idp-console.config.ts index 30b14264858..67822d449ce 100644 --- a/apps/server/src/modules/idp-console/idp-console.config.ts +++ b/apps/server/src/modules/idp-console/idp-console.config.ts @@ -6,7 +6,7 @@ import { AccountConfig } from '@modules/account'; import { SynchronizationConfig } from '@modules/synchronization'; import { UserConfig } from '@modules/user'; import { LanguageType } from '@shared/domain/interface'; -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface IdpConsoleConfig extends ConsoleWriterConfig, diff --git a/apps/server/src/modules/instance/loggable/instance-not-identifiable-loggable-exception.ts b/apps/server/src/modules/instance/loggable/instance-not-identifiable-loggable-exception.ts index 0b8e5d4fafe..6a4eb1a21ee 100644 --- a/apps/server/src/modules/instance/loggable/instance-not-identifiable-loggable-exception.ts +++ b/apps/server/src/modules/instance/loggable/instance-not-identifiable-loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class InstanceNotIdentifiableLoggableException extends InternalServerErrorException implements Loggable { getLogMessage(): LogMessage | ErrorLogMessage | ValidationErrorLogMessage { diff --git a/apps/server/src/modules/internal-server/internal-server.app.module.ts b/apps/server/src/modules/internal-server/internal-server.app.module.ts index f096c34acfd..1c1bb8fa115 100644 --- a/apps/server/src/modules/internal-server/internal-server.app.module.ts +++ b/apps/server/src/modules/internal-server/internal-server.app.module.ts @@ -1,11 +1,11 @@ import { MikroOrmModule } from '@mikro-orm/nestjs'; import { Module } from '@nestjs/common'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; +import { HealthApiModule, HealthEntities } from '@modules/health'; import { serverConfig } from '@modules/server'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; -import { HealthApiModule, HealthEntities } from '@src/modules/health'; @Module({ imports: [ diff --git a/apps/server/src/modules/learnroom/controller/course-info.controller.ts b/apps/server/src/modules/learnroom/controller/course-info.controller.ts index 38a4355f7d8..4508626fa1a 100644 --- a/apps/server/src/modules/learnroom/controller/course-info.controller.ts +++ b/apps/server/src/modules/learnroom/controller/course-info.controller.ts @@ -3,7 +3,7 @@ import { Controller, Get, HttpStatus, Query } from '@nestjs/common'; import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { PaginationParams } from '@shared/controller/'; import { Page } from '@shared/domain/domainobject'; -import { ErrorResponse } from '@src/core/error/dto'; +import { ErrorResponse } from '@core/error/dto'; import { CourseInfoResponseMapper } from '../mapper/course-info-response.mapper'; import { CourseInfoDto } from '../uc/dto'; import { CourseFilterParams } from './dto/request/course-filter-params'; diff --git a/apps/server/src/modules/learnroom/domain/error/course-already-synchronized.loggable-exception.ts b/apps/server/src/modules/learnroom/domain/error/course-already-synchronized.loggable-exception.ts index cd747ad5008..f4c13db6b22 100644 --- a/apps/server/src/modules/learnroom/domain/error/course-already-synchronized.loggable-exception.ts +++ b/apps/server/src/modules/learnroom/domain/error/course-already-synchronized.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class CourseAlreadySynchronizedLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly courseId: EntityId) { diff --git a/apps/server/src/modules/learnroom/domain/error/course-not-synchronized.loggable-exception.ts b/apps/server/src/modules/learnroom/domain/error/course-not-synchronized.loggable-exception.ts index 77dd45dcec7..d810b645043 100644 --- a/apps/server/src/modules/learnroom/domain/error/course-not-synchronized.loggable-exception.ts +++ b/apps/server/src/modules/learnroom/domain/error/course-not-synchronized.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class CourseNotSynchronizedLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly courseId: EntityId) { diff --git a/apps/server/src/modules/learnroom/domain/loggable/course-synchronization-stopped.loggable.ts b/apps/server/src/modules/learnroom/domain/loggable/course-synchronization-stopped.loggable.ts index be9c74a149f..06bd5b99c6c 100644 --- a/apps/server/src/modules/learnroom/domain/loggable/course-synchronization-stopped.loggable.ts +++ b/apps/server/src/modules/learnroom/domain/loggable/course-synchronization-stopped.loggable.ts @@ -1,5 +1,5 @@ import type { Group } from '@modules/group'; -import type { Loggable, LogMessage } from '@src/core/logger'; +import type { Loggable, LogMessage } from '@core/logger'; import type { Course } from '../do'; export class CourseSynchronizationStoppedLoggable implements Loggable { diff --git a/apps/server/src/modules/learnroom/learnroom.module.ts b/apps/server/src/modules/learnroom/learnroom.module.ts index 7f2e1437207..73b4839688d 100644 --- a/apps/server/src/modules/learnroom/learnroom.module.ts +++ b/apps/server/src/modules/learnroom/learnroom.module.ts @@ -19,7 +19,7 @@ import { LegacyBoardRepo, UserRepo, } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CommonCartridgeFileValidatorPipe } from '../common-cartridge/controller/utils'; import { COURSE_REPO } from './domain'; import { CommonCartridgeExportMapper } from './mapper/common-cartridge-export.mapper'; diff --git a/apps/server/src/modules/learnroom/mapper/rolename.mapper.spec.ts b/apps/server/src/modules/learnroom/mapper/rolename.mapper.spec.ts index 62b79946b0f..992139e6509 100644 --- a/apps/server/src/modules/learnroom/mapper/rolename.mapper.spec.ts +++ b/apps/server/src/modules/learnroom/mapper/rolename.mapper.spec.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain/interface'; -import { courseFactory } from '@src/testing/factory/course.factory'; +import { courseFactory } from '@testing/factory/course.factory'; import { roleFactory } from '@testing/factory/role.factory'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; import { userFactory } from '@testing/factory/user.factory'; diff --git a/apps/server/src/modules/learnroom/mapper/room-board-response.mapper.spec.ts b/apps/server/src/modules/learnroom/mapper/room-board-response.mapper.spec.ts index 87121637fb9..a3dda484453 100644 --- a/apps/server/src/modules/learnroom/mapper/room-board-response.mapper.spec.ts +++ b/apps/server/src/modules/learnroom/mapper/room-board-response.mapper.spec.ts @@ -1,7 +1,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; +import { BoardLayout } from '@modules/board'; import { Test, TestingModule } from '@nestjs/testing'; -import { BoardLayout } from '@src/modules/board'; -import { courseFactory } from '@src/testing/factory/course.factory'; +import { courseFactory } from '@testing/factory/course.factory'; import { taskFactory } from '@testing/factory/task.factory'; import { setupEntities } from '@testing/setup-entities'; import { BoardElementResponse, SingleColumnBoardResponse } from '../controller/dto'; diff --git a/apps/server/src/modules/learnroom/service/board-copy.service.spec.ts b/apps/server/src/modules/learnroom/service/board-copy.service.spec.ts index 1d71479fda6..449a291eaa0 100644 --- a/apps/server/src/modules/learnroom/service/board-copy.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/board-copy.service.spec.ts @@ -1,7 +1,11 @@ +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ColumnBoardService } from '@modules/board'; import { BoardExternalReferenceType } from '@modules/board/domain'; +import { CopyColumnBoardParams } from '@modules/board/service/internal'; +import { columnBoardFactory } from '@modules/board/testing'; import { CopyElementType, CopyHelperService, CopyStatus, CopyStatusEnum } from '@modules/copy-helper'; +import { StorageLocation } from '@modules/files-storage/interface'; import { LessonCopyService } from '@modules/lesson'; import { TaskCopyService } from '@modules/task'; import { Test, TestingModule } from '@nestjs/testing'; @@ -9,10 +13,6 @@ import { AuthorizableObject } from '@shared/domain/domain-object'; import { LegacyBoard } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { LegacyBoardRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; -import { CopyColumnBoardParams } from '@src/modules/board/service/internal'; -import { columnBoardFactory } from '@src/modules/board/testing'; -import { StorageLocation } from '@src/modules/files-storage/interface'; import { boardFactory } from '@testing/factory/board.factory'; import { columnboardBoardElementFactory, diff --git a/apps/server/src/modules/learnroom/service/board-copy.service.ts b/apps/server/src/modules/learnroom/service/board-copy.service.ts index c4e465cde90..d733e38f32f 100644 --- a/apps/server/src/modules/learnroom/service/board-copy.service.ts +++ b/apps/server/src/modules/learnroom/service/board-copy.service.ts @@ -1,5 +1,7 @@ +import { LegacyLogger } from '@core/logger'; import { BoardExternalReferenceType, ColumnBoard, ColumnBoardService } from '@modules/board'; import { CopyElementType, CopyHelperService, CopyStatus, CopyStatusEnum } from '@modules/copy-helper'; +import { StorageLocation } from '@modules/files-storage/interface'; import { LessonCopyService } from '@modules/lesson'; import { TaskCopyService } from '@modules/task'; import { Injectable } from '@nestjs/common'; @@ -21,8 +23,6 @@ import { } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { LegacyBoardRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; -import { StorageLocation } from '@src/modules/files-storage/interface'; import { sortBy } from 'lodash'; import { ColumnBoardNodeRepo } from '../repo'; diff --git a/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts b/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts index acdf1e53fe3..39b1c20ad64 100644 --- a/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/common-cartridge-import.service.spec.ts @@ -1,9 +1,9 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { MikroORM } from '@mikro-orm/core'; +import { BoardNodeFactory, BoardNodeService } from '@modules/board'; +import { LinkElement, RichTextElement } from '@modules/board/domain'; import { Test, TestingModule } from '@nestjs/testing'; import { InputFormat } from '@shared/domain/types'; -import { BoardNodeFactory, BoardNodeService } from '@src/modules/board'; -import { LinkElement, RichTextElement } from '@src/modules/board/domain'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import { readFile } from 'fs/promises'; diff --git a/apps/server/src/modules/learnroom/service/course.service.spec.ts b/apps/server/src/modules/learnroom/service/course.service.spec.ts index 1b6dedb2f24..541075297dd 100644 --- a/apps/server/src/modules/learnroom/service/course.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/course.service.spec.ts @@ -12,7 +12,7 @@ import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { Course as CourseEntity } from '@shared/domain/entity'; import { CourseRepo as LegacyCourseRepo, UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { courseFactory } from '@testing/factory/course.factory'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/learnroom/service/course.service.ts b/apps/server/src/modules/learnroom/service/course.service.ts index cf7cc52db2d..3733617fdf5 100644 --- a/apps/server/src/modules/learnroom/service/course.service.ts +++ b/apps/server/src/modules/learnroom/service/course.service.ts @@ -16,7 +16,7 @@ import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { Course as CourseEntity } from '@shared/domain/entity'; import { Counted, EntityId } from '@shared/domain/types'; import { CourseRepo as LegacyCourseRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; @Injectable() @EventsHandler(UserDeletedEvent) diff --git a/apps/server/src/modules/learnroom/service/coursegroup.service.spec.ts b/apps/server/src/modules/learnroom/service/coursegroup.service.spec.ts index 32a5f793ef6..f54b552f19c 100644 --- a/apps/server/src/modules/learnroom/service/coursegroup.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/coursegroup.service.spec.ts @@ -11,7 +11,7 @@ import { deletionRequestFactory } from '@modules/deletion/domain/testing'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { CourseGroupRepo, UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { courseGroupFactory } from '@testing/factory/coursegroup.factory'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/learnroom/service/coursegroup.service.ts b/apps/server/src/modules/learnroom/service/coursegroup.service.ts index c065b44b64a..0f6d827c087 100644 --- a/apps/server/src/modules/learnroom/service/coursegroup.service.ts +++ b/apps/server/src/modules/learnroom/service/coursegroup.service.ts @@ -16,7 +16,7 @@ import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { CourseGroup } from '@shared/domain/entity'; import { Counted, EntityId } from '@shared/domain/types'; import { CourseGroupRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; @Injectable() @EventsHandler(UserDeletedEvent) diff --git a/apps/server/src/modules/learnroom/service/dashboard.service.spec.ts b/apps/server/src/modules/learnroom/service/dashboard.service.spec.ts index 8a4179e790f..aa4bf223ebb 100644 --- a/apps/server/src/modules/learnroom/service/dashboard.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/dashboard.service.spec.ts @@ -13,7 +13,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { DashboardEntity, GridElement } from '@shared/domain/entity'; import { LearnroomMetadata, LearnroomTypes } from '@shared/domain/types'; import { DashboardElementRepo, IDashboardRepo, UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import { ObjectId } from 'bson'; diff --git a/apps/server/src/modules/learnroom/service/dashboard.service.ts b/apps/server/src/modules/learnroom/service/dashboard.service.ts index fff85988f5a..41e75037bc7 100644 --- a/apps/server/src/modules/learnroom/service/dashboard.service.ts +++ b/apps/server/src/modules/learnroom/service/dashboard.service.ts @@ -15,7 +15,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { EntityId } from '@shared/domain/types'; import { DashboardElementRepo, IDashboardRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; @Injectable() @EventsHandler(UserDeletedEvent) diff --git a/apps/server/src/modules/learnroom/service/group-deleted-handler.service.spec.ts b/apps/server/src/modules/learnroom/service/group-deleted-handler.service.spec.ts index 7f1c824845e..dd8aa3541e7 100644 --- a/apps/server/src/modules/learnroom/service/group-deleted-handler.service.spec.ts +++ b/apps/server/src/modules/learnroom/service/group-deleted-handler.service.spec.ts @@ -3,7 +3,7 @@ import { MikroORM } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; import { GroupDeletedEvent } from '@modules/group'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { groupFactory } from '@testing/factory/domainobject'; import { setupEntities } from '@testing/setup-entities'; import { Course } from '../domain'; diff --git a/apps/server/src/modules/learnroom/service/group-deleted-handler.service.ts b/apps/server/src/modules/learnroom/service/group-deleted-handler.service.ts index 6efd4ee945a..d54b38f238b 100644 --- a/apps/server/src/modules/learnroom/service/group-deleted-handler.service.ts +++ b/apps/server/src/modules/learnroom/service/group-deleted-handler.service.ts @@ -2,7 +2,7 @@ import { MikroORM, UseRequestContext } from '@mikro-orm/core'; import { Group, GroupDeletedEvent } from '@modules/group'; import { Injectable } from '@nestjs/common'; import { EventsHandler, IEventHandler } from '@nestjs/cqrs'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { Course, CourseSynchronizationStoppedLoggable } from '../domain'; import { CourseDoService } from './course-do.service'; diff --git a/apps/server/src/modules/learnroom/uc/course.uc.ts b/apps/server/src/modules/learnroom/uc/course.uc.ts index 63ee6944304..1314fb3084c 100644 --- a/apps/server/src/modules/learnroom/uc/course.uc.ts +++ b/apps/server/src/modules/learnroom/uc/course.uc.ts @@ -1,3 +1,4 @@ +import { ICurrentUser } from '@infra/auth-guard'; import { AuthorizationService } from '@modules/authorization'; import { RoleService } from '@modules/role'; import { Injectable } from '@nestjs/common'; @@ -6,7 +7,6 @@ import { Course } from '@shared/domain/entity'; import { Permission, SortOrder } from '@shared/domain/interface'; import { Counted, EntityId } from '@shared/domain/types'; import { CourseRepo } from '@shared/repo'; -import { ICurrentUser } from '@src/infra/auth-guard'; import { RoleNameMapper } from '../mapper/rolename.mapper'; import { CourseService } from '../service'; diff --git a/apps/server/src/modules/legacy-school/controller/api-test/school.administration.api.spec.ts b/apps/server/src/modules/legacy-school/controller/api-test/school.administration.api.spec.ts index 596a9959b53..bd6841deb18 100644 --- a/apps/server/src/modules/legacy-school/controller/api-test/school.administration.api.spec.ts +++ b/apps/server/src/modules/legacy-school/controller/api-test/school.administration.api.spec.ts @@ -1,8 +1,8 @@ import { EntityManager } from '@mikro-orm/mongodb'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain/entity'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; import { federalStateFactory } from '@testing/factory/federal-state.factory'; import { schoolYearFactory } from '@testing/factory/schoolyear.factory'; import { storageProviderFactory } from '@testing/factory/storageprovider.factory'; diff --git a/apps/server/src/modules/legacy-school/legacy-school.config.ts b/apps/server/src/modules/legacy-school/legacy-school.config.ts index 0afa19ebd23..af1f01c93a9 100644 --- a/apps/server/src/modules/legacy-school/legacy-school.config.ts +++ b/apps/server/src/modules/legacy-school/legacy-school.config.ts @@ -1,4 +1,4 @@ import { GroupConfig } from '@modules/group'; -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface LegacySchoolConfig extends GroupConfig, LoggerConfig {} diff --git a/apps/server/src/modules/legacy-school/legacy-school.module.ts b/apps/server/src/modules/legacy-school/legacy-school.module.ts index da8cbecac92..aa00988dc98 100644 --- a/apps/server/src/modules/legacy-school/legacy-school.module.ts +++ b/apps/server/src/modules/legacy-school/legacy-school.module.ts @@ -2,7 +2,7 @@ import { GroupModule } from '@modules/group'; import { forwardRef, Module } from '@nestjs/common'; import { FederalStateRepo, LegacySchoolRepo } from '@shared/repo'; import { StorageProviderRepo } from '@shared/repo/storageprovider'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { SchoolSystemOptionsRepo, SchoolYearRepo } from './repo'; import { FederalStateService, diff --git a/apps/server/src/modules/legacy-school/loggable/admin-api-school-create-no-id-error.loggable.ts b/apps/server/src/modules/legacy-school/loggable/admin-api-school-create-no-id-error.loggable.ts index f8227a205d7..927b0d52bd8 100644 --- a/apps/server/src/modules/legacy-school/loggable/admin-api-school-create-no-id-error.loggable.ts +++ b/apps/server/src/modules/legacy-school/loggable/admin-api-school-create-no-id-error.loggable.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class AdminApiSchoolCreateNoIdErrorLoggable extends InternalServerErrorException implements Loggable { getLogMessage(): LogMessage | ErrorLogMessage | ValidationErrorLogMessage { diff --git a/apps/server/src/modules/legacy-school/loggable/provisioning-options-invalid-type.loggable-exception.ts b/apps/server/src/modules/legacy-school/loggable/provisioning-options-invalid-type.loggable-exception.ts index 82ac278ce1f..4318df9d1ef 100644 --- a/apps/server/src/modules/legacy-school/loggable/provisioning-options-invalid-type.loggable-exception.ts +++ b/apps/server/src/modules/legacy-school/loggable/provisioning-options-invalid-type.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { type AnyProvisioningOptions } from '../domain'; export class ProvisioningOptionsInvalidTypeLoggableException extends UnprocessableEntityException implements Loggable { diff --git a/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-invalid-options.loggable-exception.ts b/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-invalid-options.loggable-exception.ts index 375127bbd18..094080e583a 100644 --- a/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-invalid-options.loggable-exception.ts +++ b/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-invalid-options.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ProvisioningOptionsInterface } from '../interface'; export class ProvisioningStrategyInvalidOptionsLoggableException diff --git a/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-missing.loggable-exception.ts b/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-missing.loggable-exception.ts index df200ef9289..d1a0df4ab2b 100644 --- a/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-missing.loggable-exception.ts +++ b/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-missing.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ProvisioningStrategyMissingLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly systemId: EntityId) { diff --git a/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-no-options.loggable-exception.ts b/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-no-options.loggable-exception.ts index 69a1726459c..699f36e257b 100644 --- a/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-no-options.loggable-exception.ts +++ b/apps/server/src/modules/legacy-school/loggable/provisioning-strategy-no-options.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ProvisioningStrategyNoOptionsLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly provisioningStrategy: SystemProvisioningStrategy) { diff --git a/apps/server/src/modules/legacy-school/loggable/school-number-duplicate.loggable-exception.ts b/apps/server/src/modules/legacy-school/loggable/school-number-duplicate.loggable-exception.ts index 8d87465c352..241aada61e1 100644 --- a/apps/server/src/modules/legacy-school/loggable/school-number-duplicate.loggable-exception.ts +++ b/apps/server/src/modules/legacy-school/loggable/school-number-duplicate.loggable-exception.ts @@ -1,5 +1,5 @@ import { UnprocessableEntityException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolNumberDuplicateLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly officialSchoolNumber: string) { diff --git a/apps/server/src/modules/legacy-school/loggable/schoolyear-no-years-left.loggable.ts b/apps/server/src/modules/legacy-school/loggable/schoolyear-no-years-left.loggable.ts index a9dc93fe0f0..6ad46a99fe4 100644 --- a/apps/server/src/modules/legacy-school/loggable/schoolyear-no-years-left.loggable.ts +++ b/apps/server/src/modules/legacy-school/loggable/schoolyear-no-years-left.loggable.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolYearsNoYearsLeft extends InternalServerErrorException implements Loggable { // this is a 500, because our development team is responsible to create schoolyears. diff --git a/apps/server/src/modules/lesson/controller/api-test/lesson-tasks.api.spec.ts b/apps/server/src/modules/lesson/controller/api-test/lesson-tasks.api.spec.ts index f21aae879c8..6ff148c2b19 100644 --- a/apps/server/src/modules/lesson/controller/api-test/lesson-tasks.api.spec.ts +++ b/apps/server/src/modules/lesson/controller/api-test/lesson-tasks.api.spec.ts @@ -1,7 +1,7 @@ import { EntityManager } from '@mikro-orm/core'; +import { ServerTestModule } from '@modules/server'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { ServerTestModule } from '@src/modules/server'; import { courseFactory } from '@testing/factory/course.factory'; import { lessonFactory } from '@testing/factory/lesson.factory'; import { taskFactory } from '@testing/factory/task.factory'; diff --git a/apps/server/src/modules/lesson/lesson.module.ts b/apps/server/src/modules/lesson/lesson.module.ts index 27b81121557..01b7d243436 100644 --- a/apps/server/src/modules/lesson/lesson.module.ts +++ b/apps/server/src/modules/lesson/lesson.module.ts @@ -3,7 +3,7 @@ import { CopyHelperModule } from '@modules/copy-helper'; import { FilesStorageClientModule } from '@modules/files-storage-client'; import { TaskModule } from '@modules/task'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CqrsModule } from '@nestjs/cqrs'; import { LessonRepo } from './repository'; import { EtherpadService, LessonCopyService, LessonService, NexboardService } from './service'; 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 001ebf5b526..8bb58bf665f 100644 --- a/apps/server/src/modules/lesson/service/etherpad.service.spec.ts +++ b/apps/server/src/modules/lesson/service/etherpad.service.spec.ts @@ -3,7 +3,7 @@ import { FeathersServiceProvider } from '@infra/feathers/feathers-service.provid import { ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { EtherpadService } from './etherpad.service'; describe('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 62e0773071b..84639784db9 100644 --- a/apps/server/src/modules/lesson/service/etherpad.service.ts +++ b/apps/server/src/modules/lesson/service/etherpad.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; import { FeathersServiceProvider } from '@infra/feathers'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; export type PadResponse = { data: { padID: string } }; diff --git a/apps/server/src/modules/lesson/service/lesson.service.spec.ts b/apps/server/src/modules/lesson/service/lesson.service.spec.ts index 739eae3666e..95d137c6ab7 100644 --- a/apps/server/src/modules/lesson/service/lesson.service.spec.ts +++ b/apps/server/src/modules/lesson/service/lesson.service.spec.ts @@ -14,7 +14,7 @@ import { FilesStorageClientAdapterService } from '@modules/files-storage-client' import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { ComponentProperties, ComponentType } from '@shared/domain/entity'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { lessonFactory } from '@testing/factory/lesson.factory'; import { setupEntities } from '@testing/setup-entities'; import { LessonRepo } from '../repository'; diff --git a/apps/server/src/modules/lesson/service/lesson.service.ts b/apps/server/src/modules/lesson/service/lesson.service.ts index ec33d569174..3044e218cd2 100644 --- a/apps/server/src/modules/lesson/service/lesson.service.ts +++ b/apps/server/src/modules/lesson/service/lesson.service.ts @@ -16,7 +16,7 @@ import { Injectable } from '@nestjs/common'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { ComponentProperties, LessonEntity } from '@shared/domain/entity'; import { Counted, EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { AuthorizableReferenceType, AuthorizationInjectionService, 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 6f53e361d84..9b21617bab7 100644 --- a/apps/server/src/modules/lesson/service/nexboard.service.spec.ts +++ b/apps/server/src/modules/lesson/service/nexboard.service.spec.ts @@ -3,7 +3,7 @@ import { FeathersServiceProvider } from '@infra/feathers'; import { ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { NexboardService } from './nexboard.service'; describe('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 31da21a9f92..b34bc25214b 100644 --- a/apps/server/src/modules/lesson/service/nexboard.service.ts +++ b/apps/server/src/modules/lesson/service/nexboard.service.ts @@ -1,5 +1,5 @@ import { FeathersServiceProvider } from '@infra/feathers/feathers-service.provider'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; diff --git a/apps/server/src/modules/lti-tool/lti-tool.module.ts b/apps/server/src/modules/lti-tool/lti-tool.module.ts index abe8633ab62..93b94c862de 100644 --- a/apps/server/src/modules/lti-tool/lti-tool.module.ts +++ b/apps/server/src/modules/lti-tool/lti-tool.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { LtiToolRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { LtiToolService } from './service'; @Module({ diff --git a/apps/server/src/modules/management/management-server.app.module.ts b/apps/server/src/modules/management/management-server.app.module.ts index 85bdea338d2..b5c1c9f5d23 100644 --- a/apps/server/src/modules/management/management-server.app.module.ts +++ b/apps/server/src/modules/management/management-server.app.module.ts @@ -1,10 +1,10 @@ +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { MongoMemoryDatabaseModule } from '@infra/database'; import { MongoDatabaseModuleOptions } from '@infra/database/mongo-memory-database/types'; // Fix me!! import { MikroOrmModule } from '@mikro-orm/nestjs'; import { DynamicModule, Module } from '@nestjs/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import { ManagementModule } from './management.module'; @Module({ diff --git a/apps/server/src/modules/management/management.module.ts b/apps/server/src/modules/management/management.module.ts index b2d832c9de2..5aeb168982f 100644 --- a/apps/server/src/modules/management/management.module.ts +++ b/apps/server/src/modules/management/management.module.ts @@ -9,7 +9,7 @@ import { serverConfig } from '@modules/server'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { DatabaseManagementConsole } from './console/database-management.console'; import { DatabaseManagementController } from './controller/database-management.controller'; import { BsonConverter } from './converter/bson.converter'; diff --git a/apps/server/src/modules/management/seed-data/schools.ts b/apps/server/src/modules/management/seed-data/schools.ts index 105255bedd9..411a80141ec 100644 --- a/apps/server/src/modules/management/seed-data/schools.ts +++ b/apps/server/src/modules/management/seed-data/schools.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/dot-notation */ import { ObjectId } from '@mikro-orm/mongodb'; +import { FileStorageType } from '@modules/school/domain/type/file-storage-type.enum'; import { SystemEntity } from '@modules/system/entity'; import { FederalStateEntity, SchoolProperties, SchoolRoles, SchoolYearEntity } from '@shared/domain/entity'; import { LanguageType } from '@shared/domain/interface'; import { SchoolFeature, SchoolPurpose } from '@shared/domain/types'; -import { FileStorageType } from '@src/modules/school/domain/type/file-storage-type.enum'; import { federalStateFactory } from '@testing/factory/federal-state.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { DeepPartial } from 'fishery'; 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 ea048d083ca..c25f8b752a6 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 @@ -8,7 +8,7 @@ import { SystemEntity } from '@modules/system/entity'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { StorageProviderEntity } from '@shared/domain/entity'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; import { BsonConverter } from '../converter/bson.converter'; import { generateSeedData } from '../seed-data/generateSeedData'; 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 88b3bf78fac..187a8980cb6 100644 --- a/apps/server/src/modules/management/uc/database-management.uc.ts +++ b/apps/server/src/modules/management/uc/database-management.uc.ts @@ -8,7 +8,7 @@ import { SystemEntity } from '@modules/system/entity'; import { Inject, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { StorageProviderEntity } from '@shared/domain/entity'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { orderBy } from 'lodash'; import { BsonConverter } from '../converter/bson.converter'; import { generateSeedData } from '../seed-data/generateSeedData'; diff --git a/apps/server/src/modules/me/api/mapper/me.response.mapper.ts b/apps/server/src/modules/me/api/mapper/me.response.mapper.ts index da156a50891..337441a6bf5 100644 --- a/apps/server/src/modules/me/api/mapper/me.response.mapper.ts +++ b/apps/server/src/modules/me/api/mapper/me.response.mapper.ts @@ -1,7 +1,7 @@ +import { School } from '@modules/school'; +import { System } from '@modules/system'; import { Role, User } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; -import { School } from '@src/modules/school'; -import { System } from '@src/modules/system'; import { MeAccountResponse, MeResponse, diff --git a/apps/server/src/modules/me/api/me.uc.ts b/apps/server/src/modules/me/api/me.uc.ts index c36a7e9fd50..0d2bfb987fd 100644 --- a/apps/server/src/modules/me/api/me.uc.ts +++ b/apps/server/src/modules/me/api/me.uc.ts @@ -1,8 +1,8 @@ +import { SchoolService } from '@modules/school'; +import { System, SystemService } from '@modules/system'; +import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { SchoolService } from '@src/modules/school'; -import { UserService } from '@src/modules/user'; -import { System, SystemService } from '@src/modules/system'; import { MeResponse } from './dto'; import { MeResponseMapper } from './mapper'; diff --git a/apps/server/src/modules/me/api/test/me.controller.api.spec.ts b/apps/server/src/modules/me/api/test/me.controller.api.spec.ts index ae7f2a0296f..9c30d734a88 100644 --- a/apps/server/src/modules/me/api/test/me.controller.api.spec.ts +++ b/apps/server/src/modules/me/api/test/me.controller.api.spec.ts @@ -1,10 +1,10 @@ import { ICurrentUser, JwtAuthGuard } from '@infra/auth-guard'; import { EntityManager } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { ServerTestModule } from '@modules/server'; import { ExecutionContext, HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import type { User } from '@shared/domain/entity'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { ServerTestModule } from '@src/modules/server'; import { currentUserFactory } from '@testing/factory/currentuser.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { systemEntityFactory } from '@testing/factory/systemEntityFactory'; diff --git a/apps/server/src/modules/media-source/loggable/media-source-basic-auth-config-not-found-loggable.exception.ts b/apps/server/src/modules/media-source/loggable/media-source-basic-auth-config-not-found-loggable.exception.ts index aa1f51f6225..acc828780c8 100644 --- a/apps/server/src/modules/media-source/loggable/media-source-basic-auth-config-not-found-loggable.exception.ts +++ b/apps/server/src/modules/media-source/loggable/media-source-basic-auth-config-not-found-loggable.exception.ts @@ -1,5 +1,5 @@ import { NotFoundException } from '@nestjs/common'; -import { ErrorLogMessage, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class MediaSourceBasicAuthConfigNotFoundLoggableException extends NotFoundException { constructor(private readonly mediaSourceId: string, private readonly mediaSourceName: string) { diff --git a/apps/server/src/modules/meta-tag-extractor/controller/meta-tag-extractor.controller.ts b/apps/server/src/modules/meta-tag-extractor/controller/meta-tag-extractor.controller.ts index d84511885a0..e4c8568c4e8 100644 --- a/apps/server/src/modules/meta-tag-extractor/controller/meta-tag-extractor.controller.ts +++ b/apps/server/src/modules/meta-tag-extractor/controller/meta-tag-extractor.controller.ts @@ -1,6 +1,6 @@ +import { CurrentUser, ICurrentUser, JwtAuthentication } from '@infra/auth-guard'; import { Body, Controller, InternalServerErrorException, Post, UnauthorizedException } from '@nestjs/common'; import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; -import { CurrentUser, ICurrentUser, JwtAuthentication } from '@src/infra/auth-guard'; import { MetaTagExtractorUc } from '../uc'; import { MetaTagExtractorResponse } from './dto'; import { GetMetaTagDataBody } from './post-link-url.body.params'; diff --git a/apps/server/src/modules/meta-tag-extractor/loggable/invalid-link-url.loggable.ts b/apps/server/src/modules/meta-tag-extractor/loggable/invalid-link-url.loggable.ts index 9704009a3ec..d104ba35234 100644 --- a/apps/server/src/modules/meta-tag-extractor/loggable/invalid-link-url.loggable.ts +++ b/apps/server/src/modules/meta-tag-extractor/loggable/invalid-link-url.loggable.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class InvalidLinkUrlLoggableException extends BadRequestException implements Loggable { constructor(private readonly url: string, readonly message: string) { diff --git a/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor-api.module.ts b/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor-api.module.ts index acc5eb31776..b8f17c1a82b 100644 --- a/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor-api.module.ts +++ b/apps/server/src/modules/meta-tag-extractor/meta-tag-extractor-api.module.ts @@ -1,6 +1,6 @@ import { AuthorizationModule } from '@modules/authorization'; import { forwardRef, Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { MetaTagExtractorController } from './controller'; import { MetaTagExtractorModule } from './meta-tag-extractor.module'; import { MetaTagExtractorUc } from './uc'; 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 d035303fece..301e46bc62a 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 @@ -8,7 +8,7 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import metaTagExtractorConfig from './meta-tag-extractor.config'; import { MetaTagExtractorService } from './service'; import { MetaTagExternalUrlService } from './service/meta-tag-external-url.service'; diff --git a/apps/server/src/modules/news/controller/api-test/news.api.spec.ts b/apps/server/src/modules/news/controller/api-test/news.api.spec.ts index 33c2618d6b2..eba4930fd72 100644 --- a/apps/server/src/modules/news/controller/api-test/news.api.spec.ts +++ b/apps/server/src/modules/news/controller/api-test/news.api.spec.ts @@ -6,7 +6,7 @@ import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { News, User } from '@shared/domain/entity'; import { EntityId, NewsTargetModel } from '@shared/domain/types'; -import { API_VALIDATION_ERROR_TYPE } from '@src/core/error/server-error-types'; +import { API_VALIDATION_ERROR_TYPE } from '@core/error/server-error-types'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; import { TestApiClient } from '@testing/test-api-client'; import moment from 'moment'; diff --git a/apps/server/src/modules/news/loggable/news-crud-operation.loggable.ts b/apps/server/src/modules/news/loggable/news-crud-operation.loggable.ts index 1d4c35845b1..93ad8888aec 100644 --- a/apps/server/src/modules/news/loggable/news-crud-operation.loggable.ts +++ b/apps/server/src/modules/news/loggable/news-crud-operation.loggable.ts @@ -1,7 +1,7 @@ import { News } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { CrudOperation } from '@shared/types'; -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; import { NewsMapper } from '../mapper/news.mapper'; export class NewsCrudOperationLoggable implements Loggable { diff --git a/apps/server/src/modules/news/mapper/news.mapper.ts b/apps/server/src/modules/news/mapper/news.mapper.ts index f410e1183fe..46e20e7ef17 100644 --- a/apps/server/src/modules/news/mapper/news.mapper.ts +++ b/apps/server/src/modules/news/mapper/news.mapper.ts @@ -1,6 +1,6 @@ import { News } from '@shared/domain/entity'; import { CreateNews, INewsScope, IUpdateNews, NewsTargetModel } from '@shared/domain/types'; -import { LogMessageData } from '@src/core/logger'; +import { LogMessageData } from '@core/logger'; import { CreateNewsParams, FilterNewsParams, NewsResponse, UpdateNewsParams } from '../controller/dto'; import { SchoolInfoMapper } from './school-info.mapper'; import { TargetInfoMapper } from './target-info.mapper'; diff --git a/apps/server/src/modules/news/news.config.ts b/apps/server/src/modules/news/news.config.ts index 537b2bf9bf5..c5edf13dfdc 100644 --- a/apps/server/src/modules/news/news.config.ts +++ b/apps/server/src/modules/news/news.config.ts @@ -1,4 +1,4 @@ import { AuthorizationConfig } from '@modules/authorization'; -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface NewsConfig extends AuthorizationConfig, LoggerConfig {} diff --git a/apps/server/src/modules/news/news.module.ts b/apps/server/src/modules/news/news.module.ts index 996d82fc813..8359ef1cf55 100644 --- a/apps/server/src/modules/news/news.module.ts +++ b/apps/server/src/modules/news/news.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { NewsRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { AuthorizationModule } from '@modules/authorization'; import { CqrsModule } from '@nestjs/cqrs'; import { NewsController } from './controller/news.controller'; diff --git a/apps/server/src/modules/news/service/news.service.spec.ts b/apps/server/src/modules/news/service/news.service.spec.ts index bef979335a7..b3e645202df 100644 --- a/apps/server/src/modules/news/service/news.service.spec.ts +++ b/apps/server/src/modules/news/service/news.service.spec.ts @@ -12,7 +12,7 @@ import { deletionRequestFactory } from '@modules/deletion/domain/testing'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { NewsRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { teamNewsFactory } from '@testing/factory/news.factory'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/news/service/news.service.ts b/apps/server/src/modules/news/service/news.service.ts index 0dc607f2a4d..c948c56258d 100644 --- a/apps/server/src/modules/news/service/news.service.ts +++ b/apps/server/src/modules/news/service/news.service.ts @@ -16,7 +16,7 @@ import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { News } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { NewsRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; @Injectable() @EventsHandler(UserDeletedEvent) diff --git a/apps/server/src/modules/news/uc/news.uc.spec.ts b/apps/server/src/modules/news/uc/news.uc.spec.ts index c55a01d754c..15132bc8894 100644 --- a/apps/server/src/modules/news/uc/news.uc.spec.ts +++ b/apps/server/src/modules/news/uc/news.uc.spec.ts @@ -7,7 +7,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface'; import { CreateNews, NewsTargetModel } from '@shared/domain/types'; import { NewsRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { NewsUc } from './news.uc'; describe('NewsUc', () => { diff --git a/apps/server/src/modules/news/uc/news.uc.ts b/apps/server/src/modules/news/uc/news.uc.ts index 7949fe3859e..02dd2d1c84d 100644 --- a/apps/server/src/modules/news/uc/news.uc.ts +++ b/apps/server/src/modules/news/uc/news.uc.ts @@ -5,7 +5,7 @@ import { IFindOptions, Permission, SortOrder } from '@shared/domain/interface'; import { Counted, CreateNews, EntityId, INewsScope, IUpdateNews, NewsTargetModel } from '@shared/domain/types'; import { NewsRepo, NewsTargetFilter } from '@shared/repo'; import { CrudOperation } from '@shared/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { NewsCrudOperationLoggable } from '../loggable/news-crud-operation.loggable'; type NewsPermission = Permission.NEWS_VIEW | Permission.NEWS_EDIT; diff --git a/apps/server/src/modules/oauth-provider/api/test/oauth-provider.controller.api.spec.ts b/apps/server/src/modules/oauth-provider/api/test/oauth-provider.controller.api.spec.ts index c5bd663896b..8068093d536 100644 --- a/apps/server/src/modules/oauth-provider/api/test/oauth-provider.controller.api.spec.ts +++ b/apps/server/src/modules/oauth-provider/api/test/oauth-provider.controller.api.spec.ts @@ -1,10 +1,10 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { EntityManager } from '@mikro-orm/mongodb'; import { ServerTestModule } from '@modules/server'; +import { externalToolEntityFactory } from '@modules/tool/external-tool/testing'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface'; -import { externalToolEntityFactory } from '@src/modules/tool/external-tool/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { externalToolPseudonymEntityFactory } from '@testing/factory/external-tool-pseudonym.factory'; import { ltiToolFactory } from '@testing/factory/ltitool.factory'; diff --git a/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.ts b/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.ts index c92dd3c7fff..7a475137aa3 100644 --- a/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.ts +++ b/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.ts @@ -1,4 +1,4 @@ -import { AxiosErrorLoggable } from '@src/core/error/loggable'; +import { AxiosErrorLoggable } from '@core/error/loggable'; import { AxiosError } from 'axios'; export class HydraOauthFailedLoggableException extends AxiosErrorLoggable { diff --git a/apps/server/src/modules/oauth-provider/domain/error/id-token-creation-exception.loggable.ts b/apps/server/src/modules/oauth-provider/domain/error/id-token-creation-exception.loggable.ts index 4308f1481fe..1fc117f9a37 100644 --- a/apps/server/src/modules/oauth-provider/domain/error/id-token-creation-exception.loggable.ts +++ b/apps/server/src/modules/oauth-provider/domain/error/id-token-creation-exception.loggable.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class IdTokenCreationLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly clientId: string, private readonly userId?: string) { 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 da0009efaf0..d163414b378 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 @@ -2,7 +2,7 @@ import { AuthorizationModule } from '@modules/authorization'; import { PseudonymModule } from '@modules/pseudonym'; import { UserModule } from '@modules/user'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { OauthProviderClientCrudUc, OauthProviderConsentFlowUc, 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 3be491ab6dd..96f6289e867 100644 --- a/apps/server/src/modules/oauth-provider/oauth-provider.module.ts +++ b/apps/server/src/modules/oauth-provider/oauth-provider.module.ts @@ -4,7 +4,7 @@ import { ToolModule } from '@modules/tool'; import { UserModule } from '@modules/user'; import { Module } from '@nestjs/common'; import { TeamsRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { IdTokenService } from './domain/service/id-token.service'; import { OauthProviderLoginFlowService } from './domain/service/oauth-provider.login-flow.service'; import { OauthProviderServiceModule } from './oauth-provider-service.module'; diff --git a/apps/server/src/modules/oauth/controller/oauth-sso.controller.spec.ts b/apps/server/src/modules/oauth/controller/oauth-sso.controller.spec.ts index 0f8c80db5c9..cc255013f96 100644 --- a/apps/server/src/modules/oauth/controller/oauth-sso.controller.spec.ts +++ b/apps/server/src/modules/oauth/controller/oauth-sso.controller.spec.ts @@ -3,7 +3,7 @@ import { Configuration } from '@hpi-schul-cloud/commons'; import { HydraOauthUc } from '@modules/oauth/uc/hydra-oauth.uc'; import { UnauthorizedException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { currentUserFactory } from '@testing/factory/currentuser.factory'; import { Request } from 'express'; import { StatelessAuthorizationParams } from './dto/stateless-authorization.params'; diff --git a/apps/server/src/modules/oauth/controller/oauth-sso.controller.ts b/apps/server/src/modules/oauth/controller/oauth-sso.controller.ts index 6d79b37bf6d..e62e6ae12ef 100644 --- a/apps/server/src/modules/oauth/controller/oauth-sso.controller.ts +++ b/apps/server/src/modules/oauth/controller/oauth-sso.controller.ts @@ -1,7 +1,7 @@ import { CurrentUser, ICurrentUser, JwtAuthentication } from '@infra/auth-guard'; import { Controller, Get, Param, Query, Req, UnauthorizedException } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { Request } from 'express'; import { OAuthTokenDto } from '../interface'; import { HydraOauthUc } from '../uc'; diff --git a/apps/server/src/modules/oauth/loggable/auth-code-failure-loggable-exception.ts b/apps/server/src/modules/oauth/loggable/auth-code-failure-loggable-exception.ts index ebe1ce78454..d645ac1b65c 100644 --- a/apps/server/src/modules/oauth/loggable/auth-code-failure-loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/auth-code-failure-loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class AuthCodeFailureLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly errorCode?: string) { diff --git a/apps/server/src/modules/oauth/loggable/id-token-extraction-failure-loggable-exception.ts b/apps/server/src/modules/oauth/loggable/id-token-extraction-failure-loggable-exception.ts index f7c0cd8e5a5..96cdf0e334f 100644 --- a/apps/server/src/modules/oauth/loggable/id-token-extraction-failure-loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/id-token-extraction-failure-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class IdTokenExtractionFailureLoggableException extends BusinessError implements Loggable { constructor(private readonly fieldName: string) { diff --git a/apps/server/src/modules/oauth/loggable/id-token-user-not-found-loggable-exception.ts b/apps/server/src/modules/oauth/loggable/id-token-user-not-found-loggable-exception.ts index 50c4069950b..caed6f79198 100644 --- a/apps/server/src/modules/oauth/loggable/id-token-user-not-found-loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/id-token-user-not-found-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class IdTokenUserNotFoundLoggableException extends BusinessError implements Loggable { constructor(private readonly uuid: string, private readonly additionalInfo?: string) { diff --git a/apps/server/src/modules/oauth/loggable/multiple-users-found.loggable-exception.ts b/apps/server/src/modules/oauth/loggable/multiple-users-found.loggable-exception.ts index 270237a1ef4..f2de85212aa 100644 --- a/apps/server/src/modules/oauth/loggable/multiple-users-found.loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/multiple-users-found.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class MultipleUsersFoundLoggableException extends BusinessError implements Loggable { constructor(private readonly externalUserId: string) { diff --git a/apps/server/src/modules/oauth/loggable/oauth-config-missing-loggable-exception.ts b/apps/server/src/modules/oauth/loggable/oauth-config-missing-loggable-exception.ts index d36550ac44c..c2b97a579b5 100644 --- a/apps/server/src/modules/oauth/loggable/oauth-config-missing-loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/oauth-config-missing-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class OauthConfigMissingLoggableException extends BusinessError implements Loggable { constructor(private readonly systemId: string) { diff --git a/apps/server/src/modules/oauth/loggable/token-invalid-loggable-exception.ts b/apps/server/src/modules/oauth/loggable/token-invalid-loggable-exception.ts index 827c6a347ba..1d774b6561f 100644 --- a/apps/server/src/modules/oauth/loggable/token-invalid-loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/token-invalid-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class TokenInvalidLoggableException extends BusinessError implements Loggable { constructor() { diff --git a/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.ts b/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.ts index fd852186829..f19cc3c48a6 100644 --- a/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.ts @@ -1,4 +1,4 @@ -import { AxiosErrorLoggable } from '@src/core/error/loggable'; +import { AxiosErrorLoggable } from '@core/error/loggable'; import { AxiosError } from 'axios'; export class TokenRequestLoggableException extends AxiosErrorLoggable { diff --git a/apps/server/src/modules/oauth/loggable/user-not-found-after-provisioning.loggable-exception.ts b/apps/server/src/modules/oauth/loggable/user-not-found-after-provisioning.loggable-exception.ts index 1ec225a0e4b..d4593d7ea37 100644 --- a/apps/server/src/modules/oauth/loggable/user-not-found-after-provisioning.loggable-exception.ts +++ b/apps/server/src/modules/oauth/loggable/user-not-found-after-provisioning.loggable-exception.ts @@ -1,7 +1,7 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserNotFoundAfterProvisioningLoggableException extends BusinessError implements Loggable { constructor( diff --git a/apps/server/src/modules/oauth/oauth-api.module.ts b/apps/server/src/modules/oauth/oauth-api.module.ts index 880f11dc731..eeb7080c131 100644 --- a/apps/server/src/modules/oauth/oauth-api.module.ts +++ b/apps/server/src/modules/oauth/oauth-api.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { OauthSSOController } from './controller/oauth-sso.controller'; import { OauthModule } from './oauth.module'; import { HydraOauthUc } from './uc'; diff --git a/apps/server/src/modules/oauth/oauth.module.ts b/apps/server/src/modules/oauth/oauth.module.ts index 7e512fb33b4..51ef4b3537f 100644 --- a/apps/server/src/modules/oauth/oauth.module.ts +++ b/apps/server/src/modules/oauth/oauth.module.ts @@ -9,7 +9,7 @@ import { UserLoginMigrationModule } from '@modules/user-login-migration'; import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { LtiToolRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { OAUTH_SESSION_TOKEN_REPO, OauthSessionTokenMikroOrmRepo } from './repo'; import { HydraSsoService, OauthAdapterService, OAuthService, OauthSessionTokenService } from './service'; 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 6522d04b2d5..0a9d4a845d3 100644 --- a/apps/server/src/modules/oauth/service/hydra.service.spec.ts +++ b/apps/server/src/modules/oauth/service/hydra.service.spec.ts @@ -12,7 +12,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; import { LtiPrivacyPermission, LtiRoleType } from '@shared/domain/entity'; import { LtiToolRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { AxiosResponse } from 'axios'; import { of } from 'rxjs'; diff --git a/apps/server/src/modules/oauth/service/hydra.service.ts b/apps/server/src/modules/oauth/service/hydra.service.ts index 04e93b1a2d7..fc5db8036cb 100644 --- a/apps/server/src/modules/oauth/service/hydra.service.ts +++ b/apps/server/src/modules/oauth/service/hydra.service.ts @@ -9,7 +9,7 @@ import { Inject, InternalServerErrorException } from '@nestjs/common'; import { Injectable } from '@nestjs/common/decorators/core/injectable.decorator'; import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; import { LtiToolRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { nanoid } from 'nanoid'; import QueryString from 'qs'; 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 6f416f13b1d..36823eae9b4 100644 --- a/apps/server/src/modules/oauth/service/oauth.service.spec.ts +++ b/apps/server/src/modules/oauth/service/oauth.service.spec.ts @@ -1,9 +1,12 @@ +import { LegacyLogger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Configuration } from '@hpi-schul-cloud/commons'; import { DefaultEncryptionService, EncryptionService, SymmetricKeyEncryptionService } from '@infra/encryption'; import { ObjectId } from '@mikro-orm/mongodb'; import { LegacySchoolService } from '@modules/legacy-school'; import { ProvisioningService } from '@modules/provisioning'; +import { OauthDataDto } from '@modules/provisioning/dto'; +import { System } from '@modules/system'; import { OauthConfigEntity } from '@modules/system/entity'; import { SystemService } from '@modules/system/service'; import { systemFactory, systemOauthConfigFactory } from '@modules/system/testing'; @@ -13,9 +16,6 @@ import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, UserDO } from '@shared/domain/domainobject'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; import { SchoolFeature } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; -import { OauthDataDto } from '@src/modules/provisioning/dto'; -import { System } from '@src/modules/system'; import { legacySchoolDoFactory } from '@testing/factory/domainobject'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/oauth/service/oauth.service.ts b/apps/server/src/modules/oauth/service/oauth.service.ts index c02843fa679..2c637fcd39d 100644 --- a/apps/server/src/modules/oauth/service/oauth.service.ts +++ b/apps/server/src/modules/oauth/service/oauth.service.ts @@ -11,7 +11,7 @@ import { Injectable } from '@nestjs/common/decorators/core/injectable.decorator' import { isObject } from '@nestjs/common/utils/shared.utils'; import { LegacySchoolDo, UserDO } from '@shared/domain/domainobject'; import { EntityId, SchoolFeature } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import jwt, { JwtPayload } from 'jsonwebtoken'; import { OAuthTokenDto } from '../interface'; import { diff --git a/apps/server/src/modules/oauth/uc/hydra-oauth.uc.spec.ts b/apps/server/src/modules/oauth/uc/hydra-oauth.uc.spec.ts index 56c92539a5b..0fea7ad8664 100644 --- a/apps/server/src/modules/oauth/uc/hydra-oauth.uc.spec.ts +++ b/apps/server/src/modules/oauth/uc/hydra-oauth.uc.spec.ts @@ -6,7 +6,7 @@ import { OauthConfigEntity } from '@modules/system/entity'; import { HttpModule } from '@nestjs/axios'; import { InternalServerErrorException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { AxiosResponse } from 'axios'; import { HydraOauthUc } from '.'; diff --git a/apps/server/src/modules/oauth/uc/hydra-oauth.uc.ts b/apps/server/src/modules/oauth/uc/hydra-oauth.uc.ts index 596aaf2e475..d84fb5c4a4d 100644 --- a/apps/server/src/modules/oauth/uc/hydra-oauth.uc.ts +++ b/apps/server/src/modules/oauth/uc/hydra-oauth.uc.ts @@ -1,6 +1,6 @@ import { OauthConfigEntity } from '@modules/system/entity'; import { Injectable, InternalServerErrorException } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { AuthorizationParams } from '../controller/dto'; import { OAuthTokenDto } from '../interface'; diff --git a/apps/server/src/modules/provisioning/domain/error/invalid-laufzeit-response.loggable-exception.ts b/apps/server/src/modules/provisioning/domain/error/invalid-laufzeit-response.loggable-exception.ts index bb46677224e..e9557e26a09 100644 --- a/apps/server/src/modules/provisioning/domain/error/invalid-laufzeit-response.loggable-exception.ts +++ b/apps/server/src/modules/provisioning/domain/error/invalid-laufzeit-response.loggable-exception.ts @@ -1,6 +1,6 @@ import { SchulconnexLaufzeitResponse } from '@infra/schulconnex-client'; import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class InvalidLaufzeitResponseLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly laufzeit: SchulconnexLaufzeitResponse) { diff --git a/apps/server/src/modules/provisioning/domain/error/invalid-lernperiode-response.loggable-exception.ts b/apps/server/src/modules/provisioning/domain/error/invalid-lernperiode-response.loggable-exception.ts index 6138b24c7f1..445cc269ae7 100644 --- a/apps/server/src/modules/provisioning/domain/error/invalid-lernperiode-response.loggable-exception.ts +++ b/apps/server/src/modules/provisioning/domain/error/invalid-lernperiode-response.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class InvalidLernperiodeResponseLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly lernperiode: string) { diff --git a/apps/server/src/modules/provisioning/loggable/bad-data.loggable-exception.ts b/apps/server/src/modules/provisioning/loggable/bad-data.loggable-exception.ts index 274af3234b1..0f225c2ca93 100644 --- a/apps/server/src/modules/provisioning/loggable/bad-data.loggable-exception.ts +++ b/apps/server/src/modules/provisioning/loggable/bad-data.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, LogMessageData, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, LogMessageData, ValidationErrorLogMessage } from '@core/logger'; export class BadDataLoggableException extends BusinessError implements Loggable { constructor(message?: string, details?: Record) { diff --git a/apps/server/src/modules/provisioning/loggable/fetching-policies-info-failed.loggable.ts b/apps/server/src/modules/provisioning/loggable/fetching-policies-info-failed.loggable.ts index fd4df0e9b5e..b63f4723e33 100644 --- a/apps/server/src/modules/provisioning/loggable/fetching-policies-info-failed.loggable.ts +++ b/apps/server/src/modules/provisioning/loggable/fetching-policies-info-failed.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ExternalUserDto } from '../dto'; export class FetchingPoliciesInfoFailedLoggable implements Loggable { diff --git a/apps/server/src/modules/provisioning/loggable/group-provisioning-info.loggable.ts b/apps/server/src/modules/provisioning/loggable/group-provisioning-info.loggable.ts index 57819c45388..d55fd84c17d 100644 --- a/apps/server/src/modules/provisioning/loggable/group-provisioning-info.loggable.ts +++ b/apps/server/src/modules/provisioning/loggable/group-provisioning-info.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ExternalGroupDto } from '../dto'; export class GroupProvisioningInfoLoggable implements Loggable { diff --git a/apps/server/src/modules/provisioning/loggable/group-role-unknown.loggable.ts b/apps/server/src/modules/provisioning/loggable/group-role-unknown.loggable.ts index a425ad168b2..c8cc57fb364 100644 --- a/apps/server/src/modules/provisioning/loggable/group-role-unknown.loggable.ts +++ b/apps/server/src/modules/provisioning/loggable/group-role-unknown.loggable.ts @@ -1,5 +1,5 @@ import { SchulconnexSonstigeGruppenzugehoerigeResponse } from '@infra/schulconnex-client'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class GroupRoleUnknownLoggable implements Loggable { constructor(private readonly relation: SchulconnexSonstigeGruppenzugehoerigeResponse) {} diff --git a/apps/server/src/modules/provisioning/loggable/school-external-tool-created.loggable.ts b/apps/server/src/modules/provisioning/loggable/school-external-tool-created.loggable.ts index 5525312a845..9070e5b8df8 100644 --- a/apps/server/src/modules/provisioning/loggable/school-external-tool-created.loggable.ts +++ b/apps/server/src/modules/provisioning/loggable/school-external-tool-created.loggable.ts @@ -1,6 +1,6 @@ import { SchoolExternalTool } from '@modules/tool/school-external-tool/domain'; import { MediaUserLicense } from '@modules/user-license'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolExternalToolCreatedLoggable implements Loggable { constructor(private readonly license: MediaUserLicense, private readonly schoolExternalTool: SchoolExternalTool) {} diff --git a/apps/server/src/modules/provisioning/loggable/school-for-group-not-found.loggable.ts b/apps/server/src/modules/provisioning/loggable/school-for-group-not-found.loggable.ts index af87d7b346e..a20261e01c4 100644 --- a/apps/server/src/modules/provisioning/loggable/school-for-group-not-found.loggable.ts +++ b/apps/server/src/modules/provisioning/loggable/school-for-group-not-found.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ExternalGroupDto, ExternalSchoolDto } from '../dto'; export class SchoolForGroupNotFoundLoggable implements Loggable { diff --git a/apps/server/src/modules/provisioning/loggable/school-missing.loggable-exception.ts b/apps/server/src/modules/provisioning/loggable/school-missing.loggable-exception.ts index 54727ba8f34..7d47703a4a3 100644 --- a/apps/server/src/modules/provisioning/loggable/school-missing.loggable-exception.ts +++ b/apps/server/src/modules/provisioning/loggable/school-missing.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ExternalUserDto } from '../dto'; export class SchoolMissingLoggableException extends BusinessError implements Loggable { diff --git a/apps/server/src/modules/provisioning/loggable/school-name-required-loggable-exception.ts b/apps/server/src/modules/provisioning/loggable/school-name-required-loggable-exception.ts index 47986d51e65..8c539e2986f 100644 --- a/apps/server/src/modules/provisioning/loggable/school-name-required-loggable-exception.ts +++ b/apps/server/src/modules/provisioning/loggable/school-name-required-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolNameRequiredLoggableException extends BusinessError implements Loggable { constructor(private readonly fieldName: string) { diff --git a/apps/server/src/modules/provisioning/loggable/user-for-group-not-found.loggable.ts b/apps/server/src/modules/provisioning/loggable/user-for-group-not-found.loggable.ts index 1e8b6792969..4cf35ca85b9 100644 --- a/apps/server/src/modules/provisioning/loggable/user-for-group-not-found.loggable.ts +++ b/apps/server/src/modules/provisioning/loggable/user-for-group-not-found.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ExternalGroupUserDto } from '../dto'; export class UserForGroupNotFoundLoggable implements Loggable { diff --git a/apps/server/src/modules/provisioning/loggable/user-role-unknown.loggable-exception.ts b/apps/server/src/modules/provisioning/loggable/user-role-unknown.loggable-exception.ts index a17ab899708..7dd12c82b7d 100644 --- a/apps/server/src/modules/provisioning/loggable/user-role-unknown.loggable-exception.ts +++ b/apps/server/src/modules/provisioning/loggable/user-role-unknown.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ExternalUserDto } from '../dto'; export class UserRoleUnknownLoggableException extends BusinessError implements Loggable { diff --git a/apps/server/src/modules/provisioning/provisioning.module.ts b/apps/server/src/modules/provisioning/provisioning.module.ts index a967348588b..0ce21c72e53 100644 --- a/apps/server/src/modules/provisioning/provisioning.module.ts +++ b/apps/server/src/modules/provisioning/provisioning.module.ts @@ -1,8 +1,11 @@ +import { LoggerModule } from '@core/logger'; +import { SchulconnexClientModule } from '@infra/schulconnex-client/schulconnex-client.module'; import { AccountModule } from '@modules/account'; import { ClassModule } from '@modules/class'; import { GroupModule } from '@modules/group'; import { LearnroomModule } from '@modules/learnroom'; import { LegacySchoolModule } from '@modules/legacy-school'; +import { MediaSourceModule } from '@modules/media-source/media-source.module'; import { RoleModule } from '@modules/role'; import { SchoolModule } from '@modules/school'; import { SystemModule } from '@modules/system/system.module'; @@ -10,10 +13,7 @@ import { ExternalToolModule } from '@modules/tool'; import { SchoolExternalToolModule } from '@modules/tool/school-external-tool'; import { UserModule } from '@modules/user'; import { UserLicenseModule } from '@modules/user-license'; -import { MediaSourceModule } from '@modules/media-source/media-source.module'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; -import { SchulconnexClientModule } from '@src/infra/schulconnex-client/schulconnex-client.module'; import { ProvisioningService } from './service/provisioning.service'; import { TspProvisioningService } from './service/tsp-provisioning.service'; import { diff --git a/apps/server/src/modules/provisioning/service/tsp-provisioning.service.spec.ts b/apps/server/src/modules/provisioning/service/tsp-provisioning.service.spec.ts index 667edd5d6b0..72b45fb4876 100644 --- a/apps/server/src/modules/provisioning/service/tsp-provisioning.service.spec.ts +++ b/apps/server/src/modules/provisioning/service/tsp-provisioning.service.spec.ts @@ -1,16 +1,16 @@ import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { AccountService } from '@modules/account'; +import { ClassService } from '@modules/class'; +import { classFactory } from '@modules/class/domain/testing'; +import { RoleService } from '@modules/role'; +import { SchoolService } from '@modules/school'; +import { schoolFactory } from '@modules/school/testing'; +import { UserService } from '@modules/user'; import { Test, TestingModule } from '@nestjs/testing'; import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { AccountService } from '@src/modules/account'; -import { ClassService } from '@src/modules/class'; -import { classFactory } from '@src/modules/class/domain/testing'; -import { RoleService } from '@src/modules/role'; -import { SchoolService } from '@src/modules/school'; -import { schoolFactory } from '@src/modules/school/testing'; -import { UserService } from '@src/modules/user'; import { roleDtoFactory } from '@testing/factory/role-dto.factory'; import { roleFactory } from '@testing/factory/role.factory'; import { userDoFactory } from '@testing/factory/user.do.factory'; diff --git a/apps/server/src/modules/provisioning/service/tsp-provisioning.service.ts b/apps/server/src/modules/provisioning/service/tsp-provisioning.service.ts index d4948292985..d5f8f97fad8 100644 --- a/apps/server/src/modules/provisioning/service/tsp-provisioning.service.ts +++ b/apps/server/src/modules/provisioning/service/tsp-provisioning.service.ts @@ -1,6 +1,8 @@ import { AccountSave, AccountService } from '@modules/account'; import { ClassFactory, ClassService, ClassSourceOptions } from '@modules/class'; import { RoleService } from '@modules/role'; +import { School, SchoolService } from '@modules/school'; +import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { RoleReference, UserDO } from '@shared/domain/domainobject'; @@ -8,8 +10,6 @@ import { Consent } from '@shared/domain/domainobject/consent'; import { ParentConsent } from '@shared/domain/domainobject/parent-consent'; import { UserConsent } from '@shared/domain/domainobject/user-consent'; import { RoleName } from '@shared/domain/interface'; -import { School, SchoolService } from '@src/modules/school'; -import { UserService } from '@src/modules/user'; import { ObjectId } from 'bson'; import { ExternalClassDto, ExternalSchoolDto, ExternalUserDto, OauthDataDto, ProvisioningSystemDto } from '../dto'; import { BadDataLoggableException } from '../loggable'; diff --git a/apps/server/src/modules/provisioning/strategy/iserv/iserv.strategy.spec.ts b/apps/server/src/modules/provisioning/strategy/iserv/iserv.strategy.spec.ts index bd53104c9fe..c7f1de5b339 100644 --- a/apps/server/src/modules/provisioning/strategy/iserv/iserv.strategy.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/iserv/iserv.strategy.spec.ts @@ -1,15 +1,15 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { LegacySchoolService } from '@modules/legacy-school'; +import { + IdTokenExtractionFailureLoggableException, + IdTokenUserNotFoundLoggableException, +} from '@modules/oauth/loggable'; import { UserService } from '@modules/user'; import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, UserDO } from '@shared/domain/domainobject'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { - IdTokenExtractionFailureLoggableException, - IdTokenUserNotFoundLoggableException, -} from '@src/modules/oauth/loggable'; import { legacySchoolDoFactory } from '@testing/factory/domainobject'; import { userDoFactory } from '@testing/factory/user.do.factory'; import jwt from 'jsonwebtoken'; diff --git a/apps/server/src/modules/provisioning/strategy/oidc-mock/oidc-mock.strategy.spec.ts b/apps/server/src/modules/provisioning/strategy/oidc-mock/oidc-mock.strategy.spec.ts index 24d0c6b494d..fdee528c43c 100644 --- a/apps/server/src/modules/provisioning/strategy/oidc-mock/oidc-mock.strategy.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/oidc-mock/oidc-mock.strategy.spec.ts @@ -1,6 +1,6 @@ +import { IdTokenExtractionFailureLoggableException } from '@modules/oauth/loggable'; import { Test, TestingModule } from '@nestjs/testing'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { IdTokenExtractionFailureLoggableException } from '@src/modules/oauth/loggable'; import jwt from 'jsonwebtoken'; import { ExternalUserDto, diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.spec.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.spec.ts index bbd5d7ee0d5..90590886edd 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.spec.ts @@ -21,7 +21,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ValidationErrorLoggableException } from '@shared/common/loggable-exception'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import * as classValidator from 'class-validator'; import { ExternalGroupDto, diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.ts index 6a441c35909..a083e41d56d 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/sanis.strategy.ts @@ -11,7 +11,7 @@ import { ConfigService } from '@nestjs/config'; import { ValidationErrorLoggableException } from '@shared/common/loggable-exception'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { plainToClass } from 'class-transformer'; import { validate, ValidationError } from 'class-validator'; import { diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.spec.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.spec.ts index f5b9de1698c..094ea1dbed6 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.spec.ts @@ -15,7 +15,7 @@ import { GroupTypes } from '@modules/group'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { InvalidLaufzeitResponseLoggableException, InvalidLernperiodeResponseLoggableException } from '../../domain'; import { ExternalGroupDto, ExternalLicenseDto, ExternalSchoolDto, ExternalUserDto } from '../../dto'; import { ProvisioningConfig } from '../../provisioning.config'; diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.ts index 76687f282c3..8adef233782 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex-response-mapper.ts @@ -15,7 +15,7 @@ import { GroupTypes } from '@modules/group'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { RoleName } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { InvalidLaufzeitResponseLoggableException, InvalidLernperiodeResponseLoggableException } from '../../domain'; import { ExternalGroupDto, diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.spec.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.spec.ts index f3a3d68664e..158f73f3f94 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.spec.ts @@ -7,7 +7,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, UserDO } from '@shared/domain/domainobject'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { groupFactory, legacySchoolDoFactory } from '@testing/factory/domainobject'; import { externalSchoolDtoFactory } from '@testing/factory/external-school-dto.factory'; import { userDoFactory } from '@testing/factory/user.do.factory'; diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.ts index 24f53bbf125..1165c918933 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/schulconnex.strategy.ts @@ -2,7 +2,7 @@ import { Group, GroupService } from '@modules/group'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { LegacySchoolDo, UserDO } from '@shared/domain/domainobject'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { ExternalGroupDto, OauthDataDto, ProvisioningDto } from '../../dto'; import { GroupProvisioningInfoLoggable } from '../../loggable'; import { ProvisioningConfig } from '../../provisioning.config'; diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.spec.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.spec.ts index 43be0c95343..54aa3740727 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.spec.ts @@ -1,8 +1,10 @@ +import { Logger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { Group, GroupService, GroupTypes } from '@modules/group'; import { CourseDoService } from '@modules/learnroom'; import { Course } from '@modules/learnroom/domain'; +import { courseFactory } from '@modules/learnroom/testing'; import { LegacySchoolService, SchoolSystemOptionsService, @@ -16,8 +18,6 @@ import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { ExternalSource, LegacySchoolDo, Page, RoleReference, UserDO } from '@shared/domain/domainobject'; import { RoleName } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; -import { courseFactory } from '@src/modules/learnroom/testing'; import { groupFactory, legacySchoolDoFactory } from '@testing/factory/domainobject'; import { externalSchoolDtoFactory } from '@testing/factory/external-school-dto.factory'; import { roleDtoFactory } from '@testing/factory/role-dto.factory'; diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.ts index 7d26dedcfe6..114acf4d221 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-group-provisioning.service.ts @@ -13,7 +13,7 @@ import { Injectable } from '@nestjs/common'; import { NotFoundLoggableException } from '@shared/common/loggable-exception'; import { ExternalSource, LegacySchoolDo, Page, UserDO } from '@shared/domain/domainobject'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { ExternalGroupDto, ExternalGroupUserDto, ExternalSchoolDto } from '../../../dto'; import { SchoolForGroupNotFoundLoggable, UserForGroupNotFoundLoggable } from '../../../loggable'; diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-license-provisioning.service.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-license-provisioning.service.ts index 649d0c052b9..822ed4309cc 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-license-provisioning.service.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-license-provisioning.service.ts @@ -1,9 +1,9 @@ import { ObjectId } from '@mikro-orm/mongodb'; +import { MediaSource } from '@modules/media-source/domain'; +import { MediaSourceService } from '@modules/media-source/service'; import { MediaUserLicense, MediaUserLicenseService, UserLicenseType } from '@modules/user-license'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { MediaSourceService } from '@src/modules/media-source/service'; -import { MediaSource } from '@src/modules/media-source/domain'; import { ExternalLicenseDto } from '../../../dto'; @Injectable() diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.spec.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.spec.ts index 0d592366702..6232bd6f5e9 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.spec.ts @@ -9,7 +9,7 @@ import { SchoolExternalTool } from '@modules/tool/school-external-tool/domain'; import { schoolExternalToolFactory } from '@modules/tool/school-external-tool/testing'; import { MediaUserLicense, mediaUserLicenseFactory, MediaUserLicenseService } from '@modules/user-license'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { schoolSystemOptionsFactory } from '@testing/factory/domainobject'; import { SchulconnexToolProvisioningService } from './schulconnex-tool-provisioning.service'; diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.ts index c24eea36374..5b7be8e0bb9 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-tool-provisioning.service.ts @@ -9,7 +9,7 @@ import { SchoolExternalTool } from '@modules/tool/school-external-tool/domain'; import { MediaUserLicense, MediaUserLicenseService } from '@modules/user-license'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { SchoolExternalToolCreatedLoggable } from '../../../loggable'; @Injectable() diff --git a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-user-provisioning.service.spec.ts b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-user-provisioning.service.spec.ts index 33f57a7a9b8..43e7e390bdf 100644 --- a/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-user-provisioning.service.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/schulconnex/service/schulconnex-user-provisioning.service.spec.ts @@ -7,7 +7,7 @@ import { UserService } from '@modules/user'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO } from '@shared/domain/domainobject'; import { RoleName } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { userDoFactory } from '@testing/factory/user.do.factory'; import CryptoJS from 'crypto-js'; import { ExternalUserDto } from '../../../dto'; diff --git a/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.spec.ts b/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.spec.ts index ecb5314412c..8a81fb77112 100644 --- a/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.spec.ts @@ -1,10 +1,10 @@ import { faker } from '@faker-js/faker'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { IdTokenExtractionFailureLoggableException } from '@modules/oauth/loggable'; import { schoolFactory } from '@modules/school/testing'; import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { IdTokenExtractionFailureLoggableException } from '@src/modules/oauth/loggable'; import { userDoFactory } from '@testing/factory/user.do.factory'; import jwt from 'jsonwebtoken'; import { diff --git a/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.ts b/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.ts index e9dc4d7b8b7..b91d3c768db 100644 --- a/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.ts +++ b/apps/server/src/modules/provisioning/strategy/tsp/tsp.strategy.ts @@ -1,7 +1,7 @@ +import { IdTokenExtractionFailureLoggableException } from '@modules/oauth/loggable'; import { Injectable } from '@nestjs/common'; import { RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { IdTokenExtractionFailureLoggableException } from '@src/modules/oauth/loggable'; import { validate } from 'class-validator'; import jwt, { JwtPayload } from 'jsonwebtoken'; import { diff --git a/apps/server/src/modules/pseudonym/loggable/too-many-pseudonyms.loggable-exception.ts b/apps/server/src/modules/pseudonym/loggable/too-many-pseudonyms.loggable-exception.ts index eb402f93900..2d93fcb5615 100644 --- a/apps/server/src/modules/pseudonym/loggable/too-many-pseudonyms.loggable-exception.ts +++ b/apps/server/src/modules/pseudonym/loggable/too-many-pseudonyms.loggable-exception.ts @@ -1,7 +1,7 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage, LogMessage, ValidationErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage, LogMessage, ValidationErrorLogMessage } from '@core/logger/types'; export class TooManyPseudonymsLoggableException extends BusinessError implements Loggable { constructor(private readonly pseudonym: string) { diff --git a/apps/server/src/modules/pseudonym/pseudonym.config.ts b/apps/server/src/modules/pseudonym/pseudonym.config.ts index 2e70a085cf0..c9f3ba43751 100644 --- a/apps/server/src/modules/pseudonym/pseudonym.config.ts +++ b/apps/server/src/modules/pseudonym/pseudonym.config.ts @@ -1,4 +1,4 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; import { LearnroomConfig } from '@modules/learnroom'; import { ToolConfig } from '@modules/tool'; import { UserConfig } from '@modules/user'; diff --git a/apps/server/src/modules/pseudonym/pseudonym.module.ts b/apps/server/src/modules/pseudonym/pseudonym.module.ts index ad6735f3bae..bc86f0f8b1b 100644 --- a/apps/server/src/modules/pseudonym/pseudonym.module.ts +++ b/apps/server/src/modules/pseudonym/pseudonym.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; -import { LegacyLogger, LoggerModule } from '@src/core/logger'; +import { LegacyLogger, LoggerModule } from '@core/logger'; import { ExternalToolPseudonymRepo, PseudonymsRepo } from './repo'; import { PseudonymService } from './service'; 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 5c946bb0d49..e9607de0417 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 @@ -5,7 +5,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { Page, Pseudonym } from '@shared/domain/domainobject'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { pseudonymFactory } from '@testing/factory/domainobject'; import { externalToolPseudonymEntityFactory } from '@testing/factory/external-tool-pseudonym.factory'; 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 c9725320bf6..b074df2f838 100644 --- a/apps/server/src/modules/pseudonym/repo/pseudonyms.repo.spec.ts +++ b/apps/server/src/modules/pseudonym/repo/pseudonyms.repo.spec.ts @@ -4,7 +4,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/domainobject'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { pseudonymFactory } from '@testing/factory/domainobject'; import { pseudonymEntityFactory } from '@testing/factory/pseudonym.factory'; diff --git a/apps/server/src/modules/pseudonym/service/pseudonym.service.spec.ts b/apps/server/src/modules/pseudonym/service/pseudonym.service.spec.ts index 8a84811d2ed..a916ff72f67 100644 --- a/apps/server/src/modules/pseudonym/service/pseudonym.service.spec.ts +++ b/apps/server/src/modules/pseudonym/service/pseudonym.service.spec.ts @@ -16,7 +16,7 @@ import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { LtiToolDO, Page, Pseudonym, UserDO } from '@shared/domain/domainobject'; import { IFindOptions } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { ltiToolDOFactory, pseudonymFactory } from '@testing/factory/domainobject'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/pseudonym/service/pseudonym.service.ts b/apps/server/src/modules/pseudonym/service/pseudonym.service.ts index 668c125e800..b97d3269ca8 100644 --- a/apps/server/src/modules/pseudonym/service/pseudonym.service.ts +++ b/apps/server/src/modules/pseudonym/service/pseudonym.service.ts @@ -19,7 +19,7 @@ import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { LtiToolDO, Page, Pseudonym, UserDO } from '@shared/domain/domainobject'; import { IFindOptions } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { v4 as uuidv4 } from 'uuid'; import { PseudonymSearchQuery } from '../domain'; import { ExternalToolPseudonymRepo, PseudonymsRepo } from '../repo'; diff --git a/apps/server/src/modules/registration-pin/registration-pin.config.ts b/apps/server/src/modules/registration-pin/registration-pin.config.ts index d1d4e3e575b..e147de9c670 100644 --- a/apps/server/src/modules/registration-pin/registration-pin.config.ts +++ b/apps/server/src/modules/registration-pin/registration-pin.config.ts @@ -1,3 +1,3 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface RegistrationPinConfig extends LoggerConfig {} diff --git a/apps/server/src/modules/registration-pin/registration-pin.module.ts b/apps/server/src/modules/registration-pin/registration-pin.module.ts index 76fa8716c94..c8fd6e0b4d9 100644 --- a/apps/server/src/modules/registration-pin/registration-pin.module.ts +++ b/apps/server/src/modules/registration-pin/registration-pin.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { RegistrationPinService } from './service'; import { RegistrationPinRepo } from './repo'; diff --git a/apps/server/src/modules/registration-pin/service/registration-pin.service.spec.ts b/apps/server/src/modules/registration-pin/service/registration-pin.service.spec.ts index 3c80b4ccb1a..0ebf5cfd399 100644 --- a/apps/server/src/modules/registration-pin/service/registration-pin.service.spec.ts +++ b/apps/server/src/modules/registration-pin/service/registration-pin.service.spec.ts @@ -7,7 +7,7 @@ import { OperationType, } from '@modules/deletion'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { setupEntities } from '@testing/setup-entities'; import { RegistrationPinService } from '.'; diff --git a/apps/server/src/modules/registration-pin/service/registration-pin.service.ts b/apps/server/src/modules/registration-pin/service/registration-pin.service.ts index 728eaae33e3..585737c332e 100644 --- a/apps/server/src/modules/registration-pin/service/registration-pin.service.ts +++ b/apps/server/src/modules/registration-pin/service/registration-pin.service.ts @@ -11,7 +11,7 @@ import { } from '@modules/deletion'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { RegistrationPinEntity } from '../entity'; import { RegistrationPinRepo } from '../repo'; diff --git a/apps/server/src/modules/rocketchat-user/entity/rocket-chat-user.entity.spec.ts b/apps/server/src/modules/rocketchat-user/entity/rocket-chat-user.entity.spec.ts index 4de79b876fb..1b17beefab3 100644 --- a/apps/server/src/modules/rocketchat-user/entity/rocket-chat-user.entity.spec.ts +++ b/apps/server/src/modules/rocketchat-user/entity/rocket-chat-user.entity.spec.ts @@ -1,5 +1,5 @@ import { ObjectId } from '@mikro-orm/mongodb'; -import { RocketChatUserEntity } from '@src/modules/rocketchat-user/entity'; +import { RocketChatUserEntity } from '@modules/rocketchat-user/entity'; import { setupEntities } from '@testing/setup-entities'; describe(RocketChatUserEntity.name, () => { diff --git a/apps/server/src/modules/rocketchat-user/rocketchat-user.config.ts b/apps/server/src/modules/rocketchat-user/rocketchat-user.config.ts index 0ff0e769e01..71aebf5ab1c 100644 --- a/apps/server/src/modules/rocketchat-user/rocketchat-user.config.ts +++ b/apps/server/src/modules/rocketchat-user/rocketchat-user.config.ts @@ -1,4 +1,4 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface RocketChatUserConfig extends LoggerConfig { ROCKET_CHAT_URI: string; diff --git a/apps/server/src/modules/rocketchat-user/rocketchat-user.module.ts b/apps/server/src/modules/rocketchat-user/rocketchat-user.module.ts index 5aef8638554..49d6b2f1dc7 100644 --- a/apps/server/src/modules/rocketchat-user/rocketchat-user.module.ts +++ b/apps/server/src/modules/rocketchat-user/rocketchat-user.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { Configuration } from '@hpi-schul-cloud/commons'; import { CqrsModule } from '@nestjs/cqrs'; import { RocketChatModule } from '@modules/rocketchat/rocket-chat.module'; diff --git a/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.spec.ts b/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.spec.ts index 5f32938838f..0ace10df137 100644 --- a/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.spec.ts +++ b/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.spec.ts @@ -14,7 +14,7 @@ import { deletionRequestFactory } from '@modules/deletion/domain/testing'; import { RocketChatError, RocketChatService } from '@modules/rocketchat/rocket-chat.service'; import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { setupEntities } from '@testing/setup-entities'; import { RocketChatUser } from '../domain'; import { rocketChatUserFactory } from '../domain/testing/rocket-chat-user.factory'; diff --git a/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.ts b/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.ts index ea5bc6be0dc..902555c995b 100644 --- a/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.ts +++ b/apps/server/src/modules/rocketchat-user/service/rocket-chat-user.service.ts @@ -16,7 +16,7 @@ import { RocketChatService } from '@modules/rocketchat'; import { Injectable } from '@nestjs/common'; import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { RocketChatUser } from '../domain'; import { RocketChatUserRepo } from '../repo'; diff --git a/apps/server/src/modules/room-membership/service/room-membership.service.ts b/apps/server/src/modules/room-membership/service/room-membership.service.ts index ad6af25fa37..19c9731696a 100644 --- a/apps/server/src/modules/room-membership/service/room-membership.service.ts +++ b/apps/server/src/modules/room-membership/service/room-membership.service.ts @@ -1,11 +1,11 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { Group, GroupService, GroupTypes } from '@modules/group'; import { RoleDto, RoleService } from '@modules/role'; +import { RoomService } from '@modules/room/domain'; import { UserService } from '@modules/user'; import { BadRequestException, Injectable } from '@nestjs/common'; import { RoleName } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { RoomService } from '@src/modules/room/domain'; import { RoomMembershipAuthorizable, UserWithRoomRoles } from '../do/room-membership-authorizable.do'; import { RoomMembership } from '../do/room-membership.do'; import { RoomMembershipRepo } from '../repo/room-membership.repo'; diff --git a/apps/server/src/modules/room/api/room.controller.ts b/apps/server/src/modules/room/api/room.controller.ts index b430e3f7364..a2ed60f8c14 100644 --- a/apps/server/src/modules/room/api/room.controller.ts +++ b/apps/server/src/modules/room/api/room.controller.ts @@ -18,7 +18,7 @@ import { import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { ApiValidationError } from '@shared/common'; import { IFindOptions } from '@shared/domain/interface'; -import { ErrorResponse } from '@src/core/error/dto'; +import { ErrorResponse } from '@core/error/dto'; import { Room } from '../domain'; import { AddRoomMembersBodyParams } from './dto/request/add-room-members.body.params'; import { CreateRoomBodyParams } from './dto/request/create-room.body.params'; diff --git a/apps/server/src/modules/room/api/room.uc.spec.ts b/apps/server/src/modules/room/api/room.uc.spec.ts index f1fbc213a6c..9349716ae76 100644 --- a/apps/server/src/modules/room/api/room.uc.spec.ts +++ b/apps/server/src/modules/room/api/room.uc.spec.ts @@ -1,13 +1,13 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AuthorizationService } from '@modules/authorization'; import { ColumnBoardService } from '@modules/board'; +import { RoomMembershipRepo, RoomMembershipService } from '@modules/room-membership'; import { UserService } from '@modules/user'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { FeatureDisabledLoggableException } from '@shared/common/loggable-exception'; import { Page } from '@shared/domain/domainobject'; import { IFindOptions } from '@shared/domain/interface'; -import { RoomMembershipRepo, RoomMembershipService } from '@src/modules/room-membership'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import { Room, RoomService } from '../domain'; diff --git a/apps/server/src/modules/room/api/room.uc.ts b/apps/server/src/modules/room/api/room.uc.ts index 2e57810f925..e559b3b5c0d 100644 --- a/apps/server/src/modules/room/api/room.uc.ts +++ b/apps/server/src/modules/room/api/room.uc.ts @@ -1,5 +1,6 @@ import { Action, AuthorizationService } from '@modules/authorization'; -import { RoomMembershipAuthorizable, RoomMembershipService, UserWithRoomRoles } from '@src/modules/room-membership'; +import { BoardExternalReferenceType, ColumnBoard, ColumnBoardService } from '@modules/board'; +import { RoomMembershipAuthorizable, RoomMembershipService, UserWithRoomRoles } from '@modules/room-membership'; import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; @@ -7,7 +8,6 @@ import { FeatureDisabledLoggableException } from '@shared/common/loggable-except import { Page, UserDO } from '@shared/domain/domainobject'; import { IFindOptions, Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { BoardExternalReferenceType, ColumnBoard, ColumnBoardService } from '@modules/board'; import { Room, RoomService } from '../domain'; import { RoomConfig } from '../room.config'; import { CreateRoomBodyParams } from './dto/request/create-room.body.params'; diff --git a/apps/server/src/modules/room/api/test/room-add-members.api.spec.ts b/apps/server/src/modules/room/api/test/room-add-members.api.spec.ts index f8eb192c9ee..be88a0c0b5f 100644 --- a/apps/server/src/modules/room/api/test/room-add-members.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-add-members.api.spec.ts @@ -1,11 +1,11 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { GroupEntityTypes } from '@modules/group/entity/group.entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing/room-membership-entity.factory'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface/permission.enum'; import { RoleName } from '@shared/domain/interface/rolename.enum'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing/room-membership-entity.factory'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/api/test/room-create.api.spec.ts b/apps/server/src/modules/room/api/test/room-create.api.spec.ts index 083095412a1..8ec012734d0 100644 --- a/apps/server/src/modules/room/api/test/room-create.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-create.api.spec.ts @@ -1,10 +1,10 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { GroupEntity } from '@modules/group/entity'; +import { RoomMembershipEntity } from '@modules/room-membership'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; -import { RoomMembershipEntity } from '@src/modules/room-membership'; import { cleanupCollections } from '@testing/cleanup-collections'; import { roleFactory } from '@testing/factory/role.factory'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; diff --git a/apps/server/src/modules/room/api/test/room-delete.api.spec.ts b/apps/server/src/modules/room/api/test/room-delete.api.spec.ts index 26b42041738..c98a6fc7e68 100644 --- a/apps/server/src/modules/room/api/test/room-delete.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-delete.api.spec.ts @@ -1,11 +1,11 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { GroupEntityTypes } from '@modules/group/entity/group.entity'; +import { RoomMembershipEntity } from '@modules/room-membership'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing/room-membership-entity.factory'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication, NotFoundException } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; -import { RoomMembershipEntity } from '@src/modules/room-membership'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing/room-membership-entity.factory'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/api/test/room-get-boards.api.spec.ts b/apps/server/src/modules/room/api/test/room-get-boards.api.spec.ts index 8f536fce4b5..d4c26d2a63f 100644 --- a/apps/server/src/modules/room/api/test/room-get-boards.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-get-boards.api.spec.ts @@ -2,11 +2,11 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { BoardExternalReferenceType } from '@modules/board'; import { columnBoardEntityFactory } from '@modules/board/testing'; import { GroupEntityTypes } from '@modules/group/entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; import { serverConfig, ServerConfig, ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/api/test/room-get.api.spec.ts b/apps/server/src/modules/room/api/test/room-get.api.spec.ts index a667a7ce9e1..08886310ceb 100644 --- a/apps/server/src/modules/room/api/test/room-get.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-get.api.spec.ts @@ -1,10 +1,10 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { GroupEntityTypes } from '@modules/group/entity/group.entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/api/test/room-index.api.spec.ts b/apps/server/src/modules/room/api/test/room-index.api.spec.ts index 713fee31b10..ed6ccd19bce 100644 --- a/apps/server/src/modules/room/api/test/room-index.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-index.api.spec.ts @@ -1,11 +1,11 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { GroupEntityTypes } from '@modules/group/entity/group.entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing/room-membership-entity.factory'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface/permission.enum'; import { RoleName } from '@shared/domain/interface/rolename.enum'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing/room-membership-entity.factory'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/api/test/room-members.api.spec.ts b/apps/server/src/modules/room/api/test/room-members.api.spec.ts index e9fc66bb83d..9d3ea9dffb1 100644 --- a/apps/server/src/modules/room/api/test/room-members.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-members.api.spec.ts @@ -1,11 +1,11 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { GroupEntityTypes } from '@modules/group/entity/group.entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing/room-membership-entity.factory'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface/permission.enum'; import { RoleName } from '@shared/domain/interface/rolename.enum'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing/room-membership-entity.factory'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/api/test/room-remove-members.api.spec.ts b/apps/server/src/modules/room/api/test/room-remove-members.api.spec.ts index d34c6a78ae4..5b7dda28098 100644 --- a/apps/server/src/modules/room/api/test/room-remove-members.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-remove-members.api.spec.ts @@ -1,11 +1,11 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { GroupEntityTypes } from '@modules/group/entity/group.entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing/room-membership-entity.factory'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface/permission.enum'; import { RoleName } from '@shared/domain/interface/rolename.enum'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing/room-membership-entity.factory'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/api/test/room-update.api.spec.ts b/apps/server/src/modules/room/api/test/room-update.api.spec.ts index 2e23d47264a..4bfdd9e1661 100644 --- a/apps/server/src/modules/room/api/test/room-update.api.spec.ts +++ b/apps/server/src/modules/room/api/test/room-update.api.spec.ts @@ -1,9 +1,9 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; import { ServerTestModule, serverConfig, type ServerConfig } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/room/room-api.module.ts b/apps/server/src/modules/room/room-api.module.ts index 7711d7cd842..22b2a47cb2b 100644 --- a/apps/server/src/modules/room/room-api.module.ts +++ b/apps/server/src/modules/room/room-api.module.ts @@ -1,6 +1,6 @@ import { AuthorizationModule } from '@modules/authorization'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { BoardModule } from '../board'; import { RoomMembershipModule } from '../room-membership/room-membership.module'; import { UserModule } from '../user'; diff --git a/apps/server/src/modules/school-license/domain/media-school-license.ts b/apps/server/src/modules/school-license/domain/media-school-license.ts index 82207cf0609..31dc967b52b 100644 --- a/apps/server/src/modules/school-license/domain/media-school-license.ts +++ b/apps/server/src/modules/school-license/domain/media-school-license.ts @@ -1,4 +1,4 @@ -import { MediaSource } from '@src/modules/media-source/domain'; +import { MediaSource } from '@modules/media-source/domain'; import { SchoolLicense, SchoolLicenseProps } from './school-license'; export interface MediaSchoolLicenseProps extends SchoolLicenseProps { diff --git a/apps/server/src/modules/school-license/entity/media-school-license.entity.ts b/apps/server/src/modules/school-license/entity/media-school-license.entity.ts index 3b775a3f816..e66b063c5c6 100644 --- a/apps/server/src/modules/school-license/entity/media-school-license.entity.ts +++ b/apps/server/src/modules/school-license/entity/media-school-license.entity.ts @@ -1,5 +1,5 @@ import { Entity, ManyToOne, Property } from '@mikro-orm/core'; -import { MediaSourceEntity } from '@src/modules/media-source/entity'; +import { MediaSourceEntity } from '@modules/media-source/entity'; import { SchoolLicenseType } from '../enum'; import { SchoolLicenseEntity, SchoolLicenseProps } from './school-license.entity'; diff --git a/apps/server/src/modules/school-license/school-license.module.ts b/apps/server/src/modules/school-license/school-license.module.ts index 32c7816768d..2461c9a5ea7 100644 --- a/apps/server/src/modules/school-license/school-license.module.ts +++ b/apps/server/src/modules/school-license/school-license.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { MediaSourceModule } from '../media-source/media-source.module'; import { SchoolModule } from '../school'; import { MEDIA_SCHOOL_LICENSE_REPO } from './repo'; diff --git a/apps/server/src/modules/school/api/dto/response/school-system.response.ts b/apps/server/src/modules/school/api/dto/response/school-system.response.ts index f62e3a20445..aecfaa2f11b 100644 --- a/apps/server/src/modules/school/api/dto/response/school-system.response.ts +++ b/apps/server/src/modules/school/api/dto/response/school-system.response.ts @@ -1,5 +1,5 @@ +import { LdapConfig, OauthConfig } from '@modules/system'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; -import { LdapConfig, OauthConfig } from '@src/modules/system'; export class ProviderConfigResponse { @ApiProperty() diff --git a/apps/server/src/modules/school/api/mapper/school-systems.response.mapper.ts b/apps/server/src/modules/school/api/mapper/school-systems.response.mapper.ts index 1c108cd66bb..405c02071c9 100644 --- a/apps/server/src/modules/school/api/mapper/school-systems.response.mapper.ts +++ b/apps/server/src/modules/school/api/mapper/school-systems.response.mapper.ts @@ -1,4 +1,4 @@ -import { System } from '@src/modules/system'; +import { System } from '@modules/system'; import { SystemForLdapLogin } from '../../domain'; import { ProviderConfigResponse, SchoolSystemResponse, SystemForLdapLoginResponse } from '../dto/response'; diff --git a/apps/server/src/modules/school/api/school.uc.ts b/apps/server/src/modules/school/api/school.uc.ts index 85206590cb4..47ce9d1020f 100644 --- a/apps/server/src/modules/school/api/school.uc.ts +++ b/apps/server/src/modules/school/api/school.uc.ts @@ -1,10 +1,10 @@ import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; +import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { Page, UserDO } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { Permission, RoleName, SortOrder } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { UserService } from '@src/modules/user'; import { School, SchoolQuery, SchoolService, SchoolYear, SchoolYearHelper, SchoolYearService } from '../domain'; import { SchoolUpdateBodyParams } from './dto/param'; import { @@ -15,7 +15,7 @@ import { } from './dto/response'; import { SchoolForLdapLoginResponse } from './dto/response/school-for-ldap-login.response'; import { SchoolUserListResponse } from './dto/response/school-user.response'; -import { SchoolResponseMapper, SystemResponseMapper, SchoolUserResponseMapper } from './mapper'; +import { SchoolResponseMapper, SchoolUserResponseMapper, SystemResponseMapper } from './mapper'; import { YearsResponseMapper } from './mapper/years.response.mapper'; @Injectable() diff --git a/apps/server/src/modules/school/api/test/school-get.api.spec.ts b/apps/server/src/modules/school/api/test/school-get.api.spec.ts index 8e6adab55bc..b399136e099 100644 --- a/apps/server/src/modules/school/api/test/school-get.api.spec.ts +++ b/apps/server/src/modules/school/api/test/school-get.api.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { ServerTestModule } from '@src/modules/server'; import { cleanupCollections } from '@testing/cleanup-collections'; import { countyEmbeddableFactory } from '@testing/factory/county.embeddable.factory'; import { federalStateFactory } from '@testing/factory/federal-state.factory'; diff --git a/apps/server/src/modules/school/api/test/school-patch.api.spec.ts b/apps/server/src/modules/school/api/test/school-patch.api.spec.ts index 2b4e247fe39..981dd2c427b 100644 --- a/apps/server/src/modules/school/api/test/school-patch.api.spec.ts +++ b/apps/server/src/modules/school/api/test/school-patch.api.spec.ts @@ -1,9 +1,9 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { ServerTestModule } from '@modules/server'; import { SystemEntity } from '@modules/system/entity'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain/entity'; -import { ServerTestModule } from '@src/modules/server'; import { cleanupCollections } from '@testing/cleanup-collections'; import { countyEmbeddableFactory } from '@testing/factory/county.embeddable.factory'; import { federalStateFactory } from '@testing/factory/federal-state.factory'; diff --git a/apps/server/src/modules/school/api/test/school-users.api.spec.ts b/apps/server/src/modules/school/api/test/school-users.api.spec.ts index d493b7fc56d..b89a95cf08f 100644 --- a/apps/server/src/modules/school/api/test/school-users.api.spec.ts +++ b/apps/server/src/modules/school/api/test/school-users.api.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { ServerTestModule } from '@src/modules/server'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; diff --git a/apps/server/src/modules/school/domain/error/missing-years.loggable-exception.ts b/apps/server/src/modules/school/domain/error/missing-years.loggable-exception.ts index 11f47ce4f5b..77546ad776c 100644 --- a/apps/server/src/modules/school/domain/error/missing-years.loggable-exception.ts +++ b/apps/server/src/modules/school/domain/error/missing-years.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class MissingYearsLoggableException extends InternalServerErrorException implements Loggable { constructor() { diff --git a/apps/server/src/modules/school/domain/error/school-has-no-system.loggable-exception.ts b/apps/server/src/modules/school/domain/error/school-has-no-system.loggable-exception.ts index 9a58d09115e..c664136b4cc 100644 --- a/apps/server/src/modules/school/domain/error/school-has-no-system.loggable-exception.ts +++ b/apps/server/src/modules/school/domain/error/school-has-no-system.loggable-exception.ts @@ -1,7 +1,7 @@ import { NotFoundException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; import { SchoolErrorEnum } from './error.enum'; export class SchoolHasNoSystemLoggableException extends NotFoundException implements Loggable { diff --git a/apps/server/src/modules/school/domain/error/system-can-not-be-deleted.loggable-exception.ts b/apps/server/src/modules/school/domain/error/system-can-not-be-deleted.loggable-exception.ts index 065782c0540..900513d2105 100644 --- a/apps/server/src/modules/school/domain/error/system-can-not-be-deleted.loggable-exception.ts +++ b/apps/server/src/modules/school/domain/error/system-can-not-be-deleted.loggable-exception.ts @@ -1,7 +1,7 @@ import { NotFoundException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; import { SchoolErrorEnum } from './error.enum'; export class SystemCanNotBeDeletedLoggableException extends NotFoundException implements Loggable { diff --git a/apps/server/src/modules/school/domain/error/system-not-found.loggable-exception.ts b/apps/server/src/modules/school/domain/error/system-not-found.loggable-exception.ts index b717d8eec5d..88905d95408 100644 --- a/apps/server/src/modules/school/domain/error/system-not-found.loggable-exception.ts +++ b/apps/server/src/modules/school/domain/error/system-not-found.loggable-exception.ts @@ -1,7 +1,7 @@ import { NotFoundException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; import { SchoolErrorEnum } from './error.enum'; export class SystemNotFoundLoggableException extends NotFoundException implements Loggable { diff --git a/apps/server/src/modules/school/domain/service/school.service.spec.ts b/apps/server/src/modules/school/domain/service/school.service.spec.ts index 6d278d6cbd5..553dde50e2e 100644 --- a/apps/server/src/modules/school/domain/service/school.service.spec.ts +++ b/apps/server/src/modules/school/domain/service/school.service.spec.ts @@ -1,10 +1,10 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { SystemService } from '@modules/system'; import { systemFactory } from '@modules/system/testing'; import { NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; import { IFindOptions, SortOrder } from '@shared/domain/interface'; -import { SystemService } from '@src/modules/system'; import { schoolFactory } from '../../testing'; import { SchoolForLdapLogin, SchoolProps, SystemForLdapLogin } from '../do'; import { diff --git a/apps/server/src/modules/school/repo/mikro-orm/mapper/county.embeddable.mapper.spec.ts b/apps/server/src/modules/school/repo/mikro-orm/mapper/county.embeddable.mapper.spec.ts index 5de0a798407..e377e1c2fee 100644 --- a/apps/server/src/modules/school/repo/mikro-orm/mapper/county.embeddable.mapper.spec.ts +++ b/apps/server/src/modules/school/repo/mikro-orm/mapper/county.embeddable.mapper.spec.ts @@ -1,6 +1,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; +import { countyFactory } from '@modules/school/testing/county.factory'; import { CountyEmbeddable } from '@shared/domain/entity'; -import { countyFactory } from '@src/modules/school/testing/county.factory'; import { CountyEmbeddableMapper } from './county.embeddable.mapper'; describe('CountyEmbeddableMapper', () => { diff --git a/apps/server/src/modules/school/repo/mikro-orm/mapper/school.entity.mapper.ts b/apps/server/src/modules/school/repo/mikro-orm/mapper/school.entity.mapper.ts index 51fdd58794c..0529a1b1820 100644 --- a/apps/server/src/modules/school/repo/mikro-orm/mapper/school.entity.mapper.ts +++ b/apps/server/src/modules/school/repo/mikro-orm/mapper/school.entity.mapper.ts @@ -1,9 +1,9 @@ import { EntityData } from '@mikro-orm/core'; import { EntityManager } from '@mikro-orm/mongodb'; +import { SchoolFactory } from '@modules/school/domain/factory'; import { SystemEntity } from '@modules/system/entity'; import { FederalStateEntity, SchoolYearEntity } from '@shared/domain/entity'; import { SchoolEntity } from '@shared/domain/entity/school.entity'; -import { SchoolFactory } from '@src/modules/school/domain/factory'; import { School } from '../../../domain'; import { CountyEmbeddableMapper } from './county.embeddable.mapper'; import { FederalStateEntityMapper } from './federal-state.entity.mapper'; diff --git a/apps/server/src/modules/school/repo/mikro-orm/school-year.repo.integration.spec.ts b/apps/server/src/modules/school/repo/mikro-orm/school-year.repo.integration.spec.ts index d8b393f046b..a41076e6520 100644 --- a/apps/server/src/modules/school/repo/mikro-orm/school-year.repo.integration.spec.ts +++ b/apps/server/src/modules/school/repo/mikro-orm/school-year.repo.integration.spec.ts @@ -1,7 +1,7 @@ +import { MongoMemoryDatabaseModule } from '@infra/database'; import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolYearEntity } from '@shared/domain/entity/schoolyear.entity'; -import { MongoMemoryDatabaseModule } from '@src/infra/database'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolYearFactory } from '@testing/factory/schoolyear.factory'; import { SCHOOL_YEAR_REPO } from '../../domain'; diff --git a/apps/server/src/modules/school/repo/mikro-orm/school.repo.integration.spec.ts b/apps/server/src/modules/school/repo/mikro-orm/school.repo.integration.spec.ts index 6a4680e16b5..4ebb3eb8524 100644 --- a/apps/server/src/modules/school/repo/mikro-orm/school.repo.integration.spec.ts +++ b/apps/server/src/modules/school/repo/mikro-orm/school.repo.integration.spec.ts @@ -1,11 +1,11 @@ import { faker } from '@faker-js/faker'; +import { MongoMemoryDatabaseModule } from '@infra/database'; import { NotFoundError } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain/entity/school.entity'; import { LanguageType, SortOrder } from '@shared/domain/interface'; import { SchoolFeature, SchoolPurpose } from '@shared/domain/types'; -import { MongoMemoryDatabaseModule } from '@src/infra/database'; import { cleanupCollections } from '@testing/cleanup-collections'; import { countyEmbeddableFactory } from '@testing/factory/county.embeddable.factory'; import { federalStateFactory as federalStateEntityFactory } from '@testing/factory/federal-state.factory'; diff --git a/apps/server/src/modules/server/admin-api.server.app.module.ts b/apps/server/src/modules/server/admin-api.server.app.module.ts index c7e6bff6225..426b64b8a4a 100644 --- a/apps/server/src/modules/server/admin-api.server.app.module.ts +++ b/apps/server/src/modules/server/admin-api.server.app.module.ts @@ -1,5 +1,10 @@ +import { LoggerModule } from '@core/logger'; import { Configuration } from '@hpi-schul-cloud/commons'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; +import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@infra/database'; +import { EtherpadClientModule } from '@infra/etherpad-client'; +import { RabbitMQWrapperModule, RabbitMQWrapperTestModule } from '@infra/rabbitmq'; import { MikroOrmModule } from '@mikro-orm/nestjs'; import { DeletionApiModule } from '@modules/deletion/deletion-api.module'; import { FileEntity } from '@modules/files/entity'; @@ -12,11 +17,6 @@ import { CqrsModule } from '@nestjs/cqrs'; import { createConfigModuleOptions } from '@shared/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { LoggerModule } from '@src/core/logger'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; -import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@src/infra/database'; -import { EtherpadClientModule } from '@src/infra/etherpad-client'; -import { RabbitMQWrapperModule, RabbitMQWrapperTestModule } from '@src/infra/rabbitmq'; import { AdminApiRegistrationPinModule } from '../registration-pin/admin-api-registration-pin.module'; import { adminApiServerConfig } from './admin-api-server.config'; diff --git a/apps/server/src/modules/server/server.app.module.ts b/apps/server/src/modules/server/server.app.module.ts index 461d6a96041..5b90d1df82b 100644 --- a/apps/server/src/modules/server/server.app.module.ts +++ b/apps/server/src/modules/server/server.app.module.ts @@ -1,4 +1,7 @@ +import { CoreModule } from '@core/core.module'; +import { LoggerModule } from '@core/logger'; import { Configuration } from '@hpi-schul-cloud/commons'; +import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@imports-from-feathers'; import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard'; import { MongoDatabaseModuleOptions, MongoMemoryDatabaseModule } from '@infra/database'; import { MailModule } from '@infra/mail'; @@ -47,9 +50,6 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@shared/common'; import { defaultMikroOrmOptions } from '@shared/common/defaultMikroOrmOptions'; import { ALL_ENTITIES } from '@shared/domain/entity'; -import { CoreModule } from '@src/core'; -import { LoggerModule } from '@src/core/logger'; -import { DB_PASSWORD, DB_URL, DB_USERNAME } from '@src/imports-from-feathers'; import { ServerConfigController, ServerController, ServerUc } from './api'; import { SERVER_CONFIG_TOKEN, serverConfig } from './server.config'; diff --git a/apps/server/src/modules/server/server.config.ts b/apps/server/src/modules/server/server.config.ts index 81b2895398d..fa7d84c8b72 100644 --- a/apps/server/src/modules/server/server.config.ts +++ b/apps/server/src/modules/server/server.config.ts @@ -1,3 +1,4 @@ +import type { CoreModuleConfig } from '@core/core.config'; import { Configuration } from '@hpi-schul-cloud/commons'; import { JwtAuthGuardConfig } from '@infra/auth-guard'; import { EncryptionConfig } from '@infra/encryption/encryption.config'; @@ -5,9 +6,9 @@ import type { IdentityManagementConfig } from '@infra/identity-management'; import type { MailConfig } from '@infra/mail/interfaces/mail-config'; import type { SchulconnexClientConfig } from '@infra/schulconnex-client'; import { TspSyncConfig } from '@infra/sync'; +import { VidisSyncConfig } from '@infra/sync/media-licenses'; import type { TspClientConfig } from '@infra/tsp-client'; import { VidisClientConfig } from '@infra/vidis-client'; -import { VidisSyncConfig } from '@infra/sync/media-licenses'; import type { AccountConfig } from '@modules/account'; import { AlertConfig } from '@modules/alert'; import type { AuthenticationConfig } from '@modules/authentication'; @@ -31,7 +32,6 @@ import type { VideoConferenceConfig } from '@modules/video-conference'; import type { BbbConfig } from '@modules/video-conference/bbb'; import type { LanguageType } from '@shared/domain/interface'; import { SchulcloudTheme } from '@shared/domain/types'; -import type { CoreModuleConfig } from '@src/core'; import { Algorithm } from 'jsonwebtoken'; import type { Timezone } from './types/timezone.enum'; diff --git a/apps/server/src/modules/sharing/controller/api-test/sharing-import-room-board-token.api.spec.ts b/apps/server/src/modules/sharing/controller/api-test/sharing-import-room-board-token.api.spec.ts index a3f67035aff..234a0737854 100644 --- a/apps/server/src/modules/sharing/controller/api-test/sharing-import-room-board-token.api.spec.ts +++ b/apps/server/src/modules/sharing/controller/api-test/sharing-import-room-board-token.api.spec.ts @@ -1,14 +1,14 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { EntityManager } from '@mikro-orm/mongodb'; +import { BoardExternalReferenceType } from '@modules/board'; +import { columnBoardEntityFactory } from '@modules/board/testing'; +import { GroupEntityTypes } from '@modules/group/entity'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; +import { roomEntityFactory } from '@modules/room/testing'; +import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; -import { BoardExternalReferenceType } from '@src/modules/board'; -import { columnBoardEntityFactory } from '@src/modules/board/testing'; -import { GroupEntityTypes } from '@src/modules/group/entity'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; -import { roomEntityFactory } from '@src/modules/room/testing'; -import { ServerTestModule } from '@src/modules/server'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; 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 52514fcd4f8..dbd0a38cf70 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 @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest'; import { MongoMemoryDatabaseModule } from '@infra/database'; import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { shareTokenFactory } from '@testing/factory/share-token.do.factory'; diff --git a/apps/server/src/modules/sharing/sharing-api.module.ts b/apps/server/src/modules/sharing/sharing-api.module.ts index 3c30c03a883..0ffca5e018f 100644 --- a/apps/server/src/modules/sharing/sharing-api.module.ts +++ b/apps/server/src/modules/sharing/sharing-api.module.ts @@ -1,13 +1,13 @@ +import { LoggerModule } from '@core/logger'; import { AuthorizationModule } from '@modules/authorization'; import { BoardModule } from '@modules/board'; import { LearnroomModule } from '@modules/learnroom'; import { LessonModule } from '@modules/lesson'; import { RoomModule } from '@modules/room'; -import { RoomMembershipModule } from '@src/modules/room-membership'; +import { RoomMembershipModule } from '@modules/room-membership'; import { SchoolModule } from '@modules/school'; import { TaskModule } from '@modules/task'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; import { ShareTokenController } from './controller/share-token.controller'; import { SharingModule } from './sharing.module'; import { ShareTokenUC } from './uc'; diff --git a/apps/server/src/modules/sharing/sharing.module.ts b/apps/server/src/modules/sharing/sharing.module.ts index df417337f1e..7908bf5ea6c 100644 --- a/apps/server/src/modules/sharing/sharing.module.ts +++ b/apps/server/src/modules/sharing/sharing.module.ts @@ -3,7 +3,7 @@ import { LearnroomModule } from '@modules/learnroom'; import { LessonModule } from '@modules/lesson'; import { TaskModule } from '@modules/task'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { RoomModule } from '../room'; import { ShareTokenRepo } from './repo/share-token.repo'; import { ShareTokenService, TokenGenerator } from './service'; diff --git a/apps/server/src/modules/sharing/uc/share-token.uc.spec.ts b/apps/server/src/modules/sharing/uc/share-token.uc.spec.ts index fdb1dde6769..336b193f6dc 100644 --- a/apps/server/src/modules/sharing/uc/share-token.uc.spec.ts +++ b/apps/server/src/modules/sharing/uc/share-token.uc.spec.ts @@ -1,6 +1,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Configuration } from '@hpi-schul-cloud/commons/lib'; +import { LegacyLogger } from '@core/logger'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; import { BoardExternalReferenceType, BoardNodeAuthorizableService, ColumnBoardService } from '@modules/board'; import { CopyColumnBoardParams } from '@modules/board/service/internal'; @@ -10,6 +11,7 @@ import { StorageLocation } from '@modules/files-storage/interface'; import { CourseCopyService, CourseService } from '@modules/learnroom'; import { LessonCopyService, LessonService } from '@modules/lesson'; import { RoomService } from '@modules/room'; +import { RoomMembershipService } from '@modules/room-membership'; import { SchoolService } from '@modules/school'; import { schoolFactory } from '@modules/school/testing'; import { TaskCopyService, TaskService } from '@modules/task'; @@ -17,8 +19,6 @@ import { BadRequestException, NotImplementedException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { FeatureDisabledLoggableException } from '@shared/common/loggable-exception'; import { Permission } from '@shared/domain/interface'; -import { LegacyLogger } from '@src/core/logger'; -import { RoomMembershipService } from '@src/modules/room-membership'; import { courseFactory } from '@testing/factory/course.factory'; import { lessonFactory } from '@testing/factory/lesson.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; diff --git a/apps/server/src/modules/sharing/uc/share-token.uc.ts b/apps/server/src/modules/sharing/uc/share-token.uc.ts index a9498d0b2a1..32a21f408cf 100644 --- a/apps/server/src/modules/sharing/uc/share-token.uc.ts +++ b/apps/server/src/modules/sharing/uc/share-token.uc.ts @@ -1,3 +1,4 @@ +import { LegacyLogger } from '@core/logger'; import { Configuration } from '@hpi-schul-cloud/commons/lib'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; import { @@ -12,6 +13,7 @@ import { StorageLocation } from '@modules/files-storage/interface'; import { CourseCopyService, CourseService } from '@modules/learnroom'; import { LessonCopyService, LessonService } from '@modules/lesson'; import { RoomService } from '@modules/room'; +import { RoomMembershipService } from '@modules/room-membership'; import { SchoolService } from '@modules/school'; import { TaskCopyService, TaskService } from '@modules/task'; import { BadRequestException, Injectable, NotImplementedException } from '@nestjs/common'; @@ -19,8 +21,6 @@ import { FeatureDisabledLoggableException } from '@shared/common/loggable-except import { Course, User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; -import { RoomMembershipService } from '@src/modules/room-membership'; import { ShareTokenContext, ShareTokenContextType, diff --git a/apps/server/src/modules/shd/api/api-tests/shd.api.spec.ts b/apps/server/src/modules/shd/api/api-tests/shd.api.spec.ts index bfc21817fd1..28bcc2139fc 100644 --- a/apps/server/src/modules/shd/api/api-tests/shd.api.spec.ts +++ b/apps/server/src/modules/shd/api/api-tests/shd.api.spec.ts @@ -1,10 +1,10 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { LoginDto } from '@modules/authentication'; import { InstanceEntity } from '@modules/instance'; import { instanceEntityFactory } from '@modules/instance/testing'; import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { LoginDto } from '@src/modules/authentication'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; import { TestApiClient } from '@testing/test-api-client'; import { TargetUserIdParams } from '../dtos/target-user-id.params'; 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 8ff865617b3..67bd1a62a65 100644 --- a/apps/server/src/modules/task/service/submission.service.spec.ts +++ b/apps/server/src/modules/task/service/submission.service.spec.ts @@ -15,7 +15,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { Submission } from '@shared/domain/entity'; import { Counted } from '@shared/domain/types'; import { SubmissionRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { submissionFactory } from '@testing/factory/submission.factory'; import { taskFactory } from '@testing/factory/task.factory'; import { userFactory } from '@testing/factory/user.factory'; diff --git a/apps/server/src/modules/task/service/submission.service.ts b/apps/server/src/modules/task/service/submission.service.ts index 4d8a5361fe4..6b4078ba822 100644 --- a/apps/server/src/modules/task/service/submission.service.ts +++ b/apps/server/src/modules/task/service/submission.service.ts @@ -18,7 +18,7 @@ import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { Submission } from '@shared/domain/entity'; import { Counted, EntityId } from '@shared/domain/types'; import { SubmissionRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; @Injectable() @EventsHandler(UserDeletedEvent) diff --git a/apps/server/src/modules/task/service/task.service.spec.ts b/apps/server/src/modules/task/service/task.service.spec.ts index fa9b86009ff..89912ba277e 100644 --- a/apps/server/src/modules/task/service/task.service.spec.ts +++ b/apps/server/src/modules/task/service/task.service.spec.ts @@ -12,7 +12,7 @@ import { FilesStorageClientAdapterService } from '@modules/files-storage-client' import { EventBus } from '@nestjs/cqrs'; import { Test, TestingModule } from '@nestjs/testing'; import { TaskRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { courseFactory } from '@testing/factory/course.factory'; import { submissionFactory } from '@testing/factory/submission.factory'; import { taskFactory } from '@testing/factory/task.factory'; diff --git a/apps/server/src/modules/task/service/task.service.ts b/apps/server/src/modules/task/service/task.service.ts index c766d2036c6..1a382604b61 100644 --- a/apps/server/src/modules/task/service/task.service.ts +++ b/apps/server/src/modules/task/service/task.service.ts @@ -19,7 +19,7 @@ import { Task } from '@shared/domain/entity'; import { IFindOptions } from '@shared/domain/interface'; import { Counted, EntityId } from '@shared/domain/types'; import { TaskRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { SubmissionService } from './submission.service'; @Injectable() diff --git a/apps/server/src/modules/task/task.module.ts b/apps/server/src/modules/task/task.module.ts index 5eeae20b8e8..17b108a9dfc 100644 --- a/apps/server/src/modules/task/task.module.ts +++ b/apps/server/src/modules/task/task.module.ts @@ -2,7 +2,7 @@ import { CopyHelperModule } from '@modules/copy-helper'; import { FilesStorageClientModule } from '@modules/files-storage-client'; import { Module } from '@nestjs/common'; import { CourseRepo, SubmissionRepo, TaskRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CqrsModule } from '@nestjs/cqrs'; import { SubmissionService, TaskCopyService, TaskService } from './service'; diff --git a/apps/server/src/modules/teams/service/team.service.spec.ts b/apps/server/src/modules/teams/service/team.service.spec.ts index 8e42d963daa..f71eda91593 100644 --- a/apps/server/src/modules/teams/service/team.service.spec.ts +++ b/apps/server/src/modules/teams/service/team.service.spec.ts @@ -11,7 +11,7 @@ import { deletionRequestFactory } from '@modules/deletion/domain/testing'; import { EventBus } from '@nestjs/cqrs/dist'; import { Test, TestingModule } from '@nestjs/testing'; import { TeamsRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { teamFactory } from '@testing/factory/team.factory'; import { teamUserFactory } from '@testing/factory/teamuser.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/teams/service/team.service.ts b/apps/server/src/modules/teams/service/team.service.ts index 9f6986cc71c..dbdf378cf0b 100644 --- a/apps/server/src/modules/teams/service/team.service.ts +++ b/apps/server/src/modules/teams/service/team.service.ts @@ -16,7 +16,7 @@ import { EventBus, EventsHandler, IEventHandler } from '@nestjs/cqrs'; import { TeamEntity } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { TeamsRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; @Injectable() @EventsHandler(UserDeletedEvent) diff --git a/apps/server/src/modules/teams/teams.config.ts b/apps/server/src/modules/teams/teams.config.ts index a98c6bb981f..7d2bf9d9182 100644 --- a/apps/server/src/modules/teams/teams.config.ts +++ b/apps/server/src/modules/teams/teams.config.ts @@ -1,3 +1,3 @@ -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; export interface TeamsConfig extends LoggerConfig {} diff --git a/apps/server/src/modules/teams/teams.module.ts b/apps/server/src/modules/teams/teams.module.ts index ea9530a7881..ebca484535f 100644 --- a/apps/server/src/modules/teams/teams.module.ts +++ b/apps/server/src/modules/teams/teams.module.ts @@ -2,7 +2,7 @@ import { AuthorizationModule } from '@modules/authorization'; import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; import { TeamsRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { TeamAuthorisableService, TeamService } from './service'; @Module({ diff --git a/apps/server/src/modules/tool/common/common-tool.module.ts b/apps/server/src/modules/tool/common/common-tool.module.ts index cb6b7e20ff5..8137f7d9a59 100644 --- a/apps/server/src/modules/tool/common/common-tool.module.ts +++ b/apps/server/src/modules/tool/common/common-tool.module.ts @@ -1,9 +1,9 @@ +import { LoggerModule } from '@core/logger'; import { BoardModule } from '@modules/board'; +import { SchoolModule } from '@modules/school'; import { forwardRef, Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; import { ContextExternalToolRepo, ExternalToolRepo, SchoolExternalToolRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; -import { SchoolModule } from '@src/modules/school'; import { CommonToolDeleteService, CommonToolService, diff --git a/apps/server/src/modules/tool/common/domain/error/context-external-tool-name-already-exists.loggable-exception.ts b/apps/server/src/modules/tool/common/domain/error/context-external-tool-name-already-exists.loggable-exception.ts index 6fa56e69e7b..e9acb1fbc6a 100644 --- a/apps/server/src/modules/tool/common/domain/error/context-external-tool-name-already-exists.loggable-exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/context-external-tool-name-already-exists.loggable-exception.ts @@ -1,5 +1,5 @@ import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { HttpStatus } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; diff --git a/apps/server/src/modules/tool/common/domain/error/tool-parameter-duplicate.loggable-exception.ts b/apps/server/src/modules/tool/common/domain/error/tool-parameter-duplicate.loggable-exception.ts index 7aaf74784ba..f0c4aef9ce4 100644 --- a/apps/server/src/modules/tool/common/domain/error/tool-parameter-duplicate.loggable-exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/tool-parameter-duplicate.loggable-exception.ts @@ -1,5 +1,5 @@ import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { HttpStatus } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; diff --git a/apps/server/src/modules/tool/common/domain/error/tool-parameter-mandatory-value-missing-loggable.exception.ts b/apps/server/src/modules/tool/common/domain/error/tool-parameter-mandatory-value-missing-loggable.exception.ts index 901b0c9bc9a..d17962ac47f 100644 --- a/apps/server/src/modules/tool/common/domain/error/tool-parameter-mandatory-value-missing-loggable.exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/tool-parameter-mandatory-value-missing-loggable.exception.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { BusinessError } from '@shared/common'; import { EntityId } from '@shared/domain/types'; import { HttpStatus } from '@nestjs/common'; diff --git a/apps/server/src/modules/tool/common/domain/error/tool-parameter-optional-value-missing-loggable-exception.ts b/apps/server/src/modules/tool/common/domain/error/tool-parameter-optional-value-missing-loggable-exception.ts index 203987dce0b..8a32c7d97ac 100644 --- a/apps/server/src/modules/tool/common/domain/error/tool-parameter-optional-value-missing-loggable-exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/tool-parameter-optional-value-missing-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { EntityId } from '@shared/domain/types'; import { CustomParameter } from '../custom-parameter.do'; diff --git a/apps/server/src/modules/tool/common/domain/error/tool-parameter-required.loggable-exception.ts b/apps/server/src/modules/tool/common/domain/error/tool-parameter-required.loggable-exception.ts index 8e97a978ff0..aafde0cadd2 100644 --- a/apps/server/src/modules/tool/common/domain/error/tool-parameter-required.loggable-exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/tool-parameter-required.loggable-exception.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { HttpStatus } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; import { BusinessError } from '@shared/common'; diff --git a/apps/server/src/modules/tool/common/domain/error/tool-parameter-type-mismatch.loggable-exception.ts b/apps/server/src/modules/tool/common/domain/error/tool-parameter-type-mismatch.loggable-exception.ts index 4c305bd0b92..284b896f1f5 100644 --- a/apps/server/src/modules/tool/common/domain/error/tool-parameter-type-mismatch.loggable-exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/tool-parameter-type-mismatch.loggable-exception.ts @@ -1,5 +1,5 @@ import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { HttpStatus } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; import { CustomParameter } from '../custom-parameter.do'; diff --git a/apps/server/src/modules/tool/common/domain/error/tool-parameter-unknown.loggable-exception.ts b/apps/server/src/modules/tool/common/domain/error/tool-parameter-unknown.loggable-exception.ts index c418805b589..f07b27cc202 100644 --- a/apps/server/src/modules/tool/common/domain/error/tool-parameter-unknown.loggable-exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/tool-parameter-unknown.loggable-exception.ts @@ -1,5 +1,5 @@ import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { HttpStatus } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; import { CustomParameterEntry } from '../custom-parameter-entry.do'; diff --git a/apps/server/src/modules/tool/common/domain/error/tool-parameter-value-regex.loggable-exception.ts b/apps/server/src/modules/tool/common/domain/error/tool-parameter-value-regex.loggable-exception.ts index ded6fdab40a..b1b68a1bcdb 100644 --- a/apps/server/src/modules/tool/common/domain/error/tool-parameter-value-regex.loggable-exception.ts +++ b/apps/server/src/modules/tool/common/domain/error/tool-parameter-value-regex.loggable-exception.ts @@ -1,5 +1,5 @@ import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { HttpStatus } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; import { CustomParameter } from '../custom-parameter.do'; diff --git a/apps/server/src/modules/tool/context-external-tool/context-external-tool.module.ts b/apps/server/src/modules/tool/context-external-tool/context-external-tool.module.ts index 9e5d4547989..9e9b28deaed 100644 --- a/apps/server/src/modules/tool/context-external-tool/context-external-tool.module.ts +++ b/apps/server/src/modules/tool/context-external-tool/context-external-tool.module.ts @@ -1,7 +1,7 @@ import { AuthorizationModule } from '@modules/authorization'; import { UserLicenseModule } from '@modules/user-license'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { CommonToolModule } from '../common'; import { ExternalToolModule } from '../external-tool'; import { SchoolExternalToolModule } from '../school-external-tool'; diff --git a/apps/server/src/modules/tool/context-external-tool/controller/api-test/admin-api-context-external-tool.api.spec.ts b/apps/server/src/modules/tool/context-external-tool/controller/api-test/admin-api-context-external-tool.api.spec.ts index 37e72b84127..7378ac3e14e 100644 --- a/apps/server/src/modules/tool/context-external-tool/controller/api-test/admin-api-context-external-tool.api.spec.ts +++ b/apps/server/src/modules/tool/context-external-tool/controller/api-test/admin-api-context-external-tool.api.spec.ts @@ -1,8 +1,8 @@ import { EntityManager, MikroORM } from '@mikro-orm/core'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Course, SchoolEntity } from '@shared/domain/entity'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; // admin-api-context-external-tool and test file is wrong placed need to be part of a admin-api-module folder import { adminApiServerConfig } from '@modules/server/admin-api-server.config'; import { courseFactory } from '@testing/factory/course.factory'; diff --git a/apps/server/src/modules/tool/context-external-tool/controller/api-test/tool-context.api.spec.ts b/apps/server/src/modules/tool/context-external-tool/controller/api-test/tool-context.api.spec.ts index 4f512234a06..9ce77348943 100644 --- a/apps/server/src/modules/tool/context-external-tool/controller/api-test/tool-context.api.spec.ts +++ b/apps/server/src/modules/tool/context-external-tool/controller/api-test/tool-context.api.spec.ts @@ -1,12 +1,12 @@ import { EntityManager, MikroORM } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Course, SchoolEntity, User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; import { courseFactory } from '@testing/factory/course.factory'; import { roleFactory } from '@testing/factory/role.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; diff --git a/apps/server/src/modules/tool/context-external-tool/controller/tool-context.controller.ts b/apps/server/src/modules/tool/context-external-tool/controller/tool-context.controller.ts index a0221749279..3dd29938984 100644 --- a/apps/server/src/modules/tool/context-external-tool/controller/tool-context.controller.ts +++ b/apps/server/src/modules/tool/context-external-tool/controller/tool-context.controller.ts @@ -12,7 +12,7 @@ import { ApiUnprocessableEntityResponse, } from '@nestjs/swagger'; import { ValidationError } from '@shared/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { ContextExternalTool } from '../domain'; import { ContextExternalToolRequestMapper, ContextExternalToolResponseMapper } from '../mapper'; import { ContextExternalToolUc } from '../uc'; diff --git a/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-oauth-signature.loggable-exception.ts b/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-oauth-signature.loggable-exception.ts index 0a4966999e6..281f3bc6a67 100644 --- a/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-oauth-signature.loggable-exception.ts +++ b/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-oauth-signature.loggable-exception.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class InvalidOauthSignatureLoggableException extends BadRequestException implements Loggable { getLogMessage(): LogMessage | ErrorLogMessage | ValidationErrorLogMessage { diff --git a/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-tool-type.loggable-exception.ts b/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-tool-type.loggable-exception.ts index 7974634fde2..9217421a3a2 100644 --- a/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-tool-type.loggable-exception.ts +++ b/apps/server/src/modules/tool/context-external-tool/domain/error/invalid-tool-type.loggable-exception.ts @@ -1,5 +1,5 @@ import { UnprocessableEntityException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ToolConfigType } from '../../../common/enum'; export class InvalidToolTypeLoggableException extends UnprocessableEntityException implements Loggable { diff --git a/apps/server/src/modules/tool/context-external-tool/domain/error/lti-deep-link-token-missing.loggable-exception.ts b/apps/server/src/modules/tool/context-external-tool/domain/error/lti-deep-link-token-missing.loggable-exception.ts index 8fe180a21b6..715e0e50c36 100644 --- a/apps/server/src/modules/tool/context-external-tool/domain/error/lti-deep-link-token-missing.loggable-exception.ts +++ b/apps/server/src/modules/tool/context-external-tool/domain/error/lti-deep-link-token-missing.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnauthorizedException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class LtiDeepLinkTokenMissingLoggableException extends UnauthorizedException implements Loggable { constructor(private readonly state: string, private readonly contextExternalToolId: EntityId) { diff --git a/apps/server/src/modules/tool/context-external-tool/domain/error/lti-message-type-not-implemented.loggable-exception.ts b/apps/server/src/modules/tool/context-external-tool/domain/error/lti-message-type-not-implemented.loggable-exception.ts index 31202563978..7131feb35ba 100644 --- a/apps/server/src/modules/tool/context-external-tool/domain/error/lti-message-type-not-implemented.loggable-exception.ts +++ b/apps/server/src/modules/tool/context-external-tool/domain/error/lti-message-type-not-implemented.loggable-exception.ts @@ -1,5 +1,5 @@ import { NotImplementedException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class LtiMessageTypeNotImplementedLoggableException extends NotImplementedException implements Loggable { constructor(private readonly ltiMessageType: string) { diff --git a/apps/server/src/modules/tool/context-external-tool/domain/error/restricted-context-mismatch-loggabble.ts b/apps/server/src/modules/tool/context-external-tool/domain/error/restricted-context-mismatch-loggabble.ts index e0fb9cc0687..bdf4fddb3e1 100644 --- a/apps/server/src/modules/tool/context-external-tool/domain/error/restricted-context-mismatch-loggabble.ts +++ b/apps/server/src/modules/tool/context-external-tool/domain/error/restricted-context-mismatch-loggabble.ts @@ -1,5 +1,5 @@ import { UnprocessableEntityException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ToolContextType } from '../../../common/enum'; export class RestrictedContextMismatchLoggableException extends UnprocessableEntityException implements Loggable { diff --git a/apps/server/src/modules/tool/external-tool/controller/api-test/admin-api-external-tool.api.spec.ts b/apps/server/src/modules/tool/external-tool/controller/api-test/admin-api-external-tool.api.spec.ts index 8ba198db823..ad7b1cc5b99 100644 --- a/apps/server/src/modules/tool/external-tool/controller/api-test/admin-api-external-tool.api.spec.ts +++ b/apps/server/src/modules/tool/external-tool/controller/api-test/admin-api-external-tool.api.spec.ts @@ -1,7 +1,7 @@ import { EntityManager, MikroORM } from '@mikro-orm/core'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; // admin-api-external-tool and test file is wrong placed need to be part of a admin-api-module folder import { adminApiServerConfig } from '@modules/server/admin-api-server.config'; import { TestApiClient } from '@testing/test-api-client'; diff --git a/apps/server/src/modules/tool/external-tool/controller/api-test/tool.api.spec.ts b/apps/server/src/modules/tool/external-tool/controller/api-test/tool.api.spec.ts index f342a2b1722..656b6af8f8d 100644 --- a/apps/server/src/modules/tool/external-tool/controller/api-test/tool.api.spec.ts +++ b/apps/server/src/modules/tool/external-tool/controller/api-test/tool.api.spec.ts @@ -1,5 +1,6 @@ import { Loaded } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { columnBoardEntityFactory, externalToolElementEntityFactory } from '@modules/board/testing'; import { FileRecordResponse } from '@modules/files-storage/controller/dto'; import { instanceEntityFactory } from '@modules/instance/testing'; import { ServerTestModule } from '@modules/server'; @@ -8,7 +9,6 @@ import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { columnBoardEntityFactory, externalToolElementEntityFactory } from '@src/modules/board/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; diff --git a/apps/server/src/modules/tool/external-tool/controller/tool.controller.ts b/apps/server/src/modules/tool/external-tool/controller/tool.controller.ts index 3bbe1bdabee..8c4215dd666 100644 --- a/apps/server/src/modules/tool/external-tool/controller/tool.controller.ts +++ b/apps/server/src/modules/tool/external-tool/controller/tool.controller.ts @@ -29,7 +29,7 @@ import { ValidationError } from '@shared/common'; import { PaginationParams } from '@shared/controller'; import { Page } from '@shared/domain/domainobject'; import { IFindOptions } from '@shared/domain/interface'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { Response } from 'express'; import { ExternalToolSearchQuery } from '../../common/interface'; import { ExternalTool, ExternalToolMetadata } from '../domain'; 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 dfa73439c1f..bba5d7947c3 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 @@ -3,7 +3,7 @@ import { AuthorizationModule } from '@modules/authorization'; import { OauthProviderServiceModule } from '@modules/oauth-provider'; import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { InstanceModule } from '../../instance'; import { CommonToolModule } from '../common'; import { ToolContextMapper } from '../common/mapper/tool-context.mapper'; diff --git a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetch-failed-loggable-exception.ts b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetch-failed-loggable-exception.ts index b44b0cbf9d9..c26a1d1fc58 100644 --- a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetch-failed-loggable-exception.ts +++ b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetch-failed-loggable-exception.ts @@ -1,5 +1,5 @@ import { HttpStatus } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { BusinessError } from '@shared/common'; export class ExternalToolLogoFetchFailedLoggableException extends BusinessError implements Loggable { diff --git a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetched-loggable.ts b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetched-loggable.ts index cfdc79ec20e..85a294fcb3b 100644 --- a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetched-loggable.ts +++ b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-fetched-loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ExternalToolLogoFetchedLoggable implements Loggable { constructor(private readonly logoUrl: string) {} diff --git a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-not-found-loggable-exception.ts b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-not-found-loggable-exception.ts index d6d690431da..96ebc1ab8e1 100644 --- a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-not-found-loggable-exception.ts +++ b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-not-found-loggable-exception.ts @@ -1,5 +1,5 @@ import { NotFoundException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ExternalToolLogoNotFoundLoggableException extends NotFoundException implements Loggable { constructor(private readonly externalToolId: string) { diff --git a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-size-exceeded-loggable-exception.ts b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-size-exceeded-loggable-exception.ts index f400be7adaf..ba1be587d79 100644 --- a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-size-exceeded-loggable-exception.ts +++ b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-size-exceeded-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ExternalToolLogoSizeExceededLoggableException extends BusinessError implements Loggable { constructor( diff --git a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-wrong-file-type-loggable-exception.ts b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-wrong-file-type-loggable-exception.ts index c4f4a94257e..1431caec1a5 100644 --- a/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-wrong-file-type-loggable-exception.ts +++ b/apps/server/src/modules/tool/external-tool/loggable/external-tool-logo-wrong-file-type-loggable-exception.ts @@ -1,5 +1,5 @@ import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { HttpStatus } from '@nestjs/common'; export class ExternalToolLogoWrongFileTypeLoggableException extends BusinessError implements Loggable { diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.spec.ts b/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.spec.ts index eee5561eaed..43f69cf5582 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.spec.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.spec.ts @@ -3,7 +3,7 @@ import { HttpService } from '@nestjs/axios'; import { HttpException, HttpStatus } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { of, throwError } from 'rxjs'; import { ToolConfig } from '../../tool-config'; diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.ts b/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.ts index 01c4689ad53..4c243220319 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool-logo.service.ts @@ -2,7 +2,7 @@ import { HttpService } from '@nestjs/axios'; import { HttpException, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { AxiosResponse } from 'axios'; import { lastValueFrom } from 'rxjs'; import { ToolConfig } from '../../tool-config'; 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 5b54683bda9..bf40e3ab44d 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,5 +1,5 @@ +import { ProviderOauthClient } from '@modules/oauth-provider/domain'; import { Injectable } from '@nestjs/common'; -import { ProviderOauthClient } from '@src/modules/oauth-provider/domain'; import { Oauth2ToolConfig } from '../domain'; @Injectable() 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 38a14509f9d..94cfd0f2007 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 @@ -5,7 +5,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { Page } from '@shared/domain/domainobject'; import { IFindOptions, SortOrder } from '@shared/domain/interface'; import { ExternalToolRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { OauthProviderService } from '../../../oauth-provider/domain/service/oauth-provider.service'; import { providerOauthClientFactory } from '../../../oauth-provider/testing'; import { ExternalToolSearchQuery } from '../../common/interface'; 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 50b07c0d41e..22d6d3a7562 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 @@ -5,7 +5,7 @@ import { Page } from '@shared/domain/domainobject'; import { IFindOptions } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; import { ExternalToolRepo } from '@shared/repo/externaltool'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { TokenEndpointAuthMethod } from '../../common/enum'; import { ExternalToolSearchQuery } from '../../common/interface'; import { CommonToolDeleteService } from '../../common/service'; diff --git a/apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.spec.ts b/apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.spec.ts index 2e83011083b..c7f67f60aaf 100644 --- a/apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.spec.ts +++ b/apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.spec.ts @@ -2,13 +2,13 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; import { BoardContextApiHelperService } from '@modules/board-context'; +import { School, SchoolService } from '@modules/school'; import { schoolFactory } from '@modules/school/testing'; import { ForbiddenException, NotFoundException, UnauthorizedException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Page } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { School, SchoolService } from '@src/modules/school'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/tool/school-external-tool/controller/api-test/admin-api-school-external-tool.api.spec.ts b/apps/server/src/modules/tool/school-external-tool/controller/api-test/admin-api-school-external-tool.api.spec.ts index 7302e89a1b0..a6e4e49af83 100644 --- a/apps/server/src/modules/tool/school-external-tool/controller/api-test/admin-api-school-external-tool.api.spec.ts +++ b/apps/server/src/modules/tool/school-external-tool/controller/api-test/admin-api-school-external-tool.api.spec.ts @@ -1,8 +1,8 @@ import { EntityManager, MikroORM } from '@mikro-orm/core'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain/entity'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; // admin-api-external-tool and test file is wrong placed need to be part of a admin-api-module folder import { adminApiServerConfig } from '@modules/server/admin-api-server.config'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; diff --git a/apps/server/src/modules/tool/school-external-tool/controller/api-test/tool-school.api.spec.ts b/apps/server/src/modules/tool/school-external-tool/controller/api-test/tool-school.api.spec.ts index 7318e138a3c..d89a2729a38 100644 --- a/apps/server/src/modules/tool/school-external-tool/controller/api-test/tool-school.api.spec.ts +++ b/apps/server/src/modules/tool/school-external-tool/controller/api-test/tool-school.api.spec.ts @@ -1,13 +1,13 @@ import { EntityManager, MikroORM } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; +import { columnBoardEntityFactory, externalToolElementEntityFactory } from '@modules/board/testing'; import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity, User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; -import { columnBoardEntityFactory, externalToolElementEntityFactory } from '@src/modules/board/testing'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; import { userFactory } from '@testing/factory/user.factory'; diff --git a/apps/server/src/modules/tool/school-external-tool/controller/tool-school.controller.ts b/apps/server/src/modules/tool/school-external-tool/controller/tool-school.controller.ts index c942ebb02c2..36cbe40cf6b 100644 --- a/apps/server/src/modules/tool/school-external-tool/controller/tool-school.controller.ts +++ b/apps/server/src/modules/tool/school-external-tool/controller/tool-school.controller.ts @@ -13,7 +13,7 @@ import { ApiUnprocessableEntityResponse, } from '@nestjs/swagger'; import { ValidationError } from '@shared/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { ExternalToolSearchListResponse } from '../../external-tool/controller/dto'; import { SchoolExternalTool, SchoolExternalToolMetadata, SchoolExternalToolProps } from '../domain'; import { diff --git a/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.spec.ts b/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.spec.ts index 552ce9405bc..a8de866fd0f 100644 --- a/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.spec.ts +++ b/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.spec.ts @@ -1,11 +1,11 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; +import { School, SchoolService } from '@modules/school'; import { schoolFactory } from '@modules/school/testing'; import { Test, TestingModule } from '@nestjs/testing'; import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { School, SchoolService } from '@src/modules/school'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; import { CommonToolMetadataService } from '../../common/service/common-tool-metadata.service'; diff --git a/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.ts b/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.ts index d57bfafa5ea..75b26ae8b15 100644 --- a/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.ts +++ b/apps/server/src/modules/tool/school-external-tool/uc/school-external-tool.uc.ts @@ -1,9 +1,9 @@ import { AuthorizationContext, AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; +import { School, SchoolService } from '@modules/school'; import { forwardRef, Inject, Injectable } from '@nestjs/common'; import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { School, SchoolService } from '@src/modules/school'; import { CommonToolMetadataService } from '../../common/service/common-tool-metadata.service'; import { SchoolExternalTool, SchoolExternalToolMetadata, SchoolExternalToolProps } from '../domain'; import { SchoolExternalToolService, SchoolExternalToolValidationService } from '../service'; diff --git a/apps/server/src/modules/tool/tool-api.module.ts b/apps/server/src/modules/tool/tool-api.module.ts index 602795e652a..0a0eba8fe8f 100644 --- a/apps/server/src/modules/tool/tool-api.module.ts +++ b/apps/server/src/modules/tool/tool-api.module.ts @@ -8,7 +8,7 @@ import { UserModule } from '@modules/user'; import { UserLicenseModule } from '@modules/user-license'; import { Module } from '@nestjs/common'; import { LtiToolRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { LearnroomModule } from '../learnroom'; import { CommonToolModule } from './common'; import { ToolPermissionHelper } from './common/uc/tool-permission-helper'; diff --git a/apps/server/src/modules/tool/tool-launch/controller/api-test/tool-launch.controller.api.spec.ts b/apps/server/src/modules/tool/tool-launch/controller/api-test/tool-launch.controller.api.spec.ts index 12858458e31..5be282bc07b 100644 --- a/apps/server/src/modules/tool/tool-launch/controller/api-test/tool-launch.controller.api.spec.ts +++ b/apps/server/src/modules/tool/tool-launch/controller/api-test/tool-launch.controller.api.spec.ts @@ -1,12 +1,12 @@ import { EntityManager, MikroORM } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; +import { BoardExternalReferenceType } from '@modules/board'; +import { mediaBoardEntityFactory } from '@modules/board/testing'; import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Course, SchoolEntity } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { BoardExternalReferenceType } from '@src/modules/board'; -import { mediaBoardEntityFactory } from '@src/modules/board/testing'; import { courseFactory } from '@testing/factory/course.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { UserAndAccountTestFactory } from '@testing/factory/user-and-account.test.factory'; diff --git a/apps/server/src/modules/tool/tool-launch/error/launch-context-unavailable.loggable-exception.ts b/apps/server/src/modules/tool/tool-launch/error/launch-context-unavailable.loggable-exception.ts index f74ba30b677..35c6915810f 100644 --- a/apps/server/src/modules/tool/tool-launch/error/launch-context-unavailable.loggable-exception.ts +++ b/apps/server/src/modules/tool/tool-launch/error/launch-context-unavailable.loggable-exception.ts @@ -1,7 +1,7 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ContextExternalToolLaunchable } from '../../context-external-tool/domain'; export class LaunchContextUnavailableLoggableException extends BusinessError implements Loggable { diff --git a/apps/server/src/modules/tool/tool-launch/error/missing-licence.loggable-exception.ts b/apps/server/src/modules/tool/tool-launch/error/missing-licence.loggable-exception.ts index a7b398646d4..1cc6bd85285 100644 --- a/apps/server/src/modules/tool/tool-launch/error/missing-licence.loggable-exception.ts +++ b/apps/server/src/modules/tool/tool-launch/error/missing-licence.loggable-exception.ts @@ -2,7 +2,7 @@ import { ExternalToolMedium } from '@modules/tool/external-tool/domain'; import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ContextExternalToolLaunchable } from '../../context-external-tool/domain'; export class MissingMediaLicenseLoggableException extends BusinessError implements Loggable { diff --git a/apps/server/src/modules/tool/tool-launch/error/missing-tool-parameter-value.loggable-exception.ts b/apps/server/src/modules/tool/tool-launch/error/missing-tool-parameter-value.loggable-exception.ts index d7705d05693..111405747f1 100644 --- a/apps/server/src/modules/tool/tool-launch/error/missing-tool-parameter-value.loggable-exception.ts +++ b/apps/server/src/modules/tool/tool-launch/error/missing-tool-parameter-value.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { CustomParameter } from '../../common/domain'; import { ContextExternalToolLaunchable } from '../../context-external-tool/domain'; diff --git a/apps/server/src/modules/tool/tool-launch/error/parameter-type-not-implemented.loggable-exception.ts b/apps/server/src/modules/tool/tool-launch/error/parameter-type-not-implemented.loggable-exception.ts index 184959a4564..022187aaf6a 100644 --- a/apps/server/src/modules/tool/tool-launch/error/parameter-type-not-implemented.loggable-exception.ts +++ b/apps/server/src/modules/tool/tool-launch/error/parameter-type-not-implemented.loggable-exception.ts @@ -1,5 +1,5 @@ import { NotImplementedException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ParameterTypeNotImplementedLoggableException extends NotImplementedException implements Loggable { constructor(private readonly parameterType: string) { diff --git a/apps/server/src/modules/tool/tool-launch/error/tool-status-not-launchable.loggable-exception.ts b/apps/server/src/modules/tool/tool-launch/error/tool-status-not-launchable.loggable-exception.ts index 94254fcc47b..d356d3d92ac 100644 --- a/apps/server/src/modules/tool/tool-launch/error/tool-status-not-launchable.loggable-exception.ts +++ b/apps/server/src/modules/tool/tool-launch/error/tool-status-not-launchable.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ContextExternalToolConfigurationStatus } from '../../common/domain'; import { ContextExternalToolLaunchable } from '../../context-external-tool/domain'; diff --git a/apps/server/src/modules/tool/tool-launch/service/auto-parameter-strategy/auto-medium-id.strategy.ts b/apps/server/src/modules/tool/tool-launch/service/auto-parameter-strategy/auto-medium-id.strategy.ts index ff4bf471da1..23bcd30a03b 100644 --- a/apps/server/src/modules/tool/tool-launch/service/auto-parameter-strategy/auto-medium-id.strategy.ts +++ b/apps/server/src/modules/tool/tool-launch/service/auto-parameter-strategy/auto-medium-id.strategy.ts @@ -1,6 +1,6 @@ +import { ContextExternalToolLaunchable } from '@modules/tool/context-external-tool/domain'; +import { SchoolExternalTool } from '@modules/tool/school-external-tool/domain'; import { Injectable } from '@nestjs/common'; -import { ContextExternalToolLaunchable } from '@src/modules/tool/context-external-tool/domain'; -import { SchoolExternalTool } from '@src/modules/tool/school-external-tool/domain'; import { ExternalTool } from '../../../external-tool/domain'; import { ExternalToolService } from '../../../external-tool/service'; import { AutoParameterStrategy } from './auto-parameter.strategy'; diff --git a/apps/server/src/modules/user-import/controller/api-test/import-user-populate.api.spec.ts b/apps/server/src/modules/user-import/controller/api-test/import-user-populate.api.spec.ts index 4547d791a5a..37dae2c703a 100644 --- a/apps/server/src/modules/user-import/controller/api-test/import-user-populate.api.spec.ts +++ b/apps/server/src/modules/user-import/controller/api-test/import-user-populate.api.spec.ts @@ -1,6 +1,7 @@ import { SchulconnexResponse } from '@infra/schulconnex-client'; import { schulconnexResponseFactory } from '@infra/schulconnex-client/testing'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { accountFactory } from '@modules/account/testing'; import { OauthTokenResponse } from '@modules/oauth/service/dto'; import { serverConfig, ServerConfig } from '@modules/server'; import { ServerTestModule } from '@modules/server/server.app.module'; @@ -8,7 +9,6 @@ import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission, RoleName } from '@shared/domain/interface'; import { SchoolFeature } from '@shared/domain/types'; -import { accountFactory } from '@src/modules/account/testing'; import { roleFactory } from '@testing/factory/role.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { systemEntityFactory } from '@testing/factory/systemEntityFactory'; diff --git a/apps/server/src/modules/user-import/controller/api-test/import-user.api.spec.ts b/apps/server/src/modules/user-import/controller/api-test/import-user.api.spec.ts index 77c55d0ed8a..78e1580bf0a 100644 --- a/apps/server/src/modules/user-import/controller/api-test/import-user.api.spec.ts +++ b/apps/server/src/modules/user-import/controller/api-test/import-user.api.spec.ts @@ -1,4 +1,6 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; import { serverConfig, ServerConfig } from '@modules/server'; import { ServerTestModule } from '@modules/server/server.app.module'; import { SystemEntity } from '@modules/system/entity'; @@ -24,8 +26,6 @@ import { PaginationParams } from '@shared/controller'; import { SchoolEntity, User } from '@shared/domain/entity'; import { Permission, RoleName, SortOrder } from '@shared/domain/interface'; import { SchoolFeature } from '@shared/domain/types'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { importUserFactory } from '@testing/factory/import-user.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/user-import/loggable/migration-is-not-completed.loggable.ts b/apps/server/src/modules/user-import/loggable/migration-is-not-completed.loggable.ts index a3816bb176f..d1f579f7308 100644 --- a/apps/server/src/modules/user-import/loggable/migration-is-not-completed.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/migration-is-not-completed.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class MigrationMayNotBeCompleted implements Loggable { constructor(private readonly inUserMigration?: boolean) {} diff --git a/apps/server/src/modules/user-import/loggable/migration-may-be-completed.loggable.ts b/apps/server/src/modules/user-import/loggable/migration-may-be-completed.loggable.ts index 52277bc6517..81d36133334 100644 --- a/apps/server/src/modules/user-import/loggable/migration-may-be-completed.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/migration-may-be-completed.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class MigrationMayBeCompleted implements Loggable { constructor(private readonly inUserMigration?: boolean) {} diff --git a/apps/server/src/modules/user-import/loggable/school-id-does-not-match-with-user-school-id.loggable.ts b/apps/server/src/modules/user-import/loggable/school-id-does-not-match-with-user-school-id.loggable.ts index 71b315161d7..e9f9426a560 100644 --- a/apps/server/src/modules/user-import/loggable/school-id-does-not-match-with-user-school-id.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/school-id-does-not-match-with-user-school-id.loggable.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolIdDoesNotMatchWithUserSchoolId implements Loggable { constructor( diff --git a/apps/server/src/modules/user-import/loggable/school-in-user-migration-end.loggable.ts b/apps/server/src/modules/user-import/loggable/school-in-user-migration-end.loggable.ts index 39378256a07..e550a7cfb7b 100644 --- a/apps/server/src/modules/user-import/loggable/school-in-user-migration-end.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/school-in-user-migration-end.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolInUserMigrationEndLoggable implements Loggable { constructor(private readonly schoolName: string) {} diff --git a/apps/server/src/modules/user-import/loggable/school-in-user-migration-start.loggable.ts b/apps/server/src/modules/user-import/loggable/school-in-user-migration-start.loggable.ts index 20abb9af969..4a673a7d1d0 100644 --- a/apps/server/src/modules/user-import/loggable/school-in-user-migration-start.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/school-in-user-migration-start.loggable.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolInUserMigrationStartLoggable implements Loggable { constructor( diff --git a/apps/server/src/modules/user-import/loggable/school-not-migrated.loggable-exception.ts b/apps/server/src/modules/user-import/loggable/school-not-migrated.loggable-exception.ts index 2d0ee1fd7d9..657031e17ea 100644 --- a/apps/server/src/modules/user-import/loggable/school-not-migrated.loggable-exception.ts +++ b/apps/server/src/modules/user-import/loggable/school-not-migrated.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolNotMigratedLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly schoolId: EntityId) { diff --git a/apps/server/src/modules/user-import/loggable/user-already-migrated.loggable.ts b/apps/server/src/modules/user-import/loggable/user-already-migrated.loggable.ts index c4de7ad7acc..01babe1b010 100644 --- a/apps/server/src/modules/user-import/loggable/user-already-migrated.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/user-already-migrated.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserAlreadyMigratedLoggable implements Loggable { constructor(private readonly userId: string) {} diff --git a/apps/server/src/modules/user-import/loggable/user-import-configuration-failure-loggable-exception.ts b/apps/server/src/modules/user-import/loggable/user-import-configuration-failure-loggable-exception.ts index 91337ccb4c9..925fdc6904b 100644 --- a/apps/server/src/modules/user-import/loggable/user-import-configuration-failure-loggable-exception.ts +++ b/apps/server/src/modules/user-import/loggable/user-import-configuration-failure-loggable-exception.ts @@ -1,5 +1,5 @@ import { HttpStatus } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { BusinessError } from '@shared/common'; export class UserImportConfigurationFailureLoggableException extends BusinessError implements Loggable { diff --git a/apps/server/src/modules/user-import/loggable/user-import-populate-failure-loggable-exception.ts b/apps/server/src/modules/user-import/loggable/user-import-populate-failure-loggable-exception.ts index 0348abfa45c..2c2c1d7f2dd 100644 --- a/apps/server/src/modules/user-import/loggable/user-import-populate-failure-loggable-exception.ts +++ b/apps/server/src/modules/user-import/loggable/user-import-populate-failure-loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserImportPopulateFailureLoggableException extends BusinessError implements Loggable { constructor(private readonly url: string) { diff --git a/apps/server/src/modules/user-import/loggable/user-import-school-external-id-missing-loggable-exception.ts b/apps/server/src/modules/user-import/loggable/user-import-school-external-id-missing-loggable-exception.ts index 024f305b499..eeb3e215f92 100644 --- a/apps/server/src/modules/user-import/loggable/user-import-school-external-id-missing-loggable-exception.ts +++ b/apps/server/src/modules/user-import/loggable/user-import-school-external-id-missing-loggable-exception.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserImportSchoolExternalIdMissingLoggableException extends BadRequestException implements Loggable { constructor(private readonly schoolId: string) { diff --git a/apps/server/src/modules/user-import/loggable/user-login-migration-not-active.loggable-exception.ts b/apps/server/src/modules/user-import/loggable/user-login-migration-not-active.loggable-exception.ts index 59a4d8d32fd..5e24d689d52 100644 --- a/apps/server/src/modules/user-import/loggable/user-login-migration-not-active.loggable-exception.ts +++ b/apps/server/src/modules/user-import/loggable/user-login-migration-not-active.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationNotActiveLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly schoolId: EntityId) { diff --git a/apps/server/src/modules/user-import/loggable/user-migration-canceled.loggable.ts b/apps/server/src/modules/user-import/loggable/user-migration-canceled.loggable.ts index 925f6498cbc..2953b1dc82c 100644 --- a/apps/server/src/modules/user-import/loggable/user-migration-canceled.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/user-migration-canceled.loggable.ts @@ -1,5 +1,5 @@ import { LegacySchoolDo } from '@shared/domain/domainobject'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserMigrationCanceledLoggable implements Loggable { constructor(private readonly school: LegacySchoolDo) {} diff --git a/apps/server/src/modules/user-import/loggable/user-migration-failed.loggable.ts b/apps/server/src/modules/user-import/loggable/user-migration-failed.loggable.ts index 8f382e8424e..f7e3dbb3e6d 100644 --- a/apps/server/src/modules/user-import/loggable/user-migration-failed.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/user-migration-failed.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { ImportUser } from '../entity'; export class UserMigrationFailedLoggable implements Loggable { diff --git a/apps/server/src/modules/user-import/loggable/user-migration-not-enable-loggable-exception.ts b/apps/server/src/modules/user-import/loggable/user-migration-not-enable-loggable-exception.ts index 475323fb7f9..3a2b7e48b88 100644 --- a/apps/server/src/modules/user-import/loggable/user-migration-not-enable-loggable-exception.ts +++ b/apps/server/src/modules/user-import/loggable/user-migration-not-enable-loggable-exception.ts @@ -1,5 +1,5 @@ import { ForbiddenException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserMigrationIsNotEnabledLoggableException extends ForbiddenException implements Loggable { constructor(private readonly userId?: string, private readonly schoolId?: string) { diff --git a/apps/server/src/modules/user-import/loggable/user-migration-not-enable.loggable.ts b/apps/server/src/modules/user-import/loggable/user-migration-not-enable.loggable.ts index 2d3de69bfbc..b66a8033141 100644 --- a/apps/server/src/modules/user-import/loggable/user-migration-not-enable.loggable.ts +++ b/apps/server/src/modules/user-import/loggable/user-migration-not-enable.loggable.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserMigrationIsNotEnabled implements Loggable { getLogMessage(): LogMessage | ErrorLogMessage | ValidationErrorLogMessage { diff --git a/apps/server/src/modules/user-import/service/user-import.service.spec.ts b/apps/server/src/modules/user-import/service/user-import.service.spec.ts index d4d0f93a799..2286723e3df 100644 --- a/apps/server/src/modules/user-import/service/user-import.service.spec.ts +++ b/apps/server/src/modules/user-import/service/user-import.service.spec.ts @@ -11,7 +11,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, UserLoginMigrationDO } from '@shared/domain/domainobject'; import { SchoolEntity, User } from '@shared/domain/entity'; import { SchoolFeature } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { legacySchoolDoFactory, userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { importUserFactory } from '@testing/factory/import-user.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; diff --git a/apps/server/src/modules/user-import/service/user-import.service.ts b/apps/server/src/modules/user-import/service/user-import.service.ts index 8a1f82be0a4..e88c475f3a2 100644 --- a/apps/server/src/modules/user-import/service/user-import.service.ts +++ b/apps/server/src/modules/user-import/service/user-import.service.ts @@ -6,7 +6,7 @@ import { ConfigService } from '@nestjs/config'; import { LegacySchoolDo, UserLoginMigrationDO } from '@shared/domain/domainobject'; import { SchoolEntity, User } from '@shared/domain/entity'; import { SchoolFeature } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { ImportUser, MatchCreator } from '../entity'; import { UserMigrationCanceledLoggable, UserMigrationIsNotEnabled } from '../loggable'; import { ImportUserRepo } from '../repo/import-user.repo'; diff --git a/apps/server/src/modules/user-import/uc/ldap-user-migration.error.ts b/apps/server/src/modules/user-import/uc/ldap-user-migration.error.ts index 8f772ce4deb..6c9c16fcf46 100644 --- a/apps/server/src/modules/user-import/uc/ldap-user-migration.error.ts +++ b/apps/server/src/modules/user-import/uc/ldap-user-migration.error.ts @@ -1,5 +1,5 @@ import { BadRequestException, HttpExceptionOptions } from '@nestjs/common'; -import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, LogMessage, Loggable, ValidationErrorLogMessage } from '@core/logger'; export class LdapUserMigrationException extends BadRequestException {} 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 95eeeb070e3..20f80daef18 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 @@ -19,7 +19,7 @@ import { SchoolEntity, User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; import { Counted, SchoolFeature } from '@shared/domain/types'; import { UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { legacySchoolDoFactory, userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { federalStateFactory } from '@testing/factory/federal-state.factory'; import { importUserFactory } from '@testing/factory/import-user.factory'; diff --git a/apps/server/src/modules/user-import/uc/user-import.uc.ts b/apps/server/src/modules/user-import/uc/user-import.uc.ts index 69e8868ce7e..e80f59fd6aa 100644 --- a/apps/server/src/modules/user-import/uc/user-import.uc.ts +++ b/apps/server/src/modules/user-import/uc/user-import.uc.ts @@ -14,7 +14,7 @@ import { User } from '@shared/domain/entity'; import { IFindOptions, Permission } from '@shared/domain/interface'; import { Counted, EntityId } from '@shared/domain/types'; import { UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { isError } from 'lodash'; import { ImportUserFilter, ImportUserMatchCreatorScope, ImportUserNameMatchFilter } from '../domain/interface'; diff --git a/apps/server/src/modules/user-import/user-import.module.ts b/apps/server/src/modules/user-import/user-import.module.ts index 6b7aa195767..f4af8d8d9ae 100644 --- a/apps/server/src/modules/user-import/user-import.module.ts +++ b/apps/server/src/modules/user-import/user-import.module.ts @@ -9,7 +9,7 @@ import { UserLoginMigrationModule } from '@modules/user-login-migration'; import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { LegacySchoolRepo, UserRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { ImportUserController } from './controller/import-user.controller'; import { ImportUserRepo } from './repo'; import { SchulconnexFetchImportUsersService, UserImportService } from './service'; diff --git a/apps/server/src/modules/user-license/domain/media-user-license.ts b/apps/server/src/modules/user-license/domain/media-user-license.ts index 63cbca6dac8..3a05a6f57df 100644 --- a/apps/server/src/modules/user-license/domain/media-user-license.ts +++ b/apps/server/src/modules/user-license/domain/media-user-license.ts @@ -1,4 +1,4 @@ -import { MediaSource } from '@src/modules/media-source/domain'; +import { MediaSource } from '@modules/media-source/domain'; import { UserLicense, UserLicenseProps } from './user-license'; export interface MediaUserLicenseProps extends UserLicenseProps { diff --git a/apps/server/src/modules/user-license/entity/media-user-license.entity.ts b/apps/server/src/modules/user-license/entity/media-user-license.entity.ts index aa3e8870fcf..3218029a8bd 100644 --- a/apps/server/src/modules/user-license/entity/media-user-license.entity.ts +++ b/apps/server/src/modules/user-license/entity/media-user-license.entity.ts @@ -1,5 +1,5 @@ import { Entity, ManyToOne, Property } from '@mikro-orm/core'; -import { MediaSourceEntity } from '@src/modules/media-source/entity'; +import { MediaSourceEntity } from '@modules/media-source/entity'; import { UserLicenseType } from '../enum'; import { UserLicenseEntity, UserLicenseProps } from './user-license.entity'; diff --git a/apps/server/src/modules/user-license/repo/media-user-license.repo.ts b/apps/server/src/modules/user-license/repo/media-user-license.repo.ts index 80efdf63abc..2a7f545532c 100644 --- a/apps/server/src/modules/user-license/repo/media-user-license.repo.ts +++ b/apps/server/src/modules/user-license/repo/media-user-license.repo.ts @@ -1,11 +1,11 @@ import { EntityData, EntityName } from '@mikro-orm/core'; +import { MediaSource } from '@modules/media-source/domain'; +import { MediaSourceEntity } from '@modules/media-source/entity'; +import { MediaSourceMapper } from '@modules/media-source/repo'; import { Injectable } from '@nestjs/common'; import { User } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { BaseDomainObjectRepo } from '@shared/repo/base-domain-object.repo'; -import { MediaSource } from '@src/modules/media-source/domain'; -import { MediaSourceEntity } from '@src/modules/media-source/entity'; -import { MediaSourceMapper } from '@modules/media-source/repo'; import { MediaUserLicense } from '../domain'; import { MediaUserLicenseEntity, UserLicenseType } from '../entity'; diff --git a/apps/server/src/modules/user-license/service/media-user-license.service.spec.ts b/apps/server/src/modules/user-license/service/media-user-license.service.spec.ts index d1a95b0763d..4714fa3be54 100644 --- a/apps/server/src/modules/user-license/service/media-user-license.service.spec.ts +++ b/apps/server/src/modules/user-license/service/media-user-license.service.spec.ts @@ -1,9 +1,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; +import { MediaSourceRepo } from '@modules/media-source/repo'; +import { mediaSourceFactory } from '@modules/media-source/testing'; import { ExternalToolMedium } from '@modules/tool/external-tool/domain'; import { Test, TestingModule } from '@nestjs/testing'; -import { MediaSourceRepo } from '@src/modules/media-source/repo'; -import { mediaSourceFactory } from '@modules/media-source/testing'; import { MediaUserLicense } from '../domain'; import { MediaUserLicenseRepo } from '../repo'; import { mediaUserLicenseFactory } from '../testing'; diff --git a/apps/server/src/modules/user-license/service/media-user-license.service.ts b/apps/server/src/modules/user-license/service/media-user-license.service.ts index 8f915463628..3c9a30ba8e6 100644 --- a/apps/server/src/modules/user-license/service/media-user-license.service.ts +++ b/apps/server/src/modules/user-license/service/media-user-license.service.ts @@ -1,8 +1,8 @@ +import { MediaSourceRepo } from '@modules/media-source/repo'; import { ExternalToolMedium } from '@modules/tool/external-tool/domain'; import { MediaUserLicense } from '@modules/user-license'; import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { MediaSourceRepo } from '@src/modules/media-source/repo'; import { MediaUserLicenseRepo } from '../repo'; @Injectable() diff --git a/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration-rollback.api.spec.ts b/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration-rollback.api.spec.ts index 3a2b4c654ad..5d4c49f91b2 100644 --- a/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration-rollback.api.spec.ts +++ b/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration-rollback.api.spec.ts @@ -1,11 +1,11 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; import { ServerTestModule } from '@modules/server'; import { SystemEntity } from '@modules/system/entity'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity, User } from '@shared/domain/entity'; import { UserLoginMigrationEntity } from '@shared/domain/entity/user-login-migration.entity'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { systemEntityFactory } from '@testing/factory/systemEntityFactory'; diff --git a/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration.api.spec.ts b/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration.api.spec.ts index b5c58ecfe4a..2b597944db3 100644 --- a/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration.api.spec.ts +++ b/apps/server/src/modules/user-login-migration/controller/api-test/user-login-migration.api.spec.ts @@ -11,7 +11,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity, User } from '@shared/domain/entity'; import { UserLoginMigrationEntity } from '@shared/domain/entity/user-login-migration.entity'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { ErrorResponse } from '@src/core/error/dto'; +import { ErrorResponse } from '@core/error/dto'; import { cleanupCollections } from '@testing/cleanup-collections'; import { importUserFactory } from '@testing/factory/import-user.factory'; import { JwtTestFactory } from '@testing/factory/jwt.test.factory'; diff --git a/apps/server/src/modules/user-login-migration/loggable/debug/school-migration-successful.loggable.ts b/apps/server/src/modules/user-login-migration/loggable/debug/school-migration-successful.loggable.ts index 50cd25751c9..1d403d94575 100644 --- a/apps/server/src/modules/user-login-migration/loggable/debug/school-migration-successful.loggable.ts +++ b/apps/server/src/modules/user-login-migration/loggable/debug/school-migration-successful.loggable.ts @@ -1,5 +1,5 @@ import { LegacySchoolDo, UserLoginMigrationDO } from '@shared/domain/domainobject'; -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class SchoolMigrationSuccessfulLoggable implements Loggable { constructor(private readonly school: LegacySchoolDo, private readonly userLoginMigration: UserLoginMigrationDO) {} diff --git a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.spec.ts b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.spec.ts index fd8fe76223e..8cac16b423a 100644 --- a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.spec.ts +++ b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.spec.ts @@ -1,7 +1,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; import { UserMigrationCorrectionSuccessfulLoggable } from '@modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable'; import { UserLoginMigrationDO } from '@shared/domain/domainobject'; -import { LogMessage } from '@src/core/logger'; +import { LogMessage } from '@core/logger'; import { userLoginMigrationDOFactory } from '@testing/factory/domainobject'; describe(UserMigrationCorrectionSuccessfulLoggable.name, () => { diff --git a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.ts b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.ts index 62aea398370..c201bb91412 100644 --- a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.ts +++ b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-correction-successful-loggable.ts @@ -1,6 +1,6 @@ import { EntityId } from '@shared/domain/types'; import { UserLoginMigrationDO } from '@shared/domain/domainobject'; -import { LogMessage } from '@src/core/logger'; +import { LogMessage } from '@core/logger'; export class UserMigrationCorrectionSuccessfulLoggable { constructor(private readonly userId: EntityId, private readonly userLoginMigration: UserLoginMigrationDO) {} diff --git a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-started.loggable.ts b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-started.loggable.ts index df601af8e47..f09c91c0e99 100644 --- a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-started.loggable.ts +++ b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-started.loggable.ts @@ -1,6 +1,6 @@ import { UserLoginMigrationDO } from '@shared/domain/domainobject'; import { EntityId } from '@shared/domain/types'; -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UserMigrationStartedLoggable implements Loggable { constructor(private readonly userId: EntityId, private readonly userLoginMigration: UserLoginMigrationDO) {} diff --git a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-successful.loggable.ts b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-successful.loggable.ts index 90aaca929e1..6c755de8c34 100644 --- a/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-successful.loggable.ts +++ b/apps/server/src/modules/user-login-migration/loggable/debug/user-migration-successful.loggable.ts @@ -1,6 +1,6 @@ import { UserLoginMigrationDO } from '@shared/domain/domainobject'; import { EntityId } from '@shared/domain/types'; -import { Loggable, LogMessage } from '@src/core/logger'; +import { Loggable, LogMessage } from '@core/logger'; export class UserMigrationSuccessfulLoggable implements Loggable { constructor(private readonly userId: EntityId, private readonly userLoginMigration: UserLoginMigrationDO) {} diff --git a/apps/server/src/modules/user-login-migration/loggable/external-school-number-missing.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/external-school-number-missing.loggable-exception.ts index 6c94a05e2e5..7671bda410b 100644 --- a/apps/server/src/modules/user-login-migration/loggable/external-school-number-missing.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/external-school-number-missing.loggable-exception.ts @@ -1,5 +1,5 @@ import { UnprocessableEntityException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class ExternalSchoolNumberMissingLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly externalSchoolId: string) { diff --git a/apps/server/src/modules/user-login-migration/loggable/identical-user-login-migration-system.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/identical-user-login-migration-system.loggable-exception.ts index 2e1a7391f06..7d9841d721c 100644 --- a/apps/server/src/modules/user-login-migration/loggable/identical-user-login-migration-system.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/identical-user-login-migration-system.loggable-exception.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { BusinessError } from '@shared/common'; import { EntityId } from '@shared/domain/types'; import { HttpStatus } from '@nestjs/common'; diff --git a/apps/server/src/modules/user-login-migration/loggable/invalid-user-login-migration.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/invalid-user-login-migration.loggable-exception.ts index 8642300aa86..317e93a26ff 100644 --- a/apps/server/src/modules/user-login-migration/loggable/invalid-user-login-migration.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/invalid-user-login-migration.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class InvalidUserLoginMigrationLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly userId: EntityId, private readonly targetSystemId: EntityId) { diff --git a/apps/server/src/modules/user-login-migration/loggable/moin-schule-system-not-found.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/moin-schule-system-not-found.loggable-exception.ts index 93c0dfce2cf..ceb437ed160 100644 --- a/apps/server/src/modules/user-login-migration/loggable/moin-schule-system-not-found.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/moin-schule-system-not-found.loggable-exception.ts @@ -1,4 +1,4 @@ -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; import { BusinessError } from '@shared/common'; import { HttpStatus } from '@nestjs/common'; diff --git a/apps/server/src/modules/user-login-migration/loggable/school-migration-database-operation-failed.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/school-migration-database-operation-failed.loggable-exception.ts index de56cded65d..a9fad98d09e 100644 --- a/apps/server/src/modules/user-login-migration/loggable/school-migration-database-operation-failed.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/school-migration-database-operation-failed.loggable-exception.ts @@ -1,7 +1,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { LegacySchoolDo } from '@shared/domain/domainobject'; -import { ErrorUtils } from '@src/core/error/utils'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorUtils } from '@core/error/utils'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class SchoolMigrationDatabaseOperationFailedLoggableException extends InternalServerErrorException diff --git a/apps/server/src/modules/user-login-migration/loggable/school-number-mismatch.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/school-number-mismatch.loggable-exception.ts index 93bd64c2ecf..b221ddac014 100644 --- a/apps/server/src/modules/user-login-migration/loggable/school-number-mismatch.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/school-number-mismatch.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolNumberMismatchLoggableException extends BusinessError implements Loggable { constructor(private readonly sourceSchoolNumber: string, private readonly targetSchoolNumber: string) { diff --git a/apps/server/src/modules/user-login-migration/loggable/school-number-missing.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/school-number-missing.loggable-exception.ts index dfee216ada5..4876831c2a5 100644 --- a/apps/server/src/modules/user-login-migration/loggable/school-number-missing.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/school-number-missing.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class SchoolNumberMissingLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly schoolId: EntityId) { diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-already-closed.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-already-closed.loggable-exception.ts index ee41ece7e67..c0f8a7e5eac 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-already-closed.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-already-closed.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationAlreadyClosedLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly closedAt: Date, private readonly userLoginMigrationId?: EntityId) { diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-grace-period-expired-loggable.exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-grace-period-expired-loggable.exception.ts index b09e8745579..ba74bfd4728 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-grace-period-expired-loggable.exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-grace-period-expired-loggable.exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationGracePeriodExpiredLoggableException extends UnprocessableEntityException diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-admin.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-admin.loggable-exception.ts index 606d6fbba96..7217912dd3f 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-admin.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-admin.loggable-exception.ts @@ -1,5 +1,5 @@ import { UnprocessableEntityException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationInvalidAdminLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly userId: string) { diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-external-school-id.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-external-school-id.loggable-exception.ts index 2a0e7d38844..524e832975e 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-external-school-id.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-invalid-external-school-id.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationInvalidExternalSchoolIdLoggableException extends BusinessError implements Loggable { constructor(private readonly externalSchoolId: string) { diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-mandatory.loggable.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-mandatory.loggable.ts index 5a0053e286e..0ce0579269b 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-mandatory.loggable.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-mandatory.loggable.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationMandatoryLoggable implements Loggable { constructor( diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-multiple-email-users.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-multiple-email-users.loggable-exception.ts index fe48277e13f..cfe07fa115f 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-multiple-email-users.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-multiple-email-users.loggable-exception.ts @@ -1,5 +1,5 @@ import { UnprocessableEntityException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationMultipleEmailUsersLoggableException extends UnprocessableEntityException diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-not-found.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-not-found.loggable-exception.ts index f3bcbfe837b..f8403089226 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-not-found.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-not-found.loggable-exception.ts @@ -1,6 +1,6 @@ import { NotFoundException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationNotFoundLoggableException extends NotFoundException implements Loggable { constructor(private readonly schoolId: EntityId, private readonly userLoginMigrationId?: EntityId) { diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-school-already-migrated.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-school-already-migrated.loggable-exception.ts index 874ff87d8fd..d34cfd0e6be 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-school-already-migrated.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-school-already-migrated.loggable-exception.ts @@ -1,5 +1,5 @@ import { UnprocessableEntityException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationSchoolAlreadyMigratedLoggableException extends UnprocessableEntityException diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-start.loggable.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-start.loggable.ts index 58b6a435e00..0211b70006d 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-start.loggable.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-start.loggable.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationStartLoggable implements Loggable { constructor(private readonly userId: EntityId, private readonly userLoginMigrationId: EntityId | undefined) {} diff --git a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-user-already-migrated.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-user-already-migrated.loggable-exception.ts index a6e3310b7b8..0cbe5cd4441 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-login-migration-user-already-migrated.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-login-migration-user-already-migrated.loggable-exception.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; import { BusinessError } from '@shared/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserLoginMigrationUserAlreadyMigratedLoggableException extends BusinessError implements Loggable { constructor(private readonly externalUserId: string) { diff --git a/apps/server/src/modules/user-login-migration/loggable/user-migration-database-operation-failed.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-migration-database-operation-failed.loggable-exception.ts index 4fa07418eab..d9d96160f10 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-migration-database-operation-failed.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-migration-database-operation-failed.loggable-exception.ts @@ -1,7 +1,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorUtils } from '@src/core/error/utils'; -import { ErrorLogMessage, Loggable } from '@src/core/logger'; +import { ErrorUtils } from '@core/error/utils'; +import { ErrorLogMessage, Loggable } from '@core/logger'; export class UserMigrationDatabaseOperationFailedLoggableException extends InternalServerErrorException diff --git a/apps/server/src/modules/user-login-migration/loggable/user-migration-rollback-successful.loggable.ts b/apps/server/src/modules/user-login-migration/loggable/user-migration-rollback-successful.loggable.ts index 783aaec16b9..3049607f700 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-migration-rollback-successful.loggable.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-migration-rollback-successful.loggable.ts @@ -1,5 +1,5 @@ import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserMigrationRollbackSuccessfulLoggable implements Loggable { constructor( diff --git a/apps/server/src/modules/user-login-migration/loggable/user-not-migrated.loggable-exception.ts b/apps/server/src/modules/user-login-migration/loggable/user-not-migrated.loggable-exception.ts index 07f0dad6ae1..8903d743026 100644 --- a/apps/server/src/modules/user-login-migration/loggable/user-not-migrated.loggable-exception.ts +++ b/apps/server/src/modules/user-login-migration/loggable/user-not-migrated.loggable-exception.ts @@ -1,6 +1,6 @@ import { UnprocessableEntityException } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class UserNotMigratedLoggableException extends UnprocessableEntityException implements Loggable { constructor(private readonly userId?: EntityId) { diff --git a/apps/server/src/modules/user-login-migration/service/school-migration.service.spec.ts b/apps/server/src/modules/user-login-migration/service/school-migration.service.spec.ts index 12cb3178165..c35cec571c2 100644 --- a/apps/server/src/modules/user-login-migration/service/school-migration.service.spec.ts +++ b/apps/server/src/modules/user-login-migration/service/school-migration.service.spec.ts @@ -5,7 +5,7 @@ import { UserService } from '@modules/user'; import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, Page, UserDO, UserLoginMigrationDO } from '@shared/domain/domainobject'; import { UserLoginMigrationRepo } from '@shared/repo/userloginmigration/user-login-migration.repo'; -import { LegacyLogger, Logger } from '@src/core/logger'; +import { LegacyLogger, Logger } from '@core/logger'; import { legacySchoolDoFactory, userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/user-login-migration/service/school-migration.service.ts b/apps/server/src/modules/user-login-migration/service/school-migration.service.ts index a98ad8a2776..abcba3edd5a 100644 --- a/apps/server/src/modules/user-login-migration/service/school-migration.service.ts +++ b/apps/server/src/modules/user-login-migration/service/school-migration.service.ts @@ -3,7 +3,7 @@ import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { LegacySchoolDo, Page, UserDO, UserLoginMigrationDO } from '@shared/domain/domainobject'; import { UserLoginMigrationRepo } from '@shared/repo'; -import { LegacyLogger, Logger } from '@src/core/logger'; +import { LegacyLogger, Logger } from '@core/logger'; import { performance } from 'perf_hooks'; import { SchoolMigrationDatabaseOperationFailedLoggableException, diff --git a/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.spec.ts b/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.spec.ts index 37c4e2147be..3cb12e64bdc 100644 --- a/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.spec.ts +++ b/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.spec.ts @@ -1,11 +1,11 @@ +import { Logger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { Account, AccountService } from '@modules/account'; +import { accountDoFactory } from '@modules/account/testing'; import { UserService } from '@modules/user'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO } from '@shared/domain/domainobject'; -import { Logger } from '@src/core/logger'; -import { accountDoFactory } from '@src/modules/account/testing'; import { userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { diff --git a/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.ts b/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.ts index 26abcd8aa41..0e132d2c529 100644 --- a/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.ts +++ b/apps/server/src/modules/user-login-migration/service/user-login-migration-rollback.service.ts @@ -3,7 +3,7 @@ import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { UserDO, UserLoginMigrationDO } from '@shared/domain/domainobject'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { UserLoginMigrationNotFoundLoggableException, UserMigrationRollbackSuccessfulLoggable, diff --git a/apps/server/src/modules/user-login-migration/service/user-migration.service.spec.ts b/apps/server/src/modules/user-login-migration/service/user-migration.service.spec.ts index 22b634ca537..e6fc3418f3a 100644 --- a/apps/server/src/modules/user-login-migration/service/user-migration.service.spec.ts +++ b/apps/server/src/modules/user-login-migration/service/user-migration.service.spec.ts @@ -4,7 +4,7 @@ import { Account, AccountService } from '@modules/account'; import { UserService } from '@modules/user'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO, UserLoginMigrationDO } from '@shared/domain/domainobject'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { roleFactory } from '@testing/factory/role.factory'; import { userDoFactory } from '@testing/factory/user.do.factory'; diff --git a/apps/server/src/modules/user-login-migration/service/user-migration.service.ts b/apps/server/src/modules/user-login-migration/service/user-migration.service.ts index e69c9aab424..862dd3d9f64 100644 --- a/apps/server/src/modules/user-login-migration/service/user-migration.service.ts +++ b/apps/server/src/modules/user-login-migration/service/user-migration.service.ts @@ -3,7 +3,7 @@ import { UserService } from '@modules/user'; import { Injectable } from '@nestjs/common'; import { UserDO } from '@shared/domain/domainobject/user.do'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { UserLoginMigrationDO } from '@shared/domain/domainobject'; import { UserMigrationDatabaseOperationFailedLoggableException, diff --git a/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.spec.ts b/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.spec.ts index 7bbe853c7d5..bfb4c1495bc 100644 --- a/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.spec.ts +++ b/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.spec.ts @@ -5,7 +5,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { UserLoginMigrationDO } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.ts b/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.ts index 0af6b1de250..b39a2889fa8 100644 --- a/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.ts +++ b/apps/server/src/modules/user-login-migration/uc/restart-user-login-migration.uc.ts @@ -3,7 +3,7 @@ import { Injectable } from '@nestjs/common/decorators/core/injectable.decorator' import { UserLoginMigrationDO } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { UserLoginMigrationNotFoundLoggableException, UserLoginMigrationStartLoggable } from '../loggable'; import { SchoolMigrationService, UserLoginMigrationService } from '../service'; diff --git a/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.spec.ts b/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.spec.ts index f6fea7739ca..a50b88c415a 100644 --- a/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.spec.ts +++ b/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.spec.ts @@ -6,7 +6,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, UserLoginMigrationDO } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { legacySchoolDoFactory, userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.ts b/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.ts index 3ffd0785fa6..b32a842c070 100644 --- a/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.ts +++ b/apps/server/src/modules/user-login-migration/uc/start-user-login-migration.uc.ts @@ -5,7 +5,7 @@ import { LegacySchoolDo, UserLoginMigrationDO } from '@shared/domain/domainobjec import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { SchoolNumberMissingLoggableException, UserLoginMigrationAlreadyClosedLoggableException, diff --git a/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.spec.ts b/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.spec.ts index 3d7dbcf583c..47840f7858b 100644 --- a/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.spec.ts +++ b/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.spec.ts @@ -7,7 +7,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { LegacySchoolDo, UserLoginMigrationDO } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { legacySchoolDoFactory, userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { userFactory } from '@testing/factory/user.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.ts b/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.ts index 255dd824b3f..4637ba39a3e 100644 --- a/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.ts +++ b/apps/server/src/modules/user-login-migration/uc/toggle-user-login-migration.uc.ts @@ -5,7 +5,7 @@ import { LegacySchoolDo, UserLoginMigrationDO } from '@shared/domain/domainobjec import { User } from '@shared/domain/entity'; import { Permission } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { UserLoginMigrationMandatoryLoggable, UserLoginMigrationNotFoundLoggableException } from '../loggable'; import { UserLoginMigrationService } from '../service'; diff --git a/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.spec.ts b/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.spec.ts index 178c25d2460..57d71b15426 100644 --- a/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.spec.ts +++ b/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.spec.ts @@ -14,7 +14,7 @@ import { LegacySchoolDo, Page, RoleReference, UserDO, UserLoginMigrationDO } fro import { User } from '@shared/domain/entity'; import { Permission, RoleName } from '@shared/domain/interface'; import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { legacySchoolDoFactory, userLoginMigrationDOFactory } from '@testing/factory/domainobject'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { systemEntityFactory } from '@testing/factory/systemEntityFactory'; diff --git a/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.ts b/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.ts index 2930d5c4f31..a0315f9ca48 100644 --- a/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.ts +++ b/apps/server/src/modules/user-login-migration/uc/user-login-migration.uc.ts @@ -10,7 +10,7 @@ import { LegacySchoolDo, Page, RoleReference, UserDO, UserLoginMigrationDO } fro import { User } from '@shared/domain/entity'; import { Permission, RoleName } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { ExternalSchoolNumberMissingLoggableException, InvalidUserLoginMigrationLoggableException, diff --git a/apps/server/src/modules/user-login-migration/user-login-migration-api.module.ts b/apps/server/src/modules/user-login-migration/user-login-migration-api.module.ts index af4e7ec5d90..3946436de64 100644 --- a/apps/server/src/modules/user-login-migration/user-login-migration-api.module.ts +++ b/apps/server/src/modules/user-login-migration/user-login-migration-api.module.ts @@ -6,7 +6,7 @@ import { ProvisioningModule } from '@modules/provisioning'; import { UserModule } from '@modules/user'; import { ImportUserModule } from '@modules/user-import'; import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { UserLoginMigrationRollbackController } from './controller/user-login-migration-rollback.controller'; import { UserLoginMigrationController } from './controller/user-login-migration.controller'; import { diff --git a/apps/server/src/modules/user-login-migration/user-login-migration.module.ts b/apps/server/src/modules/user-login-migration/user-login-migration.module.ts index ec3b9ca768e..7001a6313c9 100644 --- a/apps/server/src/modules/user-login-migration/user-login-migration.module.ts +++ b/apps/server/src/modules/user-login-migration/user-login-migration.module.ts @@ -4,7 +4,7 @@ import { SystemModule } from '@modules/system'; import { UserModule } from '@modules/user'; import { Module } from '@nestjs/common'; import { UserLoginMigrationRepo } from '@shared/repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { MigrationCheckService, SchoolMigrationService, diff --git a/apps/server/src/modules/user/controller/api-test/admin-api-user.api.spec.ts b/apps/server/src/modules/user/controller/api-test/admin-api-user.api.spec.ts index 20df74ddfa7..a8d4524af5d 100644 --- a/apps/server/src/modules/user/controller/api-test/admin-api-user.api.spec.ts +++ b/apps/server/src/modules/user/controller/api-test/admin-api-user.api.spec.ts @@ -1,10 +1,10 @@ import { EntityManager } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { AdminApiServerTestModule } from '@modules/server/admin-api.server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { User } from '@shared/domain/entity'; import { RoleName } from '@shared/domain/interface'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { AdminApiServerTestModule } from '@src/modules/server/admin-api.server.app.module'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { TestApiClient } from '@testing/test-api-client'; import { nanoid } from 'nanoid'; diff --git a/apps/server/src/modules/user/legacy/controller/api-test/admin-api-students.api.spec.ts b/apps/server/src/modules/user/legacy/controller/api-test/admin-api-students.api.spec.ts index 1e92f7ab20d..794e26d3abc 100644 --- a/apps/server/src/modules/user/legacy/controller/api-test/admin-api-students.api.spec.ts +++ b/apps/server/src/modules/user/legacy/controller/api-test/admin-api-students.api.spec.ts @@ -1,10 +1,10 @@ import { EntityManager } from '@mikro-orm/mongodb'; +import { accountFactory } from '@modules/account/testing'; +import { ServerTestModule } from '@modules/server/server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { User } from '@shared/domain/entity'; import { RoleName } from '@shared/domain/interface'; -import { accountFactory } from '@src/modules/account/testing'; -import { ServerTestModule } from '@src/modules/server/server.app.module'; import { roleFactory } from '@testing/factory/role.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { schoolYearFactory } from '@testing/factory/schoolyear.factory'; diff --git a/apps/server/src/modules/user/legacy/controller/api-test/admin-api-teachers.api.spec.ts b/apps/server/src/modules/user/legacy/controller/api-test/admin-api-teachers.api.spec.ts index a684920c129..66bfdfaff1e 100644 --- a/apps/server/src/modules/user/legacy/controller/api-test/admin-api-teachers.api.spec.ts +++ b/apps/server/src/modules/user/legacy/controller/api-test/admin-api-teachers.api.spec.ts @@ -1,10 +1,10 @@ import { EntityManager } from '@mikro-orm/core'; +import { accountFactory } from '@modules/account/testing'; +import { ServerTestModule } from '@modules/server/server.app.module'; import { INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { User } from '@shared/domain/entity'; import { RoleName } from '@shared/domain/interface'; -import { accountFactory } from '@src/modules/account/testing'; -import { ServerTestModule } from '@src/modules/server/server.app.module'; import { roleFactory } from '@testing/factory/role.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { schoolYearFactory } from '@testing/factory/schoolyear.factory'; diff --git a/apps/server/src/modules/user/legacy/repo/users-admin.repo.spec.ts b/apps/server/src/modules/user/legacy/repo/users-admin.repo.spec.ts index 55e9f6915b3..0b68ceae5ea 100644 --- a/apps/server/src/modules/user/legacy/repo/users-admin.repo.spec.ts +++ b/apps/server/src/modules/user/legacy/repo/users-admin.repo.spec.ts @@ -1,11 +1,11 @@ import { MongoMemoryDatabaseModule } from '@infra/database'; import { EntityManager } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; import { Test, TestingModule } from '@nestjs/testing'; import { Role, SchoolEntity, SchoolYearEntity, User } from '@shared/domain/entity'; import { Permission, RoleName } from '@shared/domain/interface'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; import { roleFactory } from '@testing/factory/role.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { schoolYearFactory } from '@testing/factory/schoolyear.factory'; diff --git a/apps/server/src/modules/user/legacy/service/users-admin.service.ts b/apps/server/src/modules/user/legacy/service/users-admin.service.ts index ca8eecc1989..43b188d59f0 100644 --- a/apps/server/src/modules/user/legacy/service/users-admin.service.ts +++ b/apps/server/src/modules/user/legacy/service/users-admin.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { EntityId } from '@shared/domain/types'; -import { Logger } from '@src/core/logger'; +import { Logger } from '@core/logger'; import { User } from '@shared/domain/entity'; import { EntityNotFoundError } from '@shared/common'; import { UsersAdminRepo } from '../repo'; diff --git a/apps/server/src/modules/user/legacy/users-admin.module.ts b/apps/server/src/modules/user/legacy/users-admin.module.ts index 0513e7af57a..040105c63ad 100644 --- a/apps/server/src/modules/user/legacy/users-admin.module.ts +++ b/apps/server/src/modules/user/legacy/users-admin.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { UserRepo } from '@shared/repo'; import { UsersAdminService } from './service'; import { UsersAdminRepo } from './repo'; diff --git a/apps/server/src/modules/user/loggable/addSecondarySchoolToUserError.loggable.ts b/apps/server/src/modules/user/loggable/addSecondarySchoolToUserError.loggable.ts index 4aea809d269..1aeba62422a 100644 --- a/apps/server/src/modules/user/loggable/addSecondarySchoolToUserError.loggable.ts +++ b/apps/server/src/modules/user/loggable/addSecondarySchoolToUserError.loggable.ts @@ -2,7 +2,7 @@ import { InternalServerErrorException } from '@nestjs/common'; import { ErrorLogMessage, ValidationErrorLogMessage } from '@shared/common'; import { Loggable } from '@shared/common/loggable'; import { RoleReference } from '@shared/domain/domainobject'; -import { LogMessage } from '@src/core/logger'; +import { LogMessage } from '@core/logger'; export class AddSecondarySchoolToUsersRoleErrorLoggableException extends InternalServerErrorException diff --git a/apps/server/src/modules/user/service/user.service.spec.ts b/apps/server/src/modules/user/service/user.service.spec.ts index aa58e05903f..beaa824f4c7 100644 --- a/apps/server/src/modules/user/service/user.service.spec.ts +++ b/apps/server/src/modules/user/service/user.service.spec.ts @@ -1,3 +1,4 @@ +import { Logger } from '@core/logger'; import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { CalendarService } from '@infra/calendar'; import { EntityManager, MikroORM } from '@mikro-orm/core'; @@ -13,6 +14,7 @@ import { import { deletionRequestFactory } from '@modules/deletion/domain/testing'; import { RegistrationPinService } from '@modules/registration-pin'; import { RoleDto, RoleService } from '@modules/role'; +import { schoolFactory } from '@modules/school/testing'; import { NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { EventBus } from '@nestjs/cqrs'; @@ -24,8 +26,6 @@ import { IFindOptions, LanguageType, Permission, RoleName, SortOrder } from '@sh import { EntityId } from '@shared/domain/types'; import { UserRepo } from '@shared/repo'; import { UserDORepo } from '@shared/repo/user/user-do.repo'; -import { Logger } from '@src/core/logger'; -import { schoolFactory } from '@src/modules/school/testing'; import { roleFactory } from '@testing/factory/role.factory'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { userFactory } from '@testing/factory/user.factory'; diff --git a/apps/server/src/modules/user/service/user.service.ts b/apps/server/src/modules/user/service/user.service.ts index 920ec2d37da..55fa6b95bf4 100644 --- a/apps/server/src/modules/user/service/user.service.ts +++ b/apps/server/src/modules/user/service/user.service.ts @@ -1,3 +1,5 @@ +import { Logger } from '@core/logger'; +import { CalendarService } from '@infra/calendar'; import { MikroORM, UseRequestContext } from '@mikro-orm/core'; import { DataDeletedEvent, @@ -23,15 +25,13 @@ import { Page, RoleReference, UserDO } from '@shared/domain/domainobject'; import { User } from '@shared/domain/entity'; import { IFindOptions, LanguageType, RoleName } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { UserDORepo } from '@shared/repo/user/user-do.repo'; import { UserRepo } from '@shared/repo'; -import { Logger } from '@src/core/logger'; -import { CalendarService } from '@src/infra/calendar'; +import { UserDORepo } from '@shared/repo/user/user-do.repo'; import { UserConfig } from '../interfaces'; +import { AddSecondarySchoolToUsersRoleErrorLoggableException } from '../loggable/addSecondarySchoolToUserError.loggable'; import { UserMapper } from '../mapper/user.mapper'; import { UserDto } from '../uc/dto/user.dto'; import { UserDiscoverableQuery, UserQuery } from './user-query.type'; -import { AddSecondarySchoolToUsersRoleErrorLoggableException } from '../loggable/addSecondarySchoolToUserError.loggable'; @Injectable() @EventsHandler(UserDeletedEvent) diff --git a/apps/server/src/modules/user/uc/admin-api-user.uc.spec.ts b/apps/server/src/modules/user/uc/admin-api-user.uc.spec.ts index 930769eeabe..c7bf8c3b613 100644 --- a/apps/server/src/modules/user/uc/admin-api-user.uc.spec.ts +++ b/apps/server/src/modules/user/uc/admin-api-user.uc.spec.ts @@ -1,9 +1,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { AccountService } from '@modules/account'; +import { accountDoFactory } from '@modules/account/testing'; +import { RoleService } from '@modules/role'; import { Test, TestingModule } from '@nestjs/testing'; import { RoleName } from '@shared/domain/interface'; -import { accountDoFactory } from '@src/modules/account/testing'; -import { RoleService } from '@src/modules/role'; import { roleFactory } from '@testing/factory/role.factory'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { setupEntities } from '@testing/setup-entities'; diff --git a/apps/server/src/modules/user/uc/admin-api-user.uc.ts b/apps/server/src/modules/user/uc/admin-api-user.uc.ts index 35968c8825f..8156c5ba390 100644 --- a/apps/server/src/modules/user/uc/admin-api-user.uc.ts +++ b/apps/server/src/modules/user/uc/admin-api-user.uc.ts @@ -1,9 +1,9 @@ +import { AccountSave, AccountService } from '@modules/account'; +import { RoleService } from '@modules/role'; import { Injectable } from '@nestjs/common'; import { RoleReference } from '@shared/domain/domainobject'; import { RoleName } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { AccountService, AccountSave } from '@modules/account'; -import { RoleService } from '@src/modules/role'; import { nanoid } from 'nanoid'; import { UserService } from '../service'; diff --git a/apps/server/src/modules/user/user.config.ts b/apps/server/src/modules/user/user.config.ts index de79cde0e18..b8cf4ca1d15 100644 --- a/apps/server/src/modules/user/user.config.ts +++ b/apps/server/src/modules/user/user.config.ts @@ -1,5 +1,5 @@ import { RoleConfig } from '@modules/role'; -import { LoggerConfig } from '@src/core/logger'; +import { LoggerConfig } from '@core/logger'; import { CalendarConfig } from '@infra/calendar'; import { AccountConfig } from '@modules/account'; import { RegistrationPinConfig } from '@modules/registration-pin'; diff --git a/apps/server/src/modules/user/user.module.ts b/apps/server/src/modules/user/user.module.ts index 10f0d678834..93c456173dc 100644 --- a/apps/server/src/modules/user/user.module.ts +++ b/apps/server/src/modules/user/user.module.ts @@ -5,7 +5,7 @@ import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; import { UserRepo } from '@shared/repo'; import { UserDORepo } from '@shared/repo/user/user-do.repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { UserService } from './service'; @Module({ diff --git a/apps/server/src/modules/video-conference/bbb/bbb.service.spec.ts b/apps/server/src/modules/video-conference/bbb/bbb.service.spec.ts index 13073e45310..552e7b6c559 100644 --- a/apps/server/src/modules/video-conference/bbb/bbb.service.spec.ts +++ b/apps/server/src/modules/video-conference/bbb/bbb.service.spec.ts @@ -3,7 +3,7 @@ import { HttpService } from '@nestjs/axios'; import { InternalServerErrorException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Test, TestingModule } from '@nestjs/testing'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { axiosResponseFactory } from '@testing/factory/axios-response.factory'; import { AxiosResponse } from 'axios'; import crypto, { Hash } from 'crypto'; diff --git a/apps/server/src/modules/video-conference/bbb/bbb.service.ts b/apps/server/src/modules/video-conference/bbb/bbb.service.ts index 86e2f972ef3..5b3ace2f625 100644 --- a/apps/server/src/modules/video-conference/bbb/bbb.service.ts +++ b/apps/server/src/modules/video-conference/bbb/bbb.service.ts @@ -1,7 +1,7 @@ import { HttpService } from '@nestjs/axios'; import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { ErrorUtils } from '@src/core/error/utils'; +import { ErrorUtils } from '@core/error/utils'; import { AxiosResponse } from 'axios'; import crypto from 'crypto'; import { firstValueFrom, Observable } from 'rxjs'; diff --git a/apps/server/src/modules/video-conference/controller/api-test/video-conference-course.api.spec.ts b/apps/server/src/modules/video-conference/controller/api-test/video-conference-course.api.spec.ts index e3d619c969d..8d638f19dae 100644 --- a/apps/server/src/modules/video-conference/controller/api-test/video-conference-course.api.spec.ts +++ b/apps/server/src/modules/video-conference/controller/api-test/video-conference-course.api.spec.ts @@ -1,12 +1,12 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Course, Role, SchoolEntity, TargetModels, User, VideoConference } from '@shared/domain/entity'; import { Permission, RoleName, VideoConferenceScope } from '@shared/domain/interface'; import { SchoolFeature } from '@shared/domain/types'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { courseFactory } from '@testing/factory/course.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/video-conference/controller/api-test/video-conference-room.api.spec.ts b/apps/server/src/modules/video-conference/controller/api-test/video-conference-room.api.spec.ts index 1af5337bdd7..147de4fde7e 100644 --- a/apps/server/src/modules/video-conference/controller/api-test/video-conference-room.api.spec.ts +++ b/apps/server/src/modules/video-conference/controller/api-test/video-conference-room.api.spec.ts @@ -1,14 +1,14 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; +import { roomEntityFactory } from '@modules/room/testing'; import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Role, SchoolEntity, TargetModels, User, VideoConference } from '@shared/domain/entity'; import { Permission, RoleName, VideoConferenceScope } from '@shared/domain/interface'; import { SchoolFeature } from '@shared/domain/types'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; -import { roomEntityFactory } from '@src/modules/room/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/video-conference/controller/api-test/video-conference-video-conference-element.api.spec.ts b/apps/server/src/modules/video-conference/controller/api-test/video-conference-video-conference-element.api.spec.ts index 40e245733c8..d9fe39eac89 100644 --- a/apps/server/src/modules/video-conference/controller/api-test/video-conference-video-conference-element.api.spec.ts +++ b/apps/server/src/modules/video-conference/controller/api-test/video-conference-video-conference-element.api.spec.ts @@ -1,21 +1,21 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; +import { accountFactory } from '@modules/account/testing'; +import { BoardExternalReferenceType } from '@modules/board'; +import { + cardEntityFactory, + columnBoardEntityFactory, + columnEntityFactory, + videoConferenceElementEntityFactory, +} from '@modules/board/testing'; +import { roomMembershipEntityFactory } from '@modules/room-membership/testing'; +import { roomEntityFactory } from '@modules/room/testing'; import { ServerTestModule } from '@modules/server'; import { HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { Role, TargetModels, User, VideoConference } from '@shared/domain/entity'; import { Permission, RoleName, VideoConferenceScope } from '@shared/domain/interface'; import { SchoolFeature } from '@shared/domain/types'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; -import { accountFactory } from '@src/modules/account/testing'; -import { BoardExternalReferenceType } from '@src/modules/board'; -import { - cardEntityFactory, - columnBoardEntityFactory, - columnEntityFactory, - videoConferenceElementEntityFactory, -} from '@src/modules/board/testing'; -import { roomMembershipEntityFactory } from '@src/modules/room-membership/testing'; -import { roomEntityFactory } from '@src/modules/room/testing'; import { cleanupCollections } from '@testing/cleanup-collections'; import { groupEntityFactory } from '@testing/factory/group-entity.factory'; import { roleFactory } from '@testing/factory/role.factory'; diff --git a/apps/server/src/modules/video-conference/error/invalid-origin-for-logout-url.loggable-exception.ts b/apps/server/src/modules/video-conference/error/invalid-origin-for-logout-url.loggable-exception.ts index 435944f101d..045d39705ea 100644 --- a/apps/server/src/modules/video-conference/error/invalid-origin-for-logout-url.loggable-exception.ts +++ b/apps/server/src/modules/video-conference/error/invalid-origin-for-logout-url.loggable-exception.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; +import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@core/logger'; export class InvalidOriginForLogoutUrlLoggableException extends BadRequestException implements Loggable { constructor(private readonly logoutUrl: string, private readonly origin: string | undefined) { 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 dc8616e77e1..6f5b199a433 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 @@ -2,8 +2,16 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { CalendarEventDto, CalendarService } from '@infra/calendar'; import { ObjectId } from '@mikro-orm/mongodb'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; +import { BoardNodeAuthorizable, BoardNodeAuthorizableService, BoardNodeService, BoardRoles } from '@modules/board'; +import { VideoConferenceElement } from '@modules/board/domain'; +import { columnBoardFactory, videoConferenceElementFactory } from '@modules/board/testing'; +import { GroupTypes } from '@modules/group'; import { CourseService } from '@modules/learnroom/service'; import { LegacySchoolService } from '@modules/legacy-school'; +import { RoomService } from '@modules/room'; +import { RoomMembershipService } from '@modules/room-membership'; +import { roomMembershipFactory } from '@modules/room-membership/testing'; +import { roomFactory } from '@modules/room/testing'; import { UserService } from '@modules/user'; import { BadRequestException, ForbiddenException } from '@nestjs/common'; import { NotFoundException } from '@nestjs/common/exceptions/not-found.exception'; @@ -14,14 +22,6 @@ import { Course, TeamUserEntity } from '@shared/domain/entity'; import { Permission, RoleName, VideoConferenceScope } from '@shared/domain/interface'; import { EntityId, SchoolFeature } from '@shared/domain/types'; import { TeamsRepo, VideoConferenceRepo } from '@shared/repo'; -import { BoardNodeAuthorizable, BoardNodeAuthorizableService, BoardNodeService, BoardRoles } from '@src/modules/board'; -import { VideoConferenceElement } from '@src/modules/board/domain'; -import { columnBoardFactory, videoConferenceElementFactory } from '@src/modules/board/testing'; -import { GroupTypes } from '@src/modules/group'; -import { RoomService } from '@src/modules/room'; -import { RoomMembershipService } from '@src/modules/room-membership'; -import { roomMembershipFactory } from '@src/modules/room-membership/testing'; -import { roomFactory } from '@src/modules/room/testing'; import { courseFactory } from '@testing/factory/course.factory'; import { groupFactory } from '@testing/factory/domainobject'; import { roleFactory } from '@testing/factory/role.factory'; 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 68dd4f1a6f8..82d141dca95 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 @@ -1,7 +1,11 @@ import { CalendarEventDto, CalendarService } from '@infra/calendar'; import { AuthorizationContextBuilder, AuthorizationService } from '@modules/authorization'; +import { BoardNodeAuthorizableService, BoardNodeService, BoardRoles } from '@modules/board'; +import { VideoConferenceElement } from '@modules/board/domain'; import { CourseService } from '@modules/learnroom'; import { LegacySchoolService } from '@modules/legacy-school'; +import { Room, RoomService } from '@modules/room'; +import { RoomMembershipService } from '@modules/room-membership'; import { UserService } from '@modules/user'; import { BadRequestException, ForbiddenException, Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; @@ -10,10 +14,6 @@ import { Course, TeamEntity, TeamUserEntity, User } from '@shared/domain/entity' import { Permission, RoleName, VideoConferenceScope } from '@shared/domain/interface'; import { EntityId, SchoolFeature } from '@shared/domain/types'; import { TeamsRepo, VideoConferenceRepo } from '@shared/repo'; -import { BoardNodeAuthorizableService, BoardNodeService, BoardRoles } from '@src/modules/board'; -import { VideoConferenceElement } from '@src/modules/board/domain'; -import { Room, RoomService } from '@src/modules/room'; -import { RoomMembershipService } from '@src/modules/room-membership'; import { BBBRole } from '../bbb'; import { ErrorStatus } from '../error'; import { VideoConferenceOptions } from '../interface'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-create.uc.spec.ts b/apps/server/src/modules/video-conference/uc/video-conference-create.uc.spec.ts index 9b994e48323..e7ebfe0c291 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-create.uc.spec.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-create.uc.spec.ts @@ -1,12 +1,12 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO } from '@shared/domain/domainobject'; import {} from '@shared/domain/entity'; import { VideoConferenceScope } from '@shared/domain/interface'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { BBBCreateResponse, BBBMeetingInfoResponse, BBBResponse, BBBRole, BBBStatus } from '../bbb'; import { ErrorStatus } from '../error/error-status.enum'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-create.uc.ts b/apps/server/src/modules/video-conference/uc/video-conference-create.uc.ts index 01d2d1be91c..a8872b7a2bf 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-create.uc.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-create.uc.ts @@ -1,9 +1,9 @@ +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ForbiddenException, Injectable } from '@nestjs/common'; import { UserDO } from '@shared/domain/domainobject'; import { VideoConferenceScope } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { BBBBaseMeetingConfig, BBBCreateConfigBuilder, diff --git a/apps/server/src/modules/video-conference/uc/video-conference-end.uc.spec.ts b/apps/server/src/modules/video-conference/uc/video-conference-end.uc.spec.ts index bd3bfb94502..351a9d553ab 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-end.uc.spec.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-end.uc.spec.ts @@ -1,12 +1,12 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO } from '@shared/domain/domainobject'; import {} from '@shared/domain/entity'; import { VideoConferenceScope } from '@shared/domain/interface'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { BBBBaseResponse, BBBResponse, BBBRole, BBBStatus } from '../bbb'; import { ErrorStatus } from '../error/error-status.enum'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-end.uc.ts b/apps/server/src/modules/video-conference/uc/video-conference-end.uc.ts index 3d2bae8aef9..18422c4312f 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-end.uc.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-end.uc.ts @@ -1,10 +1,10 @@ +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ErrorStatus } from '@modules/video-conference/error/error-status.enum'; import { ForbiddenException, Injectable } from '@nestjs/common'; import { UserDO } from '@shared/domain/domainobject'; import { VideoConferenceScope } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { BBBBaseMeetingConfig, BBBBaseResponse, BBBResponse, BBBRole, BBBService } from '../bbb'; import { PermissionMapping } from '../mapper/video-conference.mapper'; import { VideoConferenceService } from '../service'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-info.uc.spec.ts b/apps/server/src/modules/video-conference/uc/video-conference-info.uc.spec.ts index 4b7cda8e65b..21fef26c1da 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-info.uc.spec.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-info.uc.spec.ts @@ -1,12 +1,12 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO, VideoConferenceDO } from '@shared/domain/domainobject'; import {} from '@shared/domain/entity'; import { Permission, VideoConferenceScope } from '@shared/domain/interface'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { videoConferenceDOFactory } from '@testing/factory/video-conference.do.factory'; import { BBBMeetingInfoResponse, BBBResponse, BBBRole, BBBStatus } from '../bbb'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-info.uc.ts b/apps/server/src/modules/video-conference/uc/video-conference-info.uc.ts index 78c0c006352..4950e8852f7 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-info.uc.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-info.uc.ts @@ -1,10 +1,10 @@ +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ErrorStatus } from '@modules/video-conference/error/error-status.enum'; import { ForbiddenException, Injectable } from '@nestjs/common'; import { UserDO, VideoConferenceDO, VideoConferenceOptionsDO } from '@shared/domain/domainobject'; import { VideoConferenceScope } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { BBBBaseMeetingConfig, BBBMeetingInfoResponse, BBBResponse, BBBRole, BBBService } from '../bbb'; import { defaultVideoConferenceOptions, VideoConferenceOptions } from '../interface'; import { PermissionMapping } from '../mapper/video-conference.mapper'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-join.uc.spec.ts b/apps/server/src/modules/video-conference/uc/video-conference-join.uc.spec.ts index e1dc437a9c3..619fcb90d65 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-join.uc.spec.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-join.uc.spec.ts @@ -1,12 +1,12 @@ import { DeepMocked, createMock } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ForbiddenException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { UserDO, VideoConferenceDO } from '@shared/domain/domainobject'; import {} from '@shared/domain/entity'; import { Permission, VideoConferenceScope } from '@shared/domain/interface'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { userDoFactory } from '@testing/factory/user.do.factory'; import { videoConferenceDOFactory } from '@testing/factory/video-conference.do.factory'; import { BBBJoinConfig, BBBJoinResponse, BBBResponse, BBBRole } from '../bbb'; diff --git a/apps/server/src/modules/video-conference/uc/video-conference-join.uc.ts b/apps/server/src/modules/video-conference/uc/video-conference-join.uc.ts index b80de315dd4..b92962005c3 100644 --- a/apps/server/src/modules/video-conference/uc/video-conference-join.uc.ts +++ b/apps/server/src/modules/video-conference/uc/video-conference-join.uc.ts @@ -1,10 +1,10 @@ +import { BoardContextApiHelperService } from '@modules/board-context'; import { UserService } from '@modules/user'; import { ErrorStatus } from '@modules/video-conference/error/error-status.enum'; import { ForbiddenException, Injectable } from '@nestjs/common'; import { UserDO, VideoConferenceDO } from '@shared/domain/domainobject'; import { VideoConferenceScope } from '@shared/domain/interface'; import { EntityId } from '@shared/domain/types'; -import { BoardContextApiHelperService } from '@src/modules/board-context'; import { BBBJoinConfigBuilder, BBBRole, BBBService } from '../bbb'; import { PermissionMapping } from '../mapper/video-conference.mapper'; import { VideoConferenceService } from '../service'; 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 f2c71237320..fb2c2e721f2 100644 --- a/apps/server/src/modules/video-conference/video-conference.module.ts +++ b/apps/server/src/modules/video-conference/video-conference.module.ts @@ -7,7 +7,7 @@ import { HttpModule } from '@nestjs/axios'; import { Module } from '@nestjs/common'; import { TeamsRepo } from '@shared/repo'; import { VideoConferenceRepo } from '@shared/repo/videoconference/video-conference.repo'; -import { LoggerModule } from '@src/core/logger'; +import { LoggerModule } from '@core/logger'; import { BoardModule } from '../board'; import { LearnroomModule } from '../learnroom'; import { BBBService } from './bbb'; diff --git a/apps/server/src/shared/common/error/business.error.ts b/apps/server/src/shared/common/error/business.error.ts index cb90422071c..859b45123a5 100644 --- a/apps/server/src/shared/common/error/business.error.ts +++ b/apps/server/src/shared/common/error/business.error.ts @@ -1,7 +1,7 @@ import { HttpException, HttpStatus } from '@nestjs/common'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; -import { ErrorResponse } from '@src/core/error/dto/error.response'; -import { ErrorType } from '@src/core/error/interface'; +import { ErrorResponse } from '@core/error/dto/error.response'; +import { ErrorType } from '@core/error/interface'; /** * Abstract base class for business errors, errors that are handled diff --git a/apps/server/src/shared/common/interceptor/duration-logging.interceptor.spec.ts b/apps/server/src/shared/common/interceptor/duration-logging.interceptor.spec.ts index 3c19d4f6763..214e105f7fe 100644 --- a/apps/server/src/shared/common/interceptor/duration-logging.interceptor.spec.ts +++ b/apps/server/src/shared/common/interceptor/duration-logging.interceptor.spec.ts @@ -2,7 +2,7 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { Controller, Get, HttpStatus, INestApplication } from '@nestjs/common'; import { APP_INTERCEPTOR } from '@nestjs/core'; import { Test } from '@nestjs/testing'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { TestApiClient } from '@testing/test-api-client'; import { DurationLoggingInterceptor } from './duration-logging.interceptor'; diff --git a/apps/server/src/shared/common/interceptor/duration-logging.interceptor.ts b/apps/server/src/shared/common/interceptor/duration-logging.interceptor.ts index 70ab32f995e..b12d95cdcb4 100644 --- a/apps/server/src/shared/common/interceptor/duration-logging.interceptor.ts +++ b/apps/server/src/shared/common/interceptor/duration-logging.interceptor.ts @@ -1,5 +1,5 @@ import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { Observable } from 'rxjs'; import { tap } from 'rxjs/operators'; diff --git a/apps/server/src/shared/common/interceptor/request-logging.interceptor.ts b/apps/server/src/shared/common/interceptor/request-logging.interceptor.ts index b1fab899762..39aab2d97e6 100644 --- a/apps/server/src/shared/common/interceptor/request-logging.interceptor.ts +++ b/apps/server/src/shared/common/interceptor/request-logging.interceptor.ts @@ -1,6 +1,6 @@ import { ICurrentUser } from '@infra/auth-guard'; import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; -import { LegacyLogger, RequestLoggingBody } from '@src/core/logger'; +import { LegacyLogger, RequestLoggingBody } from '@core/logger'; import { Request } from 'express'; import { Observable, throwError } from 'rxjs'; import { catchError, tap } from 'rxjs/operators'; diff --git a/apps/server/src/shared/common/loggable-exception/feature-disabled.loggable-exception.ts b/apps/server/src/shared/common/loggable-exception/feature-disabled.loggable-exception.ts index d841c254f72..c7ad88f0823 100644 --- a/apps/server/src/shared/common/loggable-exception/feature-disabled.loggable-exception.ts +++ b/apps/server/src/shared/common/loggable-exception/feature-disabled.loggable-exception.ts @@ -1,6 +1,6 @@ import { ForbiddenException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class FeatureDisabledLoggableException extends ForbiddenException implements Loggable { constructor(private readonly featureName: string) { diff --git a/apps/server/src/shared/common/loggable-exception/not-found.loggable-exception.ts b/apps/server/src/shared/common/loggable-exception/not-found.loggable-exception.ts index 55eff273c40..31886fbad88 100644 --- a/apps/server/src/shared/common/loggable-exception/not-found.loggable-exception.ts +++ b/apps/server/src/shared/common/loggable-exception/not-found.loggable-exception.ts @@ -1,6 +1,6 @@ import { NotFoundException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class NotFoundLoggableException extends NotFoundException implements Loggable { constructor(private readonly resourceName: string, private readonly identifiers: Record) { diff --git a/apps/server/src/shared/common/loggable-exception/reference-not-populated.loggable-exception.ts b/apps/server/src/shared/common/loggable-exception/reference-not-populated.loggable-exception.ts index 19487916506..31d213d9082 100644 --- a/apps/server/src/shared/common/loggable-exception/reference-not-populated.loggable-exception.ts +++ b/apps/server/src/shared/common/loggable-exception/reference-not-populated.loggable-exception.ts @@ -1,5 +1,5 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger'; +import { Loggable } from '@core/logger'; export class ReferenceNotPopulatedLoggableException extends InternalServerErrorException implements Loggable { constructor(private readonly entityName: string, private readonly referenceName: string) { diff --git a/apps/server/src/shared/common/loggable-exception/request-timeout.loggable-exception.ts b/apps/server/src/shared/common/loggable-exception/request-timeout.loggable-exception.ts index 7910d9ddfeb..6e283b85846 100644 --- a/apps/server/src/shared/common/loggable-exception/request-timeout.loggable-exception.ts +++ b/apps/server/src/shared/common/loggable-exception/request-timeout.loggable-exception.ts @@ -1,6 +1,6 @@ import { RequestTimeoutException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; export class RequestTimeoutLoggableException extends RequestTimeoutException implements Loggable { constructor(private readonly url: string) { diff --git a/apps/server/src/shared/common/loggable-exception/validation-error.loggable-exception.ts b/apps/server/src/shared/common/loggable-exception/validation-error.loggable-exception.ts index 9f0ef32a1e8..ce939c36b56 100644 --- a/apps/server/src/shared/common/loggable-exception/validation-error.loggable-exception.ts +++ b/apps/server/src/shared/common/loggable-exception/validation-error.loggable-exception.ts @@ -1,6 +1,6 @@ import { InternalServerErrorException } from '@nestjs/common'; -import { Loggable } from '@src/core/logger/interfaces'; -import { ErrorLogMessage } from '@src/core/logger/types'; +import { Loggable } from '@core/logger/interfaces'; +import { ErrorLogMessage } from '@core/logger/types'; import { ValidationError } from 'class-validator'; export class ValidationErrorLoggableException extends InternalServerErrorException implements Loggable { diff --git a/apps/server/src/shared/domain/domainobject/legacy-school.do.ts b/apps/server/src/shared/domain/domainobject/legacy-school.do.ts index 1e80676e135..c6d5376b0cf 100644 --- a/apps/server/src/shared/domain/domainobject/legacy-school.do.ts +++ b/apps/server/src/shared/domain/domainobject/legacy-school.do.ts @@ -1,6 +1,6 @@ +import { FileStorageType } from '@modules/school/domain'; import { FederalStateEntity, SchoolYearEntity } from '@shared/domain/entity'; import { EntityId, SchoolFeature } from '@shared/domain/types'; -import { FileStorageType } from '@src/modules/school/domain'; import { BaseDO } from './base.do'; /** diff --git a/apps/server/src/shared/domain/entity/school.entity.ts b/apps/server/src/shared/domain/entity/school.entity.ts index ec035208eaa..082942e692d 100644 --- a/apps/server/src/shared/domain/entity/school.entity.ts +++ b/apps/server/src/shared/domain/entity/school.entity.ts @@ -12,10 +12,10 @@ import { Property, } from '@mikro-orm/core'; import { SchoolSystemOptionsEntity } from '@modules/legacy-school/entity'; +import { FileStorageType } from '@modules/school/domain/type/file-storage-type.enum'; import { SystemEntity } from '@modules/system/entity/system.entity'; import { UserLoginMigrationEntity } from '@shared/domain/entity/user-login-migration.entity'; import { SchoolFeature, SchoolPurpose } from '@shared/domain/types'; -import { FileStorageType } from '@src/modules/school/domain/type/file-storage-type.enum'; import { LanguageType } from '../interface'; import { BaseEntityWithTimestamps } from './base.entity'; import { CountyEmbeddable, FederalStateEntity } from './federal-state.entity'; diff --git a/apps/server/src/shared/repo/base-domain-object.repo.integration.spec.ts b/apps/server/src/shared/repo/base-domain-object.repo.integration.spec.ts index 56cb3ac905b..640c3f66301 100644 --- a/apps/server/src/shared/repo/base-domain-object.repo.integration.spec.ts +++ b/apps/server/src/shared/repo/base-domain-object.repo.integration.spec.ts @@ -8,7 +8,7 @@ import { AuthorizableObject, DomainObject } from '@shared/domain/domain-object'; import { BaseEntityWithTimestamps } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { BaseDomainObjectRepo } from '@shared/repo/base-domain-object.repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; describe('BaseDomainObjectRepo', () => { interface TestEntityProperties { 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 5786aa99a7b..97c66d32746 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 @@ -1,13 +1,13 @@ +import { LegacyLogger } from '@core/logger'; import { createMock } from '@golevelup/ts-jest'; import { MongoMemoryDatabaseModule } from '@infra/database'; import { Entity, EntityData, EntityName, Property } from '@mikro-orm/core'; import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Injectable } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; +import { BaseDO } from '@shared/domain/domainobject'; import { BaseEntityWithTimestamps } from '@shared/domain/entity'; import { BaseDORepo } from '@shared/repo/base.do.repo'; -import { LegacyLogger } from '@src/core/logger'; -import { BaseDO } from '@src/shared/domain/domainobject'; const TEST_CREATED_AT = new Date('2022-01-01'); diff --git a/apps/server/src/shared/repo/base.do.repo.ts b/apps/server/src/shared/repo/base.do.repo.ts index 8f72b556abd..16c458ac68b 100644 --- a/apps/server/src/shared/repo/base.do.repo.ts +++ b/apps/server/src/shared/repo/base.do.repo.ts @@ -4,7 +4,7 @@ import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { BaseDO } from '@shared/domain/domainobject'; import { BaseEntity, baseEntityProperties } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; @Injectable() export abstract class BaseDORepo { diff --git a/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.spec.ts b/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.spec.ts index 12689dbf507..6b20c51903c 100644 --- a/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.spec.ts +++ b/apps/server/src/shared/repo/contextexternaltool/context-external-tool.repo.spec.ts @@ -16,7 +16,7 @@ import { schoolExternalToolEntityFactory } from '@modules/tool/school-external-t import { Test, TestingModule } from '@nestjs/testing'; import { SchoolEntity } from '@shared/domain/entity'; import { ExternalToolRepoMapper } from '@shared/repo/externaltool/external-tool.repo.mapper'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { ContextExternalToolRepo } from './context-external-tool.repo'; diff --git a/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts b/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts index 21810ba4416..7f107ac31cb 100644 --- a/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts +++ b/apps/server/src/shared/repo/externaltool/external-tool.repo.spec.ts @@ -18,7 +18,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { Page } from '@shared/domain/domainobject'; import { IFindOptions, SortOrder } from '@shared/domain/interface'; import { ExternalToolRepo, ExternalToolRepoMapper } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; describe(ExternalToolRepo.name, () => { 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 258b6c57354..382df9251fd 100644 --- a/apps/server/src/shared/repo/ltitool/ltitool.repo.spec.ts +++ b/apps/server/src/shared/repo/ltitool/ltitool.repo.spec.ts @@ -7,7 +7,7 @@ import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do'; import { LtiTool } from '@shared/domain/entity'; import { LtiPrivacyPermission, LtiRoleType } from '@shared/domain/entity/ltitool.entity'; import { LtiToolRepo } from '@shared/repo/ltitool/ltitool.repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { ltiToolFactory } from '@testing/factory/ltitool.factory'; 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 5c10a3b6559..c2e02738dfc 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 { SchoolYearEntity, UserLoginMigrationEntity, } from '@shared/domain/entity'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { legacySchoolDoFactory } from '@testing/factory/domainobject'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { schoolYearFactory } from '@testing/factory/schoolyear.factory'; diff --git a/apps/server/src/shared/repo/school/legacy-school.repo.ts b/apps/server/src/shared/repo/school/legacy-school.repo.ts index a364bf95630..2dcb79acc09 100644 --- a/apps/server/src/shared/repo/school/legacy-school.repo.ts +++ b/apps/server/src/shared/repo/school/legacy-school.repo.ts @@ -5,7 +5,7 @@ import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { LegacySchoolDo } from '@shared/domain/domainobject'; import { SchoolEntity, StorageProviderEntity, UserLoginMigrationEntity } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { BaseDORepo } from '../base.do.repo'; /** diff --git a/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.spec.ts b/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.spec.ts index cc0c4dcf479..69f8924d2dd 100644 --- a/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.spec.ts +++ b/apps/server/src/shared/repo/schoolexternaltool/school-external-tool.repo.spec.ts @@ -11,7 +11,7 @@ import { SchoolExternalToolQuery } from '@modules/tool/school-external-tool/uc/d import { Test, TestingModule } from '@nestjs/testing'; import { type SchoolEntity } from '@shared/domain/entity'; import { ExternalToolRepoMapper } from '@shared/repo/externaltool/external-tool.repo.mapper'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { SchoolExternalToolRepo } from './school-external-tool.repo'; 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 3b129dbd218..e6c999a8460 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 @@ -14,7 +14,7 @@ import { UserDO } from '@shared/domain/domainobject/user.do'; import { Role, SchoolEntity, User } from '@shared/domain/entity'; import { IFindOptions, LanguageType, RoleName, SortOrder } from '@shared/domain/interface'; import { UserDORepo } from '@shared/repo/user/user-do.repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { roleFactory } from '@testing/factory/role.factory'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; diff --git a/apps/server/src/shared/repo/user/user.scope.spec.ts b/apps/server/src/shared/repo/user/user.scope.spec.ts index e26c1ee5fea..c3c947be890 100644 --- a/apps/server/src/shared/repo/user/user.scope.spec.ts +++ b/apps/server/src/shared/repo/user/user.scope.spec.ts @@ -1,4 +1,4 @@ -import { UserDiscoverableQuery } from '@src/modules/user/service/user-query.type'; +import { UserDiscoverableQuery } from '@modules/user/service/user-query.type'; import { UserScope } from './user.scope'; describe('UserScope', () => { diff --git a/apps/server/src/shared/repo/user/user.scope.ts b/apps/server/src/shared/repo/user/user.scope.ts index a13b2ec97f6..4e23b8394e6 100644 --- a/apps/server/src/shared/repo/user/user.scope.ts +++ b/apps/server/src/shared/repo/user/user.scope.ts @@ -1,8 +1,8 @@ +import { UserDiscoverableQuery } from '@modules/user/service/user-query.type'; import { User } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; import { MongoPatterns } from '@shared/repo'; import { Scope } from '@shared/repo/scope'; -import { UserDiscoverableQuery } from '@src/modules/user/service/user-query.type'; export class UserScope extends Scope { isOutdated(isOutdated?: boolean): UserScope { 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 458710ad0c1..11ba9726f36 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 @@ -7,7 +7,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { UserLoginMigrationDO } from '@shared/domain/domainobject'; import { SchoolEntity } from '@shared/domain/entity'; import { UserLoginMigrationEntity } from '@shared/domain/entity/user-login-migration.entity'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { schoolEntityFactory } from '@testing/factory/school-entity.factory'; import { systemEntityFactory } from '@testing/factory/systemEntityFactory'; diff --git a/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.ts b/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.ts index 4c8598bdc61..4879f08bbde 100644 --- a/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.ts +++ b/apps/server/src/shared/repo/userloginmigration/user-login-migration.repo.ts @@ -6,7 +6,7 @@ import { UserLoginMigrationDO } from '@shared/domain/domainobject'; import { SchoolEntity } from '@shared/domain/entity'; import { UserLoginMigrationEntity } from '@shared/domain/entity/user-login-migration.entity'; import { EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { BaseDORepo } from '../base.do.repo'; @Injectable() 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 9238ee80db9..3843f0cda92 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 @@ -7,7 +7,7 @@ import { VideoConferenceDO, VideoConferenceOptionsDO } from '@shared/domain/doma import { TargetModels, VideoConference, VideoConferenceOptions } from '@shared/domain/entity'; import { VideoConferenceScope } from '@shared/domain/interface'; import { VideoConferenceRepo } from '@shared/repo'; -import { LegacyLogger } from '@src/core/logger'; +import { LegacyLogger } from '@core/logger'; import { cleanupCollections } from '@testing/cleanup-collections'; import { videoConferenceFactory } from '@testing/factory/video-conference.factory'; diff --git a/apps/server/src/testing/factory/h5p-content.factory.ts b/apps/server/src/testing/factory/h5p-content.factory.ts index 83c97fa0138..37579674362 100644 --- a/apps/server/src/testing/factory/h5p-content.factory.ts +++ b/apps/server/src/testing/factory/h5p-content.factory.ts @@ -1,10 +1,5 @@ -import { - ContentMetadata, - H5PContent, - H5PContentParentType, - H5PContentProperties, -} from '@src/modules/h5p-editor/entity'; import { ObjectId } from '@mikro-orm/mongodb'; +import { ContentMetadata, H5PContent, H5PContentParentType, H5PContentProperties } from '@modules/h5p-editor/entity'; import { BaseFactory } from './base.factory'; class H5PContentFactory extends BaseFactory {} diff --git a/apps/server/src/testing/factory/user-and-account.test.factory.spec.ts b/apps/server/src/testing/factory/user-and-account.test.factory.spec.ts index 36479e0f99d..4cdfd6946a0 100644 --- a/apps/server/src/testing/factory/user-and-account.test.factory.spec.ts +++ b/apps/server/src/testing/factory/user-and-account.test.factory.spec.ts @@ -1,6 +1,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; import { User } from '@shared/domain/entity'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; import { setupEntities } from '../setup-entities'; import { schoolEntityFactory } from './school-entity.factory'; import { UserAndAccountParams, UserAndAccountTestFactory } from './user-and-account.test.factory'; diff --git a/apps/server/src/testing/map-user-to-current-user.ts b/apps/server/src/testing/map-user-to-current-user.ts index 64792503974..36b4e3a14a1 100644 --- a/apps/server/src/testing/map-user-to-current-user.ts +++ b/apps/server/src/testing/map-user-to-current-user.ts @@ -1,8 +1,8 @@ import { ICurrentUser } from '@infra/auth-guard'; import { ObjectId } from '@mikro-orm/mongodb'; +import { AccountEntity } from '@modules/account/domain/entity/account.entity'; import { User } from '@shared/domain/entity'; import { EntityId } from '@shared/domain/types'; -import { AccountEntity } from '@src/modules/account/domain/entity/account.entity'; export const mapUserToCurrentUser = ( user: User, diff --git a/apps/server/src/testing/test-api-client.spec.ts b/apps/server/src/testing/test-api-client.spec.ts index 42f84a896f2..7a2d183212f 100644 --- a/apps/server/src/testing/test-api-client.spec.ts +++ b/apps/server/src/testing/test-api-client.spec.ts @@ -13,7 +13,7 @@ import { } from '@nestjs/common'; import { Test } from '@nestjs/testing'; -import { accountFactory } from '@src/modules/account/testing'; +import { accountFactory } from '@modules/account/testing'; import { TestApiClient } from './test-api-client'; @Controller('') diff --git a/config/README.md b/config/README.md index 213212414f1..c45f86ae1ac 100644 --- a/config/README.md +++ b/config/README.md @@ -254,7 +254,7 @@ Mocking in api tests. Configuration.set('MY_ENVIREMENT_VARIABLE', 'value'); // eslint-disable-next-line import/first - import { ServerTestModule } from '@src/modules/server/server.app.module'; + import { ServerTestModule } from '@modules/server/server.app.module'; describe('XXX', () => { @@ -279,7 +279,7 @@ The parsing of decorators in files starts first and after it the injections are It is possible to import the config file of the application directly and use the values. ``` javascript - import serverConfig from '@src/modules/server/server.config'; + import serverConfig from '@modules/server/server.config'; @RequestTimeout(serverConfig().INCOMING_REQUEST_TIMEOUT_COPY_API) ``` diff --git a/jest.config.ts b/jest.config.ts index 851876febd7..a9d1e4a9365 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -23,10 +23,11 @@ let config: Config.InitialOptions = { globalTeardown: '/apps/server/test/globalTeardown.ts', moduleNameMapper: { // add ts-config path's here as regex - '^@shared/(.*)$': '/apps/server/src/shared/$1', - '^@src/(.*)$': '/apps/server/src/$1', - '^@modules/(.*)$': '/apps/server/src/modules/$1', + '^@core/(.*)$': '/apps/server/src/core/$1', + '^@imports-from-feathers$': 'apps/server/src/imports-from-feathers', '^@infra/(.*)$': '/apps/server/src/infra/$1', + '^@modules/(.*)$': '/apps/server/src/modules/$1', + '^@shared/(.*)$': '/apps/server/src/shared/$1', '^@testing/(.*)$': '/apps/server/src/testing/$1', }, maxWorkers: 2, // limited for not taking all workers within of a single github action diff --git a/tsconfig.json b/tsconfig.json index 8486cdabef1..524566a0d02 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,10 +18,11 @@ "baseUrl": "./", "incremental": true, "paths": { - "@shared/*": ["apps/server/src/shared/*"], - "@src/*": ["apps/server/src/*"], - "@modules/*": ["apps/server/src/modules/*"], + "@core/*": ["apps/server/src/core/*"], + "@imports-from-feathers": ["apps/server/src/imports-from-feathers"], "@infra/*": ["apps/server/src/infra/*"], + "@modules/*": ["apps/server/src/modules/*"], + "@shared/*": ["apps/server/src/shared/*"], "@testing/*": ["apps/server/src/testing/*"], } }