Added DB bulk operation indication in server info command.

Ylian Saint-Hilaire committed Jan 9, 2022 at 15:36 UTC e5e451a8a249c2c365dd99e6f8783c3104357790
2 files changed +14 -3
meshuser.js
+1 -1
@@ -6594,7 +6594,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
6594 try { info.runMode = (["Hybrid (LAN + WAN) mode", "WAN mode", "LAN mode"][(args.lanonly ? 2 : (args.wanonly ? 1 : 0))]); } catch (ex) { }
6595 try { info.productionMode = ((process.env.NODE_ENV != null) && (process.env.NODE_ENV == 'production')); } catch (ex) { }
6596 try { info.database = ["Unknown", "NeDB", "MongoJS", "MongoDB", "MariaDB", "MySQL", "PostgreSQL"][parent.parent.db.databaseType]; } catch (ex) { }
6597 - try { if (parent.db.databaseType == 3) { info.dbChangeStream = parent.db.changeStream; } } catch (ex) { }
6597 + try { if (parent.db.databaseType == 3) { info.dbChangeStream = parent.db.changeStream; info.dbBulkOperations = (parent.parent.config.settings.mongodbbulkoperations === true); } } catch (ex) { }
6598 try { if (parent.parent.multiServer != null) { info.serverId = parent.parent.multiServer.serverid; } } catch (ex) { }
6599 try { if (parent.parent.pluginHandler != null) { info.plugins = []; for (var i in parent.parent.pluginHandler.plugins) { info.plugins.push(i); } } } catch (ex) { }
6600 try { info.platform = process.platform; } catch (ex) { }
package.json
+13 -2
@@ -36,6 +36,8 @@
36 "sample-config-advanced.json"
37 ],
38 "dependencies": {
39 + "@yetzt/nedb": "^1.8.0",
40 + "archiver": "^4.0.2",
41 "body-parser": "^1.19.0",
42 "cbor": "~5.2.0",
43 "compression": "^1.7.4",
@@ -43,13 +45,22 @@
45 "express": "^4.17.0",
46 "express-handlebars": "^3.1.0",
47 "express-ws": "^4.0.0",
48 + "image-size": "^1.0.0",
49 "ipcheck": "^0.1.0",
50 + "loadavg-windows": "^1.1.1",
51 "minimist": "^1.2.5",
52 + "mongodb": "^4.1.0",
53 "multiparty": "^4.2.1",
49 - "@yetzt/nedb": "^1.8.0",
54 "node-forge": "^1.0.0",
55 + "node-rdpjs-2": "^0.3.5",
56 + "node-windows": "^0.1.4",
57 + "otplib": "^10.2.3",
58 + "saslprep": "^1.0.3",
59 + "ssh2": "^1.5.0",
60 + "web-push": "^3.4.5",
61 "ws": "^5.2.3",
52 - "yauzl": "^2.10.0"
62 + "yauzl": "^2.10.0",
63 + "yubikeyotp": "^0.2.0"
64 },
65 "engines": {
66 "node": ">=10.0.0"