1
0
Fork 0

chore: Bump xterm

pull/20/head
Ambrose Chua 2021-11-16 18:43:45 +08:00
parent 148c893790
commit bf956b790a
5 changed files with 43 additions and 44 deletions

View File

@ -22,7 +22,7 @@ const rimraf = require("rimraf");
const path = require("path");
const filesize = require("filesize");
const octicons = require("octicons");
const octicons = require("@primer/octicons");
const handlebars = require("handlebars");
const port = +process.env.PORT || 8080;
@ -79,7 +79,7 @@ app.use(
);
app.use(
"/@assets/octicons",
express.static(path.join(__dirname, "node_modules/octicons/build"))
express.static(path.join(__dirname, "node_modules/@primer/octicons/build"))
);
app.use(
"/@assets/jquery",
@ -514,7 +514,7 @@ if (shellable || cmdable) {
});
socket.on("message", (data) => {
// special messages should decode to Buffers
if (Buffer.isBuffer(data)) {
if (data.length == 6) {
switch (data.readUInt16BE(0)) {
case 0:
term.resize(data.readUInt16BE(1), data.readUInt16BE(2));

53
package-lock.json generated
View File

@ -8,6 +8,7 @@
"name": "file-manager",
"version": "0.1.0",
"dependencies": {
"@primer/octicons": "^16.1.1",
"archiver": "^5.3.0",
"body-parser": "^1.19.0",
"bootstrap": "^5.0.0",
@ -20,11 +21,10 @@
"jquery": "^3.6.0",
"node-pty": "^0.10.1",
"notp": "^2.0.3",
"octicons": "^8.5.0",
"rimraf": "^3.0.2",
"thirty-two": "^1.0.2",
"ws": "^7.4.6",
"xterm": "^4.11.0",
"ws": "^8.2.3",
"xterm": "^4.15.0",
"xterm-addon-attach": "^0.6.0",
"xterm-addon-fit": "^0.5.0"
},
@ -45,6 +45,14 @@
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@primer/octicons": {
"version": "16.1.1",
"resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-16.1.1.tgz",
"integrity": "sha512-qlMErXg4I7oOofP4d5GceLbNpjTRSkyLoe5Ng1mfebtTvjeBj8x+kdqgwFWLRp7QO1ye5AaxcCvn1AJMAeURzw==",
"dependencies": {
"object-assign": "^4.1.1"
}
},
"node_modules/accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@ -891,15 +899,6 @@
"node": ">=0.10.0"
}
},
"node_modules/octicons": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/octicons/-/octicons-8.5.0.tgz",
"integrity": "sha512-l4GCHwBvStuwVfIuqUx/ktFJQJdCqLnd0bi2dvYZzkza6wj9EUksfMUlTqyVMULbPIvRTXxOqn/W07fsMu1bXA==",
"deprecated": "octicons has been renamed to @primer/octicons",
"dependencies": {
"object-assign": "^4.1.1"
}
},
"node_modules/on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
@ -1275,11 +1274,11 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"node_modules/ws": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"engines": {
"node": ">=8.3.0"
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
@ -1336,6 +1335,14 @@
"integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ==",
"peer": true
},
"@primer/octicons": {
"version": "16.1.1",
"resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-16.1.1.tgz",
"integrity": "sha512-qlMErXg4I7oOofP4d5GceLbNpjTRSkyLoe5Ng1mfebtTvjeBj8x+kdqgwFWLRp7QO1ye5AaxcCvn1AJMAeURzw==",
"requires": {
"object-assign": "^4.1.1"
}
},
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@ -1978,14 +1985,6 @@
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"octicons": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/octicons/-/octicons-8.5.0.tgz",
"integrity": "sha512-l4GCHwBvStuwVfIuqUx/ktFJQJdCqLnd0bi2dvYZzkza6wj9EUksfMUlTqyVMULbPIvRTXxOqn/W07fsMu1bXA==",
"requires": {
"object-assign": "^4.1.1"
}
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
@ -2258,9 +2257,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"requires": {}
},
"xterm": {

View File

@ -22,11 +22,11 @@
"jquery": "^3.6.0",
"node-pty": "^0.10.1",
"notp": "^2.0.3",
"octicons": "^8.5.0",
"@primer/octicons": "^16.1.1",
"rimraf": "^3.0.2",
"thirty-two": "^1.0.2",
"ws": "^7.4.6",
"xterm": "^4.11.0",
"ws": "^8.2.3",
"xterm": "^4.15.0",
"xterm-addon-attach": "^0.6.0",
"xterm-addon-fit": "^0.5.0"
},

View File

@ -3,12 +3,12 @@
<div class="d-flex">
<div class="btn-group me-2" role="group">
<a class="btn btn-primary" href="@upload" data-bs-toggle="modal" data-bs-target="#upload" title="Upload a file" data-bs-placement="top">
{{octicon "cloud-upload"}}
<span class="d-none d-sm-inline">Upload</span>
{{octicon "upload"}}
<span class="d-none d-sm-inline align-text-bottom">Upload</span>
</a>
<a class="btn btn-secondary" href="@mkdir" data-bs-toggle="modal" data-bs-target="#mkdir" title="Create a new folder" data-bs-placement="top">
{{octicon "file-directory"}}
<span class="d-none d-md-inline">New folder</span>
<span class="d-none d-md-inline align-text-bottom">New folder</span>
</a>
</div>
{{#either cmdable shellable}}
@ -16,13 +16,13 @@
{{#if cmdable}}
<a class="btn btn-info" href="@cmd" data-bs-toggle="modal" data-bs-target="#cmd" title="Run a command" data-bs-placement="top">
{{octicon "terminal"}}
<span class="d-none d-lg-inline">Run command</span>
<span class="d-none d-lg-inline align-text-bottom">Run command</span>
</a>
{{/if}}
{{#if shellable}}
<a class="btn btn-warning" href="@shell" title="Open a new shell" data-bs-placement="top">
{{octicon "terminal"}}
<span class="d-none d-md-inline">Open shell</span>
<span class="d-none d-md-inline align-text-bottom">Open shell</span>
</a>
{{/if}}
</div>
@ -30,13 +30,13 @@
<div class="btn-group me-2" role="group">
<a class="btn btn-success" href="@download" data-bs-toggle="modal" data-bs-target="#download" title="Download file archive" data-bs-placement="top">
{{octicon "file-zip"}}
<span class="d-none d-md-inline">Download</span>
<span class="d-none d-md-inline align-text-bottom">Download</span>
</a>
</div>
<div class="btn-group me-2" role="group">
<a class="btn btn-danger" href="@delete" data-bs-toggle="modal" data-bs-target="#delete" title="Delete selected files" data-bs-placement="top">
{{octicon "trashcan"}}
<span class="d-none d-md-inline">Delete</span>
{{octicon "trash"}}
<span class="d-none d-md-inline align-text-bottom">Delete</span>
</a>
</div>
</div>
@ -44,7 +44,7 @@
<div class="btn-group ms-2" role="group">
<a class="btn btn-warning" href="./" title="Refresh list" data-bs-placement="top">
{{octicon "sync"}}
<span class="d-none d-lg-inline">Refresh</span>
<span class="d-none d-lg-inline align-text-bottom">Refresh</span>
</a>
</div>
</div>

View File

@ -10,11 +10,11 @@
<div class="btn-group me-2" role="group">
<a class="btn btn-danger" href="/{{path}}" id="shell-close">
{{octicon "chevron-left"}}
<span class="d-none d-sm-inline">Exit shell</span>
<span class="d-none d-sm-inline align-text-bottom">Exit shell</span>
</a>
<a class="btn btn-warning" href="@shell" target="_blank" title="Open a new shell tab" data-bs-placement="top">
{{octicon "terminal"}}
<span class="d-none d-sm-inline">New shell</span>
<span class="d-none d-sm-inline align-text-bottom">New shell</span>
</a>
</div>
</div>