Conversation
BREAKING CHANGE: Prisma options in app config have changed. See example for more details.
BREAKING CHANGE: use UserTypes.Locales
BREAKING CHANGE: Use UserTypes to declare JwtPayload and UserQueryMetadata
|
Caution Review failedThe pull request is closed. WalkthroughThis update refactors Prisma client integration by replacing the global omit config with explicit client options and extended client types, removes the PrismaFactory, and introduces a new Prisma extension for model utilities. It also unifies user and environment types, enhances Zod-Swagger integration, and updates authentication, middleware, and test setups accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant AppModule
participant PrismaModule
participant MongoConnection
participant PrismaClient
participant LibnestPrismaExtension
AppModule->>PrismaModule: forRoot({ client: { constructor: PrismaClient, ... }, ... })
PrismaModule->>MongoConnection: Get MongoDB URL
PrismaModule->>PrismaClient: Instantiate with options + datasourceUrl
PrismaClient->>LibnestPrismaExtension: $extends(LibnestPrismaExtension)
LibnestPrismaExtension-->>PrismaClient: Adds exists() and __modelName utilities
PrismaModule-->>AppModule: Extended PrismaClient instance
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (41)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
===========================================
Coverage 100.00% 100.00%
===========================================
Files 39 83 +44
Lines 878 2297 +1419
Branches 176 424 +248
===========================================
+ Hits 878 2297 +1419 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Includes features of previous PR as well as:
Summary by CodeRabbit
New Features
existsmethod to all models and exposes model name metadata.Bug Fixes
Refactor
Tests
Chores