Comparing version 0.12.7 to 0.12.8
@@ -538,2 +538,11 @@ 'use strict'; | ||
process.on('unhandledRejection', error => { | ||
console.error('Unhandled Rejection:', error.stack || error); | ||
let alaska = module.exports.defualt; | ||
if (alaska && alaska.main && alaska.main.getConfig('unhandledRejectionExit') === false) { | ||
return; | ||
} | ||
process.exit(1); | ||
}); | ||
exports.utils = utils; | ||
@@ -540,0 +549,0 @@ exports.Field = require('./field').default; |
@@ -49,2 +49,8 @@ 'use strict'; | ||
/** | ||
* [APP] 如果有unhandledRejection,则自动退出 | ||
* @type {boolean} | ||
*/ | ||
unhandledRejectionExit: true, | ||
/** | ||
* [APP] session | ||
@@ -51,0 +57,0 @@ * @type {Object} |
@@ -624,3 +624,3 @@ 'use strict'; | ||
if (!this.__methods) { | ||
this.__methods = utils.bindMethods(model._underscore, this); | ||
this.__methods = utils.bindMethods(model._underscore || {}, this); | ||
} | ||
@@ -627,0 +627,0 @@ return this.__methods; |
{ | ||
"name": "alaska", | ||
"version": "0.12.7", | ||
"version": "0.12.8", | ||
"description": "Componentized and pluggable web framework for Node.js", | ||
@@ -20,3 +20,3 @@ "keywords": [ | ||
"alaska-cache-lru": "^0.12.3", | ||
"alaska-renderer-swig": "^0.12.3", | ||
"alaska-renderer-swig": "^0.12.8", | ||
"collie": "^0.2.1", | ||
@@ -23,0 +23,0 @@ "debug": "^3.1.0", |
@@ -77,3 +77,8 @@ 'use strict'; | ||
let action = ctx.params.action || defaultAction; | ||
if (suffix && controller && controller.endsWith(suffix) && action === defaultAction) { | ||
// about.html | ||
controller = controller.substr(0, controller.length - suffix.length); | ||
} | ||
if (suffix && action && action.endsWith(suffix)) { | ||
// about/us.html | ||
action = action.substr(0, action.length - suffix.length); | ||
@@ -80,0 +85,0 @@ } |
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
123969
4039
Updatedalaska-renderer-swig@^0.12.8