-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
refactor(route)!: change method handling #588
Conversation
bd104f9
to
ca2412b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #588 +/- ##
==========================================
+ Coverage 36.79% 36.87% +0.08%
==========================================
Files 106 107 +1
Lines 7738 7767 +29
Branches 89 88 -1
==========================================
+ Hits 2847 2864 +17
- Misses 4890 4902 +12
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
913aaa6
to
74da8e4
Compare
Added support for specifying a route's supported methods in the options Added support for specifying a route's method in the file name Added `MediaParser.Request` and `MediaParser.Response` type aliases Added `Middleware.Request` and `Middleware.Response` type aliases Hardened the `onLoad` and `onUnload` hooks from the `Route` class BREAKING CHANGE: The headers middleware now uses the supported HTTP methods from the route or the store instead of sending all supported methods BREAKING CHANGE: Changed the method handling in the `Route` class to not be keyed by the method name, sending all requests to the `run` method. This allows for more flexibility in the route handling BREAKING CHANGE: Writing the name of a file as `<name>.<method>.ts` will now set `<method>` as a method for the route
74da8e4
to
86dd9c4
Compare
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.
misclicked
Co-authored-by: Jeroen Claassens <[email protected]>
MediaParser.Request
andMediaParser.Response
type aliasesMiddleware.Request
andMiddleware.Response
type aliasesonLoad
andonUnload
hooks from theRoute
classRoute
class to not be keyed by the method name, sending all requests to therun
method. This allows for more flexibility in the route handling<name>.<method>.ts
will now set<method>
as a method for the route👀