smart-home-engine 1.12.13 → 1.13.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-Dt8a9eeo.js";import{t as I}from"./index-0kMmvnH2.js";/*!-----------------------------------------------------------------------------
1
+ import{m as O}from"./monaco-langs-Dt8a9eeo.js";import{t as I}from"./index-Pxuq0DSp.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -172,7 +172,7 @@
172
172
  }
173
173
  })();
174
174
  </script>
175
- <script type="module" crossorigin src="/assets/index-0kMmvnH2.js"></script>
175
+ <script type="module" crossorigin src="/assets/index-Pxuq0DSp.js"></script>
176
176
  <link rel="modulepreload" crossorigin href="/assets/monaco-langs-Dt8a9eeo.js">
177
177
  <link rel="stylesheet" crossorigin href="/assets/monaco-langs-DyX1CsEw.css">
178
178
  <link rel="stylesheet" crossorigin href="/assets/index-BXB4YlVH.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-home-engine",
3
- "version": "1.12.13",
3
+ "version": "1.13.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
@@ -95,6 +95,15 @@ function makeLabel(filePath) {
95
95
  }
96
96
 
97
97
  log.setLevel(['debug', 'info', 'warn', 'error'].indexOf(config.verbosity) === -1 ? 'info' : config.verbosity);
98
+
99
+ // Safety net: unhandled Promise rejections from async script callbacks are not caught
100
+ // by the per-script domain (Node.js domains don't intercept Promise rejections).
101
+ // Log the error instead of letting Node.js crash the process.
102
+ process.on('unhandledRejection', (reason) => {
103
+ const msg = reason instanceof Error ? reason.stack || reason.message : String(reason);
104
+ log.error('unhandled promise rejection — add try/catch to async script callbacks:\n' + msg);
105
+ });
106
+
98
107
  log.info('she ' + pkg.version + ' starting');
99
108
  log.debug('loaded config: ', config);
100
109