@bobfrankston/mailx 1.0.9 → 1.0.13

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 (246) hide show
  1. package/bin/mailx.js +47 -29
  2. package/bin/postinstall.js +41 -0
  3. package/client/app.js +93 -13
  4. package/client/components/folder-tree.js +84 -3
  5. package/client/components/message-list.js +134 -8
  6. package/client/components/message-viewer.js +130 -13
  7. package/client/compose/compose.html +4 -4
  8. package/client/compose/compose.js +53 -34
  9. package/client/index.html +33 -9
  10. package/client/lib/api-client.js +102 -30
  11. package/client/lib/mailxapi.js +123 -0
  12. package/client/package.json +5 -1
  13. package/client/styles/components.css +188 -15
  14. package/client/styles/layout.css +2 -1
  15. package/killmail.cmd +6 -0
  16. package/launch.ps1 +48 -3
  17. package/launcher/bin/mailx-app.exe +0 -0
  18. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Breadcrumbs +0 -0
  19. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Crashpad/metadata +0 -0
  20. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Crashpad/settings.dat +0 -0
  21. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Crashpad/throttle_store.dat +1 -0
  22. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/CrashpadMetrics-active.pma +0 -0
  23. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/BrowsingTopicsSiteData +0 -0
  24. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Cache/No_Vary_Search/journal.baj +1 -0
  25. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/DIPS +0 -0
  26. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/DashTrackerDatabase +0 -0
  27. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/EdgeJourneys/EdgeJourneys.db +0 -0
  28. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension Rules/LOCK +0 -0
  29. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension Rules/LOG +3 -0
  30. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension Rules/MANIFEST-000001 +0 -0
  31. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension Scripts/LOCK +0 -0
  32. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension Scripts/LOG +3 -0
  33. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension Scripts/MANIFEST-000001 +0 -0
  34. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension State/LOCK +0 -0
  35. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension State/LOG +3 -0
  36. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Extension State/MANIFEST-000001 +0 -0
  37. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/ExtensionActivityComp +0 -0
  38. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/ExtensionActivityEdge +0 -0
  39. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Favicons +0 -0
  40. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/History +0 -0
  41. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/History-journal +0 -0
  42. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/IndexedDB/devtools_devtools_0.indexeddb.leveldb/LOCK +0 -0
  43. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/IndexedDB/devtools_devtools_0.indexeddb.leveldb/LOG +3 -0
  44. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/IndexedDB/devtools_devtools_0.indexeddb.leveldb/MANIFEST-000001 +0 -0
  45. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Local Storage/leveldb/LOCK +0 -0
  46. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Local Storage/leveldb/LOG +3 -0
  47. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Local Storage/leveldb/MANIFEST-000001 +0 -0
  48. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Login Data +0 -0
  49. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Login Data For Account +0 -0
  50. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Network/Cookies +0 -0
  51. NEL +0 -0
  52. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Network/Trust Tokens +0 -0
  53. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Network Action Predictor +0 -0
  54. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Preferences +1 -0
  55. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Safe Browsing Network/Safe Browsing Cookies +0 -0
  56. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/ServerCertificate +0 -0
  57. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Session Storage/LOCK +0 -0
  58. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Session Storage/LOG +3 -0
  59. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Session Storage/MANIFEST-000001 +0 -0
  60. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Shared Dictionary/db +0 -0
  61. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/SharedStorage +0 -0
  62. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Shortcuts +0 -0
  63. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Site Characteristics Database/LOCK +0 -0
  64. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Site Characteristics Database/LOG +3 -0
  65. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Site Characteristics Database/MANIFEST-000001 +0 -0
  66. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Sync Data/LevelDB/LOCK +0 -0
  67. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Sync Data/LevelDB/LOG +3 -0
  68. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Sync Data/LevelDB/MANIFEST-000001 +0 -0
  69. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Top Sites +0 -0
  70. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Vpn Tokens +0 -0
  71. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Web Data +0 -0
  72. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/Web Data-journal +0 -0
  73. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/WebStorage/QuotaManager +0 -0
  74. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/WebStorage/QuotaManager-journal +0 -0
  75. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/heavy_ad_intervention_opt_out.db +0 -0
  76. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/shared_proto_db/LOCK +0 -0
  77. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/shared_proto_db/LOG +3 -0
  78. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/shared_proto_db/MANIFEST-000001 +0 -0
  79. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/shared_proto_db/metadata/LOCK +0 -0
  80. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/shared_proto_db/metadata/LOG +3 -0
  81. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Default/shared_proto_db/metadata/MANIFEST-000001 +0 -0
  82. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/DeferredBrowserMetrics/BrowserMetrics-69CAD063-BE24.pma +0 -0
  83. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Local State +1 -0
  84. package/launcher/bin/mailx-app.exe.WebView2/EBWebView/Variations +1 -0
  85. package/launcher/bin/mailx-app.old.exe +0 -0
  86. package/launcher/mailx.ico +0 -0
  87. package/npmg.bat +6 -0
  88. package/package.json +9 -3
  89. package/packages/mailx-api/index.js +79 -26
  90. package/packages/mailx-api/package.json +5 -1
  91. package/packages/mailx-compose/package.json +5 -1
  92. package/packages/mailx-core/index.d.ts +129 -0
  93. package/packages/mailx-core/index.js +323 -0
  94. package/packages/mailx-core/ipc.d.ts +13 -0
  95. package/packages/mailx-core/ipc.js +56 -0
  96. package/packages/mailx-core/package.json +18 -0
  97. package/packages/mailx-imap/index.d.ts +5 -1
  98. package/packages/mailx-imap/index.js +76 -14
  99. package/packages/mailx-imap/package.json +5 -1
  100. package/packages/mailx-send/package.json +12 -2
  101. package/packages/mailx-server/index.js +42 -31
  102. package/packages/mailx-server/package.json +5 -2
  103. package/packages/mailx-settings/index.d.ts +1 -1
  104. package/packages/mailx-settings/index.js +21 -12
  105. package/packages/mailx-settings/package.json +5 -1
  106. package/packages/mailx-store/db.d.ts +5 -1
  107. package/packages/mailx-store/db.js +64 -12
  108. package/packages/mailx-store/file-store.d.ts +2 -8
  109. package/packages/mailx-store/file-store.js +7 -31
  110. package/packages/mailx-store/package.json +5 -1
  111. package/packages/mailx-types/index.d.ts +3 -1
  112. package/packages/mailx-types/package.json +6 -2
  113. package/.tswalk.json +0 -3366
  114. package/mailx.json +0 -9
  115. package/packages/mailx-api/node_modules/nodemailer/.ncurc.js +0 -9
  116. package/packages/mailx-api/node_modules/nodemailer/.prettierignore +0 -8
  117. package/packages/mailx-api/node_modules/nodemailer/.prettierrc +0 -12
  118. package/packages/mailx-api/node_modules/nodemailer/.prettierrc.js +0 -10
  119. package/packages/mailx-api/node_modules/nodemailer/.release-please-config.json +0 -9
  120. package/packages/mailx-api/node_modules/nodemailer/LICENSE +0 -16
  121. package/packages/mailx-api/node_modules/nodemailer/README.md +0 -86
  122. package/packages/mailx-api/node_modules/nodemailer/SECURITY.txt +0 -22
  123. package/packages/mailx-api/node_modules/nodemailer/eslint.config.js +0 -88
  124. package/packages/mailx-api/node_modules/nodemailer/lib/addressparser/index.js +0 -383
  125. package/packages/mailx-api/node_modules/nodemailer/lib/base64/index.js +0 -139
  126. package/packages/mailx-api/node_modules/nodemailer/lib/dkim/index.js +0 -253
  127. package/packages/mailx-api/node_modules/nodemailer/lib/dkim/message-parser.js +0 -155
  128. package/packages/mailx-api/node_modules/nodemailer/lib/dkim/relaxed-body.js +0 -154
  129. package/packages/mailx-api/node_modules/nodemailer/lib/dkim/sign.js +0 -117
  130. package/packages/mailx-api/node_modules/nodemailer/lib/fetch/cookies.js +0 -281
  131. package/packages/mailx-api/node_modules/nodemailer/lib/fetch/index.js +0 -280
  132. package/packages/mailx-api/node_modules/nodemailer/lib/json-transport/index.js +0 -82
  133. package/packages/mailx-api/node_modules/nodemailer/lib/mail-composer/index.js +0 -629
  134. package/packages/mailx-api/node_modules/nodemailer/lib/mailer/index.js +0 -441
  135. package/packages/mailx-api/node_modules/nodemailer/lib/mailer/mail-message.js +0 -316
  136. package/packages/mailx-api/node_modules/nodemailer/lib/mime-funcs/index.js +0 -625
  137. package/packages/mailx-api/node_modules/nodemailer/lib/mime-funcs/mime-types.js +0 -2113
  138. package/packages/mailx-api/node_modules/nodemailer/lib/mime-node/index.js +0 -1316
  139. package/packages/mailx-api/node_modules/nodemailer/lib/mime-node/last-newline.js +0 -33
  140. package/packages/mailx-api/node_modules/nodemailer/lib/mime-node/le-unix.js +0 -43
  141. package/packages/mailx-api/node_modules/nodemailer/lib/mime-node/le-windows.js +0 -52
  142. package/packages/mailx-api/node_modules/nodemailer/lib/nodemailer.js +0 -157
  143. package/packages/mailx-api/node_modules/nodemailer/lib/punycode/index.js +0 -460
  144. package/packages/mailx-api/node_modules/nodemailer/lib/qp/index.js +0 -227
  145. package/packages/mailx-api/node_modules/nodemailer/lib/sendmail-transport/index.js +0 -210
  146. package/packages/mailx-api/node_modules/nodemailer/lib/ses-transport/index.js +0 -234
  147. package/packages/mailx-api/node_modules/nodemailer/lib/shared/index.js +0 -754
  148. package/packages/mailx-api/node_modules/nodemailer/lib/smtp-connection/data-stream.js +0 -108
  149. package/packages/mailx-api/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +0 -143
  150. package/packages/mailx-api/node_modules/nodemailer/lib/smtp-connection/index.js +0 -1870
  151. package/packages/mailx-api/node_modules/nodemailer/lib/smtp-pool/index.js +0 -652
  152. package/packages/mailx-api/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +0 -259
  153. package/packages/mailx-api/node_modules/nodemailer/lib/smtp-transport/index.js +0 -421
  154. package/packages/mailx-api/node_modules/nodemailer/lib/stream-transport/index.js +0 -135
  155. package/packages/mailx-api/node_modules/nodemailer/lib/well-known/index.js +0 -47
  156. package/packages/mailx-api/node_modules/nodemailer/lib/well-known/services.json +0 -611
  157. package/packages/mailx-api/node_modules/nodemailer/lib/xoauth2/index.js +0 -427
  158. package/packages/mailx-api/node_modules/nodemailer/package.json +0 -47
  159. package/packages/mailx-imap/node_modules/nodemailer/.ncurc.js +0 -9
  160. package/packages/mailx-imap/node_modules/nodemailer/.prettierignore +0 -8
  161. package/packages/mailx-imap/node_modules/nodemailer/.prettierrc +0 -12
  162. package/packages/mailx-imap/node_modules/nodemailer/.prettierrc.js +0 -10
  163. package/packages/mailx-imap/node_modules/nodemailer/.release-please-config.json +0 -9
  164. package/packages/mailx-imap/node_modules/nodemailer/LICENSE +0 -16
  165. package/packages/mailx-imap/node_modules/nodemailer/README.md +0 -86
  166. package/packages/mailx-imap/node_modules/nodemailer/SECURITY.txt +0 -22
  167. package/packages/mailx-imap/node_modules/nodemailer/eslint.config.js +0 -88
  168. package/packages/mailx-imap/node_modules/nodemailer/lib/addressparser/index.js +0 -383
  169. package/packages/mailx-imap/node_modules/nodemailer/lib/base64/index.js +0 -139
  170. package/packages/mailx-imap/node_modules/nodemailer/lib/dkim/index.js +0 -253
  171. package/packages/mailx-imap/node_modules/nodemailer/lib/dkim/message-parser.js +0 -155
  172. package/packages/mailx-imap/node_modules/nodemailer/lib/dkim/relaxed-body.js +0 -154
  173. package/packages/mailx-imap/node_modules/nodemailer/lib/dkim/sign.js +0 -117
  174. package/packages/mailx-imap/node_modules/nodemailer/lib/fetch/cookies.js +0 -281
  175. package/packages/mailx-imap/node_modules/nodemailer/lib/fetch/index.js +0 -280
  176. package/packages/mailx-imap/node_modules/nodemailer/lib/json-transport/index.js +0 -82
  177. package/packages/mailx-imap/node_modules/nodemailer/lib/mail-composer/index.js +0 -629
  178. package/packages/mailx-imap/node_modules/nodemailer/lib/mailer/index.js +0 -441
  179. package/packages/mailx-imap/node_modules/nodemailer/lib/mailer/mail-message.js +0 -316
  180. package/packages/mailx-imap/node_modules/nodemailer/lib/mime-funcs/index.js +0 -625
  181. package/packages/mailx-imap/node_modules/nodemailer/lib/mime-funcs/mime-types.js +0 -2113
  182. package/packages/mailx-imap/node_modules/nodemailer/lib/mime-node/index.js +0 -1316
  183. package/packages/mailx-imap/node_modules/nodemailer/lib/mime-node/last-newline.js +0 -33
  184. package/packages/mailx-imap/node_modules/nodemailer/lib/mime-node/le-unix.js +0 -43
  185. package/packages/mailx-imap/node_modules/nodemailer/lib/mime-node/le-windows.js +0 -52
  186. package/packages/mailx-imap/node_modules/nodemailer/lib/nodemailer.js +0 -157
  187. package/packages/mailx-imap/node_modules/nodemailer/lib/punycode/index.js +0 -460
  188. package/packages/mailx-imap/node_modules/nodemailer/lib/qp/index.js +0 -227
  189. package/packages/mailx-imap/node_modules/nodemailer/lib/sendmail-transport/index.js +0 -210
  190. package/packages/mailx-imap/node_modules/nodemailer/lib/ses-transport/index.js +0 -234
  191. package/packages/mailx-imap/node_modules/nodemailer/lib/shared/index.js +0 -754
  192. package/packages/mailx-imap/node_modules/nodemailer/lib/smtp-connection/data-stream.js +0 -108
  193. package/packages/mailx-imap/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +0 -143
  194. package/packages/mailx-imap/node_modules/nodemailer/lib/smtp-connection/index.js +0 -1870
  195. package/packages/mailx-imap/node_modules/nodemailer/lib/smtp-pool/index.js +0 -652
  196. package/packages/mailx-imap/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +0 -259
  197. package/packages/mailx-imap/node_modules/nodemailer/lib/smtp-transport/index.js +0 -421
  198. package/packages/mailx-imap/node_modules/nodemailer/lib/stream-transport/index.js +0 -135
  199. package/packages/mailx-imap/node_modules/nodemailer/lib/well-known/index.js +0 -47
  200. package/packages/mailx-imap/node_modules/nodemailer/lib/well-known/services.json +0 -611
  201. package/packages/mailx-imap/node_modules/nodemailer/lib/xoauth2/index.js +0 -427
  202. package/packages/mailx-imap/node_modules/nodemailer/package.json +0 -47
  203. package/packages/mailx-send/node_modules/nodemailer/.ncurc.js +0 -9
  204. package/packages/mailx-send/node_modules/nodemailer/.prettierignore +0 -8
  205. package/packages/mailx-send/node_modules/nodemailer/.prettierrc +0 -12
  206. package/packages/mailx-send/node_modules/nodemailer/.prettierrc.js +0 -10
  207. package/packages/mailx-send/node_modules/nodemailer/.release-please-config.json +0 -9
  208. package/packages/mailx-send/node_modules/nodemailer/LICENSE +0 -16
  209. package/packages/mailx-send/node_modules/nodemailer/README.md +0 -86
  210. package/packages/mailx-send/node_modules/nodemailer/SECURITY.txt +0 -22
  211. package/packages/mailx-send/node_modules/nodemailer/eslint.config.js +0 -88
  212. package/packages/mailx-send/node_modules/nodemailer/lib/addressparser/index.js +0 -383
  213. package/packages/mailx-send/node_modules/nodemailer/lib/base64/index.js +0 -139
  214. package/packages/mailx-send/node_modules/nodemailer/lib/dkim/index.js +0 -253
  215. package/packages/mailx-send/node_modules/nodemailer/lib/dkim/message-parser.js +0 -155
  216. package/packages/mailx-send/node_modules/nodemailer/lib/dkim/relaxed-body.js +0 -154
  217. package/packages/mailx-send/node_modules/nodemailer/lib/dkim/sign.js +0 -117
  218. package/packages/mailx-send/node_modules/nodemailer/lib/fetch/cookies.js +0 -281
  219. package/packages/mailx-send/node_modules/nodemailer/lib/fetch/index.js +0 -280
  220. package/packages/mailx-send/node_modules/nodemailer/lib/json-transport/index.js +0 -82
  221. package/packages/mailx-send/node_modules/nodemailer/lib/mail-composer/index.js +0 -629
  222. package/packages/mailx-send/node_modules/nodemailer/lib/mailer/index.js +0 -441
  223. package/packages/mailx-send/node_modules/nodemailer/lib/mailer/mail-message.js +0 -316
  224. package/packages/mailx-send/node_modules/nodemailer/lib/mime-funcs/index.js +0 -625
  225. package/packages/mailx-send/node_modules/nodemailer/lib/mime-funcs/mime-types.js +0 -2113
  226. package/packages/mailx-send/node_modules/nodemailer/lib/mime-node/index.js +0 -1316
  227. package/packages/mailx-send/node_modules/nodemailer/lib/mime-node/last-newline.js +0 -33
  228. package/packages/mailx-send/node_modules/nodemailer/lib/mime-node/le-unix.js +0 -43
  229. package/packages/mailx-send/node_modules/nodemailer/lib/mime-node/le-windows.js +0 -52
  230. package/packages/mailx-send/node_modules/nodemailer/lib/nodemailer.js +0 -157
  231. package/packages/mailx-send/node_modules/nodemailer/lib/punycode/index.js +0 -460
  232. package/packages/mailx-send/node_modules/nodemailer/lib/qp/index.js +0 -227
  233. package/packages/mailx-send/node_modules/nodemailer/lib/sendmail-transport/index.js +0 -210
  234. package/packages/mailx-send/node_modules/nodemailer/lib/ses-transport/index.js +0 -234
  235. package/packages/mailx-send/node_modules/nodemailer/lib/shared/index.js +0 -754
  236. package/packages/mailx-send/node_modules/nodemailer/lib/smtp-connection/data-stream.js +0 -108
  237. package/packages/mailx-send/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +0 -143
  238. package/packages/mailx-send/node_modules/nodemailer/lib/smtp-connection/index.js +0 -1870
  239. package/packages/mailx-send/node_modules/nodemailer/lib/smtp-pool/index.js +0 -652
  240. package/packages/mailx-send/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +0 -259
  241. package/packages/mailx-send/node_modules/nodemailer/lib/smtp-transport/index.js +0 -421
  242. package/packages/mailx-send/node_modules/nodemailer/lib/stream-transport/index.js +0 -135
  243. package/packages/mailx-send/node_modules/nodemailer/lib/well-known/index.js +0 -47
  244. package/packages/mailx-send/node_modules/nodemailer/lib/well-known/services.json +0 -611
  245. package/packages/mailx-send/node_modules/nodemailer/lib/xoauth2/index.js +0 -427
  246. package/packages/mailx-send/node_modules/nodemailer/package.json +0 -47
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-api",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,5 +20,9 @@
20
20
  "devDependencies": {
21
21
  "@types/express": "^5.0.0",
22
22
  "@types/nodemailer": "^6.4.0"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/BobFrankston/mailx-api.git"
23
27
  }
24
28
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-compose",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -10,5 +10,9 @@
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@bobfrankston/mailx-types": "file:../mailx-types"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/BobFrankston/mailx-compose.git"
13
17
  }
14
18
  }
@@ -0,0 +1,129 @@
1
+ /**
2
+ * @bobfrankston/mailx-core
3
+ * Core mail functions — callable directly via IPC or wrapped by Express.
4
+ * No HTTP, no Express, no WebSocket. Just plain async functions.
5
+ */
6
+ import { MailxDB } from "@bobfrankston/mailx-store";
7
+ import { ImapManager } from "@bobfrankston/mailx-imap";
8
+ import type { ComposeMessage } from "@bobfrankston/mailx-types";
9
+ declare let db: MailxDB;
10
+ declare let imapManager: ImapManager;
11
+ export declare function onEvent(handler: (event: any) => void): void;
12
+ export declare function initialize(): Promise<void>;
13
+ export declare function shutdown(): Promise<void>;
14
+ export declare function getAccounts(): {
15
+ id: string;
16
+ name: string;
17
+ email: string;
18
+ lastSync: number;
19
+ }[];
20
+ export declare function getFolders(params: {
21
+ accountId: string;
22
+ }): import("@bobfrankston/mailx-types").Folder[];
23
+ export declare function getMessages(params: {
24
+ accountId: string;
25
+ folderId: number;
26
+ page?: number;
27
+ pageSize?: number;
28
+ sort?: string;
29
+ sortDir?: string;
30
+ search?: string;
31
+ }): import("@bobfrankston/mailx-types").PagedResult<import("@bobfrankston/mailx-types").MessageEnvelope>;
32
+ export declare function getUnifiedInbox(params: {
33
+ page?: number;
34
+ pageSize?: number;
35
+ }): import("@bobfrankston/mailx-types").PagedResult<import("@bobfrankston/mailx-types").MessageEnvelope>;
36
+ export declare function getMessage(params: {
37
+ accountId: string;
38
+ uid: number;
39
+ allowRemote?: boolean;
40
+ folderId?: number;
41
+ }): Promise<{
42
+ bodyHtml: string;
43
+ bodyText: string;
44
+ hasRemoteContent: boolean;
45
+ remoteAllowed: boolean;
46
+ attachments: any[];
47
+ deliveredTo: string;
48
+ returnPath: string;
49
+ listUnsubscribe: string;
50
+ emlPath: string;
51
+ id: number;
52
+ accountId: string;
53
+ folderId: number;
54
+ uid: number;
55
+ messageId: string;
56
+ inReplyTo: string;
57
+ references: string[];
58
+ date: number;
59
+ subject: string;
60
+ from: import("@bobfrankston/mailx-types").EmailAddress;
61
+ to: import("@bobfrankston/mailx-types").EmailAddress[];
62
+ cc: import("@bobfrankston/mailx-types").EmailAddress[];
63
+ flags: string[];
64
+ size: number;
65
+ hasAttachments: boolean;
66
+ preview: string;
67
+ }>;
68
+ export declare function updateFlags(params: {
69
+ accountId: string;
70
+ uid: number;
71
+ flags: string[];
72
+ }): Promise<void>;
73
+ export declare function deleteMessage(params: {
74
+ accountId: string;
75
+ uid: number;
76
+ }): Promise<void>;
77
+ export declare function undeleteMessage(params: {
78
+ accountId: string;
79
+ uid: number;
80
+ folderId: number;
81
+ }): Promise<void>;
82
+ export declare function sendMessage(params: ComposeMessage): Promise<void>;
83
+ export declare function saveDraft(params: {
84
+ accountId: string;
85
+ subject: string;
86
+ bodyHtml: string;
87
+ bodyText: string;
88
+ to: string;
89
+ cc: string;
90
+ previousDraftUid?: number;
91
+ }): Promise<number>;
92
+ export declare function deleteDraft(params: {
93
+ accountId: string;
94
+ draftUid: number;
95
+ }): Promise<void>;
96
+ export declare function searchMessages(params: {
97
+ query: string;
98
+ page?: number;
99
+ pageSize?: number;
100
+ }): import("@bobfrankston/mailx-types").PagedResult<import("@bobfrankston/mailx-types").MessageEnvelope>;
101
+ export declare function searchContacts(params: {
102
+ query: string;
103
+ }): {
104
+ name: string;
105
+ email: string;
106
+ source: string;
107
+ useCount: number;
108
+ }[];
109
+ export declare function syncAll(): Promise<void>;
110
+ export declare function getSyncPending(): {
111
+ pending: number;
112
+ };
113
+ export declare function allowRemoteContent(params: {
114
+ type: string;
115
+ value: string;
116
+ }): void;
117
+ export declare function getSettings(): import("@bobfrankston/mailx-types").MailxSettings;
118
+ export declare function saveSettingsData(data: any): void;
119
+ export declare function rebuildSearchIndex(): number;
120
+ export declare function seedContacts(): number;
121
+ export declare function syncGoogleContacts(): Promise<void>;
122
+ export declare function getVersion(): {
123
+ server: string;
124
+ client: string;
125
+ };
126
+ /** Dispatch an action by name — used by IPC and Express wrapper */
127
+ export declare function dispatch(action: string, params?: any): Promise<any>;
128
+ export { db, imapManager };
129
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,323 @@
1
+ /**
2
+ * @bobfrankston/mailx-core
3
+ * Core mail functions — callable directly via IPC or wrapped by Express.
4
+ * No HTTP, no Express, no WebSocket. Just plain async functions.
5
+ */
6
+ import { MailxDB } from "@bobfrankston/mailx-store";
7
+ import { ImapManager } from "@bobfrankston/mailx-imap";
8
+ import { loadSettings, saveSettings, loadAllowlist, saveAllowlist, getConfigDir, getStorePath, initLocalConfig } from "@bobfrankston/mailx-settings";
9
+ import { simpleParser } from "mailparser";
10
+ // ── Initialization ──
11
+ let db;
12
+ let imapManager;
13
+ const eventHandlers = [];
14
+ export function onEvent(handler) {
15
+ eventHandlers.push(handler);
16
+ }
17
+ function emit(event) {
18
+ for (const h of eventHandlers) {
19
+ try {
20
+ h(event);
21
+ }
22
+ catch { /* ignore handler errors */ }
23
+ }
24
+ }
25
+ export async function initialize() {
26
+ initLocalConfig();
27
+ const dbDir = getConfigDir();
28
+ db = new MailxDB(dbDir);
29
+ imapManager = new ImapManager(db);
30
+ // Seed contacts
31
+ const seeded = db.seedContactsFromMessages();
32
+ if (seeded > 0)
33
+ console.log(` Seeded ${seeded} contacts`);
34
+ // Search index — only if empty
35
+ let ftsCount = 0;
36
+ try {
37
+ ftsCount = db.db.prepare("SELECT COUNT(*) as cnt FROM messages_fts").get()?.cnt || 0;
38
+ }
39
+ catch { /* */ }
40
+ if (ftsCount === 0) {
41
+ const indexed = db.rebuildSearchIndex();
42
+ if (indexed > 0)
43
+ console.log(` Search index: ${indexed} messages`);
44
+ }
45
+ // Add accounts
46
+ const settings = loadSettings();
47
+ for (const account of settings.accounts) {
48
+ if (!account.enabled)
49
+ continue;
50
+ try {
51
+ await imapManager.addAccount(account);
52
+ console.log(` Account added: ${account.name} (${account.id})`);
53
+ }
54
+ catch (e) {
55
+ console.error(` Failed to add account ${account.id}: ${e.message}`);
56
+ }
57
+ }
58
+ // Wire events to push notifications
59
+ imapManager.on("syncProgress", (accountId, phase, progress) => {
60
+ emit({ type: "syncProgress", accountId, phase, progress });
61
+ });
62
+ imapManager.on("folderCountsChanged", (accountId, counts) => {
63
+ emit({ type: "folderCountsChanged", accountId, counts });
64
+ });
65
+ // Initial sync + IDLE
66
+ if (settings.accounts.some(a => a.enabled)) {
67
+ console.log(" Starting initial sync...");
68
+ imapManager.syncAll().then(async () => {
69
+ console.log(" Initial sync complete");
70
+ await imapManager.startWatching();
71
+ imapManager.syncAllContacts().catch(e => console.error(` Google Contacts sync error: ${e.message}`));
72
+ }).catch(e => {
73
+ console.error(` Initial sync error: ${e.message}`);
74
+ });
75
+ }
76
+ imapManager.startPeriodicSync(settings.sync.intervalMinutes);
77
+ imapManager.startOutboxWorker();
78
+ }
79
+ export async function shutdown() {
80
+ imapManager?.stopPeriodicSync();
81
+ imapManager?.stopOutboxWorker();
82
+ await imapManager?.shutdown();
83
+ db?.close();
84
+ }
85
+ // ── HTML Sanitization ──
86
+ function sanitizeHtml(html) {
87
+ let hasRemoteContent = false;
88
+ let clean = html.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, "");
89
+ clean = clean.replace(/\s+on\w+\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi, "");
90
+ clean = clean.replace(/<img\b([^>]*)\bsrc\s*=\s*("[^"]*"|'[^']*')/gi, (match, before, src) => {
91
+ const url = src.slice(1, -1);
92
+ if (url.startsWith("data:") || url.startsWith("cid:"))
93
+ return match;
94
+ hasRemoteContent = true;
95
+ return `<img${before}src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect fill='%23888' width='20' height='20' rx='3'/%3E%3Ctext x='10' y='14' text-anchor='middle' fill='white' font-size='12'%3E⊘%3C/text%3E%3C/svg%3E" data-blocked-src=${src} title="Remote image blocked"`;
96
+ });
97
+ clean = clean.replace(/<link\b[^>]*rel\s*=\s*["']stylesheet["'][^>]*>/gi, (match) => {
98
+ hasRemoteContent = true;
99
+ return `<!-- blocked: ${match.replace(/--/g, "")} -->`;
100
+ });
101
+ clean = clean.replace(/url\s*\(\s*(['"]?)(https?:\/\/[^)]+)\1\s*\)/gi, (_match, _q, url) => {
102
+ hasRemoteContent = true;
103
+ return `url("") /* blocked: ${url} */`;
104
+ });
105
+ clean = clean.replace(/<\/?form\b[^>]*>/gi, "");
106
+ clean = clean.replace(/<iframe\b[^>]*>[\s\S]*?<\/iframe>/gi, "");
107
+ return { html: clean, hasRemoteContent };
108
+ }
109
+ // ── API Functions ──
110
+ export function getAccounts() {
111
+ return db.getAccounts();
112
+ }
113
+ export function getFolders(params) {
114
+ return db.getFolders(params.accountId);
115
+ }
116
+ export function getMessages(params) {
117
+ return db.getMessages({
118
+ accountId: params.accountId,
119
+ folderId: params.folderId,
120
+ page: params.page || 1,
121
+ pageSize: params.pageSize || 50,
122
+ sort: params.sort || "date",
123
+ sortDir: params.sortDir || "desc",
124
+ search: params.search,
125
+ });
126
+ }
127
+ export function getUnifiedInbox(params) {
128
+ return db.getUnifiedInbox(params.page, params.pageSize);
129
+ }
130
+ export async function getMessage(params) {
131
+ const { accountId, uid } = params;
132
+ let allowRemote = params.allowRemote || false;
133
+ const envelope = db.getMessageByUid(accountId, uid, params.folderId);
134
+ if (!envelope)
135
+ throw new Error("Message not found");
136
+ let bodyHtml = "";
137
+ let bodyText = "";
138
+ let hasRemoteContent = false;
139
+ let attachments = [];
140
+ let deliveredTo = "";
141
+ let returnPath = "";
142
+ let listUnsubscribe = "";
143
+ const raw = await imapManager.fetchMessageBody(accountId, envelope.folderId, envelope.uid);
144
+ if (raw) {
145
+ const parsed = await simpleParser(raw);
146
+ bodyHtml = parsed.html || "";
147
+ bodyText = parsed.text || "";
148
+ attachments = (parsed.attachments || []).map((a, i) => ({
149
+ id: i,
150
+ filename: a.filename || `attachment-${i}`,
151
+ mimeType: a.contentType || "application/octet-stream",
152
+ size: a.size || 0,
153
+ contentId: a.contentId || "",
154
+ }));
155
+ // Extract useful headers for the UI
156
+ const hdr = (key) => {
157
+ const v = parsed.headers.get(key);
158
+ if (!v)
159
+ return "";
160
+ if (typeof v === "string")
161
+ return v;
162
+ if (typeof v === "object" && "text" in v)
163
+ return v.text || "";
164
+ if (typeof v === "object" && "value" in v)
165
+ return String(v.value);
166
+ return String(v);
167
+ };
168
+ deliveredTo = hdr("delivered-to");
169
+ returnPath = hdr("return-path").replace(/[<>]/g, "");
170
+ listUnsubscribe = hdr("list-unsubscribe");
171
+ }
172
+ if (bodyHtml && !allowRemote) {
173
+ const allowList = loadAllowlist();
174
+ const senderAddr = envelope.from?.address || "";
175
+ const senderDomain = senderAddr.split("@")[1] || "";
176
+ const toAddrs = (envelope.to || []).map((a) => a.address);
177
+ const isAllowed = allowList.senders.includes(senderAddr) ||
178
+ allowList.domains.includes(senderDomain) ||
179
+ toAddrs.some((a) => allowList.recipients?.includes(a));
180
+ if (isAllowed) {
181
+ allowRemote = true;
182
+ }
183
+ else {
184
+ const result = sanitizeHtml(bodyHtml);
185
+ bodyHtml = result.html;
186
+ hasRemoteContent = result.hasRemoteContent;
187
+ }
188
+ }
189
+ // Build .eml file path for "View Source"
190
+ const storePath = getStorePath();
191
+ const emlPath = `${storePath}/${accountId}/${envelope.folderId}/${envelope.uid}.eml`;
192
+ return { ...envelope, bodyHtml, bodyText, hasRemoteContent, remoteAllowed: allowRemote, attachments, deliveredTo, returnPath, listUnsubscribe, emlPath };
193
+ }
194
+ export async function updateFlags(params) {
195
+ const envelope = db.getMessageByUid(params.accountId, params.uid);
196
+ await imapManager.updateFlagsLocal(params.accountId, params.uid, envelope?.folderId || 0, params.flags);
197
+ }
198
+ export async function deleteMessage(params) {
199
+ const envelope = db.getMessageByUid(params.accountId, params.uid);
200
+ if (!envelope)
201
+ throw new Error("Message not found");
202
+ await imapManager.trashMessage(params.accountId, envelope.folderId, envelope.uid);
203
+ }
204
+ export async function undeleteMessage(params) {
205
+ await imapManager.undeleteMessage(params.accountId, params.uid, params.folderId);
206
+ }
207
+ export async function sendMessage(params) {
208
+ const settings = loadSettings();
209
+ const account = settings.accounts.find(a => a.id === params.from);
210
+ if (!account)
211
+ throw new Error(`Unknown account: ${params.from}`);
212
+ const to = params.to.map(a => a.name ? `${a.name} <${a.address}>` : a.address).join(", ");
213
+ const cc = params.cc?.map(a => a.name ? `${a.name} <${a.address}>` : a.address).join(", ");
214
+ const bcc = params.bcc?.map(a => a.name ? `${a.name} <${a.address}>` : a.address).join(", ");
215
+ const headers = [
216
+ `From: ${account.name} <${account.email}>`,
217
+ `To: ${to}`,
218
+ cc ? `Cc: ${cc}` : null,
219
+ bcc ? `Bcc: ${bcc}` : null,
220
+ `Subject: ${params.subject}`,
221
+ `Date: ${new Date().toUTCString()}`,
222
+ params.inReplyTo ? `In-Reply-To: ${params.inReplyTo}` : null,
223
+ params.references?.length ? `References: ${params.references.join(" ")}` : null,
224
+ `MIME-Version: 1.0`,
225
+ `Content-Type: text/html; charset=UTF-8`,
226
+ ].filter(h => h !== null).join("\r\n");
227
+ const rawMessage = `${headers}\r\n\r\n${params.bodyHtml || params.bodyText || ""}`;
228
+ imapManager.queueOutgoingLocal(account.id, rawMessage);
229
+ for (const addr of params.to)
230
+ db.recordSentAddress(addr.name, addr.address);
231
+ if (params.cc)
232
+ for (const addr of params.cc)
233
+ db.recordSentAddress(addr.name, addr.address);
234
+ if (params.bcc)
235
+ for (const addr of params.bcc)
236
+ db.recordSentAddress(addr.name, addr.address);
237
+ }
238
+ export async function saveDraft(params) {
239
+ const settings = loadSettings();
240
+ const account = settings.accounts.find(a => a.id === params.accountId);
241
+ if (!account)
242
+ throw new Error(`Unknown account: ${params.accountId}`);
243
+ const headers = [
244
+ `From: ${account.name} <${account.email}>`,
245
+ params.to ? `To: ${params.to}` : null,
246
+ params.cc ? `Cc: ${params.cc}` : null,
247
+ `Subject: ${params.subject || "(no subject)"}`,
248
+ `Date: ${new Date().toUTCString()}`,
249
+ `MIME-Version: 1.0`,
250
+ `Content-Type: text/html; charset=UTF-8`,
251
+ ].filter(h => h !== null).join("\r\n");
252
+ const raw = `${headers}\r\n\r\n${params.bodyHtml || params.bodyText || ""}`;
253
+ return await imapManager.saveDraft(params.accountId, raw, params.previousDraftUid);
254
+ }
255
+ export async function deleteDraft(params) {
256
+ await imapManager.deleteDraft(params.accountId, params.draftUid);
257
+ }
258
+ export function searchMessages(params) {
259
+ if (!params.query.trim())
260
+ return { items: [], total: 0, page: 1, pageSize: 50 };
261
+ return db.searchMessages(params.query, params.page || 1, params.pageSize || 50);
262
+ }
263
+ export function searchContacts(params) {
264
+ if (params.query.length < 1)
265
+ return [];
266
+ return db.searchContacts(params.query);
267
+ }
268
+ export async function syncAll() {
269
+ await imapManager.syncAll();
270
+ }
271
+ export function getSyncPending() {
272
+ return { pending: db.getTotalPendingSyncCount() };
273
+ }
274
+ export function allowRemoteContent(params) {
275
+ const list = loadAllowlist();
276
+ if (params.type === "sender" && !list.senders.includes(params.value))
277
+ list.senders.push(params.value);
278
+ else if (params.type === "domain" && !list.domains.includes(params.value))
279
+ list.domains.push(params.value);
280
+ else if (params.type === "recipient") {
281
+ if (!list.recipients)
282
+ list.recipients = [];
283
+ if (!list.recipients.includes(params.value))
284
+ list.recipients.push(params.value);
285
+ }
286
+ saveAllowlist(list);
287
+ }
288
+ export function getSettings() {
289
+ return loadSettings();
290
+ }
291
+ export function saveSettingsData(data) {
292
+ saveSettings(data);
293
+ }
294
+ export function rebuildSearchIndex() {
295
+ return db.rebuildSearchIndex();
296
+ }
297
+ export function seedContacts() {
298
+ return db.seedContactsFromMessages();
299
+ }
300
+ export async function syncGoogleContacts() {
301
+ await imapManager.syncAllContacts();
302
+ }
303
+ export function getVersion() {
304
+ return { server: "1.0.0", client: "1.0.0" }; // Updated by build
305
+ }
306
+ // ── Action dispatcher for IPC ──
307
+ const actions = {
308
+ getAccounts, getFolders, getMessages, getUnifiedInbox, getMessage,
309
+ updateFlags, deleteMessage, undeleteMessage, sendMessage,
310
+ saveDraft, deleteDraft, searchMessages, searchContacts,
311
+ syncAll, getSyncPending, allowRemoteContent,
312
+ getSettings, saveSettingsData, rebuildSearchIndex,
313
+ seedContacts, syncGoogleContacts, getVersion,
314
+ };
315
+ /** Dispatch an action by name — used by IPC and Express wrapper */
316
+ export async function dispatch(action, params = {}) {
317
+ const fn = actions[action];
318
+ if (!fn)
319
+ throw new Error(`Unknown action: ${action}`);
320
+ return await fn(params);
321
+ }
322
+ export { db, imapManager };
323
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * IPC protocol — stdin/stdout JSON lines for Rust↔Node communication.
3
+ * Rust launcher sends JSON requests, Node dispatches to core functions,
4
+ * sends JSON responses back. Events pushed to stdout as well.
5
+ *
6
+ * Protocol:
7
+ * Request: { "_action": "getMessages", "_cbid": "5", "accountId": "bobma", ... }
8
+ * Response: { "_type": "response", "_cbid": "5", "result": { ... } }
9
+ * Error: { "_type": "error", "_cbid": "5", "error": "message" }
10
+ * Event: { "_type": "event", "data": { "type": "folderCountsChanged", ... } }
11
+ */
12
+ export declare function startIPC(): Promise<void>;
13
+ //# sourceMappingURL=ipc.d.ts.map
@@ -0,0 +1,56 @@
1
+ /**
2
+ * IPC protocol — stdin/stdout JSON lines for Rust↔Node communication.
3
+ * Rust launcher sends JSON requests, Node dispatches to core functions,
4
+ * sends JSON responses back. Events pushed to stdout as well.
5
+ *
6
+ * Protocol:
7
+ * Request: { "_action": "getMessages", "_cbid": "5", "accountId": "bobma", ... }
8
+ * Response: { "_type": "response", "_cbid": "5", "result": { ... } }
9
+ * Error: { "_type": "error", "_cbid": "5", "error": "message" }
10
+ * Event: { "_type": "event", "data": { "type": "folderCountsChanged", ... } }
11
+ */
12
+ import * as readline from "node:readline";
13
+ import { dispatch, initialize, onEvent } from "./index.js";
14
+ export async function startIPC() {
15
+ // Initialize core
16
+ await initialize();
17
+ // Push events to stdout
18
+ onEvent((event) => {
19
+ const line = JSON.stringify({ _type: "event", data: event });
20
+ process.stdout.write(line + "\n");
21
+ });
22
+ // Read JSON lines from stdin
23
+ const rl = readline.createInterface({ input: process.stdin, terminal: false });
24
+ rl.on("line", async (line) => {
25
+ let msg;
26
+ try {
27
+ msg = JSON.parse(line);
28
+ }
29
+ catch {
30
+ return; // Skip malformed JSON
31
+ }
32
+ const { _action, _cbid, ...params } = msg;
33
+ if (!_action || !_cbid)
34
+ return;
35
+ try {
36
+ const result = await dispatch(_action, params);
37
+ process.stdout.write(JSON.stringify({ _type: "response", _cbid, result }) + "\n");
38
+ }
39
+ catch (e) {
40
+ process.stdout.write(JSON.stringify({ _type: "error", _cbid, error: e.message }) + "\n");
41
+ }
42
+ });
43
+ rl.on("close", () => {
44
+ console.error("IPC stdin closed, shutting down");
45
+ process.exit(0);
46
+ });
47
+ console.error("IPC ready");
48
+ }
49
+ // If run directly, start IPC mode
50
+ if (import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith("ipc.js")) {
51
+ startIPC().catch(e => {
52
+ console.error(`IPC startup error: ${e.message}`);
53
+ process.exit(1);
54
+ });
55
+ }
56
+ //# sourceMappingURL=ipc.js.map
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@bobfrankston/mailx-core",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc"
9
+ },
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "@bobfrankston/mailx-types": "file:../mailx-types",
13
+ "@bobfrankston/mailx-store": "file:../mailx-store",
14
+ "@bobfrankston/mailx-imap": "file:../mailx-imap",
15
+ "@bobfrankston/mailx-settings": "file:../mailx-settings",
16
+ "mailparser": "^3.7.2"
17
+ }
18
+ }
@@ -28,6 +28,8 @@ export declare class ImapManager extends EventEmitter {
28
28
  private syncing;
29
29
  private inboxSyncing;
30
30
  constructor(db: MailxDB);
31
+ /** Get OAuth access token for an account (for SMTP auth) */
32
+ getOAuthToken(accountId: string): Promise<string | null>;
31
33
  /** Create a fresh ImapClient for an account (disposable, single-use) */
32
34
  private createClient;
33
35
  /** Register an account */
@@ -59,6 +61,8 @@ export declare class ImapManager extends EventEmitter {
59
61
  trashMessage(accountId: string, folderId: number, uid: number): Promise<void>;
60
62
  /** Move a message between folders — local-first, queues IMAP sync */
61
63
  moveMessage(accountId: string, uid: number, fromFolderId: number, toFolderId: number): Promise<void>;
64
+ /** Move message across accounts using iflow's moveMessageToServer */
65
+ moveMessageCrossAccount(fromAccountId: string, uid: number, fromFolderId: number, toAccountId: string, toFolderId: number): Promise<void>;
62
66
  /** Undelete — move from Trash back to original folder */
63
67
  undeleteMessage(accountId: string, uid: number, originalFolderId: number): Promise<void>;
64
68
  /** Update flags — local-first, queues IMAP sync */
@@ -88,7 +92,7 @@ export declare class ImapManager extends EventEmitter {
88
92
  private processLocalQueue;
89
93
  /** Process Outbox — send pending messages with flag-based interlock */
90
94
  processOutbox(accountId: string): Promise<void>;
91
- /** Start background Outbox worker — checks every 10 seconds */
95
+ /** Start background Outbox worker — runs immediately then every 10 seconds */
92
96
  startOutboxWorker(): void;
93
97
  /** Stop Outbox worker */
94
98
  stopOutboxWorker(): void;