MeshCMD route error handling.
Ylian Saint-Hilaire committed
Nov 2, 2021 at 21:53 UTC
66842d53c9e302e98e219757afac86bd0bda324d
3 files changed
+4
-17
agents/meshcmd.js
+1
@@ -2050,6 +2050,7 @@ function startRouter() {
2050
settings.websocket = http.request(options);
2051
settings.websocket.upgrade = OnServerWebSocket;
2052
settings.websocket.on('error', function (ex) { console.log("Unable to connect to server: " + JSON.stringify(ex)); process.exit(1); return; });
2053
+ settings.websocket.on('response', function (rsp) { console.log("Unable to connect to server: " + rsp.statusMessage + " (" + rsp.statusCode + ")"); process.exit(1); return; });
2054
settings.websocket.end();
2055
}
2056
meshcentral.js
+1
-1
@@ -3344,7 +3344,7 @@ function mainStart() {
3344
if (config.settings.postgres != null) { modules.push('pg@8.7.1'); modules.push('pgtools@0.3.2'); } // Add Postgres, Postgres driver.
3345
if (config.settings.mariadb != null) { modules.push('mariadb'); } // Add MariaDB, official driver.
3346
if (config.settings.vault != null) { modules.push('node-vault'); } // Add official HashiCorp's Vault module.
3347
- if (config.settings.plugins != null) { modules.push('semver'); } // Required for version compat testing and update checks
3347
+ if (config.settings.plugins != null) { modules.push('semver'); } // Required for version compat testing and update checks
3348
if ((config.settings.plugins != null) && (config.settings.plugins.proxy != null)) { modules.push('https-proxy-agent'); } // Required for HTTP/HTTPS proxy support
3349
else if (config.settings.xmongodb != null) { modules.push('mongojs'); } // Add MongoJS, old driver.
3350
if (nodemailer || (config.smtp != null)) { modules.push('nodemailer'); } // Add SMTP support
package.json
+2
-16
@@ -36,9 +36,6 @@
36
"sample-config-advanced.json"
37
],
38
"dependencies": {
39
- "@yetzt/nedb": "^1.8.0",
40
- "archiver": "^4.0.2",
41
- "archiver-zip-encrypted": "^1.0.10",
39
"body-parser": "^1.19.0",
40
"cbor": "~5.2.0",
41
"compression": "^1.7.4",
@@ -46,24 +43,13 @@
43
"express": "^4.17.0",
44
"express-handlebars": "^3.1.0",
45
"express-ws": "^4.0.0",
49
- "image-size": "^1.0.0",
46
"ipcheck": "^0.1.0",
51
- "loadavg-windows": "^1.1.1",
47
"minimist": "^1.2.5",
53
- "mongodb": "^4.1.0",
48
"multiparty": "^4.2.1",
49
+ "@yetzt/nedb": "^1.8.0",
50
"node-forge": "^0.10.0",
56
- "node-rdpjs-2": "^0.3.5",
57
- "node-windows": "^0.1.4",
58
- "otplib": "^10.2.3",
59
- "pg": "^8.7.1",
60
- "pgtools": "^0.3.2",
61
- "saslprep": "^1.0.3",
62
- "ssh2": "^1.5.0",
63
- "web-push": "^3.4.5",
51
"ws": "^5.2.3",
65
- "yauzl": "^2.10.0",
66
- "yubikeyotp": "^0.2.0"
52
+ "yauzl": "^2.10.0"
53
},
54
"repository": {
55
"type": "git",