frugal-iot-server 2.0.6 → 2.0.7

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/INSTALLATION.md CHANGED
@@ -308,9 +308,9 @@ node -v
308
308
 
309
309
  What each is for:
310
310
 
311
- * `nodejs` — the server needs **Node 18 or later**. Current Raspberry Pi OS (Debian 13, trixie)
312
- provides 20.19.2, which is fine, on 32-bit as well as 64-bit. Older images shipped Node 18, also
313
- fine. If `node -v` reports anything below 18, install a current version from
311
+ * `nodejs` — the server needs **Node 20.17 or later**. Current Raspberry Pi OS (Debian 13, trixie)
312
+ provides 20.19.2, which is fine, on 32-bit as well as 64-bit. Older images shipped Node 18, which
313
+ is too old. If `node -v` reports anything below 20.17, install a current version from
314
314
  [NodeSource](https://github.com/nodesource/distributions) instead.
315
315
  * `npm` — installs the server; it is a separate package from `nodejs` on Debian.
316
316
  * `sqlite3` — the database the server keeps its accounts in.
package/README.md CHANGED
@@ -8,7 +8,7 @@ thing in one go once you can ssh in.
8
8
 
9
9
  On a unix box that is already running ...
10
10
 
11
- Check you have node & npm installed `node -v` - version 18 or later.
11
+ Check you have node & npm installed `node -v` - version 20.17 or later.
12
12
  If not then you'll need nodejs from [nodejs.org](https://nodejs.org) or your package manager.
13
13
  You also need `sqlite3` and `zsh` for the setup commands below.
14
14
 
package/package.json CHANGED
@@ -12,17 +12,17 @@
12
12
  "cookie-parser": "^1.4.7",
13
13
  "express": "^5.2.1",
14
14
  "express-session": "^1.19.0",
15
- "frugal-iot-client": "^2.0.6",
16
- "frugal-iot-logger": "^2.0.6",
15
+ "frugal-iot-client": "^2.0.7",
16
+ "frugal-iot-logger": "^2.0.7",
17
17
  "hash-wasm": "^4.12.0",
18
18
  "js-yaml": "^4.2.0",
19
19
  "morgan": "^1.11.0",
20
20
  "mqtt": "^5.15.2",
21
21
  "multer": "^2.1.1",
22
- "nodemailer": "^9.0.6",
22
+ "nodemailer": "^10.1.2",
23
23
  "passport": "^0.7.0",
24
24
  "passport-local": "^1.0.0",
25
- "sqlite3": "^5.1.7"
25
+ "sqlite3": "^6.0.1"
26
26
  },
27
27
  "bin": {
28
28
  "frugal-iot-server": "frugal-iot-server.js",
@@ -63,10 +63,8 @@
63
63
  "INSTALLATION.md"
64
64
  ],
65
65
  "devDependencies": {
66
- "@types/jest": "^30.0.0",
67
- "jest": "^30.4.2",
68
66
  "supertest": "^7.2.2",
69
- "vitest": "^1.0.0"
67
+ "vitest": "^4.1.12"
70
68
  },
71
69
  "homepage": "https://github.com/mitra42/frugal-iot-server",
72
70
  "keywords": [
@@ -89,5 +87,8 @@
89
87
  "check-files": "node scripts/check-published-files.js"
90
88
  },
91
89
  "type": "module",
92
- "version": "2.0.6"
90
+ "version": "2.0.7",
91
+ "overrides": {
92
+ "uuid": "^11.1.1"
93
+ }
93
94
  }
@@ -6,7 +6,7 @@
6
6
  // it, an installed browser keeps serving the files it already cached - and since the list now covers
7
7
  // the dashboard's own code, that means old JS behind freshly fetched HTML. Any edit to the list
8
8
  // needs this bumped, or it does not reach anyone who already has the old one.
9
- const CACHE_NAME = 'frugal-iot-cache-2.0.6';
9
+ const CACHE_NAME = 'frugal-iot-cache-2.0.7';
10
10
  /*
11
11
  * Everything the app needs, so that a phone on a poor or expensive link fetches it once.
12
12
  *
@@ -571,10 +571,11 @@ PACKAGES=(nodejs npm sqlite3 zsh curl)
571
571
  sudo_ env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq "${PACKAGES[@]}"
572
572
  NODE_VERSION="$(node -v)"
573
573
  info "node ${NODE_VERSION}, npm $(npm -v), sqlite3 $(sqlite3 --version | awk '{print $1}')"
574
- # The server needs node 18 or later
574
+ # The server needs node 20.17 or later (sqlite3 6 needs 20.17, nodemailer 10 needs 20)
575
575
  NODE_MAJOR="$(echo "${NODE_VERSION#v}" | cut -d. -f1)"
576
- if (( NODE_MAJOR < 18 )); then
577
- echo "node ${NODE_VERSION} is too old - the server needs 18 or later." >&2
576
+ NODE_MINOR="$(echo "${NODE_VERSION#v}" | cut -d. -f2)"
577
+ if (( NODE_MAJOR < 20 || (NODE_MAJOR == 20 && NODE_MINOR < 17) )); then
578
+ echo "node ${NODE_VERSION} is too old - the server needs 20.17 or later." >&2
578
579
  echo "Install a current version from https://github.com/nodesource/distributions and run this again." >&2
579
580
  exit 1
580
581
  fi
@@ -1,54 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Frugal IoT Demo</title>
6
- <link href="./frugaliot.css" rel="stylesheet" type="text/css">
7
- <!-- this maps files that webcomponents uses, -->
8
- <script type="importmap">
9
- {
10
- "imports": {
11
- "@kurkle/color": "https://frugaliot.naturalinnovation.org/node_modules/@kurkle/color/dist/color.esm.js",
12
- "chart.js": "https://frugaliot.naturalinnovation.org/node_modules/chart.js/dist/Chart.js",
13
- "dial-gauge": "/node_modules/dial-gauge/dial-gauge.js",
14
- "luxon": "https://frugaliot.naturalinnovation.org/node_modules/luxon/src/luxon.js",
15
- "chartjs-adapter-luxon": "https://frugaliot.naturalinnovation.org/node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js",
16
- "csv-parse": "https://frugaliot.naturalinnovation.org/node_modules/csv-parse/dist/esm/index.js"
17
- }
18
- }
19
- </script>
20
- <!-- load webcomponents.js either from local server, or from frugaliot.naturalinnovation.org -->
21
- <script src="./webcomponents.js" type="module"></script>
22
- <!--<script src="./webcomponents.js" type="module"></script>-->
23
- </head>
24
- <body>
25
- <h1>This is an example of embedding a widget in a page</h1>
26
- <div style="display:none">
27
- <!-- every embedded page needs a mqtt-client, it sets up the MQTT connection to the broker -->
28
- <mqtt-client server="wss://frugaliot.naturalinnovation.org/wss"></mqtt-client>
29
- </div>
30
- <div style="float:right;border:2px,solid,blue;width:50%">
31
- <!-- this is a simple display widget - in this case a meter bar -->
32
- <mqtt-bar max="45" min="0" topic="dev/lotus/esp8266-fb94bb/sht/temperature" label="Temperature" type="float" color="red"></mqtt-bar>
33
- <!--<mqtt-bar max="45" min="0" topic="dev/lotus/esp32-70c376/soil" label="Soil" type="float" color="brown"></mqtt-bar>-->
34
- </div>
35
- <div style="float:left;border:2px,solid,blue;width:10%">
36
- <!-- this is a simple control widget - in this case toggles an LED on a device at my office -->
37
- <mqtt-toggle topic="dev/lotus/esp8266-fb94bb/ledbuiltin/on" label="LED" type="bool" color="blue"></mqtt-toggle>
38
- </div>
39
- <p>
40
- This is a demo of a custom web page with a bar widget; a graph; and a control.
41
- These all go to the same device which may or may not always be turned on!
42
- </p>
43
- <p>
44
- <!-- And a pretty simple graph - in this case its displaying the same value from above, but it can
45
- <!-- display any topic -->
46
- <!-- Note - I think there is an issue with back button if loaded from a different server, will fix -->
47
- <mqtt-graph>
48
- <mqtt-graphdataset topic="dev/lotus/esp8266-fb94bb/sht/temperature" color="red" label="Office Temperature" min=0 max=50 type="float"></mqtt-graphdataset>
49
- <mqtt-graphdataset topic="dev/lotus/esp8266-fb94bb/sht/humidity" color="blue" label="Office Humidity" min=0 max=100 type="float"></mqtt-graphdataset>
50
- <mqtt-graphdataset topic="dev/lotus/esp8266-fb94bb/ledbuiltin/on" color="orange" label="LED" type="bool"></mqtt-graphdataset>
51
- </mqtt-graph>
52
- </p>
53
- </body>
54
- </html>