block-messenger
Advanced tools
Comparing version 1.1.4 to 1.1.5
"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; |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17503
121