@bobfrankston/mailx 1.0.157 → 1.0.158

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.
@@ -42,6 +42,10 @@
42
42
  function flushPending() {
43
43
  _ready = true;
44
44
  var pending = _pendingCalls.splice(0);
45
+ // Send diagnostic so it shows in Node.js IPC log
46
+ if (window.ipc && window.ipc.postMessage) {
47
+ window.ipc.postMessage(JSON.stringify({ _action: "_debug", _cbid: "0", info: "flush " + pending.length + " calls: " + pending.map(function(m) { return m._action; }).join(", ") }));
48
+ }
45
49
  for (var i = 0; i < pending.length; i++) {
46
50
  if (window.ipc && window.ipc.postMessage) {
47
51
  window.ipc.postMessage(JSON.stringify(pending[i]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",
@@ -20,10 +20,10 @@
20
20
  "postinstall": "node bin/postinstall.js"
21
21
  },
22
22
  "dependencies": {
23
- "@bobfrankston/iflow": "^1.0.53",
23
+ "@bobfrankston/iflow": "^1.0.54",
24
24
  "@bobfrankston/miscinfo": "^1.0.7",
25
25
  "@bobfrankston/oauthsupport": "^1.0.20",
26
- "@bobfrankston/msger": "^0.1.207",
26
+ "@bobfrankston/msger": "^0.1.208",
27
27
  "@capacitor/android": "^8.3.0",
28
28
  "@capacitor/cli": "^8.3.0",
29
29
  "@capacitor/core": "^8.3.0",
@@ -394,6 +394,7 @@ export class ImapManager extends EventEmitter {
394
394
  this.emit("syncProgress", accountId, `sync:${folder.path}`, 0);
395
395
  // Get the highest UID we already have for this folder
396
396
  const highestUid = this.db.getHighestUid(accountId, folderId);
397
+ console.log(` [sync] ${accountId}/${folder.path}: highestUid=${highestUid}, fetching...`);
397
398
  let messages;
398
399
  const firstSync = highestUid === 0;
399
400
  const historyDays = getHistoryDays(accountId);
@@ -613,15 +614,21 @@ export class ImapManager extends EventEmitter {
613
614
  // Step 2: Sync INBOX first
614
615
  const inbox = folders.find(f => f.specialUse === "inbox");
615
616
  if (inbox) {
617
+ console.log(` [sync] ${accountId}: starting INBOX sync (folder ${inbox.id})`);
616
618
  try {
617
619
  client = await this.getOpsClient(accountId);
620
+ console.log(` [sync] ${accountId}: got client, calling syncFolder for INBOX`);
618
621
  await this.syncFolder(accountId, inbox.id, client);
622
+ console.log(` [sync] ${accountId}: INBOX sync complete`);
619
623
  }
620
624
  catch (e) {
621
625
  console.error(` Inbox sync error for ${accountId}: ${e.message}`);
622
626
  await this.reconnectOps(accountId);
623
627
  }
624
628
  }
629
+ else {
630
+ console.log(` [sync] ${accountId}: no INBOX folder found`);
631
+ }
625
632
  // Step 3: Sync remaining folders
626
633
  const remaining = folders.filter(f => f.specialUse !== "inbox");
627
634
  remaining.sort((a, b) => {