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

resolve-bus-rabbitmq

Package Overview
Dependencies
Maintainers
1
Versions
603
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-bus-rabbitmq - npm Package Compare versions

Comparing version 0.0.1-alpha.79f28edb to 0.0.2

67

dist/index.js

@@ -7,37 +7,2 @@ 'use strict';

var _stringify = require('babel-runtime/core-js/json/stringify');
var _stringify2 = _interopRequireDefault(_stringify);
var _assign = require('babel-runtime/core-js/object/assign');
var _assign2 = _interopRequireDefault(_assign);
exports.default = function (options) {
var handler = function handler() {};
var config = (0, _assign2.default)(defaultOptions, options);
var initPromise = init(config, function (event) {
return handler(event);
});
return {
publish: function publish(event) {
return initPromise.then(function (channel) {
channel.publish(config.exchange, config.queueName, new Buffer((0, _stringify2.default)(event)),
// Additional options described here:
// http://www.squaremobius.net/amqp.node/channel_api.html#channel_publish
{
expiration: config.messageTtl,
persistent: false
});
});
},
setTrigger: function setTrigger(callback) {
return initPromise.then(function () {
return handler = callback;
});
}
};
};
var _amqplib = require('amqplib');

@@ -90,2 +55,32 @@

});
}
}
function createDriver(options) {
var handler = function handler() {};
var config = Object.assign(defaultOptions, options);
var initPromise = init(config, function (event) {
return handler(event);
});
return {
publish: function publish(event) {
return initPromise.then(function (channel) {
channel.publish(config.exchange, config.queueName, new Buffer(JSON.stringify(event)),
// Additional options described here:
// http://www.squaremobius.net/amqp.node/channel_api.html#channel_publish
{
expiration: config.messageTtl,
persistent: false
});
});
},
setTrigger: function setTrigger(callback) {
return initPromise.then(function () {
return handler = callback;
});
}
};
}
exports.default = createDriver;
module.exports = exports['default'];
{
"name": "resolve-bus-rabbitmq",
"version": "0.0.1-alpha.79f28edb",
"version": "0.0.2",
"description": "This package is a driver for resolve-bus to emit events using RabbitMQ.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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