Some checks failed
Dev CI / Unit Tests (${{ matrix.app }}) (backend) (push) Blocked by required conditions
Dev CI / Unit Tests (${{ matrix.app }}) (frontend) (push) Blocked by required conditions
Dev CI / Notify Failure (push) Blocked by required conditions
Dev CI / Quality (${{ matrix.app }}) (backend) (push) Has been cancelled
Dev CI / Quality (${{ matrix.app }}) (frontend) (push) Has been cancelled
Aligns dev with the complete application codebase (cicd branch). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { PortsController } from '../controllers/ports.controller';
|
|
|
|
// Import domain services
|
|
import { PortSearchService } from '@domain/services/port-search.service';
|
|
|
|
// Import domain ports
|
|
import { PORT_REPOSITORY } from '@domain/ports/out/port.repository';
|
|
|
|
// Import infrastructure implementations
|
|
import { TypeOrmPortRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-port.repository';
|
|
import { PortOrmEntity } from '../../infrastructure/persistence/typeorm/entities/port.orm-entity';
|
|
|
|
@Module({
|
|
imports: [TypeOrmModule.forFeature([PortOrmEntity])],
|
|
controllers: [PortsController],
|
|
providers: [
|
|
{
|
|
provide: PORT_REPOSITORY,
|
|
useClass: TypeOrmPortRepository,
|
|
},
|
|
{
|
|
provide: PortSearchService,
|
|
useFactory: (portRepo: any) => {
|
|
return new PortSearchService(portRepo);
|
|
},
|
|
inject: [PORT_REPOSITORY],
|
|
},
|
|
],
|
|
exports: [PORT_REPOSITORY, PortSearchService],
|
|
})
|
|
export class PortsModule {}
|