-
-
Notifications
You must be signed in to change notification settings - Fork 38
docs: release for v2.16 #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis change updates documentation to confirm support for Prisma's "prisma-client" generator since ZenStack v2.16.0, providing configuration and usage instructions. Additionally, it documents a new runtime API option, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ZenStack CLI
participant SourceTree
User->>ZenStack CLI: Run `zenstack generate --output ./src/generated`
ZenStack CLI->>SourceTree: Generate enhanced PrismaClient and enhance() in output folder
User->>SourceTree: Import PrismaClient and enhance from generated output
User->>Application: Use enhanced PrismaClient in app code
sequenceDiagram
participant Application
participant ZenStack Runtime
Application->>ZenStack Runtime: Update entity (with validation options)
alt inputOnlyValidationForUpdate = true
ZenStack Runtime->>ZenStack Runtime: Validate only input fields
else inputOnlyValidationForUpdate = false
ZenStack Runtime->>ZenStack Runtime: Validate entire entity
end
ZenStack Runtime-->>Application: Return update result or validation error
Possibly related PRs
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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
docs/reference/runtime-api.md (1)
92-92: Refine wording for clarity.
Consider replacing "prior to update" with "before the update" to reduce wordiness and improve readability. For example:...if the record under update doesn't satisfy the rules before the update, the operation will fail...docs/faq.md (2)
67-70: Approve support details with minor style tweaks.
The update clearly communicates support for theprisma-clientgenerator since v2.16.0. Consider tightening the phrasing by changing "When it's used, Prisma requires you..." to "When used, Prisma requires specifying an output folder...", eliminating the contraction for a more formal tone.
85-92: Clarify placeholder usage.
Replace the...placeholder inenhance(prisma, …)with a concrete example (e.g., context object or options) to help readers understand how to pass parameters:const db = enhance(prisma, { user: session.user }, { kinds: ['policy', 'validation'] });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/faq.md(1 hunks)docs/reference/runtime-api.md(3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/reference/runtime-api.md
[style] ~92-~92: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ... under update doesn't satisfy the rules prior to update, the update operation will fail ...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🔇 Additional comments (4)
docs/reference/runtime-api.md (2)
67-69: Well-definedValidationOptionstype.
The newValidationOptionstype correctly exposes theinputOnlyValidationForUpdateflag to users. Its optional boolean signature and placement are appropriate.
79-79: IncludevalidationinEnhancementOptions.
Addingvalidation?: ValidationOptionsintegrates the new options into the enhancement API as intended.docs/faq.md (2)
71-78: ZModel generator configuration example is clear.
Thezmodelsnippet accurately shows how to configure theprisma-clientgenerator and its output folder. This aligns well with the narrative and requires no changes.
80-83: Command example is accurate.
Thezenstack generate --outputcommand snippet correctly demonstrates how to generate ZenStack files into the source tree.
Summary by CodeRabbit