@open-wa/wa-automate 4.35.3 → 4.35.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -39,6 +39,7 @@ const update_notifier_1 = __importDefault(require("update-notifier"));
|
|
39
39
|
const Client_1 = require("../api/Client");
|
40
40
|
const index_1 = require("../api/model/index");
|
41
41
|
const path = __importStar(require("path"));
|
42
|
+
const os = __importStar(require("os"));
|
42
43
|
const auth_1 = require("./auth");
|
43
44
|
const browser_1 = require("./browser");
|
44
45
|
const events_1 = require("./events");
|
@@ -148,6 +149,8 @@ function create(config = {}) {
|
|
148
149
|
sessionId = 'session';
|
149
150
|
const spinner = new events_1.Spin(sessionId, 'STARTUP', config === null || config === void 0 ? void 0 : config.disableSpins);
|
150
151
|
const qrManager = new auth_1.QRManager(config);
|
152
|
+
const RAM_INFO = `Total: ${parseFloat(`${os.totalmem() / 1000000000}`).toFixed(2)} GB | Free: ${parseFloat(`${os.freemem() / 1000000000}`).toFixed(2)} GB`;
|
153
|
+
logging_1.log.info("RAM INFO", RAM_INFO);
|
151
154
|
try {
|
152
155
|
if (typeof config === 'string')
|
153
156
|
console.error("AS OF VERSION 3+ YOU CAN NO LONGER SET THE SESSION ID AS THE FIRST PARAMETER OF CREATE. CREATE CAN ONLY TAKE A CONFIG OBJECT. IF YOU STILL HAVE CONFIGS AS A SECOND PARAMETER, THEY WILL HAVE NO EFFECT! PLEASE SEE DOCS.");
|
@@ -203,7 +206,8 @@ function create(config = {}) {
|
|
203
206
|
WA_AUTOMATE_VERSION,
|
204
207
|
BROWSER_VERSION,
|
205
208
|
OS,
|
206
|
-
START_TS
|
209
|
+
START_TS,
|
210
|
+
RAM_INFO
|
207
211
|
};
|
208
212
|
if ((config === null || config === void 0 ? void 0 : config.logDebugInfoAsObject) || (config === null || config === void 0 ? void 0 : config.disableSpins))
|
209
213
|
spinner.succeed(`Debug info: ${JSON.stringify(debugInfo, null, 2)}`);
|
package/package.json
CHANGED