@remit/imap-worker 0.0.31 → 0.0.32
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/package.json
CHANGED
|
@@ -106,6 +106,10 @@ const deps = (): MailboxManagementDeps =>
|
|
|
106
106
|
h.calls.push({ method: "mailbox.update", args });
|
|
107
107
|
if (h.mailboxUpdateError) throw h.mailboxUpdateError;
|
|
108
108
|
},
|
|
109
|
+
findByPathPrefix: async (...args: unknown[]) => {
|
|
110
|
+
h.calls.push({ method: "mailbox.findByPathPrefix", args });
|
|
111
|
+
return [];
|
|
112
|
+
},
|
|
109
113
|
delete: record("mailbox.delete"),
|
|
110
114
|
},
|
|
111
115
|
secrets: {},
|
|
@@ -70,15 +70,18 @@ const isMailboxPresentUpstream = (error: unknown): boolean => {
|
|
|
70
70
|
* Pinned invariant for the whole-chain terminal guards below.
|
|
71
71
|
*
|
|
72
72
|
* Each handler wraps its `MailboxManagementService.sync*` chain in a try/catch
|
|
73
|
-
* that treats a NotFoundError as terminal (ack with a WARN, issue #289). That
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
73
|
+
* that treats a NotFoundError as terminal (ack with a WARN, issue #289). That is
|
|
74
|
+
* only sound while the sole row a NotFoundError can refer to is the target
|
|
75
|
+
* mailbox, so its absence can only mean the user deleted the folder mid-sync —
|
|
76
|
+
* never an unrelated missing entity that should have been retried.
|
|
77
|
+
*
|
|
78
|
+
* `syncCreate` and `syncDelete` hold to that by touching nothing but the target
|
|
79
|
+
* row. `syncRename` also writes the renamed subtree's descendant rows, and keeps
|
|
80
|
+
* the invariant by absorbing their NotFoundErrors itself: a descendant deleted
|
|
81
|
+
* mid-settle never reaches these catches. Any sync method that reads or writes a
|
|
82
|
+
* second entity owes the same, or these catches must be narrowed (match the
|
|
83
|
+
* mailboxId / re-check existence) before a NotFoundError from elsewhere is
|
|
84
|
+
* silently acked.
|
|
82
85
|
*/
|
|
83
86
|
|
|
84
87
|
/**
|