Skip to content

refactor(backend): refactor middleware stack for composability and te…#415

Open
vstudio79 wants to merge 1 commit into
Smartdevs17:mainfrom
vstudio79:refactor/middleware-composability
Open

refactor(backend): refactor middleware stack for composability and te…#415
vstudio79 wants to merge 1 commit into
Smartdevs17:mainfrom
vstudio79:refactor/middleware-composability

Conversation

@vstudio79
Copy link
Copy Markdown

Closes: #364

…st coverage

- Extract inline trace middleware from index.ts into dedicated trace.ts
- Extract inline cache-control middleware into dedicated cache-control.ts
- Create compose.ts utility for async-safe middleware composition
- Create barrel index.ts exporting all middleware from single entry point
- Refactor deprecation.ts to use structured pino logging (instead of console.warn)
- Refactor session.ts to use AppError for centralized error handling
- Create comprehensive test files: requestId, errorHandler, session, slaTracking, validate, requireFlag, idempotency, compose, trace, cache-control
- Each middleware now has single responsibility with centralized error handling
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@vstudio79 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@vstudio79 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor backend middleware stack for composability and testability

1 participant