smart-home-engine 1.1.1 → 1.1.2
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-
|
|
1
|
+
import{m as O}from"./monaco-langs-BW2J83t5.js";import{t as I}from"./index-DvaCcW0R.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
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
})();
|
|
174
174
|
</script>
|
|
175
|
-
<script type="module" crossorigin src="/assets/index-
|
|
175
|
+
<script type="module" crossorigin src="/assets/index-DvaCcW0R.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-DKIgEFlE.css">
|
package/package.json
CHANGED
package/src/lib/ssh-deploy.js
CHANGED
package/src/web/broker-api.js
CHANGED
|
@@ -190,8 +190,7 @@ router.post('/config/restore', (req, res) => {
|
|
|
190
190
|
router.post('/reload', async (req, res) => {
|
|
191
191
|
try {
|
|
192
192
|
const bc = getBrokerConfig(req);
|
|
193
|
-
if (bc.
|
|
194
|
-
const cmd = bc.reloadCmd || 'sudo systemctl reload mosquitto';
|
|
193
|
+
if (bc.ssh && bc.ssh.host) {
|
|
195
194
|
const result = await sshDeploy.runCommand(bc.ssh, cmd);
|
|
196
195
|
return res.json({ ok: true, ...result });
|
|
197
196
|
}
|
|
@@ -210,8 +209,7 @@ router.post('/reload', async (req, res) => {
|
|
|
210
209
|
router.post('/restart', async (req, res) => {
|
|
211
210
|
try {
|
|
212
211
|
const bc = getBrokerConfig(req);
|
|
213
|
-
if (bc.
|
|
214
|
-
const cmd = bc.restartCmd || 'sudo systemctl restart mosquitto';
|
|
212
|
+
if (bc.ssh && bc.ssh.host) {
|
|
215
213
|
const result = await sshDeploy.runCommand(bc.ssh, cmd);
|
|
216
214
|
return res.json({ ok: true, ...result });
|
|
217
215
|
}
|
|
@@ -723,7 +721,7 @@ router.post('/wizard/bootstrap', async (req, res) => {
|
|
|
723
721
|
const username = req.body.adminUsername || 'she-admin';
|
|
724
722
|
const password = req.body.adminPassword || crypto.randomBytes(18).toString('base64url');
|
|
725
723
|
const configDir = (req.body.configDir || bc.configDir || '/etc/mosquitto').replace(/\\/g, '/');
|
|
726
|
-
const isRemote = bc.
|
|
724
|
+
const isRemote = !!(bc.ssh && bc.ssh.host);
|
|
727
725
|
|
|
728
726
|
const dynSecPath = `${configDir}/dynamic-security.json`;
|
|
729
727
|
const confFilePath = `${configDir}/mosquitto.conf`;
|