smart-home-engine 0.30.0 → 0.31.0

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-3AzTXNmr.js";/*!-----------------------------------------------------------------------------
1
+ import{m as O}from"./monaco-langs-BW2J83t5.js";import{t as I}from"./index-oabJJUgL.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-3AzTXNmr.js"></script>
158
+ <script type="module" crossorigin src="/assets/index-oabJJUgL.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-DqYTpwg5.css">
161
+ <link rel="stylesheet" crossorigin href="/assets/index-BvaykAGz.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.30.0",
3
+ "version": "0.31.0",
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/index.js CHANGED
@@ -319,6 +319,7 @@ require('./web/server').setStatsProvider(() => {
319
319
  }
320
320
  return {
321
321
  scripts: Object.keys(scripts).length,
322
+ runningScripts: Object.keys(scripts).map(f => makeLabel(f).slice(0, -1)),
322
323
  topics,
323
324
  mqttMsgPerSec,
324
325
  matterEnabled: !!config.matterStorage,
@@ -1146,6 +1147,7 @@ function loadScript(file, origin) {
1146
1147
  if (scripts[file]) {
1147
1148
  scriptOrigins.set(file, origin);
1148
1149
  runScript(scripts[file], file, origin);
1150
+ broadcast({ type: 'script:running', path: makeLabel(file).slice(0, -1), running: true });
1149
1151
  }
1150
1152
  }
1151
1153
  });
@@ -1234,6 +1236,7 @@ function unloadScript(file) {
1234
1236
 
1235
1237
  // Remove from scripts map so it can be re-loaded
1236
1238
  delete scripts[file];
1239
+ broadcast({ type: 'script:running', path: makeLabel(file).slice(0, -1), running: false });
1237
1240
  }
1238
1241
 
1239
1242
  function loadBuiltinsDir(callback) {