@bobfrankston/mailx-store 0.1.67 → 0.1.69

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.
Files changed (3) hide show
  1. package/db.d.ts +3 -0
  2. package/db.js +5 -0
  3. package/package.json +5 -5
package/db.d.ts CHANGED
@@ -547,6 +547,9 @@ export declare class MailxDB {
547
547
  * (local row was inserted at the predicted UIDNEXT but the server
548
548
  * appended at a different real UID). Idempotent: if no row matches
549
549
  * (already rebound by an earlier sync), it's a no-op. */
550
+ /** After an attachment strip rewrote the .eml: keep the row honest about
551
+ * what's on disk. Preview/subject/flags are untouched by a strip. */
552
+ updateMessageAfterStrip(accountId: string, folderId: number, uid: number, hasAttachments: boolean, size: number): void;
550
553
  updateMessageUid(accountId: string, folderId: number, oldUid: number, newUid: number): void;
551
554
  /** Delete a message by account + folder + UID. folderId is REQUIRED:
552
555
  * IMAP UIDs are per-folder, so the same numeric UID refers to different
package/db.js CHANGED
@@ -2827,6 +2827,11 @@ export class MailxDB {
2827
2827
  * (local row was inserted at the predicted UIDNEXT but the server
2828
2828
  * appended at a different real UID). Idempotent: if no row matches
2829
2829
  * (already rebound by an earlier sync), it's a no-op. */
2830
+ /** After an attachment strip rewrote the .eml: keep the row honest about
2831
+ * what's on disk. Preview/subject/flags are untouched by a strip. */
2832
+ updateMessageAfterStrip(accountId, folderId, uid, hasAttachments, size) {
2833
+ this.db.prepare("UPDATE messages SET has_attachments = ?, size = ? WHERE account_id = ? AND folder_id = ? AND uid = ?").run(hasAttachments ? 1 : 0, size, accountId, folderId, uid);
2834
+ }
2830
2835
  updateMessageUid(accountId, folderId, oldUid, newUid) {
2831
2836
  if (oldUid === newUid)
2832
2837
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-store",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -9,8 +9,8 @@
9
9
  },
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@bobfrankston/mailx-types": "^0.1.30",
13
- "@bobfrankston/mailx-settings": "^0.1.41",
12
+ "@bobfrankston/mailx-types": "^0.1.32",
13
+ "@bobfrankston/mailx-settings": "^0.1.43",
14
14
  "@bobfrankston/mailx-bus": "^0.1.2",
15
15
  "mailparser": "^3.7.2"
16
16
  },
@@ -29,8 +29,8 @@
29
29
  },
30
30
  ".transformedSnapshot": {
31
31
  "dependencies": {
32
- "@bobfrankston/mailx-types": "^0.1.30",
33
- "@bobfrankston/mailx-settings": "^0.1.41",
32
+ "@bobfrankston/mailx-types": "^0.1.32",
33
+ "@bobfrankston/mailx-settings": "^0.1.43",
34
34
  "@bobfrankston/mailx-bus": "^0.1.2",
35
35
  "mailparser": "^3.7.2"
36
36
  }