Compare commits

...

2 Commits

Author SHA1 Message Date
David Kebler 1c28088379 0.3.2 update deps includin mqtt to v4 2020-07-26 15:43:57 -07:00
David Kebler af93f278e0 0.3.1 had missing emit 'socket' so that base will know when mqtt module is listening to broker 2020-03-15 17:00:42 -07:00
4 changed files with 14 additions and 8 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/node_modules/
*.lock
/archive/
/.yalc/

View File

@ -4,3 +4,4 @@ test/
testing/
archive/
example/
.yalc

View File

@ -1,6 +1,6 @@
{
"name": "@uci/mqtt",
"version": "0.3.0",
"version": "0.3.2",
"description": "mqtt client with UCI json packet payloads",
"main": "src",
"scripts": {
@ -28,19 +28,19 @@
},
"homepage": "https://github.com/uCOMmandIt/uci-changeme#readme",
"dependencies": {
"@uci-utils/logger": "^0.0.16",
"@uci-utils/logger": "^0.0.18",
"better-try-catch": "0.6.2",
"is-plain-object": "^3.0.0",
"is-plain-object": "^4.1.1",
"lodash.union": "^4.6.0",
"lodash.xor": "^4.5.0",
"mqtt": "^3.0.0",
"mqtt": "^4.1.0",
"mqtt-match": "^2.0.3"
},
"devDependencies": {
"chai": "^4.2.0",
"delay": "^4.3.0",
"delay": "^4.4.0",
"esm": "^3.2.25",
"mocha": "^7.1.0",
"nodemon": "^2.0.2"
"mocha": "^8.0.1",
"nodemon": "^2.0.4"
}
}

View File

@ -272,7 +272,11 @@ class MQTTClient extends EventEmitter {
return payload
}
_listen() {
log.debug({method:'_listen', line:147, msg:`listening for incoming mqtt packets from broker on topics ${this.topics}`})
const msg = `listening for incoming mqtt packets from broker on topics ${this.topics}`
log.debug({method:'_listen', line:147, msg:msg})
this.emit('socket',{state:'listening', msg:msg})
this.mqtt.on('message', messageProcess.bind(this))