Merge branch 'refactorApplicationCore' into 'main'

refactor application core

See merge request v3/service/ad!11
This commit is contained in:
Sylvain Briat 2023-06-29 14:52:34 +00:00
commit 62244b6eb1
60 changed files with 81 additions and 81 deletions

View File

@ -1,24 +1,24 @@
import { Mapper } from '@libs/ddd';
import { AdResponseDto } from './interface/dtos/ad.response.dto';
import { Inject, Injectable } from '@nestjs/common';
import { AdEntity } from './core/ad.entity';
import { AdEntity } from './core/domain/ad.entity';
import {
AdWriteModel,
AdReadModel,
WaypointModel,
} from './infrastructure/ad.repository';
import { Frequency } from './core/ad.types';
import { WaypointProps } from './core/value-objects/waypoint.value-object';
import { Frequency } from './core/domain/ad.types';
import { WaypointProps } from './core/domain/value-objects/waypoint.value-object';
import { v4 } from 'uuid';
import {
PARAMS_PROVIDER,
TIMEZONE_FINDER,
TIME_CONVERTER,
} from './ad.di-tokens';
import { TimezoneFinderPort } from './core/ports/timezone-finder.port';
import { DefaultParamsProviderPort } from './core/ports/default-params-provider.port';
import { DefaultParams } from './core/ports/default-params.type';
import { TimeConverterPort } from './core/ports/time-converter.port';
import { TimezoneFinderPort } from './core/application/ports/timezone-finder.port';
import { DefaultParamsProviderPort } from './core/application/ports/default-params-provider.port';
import { DefaultParams } from './core/application/ports/default-params.type';
import { TimeConverterPort } from './core/application/ports/time-converter.port';
/**
* Mapper constructs objects that are used in different layers:

View File

@ -16,14 +16,14 @@ import { AdRepository } from './infrastructure/ad.repository';
import { DefaultParamsProvider } from './infrastructure/default-params-provider';
import { MessagePublisher } from './infrastructure/message-publisher';
import { AdMapper } from './ad.mapper';
import { CreateAdService } from './core/commands/create-ad/create-ad.service';
import { CreateAdService } from './core/application/commands/create-ad/create-ad.service';
import { TimezoneFinder } from './infrastructure/timezone-finder';
import { PrismaService } from '@libs/db/prisma.service';
import { TimeConverter } from './infrastructure/time-converter';
import { FindAdByIdGrpcController } from './interface/grpc-controllers/find-ad-by-id.grpc.controller';
import { FindAdByIdQueryHandler } from './core/queries/find-ad-by-id/find-ad-by-id.query-handler';
import { PublishMessageWhenAdIsCreatedDomainEventHandler } from './core/event-handlers/publish-message-when-ad-is-created.domain-event-handler';
import { PublishLogMessageWhenAdIsCreatedDomainEventHandler } from './core/event-handlers/publish-log-message-when-ad-is-created.domain-event-handler';
import { FindAdByIdQueryHandler } from './core/application/queries/find-ad-by-id/find-ad-by-id.query-handler';
import { PublishMessageWhenAdIsCreatedDomainEventHandler } from './core/application/event-handlers/publish-message-when-ad-is-created.domain-event-handler';
import { PublishLogMessageWhenAdIsCreatedDomainEventHandler } from './core/application/event-handlers/publish-log-message-when-ad-is-created.domain-event-handler';
const grpcControllers = [CreateAdGrpcController, FindAdByIdGrpcController];

View File

@ -1,8 +1,8 @@
import { Command, CommandProps } from '@libs/ddd';
import { Frequency } from '@modules/ad/core/ad.types';
import { Schedule } from '../../types/schedule';
import { MarginDurations } from '../../types/margin-durations';
import { Waypoint } from '../../types/waypoint';
import { Frequency } from '@modules/ad/core/domain/ad.types';
export class CreateAdCommand extends Command {
readonly userId: string;

View File

@ -1,15 +1,15 @@
import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
import { CreateAdCommand } from './create-ad.command';
import { DefaultParams } from '@modules/ad/core/ports/default-params.type';
import { Inject } from '@nestjs/common';
import { AD_REPOSITORY, PARAMS_PROVIDER } from '@modules/ad/ad.di-tokens';
import { AdRepositoryPort } from '@modules/ad/core/ports/ad.repository.port';
import { DefaultParamsProviderPort } from '@modules/ad/core/ports/default-params-provider.port';
import { AggregateID } from '@libs/ddd';
import { AdAlreadyExistsException } from '@modules/ad/core/ad.errors';
import { AdEntity } from '@modules/ad/core/ad.entity';
import { AdEntity } from '@modules/ad/core/domain/ad.entity';
import { ConflictException } from '@libs/exceptions';
import { Waypoint } from '../../types/waypoint';
import { DefaultParams } from '../../ports/default-params.type';
import { AdRepositoryPort } from '../../ports/ad.repository.port';
import { DefaultParamsProviderPort } from '../../ports/default-params-provider.port';
import { AdAlreadyExistsException } from '@modules/ad/core/domain/ad.errors';
@CommandHandler(CreateAdCommand)
export class CreateAdService implements ICommandHandler {

View File

@ -2,7 +2,7 @@ import { MessagePublisherPort } from '@libs/ports/message-publisher.port';
import { Inject, Injectable } from '@nestjs/common';
import { OnEvent } from '@nestjs/event-emitter';
import { MESSAGE_PUBLISHER } from '@src/app.constants';
import { AdCreatedDomainEvent } from '../events/ad-created.domain-events';
import { AdCreatedDomainEvent } from '../../domain/events/ad-created.domain-events';
@Injectable()
export class PublishLogMessageWhenAdIsCreatedDomainEventHandler {

View File

@ -2,7 +2,7 @@ import { MessagePublisherPort } from '@libs/ports/message-publisher.port';
import { Inject, Injectable } from '@nestjs/common';
import { OnEvent } from '@nestjs/event-emitter';
import { MESSAGE_PUBLISHER } from '@src/app.constants';
import { AdCreatedDomainEvent } from '../events/ad-created.domain-events';
import { AdCreatedDomainEvent } from '../../domain/events/ad-created.domain-events';
@Injectable()
export class PublishMessageWhenAdIsCreatedDomainEventHandler {

View File

@ -1,4 +1,4 @@
import { RepositoryPort } from '@libs/ddd';
import { AdEntity } from '../ad.entity';
import { AdEntity } from '../../domain/ad.entity';
export type AdRepositoryPort = RepositoryPort<AdEntity>;

View File

@ -3,7 +3,7 @@ import { FindAdByIdQuery } from './find-ad-by-id.query';
import { AD_REPOSITORY } from '@modules/ad/ad.di-tokens';
import { AdRepositoryPort } from '../../ports/ad.repository.port';
import { Inject } from '@nestjs/common';
import { AdEntity } from '../../ad.entity';
import { AdEntity } from '../../../domain/ad.entity';
@QueryHandler(FindAdByIdQuery)
export class FindAdByIdQueryHandler implements IQueryHandler {

View File

@ -1,10 +1,10 @@
import { Injectable, Logger } from '@nestjs/common';
import { EventEmitter2 } from '@nestjs/event-emitter';
import { AdEntity } from '../core/ad.entity';
import { AdRepositoryPort } from '../core/ports/ad.repository.port';
import { AdEntity } from '../core/domain/ad.entity';
import { PrismaService } from '@libs/db/prisma.service';
import { AdMapper } from '../ad.mapper';
import { PrismaRepositoryBase } from '@libs/db/prisma-repository.base';
import { AdRepositoryPort } from '../core/application/ports/ad.repository.port';
export type AdBaseModel = {
uuid: string;

View File

@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { DefaultParamsProviderPort } from '../core/ports/default-params-provider.port';
import { DefaultParams } from '../core/ports/default-params.type';
import { DefaultParamsProviderPort } from '../core/application/ports/default-params-provider.port';
import { DefaultParams } from '../core/application/ports/default-params.type';
@Injectable()
export class DefaultParamsProvider implements DefaultParamsProviderPort {

View File

@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { TimeConverterPort } from '../core/ports/time-converter.port';
import { DateTime, TimeZone } from 'timezonecomplete';
import { TimeConverterPort } from '../core/application/ports/time-converter.port';
@Injectable()
export class TimeConverter implements TimeConverterPort {

View File

@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { TimezoneFinderPort } from '../core/ports/timezone-finder.port';
import { find } from 'geo-tz';
import { TimezoneFinderPort } from '../core/application/ports/timezone-finder.port';
@Injectable()
export class TimezoneFinder implements TimezoneFinderPort {

View File

@ -1,5 +1,5 @@
import { ResponseBase } from '@libs/api/response.base';
import { Frequency } from '@modules/ad/core/ad.types';
import { Frequency } from '@modules/ad/core/domain/ad.types';
export class AdResponseDto extends ResponseBase {
userId: string;

View File

@ -2,12 +2,12 @@ import { Controller, UsePipes } from '@nestjs/common';
import { CommandBus } from '@nestjs/cqrs';
import { GrpcMethod, RpcException } from '@nestjs/microservices';
import { CreateAdRequestDto } from './dtos/create-ad.request.dto';
import { CreateAdCommand } from '../../core/commands/create-ad/create-ad.command';
import { AggregateID } from '@libs/ddd';
import { AdAlreadyExistsException } from '../../core/ad.errors';
import { IdResponse } from '@libs/api/id.response.dto';
import { RpcExceptionCode } from '@libs/exceptions/rpc-exception.codes.enum';
import { RpcValidationPipe } from '@libs/utils/pipes/rpc.validation-pipe';
import { CreateAdCommand } from '@modules/ad/core/application/commands/create-ad/create-ad.command';
import { AdAlreadyExistsException } from '@modules/ad/core/domain/ad.errors';
@UsePipes(
new RpcValidationPipe({

View File

@ -16,7 +16,7 @@ import { WaypointDto } from './waypoint.dto';
import { intToFrequency } from './transformers/int-to-frequency';
import { IsSchedule } from './validators/decorators/is-schedule.decorator';
import { HasValidPositionIndexes } from './validators/decorators/has-valid-position-indexes.decorator';
import { Frequency } from '@modules/ad/core/ad.types';
import { Frequency } from '@modules/ad/core/domain/ad.types';
export class CreateAdRequestDto {
@IsUUID(4)

View File

@ -1,4 +1,4 @@
import { Frequency } from '@modules/ad/core/ad.types';
import { Frequency } from '@modules/ad/core/domain/ad.types';
export const intToFrequency = (frequencyAsInt: number): Frequency => {
if (frequencyAsInt == 1) return Frequency.PUNCTUAL;

View File

@ -2,9 +2,9 @@ import { Controller, UsePipes } from '@nestjs/common';
import { QueryBus } from '@nestjs/cqrs';
import { GrpcMethod, RpcException } from '@nestjs/microservices';
import { FindAdByIdRequestDto } from './dtos/find-ad-by-id.request.dto';
import { FindAdByIdQuery } from '@modules/ad/core/queries/find-ad-by-id/find-ad-by-id.query';
import { FindAdByIdQuery } from '@modules/ad/core/application/queries/find-ad-by-id/find-ad-by-id.query';
import { AdResponseDto } from '../dtos/ad.response.dto';
import { AdEntity } from '@modules/ad/core/ad.entity';
import { AdEntity } from '@modules/ad/core/domain/ad.entity';
import { AdMapper } from '@modules/ad/ad.mapper';
import { NotFoundException } from '@libs/exceptions';
import { RpcExceptionCode } from '@libs/exceptions/rpc-exception.codes.enum';

View File

@ -4,11 +4,11 @@ import {
TIME_CONVERTER,
} from '@modules/ad/ad.di-tokens';
import { AdMapper } from '@modules/ad/ad.mapper';
import { AdEntity } from '@modules/ad/core/ad.entity';
import { Frequency } from '@modules/ad/core/ad.types';
import { DefaultParamsProviderPort } from '@modules/ad/core/ports/default-params-provider.port';
import { TimeConverterPort } from '@modules/ad/core/ports/time-converter.port';
import { TimezoneFinderPort } from '@modules/ad/core/ports/timezone-finder.port';
import { AdEntity } from '@modules/ad/core/domain/ad.entity';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { DefaultParamsProviderPort } from '@modules/ad/core/application/ports/default-params-provider.port';
import { TimeConverterPort } from '@modules/ad/core/application/ports/time-converter.port';
import { TimezoneFinderPort } from '@modules/ad/core/application/ports/timezone-finder.port';
import {
AdReadModel,
AdWriteModel,

View File

@ -1,11 +1,11 @@
import { AdEntity } from '@modules/ad/core/ad.entity';
import { AdEntity } from '@modules/ad/core/domain/ad.entity';
import {
CreateAdProps,
DefaultAdProps,
Frequency,
} from '@modules/ad/core/ad.types';
import { MarginDurationsProps } from '@modules/ad/core/value-objects/margin-durations.value-object';
import { WaypointProps } from '@modules/ad/core/value-objects/waypoint.value-object';
} from '@modules/ad/core/domain/ad.types';
import { MarginDurationsProps } from '@modules/ad/core/domain/value-objects/margin-durations.value-object';
import { WaypointProps } from '@modules/ad/core/domain/value-objects/waypoint.value-object';
const originWaypointProps: WaypointProps = {
position: 0,

View File

@ -1,4 +1,4 @@
import { Address } from '@modules/ad/core/value-objects/address.value-object';
import { Address } from '@modules/ad/core/domain/value-objects/address.value-object';
describe('Address value object', () => {
it('should create an address value object', () => {

View File

@ -1,4 +1,4 @@
import { Coordinates } from '@modules/ad/core/value-objects/coordinates.value-object';
import { Coordinates } from '@modules/ad/core/domain/value-objects/coordinates.value-object';
describe('Coordinates value object', () => {
it('should create a coordinates value object', () => {

View File

@ -1,15 +1,15 @@
import { Test, TestingModule } from '@nestjs/testing';
import { CreateAdService } from '@modules/ad/core/commands/create-ad/create-ad.service';
import { AD_REPOSITORY, PARAMS_PROVIDER } from '@modules/ad/ad.di-tokens';
import { DefaultParamsProviderPort } from '@modules/ad/core/ports/default-params-provider.port';
import { WaypointDto } from '@modules/ad/interface/grpc-controllers/dtos/waypoint.dto';
import { CreateAdRequestDto } from '@modules/ad/interface/grpc-controllers/dtos/create-ad.request.dto';
import { Frequency } from '@modules/ad/core/ad.types';
import { CreateAdCommand } from '@modules/ad/core/commands/create-ad/create-ad.command';
import { AggregateID } from '@libs/ddd';
import { AdAlreadyExistsException } from '@modules/ad/core/ad.errors';
import { AdEntity } from '@modules/ad/core/ad.entity';
import { AdEntity } from '@modules/ad/core/domain/ad.entity';
import { ConflictException } from '@libs/exceptions';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { DefaultParamsProviderPort } from '@modules/ad/core/application/ports/default-params-provider.port';
import { CreateAdService } from '@modules/ad/core/application/commands/create-ad/create-ad.service';
import { CreateAdCommand } from '@modules/ad/core/application/commands/create-ad/create-ad.command';
import { AdAlreadyExistsException } from '@modules/ad/core/domain/ad.errors';
const originWaypoint: WaypointDto = {
position: 0,

View File

@ -1,14 +1,14 @@
import { AD_REPOSITORY } from '@modules/ad/ad.di-tokens';
import { AdEntity } from '@modules/ad/core/ad.entity';
import { AdEntity } from '@modules/ad/core/domain/ad.entity';
import {
CreateAdProps,
DefaultAdProps,
Frequency,
} from '@modules/ad/core/ad.types';
import { FindAdByIdQuery } from '@modules/ad/core/queries/find-ad-by-id/find-ad-by-id.query';
import { FindAdByIdQueryHandler } from '@modules/ad/core/queries/find-ad-by-id/find-ad-by-id.query-handler';
import { MarginDurationsProps } from '@modules/ad/core/value-objects/margin-durations.value-object';
import { WaypointProps } from '@modules/ad/core/value-objects/waypoint.value-object';
} from '@modules/ad/core/domain/ad.types';
import { FindAdByIdQuery } from '@modules/ad/core/application/queries/find-ad-by-id/find-ad-by-id.query';
import { FindAdByIdQueryHandler } from '@modules/ad/core/application/queries/find-ad-by-id/find-ad-by-id.query-handler';
import { MarginDurationsProps } from '@modules/ad/core/domain/value-objects/margin-durations.value-object';
import { WaypointProps } from '@modules/ad/core/domain/value-objects/waypoint.value-object';
import { Test, TestingModule } from '@nestjs/testing';
const originWaypointProps: WaypointProps = {

View File

@ -1,4 +1,4 @@
import { MarginDurations } from '@modules/ad/core/value-objects/margin-durations.value-object';
import { MarginDurations } from '@modules/ad/core/domain/value-objects/margin-durations.value-object';
describe('Margin durations value object', () => {
it('should create a margin durations value object', () => {

View File

@ -1,6 +1,6 @@
import { Frequency } from '@modules/ad/core/ad.types';
import { PublishLogMessageWhenAdIsCreatedDomainEventHandler } from '@modules/ad/core/event-handlers/publish-log-message-when-ad-is-created.domain-event-handler';
import { AdCreatedDomainEvent } from '@modules/ad/core/events/ad-created.domain-events';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { PublishLogMessageWhenAdIsCreatedDomainEventHandler } from '@modules/ad/core/application/event-handlers/publish-log-message-when-ad-is-created.domain-event-handler';
import { AdCreatedDomainEvent } from '@modules/ad/core/domain/events/ad-created.domain-events';
import { Test, TestingModule } from '@nestjs/testing';
import { MESSAGE_PUBLISHER } from '@src/app.constants';

View File

@ -1,6 +1,6 @@
import { Frequency } from '@modules/ad/core/ad.types';
import { PublishMessageWhenAdIsCreatedDomainEventHandler } from '@modules/ad/core/event-handlers/publish-message-when-ad-is-created.domain-event-handler';
import { AdCreatedDomainEvent } from '@modules/ad/core/events/ad-created.domain-events';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { PublishMessageWhenAdIsCreatedDomainEventHandler } from '@modules/ad/core/application/event-handlers/publish-message-when-ad-is-created.domain-event-handler';
import { AdCreatedDomainEvent } from '@modules/ad/core/domain/events/ad-created.domain-events';
import { Test, TestingModule } from '@nestjs/testing';
import { MESSAGE_PUBLISHER } from '@src/app.constants';

View File

@ -1,4 +1,4 @@
import { Schedule } from '@modules/ad/core/value-objects/schedule.value-object';
import { Schedule } from '@modules/ad/core/domain/value-objects/schedule.value-object';
describe('Schedule value object', () => {
it('should create a schedule value object', () => {

View File

@ -1,4 +1,4 @@
import { Waypoint } from '@modules/ad/core/value-objects/waypoint.value-object';
import { Waypoint } from '@modules/ad/core/domain/value-objects/waypoint.value-object';
describe('Waypoint value object', () => {
it('should create a waypoint value object', () => {

View File

@ -5,9 +5,9 @@ import {
TIME_CONVERTER,
} from '@modules/ad/ad.di-tokens';
import { AdMapper } from '@modules/ad/ad.mapper';
import { DefaultParamsProviderPort } from '@modules/ad/core/ports/default-params-provider.port';
import { TimeConverterPort } from '@modules/ad/core/ports/time-converter.port';
import { TimezoneFinderPort } from '@modules/ad/core/ports/timezone-finder.port';
import { DefaultParamsProviderPort } from '@modules/ad/core/application/ports/default-params-provider.port';
import { TimeConverterPort } from '@modules/ad/core/application/ports/time-converter.port';
import { TimezoneFinderPort } from '@modules/ad/core/application/ports/timezone-finder.port';
import { AdRepository } from '@modules/ad/infrastructure/ad.repository';
import { EventEmitter2, EventEmitterModule } from '@nestjs/event-emitter';
import { Test, TestingModule } from '@nestjs/testing';

View File

@ -1,4 +1,4 @@
import { DefaultParams } from '@modules/ad/core/ports/default-params.type';
import { DefaultParams } from '@modules/ad/core/application/ports/default-params.type';
import { DefaultParamsProvider } from '@modules/ad/infrastructure/default-params-provider';
import { ConfigService } from '@nestjs/config';
import { Test, TestingModule } from '@nestjs/testing';

View File

@ -1,7 +1,7 @@
import { IdResponse } from '@libs/api/id.response.dto';
import { RpcExceptionCode } from '@libs/exceptions/rpc-exception.codes.enum';
import { AdAlreadyExistsException } from '@modules/ad/core/ad.errors';
import { Frequency } from '@modules/ad/core/ad.types';
import { AdAlreadyExistsException } from '@modules/ad/core/domain/ad.errors';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { CreateAdGrpcController } from '@modules/ad/interface/grpc-controllers/create-ad.grpc.controller';
import { CreateAdRequestDto } from '@modules/ad/interface/grpc-controllers/dtos/create-ad.request.dto';
import { WaypointDto } from '@modules/ad/interface/grpc-controllers/dtos/waypoint.dto';

View File

@ -1,7 +1,7 @@
import { NotFoundException } from '@libs/exceptions';
import { RpcExceptionCode } from '@libs/exceptions/rpc-exception.codes.enum';
import { AdMapper } from '@modules/ad/ad.mapper';
import { Frequency } from '@modules/ad/core/ad.types';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { FindAdByIdGrpcController } from '@modules/ad/interface/grpc-controllers/find-ad-by-id.grpc.controller';
import { QueryBus } from '@nestjs/cqrs';
import { RpcException } from '@nestjs/microservices';

View File

@ -1,4 +1,4 @@
import { Frequency } from '@modules/ad/core/ad.types';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { intToFrequency } from '@modules/ad/interface/grpc-controllers/dtos/transformers/int-to-frequency';
describe('frequency mapping', () => {

View File

@ -7,7 +7,7 @@ import {
} from '@nestjs/terminus';
import { CheckRepositoryPort } from '../ports/check-repository.port';
import { AD_REPOSITORY } from '@modules/health/health.di-tokens';
import { AdRepositoryPort } from '@modules/ad/core/ports/ad.repository.port';
import { AdRepositoryPort } from '@modules/ad/core/application/ports/ad.repository.port';
import { MESSAGE_PUBLISHER } from '@src/app.constants';
import { LOGGING_AD_HEALTH_CRIT } from '@modules/health/health.constants';
import { MessagePublisherPort } from '@libs/ports/message-publisher.port';

View File

@ -4,7 +4,7 @@ import { TerminusModule } from '@nestjs/terminus';
import { MESSAGE_BROKER_PUBLISHER, MESSAGE_PUBLISHER } from 'src/app.constants';
import { MessageBrokerPublisher } from '@mobicoop/message-broker-module';
import { MessagePublisher } from './infrastructure/message-publisher';
import { RepositoriesHealthIndicatorUseCase } from './core/usecases/repositories.health-indicator.usecase';
import { RepositoriesHealthIndicatorUseCase } from './core/aplication/usecases/repositories.health-indicator.usecase';
import { AdRepository } from '../ad/infrastructure/ad.repository';
import { AD_REPOSITORY } from './health.di-tokens';
import { HealthGrpcController } from './interface/grpc-controllers/health.grpc.controller';

View File

@ -1,6 +1,6 @@
import { Controller } from '@nestjs/common';
import { GrpcMethod } from '@nestjs/microservices';
import { RepositoriesHealthIndicatorUseCase } from '../../core/usecases/repositories.health-indicator.usecase';
import { RepositoriesHealthIndicatorUseCase } from '../../core/aplication/usecases/repositories.health-indicator.usecase';
export enum ServingStatus {
UNKNOWN = 0,

View File

@ -1,4 +1,4 @@
import { RepositoriesHealthIndicatorUseCase } from '@modules/health/core/usecases/repositories.health-indicator.usecase';
import { RepositoriesHealthIndicatorUseCase } from '@modules/health/core/aplication/usecases/repositories.health-indicator.usecase';
import { Controller, Get } from '@nestjs/common';
import {
HealthCheckService,

View File

@ -1,4 +1,4 @@
import { RepositoriesHealthIndicatorUseCase } from '@modules/health/core/usecases/repositories.health-indicator.usecase';
import { RepositoriesHealthIndicatorUseCase } from '@modules/health/core/aplication/usecases/repositories.health-indicator.usecase';
import {
HealthGrpcController,
ServingStatus,

View File

@ -1,4 +1,4 @@
import { RepositoriesHealthIndicatorUseCase } from '@modules/health/core/usecases/repositories.health-indicator.usecase';
import { RepositoriesHealthIndicatorUseCase } from '@modules/health/core/aplication/usecases/repositories.health-indicator.usecase';
import { HealthHttpController } from '@modules/health/interface/http-controllers/health.http.controller';
import { HealthCheckResult, HealthCheckService } from '@nestjs/terminus';
import { Test, TestingModule } from '@nestjs/testing';

View File

@ -1,6 +1,6 @@
import { Test, TestingModule } from '@nestjs/testing';
import { HealthCheckError, HealthIndicatorResult } from '@nestjs/terminus';
import { RepositoriesHealthIndicatorUseCase } from '../../core/usecases/repositories.health-indicator.usecase';
import { RepositoriesHealthIndicatorUseCase } from '../../core/aplication/usecases/repositories.health-indicator.usecase';
import { AD_REPOSITORY } from '@modules/health/health.di-tokens';
import { MESSAGE_PUBLISHER } from '@src/app.constants';
import { DatabaseErrorException } from '@libs/exceptions';