nats-hemera
Advanced tools
Comparing version 5.8.8 to 5.8.9
@@ -239,3 +239,3 @@ 'use strict' | ||
_registerErrors() { | ||
for (var error in Hemera.errors) { | ||
for (let error in Hemera.errors) { | ||
Errio.register(Hemera.errors[error]) | ||
@@ -1558,16 +1558,2 @@ } | ||
close(func) { | ||
let promise | ||
// callback style | ||
if (func === undefined) { | ||
promise = new Promise(function(resolve, reject) { | ||
func = function(err) { | ||
if (err) { | ||
return reject(err) | ||
} | ||
resolve() | ||
} | ||
}) | ||
} | ||
// 2. clean hemera | ||
@@ -1588,11 +1574,3 @@ this.onShutdown((instance, done) => { | ||
// 3. run user function | ||
this.shutdown(err => { | ||
if (err) { | ||
this.log.error(err) | ||
} | ||
func(err) | ||
}) | ||
return promise | ||
return this.shutdown(func) | ||
} | ||
@@ -1599,0 +1577,0 @@ } |
@@ -126,12 +126,8 @@ 'use strict' | ||
if (self.hemera._extensionManager.onServerPreResponse.length) { | ||
runExt( | ||
self.hemera._extensionManager.onServerPreResponse, | ||
serverExtIterator, | ||
self.hemera, | ||
err => self._onServerPreResponseCompleted(err) | ||
) | ||
} else { | ||
self._onServerPreResponseCompleted() | ||
} | ||
runExt( | ||
self.hemera._extensionManager.onServerPreResponse, | ||
serverExtIterator, | ||
self.hemera, | ||
err => self._onServerPreResponseCompleted(err) | ||
) | ||
} | ||
@@ -152,3 +148,5 @@ /** | ||
self.hemera.emit('serverResponseError', extensionError) | ||
self.send(extensionError) | ||
// don't use send() here in order to avoid rexecution of serverPreResponse | ||
// and to send the "send-error" as final response | ||
self.error = extensionError | ||
} | ||
@@ -155,0 +153,0 @@ |
{ | ||
"name": "nats-hemera", | ||
"author": "Dustin Deus (https://github.com/StarpTech)", | ||
"version": "5.8.8", | ||
"version": "5.8.9", | ||
"main": "lib/index.js", | ||
@@ -46,3 +46,3 @@ "homepage": "https://hemerajs.github.io/hemera/", | ||
"dependencies": { | ||
"avvio": "5.6.x", | ||
"avvio": "5.7.x", | ||
"bloomrun": "4.1.x", | ||
@@ -49,0 +49,0 @@ "errio": "1.2.x", |
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
83642
3194
+ Addedavvio@5.7.0(transitive)
- Removedavvio@5.6.0(transitive)
Updatedavvio@5.7.x