New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nats-hemera

Package Overview
Dependencies
Maintainers
1
Versions
279
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nats-hemera - npm Package Compare versions

Comparing version 5.0.0-rc.5 to 5.0.0-rc.6

28

lib/index.js

@@ -845,9 +845,17 @@ /**

const result = action(self._request.payload.pattern, (err, result) =>
const result = action(self._request.payload.pattern, (err, result) => {
if (err) {
self._isValidError(err)
}
self.reply.send(err || result)
)
})
const isPromise = result && typeof result.then === 'function'
if (isPromise) {
result.then(x => self.reply.send(x)).catch(e => self.reply.send(e))
result.then(x => self.reply.send(x)).catch(err => {
if (err) {
self._isValidError(err)
}
self.reply.send(err)
})
}

@@ -858,2 +866,16 @@ })

/**
*
* @param {*} err
*/
_isValidError(err) {
if (!(err instanceof Error)) {
this.log.error(
new Errors.HemeraError(
`Response error must be derivated from type 'Error' but got '${typeof err}'`
)
)
}
}
/**
* Unsubscribe a topic or subscription id from NATS and Hemera

@@ -860,0 +882,0 @@ *

2

package.json
{
"name": "nats-hemera",
"author": "Dustin Deus (https://github.com/StarpTech)",
"version": "5.0.0-rc.5",
"version": "5.0.0-rc.6",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "homepage": "https://hemerajs.github.io/hemera/",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc