From bf956b790abb0dd0bb312bf082ce366e2fe3d894 Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Tue, 16 Nov 2021 18:43:45 +0800 Subject: [PATCH] chore: Bump xterm --- index.js | 6 ++-- package-lock.json | 53 +++++++++++++++---------------- package.json | 6 ++-- views/partials/toolbar.handlebars | 18 +++++------ views/shell.handlebars | 4 +-- 5 files changed, 43 insertions(+), 44 deletions(-) diff --git a/index.js b/index.js index 9aa0caa..a6431cb 100755 --- a/index.js +++ b/index.js @@ -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)); diff --git a/package-lock.json b/package-lock.json index 6bc5128..ed25af2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index 3f3e992..ca702c0 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/views/partials/toolbar.handlebars b/views/partials/toolbar.handlebars index d30df8e..6d12dde 100644 --- a/views/partials/toolbar.handlebars +++ b/views/partials/toolbar.handlebars @@ -3,12 +3,12 @@
{{#either cmdable shellable}} @@ -16,13 +16,13 @@ {{#if cmdable}} {{octicon "terminal"}} - Run command + Run command {{/if}} {{#if shellable}} {{octicon "terminal"}} - Open shell + Open shell {{/if}}
@@ -30,13 +30,13 @@
{{octicon "file-zip"}} - Download + Download
- {{octicon "trashcan"}} - Delete + {{octicon "trash"}} + Delete
@@ -44,7 +44,7 @@
{{octicon "sync"}} - Refresh + Refresh
diff --git a/views/shell.handlebars b/views/shell.handlebars index 99e7e19..f807fcb 100644 --- a/views/shell.handlebars +++ b/views/shell.handlebars @@ -10,11 +10,11 @@
{{octicon "chevron-left"}} - Exit shell + Exit shell {{octicon "terminal"}} - New shell + New shell