refactor(auth): AccountRepository / SellerCredentialRepository 분리 + AuthRepository 제거 (P0-1 단계 3)#108
Conversation
…uthRepository 제거
P0-1 단계 3. AuthRepository 의 잔여 책임을 2 개의 도메인 Repository 로 분리하고,
빈 AuthRepository 를 삭제하여 God-class 해체의 큰 줄기를 마무리.
- 신규: AccountRepository (interface + impl + spec)
- Account / AccountIdentity / UserProfile 의 read/write
- findIdentityByProviderSubject, findAccountByEmail, upsertUserByOidcIdentity,
findAccountForJwt, findAccountForMe
- Prisma.{Model}GetPayload<...> 로 인터페이스 반환 타입 정의
- 신규: SellerCredentialRepository (interface + impl + spec)
- findSellerCredentialByUsername, findSellerCredentialByAccountId,
updateSellerLastLogin, updateSellerPasswordHash
- 제거: AuthRepository (530줄 → 0) + 그 spec
- 소비자 전환:
- AuthService: accounts / sellerCredentials 2 개 신규 의존, this.repo 호출 8 개 전환
- JwtBearerStrategy: accounts 의존으로 전환
- test/app.e2e-spec.ts: AuthRepository override → ACCOUNT_REPOSITORY override
- AuthModule: 신규 2 개 Repository 를 DI Token 패턴으로 등록
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Coverage report
Test suite run success1168 tests passing in 133 suites. Report generated by 🧪jest coverage report action from 6999053 |
Summary
Scope
findAccountForJwt, findAccountForMe
updateSellerLastLogin, updateSellerPasswordHash
P0-1 진행 상황
Impact
Test plan