Skip to content

Commit

Permalink
fix(deps): update dependency mqtt to v5 (#408)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency mqtt to v5

* fix: update breaking change

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Philipp Arndt <[email protected]>
  • Loading branch information
renovate[bot] and philipparndt authored May 18, 2024
1 parent 2606908 commit e16f651
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<scripts>
<script value="start" />
</scripts>
<arguments value="$PROJECT_DIR$/production/config/config.json" />
<node-interpreter value="project" />
<envs />
<method v="2" />
Expand Down
7 changes: 6 additions & 1 deletion app/lib/mqtt/mqtt-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ const online = () => {
const willMessage = () => {
const config = getAppConfig()
if (config.mqtt["bridge-info"]) {
return { topic: brideTopic(), payload: "offline", qos: config.mqtt.qos, retain: config.mqtt.retain }
return {
topic: brideTopic(),
payload: Buffer.from("offline"),
qos: config.mqtt.qos,
retain: config.mqtt.retain
}
}
else {
return undefined
Expand Down
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"test": "vitest",
"coverage": "vitest --coverage",
"start": "tsc && node dist/app/lib/index.js",
"start": "ncc build lib/index.ts -o dist && node dist/index.js ../production/config/config.json",
"clean": "rimraf dist",
"prebuild": "run-s clean",
"build": "ncc build lib/index.ts -o dist --minify",
Expand Down Expand Up @@ -43,7 +43,7 @@
"axios": "1.6.8",
"chalk": "5.3.0",
"eventsource": "2.0.2",
"mqtt": "4.3.8",
"mqtt": "5.6.1",
"node-cron": "3.0.3",
"winston": "3.13.0",
"winston-transport": "4.7.0"
Expand Down
Loading

0 comments on commit e16f651

Please sign in to comment.