smart-home-engine 0.20.1 → 0.20.2

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.
@@ -1,4 +1,4 @@
1
- import{m as O}from"./monaco-langs-BW2J83t5.js";import{t as I}from"./index-CZEb06G1.js";/*!-----------------------------------------------------------------------------
1
+ import{m as O}from"./monaco-langs-BW2J83t5.js";import{t as I}from"./index-He-obaow.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -155,10 +155,10 @@
155
155
  }
156
156
  })();
157
157
  </script>
158
- <script type="module" crossorigin src="/assets/index-CZEb06G1.js"></script>
158
+ <script type="module" crossorigin src="/assets/index-He-obaow.js"></script>
159
159
  <link rel="modulepreload" crossorigin href="/assets/monaco-langs-BW2J83t5.js">
160
160
  <link rel="stylesheet" crossorigin href="/assets/monaco-langs-DyX1CsEw.css">
161
- <link rel="stylesheet" crossorigin href="/assets/index-bwhJdsUd.css">
161
+ <link rel="stylesheet" crossorigin href="/assets/index-pFtY_ZRn.css">
162
162
  </head>
163
163
  <body>
164
164
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-home-engine",
3
- "version": "0.20.1",
3
+ "version": "0.20.2",
4
4
  "description": "Node.js based script runner for use in MQTT based Smart Home environments",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/web/server.js CHANGED
@@ -72,7 +72,7 @@ app.post('/she/restart', (req, res) => {
72
72
  setTimeout(_systemdRestart, 200);
73
73
  });
74
74
 
75
- // npm version check — poll once on startup and every hour
75
+ // npm version check — poll once on startup and every 24 hours
76
76
  let _latestNpmVersion = null;
77
77
  async function _checkNpmVersion() {
78
78
  try {
@@ -82,7 +82,13 @@ async function _checkNpmVersion() {
82
82
  } catch { /* best-effort */ }
83
83
  }
84
84
  _checkNpmVersion();
85
- setInterval(_checkNpmVersion, 60 * 60 * 1000);
85
+ setInterval(_checkNpmVersion, 24 * 60 * 60 * 1000);
86
+
87
+ // Trigger an immediate version check (called by the UI refresh button)
88
+ app.post('/she/check-update', async (req, res) => {
89
+ await _checkNpmVersion();
90
+ res.json({ latestVersion: _latestNpmVersion });
91
+ });
86
92
 
87
93
  // Update — install latest npm package, then restart
88
94
  app.post('/she/update', (req, res) => {