fix(api,ci): remove type-only imports for DI and isolate CI ports from dev
- Remove `type` keyword from NestJS injectable class imports across all modules to fix runtime DI resolution (330+ handler/listener files) - Offset CI docker-compose ports (5433/6380/8109/9002) to avoid conflicts with running dev containers - Update .env.test, playwright.config.ts, and e2e workflow to use isolated CI ports with configurable overrides - Fix prisma/seed.ts to use deterministic IDs for Prisma 7 upsert compatibility (phoneHash replaced phone as unique index) - Add dedicated Docker bridge network for CI service containers Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AGENT_REPOSITORY,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
} from '../../../domain/repositories/agent.repository';
|
||||
import { QualityScoreCalculator } from '../../../domain/services/quality-score.service';
|
||||
import { QualityScore } from '../../../domain/value-objects/quality-score.vo';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type CommandBus } from '@nestjs/cqrs';
|
||||
import { CommandBus } from '@nestjs/cqrs';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { type LoggerService } from '@modules/shared';
|
||||
import { LoggerService } from '@modules/shared';
|
||||
import { RecalculateQualityScoreCommand } from '../commands/recalculate-quality-score/recalculate-quality-score.command';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, NotFoundException, type LoggerService } from '@modules/shared';
|
||||
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, NotFoundException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AGENT_REPOSITORY,
|
||||
type AgentDashboardData,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
} from '../../../domain/repositories/agent.repository';
|
||||
import { GetAgentDashboardQuery } from './get-agent-dashboard.query';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Inject, InternalServerErrorException } from '@nestjs/common';
|
||||
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, type LoggerService } from '@modules/shared';
|
||||
import { IQueryHandler, QueryHandler } from '@nestjs/cqrs';
|
||||
import { DomainException, LoggerService } from '@modules/shared';
|
||||
import {
|
||||
AGENT_REPOSITORY,
|
||||
type AgentPublicProfileData,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
} from '../../../domain/repositories/agent.repository';
|
||||
import { GetAgentPublicProfileQuery } from './get-agent-public-profile.query';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AggregateRoot } from '@modules/shared';
|
||||
import { QualityScoreUpdatedEvent } from '../events/quality-score-updated.event';
|
||||
import { type QualityScore } from '../value-objects/quality-score.vo';
|
||||
import { QualityScore } from '../value-objects/quality-score.vo';
|
||||
|
||||
export interface AgentProps {
|
||||
userId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class QualityScoreUpdatedEvent implements DomainEvent {
|
||||
readonly eventName = 'agent.quality_score_updated';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type AgentEntity } from '../entities/agent.entity';
|
||||
import { AgentEntity } from '../entities/agent.entity';
|
||||
|
||||
export const AGENT_REPOSITORY = Symbol('AGENT_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export {
|
||||
AGENT_REPOSITORY,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
type AgentDashboardData,
|
||||
type AgentPublicProfileData,
|
||||
type AgentPublicListingItem,
|
||||
|
||||
@@ -5,7 +5,7 @@ export { QualityScoreUpdatedEvent } from './domain/events/quality-score-updated.
|
||||
export { QualityScoreCalculator } from './domain/services/quality-score.service';
|
||||
export {
|
||||
AGENT_REPOSITORY,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
type AgentDashboardData,
|
||||
type AgentPublicProfileData,
|
||||
type AgentPublicListingItem,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import {
|
||||
type AgentPublicProfileData,
|
||||
type AgentPublicListingItem,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { type PrismaService } from '@modules/shared';
|
||||
import { PrismaService } from '@modules/shared';
|
||||
import { AgentEntity } from '../../domain/entities/agent.entity';
|
||||
import {
|
||||
type AgentDashboardData,
|
||||
type AgentPublicProfileData,
|
||||
type IAgentRepository,
|
||||
IAgentRepository,
|
||||
type QualityScoreInputData,
|
||||
} from '../../domain/repositories/agent.repository';
|
||||
import { QualityScore } from '../../domain/value-objects/quality-score.vo';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Controller, Get, NotFoundException, Param, Post, UseGuards } from '@nestjs/common';
|
||||
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
|
||||
import { CommandBus, QueryBus } from '@nestjs/cqrs';
|
||||
import {
|
||||
ApiBearerAuth,
|
||||
ApiOperation,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
import { RecalculateQualityScoreCommand } from '../../application/commands/recalculate-quality-score/recalculate-quality-score.command';
|
||||
import { GetAgentDashboardQuery } from '../../application/queries/get-agent-dashboard/get-agent-dashboard.query';
|
||||
import { GetAgentPublicProfileQuery } from '../../application/queries/get-agent-public-profile/get-agent-public-profile.query';
|
||||
import { type AgentDashboardData, type AgentPublicProfileData } from '../../domain/repositories/agent.repository';
|
||||
import { AgentDashboardData, AgentPublicProfileData } from '../../domain/repositories/agent.repository';
|
||||
|
||||
@ApiTags('agents')
|
||||
@Controller('agents')
|
||||
|
||||
Reference in New Issue
Block a user