smart-home-engine 1.8.0 → 1.8.1

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-DLsurhm_.js";/*!-----------------------------------------------------------------------------
1
+ import{m as O}from"./monaco-langs-BW2J83t5.js";import{t as I}from"./index-Ubs63QY8.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-DLsurhm_.js"></script>
175
+ <script type="module" crossorigin src="/assets/index-Ubs63QY8.js"></script>
176
176
  <link rel="modulepreload" crossorigin href="/assets/monaco-langs-BW2J83t5.js">
177
177
  <link rel="stylesheet" crossorigin href="/assets/monaco-langs-DyX1CsEw.css">
178
178
  <link rel="stylesheet" crossorigin href="/assets/index-CmpNIegY.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-home-engine",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
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": {
@@ -88,7 +88,11 @@ function parseText(raw) {
88
88
  // Normalise the old (incorrect) key name written by earlier she versions
89
89
  const managedKey = key === 'plugin_opt_dynsec_config_file' ? 'plugin_opt_config_file' : key;
90
90
  if (managed[managedKey] !== undefined) {
91
- managed[managedKey] = [].concat(managed[managedKey]).concat(value);
91
+ const existing = [].concat(managed[managedKey]);
92
+ // Skip duplicate values (e.g. two log_dest file lines)
93
+ if (!existing.includes(value)) {
94
+ managed[managedKey] = [...existing, value];
95
+ }
92
96
  } else {
93
97
  managed[managedKey] = value;
94
98
  }
@@ -214,7 +218,10 @@ function serialise(conf) {
214
218
  if (managed[key] === undefined) continue;
215
219
  const val = managed[key];
216
220
  if (Array.isArray(val)) {
217
- for (const v of val) lines.push(`${key} ${v}`);
221
+ const written = new Set();
222
+ for (const v of val) {
223
+ if (!written.has(v)) { written.add(v); lines.push(`${key} ${v}`); }
224
+ }
218
225
  } else {
219
226
  lines.push(`${key} ${val}`);
220
227
  }