-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from mapeveri/chore/refactor-consumer
Refactor folders
- Loading branch information
Showing
44 changed files
with
144 additions
and
131 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import LoginPostController from '@src/languages/infrastructure/api/v1/controllers/auth/loginPostController'; | ||
import RefreshTokenPostController from '@src/languages/infrastructure/api/v1/controllers/auth/refreshTokenPostController'; | ||
import MeGetController from '@src/languages/infrastructure/api/v1/controllers/auth/meGetController'; | ||
import SearchTermsGetController from '@src/languages/infrastructure/api/v1/controllers/terms/searchTermsGetController'; | ||
import FindSuggestionsTermController from '@src/languages/infrastructure/api/v1/controllers/terms/findSuggestionsTermController'; | ||
import WordPostController from '@src/languages/infrastructure/api/v1/controllers/words/wordPostController'; | ||
import ExpressionPostController from '@src/languages/infrastructure/api/v1/controllers/expressions/expressionPostController'; | ||
import CountriesGetController from '@src/languages/infrastructure/api/v1/controllers/countries/countriesGetController'; | ||
import CountryGetController from '@src/languages/infrastructure/api/v1/controllers/countries/countryGetController'; | ||
import CountryPostController from '@src/languages/infrastructure/api/v1/controllers/countries/countryPostController'; | ||
import UserPutController from '@src/languages/infrastructure/api/v1/controllers/user/userPutController'; | ||
|
||
export const controllers = [ | ||
LoginPostController, | ||
RefreshTokenPostController, | ||
MeGetController, | ||
SearchTermsGetController, | ||
FindSuggestionsTermController, | ||
WordPostController, | ||
ExpressionPostController, | ||
CountriesGetController, | ||
CountryGetController, | ||
CountryPostController, | ||
UserPutController, | ||
]; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions
12
src/api/dependencyInjection/repositories.ts → ...ages/_dependencyInjection/repositories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { controllers } from '../api/dependencyInjection/controllers'; | ||
import { services } from '../api/dependencyInjection/services'; | ||
import { repositories } from '../api/dependencyInjection/repositories'; | ||
import { commands } from '../api/dependencyInjection/commandHandlers'; | ||
import { queries } from '../api/dependencyInjection/queryHandlers'; | ||
import { events } from '../api/dependencyInjection/eventHandlers'; | ||
import { projections } from '@src/api/dependencyInjection/projectionHandlers'; | ||
import { readLayers } from '@src/api/dependencyInjection/readLayers'; | ||
import { controllers } from '@src/languages/_dependencyInjection/controllers'; | ||
import { services } from '@src/shared/_dependencyInjection/services'; | ||
import { repositories } from '@src/languages/_dependencyInjection/repositories'; | ||
import { commands } from '@src/languages/_dependencyInjection/commandHandlers'; | ||
import { queries } from '@src/languages/_dependencyInjection/queryHandlers'; | ||
import { events } from '@src/languages/_dependencyInjection/eventHandlers'; | ||
import { projections } from '@src/languages/_dependencyInjection/projectionHandlers'; | ||
import { readLayers } from '@src/languages/_dependencyInjection/readLayers'; | ||
|
||
@Module({ | ||
imports: [], | ||
controllers, | ||
controllers: [...controllers], | ||
providers: [...services, ...commands, ...queries, ...events, ...projections, ...repositories, ...readLayers], | ||
}) | ||
export class LanguageModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { DomainEventsConsumerController } from '@src/shared/infrastructure/api/consumers/domainEvents/domainEventsConsumerController'; | ||
|
||
export const consumers = [DomainEventsConsumerController]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { NotificationsSseController } from '@src/shared/infrastructure/api/sse/notificationsSseController'; | ||
|
||
export const controllers = [NotificationsSseController]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { SOCIAL_AUTHENTICATOR } from '@src/languages/domain/auth/socialAuthenticator'; | ||
import { SseService } from '@src/shared/infrastructure/api/sse/sseService'; | ||
import { UnhandledExceptionsBusService } from '@src/shared/infrastructure/api/sse/unhandledExceptionsBusService'; | ||
import GoogleSocialAuthenticator from '@src/languages/infrastructure/oauth/googleSocialAuthenticator'; | ||
import { NestJwtAuthGuard } from '@src/shared/infrastructure/api/guards/nestJwtAuthGuard'; | ||
import { JwtStrategy } from '@src/shared/infrastructure/auth/strategies/jwtStrategy'; | ||
import { APP_FILTER } from '@nestjs/core'; | ||
import { NestErrorFilter } from '@src/shared/infrastructure/api/filters/nestErrorFilter'; | ||
import { LOGGER_INTERFACE } from '@src/shared/domain/loggerInterface'; | ||
import NestLogger from '@src/shared/infrastructure/logger/nestLogger'; | ||
import { COMMAND_BUS } from '@src/shared/domain/buses/commandBus/commandBus'; | ||
import NestCommandBus from '@src/shared/infrastructure/bus/nestCommandBus'; | ||
import { ASYNC_EVENT_BUS, EVENT_BUS } from '@src/shared/domain/buses/eventBus/eventBus'; | ||
import NestEventBus from '@src/shared/infrastructure/bus/nestEventBus'; | ||
import { RabbitMqEventBus } from '@src/shared/infrastructure/bus/rabbitMq/rabbitMqEventBus'; | ||
import { QUERY_BUS } from '@src/shared/domain/buses/queryBus/queryBus'; | ||
import NestQueryBusBus from '@src/shared/infrastructure/bus/nestQueryBus'; | ||
import { PROJECTION_BUS } from '@src/shared/domain/buses/projectionBus/projectionBus'; | ||
import NestProjectionBus from '@src/shared/infrastructure/bus/nestProjectionBus'; | ||
import { EVENT_STORE_REPOSITORY } from '@src/shared/domain/eventStore/eventStoreRepository'; | ||
import MongoEventStoreRepository from '@src/shared/infrastructure/persistence/mongo/repositories/mongoEventStoreRepository'; | ||
import { PersistDomainEventsSuscriber } from '@src/shared/infrastructure/subscribers/persistDomainEventsSuscriber'; | ||
|
||
export const services = [ | ||
SseService, | ||
UnhandledExceptionsBusService, | ||
NestJwtAuthGuard, | ||
JwtStrategy, | ||
{ | ||
provide: APP_FILTER, | ||
useClass: NestErrorFilter, | ||
}, | ||
{ | ||
provide: LOGGER_INTERFACE, | ||
useClass: NestLogger, | ||
}, | ||
{ | ||
provide: COMMAND_BUS, | ||
useClass: NestCommandBus, | ||
}, | ||
{ | ||
provide: EVENT_BUS, | ||
useClass: NestEventBus, | ||
}, | ||
{ | ||
provide: ASYNC_EVENT_BUS, | ||
useClass: RabbitMqEventBus, | ||
}, | ||
{ | ||
provide: QUERY_BUS, | ||
useClass: NestQueryBusBus, | ||
}, | ||
{ | ||
provide: PROJECTION_BUS, | ||
useClass: NestProjectionBus, | ||
}, | ||
{ | ||
provide: EVENT_STORE_REPOSITORY, | ||
useClass: MongoEventStoreRepository, | ||
}, | ||
PersistDomainEventsSuscriber, | ||
{ | ||
provide: SOCIAL_AUTHENTICATOR, | ||
useClass: GoogleSocialAuthenticator, | ||
}, | ||
]; |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/api/filters/errorFilter.ts → ...astructure/api/filters/nestErrorFilter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.