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,10 +1,10 @@
|
||||
import { type ListingStatus, type TransactionType } from '@prisma/client';
|
||||
import { ListingStatus, TransactionType } from '@prisma/client';
|
||||
import { AggregateRoot, ValidationException } from '@modules/shared';
|
||||
import { ListingApprovedEvent } from '../events/listing-approved.event';
|
||||
import { ListingCreatedEvent } from '../events/listing-created.event';
|
||||
import { ListingSoldEvent } from '../events/listing-sold.event';
|
||||
import { ListingStatusChangedEvent } from '../events/listing-status-changed.event';
|
||||
import { type Price } from '../value-objects/price.vo';
|
||||
import { Price } from '../value-objects/price.vo';
|
||||
|
||||
const VALID_TRANSITIONS: Record<ListingStatus, ListingStatus[]> = {
|
||||
DRAFT: ['PENDING_REVIEW'],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type PropertyType, type Direction } from '@prisma/client';
|
||||
import { PropertyType, Direction } from '@prisma/client';
|
||||
import { AggregateRoot } from '@modules/shared';
|
||||
import { type Address } from '../value-objects/address.vo';
|
||||
import { type GeoPoint } from '../value-objects/geo-point.vo';
|
||||
import { Address } from '../value-objects/address.vo';
|
||||
import { GeoPoint } from '../value-objects/geo-point.vo';
|
||||
|
||||
export interface PropertyProps {
|
||||
propertyType: PropertyType;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class ListingApprovedEvent implements DomainEvent {
|
||||
readonly eventName = 'listing.approved';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type TransactionType } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { TransactionType } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class ListingCreatedEvent implements DomainEvent {
|
||||
readonly eventName = 'listing.created';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type ListingStatus } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { ListingStatus } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class ListingSoldEvent implements DomainEvent {
|
||||
readonly eventName = 'listing.sold';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type ListingStatus } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { ListingStatus } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class ListingStatusChangedEvent implements DomainEvent {
|
||||
readonly eventName = 'listing.status_changed';
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { PROPERTY_REPOSITORY, type IPropertyRepository } from './property.repository';
|
||||
export { LISTING_REPOSITORY, type IListingRepository, type ListingSearchParams, type PaginatedResult } from './listing.repository';
|
||||
export { PROPERTY_REPOSITORY, IPropertyRepository } from './property.repository';
|
||||
export { LISTING_REPOSITORY, IListingRepository, type ListingSearchParams, type PaginatedResult } from './listing.repository';
|
||||
export type { ListingDetailData, ListingSearchItem, ListingSellerItem, ListingMediaData } from './listing-read.dto';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type ListingStatus, type TransactionType, type PropertyType, type Direction } from '@prisma/client';
|
||||
import { ListingStatus, TransactionType, PropertyType, Direction } from '@prisma/client';
|
||||
|
||||
/** Returned by findByIdWithProperty — full listing detail with property, seller, agent */
|
||||
export interface ListingDetailData {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { type ListingStatus, type TransactionType, type PropertyType } from '@prisma/client';
|
||||
import { type ListingEntity } from '../entities/listing.entity';
|
||||
import { type ListingDetailData, type ListingSearchItem, type ListingSellerItem } from './listing-read.dto';
|
||||
import { ListingStatus, TransactionType, PropertyType } from '@prisma/client';
|
||||
import { ListingEntity } from '../entities/listing.entity';
|
||||
import { ListingDetailData, ListingSearchItem, ListingSellerItem } from './listing-read.dto';
|
||||
|
||||
export const LISTING_REPOSITORY = Symbol('LISTING_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PropertyMediaEntity } from '../entities/property-media.entity';
|
||||
import { type PropertyEntity } from '../entities/property.entity';
|
||||
import { PropertyMediaEntity } from '../entities/property-media.entity';
|
||||
import { PropertyEntity } from '../entities/property.entity';
|
||||
|
||||
export const PROPERTY_REPOSITORY = Symbol('PROPERTY_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export const DUPLICATE_DETECTOR = Symbol('DUPLICATE_DETECTOR');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type ListingStatus } from '@prisma/client';
|
||||
import { type ListingEntity } from '../entities/listing.entity';
|
||||
import { ListingStatus } from '@prisma/client';
|
||||
import { ListingEntity } from '../entities/listing.entity';
|
||||
|
||||
export interface ModerationAction {
|
||||
action: 'approve' | 'reject';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type PropertyType } from '@prisma/client';
|
||||
import { PropertyType } from '@prisma/client';
|
||||
|
||||
export const PRICE_VALIDATOR = Symbol('PRICE_VALIDATOR');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user