@bobfrankston/rmfmail 1.1.191 → 1.1.192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -407,13 +407,14 @@ function installConsoleCapture() {
407
407
  }
408
408
  };
409
409
  console.log = (...args) => {
410
- forward("log", args);
411
410
  orig.log(...args);
412
411
  };
413
412
  console.info = (...args) => {
414
- forward("info", args);
415
413
  orig.info(...args);
416
414
  };
415
+ console.debug = (...args) => {
416
+ orig.debug(...args);
417
+ };
417
418
  console.warn = (...args) => {
418
419
  forward("warn", args);
419
420
  orig.warn(...args);
@@ -422,10 +423,6 @@ function installConsoleCapture() {
422
423
  forward("error", args);
423
424
  orig.error(...args);
424
425
  };
425
- console.debug = (...args) => {
426
- forward("debug", args);
427
- orig.debug(...args);
428
- };
429
426
  try {
430
427
  window.addEventListener("error", (e) => {
431
428
  try {
@@ -442,8 +439,11 @@ function installConsoleCapture() {
442
439
  window.addEventListener("unhandledrejection", (e) => {
443
440
  try {
444
441
  const r = e.reason;
442
+ const msg = r?.message || String(r);
443
+ if (/logClientEvent|mailxapi timeout/i.test(msg))
444
+ return;
445
445
  logClientEvent("window.unhandledrejection", {
446
- message: r?.message || String(r),
446
+ message: msg,
447
447
  stack: r?.stack || null
448
448
  });
449
449
  } catch {
@@ -457,7 +457,10 @@ function logClientEvent(tag, data) {
457
457
  try {
458
458
  const bridge = typeof globalThis.mailxapi !== "undefined" && globalThis.mailxapi?.isApp ? globalThis.mailxapi : window.opener?.mailxapi?.isApp ? window.opener.mailxapi : window.parent?.mailxapi?.isApp ? window.parent.mailxapi : null;
459
459
  if (bridge?.logClientEvent) {
460
- bridge.logClientEvent(tag, data);
460
+ const p = bridge.logClientEvent(tag, data);
461
+ if (p && typeof p.catch === "function")
462
+ p.catch(() => {
463
+ });
461
464
  delivered = true;
462
465
  }
463
466
  } catch {