feat(metrics): expose the res FastifyReply object in AuroraPortalContext#966
Conversation
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
📝 WalkthroughWalkthrough
ChangesExpose FastifyReply on AuroraPortalContext
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Pull request overview
This PR exposes the Fastify reply object (res: FastifyReply) on AuroraPortalContext, enabling downstream tRPC procedures to set response headers/cookies.
Changes:
- Added
res: FastifyReplytoAuroraPortalContextand returned it fromcreateContext. - Updated one router test’s mock context to include a mock
res. - Added a changeset to release the update as a patch.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/aurora/src/server/context.ts | Extends the tRPC context with res: FastifyReply and includes it in the created context object. |
| packages/aurora/src/server/Compute/routers/flavorRouter.test.ts | Updates the mock context to provide a mock res to satisfy the new context shape. |
| .changeset/chilly-guests-design.md | Adds a patch changeset documenting the new context capability. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Expose the
res(FastifyReply) object inAuroraPortalContextto allow consumer tRPC procedures to set response headers and cookies.Changes Made
res: FastifyReplyto theAuroraPortalContextinterface incontext.tsFastifyReplyimport from "fastify" incontext.tscreateContextto includeres: opts.resin the returned contextRelated Issues
Screenshots (if applicable)
N/A - Backend change only.
Testing Instructions
pnpm ipnpm run testpnpm run typecheckChecklist
Summary by CodeRabbit