Socket
Socket
Sign inDemoInstall

rhea-promise

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rhea-promise - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

3

changelog.md

@@ -0,1 +1,4 @@

### 0.1.12 - 2018-11-16
- Fix a minor bug in receiver creation.
### 0.1.11 - 2018-11-15

@@ -2,0 +5,0 @@ - Added checks for some event handler methods to exist before logging information that uses node's

8

dist/lib/session.js

@@ -155,3 +155,2 @@ "use strict";

}
const handlersProvided = options && options.onMessage ? true : false;
// Register session handlers for session_error and session_close if provided.

@@ -176,6 +175,9 @@ // listeners provided by the user in the options object should be added

let waitTimer;
if (handlersProvided) {
if (options && options.onMessage) {
receiver.on(rhea_1.ReceiverEvents.message, options.onMessage);
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", this.connection.id, rhea_1.ReceiverEvents.message);
}
if (options && options.onError) {
receiver.on(rhea_1.ReceiverEvents.receiverError, options.onError);
log.receiver("[%s] Added event handler for events: '%s', '%s', on rhea-promise 'receiver'.", this.connection.id, rhea_1.ReceiverEvents.message, rhea_1.ReceiverEvents.receiverError);
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", this.connection.id, rhea_1.ReceiverEvents.receiverError);
}

@@ -182,0 +184,0 @@ if (options && options.onClose) {

@@ -187,3 +187,2 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

const handlersProvided = options && options.onMessage ? true : false;
// Register session handlers for session_error and session_close if provided.

@@ -210,8 +209,12 @@ // listeners provided by the user in the options object should be added

if (handlersProvided) {
receiver.on(ReceiverEvents.message, options!.onMessage!);
receiver.on(ReceiverEvents.receiverError, options!.onError!);
log.receiver("[%s] Added event handler for events: '%s', '%s', on rhea-promise 'receiver'.",
this.connection.id, ReceiverEvents.message, ReceiverEvents.receiverError);
if (options && options.onMessage) {
receiver.on(ReceiverEvents.message, options.onMessage);
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.",
this.connection.id, ReceiverEvents.message);
}
if (options && options.onError) {
receiver.on(ReceiverEvents.receiverError, options.onError);
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.",
this.connection.id, ReceiverEvents.receiverError);
}

@@ -218,0 +221,0 @@ if (options && options.onClose) {

{
"name": "rhea-promise",
"version": "0.1.11",
"version": "0.1.12",
"description": "A Promisified layer over rhea AMQP client",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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