Comparing version 1.0.0-alpha.16 to 1.0.0-alpha.17
@@ -102,16 +102,19 @@ /*! | ||
this.mountedModules.forEach((moduleRouteHandler, moduleName) => { | ||
// TODO: handle errors on mount | ||
// we need to add middleware somewhere, which will set templateDir for each module | ||
moduleRouteHandler.call( | ||
this, | ||
handlerContext, | ||
// router mounter. Wraps router methods with namespace (/moduleName/) and some middleware | ||
mountModuleRouter.call(handlerContext, | ||
router, | ||
moduleName, | ||
// replace "someModuleName" namespace with "" if it's an index | ||
(this.config.get("indexPageModuleName") === moduleName) ? "" : undefined | ||
), | ||
modelRegister | ||
); | ||
try { | ||
moduleRouteHandler.call( | ||
this, | ||
handlerContext, | ||
// router mounter. Wraps router methods with namespace (/moduleName/) and some middleware | ||
mountModuleRouter.call(handlerContext, | ||
router, | ||
moduleName, | ||
// replace "someModuleName" namespace with "" if it's an index | ||
(this.config.get("indexPageModuleName") === moduleName) ? "" : undefined | ||
), | ||
modelRegister | ||
); | ||
} catch(e) { | ||
logger.error(e); | ||
throw e; | ||
} | ||
}); | ||
@@ -118,0 +121,0 @@ } |
@@ -24,3 +24,3 @@ /*! | ||
// models | ||
if (modelFiles && Array.isArray(modelFiles)) { | ||
if (Array.isArray(modelFiles)) { | ||
modelFiles = modelFiles.map(absPathToModel => require("./handlerMounter")(absPathToModel)); | ||
@@ -30,3 +30,3 @@ } | ||
return function mount(context/*,router, app.db.instance.addModel*/) { | ||
if (modelFiles.length > 0) { | ||
if (Array.isArray(modelFiles) && modelFiles.length > 0) { | ||
let modelRegister = arguments[2]; | ||
@@ -33,0 +33,0 @@ modelRegister && _applyModels(modelRegister, modelFiles); |
{ | ||
"name": "teo.js", | ||
"description": "Teo.JS is a next generation HMVC web framework, built using ECMAScript 2015 (ES6)", | ||
"version": "1.0.0-alpha.16", | ||
"version": "1.0.0-alpha.17", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Andrew Teologov", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
198938
4913
6