-
-
Notifications
You must be signed in to change notification settings - Fork 11
feat(server): migrate tanstack-start adapter #344
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
|
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. WalkthroughThis PR introduces a new TanStack Start server adapter for the ZenStack framework, complete with handler implementation and comprehensive test coverage. Additionally, it applies widespread formatting updates across test and schema files, including quote style normalization, trailing commas, and multi-line restructuring of imports and literals. Package exports and build configuration are updated to support the new adapter. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35–45 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
|
Claude finished @ymc9's task —— View job Code Review for TanStack Start AdapterReviewed the new TanStack Start adapter implementation. Here's my comprehensive feedback: 🏗️ Code Quality & ArchitectureExcellent consistency with existing patterns: The implementation follows the established adapter architecture perfectly, matching the structure and conventions of other adapters (SvelteKit, Hono, etc.). Well-structured exports ( 🐛 Potential IssuesHTTP Status Code Inconsistency (
Incomplete Error Handling (
🔒 Security ConsiderationsGood security practices:
Missing request validation:
🚀 Performance ConsiderationsEfficient implementation:
Minor optimization opportunity:
🧪 Test Coverage AssessmentComprehensive test suite (
Test quality is excellent - follows established patterns and covers edge cases thoroughly. 📦 Configuration & BuildProper package.json integration:
Missing peerDependency: Consider adding TanStack Start as an optional peer dependency for better dependency management. 🔄 Consistency with Framework PatternsTanStack Start specific implementation:
📝 Recommendations
✨ Overall AssessmentExcellent implementation that maintains high code quality standards. The adapter follows established patterns perfectly and includes comprehensive test coverage. Only minor consistency issues identified. Ready to merge with the status code fix recommended above. |
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 TanStack Start as a new server adapter for ZenStack. The implementation follows the established pattern used by existing adapters like Hono and SvelteKit.
- Adds a new TanStack Start adapter that handles CRUD operations via catch-all routes using the
_splatparameter - Implements both RPC and REST API handler support
- Adds comprehensive test coverage for the new adapter
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/server/tsup.config.ts | Adds build configuration entry for the tanstack-start adapter |
| packages/server/package.json | Adds export paths for the tanstack-start adapter module |
| packages/server/src/adapter/tanstack-start/index.ts | Defines the public API and type definitions for the TanStack Start adapter |
| packages/server/src/adapter/tanstack-start/handler.ts | Implements the core request handling logic for TanStack Start routes |
| packages/server/test/adapter/tanstack-start.test.ts | Provides comprehensive test coverage for RPC and REST API handlers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Claude finished @ymc9's task —— View job Code Review for TanStack Start AdapterReviewed the new TanStack Start adapter implementation. Here's my comprehensive feedback: Progress Checklist:
🏗️ Code Quality & ArchitectureExcellent consistency with existing patterns: The implementation follows the established adapter architecture perfectly, matching the structure and conventions of other adapters (SvelteKit, Hono, etc.). Well-structured exports ( 🐛 Potential IssuesHTTP Status Code Inconsistency (
Incomplete Error Handling (
🔒 Security ConsiderationsGood security practices:
Missing request validation:
🚀 Performance ConsiderationsEfficient implementation:
Minor optimization opportunity:
🧪 Test Coverage AssessmentComprehensive test suite (
Test quality is excellent - follows established patterns and covers edge cases thoroughly. 📦 Configuration & BuildProper package.json integration:
Missing peerDependency: Consider adding TanStack Start as an optional peer dependency for better dependency management. 🔄 Consistency with Framework PatternsTanStack Start specific implementation:
📝 Recommendations
✨ Overall AssessmentExcellent implementation that maintains high code quality standards. The adapter follows established patterns perfectly and includes comprehensive test coverage. Only minor consistency issues identified. Ready to merge with the status code fix recommended above. |
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 (2)
packages/server/src/adapter/tanstack-start/handler.ts (2)
40-47: Consider improving the comment for clarity.The empty catch block is intentional and reasonable (failed parsing leaves
requestBodyundefined for the API handler to deal with), but the comment could be more descriptive to make this clear to future maintainers.Apply this diff for a clearer comment:
} catch { - // noop + // If body parsing fails, requestBody remains undefined and the API handler will validate as needed }
49-62: Minor: Non-null assertion is unnecessary.The
Request.methodproperty is always defined according to the Web Fetch API specification, making the non-null assertion on line 51 technically redundant (though harmless).Apply this diff if you prefer to remove the redundant assertion:
- const r = await options.apiHandler.handleRequest({ - method: request.method!, + const r = await options.apiHandler.handleRequest({ + method: request.method,
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/server/package.json(1 hunks)packages/server/src/adapter/tanstack-start/handler.ts(1 hunks)packages/server/src/adapter/tanstack-start/index.ts(1 hunks)packages/server/test/adapter/tanstack-start.test.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/tanstack-start/index.tspackages/server/src/adapter/tanstack-start/handler.tspackages/server/tsup.config.tspackages/server/package.jsonpackages/server/test/adapter/tanstack-start.test.ts
🧬 Code graph analysis (3)
packages/server/src/adapter/tanstack-start/index.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)
packages/server/src/adapter/tanstack-start/handler.ts (4)
packages/sdk/src/schema/schema.ts (1)
SchemaDef(10-18)packages/server/src/adapter/tanstack-start/index.ts (1)
TanStackStartOptions(9-14)packages/server/src/types.ts (1)
Response(52-62)packages/server/src/adapter/common.ts (1)
logInternalError(15-17)
packages/server/test/adapter/tanstack-start.test.ts (3)
packages/server/src/adapter/tanstack-start/index.ts (1)
TanStackStartOptions(9-14)packages/sdk/src/schema/schema.ts (1)
SchemaDef(10-18)packages/testtools/src/client.ts (2)
createTestClient(52-169)createPolicyTestClient(179-190)
⏰ 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). (2)
- GitHub Check: build-test (20.x, postgresql)
- GitHub Check: build-test (20.x, sqlite)
🔇 Additional comments (14)
packages/server/tsup.config.ts (1)
13-13: LGTM!The build entry for the TanStack Start adapter follows the same pattern as other adapters and correctly points to the index file.
packages/server/package.json (2)
20-20: LGTM!Good addition to keywords for package discoverability.
111-121: LGTM!The export entry for the TanStack Start adapter is correctly configured with both ESM and CJS support, matching the pattern of other adapters.
packages/server/src/adapter/tanstack-start/index.ts (3)
1-4: LGTM!Imports are clean and appropriate for the adapter implementation.
9-14: LGTM!The interface design is clean and provides the necessary flexibility for client resolution with both synchronous and asynchronous support.
20-24: LGTM!The wrapper function provides a clean, typed public API while delegating the implementation details to the handler factory.
packages/server/test/adapter/tanstack-start.test.ts (4)
7-15: LGTM!The helper functions are well-focused and provide clean abstractions for request creation and response parsing.
17-73: LGTM!The test client helper is well-designed and accurately simulates the TanStack Start request/response flow, including proper handling of query parameters, request bodies, and the catch-all route pattern.
75-196: LGTM!Excellent test coverage for RPC operations, including comprehensive CRUD operations and access policy scenarios. The tests verify both successful operations and proper handling of forbidden requests.
198-235: LGTM!The REST API tests provide solid coverage of core operations and properly validate JSON:API format compliance, including filtering and resource identification.
packages/server/src/adapter/tanstack-start/handler.ts (4)
11-13: LGTM!The factory function signature is clean and properly typed for TanStack Start's handler pattern.
15-23: LGTM!Client resolution with appropriate error handling when the client is unavailable.
25-38: LGTM!URL parsing and path extraction correctly implements TanStack Start's catch-all route pattern using the
_splatparameter.
63-71: LGTM!Proper error handling with internal error logging while returning a secure, generic error message to clients.
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 (1)
packages/server/test/adapter/tanstack-start.test.ts (1)
7-10: Consider adding Content-Type header for requests with body.The
makeRequesthelper doesn't set aContent-Type: application/jsonheader when a body is present. While the TanStack Start handler may handle this gracefully, it's best practice to include the header for requests with JSON payloads.Apply this diff:
function makeRequest(method: string, url: string, body?: any): Request { const payload = body ? JSON.stringify(body) : undefined; - return new Request(url, { method, body: payload }); + const headers = payload ? { 'Content-Type': 'application/json' } : undefined; + return new Request(url, { method, body: payload, headers }); }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (32)
packages/cli/src/actions/migrate.ts(1 hunks)packages/server/package.json(1 hunks)packages/server/src/adapter/common.ts(2 hunks)packages/server/src/adapter/fastify/index.ts(0 hunks)packages/server/src/adapter/fastify/plugin.ts(1 hunks)packages/server/src/adapter/nuxt/handler.ts(1 hunks)packages/server/src/adapter/tanstack-start/handler.ts(1 hunks)packages/server/src/adapter/tanstack-start/index.ts(1 hunks)packages/server/test/adapter/elysia.test.ts(7 hunks)packages/server/test/adapter/fastify.test.ts(3 hunks)packages/server/test/adapter/hono.test.ts(7 hunks)packages/server/test/adapter/sveltekit.test.ts(6 hunks)packages/server/test/adapter/tanstack-start.test.ts(1 hunks)packages/server/tsup.config.ts(1 hunks)tests/e2e/orm/schemas/basic/input.ts(1 hunks)tests/e2e/orm/schemas/basic/models.ts(1 hunks)tests/e2e/orm/schemas/basic/schema.ts(1 hunks)tests/e2e/orm/schemas/delegate/input.ts(1 hunks)tests/e2e/orm/schemas/delegate/models.ts(1 hunks)tests/e2e/orm/schemas/delegate/schema.ts(1 hunks)tests/e2e/orm/schemas/name-mapping/input.ts(1 hunks)tests/e2e/orm/schemas/name-mapping/models.ts(1 hunks)tests/e2e/orm/schemas/name-mapping/schema.ts(1 hunks)tests/e2e/orm/schemas/petstore/input.ts(1 hunks)tests/e2e/orm/schemas/petstore/models.ts(1 hunks)tests/e2e/orm/schemas/petstore/schema.ts(1 hunks)tests/e2e/orm/schemas/todo/input.ts(1 hunks)tests/e2e/orm/schemas/todo/models.ts(1 hunks)tests/e2e/orm/schemas/todo/schema.ts(1 hunks)tests/e2e/orm/schemas/typing/input.ts(1 hunks)tests/e2e/orm/schemas/typing/models.ts(1 hunks)tests/e2e/orm/schemas/typing/schema.ts(1 hunks)
💤 Files with no reviewable changes (1)
- packages/server/src/adapter/fastify/index.ts
🧰 Additional context used
📓 Path-based instructions (3)
{packages,samples,tests}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place packages only under
packages/,samples/, ortests/
Files:
packages/server/src/adapter/nuxt/handler.tspackages/server/test/adapter/hono.test.tspackages/server/src/adapter/tanstack-start/handler.tspackages/server/tsup.config.tstests/e2e/orm/schemas/petstore/schema.tspackages/server/test/adapter/tanstack-start.test.tstests/e2e/orm/schemas/delegate/input.tspackages/server/src/adapter/fastify/plugin.tstests/e2e/orm/schemas/delegate/schema.tspackages/server/package.jsonpackages/server/src/adapter/tanstack-start/index.tspackages/cli/src/actions/migrate.tstests/e2e/orm/schemas/typing/schema.tstests/e2e/orm/schemas/petstore/models.tstests/e2e/orm/schemas/basic/schema.tspackages/server/test/adapter/sveltekit.test.tstests/e2e/orm/schemas/petstore/input.tstests/e2e/orm/schemas/todo/schema.tstests/e2e/orm/schemas/name-mapping/models.tstests/e2e/orm/schemas/name-mapping/input.tstests/e2e/orm/schemas/name-mapping/schema.tstests/e2e/orm/schemas/basic/input.tstests/e2e/orm/schemas/todo/models.tspackages/server/src/adapter/common.tstests/e2e/orm/schemas/typing/input.tstests/e2e/orm/schemas/todo/input.tspackages/server/test/adapter/fastify.test.tspackages/server/test/adapter/elysia.test.tstests/e2e/orm/schemas/basic/models.tstests/e2e/orm/schemas/delegate/models.tstests/e2e/orm/schemas/typing/models.ts
tests/e2e/**
📄 CodeRabbit inference engine (CLAUDE.md)
End-to-end tests must live under
tests/e2e/
Files:
tests/e2e/orm/schemas/petstore/schema.tstests/e2e/orm/schemas/delegate/input.tstests/e2e/orm/schemas/delegate/schema.tstests/e2e/orm/schemas/typing/schema.tstests/e2e/orm/schemas/petstore/models.tstests/e2e/orm/schemas/basic/schema.tstests/e2e/orm/schemas/petstore/input.tstests/e2e/orm/schemas/todo/schema.tstests/e2e/orm/schemas/name-mapping/models.tstests/e2e/orm/schemas/name-mapping/input.tstests/e2e/orm/schemas/name-mapping/schema.tstests/e2e/orm/schemas/basic/input.tstests/e2e/orm/schemas/todo/models.tstests/e2e/orm/schemas/typing/input.tstests/e2e/orm/schemas/todo/input.tstests/e2e/orm/schemas/basic/models.tstests/e2e/orm/schemas/delegate/models.tstests/e2e/orm/schemas/typing/models.ts
**/schema.ts
📄 CodeRabbit inference engine (CLAUDE.md)
The generated TypeScript schema should be named
schema.ts
Files:
tests/e2e/orm/schemas/petstore/schema.tstests/e2e/orm/schemas/delegate/schema.tstests/e2e/orm/schemas/typing/schema.tstests/e2e/orm/schemas/basic/schema.tstests/e2e/orm/schemas/todo/schema.tstests/e2e/orm/schemas/name-mapping/schema.ts
🧠 Learnings (4)
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
PR: zenstackhq/zenstack-v3#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Applies to **/schema.ts : The generated TypeScript schema should be named `schema.ts`
Applied to files:
tests/e2e/orm/schemas/petstore/schema.tstests/e2e/orm/schemas/delegate/schema.tstests/e2e/orm/schemas/typing/schema.tstests/e2e/orm/schemas/petstore/models.tstests/e2e/orm/schemas/basic/schema.tstests/e2e/orm/schemas/todo/schema.tstests/e2e/orm/schemas/name-mapping/models.tstests/e2e/orm/schemas/name-mapping/input.tstests/e2e/orm/schemas/name-mapping/schema.tstests/e2e/orm/schemas/basic/input.tstests/e2e/orm/schemas/todo/models.tstests/e2e/orm/schemas/typing/input.tstests/e2e/orm/schemas/todo/input.tstests/e2e/orm/schemas/basic/models.tstests/e2e/orm/schemas/delegate/models.ts
📚 Learning: 2025-10-21T16:09:31.218Z
Learnt from: ymc9
PR: zenstackhq/zenstack-v3#319
File: packages/runtime/src/client/executor/zenstack-query-executor.ts:63-72
Timestamp: 2025-10-21T16:09:31.218Z
Learning: In ZenStack, TypeDefs can be inherited by models. When a TypeDef contains fields with `map` attributes, those mapped field names need to be processed by the QueryNameMapper since they become part of the inheriting model's schema. Therefore, when checking if a schema has mapped names (e.g., in `schemaHasMappedNames`), both `schema.models` and `schema.typeDefs` must be inspected for `@map` and `map` attributes.
Applied to files:
tests/e2e/orm/schemas/petstore/schema.tstests/e2e/orm/schemas/delegate/schema.tstests/e2e/orm/schemas/typing/schema.tstests/e2e/orm/schemas/basic/schema.tstests/e2e/orm/schemas/todo/schema.tstests/e2e/orm/schemas/name-mapping/models.tstests/e2e/orm/schemas/name-mapping/input.tstests/e2e/orm/schemas/name-mapping/schema.tstests/e2e/orm/schemas/typing/input.tstests/e2e/orm/schemas/basic/models.tstests/e2e/orm/schemas/typing/models.ts
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
PR: zenstackhq/zenstack-v3#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Applies to **/schema.zmodel : Name ZModel schema files `schema.zmodel`
Applied to files:
tests/e2e/orm/schemas/petstore/schema.ts
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
PR: zenstackhq/zenstack-v3#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Database migrations use Prisma CLI under the hood
Applied to files:
packages/cli/src/actions/migrate.ts
🧬 Code graph analysis (18)
packages/server/test/adapter/hono.test.ts (2)
packages/server/src/adapter/hono/handler.ts (1)
createHonoHandler(17-55)packages/server/test/utils.ts (1)
makeUrl(31-33)
packages/server/src/adapter/tanstack-start/handler.ts (4)
packages/sdk/src/schema/schema.ts (1)
SchemaDef(10-18)packages/server/src/adapter/tanstack-start/index.ts (1)
TanStackStartOptions(9-17)packages/server/src/types.ts (1)
Response(52-62)packages/server/src/adapter/common.ts (1)
logInternalError(15-21)
tests/e2e/orm/schemas/petstore/schema.ts (2)
tests/e2e/orm/schemas/basic/schema.ts (1)
schema(9-395)packages/orm/src/schema/expression.ts (1)
ExpressionUtils(16-120)
packages/server/test/adapter/tanstack-start.test.ts (1)
packages/server/src/adapter/tanstack-start/index.ts (2)
TanStackStartOptions(9-17)TanStackStartHandler(23-27)
packages/server/src/adapter/fastify/plugin.ts (1)
packages/orm/src/client/contract.ts (1)
ClientContract(50-170)
tests/e2e/orm/schemas/delegate/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
ExpressionUtils(16-120)
packages/server/src/adapter/tanstack-start/index.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)
tests/e2e/orm/schemas/typing/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
ExpressionUtils(16-120)
tests/e2e/orm/schemas/petstore/models.ts (5)
tests/e2e/orm/schemas/basic/models.ts (1)
User(10-10)tests/e2e/orm/schemas/delegate/models.ts (1)
User(10-10)tests/e2e/orm/schemas/name-mapping/models.ts (1)
User(10-10)tests/e2e/orm/schemas/todo/models.ts (1)
User(12-12)tests/e2e/orm/schemas/typing/models.ts (1)
User(10-10)
tests/e2e/orm/schemas/basic/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
ExpressionUtils(16-120)
packages/server/test/adapter/sveltekit.test.ts (1)
packages/server/test/utils.ts (1)
makeUrl(31-33)
tests/e2e/orm/schemas/todo/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
ExpressionUtils(16-120)
tests/e2e/orm/schemas/name-mapping/models.ts (5)
tests/e2e/orm/schemas/basic/models.ts (2)
User(10-10)Post(11-11)tests/e2e/orm/schemas/delegate/models.ts (1)
User(10-10)tests/e2e/orm/schemas/petstore/models.ts (1)
User(10-10)tests/e2e/orm/schemas/todo/models.ts (1)
User(12-12)tests/e2e/orm/schemas/typing/models.ts (2)
User(10-10)Post(11-11)
tests/e2e/orm/schemas/name-mapping/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
ExpressionUtils(16-120)
tests/e2e/orm/schemas/basic/input.ts (2)
tests/e2e/orm/schemas/delegate/input.ts (1)
UserGetPayload(53-57)tests/e2e/orm/schemas/name-mapping/input.ts (2)
UserGetPayload(53-57)PostGetPayload(77-81)
tests/e2e/orm/schemas/todo/input.ts (1)
tests/e2e/orm/schemas/basic/input.ts (1)
UserGetPayload(53-57)
packages/server/test/adapter/elysia.test.ts (2)
packages/server/src/adapter/elysia/handler.ts (1)
createElysiaHandler(25-77)packages/server/test/utils.ts (1)
makeUrl(31-33)
tests/e2e/orm/schemas/delegate/models.ts (5)
tests/e2e/orm/schemas/basic/models.ts (2)
User(10-10)Comment(12-12)tests/e2e/orm/schemas/name-mapping/models.ts (1)
User(10-10)tests/e2e/orm/schemas/petstore/models.ts (1)
User(10-10)tests/e2e/orm/schemas/todo/models.ts (1)
User(12-12)tests/e2e/orm/schemas/typing/models.ts (1)
User(10-10)
⏰ 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). (2)
- GitHub Check: build-test (20.x, sqlite)
- GitHub Check: build-test (20.x, postgresql)
🔇 Additional comments (36)
packages/server/src/adapter/nuxt/handler.ts (1)
3-3: LGTM!Import formatting change only—no functional impact.
packages/cli/src/actions/migrate.ts (1)
89-89: LGTM!Trailing comma addition—formatting-only change with no impact on command construction.
packages/server/test/adapter/fastify.test.ts (1)
16-16: LGTM!Formatting-only updates (trailing commas)—no changes to test logic or assertions.
Also applies to: 52-52, 100-100
packages/server/test/adapter/hono.test.ts (1)
13-15: LGTM!Formatting-only updates (multiline formatting and trailing commas)—no changes to test behavior.
Also applies to: 34-34, 54-54, 68-69, 75-75, 92-92, 104-104, 131-131
packages/server/package.json (1)
111-121: LGTM! New TanStack Start adapter export added correctly.The export structure follows the established pattern for other adapters, with proper dual-package support (ESM/CJS) and type definitions.
packages/server/test/adapter/elysia.test.ts (1)
14-18: LGTM!Formatting-only updates (multiline formatting and trailing commas)—no changes to test behavior.
Also applies to: 38-38, 58-58, 72-72, 79-79, 96-97, 109-109, 136-136
packages/server/test/adapter/sveltekit.test.ts (1)
12-16: LGTM!Formatting-only updates (multiline formatting and trailing commas)—no changes to test behavior.
Also applies to: 35-35, 55-55, 69-69, 76-76, 104-104, 131-131
tests/e2e/orm/schemas/basic/schema.ts (1)
8-395: LGTM! Auto-generated schema with systematic formatting updates.This file is auto-generated (as noted in the header), and the changes reflect consistent quote normalization (double to single quotes) and trailing comma additions. No manual review concerns for generated code.
packages/server/src/adapter/common.ts (1)
1-21: LGTM! Formatting improvements.The changes normalize quote style and improve readability of the function call with multi-line formatting. No semantic changes to the exported API.
tests/e2e/orm/schemas/delegate/schema.ts (1)
1-543: LGTM! Consistent formatting in auto-generated schema.The changes apply project-wide formatting standards (single quotes, trailing commas, multi-line formatting) without altering the schema structure, model definitions, relationships, or discriminators.
tests/e2e/orm/schemas/delegate/input.ts (1)
8-201: LGTM! Improved import structure and consistent formatting.The imports are reorganized into logical groups with multi-line formatting, and all type exports use consistent single quotes. No changes to type signatures or semantics.
packages/server/src/adapter/fastify/plugin.ts (1)
19-22: LGTM! Improved readability with multi-line formatting.The getClient property is reformatted to multi-line structure, improving readability while preserving the exact same type signature.
tests/e2e/orm/schemas/delegate/models.ts (1)
8-16: LGTM! Consistent quote style normalization.All imports and type exports updated to use single quotes, maintaining consistency with the project's formatting standards. No changes to type definitions or behavior.
packages/server/tsup.config.ts (1)
13-13: LGTM! Build configuration for the new adapter is correct.The new TanStack Start entry follows the established pattern for other adapters and correctly points to the adapter's entry point.
tests/e2e/orm/schemas/name-mapping/input.ts (1)
1-81: Auto-generated file with formatting updates applied consistently.This file is automatically generated by the ZenStack CLI (as noted in the header). The changes apply consistent formatting (single quotes, multi-line imports) without altering any type definitions or exports.
tests/e2e/orm/schemas/todo/input.ts (1)
1-153: Auto-generated file with formatting updates applied consistently.This file is automatically generated by the ZenStack CLI. The changes apply consistent formatting (single quotes, multi-line structure) without any semantic modifications.
tests/e2e/orm/schemas/petstore/input.ts (1)
1-105: Auto-generated file with formatting updates applied consistently.This file is automatically generated by the ZenStack CLI. The changes maintain consistency with other schema files in the codebase through standardized formatting.
tests/e2e/orm/schemas/name-mapping/schema.ts (1)
1-103: Auto-generated schema with consistent formatting applied.This schema definition file is automatically generated by the ZenStack CLI. The formatting changes (single quotes, multi-line structure) are applied uniformly without modifying the schema structure or semantics.
tests/e2e/orm/schemas/petstore/models.ts (1)
1-12: Auto-generated models with consistent quote style applied.This file is automatically generated by the ZenStack CLI. The changes standardize quote usage without altering the exported type definitions.
tests/e2e/orm/schemas/todo/models.ts (1)
1-14: Auto-generated models with consistent quote style applied.This file is automatically generated by the ZenStack CLI. The formatting changes maintain consistency with the codebase without affecting the type definitions.
tests/e2e/orm/schemas/petstore/schema.ts (1)
1-258: Auto-generated schema with consistent formatting applied.This schema definition file is automatically generated by the ZenStack CLI. The formatting changes (single quotes, multi-line structure for fields and attributes) maintain consistency without altering schema semantics or policy logic.
tests/e2e/orm/schemas/name-mapping/models.ts (1)
8-11: Formatting consistency looks good.Switching these generated exports to single quotes keeps them aligned with the other schema fixtures—no functional changes observed.
tests/e2e/orm/schemas/basic/input.ts (1)
8-105: Reflowed imports/readability improvement acknowledged.The multi-line import grouping and literal quote normalization keep this generator output in sync with the rest of the suite without altering types.
tests/e2e/orm/schemas/todo/schema.ts (1)
8-834: Schema diff is formatting-only.Confirmed the generated schema preserves all model metadata and policy expressions; only literal quoting and array formatting changed.
packages/server/src/adapter/tanstack-start/handler.ts (1)
11-72: Handler flow reads solid.Client resolution,
_splatpath guarding, query extraction, and error handling align with the adapter pattern used elsewhere—no issues spotted.tests/e2e/orm/schemas/typing/input.ts (1)
8-177: Import/style normalization verified.Everything here is a formatting refresh; exported typings remain identical.
tests/e2e/orm/schemas/typing/schema.ts (1)
8-407: No semantic deltas detected.The generated schema keeps the same models, enums, and policies; changes are purely quote/style adjustments.
tests/e2e/orm/schemas/basic/models.ts (1)
8-14: LGTM! Formatting standardization in generated file.The quote style changes (double → single quotes) are consistent with the broader formatting standardization across the PR. Since this is a generated file, these changes reflect updates to the code generator itself.
packages/server/test/adapter/tanstack-start.test.ts (4)
12-15: LGTM! Simple and effective helper for tests.The
unmarshalfunction is appropriate for test scenarios where JSON parsing errors should surface as test failures.
24-78: LGTM! Well-designed test client utility.The
makeTestClientfunction properly handles:
- TanStack Start's
_splatrouting parameter- Query parameter encoding for GET/DELETE requests
- Consistent request/response handling across HTTP methods
The implementation aligns with TanStack Start's handler contract and provides a clean testing interface.
80-221: LGTM! Comprehensive RPC handler test coverage.The test suite thoroughly validates:
- Complete CRUD lifecycle (create, read, update, delete operations)
- Advanced operations (upsert, count, aggregate, groupBy)
- Policy enforcement with appropriate status codes (403 for forbidden, 404 for not found)
- Final state verification
The tests follow established patterns from other adapter test suites and provide excellent coverage.
223-267: LGTM! Solid REST handler test coverage.The REST API tests properly validate:
- JSON:API format compliance (data.type, data.attributes structure)
- Resource-level operations (GET, PUT, DELETE on specific IDs)
- Collection filtering with query parameters
- Data integrity across operations
The test suite complements the RPC tests and ensures the adapter works with both API styles.
packages/server/src/adapter/tanstack-start/index.ts (3)
1-17: LGTM! Well-designed adapter interface.The
TanStackStartOptionsinterface properly:
- Extends
CommonAdapterOptionsfor consistency with other adapters- Provides a flexible
getClientcallback for per-request client instantiation- Supports both synchronous and asynchronous client creation
- Includes clear documentation
The design aligns with established patterns from other server adapters in the codebase.
19-27: LGTM! Clean factory function implementation.The
TanStackStartHandlerfunction follows the adapter pattern used across the codebase:
- Thin wrapper that delegates to the core Handler implementation
- Proper type inference with
ReturnType<typeof Handler>- Comprehensive JSDoc with documentation link
- Type-safe generic constraints
The implementation is clean and maintainable.
29-29: LGTM! Flexible export pattern.Providing both named (line 23) and default exports gives users flexibility in how they import the adapter, which is a good developer experience practice.
tests/e2e/orm/schemas/typing/models.ts (1)
8-17: LGTM! Consistent formatting in generated file.The changes standardize quote style (double → single quotes) and add explicit type-only imports, consistent with the formatting updates across other generated schema files in this PR.
Summary by CodeRabbit
Release Notes
New Features
Chores