terminal-expose 1.2.0 → 1.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "terminal-expose",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Interactive terminal session sharing over HTTP and WebSocket.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"index.js",
|
|
11
|
-
"src"
|
|
12
|
-
"public"
|
|
11
|
+
"src"
|
|
13
12
|
],
|
|
14
13
|
"scripts": {
|
|
15
14
|
"start": "node index.js",
|
package/src/server/app.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
const express = require("express");
|
|
2
|
-
const path = require("path");
|
|
3
2
|
const { SESSION_TOKEN } = require("../config/env");
|
|
4
3
|
|
|
5
4
|
function createApp(ioGetter, terminalSession) {
|
|
6
5
|
const app = express();
|
|
7
6
|
|
|
8
|
-
// We are referring to public directory in root
|
|
9
|
-
app.use("/assets", express.static(path.join(__dirname, "../../public")));
|
|
10
|
-
|
|
11
7
|
app.get("/", (_, res) => {
|
|
12
8
|
res.type("html").send(`<!doctype html>
|
|
13
9
|
<html>
|
|
@@ -36,7 +32,8 @@ function createApp(ioGetter, terminalSession) {
|
|
|
36
32
|
return res.status(403).send("Invalid session token");
|
|
37
33
|
}
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
const viewerHtml = require("../templates/viewer.js");
|
|
36
|
+
res.type("html").send(viewerHtml);
|
|
40
37
|
});
|
|
41
38
|
|
|
42
39
|
return app;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
module.exports = `<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
cursorBlink: true,
|
|
265
265
|
convertEol: true,
|
|
266
266
|
fontFamily:
|
|
267
|
-
|
|
267
|
+
\`"JetBrains Mono", monospace\`,
|
|
268
268
|
fontSize: 14,
|
|
269
269
|
lineHeight: 1.3,
|
|
270
270
|
scrollback: 20000,
|
|
@@ -480,3 +480,4 @@
|
|
|
480
480
|
</script>
|
|
481
481
|
</body>
|
|
482
482
|
</html>
|
|
483
|
+
`;
|