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 { HttpStatus } from '@nestjs/common';
|
||||
import { type EscrowStatus } from '@prisma/client';
|
||||
import { EscrowStatus } from '@prisma/client';
|
||||
import { AggregateRoot, DomainException, ErrorCode, Result } from '@modules/shared';
|
||||
import { EscrowDisputedEvent } from '../events/escrow-disputed.event';
|
||||
import { EscrowHeldEvent } from '../events/escrow-held.event';
|
||||
import { EscrowReleasedEvent } from '../events/escrow-released.event';
|
||||
import { type Money } from '../value-objects/money.vo';
|
||||
import { Money } from '../value-objects/money.vo';
|
||||
|
||||
export interface EscrowProps {
|
||||
orderId: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { HttpStatus } from '@nestjs/common';
|
||||
import { type OrderStatus } from '@prisma/client';
|
||||
import { OrderStatus } from '@prisma/client';
|
||||
import { AggregateRoot, DomainException, ErrorCode, Result } from '@modules/shared';
|
||||
import { OrderCancelledEvent } from '../events/order-cancelled.event';
|
||||
import { OrderCreatedEvent } from '../events/order-created.event';
|
||||
import { OrderPaidEvent } from '../events/order-paid.event';
|
||||
import { type Money } from '../value-objects/money.vo';
|
||||
import { type PlatformFee } from '../value-objects/platform-fee.vo';
|
||||
import { Money } from '../value-objects/money.vo';
|
||||
import { PlatformFee } from '../value-objects/platform-fee.vo';
|
||||
|
||||
export interface OrderProps {
|
||||
buyerId: string;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { PaymentCompletedEvent } from '../events/payment-completed.event';
|
||||
import { PaymentCreatedEvent } from '../events/payment-created.event';
|
||||
import { PaymentFailedEvent } from '../events/payment-failed.event';
|
||||
import { PaymentRefundedEvent } from '../events/payment-refunded.event';
|
||||
import { type Money } from '../value-objects/money.vo';
|
||||
import { Money } from '../value-objects/money.vo';
|
||||
|
||||
export interface PaymentProps {
|
||||
userId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class EscrowDisputedEvent implements DomainEvent {
|
||||
readonly eventName = 'escrow.disputed';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class EscrowHeldEvent implements DomainEvent {
|
||||
readonly eventName = 'escrow.held';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class EscrowReleasedEvent implements DomainEvent {
|
||||
readonly eventName = 'escrow.released';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class OrderCancelledEvent implements DomainEvent {
|
||||
readonly eventName = 'order.cancelled';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class OrderCreatedEvent implements DomainEvent {
|
||||
readonly eventName = 'order.created';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class OrderPaidEvent implements DomainEvent {
|
||||
readonly eventName = 'order.paid';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PaymentProvider } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { PaymentProvider } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class PaymentCompletedEvent implements DomainEvent {
|
||||
readonly eventName = 'payment.completed';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PaymentProvider, type PaymentType } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { PaymentProvider, PaymentType } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class PaymentCreatedEvent implements DomainEvent {
|
||||
readonly eventName = 'payment.created';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PaymentProvider } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { PaymentProvider } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class PaymentFailedEvent implements DomainEvent {
|
||||
readonly eventName = 'payment.failed';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PaymentProvider } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
import { PaymentProvider } from '@prisma/client';
|
||||
import { DomainEvent } from '@modules/shared';
|
||||
|
||||
export class PaymentRefundedEvent implements DomainEvent {
|
||||
readonly eventName = 'payment.refunded';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type EscrowEntity } from '../entities/escrow.entity';
|
||||
import { EscrowEntity } from '../entities/escrow.entity';
|
||||
|
||||
export const ESCROW_REPOSITORY = Symbol('ESCROW_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { ESCROW_REPOSITORY, type IEscrowRepository } from './escrow.repository';
|
||||
export { ORDER_REPOSITORY, type IOrderRepository } from './order.repository';
|
||||
export { PAYMENT_REPOSITORY, type IPaymentRepository } from './payment.repository';
|
||||
export { ESCROW_REPOSITORY, IEscrowRepository } from './escrow.repository';
|
||||
export { ORDER_REPOSITORY, IOrderRepository } from './order.repository';
|
||||
export { PAYMENT_REPOSITORY, IPaymentRepository } from './payment.repository';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type OrderStatus } from '@prisma/client';
|
||||
import { type OrderEntity } from '../entities/order.entity';
|
||||
import { OrderStatus } from '@prisma/client';
|
||||
import { OrderEntity } from '../entities/order.entity';
|
||||
|
||||
export const ORDER_REPOSITORY = Symbol('ORDER_REPOSITORY');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PaymentStatus } from '@prisma/client';
|
||||
import { type PaymentEntity } from '../entities/payment.entity';
|
||||
import { PaymentStatus } from '@prisma/client';
|
||||
import { PaymentEntity } from '../entities/payment.entity';
|
||||
|
||||
export const PAYMENT_REPOSITORY = Symbol('PAYMENT_REPOSITORY');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user