xpeditis2.0/apps/backend/src/application/notifications/notifications.module.ts
David 4b00ee2601
Some checks failed
CI/CD Pipeline - Xpeditis PreProd / Frontend - Docker Build & Push (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Deploy to PreProd Server (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Run Smoke Tests (push) Blocked by required conditions
CI/CD Pipeline - Xpeditis PreProd / Backend - Build & Test (push) Failing after 5m53s
CI/CD Pipeline - Xpeditis PreProd / Backend - Docker Build & Push (push) Has been skipped
CI/CD Pipeline - Xpeditis PreProd / Frontend - Build & Test (push) Has been cancelled
fix: replace relative domain imports with TypeScript path aliases
- Replace all ../../domain/ imports with @domain/ across 67 files
- Configure NestJS to use tsconfig.build.json with rootDir
- Add tsc-alias to resolve path aliases after build
- This fixes 'Cannot find module' TypeScript compilation errors

Fixed files:
- 30 files in application layer
- 37 files in infrastructure layer
2025-11-16 19:20:58 +01:00

44 lines
1.6 KiB
TypeScript

/**
* Notifications Module
*
* Provides notification functionality with WebSocket support
*/
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { JwtModule } from '@nestjs/jwt';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { NotificationsController } from '../controllers/notifications.controller';
import { NotificationsGateway } from '../gateways/notifications.gateway';
import { NotificationService } from '../services/notification.service';
import { NotificationOrmEntity } from '../../infrastructure/persistence/typeorm/entities/notification.orm-entity';
import { TypeOrmNotificationRepository } from '../../infrastructure/persistence/typeorm/repositories/typeorm-notification.repository';
import { NOTIFICATION_REPOSITORY } from '@domain/ports/out/notification.repository';
@Module({
imports: [
TypeOrmModule.forFeature([NotificationOrmEntity]),
JwtModule.registerAsync({
imports: [ConfigModule],
useFactory: (configService: ConfigService) => ({
secret: configService.get<string>('JWT_SECRET'),
signOptions: {
expiresIn: configService.get<string>('JWT_ACCESS_EXPIRATION', '15m'),
},
}),
inject: [ConfigService],
}),
],
controllers: [NotificationsController],
providers: [
NotificationsGateway,
NotificationService,
{
provide: NOTIFICATION_REPOSITORY,
useClass: TypeOrmNotificationRepository,
},
],
exports: [NotificationService, NotificationsGateway, NOTIFICATION_REPOSITORY],
})
export class NotificationsModule {}