@bobfrankston/mailx-imap 0.1.114 → 0.1.116
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 +23 -2
- package/package.json +9 -9
package/index.js
CHANGED
|
@@ -2219,7 +2219,7 @@ export class ImapManager extends EventEmitter {
|
|
|
2219
2219
|
for (const uid of toDelete) {
|
|
2220
2220
|
this.scheduleDeferredReconcileDelete(accountId, folderId, uid, folder.path);
|
|
2221
2221
|
}
|
|
2222
|
-
console.log(` [reconcile-defer] ${accountId}/${folder.path}: scheduled ${toDelete.length} deletes (
|
|
2222
|
+
console.log(` [reconcile-defer] ${accountId}/${folder.path}: scheduled ${toDelete.length} deletes (${ImapManager.RECONCILE_DELETE_GRACE_MS / 60_000}min grace for move-detect)`);
|
|
2223
2223
|
}
|
|
2224
2224
|
}
|
|
2225
2225
|
catch (e) {
|
|
@@ -3979,7 +3979,28 @@ export class ImapManager extends EventEmitter {
|
|
|
3979
3979
|
}
|
|
3980
3980
|
}
|
|
3981
3981
|
else if (batchSucceeded && !someReceived) {
|
|
3982
|
-
|
|
3982
|
+
// Verify-then-classify (Q154): a 0-response chunk is
|
|
3983
|
+
// USUALLY a message server-side filtering moved out of
|
|
3984
|
+
// this folder between envelope arrival and body
|
|
3985
|
+
// prefetch (bobma: Sieve → _Spam within seconds) —
|
|
3986
|
+
// expected and self-healing via move-detect, not an
|
|
3987
|
+
// error. Ask the server which UIDs still exist:
|
|
3988
|
+
// absent → one info line (reconcile owns the rows);
|
|
3989
|
+
// still present → a REAL fetch failure, keep the ERROR.
|
|
3990
|
+
let stillPresent = null;
|
|
3991
|
+
try {
|
|
3992
|
+
await this.withConnection(accountId, async (vc) => {
|
|
3993
|
+
const serverUids = new Set(await vc.getUids(folder.path));
|
|
3994
|
+
stillPresent = chunk.filter((uid) => serverUids.has(uid));
|
|
3995
|
+
}, { lane: "prefetch", timeoutMs: 60_000 });
|
|
3996
|
+
}
|
|
3997
|
+
catch { /* verification unavailable — keep the ERROR below */ }
|
|
3998
|
+
if (stillPresent !== null && stillPresent.length === 0) {
|
|
3999
|
+
console.log(` [prefetch] ${accountId}/${folder.path}: ${chunk.length} UID(s) no longer in folder (moved/deleted server-side) — reconcile owns the rows. UIDs: ${chunk.slice(0, 5).join(",")}${chunk.length > 5 ? "..." : ""}`);
|
|
4000
|
+
}
|
|
4001
|
+
else {
|
|
4002
|
+
console.error(` [prefetch] ${accountId}/${folder.path}: chunk ${chunkStart}-${chunkStart + chunk.length - 1} returned 0/${chunk.length} bodies${stillPresent ? ` for UIDs STILL PRESENT on server — real fetch failure` : ""} — NOT pruning (set-diff reconcile owns deletion). UIDs: ${chunk.slice(0, 5).join(",")}${chunk.length > 5 ? "..." : ""}`);
|
|
4003
|
+
}
|
|
3983
4004
|
for (const uid of chunk)
|
|
3984
4005
|
this.markPrefetchEmpty(accountId, folderId, uid);
|
|
3985
4006
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-imap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.116",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
},
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@bobfrankston/mailx-types": "^0.1.
|
|
13
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
12
|
+
"@bobfrankston/mailx-types": "^0.1.24",
|
|
13
|
+
"@bobfrankston/mailx-settings": "^0.1.35",
|
|
14
14
|
"@bobfrankston/mailx-store": "^0.1.58",
|
|
15
15
|
"@bobfrankston/iflow-direct": "^0.1.56",
|
|
16
|
-
"@bobfrankston/tcp-transport": "^0.1.
|
|
16
|
+
"@bobfrankston/tcp-transport": "^0.1.8",
|
|
17
17
|
"@bobfrankston/smtp-direct": "^0.1.9",
|
|
18
18
|
"@bobfrankston/mailx-sync": "^0.1.27",
|
|
19
|
-
"@bobfrankston/oauthsupport": "^1.0.
|
|
19
|
+
"@bobfrankston/oauthsupport": "^1.0.34"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
".transformedSnapshot": {
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@bobfrankston/mailx-types": "^0.1.
|
|
41
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
40
|
+
"@bobfrankston/mailx-types": "^0.1.24",
|
|
41
|
+
"@bobfrankston/mailx-settings": "^0.1.35",
|
|
42
42
|
"@bobfrankston/mailx-store": "^0.1.58",
|
|
43
43
|
"@bobfrankston/iflow-direct": "^0.1.56",
|
|
44
|
-
"@bobfrankston/tcp-transport": "^0.1.
|
|
44
|
+
"@bobfrankston/tcp-transport": "^0.1.8",
|
|
45
45
|
"@bobfrankston/smtp-direct": "^0.1.9",
|
|
46
46
|
"@bobfrankston/mailx-sync": "^0.1.27",
|
|
47
|
-
"@bobfrankston/oauthsupport": "^1.0.
|
|
47
|
+
"@bobfrankston/oauthsupport": "^1.0.34"
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|