smart-home-engine 0.16.0 → 0.16.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.
- package/README.md +4 -0
- package/dist/web/assets/{index-DcqBg4oJ.css → index-6fsqE5Vy.css} +1 -1
- package/dist/web/assets/{index-Cqfuxa_i.js → index-CBKdN3z6.js} +69 -69
- package/dist/web/assets/{tsMode-B7q_C6Fy.js → tsMode-haf4UX72.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/src/web/scripts-api.js +7 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as O}from"./monaco-langs-Decdf6BV.js";import{t as I}from"./index-
|
|
1
|
+
import{m as O}from"./monaco-langs-Decdf6BV.js";import{t as I}from"./index-CBKdN3z6.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
package/dist/web/index.html
CHANGED
|
@@ -154,10 +154,10 @@
|
|
|
154
154
|
}
|
|
155
155
|
})();
|
|
156
156
|
</script>
|
|
157
|
-
<script type="module" crossorigin src="/assets/index-
|
|
157
|
+
<script type="module" crossorigin src="/assets/index-CBKdN3z6.js"></script>
|
|
158
158
|
<link rel="modulepreload" crossorigin href="/assets/monaco-langs-Decdf6BV.js">
|
|
159
159
|
<link rel="stylesheet" crossorigin href="/assets/monaco-langs-DyX1CsEw.css">
|
|
160
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
160
|
+
<link rel="stylesheet" crossorigin href="/assets/index-6fsqE5Vy.css">
|
|
161
161
|
</head>
|
|
162
162
|
<body>
|
|
163
163
|
<div id="app"></div>
|
package/package.json
CHANGED
package/src/web/scripts-api.js
CHANGED
|
@@ -132,12 +132,17 @@ router.use((req, res) => {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
// DELETE /she/scripts/<path> — delete file
|
|
135
|
+
// DELETE /she/scripts/<path> — delete file or directory (recursive)
|
|
136
136
|
if (method === 'DELETE') {
|
|
137
137
|
const abs = safePath(root, filePath);
|
|
138
138
|
if (!abs) return res.status(400).json({ error: 'Invalid path' });
|
|
139
139
|
try {
|
|
140
|
-
fs.
|
|
140
|
+
const stat = fs.statSync(abs);
|
|
141
|
+
if (stat.isDirectory()) {
|
|
142
|
+
fs.rmSync(abs, { recursive: true });
|
|
143
|
+
} else {
|
|
144
|
+
fs.unlinkSync(abs);
|
|
145
|
+
}
|
|
141
146
|
return res.json({ ok: true });
|
|
142
147
|
} catch (err) {
|
|
143
148
|
if (err.code === 'ENOENT') return res.status(404).json({ error: 'Not found' });
|