Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pager/jackrabbit

Package Overview
Dependencies
Maintainers
13
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pager/jackrabbit - npm Package Compare versions

Comparing version 4.7.0-rc.1 to 4.7.0

21

lib/exchange.js

@@ -83,6 +83,8 @@ 'use strict';

publish(msg, {
var opts = extend({}, {
key: key,
rpcCallback: cb
});
}, options);
publish(msg, opts);
}

@@ -139,9 +141,8 @@

function bindKey(key) {
var deferred = Promise.defer();
channel.bindQueue(newQueue.name, emitter.name, key, {}, function onBind(err, ok) {
if (err) return deferred.reject(err);
return deferred.resolve(ok);
return new Promise(function (resolve, reject) {
channel.bindQueue(newQueue.name, emitter.name, key, {}, function onBind(err, ok) {
if (err) return reject(err);
return resolve(ok);
});
});
return deferred.promise;
}

@@ -214,3 +215,3 @@ }

var timeout = setTimeout(() => {
var timeout = setTimeout(function () {

@@ -300,2 +301,2 @@ clearPendingReply(correlationId);

}
}
}

@@ -16,5 +16,6 @@ var amqp = require('amqplib/callback_api');

default: createDefaultExchange,
direct: createExchange('direct'),
fanout: createExchange('fanout'),
topic: createExchange('topic'),
direct: createExchange().bind(null, 'direct'),
fanout: createExchange().bind(null, 'fanout'),
topic: createExchange().bind(null, 'topic'),
exchange: createExchange(),
close: close,

@@ -37,2 +38,6 @@ getInternals: getInternals

function close(callback) {
if (!connection) {
if (callback) callback();
return;
}
try {

@@ -53,8 +58,8 @@ // I don't think amqplib should be throwing here, as this is an async function

function createDefaultExchange() {
return createExchange('direct')('');
return createExchange()('direct', '');
}
function createExchange(type) {
return function(name) {
var newExchange = exchange(name, type);
function createExchange() {
return function(type, name, options) {
var newExchange = exchange(name, type, options);
if (connection) {

@@ -78,3 +83,3 @@ newExchange.connect(connection);

channel = undefined;
rabbit.emit('error', err);
if (err) rabbit.emit('error', err);
}

@@ -81,0 +86,0 @@

@@ -81,4 +81,9 @@ var amqp = require('amqplib/callback_api');

function purge(done) {
if (!channel) return;
channel.purgeQueue(emitter.name, onPurged);
if (channel) {
channel.purgeQueue(emitter.name, onPurged);
} else {
emitter.once('ready', function() {
channel.purgeQueue(emitter.name, onPurged);
});
}

@@ -85,0 +90,0 @@ function onPurged(err, obj) {

{
"name": "@pager/jackrabbit",
"version": "4.7.0-rc.1",
"version": "4.7.0",
"description": "Easy RabbitMQ for node",

@@ -32,3 +32,3 @@ "keywords": [

"lodash.assignin": "4.x.x",
"uuid": "3.x.x"
"uuid": "^3.0.1"
},

@@ -35,0 +35,0 @@ "devDependencies": {

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