@bobfrankston/mailx-imap 0.1.83 → 0.1.84
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.
- package/index.js +13 -6
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -1289,13 +1289,20 @@ export class ImapManager extends EventEmitter {
|
|
|
1289
1289
|
console.log(` [qresync] ${accountId}/${folder.path}: UIDVALIDITY changed (was ${prevUidValidity}, now ${qr.exists}); falling back to full sync`);
|
|
1290
1290
|
}
|
|
1291
1291
|
else if (qr.vanishedUids.length > VANISHED_ABSURD_CAP) {
|
|
1292
|
-
// Refuse the absurd VANISHED set; do NOT iterate/apply it
|
|
1293
|
-
// do NOT return — fall through to the bounded set-diff
|
|
1294
|
-
// reconcile (same as the UIDVALIDITY-changed path). The
|
|
1295
|
-
// modseq watermark is left intact, so a healthy later QRESYNC
|
|
1296
|
-
// can still succeed.
|
|
1292
|
+
// Refuse the absurd VANISHED set; do NOT iterate/apply it.
|
|
1297
1293
|
const localCount = this.db.getMessageCount(accountId, folderId);
|
|
1298
|
-
console.error(` [qresync] ${accountId}/${folder.path}: REFUSING VANISHED of ${qr.vanishedUids.length} UIDs (folder has ${localCount} locally) —
|
|
1294
|
+
console.error(` [qresync] ${accountId}/${folder.path}: REFUSING VANISHED of ${qr.vanishedUids.length} UIDs (folder has ${localCount} locally) — mis-parsed range; self-healing (advance watermark) + falling back to set-diff.`);
|
|
1295
|
+
// SELF-HEAL: advance the modseq watermark to the server's
|
|
1296
|
+
// CURRENT value. Without this the next QRESYNC re-requests the
|
|
1297
|
+
// same giant `(EARLIER) 1:N` range every cycle forever (Bob saw
|
|
1298
|
+
// it recur 21:03 → 21:20) — refusing without advancing isn't
|
|
1299
|
+
// self-healing. The set-diff reconcile below discovers + applies
|
|
1300
|
+
// the ACTUAL deletions via Message-ID identity (bounded, 50%
|
|
1301
|
+
// guard), so skipping the literal VANISHED loses nothing; it
|
|
1302
|
+
// just breaks the stale-modseq loop so future QRESYNCs are clean.
|
|
1303
|
+
if (qr.newHighestModSeq !== undefined) {
|
|
1304
|
+
this.db.updateFolderSync(folderId, prevUidValidity, String(qr.newHighestModSeq));
|
|
1305
|
+
}
|
|
1299
1306
|
}
|
|
1300
1307
|
else {
|
|
1301
1308
|
// Apply VANISHED — server says these UIDs are gone. No
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-imap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.84",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@bobfrankston/mailx-types": "^0.1.18",
|
|
13
13
|
"@bobfrankston/mailx-settings": "^0.1.26",
|
|
14
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
15
|
-
"@bobfrankston/iflow-direct": "^0.1.
|
|
14
|
+
"@bobfrankston/mailx-store": "^0.1.45",
|
|
15
|
+
"@bobfrankston/iflow-direct": "^0.1.52",
|
|
16
16
|
"@bobfrankston/tcp-transport": "^0.1.6",
|
|
17
17
|
"@bobfrankston/smtp-direct": "^0.1.8",
|
|
18
18
|
"@bobfrankston/mailx-sync": "^0.1.19",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@bobfrankston/mailx-types": "^0.1.18",
|
|
41
41
|
"@bobfrankston/mailx-settings": "^0.1.26",
|
|
42
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
43
|
-
"@bobfrankston/iflow-direct": "^0.1.
|
|
42
|
+
"@bobfrankston/mailx-store": "^0.1.45",
|
|
43
|
+
"@bobfrankston/iflow-direct": "^0.1.52",
|
|
44
44
|
"@bobfrankston/tcp-transport": "^0.1.6",
|
|
45
45
|
"@bobfrankston/smtp-direct": "^0.1.8",
|
|
46
46
|
"@bobfrankston/mailx-sync": "^0.1.19",
|