@bobfrankston/rmfmail 1.0.703 → 1.0.705

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 (35) hide show
  1. package/bin/build-bundles.mjs +52 -24
  2. package/client/android-bootstrap.bundle.js +8188 -0
  3. package/client/android-bootstrap.bundle.js.map +7 -0
  4. package/client/app.bundle.js +122 -10
  5. package/client/app.bundle.js.map +2 -2
  6. package/client/app.js +46 -2
  7. package/client/app.js.map +1 -1
  8. package/client/app.ts +46 -3
  9. package/client/components/alarms.js +37 -7
  10. package/client/components/alarms.js.map +1 -1
  11. package/client/components/alarms.ts +32 -7
  12. package/client/components/message-list.js +48 -2
  13. package/client/components/message-list.js.map +1 -1
  14. package/client/components/message-list.ts +44 -2
  15. package/client/components/message-viewer.js +27 -0
  16. package/client/components/message-viewer.js.map +1 -1
  17. package/client/components/message-viewer.ts +23 -0
  18. package/client/compose/compose.bundle.js +16 -0
  19. package/client/compose/compose.bundle.js.map +2 -2
  20. package/client/compose/compose.js +37 -0
  21. package/client/compose/compose.js.map +1 -1
  22. package/client/compose/compose.ts +42 -0
  23. package/client/index.html +9 -1
  24. package/docs/accounts.md +1 -1
  25. package/package.json +1 -1
  26. package/packages/mailx-service/index.d.ts.map +1 -1
  27. package/packages/mailx-service/index.js +14 -0
  28. package/packages/mailx-service/index.js.map +1 -1
  29. package/packages/mailx-service/index.ts +15 -0
  30. package/packages/mailx-service/local-store.d.ts.map +1 -1
  31. package/packages/mailx-service/local-store.js +9 -22
  32. package/packages/mailx-service/local-store.js.map +1 -1
  33. package/packages/mailx-service/local-store.ts +9 -23
  34. package/packages/mailx-settings/docs/accounts.md +1 -1
  35. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-4104 → node_modules.npmglobalize-stash-34984}/.package-lock.json +0 -0
@@ -23,16 +23,66 @@ import { fileURLToPath } from "node:url";
23
23
  const root = path.resolve(fileURLToPath(import.meta.url), "..", "..");
24
24
  const watch = process.argv.includes("--watch");
25
25
 
26
+ // Each entry has its own external list because the Android bootstrap bundle
27
+ // needs to INCLUDE @bobfrankston/mailx-store-web (entire purpose of the
28
+ // bundle), while app.bundle.js externalizes it so the desktop build doesn't
29
+ // pull a 1-MB blob into a path that only Android takes.
26
30
  const entries = [
27
31
  {
28
32
  in: path.join(root, "client", "app.ts"),
29
33
  out: path.join(root, "client", "app.bundle.js"),
30
34
  label: "app",
35
+ external: [
36
+ "@bobfrankston/rmf-tiny",
37
+ "@bobfrankston/mailx-store-web/*",
38
+ "tinymce",
39
+ "tinymce/*",
40
+ "quill",
41
+ "quill/*",
42
+ "jsonc-parser",
43
+ "mammoth",
44
+ "html-to-docx",
45
+ ],
31
46
  },
32
47
  {
33
48
  in: path.join(root, "client", "compose", "compose.ts"),
34
49
  out: path.join(root, "client", "compose", "compose.bundle.js"),
35
50
  label: "compose",
51
+ external: [
52
+ "@bobfrankston/rmf-tiny",
53
+ "@bobfrankston/mailx-store-web/*",
54
+ "tinymce",
55
+ "tinymce/*",
56
+ "quill",
57
+ "quill/*",
58
+ "jsonc-parser",
59
+ "mammoth",
60
+ "html-to-docx",
61
+ ],
62
+ },
63
+ {
64
+ // 2026-05-13: dedicated Android bootstrap bundle. The previous
65
+ // arrangement leaned on a runtime import map to resolve
66
+ // `@bobfrankston/mailx-store-web/android-bootstrap.js` →
67
+ // `file:///android_asset/node_modules/@bobfrankston/...` at WebView
68
+ // load time. That URL never resolved on real APKs ("Failed to
69
+ // fetch dynamically imported module" 100% reproducible across
70
+ // v695 → v702), apparently because MAUI's MauiAsset machinery
71
+ // mangles deep `node_modules/@bobfrankston/...` paths in ways the
72
+ // WebView can't undo. Bundling inlines every transitive dep
73
+ // (mailx-types, sql.js, etc.) and ships ONE self-contained file at
74
+ // `file:///android_asset/client/android-bootstrap.bundle.js` —
75
+ // same asset tree as `client/index.html`, the path we already
76
+ // know works.
77
+ in: path.join(root, "packages", "mailx-store-web", "android-bootstrap.ts"),
78
+ out: path.join(root, "client", "android-bootstrap.bundle.js"),
79
+ label: "android-bootstrap",
80
+ external: [
81
+ // sql.js loads its own wasm at runtime via `locateFile`, and the
82
+ // wasm binary is shipped as its own MauiAsset — don't try to
83
+ // inline a binary into JS.
84
+ "sql.js",
85
+ ],
36
86
  },
37
87
  ];
38
88
 
@@ -42,29 +92,7 @@ const shared = {
42
92
  target: "es2022",
43
93
  platform: "browser",
44
94
  sourcemap: true,
45
- // Keep dynamic imports for code paths that should still load on demand:
46
- // - @bobfrankston/rmf-tiny is loaded only when the user picks TinyMCE.
47
- // - @bobfrankston/mailx-store-web/android-bootstrap is only on Android.
48
- // - Quill / TinyMCE themselves are loaded by their adapters at runtime.
49
- // - jsonc-parser is large and only used by the JSONC config editor.
50
- external: [
51
- "@bobfrankston/rmf-tiny",
52
- "@bobfrankston/mailx-store-web/*",
53
- "tinymce",
54
- "tinymce/*",
55
- "quill",
56
- "quill/*",
57
- "jsonc-parser",
58
- "mammoth",
59
- "html-to-docx",
60
- ],
61
- // The output has to be ESM-compatible — index.html loads it via
62
- // <script type="module"> through the boot router's `await import()`.
63
- // Splitting would create extra chunks served as separate fetches,
64
- // defeating the purpose; the whole point is one fetch per entry.
65
95
  splitting: false,
66
- // Suppress the "minify saved N bytes" chatter; we want the source
67
- // readable in DevTools (sourcemap doubles up).
68
96
  minify: false,
69
97
  logLevel: "info",
70
98
  };
@@ -72,7 +100,7 @@ const shared = {
72
100
  async function buildAll() {
73
101
  const t0 = Date.now();
74
102
  const results = await Promise.all(entries.map(e =>
75
- esbuild.build({ ...shared, entryPoints: [e.in], outfile: e.out })
103
+ esbuild.build({ ...shared, external: e.external, entryPoints: [e.in], outfile: e.out })
76
104
  .then(r => ({ ok: true, label: e.label, out: e.out }))
77
105
  .catch(err => ({ ok: false, label: e.label, err }))
78
106
  ));
@@ -87,7 +115,7 @@ async function buildAll() {
87
115
 
88
116
  if (watch) {
89
117
  const ctxs = await Promise.all(entries.map(e =>
90
- esbuild.context({ ...shared, entryPoints: [e.in], outfile: e.out })
118
+ esbuild.context({ ...shared, external: e.external, entryPoints: [e.in], outfile: e.out })
91
119
  ));
92
120
  for (const c of ctxs) await c.watch();
93
121
  console.log("build-bundles: watch mode");