smart-home-engine 1.1.2 → 1.1.3
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-S8U43ruI.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-S8U43ruI.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
|
@@ -160,4 +160,4 @@ async function generateKeypair(identityFile) {
|
|
|
160
160
|
return fs.readFileSync(expandedPath + '.pub', 'utf8').trim();
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
module.exports = { runCommand, readRemoteFile, uploadFile, uploadContent, testConnection, generateKeypair };
|
|
163
|
+
module.exports = { expandHome, runCommand, readRemoteFile, uploadFile, uploadContent, testConnection, generateKeypair };
|
package/src/web/broker-api.js
CHANGED
|
@@ -660,6 +660,20 @@ module.exports = { router };
|
|
|
660
660
|
// Note: these routes are mounted on the same router but defined after module.exports
|
|
661
661
|
// because they add to `router` (which is already exported by reference).
|
|
662
662
|
|
|
663
|
+
/** GET /she/broker/ssh/pubkey — Read existing public key (if any) */
|
|
664
|
+
router.get('/ssh/pubkey', (req, res) => {
|
|
665
|
+
try {
|
|
666
|
+
const bc = getBrokerConfig(req);
|
|
667
|
+
const identityFile = sshDeploy.expandHome((bc.ssh && bc.ssh.identityFile) || DEFAULT_SSH_KEY);
|
|
668
|
+
const pubPath = identityFile + '.pub';
|
|
669
|
+
if (!fs.existsSync(pubPath)) return res.json({ publicKey: null });
|
|
670
|
+
const publicKey = fs.readFileSync(pubPath, 'utf8').trim();
|
|
671
|
+
res.json({ publicKey });
|
|
672
|
+
} catch (err) {
|
|
673
|
+
handleError(res, err);
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
|
|
663
677
|
/** POST /she/broker/ssh/keygen — Generate SSH keypair */
|
|
664
678
|
router.post('/ssh/keygen', async (req, res) => {
|
|
665
679
|
try {
|