@meri-imperiumi/signalk-meshtastic 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -91,7 +91,9 @@ Metrics used:
91
91
 
92
92
  ## Changes
93
93
 
94
- * 1.2.3 (2024-10-15)
94
+ * 1.2.4 (2026-02-15)
95
+ - Corrupted Node DB file should no longer crash the plugin
96
+ * 1.2.3 (2025-10-15)
95
97
  - Nodes that haven't been seen in last two days are no longer registered to Signal K data structure
96
98
  - Added safeties for various non-numeric telemetry and coordinate values
97
99
  * 1.2.2 (2025-10-01)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meri-imperiumi/signalk-meshtastic",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Signal K plugin for interfacing with the Meshtastic LoRa mesh network",
5
5
  "scripts": {
6
6
  "test": "eslint ."
package/plugin/index.js CHANGED
@@ -511,7 +511,13 @@ module.exports = (app) => {
511
511
  readFile(nodeDbFile, 'utf-8')
512
512
  .catch(() => '{}')
513
513
  .then((nodeDb) => {
514
- const nodeDbData = JSON.parse(nodeDb);
514
+ let nodeDbData;
515
+ try {
516
+ nodeDbData = JSON.parse(nodeDb);
517
+ } catch (e) {
518
+ app.debug('Error reading Node DB file', e);
519
+ nodeDbData = {};
520
+ }
515
521
  Object.keys(nodeDbData)
516
522
  .forEach((nodeNum) => {
517
523
  nodes[nodeNum] = nodeDbData[nodeNum];