@modern-js/plugin-koa 2.14.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,10 @@
1
1
  import { createRouteHandler } from "./utils";
2
2
  var registerRoutes = function(router, handlerInfos) {
3
- handlerInfos.forEach(function(param) {
4
- var routePath = param.routePath, handler = param.handler, httpMethod = param.httpMethod;
5
- var routeHandler = createRouteHandler(handler);
6
- var method = httpMethod.toLowerCase();
7
- router[method](routePath, routeHandler);
8
- });
3
+ handlerInfos.forEach(function(param) {
4
+ var routePath = param.routePath, handler = param.handler, httpMethod = param.httpMethod;
5
+ var routeHandler = createRouteHandler(handler);
6
+ var method = httpMethod.toLowerCase();
7
+ router[method](routePath, routeHandler);
8
+ });
9
9
  };
10
- var registerRoutes_default = registerRoutes;
11
- export { registerRoutes_default as default };
10
+ export default registerRoutes;
@@ -1,6 +1,5 @@
1
- var hook = function(attacher) {
2
- return attacher;
1
+ export var hook = function(attacher) {
2
+ return attacher;
3
3
  };
4
- import { useContext } from "./context";
4
+ export { useContext } from "./context";
5
5
  export * from "@modern-js/bff-core";
6
- export { hook, useContext };