Huge News!Announcing our $40M Series B led by Abstract Ventures.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.4 to 5.0.5

2

lib/add.js

@@ -31,2 +31,4 @@ 'use strict'

this.actMeta.middleware = addDef.middleware || []
// only used for maxMessages$ flag
this._receivedMsg = 0
}

@@ -33,0 +35,0 @@

@@ -25,3 +25,13 @@ const Joi = require('joi')

// Custom logger
logger: Joi.object().optional(),
logger: Joi.object()
.keys({
info: Joi.func().minArity(1),
error: Joi.func().minArity(1),
debug: Joi.func().minArity(1),
fatal: Joi.func().minArity(1),
warn: Joi.func().minArity(1),
trace: Joi.func().minArity(1),
child: Joi.func().minArity(1)
})
.requiredKeys('info', 'error', 'debug', 'fatal', 'warn', 'trace'),
// The error serialization options

@@ -28,0 +38,0 @@ errio: Joi.object()

@@ -169,7 +169,17 @@ 'use strict'

context.matchedAction = context._router.lookup(context._pattern)
// fallback to notFound action when defined
if (!context.matchedAction && context._notFoundPattern) {
// remove pattern when maxMessages$ was received
// only relevant for server actions with custom transport options
if (context.matchedAction) {
context.matchedAction._receivedMsg++
if (
context.matchedAction._receivedMsg ===
context.matchedAction.transport.maxMessages
) {
// we only need remove pattern the subscription is unsubscribed by nats driver
context.cleanTopic(context._topic)
}
} else if (context._notFoundPattern) {
// fallback to notFound action when defined
context.matchedAction = context._router.lookup(context._notFoundPattern)
}
context.emit('serverPreRequest', context)

@@ -176,0 +186,0 @@

2

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

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

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