chore: minor refactoring

This commit is contained in:
Bill Church 2024-08-21 19:44:47 +00:00
parent 6f694a96a7
commit 01ddac958e
No known key found for this signature in database

View file

@ -44,6 +44,11 @@ SSHConnection.prototype.connect = function(creds) {
}) })
} }
/**
* Gets the SSH configuration
* @param {Object} creds - The credentials object
* @returns {Object} The SSH configuration object
*/
SSHConnection.prototype.getSSHConfig = function(creds) { SSHConnection.prototype.getSSHConfig = function(creds) {
return { return {
host: creds.host, host: creds.host,
@ -73,6 +78,11 @@ SSHConnection.prototype.shell = function(options) {
}) })
} }
/**
* Resizes the terminal
* @param {number} rows - The number of rows
* @param {number} cols - The number of columns
*/
SSHConnection.prototype.resizeTerminal = function(rows, cols) { SSHConnection.prototype.resizeTerminal = function(rows, cols) {
if (this.stream) { if (this.stream) {
this.stream.setWindow(rows, cols) this.stream.setWindow(rows, cols)