smart-home-engine 1.12.4 → 1.12.6

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-C2SLVvnG.js";/*!-----------------------------------------------------------------------------
1
+ import{m as O}from"./monaco-langs-Dt8a9eeo.js";import{t as I}from"./index-Doq3jcEn.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-C2SLVvnG.js"></script>
175
+ <script type="module" crossorigin src="/assets/index-Doq3jcEn.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-Dn-sgi3l.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-home-engine",
3
- "version": "1.12.4",
3
+ "version": "1.12.6",
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": {
@@ -39,8 +39,18 @@ router.use('/docs', (req, res) => {
39
39
  if (!core) return core503(res);
40
40
 
41
41
  const method = req.method.toUpperCase();
42
- // Strip leading slash; empty → list all
43
- const id = req.path.replace(/^\/+/, '');
42
+ // Strip leading slash and decode each segment; empty → list all
43
+ const id = req.path
44
+ .replace(/^\/+/, '')
45
+ .split('/')
46
+ .map((s) => {
47
+ try {
48
+ return decodeURIComponent(s);
49
+ } catch {
50
+ return s;
51
+ }
52
+ })
53
+ .join('/');
44
54
 
45
55
  // GET /she/db/docs — list all IDs
46
56
  if (method === 'GET' && !id) {
@@ -88,8 +98,18 @@ router.use('/views', (req, res) => {
88
98
  if (!core) return core503(res);
89
99
 
90
100
  const method = req.method.toUpperCase();
91
- // Strip leading slash; detect /result suffix
92
- const rawPath = req.path.replace(/^\/+/, '');
101
+ // Strip leading slash, decode each segment, detect /result suffix
102
+ const rawPath = req.path
103
+ .replace(/^\/+/, '')
104
+ .split('/')
105
+ .map((s) => {
106
+ try {
107
+ return decodeURIComponent(s);
108
+ } catch {
109
+ return s;
110
+ }
111
+ })
112
+ .join('/');
93
113
  const isResult = rawPath.endsWith('/result');
94
114
  const id = isResult ? rawPath.slice(0, -'/result'.length) : rawPath;
95
115