- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 11
feat(server): migrate nuxt adapter #342
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
| Warning Rate limit exceeded@ymc9 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 59 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the  We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
 📒 Files selected for processing (3)
 Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds framework adapters and build/packaging surfaces for server: new package.json exports and deps for Elysia/Fastify/Next/Hono/Nuxt, tsup build entries, Hono path extraction tweak, and a new Nuxt H3-compatible event handler with getClient integration. Changes
 Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 
 Possibly related PRs
 Poem
 Pre-merge checks and finishing touches❌ Failed checks (1 warning)
 ✅ Passed checks (2 passed)
 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  | 
| Claude finished @ymc9's task —— View job Code Review: Nuxt Adapter MigrationCompleted comprehensive review of the Nuxt adapter implementation. Review Summary✅ Overall Assessment: LGTM with Minor Improvements Suggested The Nuxt adapter implementation follows the established patterns from other adapters and integrates well with the existing server package architecture. Detailed Findings📋 Code Quality & ConsistencyPositive: 
 Suggestions: 
 🐛 Potential Issues
 🔒 Security Considerations
 ⚡ Performance Considerations
 🧪 Test Coverage
 📦 Package ConfigurationPositive: 
 Notes: 
 🔧 Recommended Improvements
 ✅ Excellent Practices Maintained
 🎯 VerdictReady to merge after addressing the error logging inconsistency. The implementation is solid and follows established patterns well. The missing tests and minor error handling improvements can be addressed in follow-up PRs if needed. | 
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.
Pull Request Overview
This PR adds support for new server framework adapters (Fastify, Elysia, Nuxt, and Hono) to the ZenStack server package. The changes include updating build configuration and package exports to support these new adapters.
- Added four new adapter entry points in the tsup build configuration
- Implemented a Nuxt adapter handler using the h3 event framework
- Updated the Hono adapter to use the native ctx.req.routePathAPI instead of importing fromhono/route
- Added package exports and peer dependencies for all new adapters
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description | 
|---|---|
| packages/server/tsup.config.ts | Added build entry points for fastify, elysia, nuxt, and hono adapters | 
| packages/server/src/adapter/nuxt/index.ts | Created barrel export for nuxt adapter | 
| packages/server/src/adapter/nuxt/handler.ts | Implemented createEventHandler function for Nuxt/h3 integration | 
| packages/server/src/adapter/hono/handler.ts | Updated to use native ctx.req.routePathproperty instead ofroutePath()helper function | 
| packages/server/package.json | Added package exports, dev dependencies, peer dependencies, and peer dependency metadata for new adapters | 
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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: 5
🧹 Nitpick comments (1)
packages/server/src/adapter/nuxt/handler.ts (1)
24-29: Consider using h3'ssetResponseStatushelper.Direct mutation of
event.res.statusworks but is not the idiomatic approach in h3 2.x. Consider usingsetResponseStatus(event, 500)for consistency with h3 conventions.+import { + type EventHandlerRequest, + H3Event, + defineEventHandler, + getQuery, + getRouterParams, + readBody, + setResponseStatus +} from 'h3';const client = await options.getClient(event); if (!client) { - event.res.status = 500; + setResponseStatus(event, 500); return { message: 'unable to get ZenStackClient from request context' }; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
- pnpm-lock.yamlis excluded by- !**/pnpm-lock.yaml
📒 Files selected for processing (5)
- packages/server/package.json(3 hunks)
- packages/server/src/adapter/hono/handler.ts(1 hunks)
- packages/server/src/adapter/nuxt/handler.ts(1 hunks)
- packages/server/src/adapter/nuxt/index.ts(1 hunks)
- packages/server/tsup.config.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{packages,samples,tests}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place packages only under
packages/,samples/, ortests/
Files:
- packages/server/src/adapter/nuxt/index.ts
- packages/server/src/adapter/hono/handler.ts
- packages/server/tsup.config.ts
- packages/server/src/adapter/nuxt/handler.ts
- packages/server/package.json
🧬 Code graph analysis (1)
packages/server/src/adapter/nuxt/handler.ts (3)
packages/sdk/src/schema/schema.ts (1)
SchemaDef(10-18)packages/server/src/adapter/common.ts (1)
CommonAdapterOptions(8-13)packages/orm/src/client/contract.ts (1)
ClientContract(50-170)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Upload results
- GitHub Check: claude-review
- GitHub Check: build-test (20.x, postgresql)
- GitHub Check: build-test (20.x, sqlite)
🔇 Additional comments (4)
packages/server/src/adapter/nuxt/index.ts (1)
1-1: LGTM!Clean barrel export following the standard adapter pattern.
packages/server/tsup.config.ts (1)
8-11: LGTM!The new build entries correctly map to the adapter implementations and align with the public exports defined in package.json.
packages/server/src/adapter/nuxt/handler.ts (1)
1-21: LGTM!The imports and interface definition follow the established adapter patterns and correctly use h3 types.
packages/server/package.json (1)
52-101: LGTM!The new public exports follow a consistent pattern with proper type definitions for both ESM and CommonJS consumers.
| Claude finished @ymc9's task —— View job Code Review: Nuxt Adapter MigrationCompleted comprehensive review of the Nuxt adapter implementation and related changes. Review Summary✅ Overall Assessment: LGTM with Minor Improvements Suggested The Nuxt adapter implementation follows established patterns from other adapters and integrates well with the existing server package architecture. Detailed Findings📋 Code Quality & ConsistencyPositive: 
 Issues Identified: 
 🐛 Potential Issues
 🔒 Security Considerations
 ⚡ Performance Considerations
 🧪 Test Coverage
 📦 Package ConfigurationPositive: 
 Issues: 
 🔧 Recommended Improvements
 ✅ Excellent Practices Maintained
 🎯 VerdictReady to merge after addressing the minor consistency issues. The implementation is solid and follows established patterns well. The missing tests and peer dependency can be addressed in follow-up PRs if needed. The changes successfully extend ZenStack's framework support while maintaining code quality and consistency across adapters. | 
| Claude finished @ymc9's task —— View job Code Review: Nuxt Adapter MigrationCompleted comprehensive review of the Nuxt adapter implementation and related changes. Review Summary✅ Overall Assessment: LGTM with Minor Improvements Suggested The Nuxt adapter implementation follows established patterns from other adapters and integrates well with the existing server package architecture. Detailed Findings📋 Code Quality & ConsistencyPositive: 
 Minor Issues Identified: 
 🐛 Potential Issues
 🔒 Security Considerations
 ⚡ Performance Considerations
 🧪 Test Coverage
 📦 Package ConfigurationPositive: 
 Minor Issues: 
 🔧 Recommended Improvements
 ✅ Excellent Practices Maintained
 🎯 VerdictReady to merge ✅ The implementation is solid and follows established patterns well. The missing tests and minor improvements can be addressed in follow-up PRs if needed. The Nuxt adapter successfully extends ZenStack's framework support while maintaining code quality and consistency across adapters. The changes are well-structured and the adapter properly integrates with both h3 and Nuxt's event handling system. | 
| Claude finished @ymc9's task —— View job Code Review: Nuxt Adapter MigrationCompleted comprehensive review of the Nuxt adapter implementation and related changes. Review Summary✅ Overall Assessment: LGTM with Minor Improvements Suggested The Nuxt adapter implementation follows established patterns from other adapters and integrates well with the existing server package architecture. Detailed Findings📋 Code Quality & ConsistencyPositive: 
 Issues Identified: 
 🐛 Potential Issues
 🔒 Security Considerations
 ⚡ Performance Considerations
 🧪 Test Coverage
 📦 Package ConfigurationPositive: 
 Issues: 
 🔄 Framework IntegrationNuxt Adapter: 
 Other Changes: 
 🔧 Recommended Improvements
 ✅ Excellent Practices Maintained
 🎯 VerdictReady to merge after addressing the h3 peer dependency. The implementation is solid and follows established patterns well. The missing tests and path validation can be addressed in follow-up PRs if needed. The changes successfully extend ZenStack's framework support while maintaining code quality and consistency across adapters. Todo List 
 | 
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
Chores