From b382a8fcc07a66beef583db8b675d20082861593 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sat, 25 Jan 2020 14:17:21 -0800 Subject: [PATCH] XTerm improvements. --- MeshCentralServer.njsproj | 1 + agents/meshcore.js | 4 ++-- meshcentral.js | 14 ++++++-------- package.json | 3 +-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/MeshCentralServer.njsproj b/MeshCentralServer.njsproj index 090562db..aabd0877 100644 --- a/MeshCentralServer.njsproj +++ b/MeshCentralServer.njsproj @@ -288,6 +288,7 @@ + diff --git a/agents/meshcore.js b/agents/meshcore.js index d4378fa8..2a81535a 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1793,9 +1793,9 @@ function createMeshCore(agent) { } else { if (ws.httprequest.process == null || !ws.httprequest.process.pty) return; // ILibDuktape_ChildProcess kill doesn't support sending signals - if (fs.existsSync("/bin/kill")) { + if (fs.existsSync('/bin/kill')) { // We need to send signal to the child of the process, since the child is the shell - childProcess.execFile('/bin/bash', ['bash', "-c", "kill -SIGWINCH $(pgrep -P " + ws.httprequest.process.pid + ")"]); + childProcess.execFile('/bin/bash', ['bash', '-c', 'kill -SIGWINCH $(pgrep -P ' + ws.httprequest.process.pid + ')']); } } break; diff --git a/meshcentral.js b/meshcentral.js index c8d2626a..8fcf1b05 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -2171,24 +2171,22 @@ function InstallModules(modules, func) { var dependencies = require("./package.json").dependencies; for (var i in modules) { // Modules may contain a version tag (foobar@1.0.0), remove it so the module can be found using require - var moduleInfo = modules[i].split("@", 2); + var moduleNameAndVersion = modules[i]; + var moduleInfo = moduleNameAndVersion.split("@", 2); var moduleName = moduleInfo[0]; var moduleVersion = moduleInfo[1]; try { // Does the module need a specific version? if (moduleVersion) { - if (require(`${moduleName}/package.json`).version != moduleVersion) - throw new Error(); - } - else { + if (require(`${moduleName}/package.json`).version != moduleVersion) { throw new Error(); } + } else { // For all other modules, do the check here. // Is the module in package.json? Install exact version. - if (typeof dependencies[moduleName] != undefined) - moduleVersion = dependencies[moduleName]; + if (typeof dependencies[moduleName] != undefined) { moduleVersion = dependencies[moduleName]; } require(moduleName); } } catch (e) { - if (previouslyInstalledModules[modules[i]] !== true) { missingModules.push(`${moduleName}${moduleVersion ? `@${moduleVersion}` : ""}`); } + if (previouslyInstalledModules[modules[i]] !== true) { missingModules.push(moduleNameAndVersion); } } } if (missingModules.length > 0) { InstallModule(missingModules.shift(), InstallModules, modules, func); } else { func(); } diff --git a/package.json b/package.json index a2295e69..2a536091 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.4.7-w", + "version": "0.4.7-x", "keywords": [ "Remote Management", "Intel AMT", @@ -42,7 +42,6 @@ "multiparty": "^4.2.1", "nedb": "^1.8.0", "node-forge": "^0.8.4", - "otplib": "^12.0.1", "ws": "^6.2.1", "xmldom": "^0.1.27", "yauzl": "^2.10.0"