@bobfrankston/mailx-store 0.1.61 → 0.1.64

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 (2) hide show
  1. package/db.js +3 -3
  2. package/package.json +5 -5
package/db.js CHANGED
@@ -2645,7 +2645,7 @@ export class MailxDB {
2645
2645
  total = this.db.prepare("SELECT COUNT(*) AS c FROM messages_fts").get()?.c || 0;
2646
2646
  }
2647
2647
  catch { /* */ }
2648
- console.log(` [db] FTS trigram migration started: ${total} rows in background (substring search when done)`);
2648
+ console.log(` [db] Reindexing search index: ${total} messages in background (~5 min; substring search when done)`);
2649
2649
  const CHUNK = 500; // ~0.35s of tokenization per chunk (measured on Bob's DB)
2650
2650
  let last = 0, copied = 0, chunkN = 0;
2651
2651
  const step = () => {
@@ -2665,7 +2665,7 @@ export class MailxDB {
2665
2665
  copied += rows.length;
2666
2666
  chunkN++;
2667
2667
  if (chunkN % 40 === 0) {
2668
- console.log(` [db] FTS trigram migration: ${copied}/${total}`);
2668
+ console.log(` [db] Reindexing search index: ${copied}/${total}`);
2669
2669
  // The copy writes ~1 GB through the WAL in total — keep it drained.
2670
2670
  try {
2671
2671
  this.db.exec("PRAGMA wal_checkpoint(PASSIVE)");
@@ -2694,7 +2694,7 @@ export class MailxDB {
2694
2694
  this.db.exec("DROP TABLE messages_fts");
2695
2695
  this.db.exec("ALTER TABLE messages_fts_tri RENAME TO messages_fts");
2696
2696
  this.db.exec("COMMIT");
2697
- console.log(` [db] FTS trigram migration complete: ${copied} rows — substring search active`);
2697
+ console.log(` [db] Search reindex complete: ${copied} messages — substring search active`);
2698
2698
  try {
2699
2699
  this.db.exec("PRAGMA wal_checkpoint(PASSIVE)");
2700
2700
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-store",
3
- "version": "0.1.61",
3
+ "version": "0.1.64",
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.24",
13
- "@bobfrankston/mailx-settings": "^0.1.35",
12
+ "@bobfrankston/mailx-types": "^0.1.26",
13
+ "@bobfrankston/mailx-settings": "^0.1.36",
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.24",
33
- "@bobfrankston/mailx-settings": "^0.1.35",
32
+ "@bobfrankston/mailx-types": "^0.1.26",
33
+ "@bobfrankston/mailx-settings": "^0.1.36",
34
34
  "@bobfrankston/mailx-bus": "^0.1.2",
35
35
  "mailparser": "^3.7.2"
36
36
  }