From fd38a2c135a20e7e2c7caf6ff8a52fadf02f3018 Mon Sep 17 00:00:00 2001 From: Sebastian Rieger Date: Fri, 26 Jan 2024 22:24:54 +0000 Subject: [PATCH] bumped xterm.js and plugins, horizonal scrollbar issue needs to be checked --- frontend/package.json | 9 +- frontend/src/components/Terminal.tsx | 4 +- package-lock.json | 120 +++++++++++++-------------- 3 files changed, 66 insertions(+), 67 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index fb041c0..3f80b70 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -19,7 +19,6 @@ "@types/react": "^18.0.9", "@types/react-dom": "^18.0.4", "@types/react-router-dom": "^5.3.3", - "do_username": "^0.0.2", "fontsource-roboto": "^4.0.0", "guacamole-common-js": "^1.4.0-a", "mermaid": "^9.4.0", @@ -36,10 +35,10 @@ "typescript": "^4.7.4", "vscode-ws-jsonrpc": "^1.0.2", "web-vitals": "^2.1.4", - "xterm": "^4.18.0", - "xterm-addon-attach": "^0.6.0", - "xterm-addon-fit": "^0.5.0", - "xterm-addon-serialize": "^0.6.2" + "xterm": "^5.3.0", + "xterm-addon-attach": "^0.9.0", + "xterm-addon-fit": "^0.8.0", + "xterm-addon-serialize": "^0.11.0" }, "devDependencies": { "@svgr/webpack": "^6.2.1", diff --git a/frontend/src/components/Terminal.tsx b/frontend/src/components/Terminal.tsx index 47fb016..660a5ad 100644 --- a/frontend/src/components/Terminal.tsx +++ b/frontend/src/components/Terminal.tsx @@ -41,14 +41,14 @@ export default class XTerminal extends React.Component { this.websocket.send(`auth ${localStorage.getItem("token")}`); //signal initial window resize to ssh using SIGWINCH (\x1B[8;25;80t) //running "resize" manually in the shell also fixes ncurses, tmux, screen etc. dimensions - this.websocket.send("\x1B[8;"+this.fitAddon.proposeDimensions().rows+";"+this.fitAddon.proposeDimensions().cols+"t"); + this.websocket.send("\x1B[8;"+this.fitAddon.proposeDimensions()?.rows+";"+this.fitAddon.proposeDimensions()?.cols+"t"); } this.xterm?.terminal.onResize((size) => { this.fitAddon.fit(); if (this.websocket?.readyState === 1) { //signal window resize to ssh using SIGWINCH (\x1B[8;25;80t) //running "resize" manually in the shell also fixes ncurses, tmux, screen etc. dimensions - this.websocket?.send("\x1B[8;"+this.fitAddon.proposeDimensions().rows+";"+this.fitAddon.proposeDimensions().cols+"t"); + this.websocket?.send("\x1B[8;"+this.fitAddon.proposeDimensions()?.rows+";"+this.fitAddon.proposeDimensions()?.cols+"t"); } }) this.xterm?.terminal.write( this.props?.terminalState ?? "" ); diff --git a/package-lock.json b/package-lock.json index 91f802f..8882835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1175,7 +1175,6 @@ "@types/react": "^18.0.9", "@types/react-dom": "^18.0.4", "@types/react-router-dom": "^5.3.3", - "do_username": "^0.0.2", "fontsource-roboto": "^4.0.0", "guacamole-common-js": "^1.4.0-a", "mermaid": "^9.4.0", @@ -1192,10 +1191,10 @@ "typescript": "^4.7.4", "vscode-ws-jsonrpc": "^1.0.2", "web-vitals": "^2.1.4", - "xterm": "^4.18.0", - "xterm-addon-attach": "^0.6.0", - "xterm-addon-fit": "^0.5.0", - "xterm-addon-serialize": "^0.6.2" + "xterm": "^5.3.0", + "xterm-addon-attach": "^0.9.0", + "xterm-addon-fit": "^0.8.0", + "xterm-addon-serialize": "^0.11.0" }, "devDependencies": { "@svgr/webpack": "^6.2.1", @@ -1540,6 +1539,35 @@ "node": ">=10.13.0" } }, + "frontend/node_modules/xterm": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/xterm/-/xterm-5.3.0.tgz", + "integrity": "sha512-8QqjlekLUFTrU6x7xck1MsPzPA571K5zNqWm0M0oroYEWVOptZ0+ubQSkQ3uxIEhcIHRujJy6emDWX4A7qyFzg==" + }, + "frontend/node_modules/xterm-addon-attach": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/xterm-addon-attach/-/xterm-addon-attach-0.9.0.tgz", + "integrity": "sha512-NykWWOsobVZPPK3P9eFkItrnBK9Lw0f94uey5zhqIVB1bhswdVBfl+uziEzSOhe2h0rT9wD0wOeAYsdSXeavPw==", + "peerDependencies": { + "xterm": "^5.0.0" + } + }, + "frontend/node_modules/xterm-addon-fit": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.8.0.tgz", + "integrity": "sha512-yj3Np7XlvxxhYF/EJ7p3KHaMt6OdwQ+HDu573Vx1lRXsVxOcnVJs51RgjZOouIZOczTsskaS+CpXspK81/DLqw==", + "peerDependencies": { + "xterm": "^5.0.0" + } + }, + "frontend/node_modules/xterm-addon-serialize": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/xterm-addon-serialize/-/xterm-addon-serialize-0.11.0.tgz", + "integrity": "sha512-2CNDnmLdLkNWfsxNFkGsI5FE9W/BbsMzeOrbu59yNqH9L6k1gmL+Ab6VXxEp2NQUJSzaiqi6t0nFR5k5EDkVIg==", + "peerDependencies": { + "xterm": "^5.0.0" + } + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -9298,11 +9326,6 @@ "node": ">=6" } }, - "node_modules/do_username": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/do_username/-/do_username-0.0.2.tgz", - "integrity": "sha512-X8wsxJghAGB22FSMhT9g5LlcUbYHBnSzlGv+qRDeZl5Rl5K+Xe5P8bmOscJgK3w5ezMRkk0fclVY7iKAMbElqA==" - }, "node_modules/docker-modem": { "version": "3.0.3", "license": "Apache-2.0", @@ -24728,31 +24751,6 @@ "node": ">=0.4" } }, - "node_modules/xterm": { - "version": "4.18.0", - "license": "MIT" - }, - "node_modules/xterm-addon-attach": { - "version": "0.6.0", - "license": "MIT", - "peerDependencies": { - "xterm": "^4.0.0" - } - }, - "node_modules/xterm-addon-fit": { - "version": "0.5.0", - "license": "MIT", - "peerDependencies": { - "xterm": "^4.0.0" - } - }, - "node_modules/xterm-addon-serialize": { - "version": "0.6.2", - "license": "MIT", - "peerDependencies": { - "xterm": "^4.0.0" - } - }, "node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -29816,11 +29814,6 @@ "@leichtgewicht/ip-codec": "^2.0.1" } }, - "do_username": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/do_username/-/do_username-0.0.2.tgz", - "integrity": "sha512-X8wsxJghAGB22FSMhT9g5LlcUbYHBnSzlGv+qRDeZl5Rl5K+Xe5P8bmOscJgK3w5ezMRkk0fclVY7iKAMbElqA==" - }, "docker-modem": { "version": "3.0.3", "requires": { @@ -31009,7 +31002,6 @@ "@types/react": "^18.0.9", "@types/react-dom": "^18.0.4", "@types/react-router-dom": "^5.3.3", - "do_username": "^0.0.2", "fontsource-roboto": "^4.0.0", "guacamole-common-js": "^1.4.0-a", "mermaid": "^9.4.0", @@ -31028,10 +31020,10 @@ "typescript": "^4.7.4", "vscode-ws-jsonrpc": "^1.0.2", "web-vitals": "^2.1.4", - "xterm": "^4.18.0", - "xterm-addon-attach": "^0.6.0", - "xterm-addon-fit": "^0.5.0", - "xterm-addon-serialize": "^0.6.2" + "xterm": "^5.3.0", + "xterm-addon-attach": "^0.9.0", + "xterm-addon-fit": "^0.8.0", + "xterm-addon-serialize": "^0.11.0" }, "dependencies": { "@svgr/babel-plugin-add-jsx-attribute": { @@ -31221,6 +31213,29 @@ "picocolors": "^1.0.0", "stable": "^0.1.8" } + }, + "xterm": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/xterm/-/xterm-5.3.0.tgz", + "integrity": "sha512-8QqjlekLUFTrU6x7xck1MsPzPA571K5zNqWm0M0oroYEWVOptZ0+ubQSkQ3uxIEhcIHRujJy6emDWX4A7qyFzg==" + }, + "xterm-addon-attach": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/xterm-addon-attach/-/xterm-addon-attach-0.9.0.tgz", + "integrity": "sha512-NykWWOsobVZPPK3P9eFkItrnBK9Lw0f94uey5zhqIVB1bhswdVBfl+uziEzSOhe2h0rT9wD0wOeAYsdSXeavPw==", + "requires": {} + }, + "xterm-addon-fit": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.8.0.tgz", + "integrity": "sha512-yj3Np7XlvxxhYF/EJ7p3KHaMt6OdwQ+HDu573Vx1lRXsVxOcnVJs51RgjZOouIZOczTsskaS+CpXspK81/DLqw==", + "requires": {} + }, + "xterm-addon-serialize": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/xterm-addon-serialize/-/xterm-addon-serialize-0.11.0.tgz", + "integrity": "sha512-2CNDnmLdLkNWfsxNFkGsI5FE9W/BbsMzeOrbu59yNqH9L6k1gmL+Ab6VXxEp2NQUJSzaiqi6t0nFR5k5EDkVIg==", + "requires": {} } } }, @@ -40929,21 +40944,6 @@ "version": "4.0.2", "dev": true }, - "xterm": { - "version": "4.18.0" - }, - "xterm-addon-attach": { - "version": "0.6.0", - "requires": {} - }, - "xterm-addon-fit": { - "version": "0.5.0", - "requires": {} - }, - "xterm-addon-serialize": { - "version": "0.6.2", - "requires": {} - }, "y18n": { "version": "5.0.8", "dev": true