From 6bdeb98c5ad58799ebcd9da17f44233d0e137ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Peveri?= Date: Sun, 19 Jan 2025 14:35:03 +0100 Subject: [PATCH] Rename class to follow convention --- src/account/app/controllers/v1/auth/loginPostController.ts | 2 +- src/account/app/controllers/v1/auth/signupPostController.ts | 2 +- .../application/term/command/addLikeTermCommandHandler.ts | 2 +- .../application/term/command/dislikeTermCommandHandler.ts | 2 +- src/shared/_dependencyInjection/services.ts | 4 ++-- .../services/{IdentityProvider.ts => identityProvider.ts} | 0 .../{UuidIdentityProvider.ts => uuidIdentityProvider.ts} | 2 +- src/shared/shared.module.ts | 2 +- test/unit/shared/domain/services/IdentityProviderMock.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename src/shared/domain/services/{IdentityProvider.ts => identityProvider.ts} (100%) rename src/shared/infrastructure/services/{UuidIdentityProvider.ts => uuidIdentityProvider.ts} (80%) diff --git a/src/account/app/controllers/v1/auth/loginPostController.ts b/src/account/app/controllers/v1/auth/loginPostController.ts index e7f5b9a..c2c4a85 100644 --- a/src/account/app/controllers/v1/auth/loginPostController.ts +++ b/src/account/app/controllers/v1/auth/loginPostController.ts @@ -4,7 +4,7 @@ import LoginPostDto from './loginPostDto'; import LoginPostResponseDto from './loginPostResponseDto'; import { ApiBadRequestResponse, ApiInternalServerErrorResponse, ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { QUERY_BUS, QueryBus } from '@src/shared/domain/bus/queryBus/queryBus'; -import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/IdentityProvider'; +import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/identityProvider'; @ApiTags('Auth') @Controller() diff --git a/src/account/app/controllers/v1/auth/signupPostController.ts b/src/account/app/controllers/v1/auth/signupPostController.ts index 85389ad..966887c 100644 --- a/src/account/app/controllers/v1/auth/signupPostController.ts +++ b/src/account/app/controllers/v1/auth/signupPostController.ts @@ -3,7 +3,7 @@ import { ApiBadRequestResponse, ApiInternalServerErrorResponse, ApiTags } from ' import SignupPostDto from '@src/account/app/controllers/v1/auth/signupPostDto'; import { COMMAND_BUS, CommandBus } from '@src/shared/domain/bus/commandBus/commandBus'; import SignUpUserCommand from '@src/account/application/auth/command/signUpUserCommand'; -import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/IdentityProvider'; +import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/identityProvider'; @ApiTags('Auth') @Controller() diff --git a/src/languages/application/term/command/addLikeTermCommandHandler.ts b/src/languages/application/term/command/addLikeTermCommandHandler.ts index c2d95ee..6faaf88 100644 --- a/src/languages/application/term/command/addLikeTermCommandHandler.ts +++ b/src/languages/application/term/command/addLikeTermCommandHandler.ts @@ -12,7 +12,7 @@ import CollaboratorRepository, { import CollaboratorId from '@src/languages/domain/collaborator/collaboratorId'; import Collaborator from '@src/languages/domain/collaborator/collaborator'; import CollaboratorDoesNotExistsException from '@src/languages/domain/collaborator/collaboratorDoesNotExistsException'; -import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/IdentityProvider'; +import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/identityProvider'; @CommandHandler(AddLikeTermCommand) export default class AddLikeTermCommandHandler implements ICommandHandler { diff --git a/src/languages/application/term/command/dislikeTermCommandHandler.ts b/src/languages/application/term/command/dislikeTermCommandHandler.ts index 762a908..b02c3f2 100644 --- a/src/languages/application/term/command/dislikeTermCommandHandler.ts +++ b/src/languages/application/term/command/dislikeTermCommandHandler.ts @@ -12,7 +12,7 @@ import CollaboratorRepository, { import Collaborator from '@src/languages/domain/collaborator/collaborator'; import CollaboratorId from '@src/languages/domain/collaborator/collaboratorId'; import CollaboratorDoesNotExistsException from '@src/languages/domain/collaborator/collaboratorDoesNotExistsException'; -import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/IdentityProvider'; +import { IDENTITY_PROVIDER, IdentityProvider } from '@src/shared/domain/services/identityProvider'; @CommandHandler(DislikeTermCommand) export default class DislikeTermCommandHandler implements ICommandHandler { diff --git a/src/shared/_dependencyInjection/services.ts b/src/shared/_dependencyInjection/services.ts index ee8d275..6358463 100644 --- a/src/shared/_dependencyInjection/services.ts +++ b/src/shared/_dependencyInjection/services.ts @@ -17,8 +17,8 @@ import MongoConnection, { MONGO_CLIENT } from '@src/shared/infrastructure/persis import MikroOrmTransactionalDecorator from '../infrastructure/persistence/mikroOrm/decorators/mikroOrmTransactionalDecorator'; import NestJwtTokenGenerator from '@src/shared/infrastructure/auth/jwt/nestJwtTokenGenerator'; import NestJwtM2mTokenGenerator from '@src/shared/infrastructure/auth/jwt/nestJwtM2mTokenGenerator'; -import { UuidIdentityProvider } from '@src/shared/infrastructure/services/UuidIdentityProvider'; -import { IDENTITY_PROVIDER } from '@src/shared/domain/services/IdentityProvider'; +import { UuidIdentityProvider } from '@src/shared/infrastructure/services/uuidIdentityProvider'; +import { IDENTITY_PROVIDER } from '@src/shared/domain/services/identityProvider'; export const services = [ MikroOrmTransactionalDecorator, diff --git a/src/shared/domain/services/IdentityProvider.ts b/src/shared/domain/services/identityProvider.ts similarity index 100% rename from src/shared/domain/services/IdentityProvider.ts rename to src/shared/domain/services/identityProvider.ts diff --git a/src/shared/infrastructure/services/UuidIdentityProvider.ts b/src/shared/infrastructure/services/uuidIdentityProvider.ts similarity index 80% rename from src/shared/infrastructure/services/UuidIdentityProvider.ts rename to src/shared/infrastructure/services/uuidIdentityProvider.ts index d92fef5..db3445e 100644 --- a/src/shared/infrastructure/services/UuidIdentityProvider.ts +++ b/src/shared/infrastructure/services/uuidIdentityProvider.ts @@ -1,4 +1,4 @@ -import { IdentityProvider } from '@src/shared/domain/services/IdentityProvider'; +import { IdentityProvider } from '@src/shared/domain/services/identityProvider'; import { v4 as uuidv4, v5 as uuidv5 } from 'uuid'; export class UuidIdentityProvider implements IdentityProvider { diff --git a/src/shared/shared.module.ts b/src/shared/shared.module.ts index 077a81b..ade44ea 100644 --- a/src/shared/shared.module.ts +++ b/src/shared/shared.module.ts @@ -17,7 +17,7 @@ import { ConfigModule } from '@nestjs/config'; import { Inject } from '@src/shared/domain/injector/inject.decorator'; import NestJwtTokenGenerator from '@src/shared/infrastructure/auth/jwt/nestJwtTokenGenerator'; import NestJwtM2mTokenGenerator from '@src/shared/infrastructure/auth/jwt/nestJwtM2mTokenGenerator'; -import { IDENTITY_PROVIDER } from '@src/shared/domain/services/IdentityProvider'; +import { IDENTITY_PROVIDER } from '@src/shared/domain/services/identityProvider'; @Global() @Module({ diff --git a/test/unit/shared/domain/services/IdentityProviderMock.ts b/test/unit/shared/domain/services/IdentityProviderMock.ts index e5200d1..2ada028 100644 --- a/test/unit/shared/domain/services/IdentityProviderMock.ts +++ b/test/unit/shared/domain/services/IdentityProviderMock.ts @@ -1,4 +1,4 @@ -import { IdentityProvider } from '@src/shared/domain/services/IdentityProvider'; +import { IdentityProvider } from '@src/shared/domain/services/identityProvider'; export class IdentityProviderMock implements IdentityProvider { private value: string;