Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/runtime/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export {
} from "h3";
export type { H3Event, EventHandlerRequest, EventHandlerWithFetch } from "h3";

// srvx
export type { FastResponse, FastURL } from "srvx";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Keep srvx context exports consistent across Nitro entry points.

Removing ServerRequest matches the PR objective, but this entry point still omits ServerRequestContext and ServerRuntimeContext, which are exposed by src/types/srvx.ts and used by Nitro’s request APIs. Consumers importing Nitro types from this module cannot access the complete srvx contract.

At minimum, re-export the context types here, or confirm that they are intentionally declaration-only and adjust the public typing contract accordingly.

#!/bin/bash
rg -n -C 3 '\b(ServerRequestContext|ServerRuntimeContext|serverFetch)\b' src
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/runtime/nitro.ts` at line 27, Update the srvx type re-exports in the
Nitro entry point to include ServerRequestContext and ServerRuntimeContext
alongside FastResponse and FastURL. Keep ServerRequest removed, and ensure
consumers importing types from this module receive the complete supported srvx
contract.


// Runtime
export function serverFetch(
resource: string | URL | Request,
Expand Down
6 changes: 5 additions & 1 deletion src/types/srvx.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export type { ServerRequest } from "srvx";
export type {
ServerRequest,
ServerRequestContext,
ServerRuntimeContext,
} from "srvx";