All notable changes to the @hero-js/core
package will be documented in this file.
- Improved method of preloading middleware
- Fix
Middleware.responseBuilder
generics types
- Added
overwriteExisting
parameter to theRouter
class to allow the creation of a new router instance with an already existing base path
- Added
Middleware
as an abstraction class for controllers and middlewares.
- Added support for dynamic middleware preloading using the
Router.preload
method. - Introduced support for middleware class resolution and handler methods.
- Added a new
fullPreload
option to preload all middleware classes. - Support for specifying the name of the router instance.
- Enabled creation of a new
Router
instance with a name. - Enhanced middleware mounting with dynamic class resolution.
- Modified the
Router
constructor to accept additional options likename
andfullPreload
. - Updated the
Router.use
method to create a new instance ofRouter
. - Refined the error messages for middleware loading failures.
- Improved middleware class name resolution.
- Removed the warning message about invalid paths in the
Router.use
method.
- Added the
Router
class for managing generic routes. - Introduced support for generic types for request, response, and "next" functions.
- Added methods for routing HTTP requests (
post
,get
,put
,patch
,delete
). - Support for specifying middleware at the route level (
use
). - Added the ability to apply a batch of middlewares to selected routes.
- Option to specify a custom context during instantiation or use a volatile context by default.
- Method to retrieve the last mounted route key.
- Initial release of
@hero-js/core
package. - Basic routing functionality with generic types support.