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

block-messenger

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

block-messenger - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

5

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const mqtt_messenger_1 = require("./src/mqtt-messenger");
function mqtt(options) {
return new mqtt_messenger_1.MqttMessenger(options);
}
exports.mqtt = mqtt;
exports.mqtt = mqtt_messenger_1.MqttMessenger;

63

dist/src/mqtt-messenger.js

@@ -44,30 +44,37 @@ "use strict";

addEvents() {
this.mqtt.on('connect', () => {
this.emit('connect');
});
this.mqtt.on('reconnect', () => {
this.emit('reconnect');
});
this.mqtt.on('close', () => {
this.emit('close');
});
this.mqtt.on('offline', () => {
this.emit('offline');
});
this.mqtt.on('error', (error) => {
this.emit('error', error);
});
this.mqtt.on('end', () => {
this.emit('end');
});
this.mqtt.on('packetsend', (packet) => {
if (packet.cmd === 'publish') {
this.emit('packetsend', packet);
}
});
this.mqtt.on('packetreceive', (packet) => {
if (packet.cmd === 'publish') {
this.emit('packetreceive', packet);
}
});
// this.mqtt.on('connect', () => {
// this.emit('connect');
// });
//
// this.mqtt.on('reconnect', () => {
// this.emit('reconnect');
// });
//
// this.mqtt.on('close', () => {
// this.emit('close');
// });
//
// this.mqtt.on('offline', () => {
// this.emit('offline');
// });
//
// this.mqtt.on('error', (error) => {
// this.emit('error', error);
// });
//
// this.mqtt.on('end', () => {
// this.emit('end');
// });
//
// this.mqtt.on('packetsend', (packet) => {
// if (packet.cmd === 'publish') {
// this.emit('packetsend', packet);
// }
// });
//
// this.mqtt.on('packetreceive', (packet) => {
// if (packet.cmd === 'publish') {
// this.emit('packetreceive', packet);
// }
// });
this.mqtt.on('message', (topic, message) => {

@@ -74,0 +81,0 @@ this.emit("message", topic, message);

{
"name": "block-messenger",
"version": "1.1.4",
"version": "1.1.5",
"description": "Message exchange between pipeline blocks",

@@ -26,6 +26,6 @@ "main": "dist/index.js",

"devDependencies": {
"@types/node": "^10.5.4",
"@types/memcached": "^2.2.5",
"@types/bluebird": "^3.5.23",
"@types/core-js": "^0.9.46",
"@types/memcached": "^2.2.5",
"@types/node": "^10.5.5",
"istanbul": "0.4.5",

@@ -32,0 +32,0 @@ "mocha": "2.5.3",

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