diff --git a/package.json b/package.json index 428a13c..d412b88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yog2-kernel", - "version": "1.3.3", + "version": "1.4.0", "description": "yog2 kernel", "main": "index.js", "keywords": [ diff --git a/plugins/dispatcher/dispatcher.js b/plugins/dispatcher/dispatcher.js index b9fc47c..608e219 100644 --- a/plugins/dispatcher/dispatcher.js +++ b/plugins/dispatcher/dispatcher.js @@ -247,6 +247,10 @@ module.exports = function (options) { router.action = function (actionName) { return getAction(routerName, actionName); }; + // support wrap raw async fn + router.wrapAsync = function (fn) { + return wrapAsyncFunction(fn, true); + }; // load user defined router var customRouter = require(routerPath); // typescript compliant