From b4491cefcf2efd5836b95b93e7a404ab0caacf3a Mon Sep 17 00:00:00 2001 From: rajdip-b Date: Thu, 5 Sep 2024 12:28:50 +0530 Subject: [PATCH] chore(api): Reorganized import using path alias --- apps/api/jest.config.ts | 3 ++ apps/api/jest.e2e-config.ts | 3 ++ apps/api/src/api-key/api-key.e2e.spec.ts | 8 ++-- .../controller/api-key.controller.spec.ts | 4 +- .../api-key/controller/api-key.controller.ts | 4 +- .../api-key/service/api-key.service.spec.ts | 2 +- .../src/api-key/service/api-key.service.ts | 10 ++--- apps/api/src/app/app.controller.ts | 2 +- apps/api/src/app/app.module.ts | 40 +++++++++---------- apps/api/src/auth/auth.e2e.spec.ts | 8 ++-- apps/api/src/auth/auth.module.ts | 14 +++---- .../auth/controller/auth.controller.spec.ts | 16 ++++---- .../src/auth/controller/auth.controller.ts | 12 +++--- .../src/auth/guard/api-key/api-key.guard.ts | 6 +-- apps/api/src/auth/guard/auth/auth.guard.ts | 12 +++--- .../api/src/auth/service/auth.service.spec.ts | 10 ++--- apps/api/src/auth/service/auth.service.ts | 13 +++--- apps/api/src/cache/cache.service.spec.ts | 2 +- apps/api/src/cache/cache.service.ts | 2 +- .../src/common/authority-checker.service.ts | 8 ++-- apps/api/src/common/create-event.ts | 2 +- apps/api/src/common/create-user.ts | 4 +- apps/api/src/common/create-workspace.ts | 4 +- apps/api/src/common/set-cookie.ts | 2 +- .../controller/environment.controller.spec.ts | 6 +-- .../controller/environment.controller.ts | 4 +- .../src/environment/environment.e2e.spec.ts | 24 +++++------ .../service/environment.service.spec.ts | 6 +-- .../service/environment.service.ts | 10 ++--- .../event/controller/event.controller.spec.ts | 6 +-- .../src/event/controller/event.controller.ts | 4 +- apps/api/src/event/event.e2e.spec.ts | 38 +++++++++--------- .../src/event/service/event.service.spec.ts | 6 +-- apps/api/src/event/service/event.service.ts | 8 ++-- .../controller/feedback.controller.spec.ts | 4 +- .../controller/feedback.controller.ts | 2 +- apps/api/src/feedback/feedback.e2e.spec.ts | 12 +++--- .../feedback/service/feedback.service.spec.ts | 4 +- .../src/feedback/service/feedback.service.ts | 5 +-- .../controller/integration.controller.spec.ts | 6 +-- .../controller/integration.controller.ts | 4 +- .../src/integration/integration.e2e.spec.ts | 26 ++++++------ .../service/integration.service.spec.ts | 6 +-- .../service/integration.service.ts | 10 ++--- ...d.service.spec.ts => mail.service.spec.ts} | 0 .../controller/project.controller.spec.ts | 10 ++--- .../project/controller/project.controller.ts | 4 +- apps/api/src/project/project.e2e.spec.ts | 40 +++++++++---------- apps/api/src/project/project.module.ts | 6 +-- .../project/service/project.service.spec.ts | 10 ++--- .../src/project/service/project.service.ts | 18 ++++----- .../controller/secret.controller.spec.ts | 14 +++---- .../secret/controller/secret.controller.ts | 4 +- apps/api/src/secret/secret.e2e.spec.ts | 34 ++++++++-------- .../src/secret/service/secret.service.spec.ts | 14 +++---- apps/api/src/secret/service/secret.service.ts | 20 +++++----- apps/api/src/socket/change-notifier.socket.ts | 14 +++---- apps/api/src/socket/socket.module.ts | 2 +- .../user/controller/user.controller.spec.ts | 6 +-- .../src/user/controller/user.controller.ts | 12 +++--- .../api/src/user/service/user.service.spec.ts | 6 +-- apps/api/src/user/service/user.service.ts | 15 +++---- apps/api/src/user/user.e2e.spec.ts | 8 ++-- .../controller/variable.controller.spec.ts | 14 +++---- .../controller/variable.controller.ts | 4 +- .../variable/service/variable.service.spec.ts | 14 +++---- .../src/variable/service/variable.service.ts | 14 +++---- apps/api/src/variable/variable.e2e.spec.ts | 34 ++++++++-------- .../workspace-role.controller.spec.ts | 10 ++--- .../controller/workspace-role.controller.ts | 4 +- .../service/workspace-role.service.spec.ts | 10 ++--- .../service/workspace-role.service.ts | 12 +++--- .../workspace-role/workspace-role.e2e.spec.ts | 20 +++++----- .../controller/workspace.controller.spec.ts | 10 ++--- .../controller/workspace.controller.ts | 4 +- .../service/workspace.service.spec.ts | 10 ++--- .../workspace/service/workspace.service.ts | 19 ++++----- apps/api/src/workspace/workspace.e2e.spec.ts | 40 +++++++++---------- apps/api/tsconfig.json | 7 +++- 79 files changed, 421 insertions(+), 424 deletions(-) rename apps/api/src/mail/services/{resend.service.spec.ts => mail.service.spec.ts} (100%) diff --git a/apps/api/jest.config.ts b/apps/api/jest.config.ts index 80cceffb..731b8eab 100644 --- a/apps/api/jest.config.ts +++ b/apps/api/jest.config.ts @@ -7,6 +7,9 @@ export default { transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }] }, + moduleNameMapper: { + '^@/(.*)$': '/src/$1' + }, moduleFileExtensions: ['ts', 'js', 'html'], coverageDirectory: '../../coverage/apps/api' } diff --git a/apps/api/jest.e2e-config.ts b/apps/api/jest.e2e-config.ts index 9d34c5ed..74bee29e 100644 --- a/apps/api/jest.e2e-config.ts +++ b/apps/api/jest.e2e-config.ts @@ -7,6 +7,9 @@ export default { transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }] }, + moduleNameMapper: { + '^@/(.*)$': '/src/$1' + }, moduleFileExtensions: ['ts', 'js', 'html'], coverageDirectory: '../../coverage/apps/api' } diff --git a/apps/api/src/api-key/api-key.e2e.spec.ts b/apps/api/src/api-key/api-key.e2e.spec.ts index 7e14a5d8..e86bc36b 100644 --- a/apps/api/src/api-key/api-key.e2e.spec.ts +++ b/apps/api/src/api-key/api-key.e2e.spec.ts @@ -2,11 +2,11 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { ApiKeyModule } from './api-key.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' -import { AppModule } from '../app/app.module' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { AppModule } from '@/app/app.module' import { Test } from '@nestjs/testing' import { ApiKey, Authority, User } from '@prisma/client' import { ApiKeyService } from './service/api-key.service' diff --git a/apps/api/src/api-key/controller/api-key.controller.spec.ts b/apps/api/src/api-key/controller/api-key.controller.spec.ts index 0da33c3b..aa4802ee 100644 --- a/apps/api/src/api-key/controller/api-key.controller.spec.ts +++ b/apps/api/src/api-key/controller/api-key.controller.spec.ts @@ -1,8 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing' import { ApiKeyController } from './api-key.controller' -import { ApiKeyService } from '../service/api-key.service' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' +import { ApiKeyService } from '@/api-key/service/api-key.service' describe('ApiKeyController', () => { let controller: ApiKeyController diff --git a/apps/api/src/api-key/controller/api-key.controller.ts b/apps/api/src/api-key/controller/api-key.controller.ts index db093639..02c53970 100644 --- a/apps/api/src/api-key/controller/api-key.controller.ts +++ b/apps/api/src/api-key/controller/api-key.controller.ts @@ -10,11 +10,11 @@ import { Query } from '@nestjs/common' import { ApiKeyService } from '../service/api-key.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { CreateApiKey } from '../dto/create.api-key/create.api-key' import { UpdateApiKey } from '../dto/update.api-key/update.api-key' import { Authority, User } from '@prisma/client' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' @Controller('api-key') export class ApiKeyController { diff --git a/apps/api/src/api-key/service/api-key.service.spec.ts b/apps/api/src/api-key/service/api-key.service.spec.ts index b02e7b22..03148e2d 100644 --- a/apps/api/src/api-key/service/api-key.service.spec.ts +++ b/apps/api/src/api-key/service/api-key.service.spec.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing' import { ApiKeyService } from './api-key.service' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' describe('ApiKeyService', () => { diff --git a/apps/api/src/api-key/service/api-key.service.ts b/apps/api/src/api-key/service/api-key.service.ts index 2e0be932..bd1c3bdb 100644 --- a/apps/api/src/api-key/service/api-key.service.ts +++ b/apps/api/src/api-key/service/api-key.service.ts @@ -4,14 +4,14 @@ import { Logger, NotFoundException } from '@nestjs/common' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { CreateApiKey } from '../dto/create.api-key/create.api-key' -import { addHoursToDate } from '../../common/add-hours-to-date' -import { generateApiKey } from '../../common/api-key-generator' -import { toSHA256 } from '../../common/to-sha256' +import { addHoursToDate } from '@/common/add-hours-to-date' +import { generateApiKey } from '@/common/api-key-generator' +import { toSHA256 } from '@/common/to-sha256' import { UpdateApiKey } from '../dto/update.api-key/update.api-key' import { ApiKey, User } from '@prisma/client' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class ApiKeyService { diff --git a/apps/api/src/app/app.controller.ts b/apps/api/src/app/app.controller.ts index bef73e44..885818ba 100644 --- a/apps/api/src/app/app.controller.ts +++ b/apps/api/src/app/app.controller.ts @@ -1,5 +1,5 @@ import { Controller, Get } from '@nestjs/common' -import { Public } from '../decorators/public.decorator' +import { Public } from '@/decorators/public.decorator' @Controller() export class AppController { diff --git a/apps/api/src/app/app.module.ts b/apps/api/src/app/app.module.ts index 0bc84ee0..fdf19438 100644 --- a/apps/api/src/app/app.module.ts +++ b/apps/api/src/app/app.module.ts @@ -2,28 +2,28 @@ import { Module } from '@nestjs/common' import { AppController } from './app.controller' import { ConfigModule } from '@nestjs/config' import { PassportModule } from '@nestjs/passport' -import { AuthModule } from '../auth/auth.module' -import { PrismaModule } from '../prisma/prisma.module' -import { CommonModule } from '../common/common.module' -import { MailModule } from '../mail/mail.module' +import { AuthModule } from '@/auth/auth.module' +import { PrismaModule } from '@/prisma/prisma.module' +import { CommonModule } from '@/common/common.module' +import { MailModule } from '@/mail/mail.module' import { APP_GUARD } from '@nestjs/core' -import { AuthGuard } from '../auth/guard/auth/auth.guard' -import { UserModule } from '../user/user.module' -import { ProjectModule } from '../project/project.module' -import { EnvironmentModule } from '../environment/environment.module' -import { ApiKeyModule } from '../api-key/api-key.module' -import { WorkspaceModule } from '../workspace/workspace.module' -import { WorkspaceRoleModule } from '../workspace-role/workspace-role.module' -import { ApiKeyGuard } from '../auth/guard/api-key/api-key.guard' -import { EventModule } from '../event/event.module' -import { VariableModule } from '../variable/variable.module' -import { SocketModule } from '../socket/socket.module' -import { ProviderModule } from '../provider/provider.module' +import { AuthGuard } from '@/auth/guard/auth/auth.guard' +import { UserModule } from '@/user/user.module' +import { ProjectModule } from '@/project/project.module' +import { EnvironmentModule } from '@/environment/environment.module' +import { ApiKeyModule } from '@/api-key/api-key.module' +import { WorkspaceModule } from '@/workspace/workspace.module' +import { WorkspaceRoleModule } from '@/workspace-role/workspace-role.module' +import { ApiKeyGuard } from '@/auth/guard/api-key/api-key.guard' +import { EventModule } from '@/event/event.module' +import { VariableModule } from '@/variable/variable.module' +import { SocketModule } from '@/socket/socket.module' +import { ProviderModule } from '@/provider/provider.module' import { ScheduleModule } from '@nestjs/schedule' -import { EnvSchema } from '../common/env/env.schema' -import { IntegrationModule } from '../integration/integration.module' -import { FeedbackModule } from '../feedback/feedback.module' -import { CacheModule } from '../cache/cache.module' +import { EnvSchema } from '@/common/env/env.schema' +import { IntegrationModule } from '@/integration/integration.module' +import { FeedbackModule } from '@/feedback/feedback.module' +import { CacheModule } from '@/cache/cache.module' @Module({ controllers: [AppController], diff --git a/apps/api/src/auth/auth.e2e.spec.ts b/apps/api/src/auth/auth.e2e.spec.ts index 6f2cde10..b41736ed 100644 --- a/apps/api/src/auth/auth.e2e.spec.ts +++ b/apps/api/src/auth/auth.e2e.spec.ts @@ -2,12 +2,12 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Test } from '@nestjs/testing' import { AuthModule } from './auth.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' -import { AppModule } from '../app/app.module' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { AppModule } from '@/app/app.module' import { AuthService } from './service/auth.service' describe('Auth Controller Tests', () => { diff --git a/apps/api/src/auth/auth.module.ts b/apps/api/src/auth/auth.module.ts index 00197f1c..fea8b073 100644 --- a/apps/api/src/auth/auth.module.ts +++ b/apps/api/src/auth/auth.module.ts @@ -2,13 +2,13 @@ import { Module } from '@nestjs/common' import { AuthService } from './service/auth.service' import { AuthController } from './controller/auth.controller' import { JwtModule } from '@nestjs/jwt' -import { UserModule } from '../user/user.module' -import { GithubStrategy } from '../config/oauth-strategy/github/github.strategy' -import { GithubOAuthStrategyFactory } from '../config/factory/github/github-strategy.factory' -import { GoogleOAuthStrategyFactory } from '../config/factory/google/google-strategy.factory' -import { GoogleStrategy } from '../config/oauth-strategy/google/google.strategy' -import { GitlabOAuthStrategyFactory } from '../config/factory/gitlab/gitlab-strategy.factory' -import { GitlabStrategy } from '../config/oauth-strategy/gitlab/gitlab.strategy' +import { UserModule } from '@/user/user.module' +import { GithubStrategy } from '@/config/oauth-strategy/github/github.strategy' +import { GithubOAuthStrategyFactory } from '@/config/factory/github/github-strategy.factory' +import { GoogleOAuthStrategyFactory } from '@/config/factory/google/google-strategy.factory' +import { GoogleStrategy } from '@/config/oauth-strategy/google/google.strategy' +import { GitlabOAuthStrategyFactory } from '@/config/factory/gitlab/gitlab-strategy.factory' +import { GitlabStrategy } from '@/config/oauth-strategy/gitlab/gitlab.strategy' @Module({ imports: [ diff --git a/apps/api/src/auth/controller/auth.controller.spec.ts b/apps/api/src/auth/controller/auth.controller.spec.ts index a8721683..cf12312f 100644 --- a/apps/api/src/auth/controller/auth.controller.spec.ts +++ b/apps/api/src/auth/controller/auth.controller.spec.ts @@ -1,17 +1,17 @@ import { Test, TestingModule } from '@nestjs/testing' import { AuthService } from '../service/auth.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { JwtService } from '@nestjs/jwt' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { AuthController } from './auth.controller' import { mockDeep } from 'jest-mock-extended' import { ConfigService } from '@nestjs/config' -import { GithubOAuthStrategyFactory } from '../../config/factory/github/github-strategy.factory' -import { GoogleOAuthStrategyFactory } from '../../config/factory/google/google-strategy.factory' -import { GitlabOAuthStrategyFactory } from '../../config/factory/gitlab/gitlab-strategy.factory' -import { CacheService } from '../../cache/cache.service' -import { REDIS_CLIENT } from '../../provider/redis.provider' +import { GithubOAuthStrategyFactory } from '@/config/factory/github/github-strategy.factory' +import { GoogleOAuthStrategyFactory } from '@/config/factory/google/google-strategy.factory' +import { GitlabOAuthStrategyFactory } from '@/config/factory/gitlab/gitlab-strategy.factory' +import { CacheService } from '@/cache/cache.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' describe('AuthController', () => { let controller: AuthController diff --git a/apps/api/src/auth/controller/auth.controller.ts b/apps/api/src/auth/controller/auth.controller.ts index 262c2b49..dfce03e2 100644 --- a/apps/api/src/auth/controller/auth.controller.ts +++ b/apps/api/src/auth/controller/auth.controller.ts @@ -13,18 +13,18 @@ import { UseGuards } from '@nestjs/common' import { AuthService } from '../service/auth.service' -import { Public } from '../../decorators/public.decorator' +import { Public } from '@/decorators/public.decorator' import { AuthGuard } from '@nestjs/passport' -import { GithubOAuthStrategyFactory } from '../../config/factory/github/github-strategy.factory' -import { GoogleOAuthStrategyFactory } from '../../config/factory/google/google-strategy.factory' -import { GitlabOAuthStrategyFactory } from '../../config/factory/gitlab/gitlab-strategy.factory' +import { GithubOAuthStrategyFactory } from '@/config/factory/github/github-strategy.factory' +import { GoogleOAuthStrategyFactory } from '@/config/factory/google/google-strategy.factory' +import { GitlabOAuthStrategyFactory } from '@/config/factory/gitlab/gitlab-strategy.factory' import { Response } from 'express' import { AuthProvider } from '@prisma/client' -import setCookie from '../../common/set-cookie' +import setCookie from '@/common/set-cookie' import { sendOAuthFailureRedirect, sendOAuthSuccessRedirect -} from '../../common/redirect' +} from '@/common/redirect' @Controller('auth') export class AuthController { diff --git a/apps/api/src/auth/guard/api-key/api-key.guard.ts b/apps/api/src/auth/guard/api-key/api-key.guard.ts index d699e0ea..68ed2dfb 100644 --- a/apps/api/src/auth/guard/api-key/api-key.guard.ts +++ b/apps/api/src/auth/guard/api-key/api-key.guard.ts @@ -6,11 +6,11 @@ import { } from '@nestjs/common' import { Reflector } from '@nestjs/core' import { Authority } from '@prisma/client' -import { REQUIRED_API_KEY_AUTHORITIES } from '../../../decorators/required-api-key-authorities.decorator' +import { REQUIRED_API_KEY_AUTHORITIES } from '@/decorators/required-api-key-authorities.decorator' import { Observable } from 'rxjs' import { AuthenticatedUserContext } from '../../auth.types' -import { FORBID_API_KEY } from '../../../decorators/forbid-api-key.decorator' -import { IS_PUBLIC_KEY } from '../../../decorators/public.decorator' +import { FORBID_API_KEY } from '@/decorators/forbid-api-key.decorator' +import { IS_PUBLIC_KEY } from '@/decorators/public.decorator' @Injectable() export class ApiKeyGuard implements CanActivate { diff --git a/apps/api/src/auth/guard/auth/auth.guard.ts b/apps/api/src/auth/guard/auth/auth.guard.ts index c0248c55..10865292 100644 --- a/apps/api/src/auth/guard/auth/auth.guard.ts +++ b/apps/api/src/auth/guard/auth/auth.guard.ts @@ -7,13 +7,13 @@ import { } from '@nestjs/common' import { JwtService } from '@nestjs/jwt' import { Reflector } from '@nestjs/core' -import { IS_PUBLIC_KEY } from '../../../decorators/public.decorator' -import { PrismaService } from '../../../prisma/prisma.service' -import { ONBOARDING_BYPASSED } from '../../../decorators/bypass-onboarding.decorator' +import { IS_PUBLIC_KEY } from '@/decorators/public.decorator' +import { PrismaService } from '@/prisma/prisma.service' +import { ONBOARDING_BYPASSED } from '@/decorators/bypass-onboarding.decorator' import { AuthenticatedUserContext } from '../../auth.types' -import { toSHA256 } from '../../../common/to-sha256' -import { EnvSchema } from '../../../common/env/env.schema' -import { CacheService } from '../../../cache/cache.service' +import { toSHA256 } from '@/common/to-sha256' +import { EnvSchema } from '@/common/env/env.schema' +import { CacheService } from '@/cache/cache.service' const X_E2E_USER_EMAIL = 'x-e2e-user-email' const X_KEYSHADE_TOKEN = 'x-keyshade-token' diff --git a/apps/api/src/auth/service/auth.service.spec.ts b/apps/api/src/auth/service/auth.service.spec.ts index 34cd05dc..738bb7d4 100644 --- a/apps/api/src/auth/service/auth.service.spec.ts +++ b/apps/api/src/auth/service/auth.service.spec.ts @@ -1,12 +1,12 @@ import { Test, TestingModule } from '@nestjs/testing' import { AuthService } from './auth.service' -import { MockMailService } from '../../mail/services/mock.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' import { JwtService } from '@nestjs/jwt' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { CacheService } from '../../cache/cache.service' -import { REDIS_CLIENT } from '../../provider/redis.provider' +import { CacheService } from '@/cache/cache.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' describe('AuthService', () => { let service: AuthService diff --git a/apps/api/src/auth/service/auth.service.ts b/apps/api/src/auth/service/auth.service.ts index 1c82a738..a689a6d9 100644 --- a/apps/api/src/auth/service/auth.service.ts +++ b/apps/api/src/auth/service/auth.service.ts @@ -10,15 +10,12 @@ import { import { JwtService } from '@nestjs/jwt' import { Cron, CronExpression } from '@nestjs/schedule' import { UserAuthenticatedResponse } from '../auth.types' -import { - IMailService, - MAIL_SERVICE -} from '../../mail/services/interface.service' -import { PrismaService } from '../../prisma/prisma.service' -import createUser from '../../common/create-user' +import { IMailService, MAIL_SERVICE } from '@/mail/services/interface.service' +import { PrismaService } from '@/prisma/prisma.service' +import createUser from '@/common/create-user' import { AuthProvider } from '@prisma/client' -import generateOtp from '../../common/generate-otp' -import { CacheService } from '../../cache/cache.service' +import generateOtp from '@/common/generate-otp' +import { CacheService } from '@/cache/cache.service' @Injectable() export class AuthService { diff --git a/apps/api/src/cache/cache.service.spec.ts b/apps/api/src/cache/cache.service.spec.ts index de3d09bd..7852f8a6 100644 --- a/apps/api/src/cache/cache.service.spec.ts +++ b/apps/api/src/cache/cache.service.spec.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing' import { CacheService } from './cache.service' -import { REDIS_CLIENT } from '../provider/redis.provider' +import { REDIS_CLIENT } from '@/provider/redis.provider' describe('CacheService', () => { let service: CacheService diff --git a/apps/api/src/cache/cache.service.ts b/apps/api/src/cache/cache.service.ts index d5ecced3..ba61176a 100644 --- a/apps/api/src/cache/cache.service.ts +++ b/apps/api/src/cache/cache.service.ts @@ -1,7 +1,7 @@ import { Inject, Injectable, OnModuleDestroy } from '@nestjs/common' import { RedisClientType } from 'redis' import { User } from '@prisma/client' -import { REDIS_CLIENT } from '../provider/redis.provider' +import { REDIS_CLIENT } from '@/provider/redis.provider' @Injectable() export class CacheService implements OnModuleDestroy { diff --git a/apps/api/src/common/authority-checker.service.ts b/apps/api/src/common/authority-checker.service.ts index d4d797d0..3957e6f8 100644 --- a/apps/api/src/common/authority-checker.service.ts +++ b/apps/api/src/common/authority-checker.service.ts @@ -5,7 +5,7 @@ import { Integration, ProjectAccessLevel } from '@prisma/client' -import { VariableWithProjectAndVersion } from '../variable/variable.types' +import { VariableWithProjectAndVersion } from '@/variable/variable.types' import { Injectable, InternalServerErrorException, @@ -14,9 +14,9 @@ import { } from '@nestjs/common' import getCollectiveProjectAuthorities from './get-collective-project-authorities' import getCollectiveWorkspaceAuthorities from './get-collective-workspace-authorities' -import { EnvironmentWithProject } from '../environment/environment.types' -import { ProjectWithSecrets } from '../project/project.types' -import { SecretWithProjectAndVersion } from '../secret/secret.types' +import { EnvironmentWithProject } from '@/environment/environment.types' +import { ProjectWithSecrets } from '@/project/project.types' +import { SecretWithProjectAndVersion } from '@/secret/secret.types' import { CustomLoggerService } from './logger.service' export interface AuthorityInput { diff --git a/apps/api/src/common/create-event.ts b/apps/api/src/common/create-event.ts index 1a8b974e..4475a1ee 100644 --- a/apps/api/src/common/create-event.ts +++ b/apps/api/src/common/create-event.ts @@ -15,7 +15,7 @@ import { Integration } from '@prisma/client' import { JsonObject } from '@prisma/client/runtime/library' -import IntegrationFactory from '../integration/plugins/factory/integration.factory' +import IntegrationFactory from '@/integration/plugins/factory/integration.factory' const logger = new Logger('CreateEvent') diff --git a/apps/api/src/common/create-user.ts b/apps/api/src/common/create-user.ts index 89632822..7a84516a 100644 --- a/apps/api/src/common/create-user.ts +++ b/apps/api/src/common/create-user.ts @@ -1,6 +1,6 @@ import { AuthProvider, User, Workspace } from '@prisma/client' -import { PrismaService } from '../prisma/prisma.service' -import { CreateUserDto } from '../user/dto/create.user/create.user' +import { PrismaService } from '@/prisma/prisma.service' +import { CreateUserDto } from '@/user/dto/create.user/create.user' import createWorkspace from './create-workspace' import { Logger } from '@nestjs/common' diff --git a/apps/api/src/common/create-workspace.ts b/apps/api/src/common/create-workspace.ts index b7ae158d..b5cf9a4f 100644 --- a/apps/api/src/common/create-workspace.ts +++ b/apps/api/src/common/create-workspace.ts @@ -1,8 +1,8 @@ import { Authority, EventSource, EventType, User } from '@prisma/client' import createEvent from './create-event' -import { CreateWorkspace } from '../workspace/dto/create.workspace/create.workspace' +import { CreateWorkspace } from '@/workspace/dto/create.workspace/create.workspace' import { v4 } from 'uuid' -import { PrismaService } from '../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Logger } from '@nestjs/common' export default async function createWorkspace( diff --git a/apps/api/src/common/set-cookie.ts b/apps/api/src/common/set-cookie.ts index e1dc5e7a..74ca5df2 100644 --- a/apps/api/src/common/set-cookie.ts +++ b/apps/api/src/common/set-cookie.ts @@ -1,6 +1,6 @@ import { User } from '@prisma/client' import { Response } from 'express' -import { UserAuthenticatedResponse } from '../auth/auth.types' +import { UserAuthenticatedResponse } from '@/auth/auth.types' /* istanbul ignore next */ export default function setCookie( diff --git a/apps/api/src/environment/controller/environment.controller.spec.ts b/apps/api/src/environment/controller/environment.controller.spec.ts index 09e073e1..7cedc470 100644 --- a/apps/api/src/environment/controller/environment.controller.spec.ts +++ b/apps/api/src/environment/controller/environment.controller.spec.ts @@ -1,10 +1,10 @@ import { Test, TestingModule } from '@nestjs/testing' import { EnvironmentController } from './environment.controller' import { EnvironmentService } from '../service/environment.service' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('EnvironmentController', () => { let controller: EnvironmentController diff --git a/apps/api/src/environment/controller/environment.controller.ts b/apps/api/src/environment/controller/environment.controller.ts index 31d5be19..895784d2 100644 --- a/apps/api/src/environment/controller/environment.controller.ts +++ b/apps/api/src/environment/controller/environment.controller.ts @@ -9,11 +9,11 @@ import { Query } from '@nestjs/common' import { EnvironmentService } from '../service/environment.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { CreateEnvironment } from '../dto/create.environment/create.environment' import { Authority, User } from '@prisma/client' import { UpdateEnvironment } from '../dto/update.environment/update.environment' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' @Controller('environment') export class EnvironmentController { diff --git a/apps/api/src/environment/environment.e2e.spec.ts b/apps/api/src/environment/environment.e2e.spec.ts index fcc25614..6d1bd87b 100644 --- a/apps/api/src/environment/environment.e2e.spec.ts +++ b/apps/api/src/environment/environment.e2e.spec.ts @@ -1,13 +1,13 @@ import { Test } from '@nestjs/testing' -import { AppModule } from '../app/app.module' +import { AppModule } from '@/app/app.module' import { EnvironmentModule } from './environment.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Environment, EventSeverity, @@ -19,15 +19,15 @@ import { User, Workspace } from '@prisma/client' -import fetchEvents from '../common/fetch-events' -import { ProjectModule } from '../project/project.module' -import { ProjectService } from '../project/service/project.service' -import { EventModule } from '../event/event.module' -import { EventService } from '../event/service/event.service' +import fetchEvents from '@/common/fetch-events' +import { ProjectModule } from '@/project/project.module' +import { ProjectService } from '@/project/service/project.service' +import { EventModule } from '@/event/event.module' +import { EventService } from '@/event/service/event.service' import { EnvironmentService } from './service/environment.service' -import { UserModule } from '../user/user.module' -import { UserService } from '../user/service/user.service' -import { QueryTransformPipe } from '../common/query.transform.pipe' +import { UserModule } from '@/user/user.module' +import { UserService } from '@/user/service/user.service' +import { QueryTransformPipe } from '@/common/query.transform.pipe' describe('Environment Controller Tests', () => { let app: NestFastifyApplication diff --git a/apps/api/src/environment/service/environment.service.spec.ts b/apps/api/src/environment/service/environment.service.spec.ts index bc6eec84..a2ea0052 100644 --- a/apps/api/src/environment/service/environment.service.spec.ts +++ b/apps/api/src/environment/service/environment.service.spec.ts @@ -1,9 +1,9 @@ import { Test, TestingModule } from '@nestjs/testing' import { EnvironmentService } from './environment.service' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('EnvironmentService', () => { let service: EnvironmentService diff --git a/apps/api/src/environment/service/environment.service.ts b/apps/api/src/environment/service/environment.service.ts index 4b9756c9..13d01624 100644 --- a/apps/api/src/environment/service/environment.service.ts +++ b/apps/api/src/environment/service/environment.service.ts @@ -14,11 +14,11 @@ import { } from '@prisma/client' import { CreateEnvironment } from '../dto/create.environment/create.environment' import { UpdateEnvironment } from '../dto/update.environment/update.environment' -import { PrismaService } from '../../prisma/prisma.service' -import createEvent from '../../common/create-event' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { paginate } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { PrismaService } from '@/prisma/prisma.service' +import createEvent from '@/common/create-event' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { paginate } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class EnvironmentService { diff --git a/apps/api/src/event/controller/event.controller.spec.ts b/apps/api/src/event/controller/event.controller.spec.ts index 9f3f9e8d..5972a8e6 100644 --- a/apps/api/src/event/controller/event.controller.spec.ts +++ b/apps/api/src/event/controller/event.controller.spec.ts @@ -1,9 +1,9 @@ import { Test, TestingModule } from '@nestjs/testing' import { EventController } from './event.controller' import { EventService } from '../service/event.service' -import { PrismaService } from '../../prisma/prisma.service' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { PrismaService } from '@/prisma/prisma.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('EventController', () => { let controller: EventController diff --git a/apps/api/src/event/controller/event.controller.ts b/apps/api/src/event/controller/event.controller.ts index 71e895f4..8074271a 100644 --- a/apps/api/src/event/controller/event.controller.ts +++ b/apps/api/src/event/controller/event.controller.ts @@ -1,8 +1,8 @@ import { Controller, Get, Param, Query } from '@nestjs/common' import { EventService } from '../service/event.service' import { Authority, EventSeverity, EventSource, User } from '@prisma/client' -import { CurrentUser } from '../../decorators/user.decorator' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { CurrentUser } from '@/decorators/user.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' @Controller('event') export class EventController { diff --git a/apps/api/src/event/event.e2e.spec.ts b/apps/api/src/event/event.e2e.spec.ts index 747a3d71..a538038c 100644 --- a/apps/api/src/event/event.e2e.spec.ts +++ b/apps/api/src/event/event.e2e.spec.ts @@ -15,27 +15,27 @@ import { Variable, Workspace } from '@prisma/client' -import { PrismaService } from '../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Test } from '@nestjs/testing' -import { WorkspaceRoleModule } from '../workspace-role/workspace-role.module' -import { AppModule } from '../app/app.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' +import { WorkspaceRoleModule } from '@/workspace-role/workspace-role.module' +import { AppModule } from '@/app/app.module' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { EventModule } from './event.module' -import cleanUp from '../common/cleanup' -import { WorkspaceService } from '../workspace/service/workspace.service' -import { WorkspaceModule } from '../workspace/workspace.module' -import { EnvironmentService } from '../environment/service/environment.service' -import { WorkspaceRoleService } from '../workspace-role/service/workspace-role.service' -import { ProjectService } from '../project/service/project.service' -import { SecretService } from '../secret/service/secret.service' -import { SecretModule } from '../secret/secret.module' -import { ProjectModule } from '../project/project.module' -import { EnvironmentModule } from '../environment/environment.module' -import createEvent from '../common/create-event' -import { VariableService } from '../variable/service/variable.service' -import { VariableModule } from '../variable/variable.module' -import { QueryTransformPipe } from '../common/query.transform.pipe' +import cleanUp from '@/common/cleanup' +import { WorkspaceService } from '@/workspace/service/workspace.service' +import { WorkspaceModule } from '@/workspace/workspace.module' +import { EnvironmentService } from '@/environment/service/environment.service' +import { WorkspaceRoleService } from '@/workspace-role/service/workspace-role.service' +import { ProjectService } from '@/project/service/project.service' +import { SecretService } from '@/secret/service/secret.service' +import { SecretModule } from '@/secret/secret.module' +import { ProjectModule } from '@/project/project.module' +import { EnvironmentModule } from '@/environment/environment.module' +import createEvent from '@/common/create-event' +import { VariableService } from '@/variable/service/variable.service' +import { VariableModule } from '@/variable/variable.module' +import { QueryTransformPipe } from '@/common/query.transform.pipe' describe('Event Controller Tests', () => { let app: NestFastifyApplication diff --git a/apps/api/src/event/service/event.service.spec.ts b/apps/api/src/event/service/event.service.spec.ts index 9397ff59..c0ab0d6a 100644 --- a/apps/api/src/event/service/event.service.spec.ts +++ b/apps/api/src/event/service/event.service.spec.ts @@ -1,8 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing' import { EventService } from './event.service' -import { PrismaService } from '../../prisma/prisma.service' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { PrismaService } from '@/prisma/prisma.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('EventService', () => { let service: EventService diff --git a/apps/api/src/event/service/event.service.ts b/apps/api/src/event/service/event.service.ts index b9c28936..960ee868 100644 --- a/apps/api/src/event/service/event.service.ts +++ b/apps/api/src/event/service/event.service.ts @@ -1,9 +1,9 @@ import { BadRequestException, Injectable } from '@nestjs/common' import { Authority, EventSeverity, EventSource, User } from '@prisma/client' -import { PrismaService } from '../../prisma/prisma.service' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { paginate } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { PrismaService } from '@/prisma/prisma.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { paginate } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class EventService { diff --git a/apps/api/src/feedback/controller/feedback.controller.spec.ts b/apps/api/src/feedback/controller/feedback.controller.spec.ts index d4d73f3f..fe984bde 100644 --- a/apps/api/src/feedback/controller/feedback.controller.spec.ts +++ b/apps/api/src/feedback/controller/feedback.controller.spec.ts @@ -1,8 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing' import { FeedbackController } from './feedback.controller' import { FeedbackService } from '../service/feedback.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' describe('FeedbackController', () => { let controller: FeedbackController diff --git a/apps/api/src/feedback/controller/feedback.controller.ts b/apps/api/src/feedback/controller/feedback.controller.ts index bac648da..d61f0798 100644 --- a/apps/api/src/feedback/controller/feedback.controller.ts +++ b/apps/api/src/feedback/controller/feedback.controller.ts @@ -1,5 +1,5 @@ import { Controller, Post, Body } from '@nestjs/common' -import { Public } from '../../decorators/public.decorator' +import { Public } from '@/decorators/public.decorator' import { FeedbackService } from '../service/feedback.service' @Controller('feedback') diff --git a/apps/api/src/feedback/feedback.e2e.spec.ts b/apps/api/src/feedback/feedback.e2e.spec.ts index 143001af..8913bf75 100644 --- a/apps/api/src/feedback/feedback.e2e.spec.ts +++ b/apps/api/src/feedback/feedback.e2e.spec.ts @@ -1,15 +1,15 @@ import { Test, TestingModule } from '@nestjs/testing' -import { AppModule } from '../app/app.module' -import { FeedbackService } from '../feedback/service/feedback.service' -import { MockMailService } from '../mail/services/mock.service' +import { AppModule } from '@/app/app.module' +import { FeedbackService } from '@/feedback/service/feedback.service' +import { MockMailService } from '@/mail/services/mock.service' import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { MAIL_SERVICE } from '../mail/services/interface.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' import { FeedbackModule } from './feedback.module' -import { MailModule } from '../mail/mail.module' -import { PrismaService } from '../prisma/prisma.service' +import { MailModule } from '@/mail/mail.module' +import { PrismaService } from '@/prisma/prisma.service' import { User } from '@prisma/client' describe('Feedback Controller (E2E)', () => { diff --git a/apps/api/src/feedback/service/feedback.service.spec.ts b/apps/api/src/feedback/service/feedback.service.spec.ts index e650f963..ba297690 100644 --- a/apps/api/src/feedback/service/feedback.service.spec.ts +++ b/apps/api/src/feedback/service/feedback.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { FeedbackService } from './feedback.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' describe('FeedbackService', () => { let service: FeedbackService diff --git a/apps/api/src/feedback/service/feedback.service.ts b/apps/api/src/feedback/service/feedback.service.ts index 02b18838..d30a2c9d 100644 --- a/apps/api/src/feedback/service/feedback.service.ts +++ b/apps/api/src/feedback/service/feedback.service.ts @@ -1,8 +1,5 @@ import { BadRequestException, Inject, Injectable } from '@nestjs/common' -import { - IMailService, - MAIL_SERVICE -} from '../../mail/services/interface.service' +import { IMailService, MAIL_SERVICE } from '@/mail/services/interface.service' @Injectable() export class FeedbackService { diff --git a/apps/api/src/integration/controller/integration.controller.spec.ts b/apps/api/src/integration/controller/integration.controller.spec.ts index 44fe4412..f564a7be 100644 --- a/apps/api/src/integration/controller/integration.controller.spec.ts +++ b/apps/api/src/integration/controller/integration.controller.spec.ts @@ -1,10 +1,10 @@ import { Test, TestingModule } from '@nestjs/testing' import { IntegrationController } from './integration.controller' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { AuthorityCheckerService } from '../../common/authority-checker.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' import { IntegrationService } from '../service/integration.service' -import { CommonModule } from '../../common/common.module' +import { CommonModule } from '@/common/common.module' describe('IntegrationController', () => { let controller: IntegrationController diff --git a/apps/api/src/integration/controller/integration.controller.ts b/apps/api/src/integration/controller/integration.controller.ts index 8aa1c2de..463c850c 100644 --- a/apps/api/src/integration/controller/integration.controller.ts +++ b/apps/api/src/integration/controller/integration.controller.ts @@ -9,10 +9,10 @@ import { Query } from '@nestjs/common' import { IntegrationService } from '../service/integration.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { CreateIntegration } from '../dto/create.integration/create.integration' import { Authority, User } from '@prisma/client' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' import { UpdateIntegration } from '../dto/update.integration/update.integration' @Controller('integration') diff --git a/apps/api/src/integration/integration.e2e.spec.ts b/apps/api/src/integration/integration.e2e.spec.ts index ec15adaa..0413d4e2 100644 --- a/apps/api/src/integration/integration.e2e.spec.ts +++ b/apps/api/src/integration/integration.e2e.spec.ts @@ -2,15 +2,15 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' -import { UserService } from '../user/service/user.service' +import { PrismaService } from '@/prisma/prisma.service' +import { UserService } from '@/user/service/user.service' import { IntegrationService } from './service/integration.service' -import { WorkspaceService } from '../workspace/service/workspace.service' +import { WorkspaceService } from '@/workspace/service/workspace.service' import { Test } from '@nestjs/testing' -import { UserModule } from '../user/user.module' -import { WorkspaceModule } from '../workspace/workspace.module' +import { UserModule } from '@/user/user.module' +import { WorkspaceModule } from '@/workspace/workspace.module' import { IntegrationModule } from './integration.module' -import { AppModule } from '../app/app.module' +import { AppModule } from '@/app/app.module' import { Environment, EventType, @@ -20,13 +20,13 @@ import { User, Workspace } from '@prisma/client' -import { ProjectService } from '../project/service/project.service' -import { ProjectModule } from '../project/project.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' -import { EnvironmentModule } from '../environment/environment.module' -import { EnvironmentService } from '../environment/service/environment.service' -import { QueryTransformPipe } from '../common/query.transform.pipe' +import { ProjectService } from '@/project/service/project.service' +import { ProjectModule } from '@/project/project.module' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { EnvironmentModule } from '@/environment/environment.module' +import { EnvironmentService } from '@/environment/service/environment.service' +import { QueryTransformPipe } from '@/common/query.transform.pipe' describe('Integration Controller Tests', () => { let app: NestFastifyApplication diff --git a/apps/api/src/integration/service/integration.service.spec.ts b/apps/api/src/integration/service/integration.service.spec.ts index e6ee75ce..5e2929fe 100644 --- a/apps/api/src/integration/service/integration.service.spec.ts +++ b/apps/api/src/integration/service/integration.service.spec.ts @@ -1,8 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing' import { IntegrationService } from './integration.service' -import { CommonModule } from '../../common/common.module' -import { PrismaService } from '../../prisma/prisma.service' -import { AuthorityCheckerService } from '../../common/authority-checker.service' +import { CommonModule } from '@/common/common.module' +import { PrismaService } from '@/prisma/prisma.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' import { mockDeep } from 'jest-mock-extended' describe('IntegrationService', () => { diff --git a/apps/api/src/integration/service/integration.service.ts b/apps/api/src/integration/service/integration.service.ts index ee77b546..150cce8b 100644 --- a/apps/api/src/integration/service/integration.service.ts +++ b/apps/api/src/integration/service/integration.service.ts @@ -4,7 +4,7 @@ import { Injectable, Logger } from '@nestjs/common' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Authority, EventSource, @@ -15,11 +15,11 @@ import { } from '@prisma/client' import { CreateIntegration } from '../dto/create.integration/create.integration' import { UpdateIntegration } from '../dto/update.integration/update.integration' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import createEvent from '../../common/create-event' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import createEvent from '@/common/create-event' import IntegrationFactory from '../plugins/factory/integration.factory' -import { paginate } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { paginate } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class IntegrationService { diff --git a/apps/api/src/mail/services/resend.service.spec.ts b/apps/api/src/mail/services/mail.service.spec.ts similarity index 100% rename from apps/api/src/mail/services/resend.service.spec.ts rename to apps/api/src/mail/services/mail.service.spec.ts diff --git a/apps/api/src/project/controller/project.controller.spec.ts b/apps/api/src/project/controller/project.controller.spec.ts index 9bb3cb5c..db68a0bb 100644 --- a/apps/api/src/project/controller/project.controller.spec.ts +++ b/apps/api/src/project/controller/project.controller.spec.ts @@ -1,12 +1,12 @@ import { Test, TestingModule } from '@nestjs/testing' import { ProjectController } from './project.controller' import { ProjectService } from '../service/project.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' -import { PrismaService } from '../../prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('ProjectController', () => { let controller: ProjectController diff --git a/apps/api/src/project/controller/project.controller.ts b/apps/api/src/project/controller/project.controller.ts index 7c947dc0..d15d2e2a 100644 --- a/apps/api/src/project/controller/project.controller.ts +++ b/apps/api/src/project/controller/project.controller.ts @@ -9,11 +9,11 @@ import { Query } from '@nestjs/common' import { ProjectService } from '../service/project.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { Authority, Project, User, Workspace } from '@prisma/client' import { CreateProject } from '../dto/create.project/create.project' import { UpdateProject } from '../dto/update.project/update.project' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' import { ForkProject } from '../dto/fork.project/fork.project' @Controller('project') diff --git a/apps/api/src/project/project.e2e.spec.ts b/apps/api/src/project/project.e2e.spec.ts index 3ad7e37f..4bde56ea 100644 --- a/apps/api/src/project/project.e2e.spec.ts +++ b/apps/api/src/project/project.e2e.spec.ts @@ -2,12 +2,12 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Test } from '@nestjs/testing' -import { AppModule } from '../app/app.module' +import { AppModule } from '@/app/app.module' import { ProjectModule } from './project.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { Authority, Environment, @@ -22,23 +22,23 @@ import { Variable, Workspace } from '@prisma/client' -import fetchEvents from '../common/fetch-events' -import { EventService } from '../event/service/event.service' -import { EventModule } from '../event/event.module' +import fetchEvents from '@/common/fetch-events' +import { EventService } from '@/event/service/event.service' +import { EventModule } from '@/event/event.module' import { ProjectService } from './service/project.service' -import { WorkspaceService } from '../workspace/service/workspace.service' -import { UserService } from '../user/service/user.service' -import { WorkspaceModule } from '../workspace/workspace.module' -import { UserModule } from '../user/user.module' -import { WorkspaceRoleModule } from '../workspace-role/workspace-role.module' -import { WorkspaceRoleService } from '../workspace-role/service/workspace-role.service' -import { EnvironmentService } from '../environment/service/environment.service' -import { SecretService } from '../secret/service/secret.service' -import { VariableService } from '../variable/service/variable.service' -import { VariableModule } from '../variable/variable.module' -import { SecretModule } from '../secret/secret.module' -import { EnvironmentModule } from '../environment/environment.module' -import { QueryTransformPipe } from '../common/query.transform.pipe' +import { WorkspaceService } from '@/workspace/service/workspace.service' +import { UserService } from '@/user/service/user.service' +import { WorkspaceModule } from '@/workspace/workspace.module' +import { UserModule } from '@/user/user.module' +import { WorkspaceRoleModule } from '@/workspace-role/workspace-role.module' +import { WorkspaceRoleService } from '@/workspace-role/service/workspace-role.service' +import { EnvironmentService } from '@/environment/service/environment.service' +import { SecretService } from '@/secret/service/secret.service' +import { VariableService } from '@/variable/service/variable.service' +import { VariableModule } from '@/variable/variable.module' +import { SecretModule } from '@/secret/secret.module' +import { EnvironmentModule } from '@/environment/environment.module' +import { QueryTransformPipe } from '@/common/query.transform.pipe' describe('Project Controller Tests', () => { let app: NestFastifyApplication diff --git a/apps/api/src/project/project.module.ts b/apps/api/src/project/project.module.ts index 4737691a..79ea8e3b 100644 --- a/apps/api/src/project/project.module.ts +++ b/apps/api/src/project/project.module.ts @@ -1,9 +1,9 @@ import { Module } from '@nestjs/common' import { ProjectService } from './service/project.service' import { ProjectController } from './controller/project.controller' -import { EnvironmentModule } from '../environment/environment.module' -import { UserModule } from '../user/user.module' -import { SecretModule } from '../secret/secret.module' +import { EnvironmentModule } from '@/environment/environment.module' +import { UserModule } from '@/user/user.module' +import { SecretModule } from '@/secret/secret.module' @Module({ providers: [ProjectService], diff --git a/apps/api/src/project/service/project.service.spec.ts b/apps/api/src/project/service/project.service.spec.ts index c4e24c70..997ab587 100644 --- a/apps/api/src/project/service/project.service.spec.ts +++ b/apps/api/src/project/service/project.service.spec.ts @@ -1,11 +1,11 @@ import { Test, TestingModule } from '@nestjs/testing' import { ProjectService } from './project.service' -import { MockMailService } from '../../mail/services/mock.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { PrismaService } from '../../prisma/prisma.service' +import { MockMailService } from '@/mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('ProjectService', () => { let service: ProjectService diff --git a/apps/api/src/project/service/project.service.ts b/apps/api/src/project/service/project.service.ts index edb985b3..1e8f227d 100644 --- a/apps/api/src/project/service/project.service.ts +++ b/apps/api/src/project/service/project.service.ts @@ -21,18 +21,18 @@ import { } from '@prisma/client' import { CreateProject } from '../dto/create.project/create.project' import { UpdateProject } from '../dto/update.project/update.project' -import { createKeyPair } from '../../common/create-key-pair' -import { excludeFields } from '../../common/exclude-fields' -import { PrismaService } from '../../prisma/prisma.service' -import { decrypt } from '../../common/decrypt' -import { encrypt } from '../../common/encrypt' +import { createKeyPair } from '@/common/create-key-pair' +import { excludeFields } from '@/common/exclude-fields' +import { PrismaService } from '@/prisma/prisma.service' +import { decrypt } from '@/common/decrypt' +import { encrypt } from '@/common/encrypt' import { v4 } from 'uuid' -import createEvent from '../../common/create-event' +import createEvent from '@/common/create-event' import { ProjectWithSecrets } from '../project.types' -import { AuthorityCheckerService } from '../../common/authority-checker.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' import { ForkProject } from '../dto/fork.project/fork.project' -import { paginate } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { paginate } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class ProjectService { diff --git a/apps/api/src/secret/controller/secret.controller.spec.ts b/apps/api/src/secret/controller/secret.controller.spec.ts index 946f3dc0..353b9114 100644 --- a/apps/api/src/secret/controller/secret.controller.spec.ts +++ b/apps/api/src/secret/controller/secret.controller.spec.ts @@ -1,15 +1,15 @@ import { Test, TestingModule } from '@nestjs/testing' import { SecretController } from './secret.controller' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { SecretService } from '../service/secret.service' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { REDIS_CLIENT } from '../../provider/redis.provider' +import { REDIS_CLIENT } from '@/provider/redis.provider' import { RedisClientType } from 'redis' -import { ProviderModule } from '../../provider/provider.module' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { ProviderModule } from '@/provider/provider.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('SecretController', () => { let controller: SecretController diff --git a/apps/api/src/secret/controller/secret.controller.ts b/apps/api/src/secret/controller/secret.controller.ts index 16274f11..eab0b86e 100644 --- a/apps/api/src/secret/controller/secret.controller.ts +++ b/apps/api/src/secret/controller/secret.controller.ts @@ -9,11 +9,11 @@ import { Query } from '@nestjs/common' import { SecretService } from '../service/secret.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { Authority, User } from '@prisma/client' import { CreateSecret } from '../dto/create.secret/create.secret' import { UpdateSecret } from '../dto/update.secret/update.secret' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' @Controller('secret') export class SecretController { diff --git a/apps/api/src/secret/secret.e2e.spec.ts b/apps/api/src/secret/secret.e2e.spec.ts index a59b6165..b9e71dfc 100644 --- a/apps/api/src/secret/secret.e2e.spec.ts +++ b/apps/api/src/secret/secret.e2e.spec.ts @@ -2,9 +2,9 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' -import { ProjectService } from '../project/service/project.service' -import { WorkspaceService } from '../workspace/service/workspace.service' +import { PrismaService } from '@/prisma/prisma.service' +import { ProjectService } from '@/project/service/project.service' +import { WorkspaceService } from '@/workspace/service/workspace.service' import { Environment, EventSeverity, @@ -19,24 +19,24 @@ import { Workspace } from '@prisma/client' import { Test } from '@nestjs/testing' -import { AppModule } from '../app/app.module' -import { EventModule } from '../event/event.module' -import { WorkspaceModule } from '../workspace/workspace.module' -import { ProjectModule } from '../project/project.module' -import { EnvironmentModule } from '../environment/environment.module' +import { AppModule } from '@/app/app.module' +import { EventModule } from '@/event/event.module' +import { WorkspaceModule } from '@/workspace/workspace.module' +import { ProjectModule } from '@/project/project.module' +import { EnvironmentModule } from '@/environment/environment.module' import { SecretModule } from './secret.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' -import { EnvironmentService } from '../environment/service/environment.service' -import fetchEvents from '../common/fetch-events' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { EnvironmentService } from '@/environment/service/environment.service' +import fetchEvents from '@/common/fetch-events' import { SecretService } from './service/secret.service' -import { EventService } from '../event/service/event.service' -import { REDIS_CLIENT } from '../provider/redis.provider' +import { EventService } from '@/event/service/event.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' import { RedisClientType } from 'redis' import { mockDeep } from 'jest-mock-extended' -import { UserService } from '../user/service/user.service' -import { UserModule } from '../user/user.module' -import { QueryTransformPipe } from '../common/query.transform.pipe' +import { UserService } from '@/user/service/user.service' +import { UserModule } from '@/user/user.module' +import { QueryTransformPipe } from '@/common/query.transform.pipe' describe('Secret Controller Tests', () => { let app: NestFastifyApplication diff --git a/apps/api/src/secret/service/secret.service.spec.ts b/apps/api/src/secret/service/secret.service.spec.ts index d076d93a..421ede60 100644 --- a/apps/api/src/secret/service/secret.service.spec.ts +++ b/apps/api/src/secret/service/secret.service.spec.ts @@ -1,14 +1,14 @@ import { Test, TestingModule } from '@nestjs/testing' import { SecretService } from './secret.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' -import { PrismaService } from '../../prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { REDIS_CLIENT } from '../../provider/redis.provider' +import { REDIS_CLIENT } from '@/provider/redis.provider' import { RedisClientType } from 'redis' -import { ProviderModule } from '../../provider/provider.module' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { ProviderModule } from '@/provider/provider.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('SecretService', () => { let service: SecretService diff --git a/apps/api/src/secret/service/secret.service.ts b/apps/api/src/secret/service/secret.service.ts index 3aa9215f..c5da4647 100644 --- a/apps/api/src/secret/service/secret.service.ts +++ b/apps/api/src/secret/service/secret.service.ts @@ -18,21 +18,21 @@ import { } from '@prisma/client' import { CreateSecret } from '../dto/create.secret/create.secret' import { UpdateSecret } from '../dto/update.secret/update.secret' -import { decrypt } from '../../common/decrypt' -import { PrismaService } from '../../prisma/prisma.service' -import { addHoursToDate } from '../../common/add-hours-to-date' -import { encrypt } from '../../common/encrypt' -import createEvent from '../../common/create-event' +import { decrypt } from '@/common/decrypt' +import { PrismaService } from '@/prisma/prisma.service' +import { addHoursToDate } from '@/common/add-hours-to-date' +import { encrypt } from '@/common/encrypt' +import createEvent from '@/common/create-event' import { RedisClientType } from 'redis' -import { REDIS_CLIENT } from '../../provider/redis.provider' -import { CHANGE_NOTIFIER_RSC } from '../../socket/change-notifier.socket' -import { AuthorityCheckerService } from '../../common/authority-checker.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' +import { CHANGE_NOTIFIER_RSC } from '@/socket/change-notifier.socket' +import { AuthorityCheckerService } from '@/common/authority-checker.service' import { ChangeNotification, ChangeNotificationEvent } from 'src/socket/socket.types' -import { paginate } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { paginate } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class SecretService { diff --git a/apps/api/src/socket/change-notifier.socket.ts b/apps/api/src/socket/change-notifier.socket.ts index f2086fee..54d98fb2 100644 --- a/apps/api/src/socket/change-notifier.socket.ts +++ b/apps/api/src/socket/change-notifier.socket.ts @@ -15,15 +15,15 @@ import { ChangeNotifierRegistration } from './socket.types' import { Authority, User } from '@prisma/client' -import { CurrentUser } from '../decorators/user.decorator' -import { PrismaService } from '../prisma/prisma.service' -import { REDIS_CLIENT } from '../provider/redis.provider' +import { CurrentUser } from '@/decorators/user.decorator' +import { PrismaService } from '@/prisma/prisma.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' import { RedisClientType } from 'redis' -import { ApiKeyGuard } from '../auth/guard/api-key/api-key.guard' -import { AuthGuard } from '../auth/guard/auth/auth.guard' -import { RequiredApiKeyAuthorities } from '../decorators/required-api-key-authorities.decorator' +import { ApiKeyGuard } from '@/auth/guard/api-key/api-key.guard' +import { AuthGuard } from '@/auth/guard/auth/auth.guard' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' import { Cron, CronExpression } from '@nestjs/schedule' -import { AuthorityCheckerService } from '../common/authority-checker.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' // The redis subscription channel for configuration updates export const CHANGE_NOTIFIER_RSC = 'configuration-updates' diff --git a/apps/api/src/socket/socket.module.ts b/apps/api/src/socket/socket.module.ts index dc58285b..5961d330 100644 --- a/apps/api/src/socket/socket.module.ts +++ b/apps/api/src/socket/socket.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common' import ChangeNotifier from './change-notifier.socket' -import { CommonModule } from '../common/common.module' +import { CommonModule } from '@/common/common.module' @Module({ imports: [CommonModule], diff --git a/apps/api/src/user/controller/user.controller.spec.ts b/apps/api/src/user/controller/user.controller.spec.ts index 0bf475a9..baa78132 100644 --- a/apps/api/src/user/controller/user.controller.spec.ts +++ b/apps/api/src/user/controller/user.controller.spec.ts @@ -1,10 +1,10 @@ import { Test, TestingModule } from '@nestjs/testing' import { UserController } from './user.controller' import { UserService } from '../service/user.service' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { mockDeep } from 'jest-mock-extended' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' describe('UserController', () => { let controller: UserController diff --git a/apps/api/src/user/controller/user.controller.ts b/apps/api/src/user/controller/user.controller.ts index cd9efe87..873bcd2e 100644 --- a/apps/api/src/user/controller/user.controller.ts +++ b/apps/api/src/user/controller/user.controller.ts @@ -11,10 +11,10 @@ import { UseGuards } from '@nestjs/common' import { UserService } from '../service/user.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { Authority, User } from '@prisma/client' import { UpdateUserDto } from '../dto/update.user/update.user' -import { AdminGuard } from '../../auth/guard/admin/admin.guard' +import { AdminGuard } from '@/auth/guard/admin/admin.guard' import { CreateUserDto } from '../dto/create.user/create.user' import { ApiBearerAuth, @@ -26,10 +26,10 @@ import { ApiSecurity, ApiTags } from '@nestjs/swagger' -import { BypassOnboarding } from '../../decorators/bypass-onboarding.decorator' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' -import { ForbidApiKey } from '../../decorators/forbid-api-key.decorator' -import { invalidAuthenticationResponse } from '../../common/static' +import { BypassOnboarding } from '@/decorators/bypass-onboarding.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' +import { ForbidApiKey } from '@/decorators/forbid-api-key.decorator' +import { invalidAuthenticationResponse } from '@/common/static' const userSchema = { type: 'object', diff --git a/apps/api/src/user/service/user.service.spec.ts b/apps/api/src/user/service/user.service.spec.ts index f437213e..dea0a0b7 100644 --- a/apps/api/src/user/service/user.service.spec.ts +++ b/apps/api/src/user/service/user.service.spec.ts @@ -1,8 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing' import { UserService } from './user.service' -import { PrismaService } from '../../prisma/prisma.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { PrismaService } from '@/prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' describe('UserService', () => { let service: UserService diff --git a/apps/api/src/user/service/user.service.ts b/apps/api/src/user/service/user.service.ts index 5e7cf60f..c4f8225b 100644 --- a/apps/api/src/user/service/user.service.ts +++ b/apps/api/src/user/service/user.service.ts @@ -7,16 +7,13 @@ import { } from '@nestjs/common' import { UpdateUserDto } from '../dto/update.user/update.user' import { AuthProvider, User } from '@prisma/client' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { CreateUserDto } from '../dto/create.user/create.user' -import { - IMailService, - MAIL_SERVICE -} from '../../mail/services/interface.service' -import createUser from '../../common/create-user' -import generateOtp from '../../common/generate-otp' -import { EnvSchema } from '../../common/env/env.schema' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { IMailService, MAIL_SERVICE } from '@/mail/services/interface.service' +import createUser from '@/common/create-user' +import generateOtp from '@/common/generate-otp' +import { EnvSchema } from '@/common/env/env.schema' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class UserService { diff --git a/apps/api/src/user/user.e2e.spec.ts b/apps/api/src/user/user.e2e.spec.ts index aef66a6d..5536211b 100644 --- a/apps/api/src/user/user.e2e.spec.ts +++ b/apps/api/src/user/user.e2e.spec.ts @@ -4,11 +4,11 @@ import { } from '@nestjs/platform-fastify' import { Test } from '@nestjs/testing' import { UserModule } from './user.module' -import { PrismaService } from '../prisma/prisma.service' -import { AppModule } from '../app/app.module' +import { PrismaService } from '@/prisma/prisma.service' +import { AppModule } from '@/app/app.module' import { AuthProvider, User } from '@prisma/client' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { UserService } from './service/user.service' describe('User Controller Tests', () => { diff --git a/apps/api/src/variable/controller/variable.controller.spec.ts b/apps/api/src/variable/controller/variable.controller.spec.ts index b6a634da..4abddf2d 100644 --- a/apps/api/src/variable/controller/variable.controller.spec.ts +++ b/apps/api/src/variable/controller/variable.controller.spec.ts @@ -1,15 +1,15 @@ import { Test, TestingModule } from '@nestjs/testing' import { VariableController } from './variable.controller' -import { PrismaService } from '../../prisma/prisma.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { PrismaService } from '@/prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { VariableService } from '../service/variable.service' -import { REDIS_CLIENT } from '../../provider/redis.provider' +import { REDIS_CLIENT } from '@/provider/redis.provider' import { RedisClientType } from 'redis' import { mockDeep } from 'jest-mock-extended' -import { ProviderModule } from '../../provider/provider.module' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { ProviderModule } from '@/provider/provider.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('VariableController', () => { let controller: VariableController diff --git a/apps/api/src/variable/controller/variable.controller.ts b/apps/api/src/variable/controller/variable.controller.ts index a890813a..31560935 100644 --- a/apps/api/src/variable/controller/variable.controller.ts +++ b/apps/api/src/variable/controller/variable.controller.ts @@ -9,9 +9,9 @@ import { Query } from '@nestjs/common' import { VariableService } from '../service/variable.service' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' import { Authority, User } from '@prisma/client' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { CreateVariable } from '../dto/create.variable/create.variable' import { UpdateVariable } from '../dto/update.variable/update.variable' diff --git a/apps/api/src/variable/service/variable.service.spec.ts b/apps/api/src/variable/service/variable.service.spec.ts index 4a97e2a3..3efd6efd 100644 --- a/apps/api/src/variable/service/variable.service.spec.ts +++ b/apps/api/src/variable/service/variable.service.spec.ts @@ -1,14 +1,14 @@ import { Test, TestingModule } from '@nestjs/testing' import { VariableService } from './variable.service' -import { PrismaService } from '../../prisma/prisma.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' -import { REDIS_CLIENT } from '../../provider/redis.provider' +import { PrismaService } from '@/prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' import { RedisClientType } from 'redis' import { mockDeep } from 'jest-mock-extended' -import { ProviderModule } from '../../provider/provider.module' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { ProviderModule } from '@/provider/provider.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('VariableService', () => { let service: VariableService diff --git a/apps/api/src/variable/service/variable.service.ts b/apps/api/src/variable/service/variable.service.ts index 4cf879f5..e50fbf37 100644 --- a/apps/api/src/variable/service/variable.service.ts +++ b/apps/api/src/variable/service/variable.service.ts @@ -6,7 +6,7 @@ import { Logger, NotFoundException } from '@nestjs/common' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Authority, Environment, @@ -18,18 +18,18 @@ import { VariableVersion } from '@prisma/client' import { CreateVariable } from '../dto/create.variable/create.variable' -import createEvent from '../../common/create-event' +import createEvent from '@/common/create-event' import { UpdateVariable } from '../dto/update.variable/update.variable' import { RedisClientType } from 'redis' -import { REDIS_CLIENT } from '../../provider/redis.provider' -import { CHANGE_NOTIFIER_RSC } from '../../socket/change-notifier.socket' -import { AuthorityCheckerService } from '../../common/authority-checker.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' +import { CHANGE_NOTIFIER_RSC } from '@/socket/change-notifier.socket' +import { AuthorityCheckerService } from '@/common/authority-checker.service' import { ChangeNotification, ChangeNotificationEvent } from 'src/socket/socket.types' -import { paginate } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { paginate } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class VariableService { diff --git a/apps/api/src/variable/variable.e2e.spec.ts b/apps/api/src/variable/variable.e2e.spec.ts index 9fe13ebe..1285e09b 100644 --- a/apps/api/src/variable/variable.e2e.spec.ts +++ b/apps/api/src/variable/variable.e2e.spec.ts @@ -2,9 +2,9 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' -import { ProjectService } from '../project/service/project.service' -import { WorkspaceService } from '../workspace/service/workspace.service' +import { PrismaService } from '@/prisma/prisma.service' +import { ProjectService } from '@/project/service/project.service' +import { WorkspaceService } from '@/workspace/service/workspace.service' import { Environment, EventSeverity, @@ -19,24 +19,24 @@ import { ProjectAccessLevel } from '@prisma/client' import { Test } from '@nestjs/testing' -import { AppModule } from '../app/app.module' -import { EventModule } from '../event/event.module' -import { WorkspaceModule } from '../workspace/workspace.module' -import { ProjectModule } from '../project/project.module' -import { EnvironmentModule } from '../environment/environment.module' +import { AppModule } from '@/app/app.module' +import { EventModule } from '@/event/event.module' +import { WorkspaceModule } from '@/workspace/workspace.module' +import { ProjectModule } from '@/project/project.module' +import { EnvironmentModule } from '@/environment/environment.module' import { VariableModule } from './variable.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' -import { EnvironmentService } from '../environment/service/environment.service' -import fetchEvents from '../common/fetch-events' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { EnvironmentService } from '@/environment/service/environment.service' +import fetchEvents from '@/common/fetch-events' import { VariableService } from './service/variable.service' -import { EventService } from '../event/service/event.service' -import { REDIS_CLIENT } from '../provider/redis.provider' +import { EventService } from '@/event/service/event.service' +import { REDIS_CLIENT } from '@/provider/redis.provider' import { mockDeep } from 'jest-mock-extended' import { RedisClientType } from 'redis' -import { UserService } from '../user/service/user.service' -import { UserModule } from '../user/user.module' -import { QueryTransformPipe } from '../common/query.transform.pipe' +import { UserService } from '@/user/service/user.service' +import { UserModule } from '@/user/user.module' +import { QueryTransformPipe } from '@/common/query.transform.pipe' describe('Variable Controller Tests', () => { let app: NestFastifyApplication diff --git a/apps/api/src/workspace-role/controller/workspace-role.controller.spec.ts b/apps/api/src/workspace-role/controller/workspace-role.controller.spec.ts index 290fb847..2b3ce240 100644 --- a/apps/api/src/workspace-role/controller/workspace-role.controller.spec.ts +++ b/apps/api/src/workspace-role/controller/workspace-role.controller.spec.ts @@ -1,11 +1,11 @@ import { Test, TestingModule } from '@nestjs/testing' import { WorkspaceRoleController } from './workspace-role.controller' -import { MockMailService } from '../../mail/services/mock.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { PrismaService } from '../../prisma/prisma.service' +import { MockMailService } from '@/mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { PrismaService } from '@/prisma/prisma.service' import { WorkspaceRoleService } from '../service/workspace-role.service' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('WorkspaceRoleController', () => { let controller: WorkspaceRoleController diff --git a/apps/api/src/workspace-role/controller/workspace-role.controller.ts b/apps/api/src/workspace-role/controller/workspace-role.controller.ts index 556fe5fe..20ccc5f0 100644 --- a/apps/api/src/workspace-role/controller/workspace-role.controller.ts +++ b/apps/api/src/workspace-role/controller/workspace-role.controller.ts @@ -9,11 +9,11 @@ import { Query } from '@nestjs/common' import { WorkspaceRoleService } from '../service/workspace-role.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { Authority, User, Workspace, WorkspaceRole } from '@prisma/client' import { CreateWorkspaceRole } from '../dto/create-workspace-role/create-workspace-role' import { UpdateWorkspaceRole } from '../dto/update-workspace-role/update-workspace-role' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' @Controller('workspace-role') export class WorkspaceRoleController { diff --git a/apps/api/src/workspace-role/service/workspace-role.service.spec.ts b/apps/api/src/workspace-role/service/workspace-role.service.spec.ts index 40ddc523..4ff5ce73 100644 --- a/apps/api/src/workspace-role/service/workspace-role.service.spec.ts +++ b/apps/api/src/workspace-role/service/workspace-role.service.spec.ts @@ -1,10 +1,10 @@ import { Test, TestingModule } from '@nestjs/testing' import { WorkspaceRoleService } from './workspace-role.service' -import { PrismaService } from '../../prisma/prisma.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { PrismaService } from '@/prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('WorkspaceRoleService', () => { let service: WorkspaceRoleService diff --git a/apps/api/src/workspace-role/service/workspace-role.service.ts b/apps/api/src/workspace-role/service/workspace-role.service.ts index e564af52..020729f7 100644 --- a/apps/api/src/workspace-role/service/workspace-role.service.ts +++ b/apps/api/src/workspace-role/service/workspace-role.service.ts @@ -15,15 +15,15 @@ import { WorkspaceRole } from '@prisma/client' import { CreateWorkspaceRole } from '../dto/create-workspace-role/create-workspace-role' -import getCollectiveWorkspaceAuthorities from '../../common/get-collective-workspace-authorities' +import getCollectiveWorkspaceAuthorities from '@/common/get-collective-workspace-authorities' import { UpdateWorkspaceRole } from '../dto/update-workspace-role/update-workspace-role' -import { PrismaService } from '../../prisma/prisma.service' -import createEvent from '../../common/create-event' +import { PrismaService } from '@/prisma/prisma.service' +import createEvent from '@/common/create-event' import { WorkspaceRoleWithProjects } from '../workspace-role.types' import { v4 } from 'uuid' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { paginate, PaginatedMetadata } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { paginate, PaginatedMetadata } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class WorkspaceRoleService { diff --git a/apps/api/src/workspace-role/workspace-role.e2e.spec.ts b/apps/api/src/workspace-role/workspace-role.e2e.spec.ts index c110cbf8..f779c6fe 100644 --- a/apps/api/src/workspace-role/workspace-role.e2e.spec.ts +++ b/apps/api/src/workspace-role/workspace-role.e2e.spec.ts @@ -2,7 +2,7 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Authority, EventSeverity, @@ -14,19 +14,19 @@ import { Workspace, WorkspaceRole } from '@prisma/client' -import { AppModule } from '../app/app.module' +import { AppModule } from '@/app/app.module' import { WorkspaceRoleModule } from './workspace-role.module' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { Test } from '@nestjs/testing' import { v4 } from 'uuid' -import fetchEvents from '../common/fetch-events' -import { EventService } from '../event/service/event.service' -import { EventModule } from '../event/event.module' +import fetchEvents from '@/common/fetch-events' +import { EventService } from '@/event/service/event.service' +import { EventModule } from '@/event/event.module' import { WorkspaceRoleService } from './service/workspace-role.service' -import { UserService } from '../user/service/user.service' -import { UserModule } from '../user/user.module' -import { QueryTransformPipe } from '../common/query.transform.pipe' +import { UserService } from '@/user/service/user.service' +import { UserModule } from '@/user/user.module' +import { QueryTransformPipe } from '@/common/query.transform.pipe' describe('Workspace Role Controller Tests', () => { let app: NestFastifyApplication diff --git a/apps/api/src/workspace/controller/workspace.controller.spec.ts b/apps/api/src/workspace/controller/workspace.controller.spec.ts index 22f664f9..7310830f 100644 --- a/apps/api/src/workspace/controller/workspace.controller.spec.ts +++ b/apps/api/src/workspace/controller/workspace.controller.spec.ts @@ -1,12 +1,12 @@ import { Test, TestingModule } from '@nestjs/testing' import { WorkspaceController } from './workspace.controller' import { WorkspaceService } from '../service/workspace.service' -import { PrismaService } from '../../prisma/prisma.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { PrismaService } from '@/prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { JwtService } from '@nestjs/jwt' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('WorkspaceController', () => { let controller: WorkspaceController diff --git a/apps/api/src/workspace/controller/workspace.controller.ts b/apps/api/src/workspace/controller/workspace.controller.ts index 7768ce3f..f948282c 100644 --- a/apps/api/src/workspace/controller/workspace.controller.ts +++ b/apps/api/src/workspace/controller/workspace.controller.ts @@ -9,14 +9,14 @@ import { Query } from '@nestjs/common' import { WorkspaceService } from '../service/workspace.service' -import { CurrentUser } from '../../decorators/user.decorator' +import { CurrentUser } from '@/decorators/user.decorator' import { Authority, User, Workspace, WorkspaceRole } from '@prisma/client' import { CreateWorkspace, WorkspaceMemberDTO } from '../dto/create.workspace/create.workspace' import { UpdateWorkspace } from '../dto/update.workspace/update.workspace' -import { RequiredApiKeyAuthorities } from '../../decorators/required-api-key-authorities.decorator' +import { RequiredApiKeyAuthorities } from '@/decorators/required-api-key-authorities.decorator' @Controller('workspace') export class WorkspaceController { diff --git a/apps/api/src/workspace/service/workspace.service.spec.ts b/apps/api/src/workspace/service/workspace.service.spec.ts index 8f8412c0..84ffad6e 100644 --- a/apps/api/src/workspace/service/workspace.service.spec.ts +++ b/apps/api/src/workspace/service/workspace.service.spec.ts @@ -1,11 +1,11 @@ import { Test, TestingModule } from '@nestjs/testing' import { WorkspaceService } from './workspace.service' -import { PrismaService } from '../../prisma/prisma.service' -import { MAIL_SERVICE } from '../../mail/services/interface.service' -import { MockMailService } from '../../mail/services/mock.service' +import { PrismaService } from '@/prisma/prisma.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { JwtService } from '@nestjs/jwt' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import { CommonModule } from '../../common/common.module' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import { CommonModule } from '@/common/common.module' describe('WorkspaceService', () => { let service: WorkspaceService diff --git a/apps/api/src/workspace/service/workspace.service.ts b/apps/api/src/workspace/service/workspace.service.ts index d157d3b5..21a532bd 100644 --- a/apps/api/src/workspace/service/workspace.service.ts +++ b/apps/api/src/workspace/service/workspace.service.ts @@ -7,7 +7,7 @@ import { Logger, NotFoundException } from '@nestjs/common' -import { PrismaService } from '../../prisma/prisma.service' +import { PrismaService } from '@/prisma/prisma.service' import { Authority, Environment, @@ -26,19 +26,16 @@ import { CreateWorkspace, WorkspaceMemberDTO } from '../dto/create.workspace/create.workspace' -import { - IMailService, - MAIL_SERVICE -} from '../../mail/services/interface.service' +import { IMailService, MAIL_SERVICE } from '@/mail/services/interface.service' import { JwtService } from '@nestjs/jwt' import { UpdateWorkspace } from '../dto/update.workspace/update.workspace' import { v4 } from 'uuid' -import createEvent from '../../common/create-event' -import createWorkspace from '../../common/create-workspace' -import { AuthorityCheckerService } from '../../common/authority-checker.service' -import getCollectiveProjectAuthorities from '../../common/get-collective-project-authorities' -import { paginate } from '../../common/paginate' -import { limitMaxItemsPerPage } from '../../common/limit-max-items-per-page' +import createEvent from '@/common/create-event' +import createWorkspace from '@/common/create-workspace' +import { AuthorityCheckerService } from '@/common/authority-checker.service' +import getCollectiveProjectAuthorities from '@/common/get-collective-project-authorities' +import { paginate } from '@/common/paginate' +import { limitMaxItemsPerPage } from '@/common/limit-max-items-per-page' @Injectable() export class WorkspaceService { diff --git a/apps/api/src/workspace/workspace.e2e.spec.ts b/apps/api/src/workspace/workspace.e2e.spec.ts index 95b4b9ee..9df01949 100644 --- a/apps/api/src/workspace/workspace.e2e.spec.ts +++ b/apps/api/src/workspace/workspace.e2e.spec.ts @@ -2,12 +2,12 @@ import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify' -import { PrismaService } from '../prisma/prisma.service' -import { AppModule } from '../app/app.module' +import { PrismaService } from '@/prisma/prisma.service' +import { AppModule } from '@/app/app.module' import { WorkspaceModule } from './workspace.module' import { Test } from '@nestjs/testing' -import { MAIL_SERVICE } from '../mail/services/interface.service' -import { MockMailService } from '../mail/services/mock.service' +import { MAIL_SERVICE } from '@/mail/services/interface.service' +import { MockMailService } from '@/mail/services/mock.service' import { Authority, EventSeverity, @@ -19,23 +19,23 @@ import { Workspace, WorkspaceRole } from '@prisma/client' -import fetchEvents from '../common/fetch-events' -import { EventService } from '../event/service/event.service' -import { EventModule } from '../event/event.module' -import { UserModule } from '../user/user.module' -import { UserService } from '../user/service/user.service' +import fetchEvents from '@/common/fetch-events' +import { EventService } from '@/event/service/event.service' +import { EventModule } from '@/event/event.module' +import { UserModule } from '@/user/user.module' +import { UserService } from '@/user/service/user.service' import { WorkspaceService } from './service/workspace.service' -import { QueryTransformPipe } from '../common/query.transform.pipe' -import { ProjectModule } from '../project/project.module' -import { EnvironmentModule } from '../environment/environment.module' -import { SecretModule } from '../secret/secret.module' -import { VariableModule } from '../variable/variable.module' -import { ProjectService } from '../project/service/project.service' -import { EnvironmentService } from '../environment/service/environment.service' -import { SecretService } from '../secret/service/secret.service' -import { VariableService } from '../variable/service/variable.service' -import { WorkspaceRoleService } from '../workspace-role/service/workspace-role.service' -import { WorkspaceRoleModule } from '../workspace-role/workspace-role.module' +import { QueryTransformPipe } from '@/common/query.transform.pipe' +import { ProjectModule } from '@/project/project.module' +import { EnvironmentModule } from '@/environment/environment.module' +import { SecretModule } from '@/secret/secret.module' +import { VariableModule } from '@/variable/variable.module' +import { ProjectService } from '@/project/service/project.service' +import { EnvironmentService } from '@/environment/service/environment.service' +import { SecretService } from '@/secret/service/secret.service' +import { VariableService } from '@/variable/service/variable.service' +import { WorkspaceRoleService } from '@/workspace-role/service/workspace-role.service' +import { WorkspaceRoleModule } from '@/workspace-role/workspace-role.module' const createMembership = async ( roleId: string, diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index a572b789..765b79d4 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -9,7 +9,7 @@ "target": "ES2022", "sourceMap": true, "outDir": "./dist", - "baseUrl": "./", + "baseUrl": ".", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, @@ -17,6 +17,9 @@ "strictBindCallApply": false, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, - "moduleResolution": "NodeNext" + "moduleResolution": "NodeNext", + "paths": { + "@/*": ["./src/*"] + } } }