-
-
Notifications
You must be signed in to change notification settings - Fork 38
Feat: add tanstack start doc #494
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
|
@digoburigo is attempting to deploy a commit to the ZenStack Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdds a new documentation page describing the TanStack Start server adapter, including installation, mounting via TanStackStartHandler, configuration (AdapterOptions, getPrisma), usage examples for a catch-all API route, and CRUD handler exposure (GET/POST/PUT/PATCH/DELETE). No source code or public API changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
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 (4)
docs/reference/server-adapters/tanstack-start.mdx (4)
19-21: Install snippet likely missing a required package (@zenstackhq/runtime).The example imports
enhancefrom@zenstackhq/runtime, but the install section only installs@zenstackhq/server. Add@zenstackhq/runtimeto prevent copy/paste failures.-```bash -npm install @zenstackhq/server -``` +```bash +npm install @zenstackhq/server @zenstackhq/runtime +```
27-55: Verify adapter symbol and broaden handler map (catch‑all, CORS).
- Confirm the exported API is
TanStackStartHandlerfrom@zenstackhq/server/tanstack-start(naming often follows acreate...Handlerpattern). Also confirm the catch‑all path'/api/$'matches nested paths as intended; if you need deep segments, ensure you’re using the correct “splat” route.- Consider handling
OPTIONSandHEADto avoid 405s and enable CORS preflights.handlers: { GET: handler, POST: handler, PUT: handler, PATCH: handler, DELETE: handler, + OPTIONS: handler, + HEAD: handler, }
7-9: Imports: consistency and existence of partials.
- Add a semicolon to the
UsingAPIimport for consistency.- Please confirm
./_error-handling.md,./_options.mdx, and./_using-api.mdxexist and default‑export MDX components (MDX loaders sometimes require default exports).-import UsingAPI from './_using-api.mdx' +import UsingAPI from './_using-api.mdx';
59-59: Prefer concrete types forgetPrismain AdapterOptions.Documenting
unknownmakes usage vague. Consider specifying the expected Prisma/Enhanced Prisma type to improve DX and autocomplete.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/reference/server-adapters/tanstack-start.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/reference/server-adapters/tanstack-start.mdx
[grammar] ~7-~7: There might be a mistake here.
Context: ...rorHandling from './_error-handling.md'; import AdapterOptions from './_options.m...
(QB_NEW_EN)
[grammar] ~8-~8: There might be a mistake here.
Context: ...rt AdapterOptions from './_options.mdx'; import UsingAPI from './_using-api.mdx' ...
(QB_NEW_EN)
ymc9
left a comment
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.
Thank you @digoburigo ! I'm wrapping up the 2.20 releasae.
Summary by CodeRabbit