@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.
@@ -12,6 +12,7 @@ export interface SessionInfo {
12
12
  NUM_HASH?: string;
13
13
  OW_KEY?: string;
14
14
  INSTANCE_ID?: string;
15
+ RAM_INFO?: string;
15
16
  LATEST_VERSION?: boolean;
16
17
  CLI?: boolean;
17
18
  ACC_TYPE?: 'PERSONAL' | 'BUSINESS';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.35.3",
3
+ "version": "4.35.4",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",