zenstackhq / zenstack-docs

ZenStack documentation
https://zenstack.dev
MIT License
9 stars 19 forks source link

docs: doc changes for release 2.5.0 #361

Closed ymc9 closed 1 month ago

ymc9 commented 1 month ago

Summary by CodeRabbit

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
zenstack-new-site βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Sep 6, 2024 11:32pm
coderabbitai[bot] commented 1 month ago

Walkthrough

The documentation for ZenStack has been updated to clarify limitations regarding API compatibility with edge runtime environments, enhance guidance for using tRPC with different versions, introduce a new command for schema validation in the CLI, and provide details on integrating ZenStack with Prisma Pulse. Additionally, improvements have been made to the @@validate attribute documentation, and new configuration options for the tRPC code generator have been added.

Changes

Files Change Summary
docs/guides/check-permission.md Added a limitation regarding API compatibility with edge runtime environments (e.g., Cloudflare Workers, Vercel Edge).
docs/guides/edge.md Modified wording to emphasize the importance of importing enhance from @zenstackhq/runtime/edge.
docs/guides/prisma-pulse.md Introduced documentation for integrating ZenStack with Prisma Pulse, detailing the stream() API for real-time data change subscriptions and access policy enforcement.
docs/guides/trpc.mdx Enhanced documentation for tRPC with ZenStack, detailing configuration differences between tRPC v10 and v11, including new import statements and example configurations.
docs/reference/cli.md Added a new check command for schema validation, replacing the info command, and updated options for specifying schema files.
docs/reference/plugins/trpc.md Added new configuration options for the tRPC code generator, including version, importCreateRouter, and importProcedure.
docs/reference/prisma-client-ext.md Added a warning about the limitations of a new API in PrismaClient regarding edge runtime environments.
docs/reference/zmodel-language.md Enhanced documentation for the @@validate attribute, adding optional parameters message and path for improved validation customization.

Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between b37c4f7a8a8954d953c45812e62ef1ae5f7413cf and 3d935bbc70941c1e412d1c80bbf9e90c31a54ebd.
Files selected for processing (8) * docs/guides/check-permission.md (1 hunks) * docs/guides/edge.md (1 hunks) * docs/guides/prisma-pulse.md (1 hunks) * docs/guides/trpc.mdx (3 hunks) * docs/reference/cli.md (3 hunks) * docs/reference/plugins/trpc.md (1 hunks) * docs/reference/prisma-client-ext.md (1 hunks) * docs/reference/zmodel-language.md (1 hunks)
Files skipped from review due to trivial changes (1) * docs/guides/edge.md
Additional context used
LanguageTool
docs/guides/trpc.mdx
[style] ~158-~158: Consider using a more formal and expressive alternative to β€˜awesome’. Context: ...he ZenStack trpc plugin is based on the awesome work by [Omar Dulaimi](https://github.c... (AWESOME)
Markdownlint
docs/reference/plugins/trpc.md
29-29: Expected: 5; Actual: 11; Too many cells, extra data will be missing Table column count (MD056, table-column-count)
docs/reference/zmodel-language.md
1648-1648: null Fenced code blocks should have a language specified (MD040, fenced-code-language)
Additional comments not posted (8)
docs/reference/prisma-client-ext.md (1)
`17-19`: **Clear and informative warning note.** The warning note effectively communicates the API's limitations in edge runtime environments. This is crucial for users deploying in such environments to avoid unexpected runtime errors.
docs/guides/prisma-pulse.md (1)
`6-46`: **Well-structured and informative documentation.** The documentation provides a clear introduction to using ZenStack with Prisma Pulse. The examples are well-chosen and effectively demonstrate the integration of ZenStack's access policies with the `stream()` API. This will help users understand how to use these features in their real-time applications.
docs/guides/trpc.mdx (1)
`7-8`: **Comprehensive and clear documentation for tRPC configurations.** The documentation effectively differentiates between tRPC versions 10 and 11, providing clear examples and necessary import statements for each version. This will greatly assist users in configuring their projects correctly and understanding the changes in tRPC v11. Also applies to: 38-90, 123-156
docs/reference/plugins/trpc.md (2)
`27-27`: **Approved: Addition of the `version` configuration option.** This new field allows users to specify the tRPC version they wish to target, enhancing flexibility and forward compatibility. --- `28-29`: **Approved: Addition of `importCreateRouter` and `importProcedure` configuration options.** These fields are correctly marked as required when the `version` is set to "v11". It might be beneficial to clarify in the documentation that these fields are not used when the version is "v10".
Tools
Markdownlint
29-29: Expected: 5; Actual: 11; Too many cells, extra data will be missing Table column count (MD056, table-column-count)
docs/reference/cli.md (2)
`28-28`: **Approved: Addition of the `check` command.** The new `check` command enhances the CLI by providing a functionality to verify ZenStack schema files for syntax or semantic errors. This is a valuable addition for developers to ensure their schema files are correct before deployment. Also applies to: 238-250 --- `34-47`: **Verify: Removal of the `info` command.** The removal of the `info` command and its replacement with the `check` command needs further verification. If the `info` command provided unique functionality not covered by the `check` command, consider maintaining it or providing an alternative method to access the same information.
docs/guides/check-permission.md (1)
`191-191`: **Approved: Addition of the limitation regarding API compatibility with edge runtime environments.** The documentation now clearly states that the API is not supported on platforms like Cloudflare Workers or Vercel Edge, which is crucial for users to be aware of the operational boundaries.
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): > :bangbang: **IMPORTANT** > Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged. - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` 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) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.