@bobfrankston/mailx 1.0.465 → 1.0.500

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 (344) hide show
  1. package/.globalize.json5 +25 -0
  2. package/README.md +17 -420
  3. package/bin/mailx.js +87 -84
  4. package/bin/mailx.js.map +1 -1
  5. package/bin/mailx.ts +87 -84
  6. package/client/android.html +5 -5
  7. package/client/app.js +42 -38
  8. package/client/components/folder-tree.js +7 -5
  9. package/client/components/message-list.js +485 -448
  10. package/client/components/message-viewer.js +36 -41
  11. package/client/index.html +8 -8
  12. package/client/lib/message-state.js +46 -65
  13. package/index.js +59 -0
  14. package/package.json +12 -114
  15. package/packages/mailx-send/mailsend/{package-lock.json → node_modules/.package-lock.json} +0 -16
  16. package/packages/mailx-send/mailsend/node_modules/@types/node/LICENSE +21 -0
  17. package/packages/mailx-send/mailsend/node_modules/@types/node/README.md +15 -0
  18. package/packages/mailx-send/mailsend/node_modules/@types/node/assert/strict.d.ts +111 -0
  19. package/packages/mailx-send/mailsend/node_modules/@types/node/assert.d.ts +1078 -0
  20. package/packages/mailx-send/mailsend/node_modules/@types/node/async_hooks.d.ts +603 -0
  21. package/packages/mailx-send/mailsend/node_modules/@types/node/buffer.buffer.d.ts +472 -0
  22. package/packages/mailx-send/mailsend/node_modules/@types/node/buffer.d.ts +1934 -0
  23. package/packages/mailx-send/mailsend/node_modules/@types/node/child_process.d.ts +1476 -0
  24. package/packages/mailx-send/mailsend/node_modules/@types/node/cluster.d.ts +578 -0
  25. package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
  26. package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/index.d.ts +9 -0
  27. package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  28. package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
  29. package/packages/mailx-send/mailsend/node_modules/@types/node/console.d.ts +452 -0
  30. package/packages/mailx-send/mailsend/node_modules/@types/node/constants.d.ts +21 -0
  31. package/packages/mailx-send/mailsend/node_modules/@types/node/crypto.d.ts +4545 -0
  32. package/packages/mailx-send/mailsend/node_modules/@types/node/dgram.d.ts +600 -0
  33. package/packages/mailx-send/mailsend/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
  34. package/packages/mailx-send/mailsend/node_modules/@types/node/dns/promises.d.ts +503 -0
  35. package/packages/mailx-send/mailsend/node_modules/@types/node/dns.d.ts +923 -0
  36. package/packages/mailx-send/mailsend/node_modules/@types/node/domain.d.ts +170 -0
  37. package/packages/mailx-send/mailsend/node_modules/@types/node/events.d.ts +976 -0
  38. package/packages/mailx-send/mailsend/node_modules/@types/node/fs/promises.d.ts +1295 -0
  39. package/packages/mailx-send/mailsend/node_modules/@types/node/fs.d.ts +4461 -0
  40. package/packages/mailx-send/mailsend/node_modules/@types/node/globals.d.ts +172 -0
  41. package/packages/mailx-send/mailsend/node_modules/@types/node/globals.typedarray.d.ts +38 -0
  42. package/packages/mailx-send/mailsend/node_modules/@types/node/http.d.ts +2089 -0
  43. package/packages/mailx-send/mailsend/node_modules/@types/node/http2.d.ts +2644 -0
  44. package/packages/mailx-send/mailsend/node_modules/@types/node/https.d.ts +579 -0
  45. package/packages/mailx-send/mailsend/node_modules/@types/node/index.d.ts +97 -0
  46. package/packages/mailx-send/mailsend/node_modules/@types/node/inspector.d.ts +253 -0
  47. package/packages/mailx-send/mailsend/node_modules/@types/node/inspector.generated.d.ts +4052 -0
  48. package/packages/mailx-send/mailsend/node_modules/@types/node/module.d.ts +891 -0
  49. package/packages/mailx-send/mailsend/node_modules/@types/node/net.d.ts +1057 -0
  50. package/packages/mailx-send/mailsend/node_modules/@types/node/os.d.ts +506 -0
  51. package/packages/mailx-send/mailsend/node_modules/@types/node/package.json +145 -0
  52. package/packages/mailx-send/mailsend/node_modules/@types/node/path.d.ts +200 -0
  53. package/packages/mailx-send/mailsend/node_modules/@types/node/perf_hooks.d.ts +968 -0
  54. package/packages/mailx-send/mailsend/node_modules/@types/node/process.d.ts +2084 -0
  55. package/packages/mailx-send/mailsend/node_modules/@types/node/punycode.d.ts +117 -0
  56. package/packages/mailx-send/mailsend/node_modules/@types/node/querystring.d.ts +152 -0
  57. package/packages/mailx-send/mailsend/node_modules/@types/node/readline/promises.d.ts +161 -0
  58. package/packages/mailx-send/mailsend/node_modules/@types/node/readline.d.ts +594 -0
  59. package/packages/mailx-send/mailsend/node_modules/@types/node/repl.d.ts +428 -0
  60. package/packages/mailx-send/mailsend/node_modules/@types/node/sea.d.ts +153 -0
  61. package/packages/mailx-send/mailsend/node_modules/@types/node/sqlite.d.ts +721 -0
  62. package/packages/mailx-send/mailsend/node_modules/@types/node/stream/consumers.d.ts +38 -0
  63. package/packages/mailx-send/mailsend/node_modules/@types/node/stream/promises.d.ts +90 -0
  64. package/packages/mailx-send/mailsend/node_modules/@types/node/stream/web.d.ts +622 -0
  65. package/packages/mailx-send/mailsend/node_modules/@types/node/stream.d.ts +1664 -0
  66. package/packages/mailx-send/mailsend/node_modules/@types/node/string_decoder.d.ts +67 -0
  67. package/packages/mailx-send/mailsend/node_modules/@types/node/test.d.ts +2163 -0
  68. package/packages/mailx-send/mailsend/node_modules/@types/node/timers/promises.d.ts +108 -0
  69. package/packages/mailx-send/mailsend/node_modules/@types/node/timers.d.ts +287 -0
  70. package/packages/mailx-send/mailsend/node_modules/@types/node/tls.d.ts +1319 -0
  71. package/packages/mailx-send/mailsend/node_modules/@types/node/trace_events.d.ts +197 -0
  72. package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
  73. package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
  74. package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/index.d.ts +97 -0
  75. package/packages/mailx-send/mailsend/node_modules/@types/node/tty.d.ts +208 -0
  76. package/packages/mailx-send/mailsend/node_modules/@types/node/url.d.ts +984 -0
  77. package/packages/mailx-send/mailsend/node_modules/@types/node/util.d.ts +2606 -0
  78. package/packages/mailx-send/mailsend/node_modules/@types/node/v8.d.ts +920 -0
  79. package/packages/mailx-send/mailsend/node_modules/@types/node/vm.d.ts +1000 -0
  80. package/packages/mailx-send/mailsend/node_modules/@types/node/wasi.d.ts +181 -0
  81. package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  82. package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  83. package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/events.d.ts +97 -0
  84. package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
  85. package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
  86. package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  87. package/packages/mailx-send/mailsend/node_modules/@types/node/worker_threads.d.ts +784 -0
  88. package/packages/mailx-send/mailsend/node_modules/@types/node/zlib.d.ts +747 -0
  89. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/LICENSE +21 -0
  90. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/README.md +15 -0
  91. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/index.d.ts +82 -0
  92. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/addressparser/index.d.ts +31 -0
  93. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/base64/index.d.ts +22 -0
  94. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/index.d.ts +45 -0
  95. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/message-parser.d.ts +75 -0
  96. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/relaxed-body.d.ts +75 -0
  97. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/sign.d.ts +21 -0
  98. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/fetch/cookies.d.ts +54 -0
  99. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/fetch/index.d.ts +38 -0
  100. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/json-transport/index.d.ts +53 -0
  101. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mail-composer/index.d.ts +25 -0
  102. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mailer/index.d.ts +283 -0
  103. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mailer/mail-message.d.ts +32 -0
  104. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-funcs/index.d.ts +87 -0
  105. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-funcs/mime-types.d.ts +2 -0
  106. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-node/index.d.ts +224 -0
  107. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-node/last-newline.d.ts +9 -0
  108. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/qp/index.d.ts +23 -0
  109. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/index.d.ts +53 -0
  110. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/le-unix.d.ts +7 -0
  111. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/le-windows.d.ts +7 -0
  112. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/ses-transport/index.d.ts +146 -0
  113. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/shared/index.d.ts +58 -0
  114. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/data-stream.d.ts +11 -0
  115. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/http-proxy-client.d.ts +16 -0
  116. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/index.d.ts +270 -0
  117. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-pool/index.d.ts +93 -0
  118. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-pool/pool-resource.d.ts +66 -0
  119. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-transport/index.d.ts +115 -0
  120. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/stream-transport/index.d.ts +59 -0
  121. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/well-known/index.d.ts +6 -0
  122. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/xoauth2/index.d.ts +114 -0
  123. package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/package.json +38 -0
  124. package/packages/mailx-send/mailsend/node_modules/nodemailer/.ncurc.js +9 -0
  125. package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierignore +8 -0
  126. package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierrc +12 -0
  127. package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierrc.js +10 -0
  128. package/packages/mailx-send/mailsend/node_modules/nodemailer/.release-please-config.json +9 -0
  129. package/packages/mailx-send/mailsend/node_modules/nodemailer/LICENSE +16 -0
  130. package/packages/mailx-send/mailsend/node_modules/nodemailer/README.md +86 -0
  131. package/packages/mailx-send/mailsend/node_modules/nodemailer/SECURITY.txt +22 -0
  132. package/packages/mailx-send/mailsend/node_modules/nodemailer/eslint.config.js +88 -0
  133. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/addressparser/index.js +383 -0
  134. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/base64/index.js +139 -0
  135. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/index.js +253 -0
  136. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/message-parser.js +155 -0
  137. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/relaxed-body.js +154 -0
  138. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/sign.js +117 -0
  139. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/fetch/cookies.js +281 -0
  140. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/fetch/index.js +280 -0
  141. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/json-transport/index.js +82 -0
  142. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mail-composer/index.js +629 -0
  143. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mailer/index.js +441 -0
  144. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mailer/mail-message.js +316 -0
  145. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-funcs/index.js +625 -0
  146. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-funcs/mime-types.js +2113 -0
  147. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/index.js +1316 -0
  148. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/last-newline.js +33 -0
  149. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/le-unix.js +43 -0
  150. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/le-windows.js +52 -0
  151. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/nodemailer.js +157 -0
  152. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/punycode/index.js +460 -0
  153. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/qp/index.js +227 -0
  154. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/sendmail-transport/index.js +210 -0
  155. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/ses-transport/index.js +234 -0
  156. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/shared/index.js +754 -0
  157. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/data-stream.js +108 -0
  158. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +143 -0
  159. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/index.js +1870 -0
  160. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-pool/index.js +652 -0
  161. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +259 -0
  162. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-transport/index.js +421 -0
  163. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/stream-transport/index.js +135 -0
  164. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/well-known/index.js +47 -0
  165. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/well-known/services.json +611 -0
  166. package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/xoauth2/index.js +427 -0
  167. package/packages/mailx-send/mailsend/node_modules/nodemailer/package.json +47 -0
  168. package/packages/mailx-send/mailsend/node_modules/undici-types/LICENSE +21 -0
  169. package/packages/mailx-send/mailsend/node_modules/undici-types/README.md +6 -0
  170. package/packages/mailx-send/mailsend/node_modules/undici-types/agent.d.ts +31 -0
  171. package/packages/mailx-send/mailsend/node_modules/undici-types/api.d.ts +43 -0
  172. package/packages/mailx-send/mailsend/node_modules/undici-types/balanced-pool.d.ts +29 -0
  173. package/packages/mailx-send/mailsend/node_modules/undici-types/cache.d.ts +36 -0
  174. package/packages/mailx-send/mailsend/node_modules/undici-types/client.d.ts +108 -0
  175. package/packages/mailx-send/mailsend/node_modules/undici-types/connector.d.ts +34 -0
  176. package/packages/mailx-send/mailsend/node_modules/undici-types/content-type.d.ts +21 -0
  177. package/packages/mailx-send/mailsend/node_modules/undici-types/cookies.d.ts +28 -0
  178. package/packages/mailx-send/mailsend/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  179. package/packages/mailx-send/mailsend/node_modules/undici-types/dispatcher.d.ts +256 -0
  180. package/packages/mailx-send/mailsend/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  181. package/packages/mailx-send/mailsend/node_modules/undici-types/errors.d.ts +149 -0
  182. package/packages/mailx-send/mailsend/node_modules/undici-types/eventsource.d.ts +61 -0
  183. package/packages/mailx-send/mailsend/node_modules/undici-types/fetch.d.ts +209 -0
  184. package/packages/mailx-send/mailsend/node_modules/undici-types/file.d.ts +39 -0
  185. package/packages/mailx-send/mailsend/node_modules/undici-types/filereader.d.ts +54 -0
  186. package/packages/mailx-send/mailsend/node_modules/undici-types/formdata.d.ts +108 -0
  187. package/packages/mailx-send/mailsend/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  188. package/packages/mailx-send/mailsend/node_modules/undici-types/global-origin.d.ts +7 -0
  189. package/packages/mailx-send/mailsend/node_modules/undici-types/handlers.d.ts +15 -0
  190. package/packages/mailx-send/mailsend/node_modules/undici-types/header.d.ts +4 -0
  191. package/packages/mailx-send/mailsend/node_modules/undici-types/index.d.ts +71 -0
  192. package/packages/mailx-send/mailsend/node_modules/undici-types/interceptors.d.ts +17 -0
  193. package/packages/mailx-send/mailsend/node_modules/undici-types/mock-agent.d.ts +50 -0
  194. package/packages/mailx-send/mailsend/node_modules/undici-types/mock-client.d.ts +25 -0
  195. package/packages/mailx-send/mailsend/node_modules/undici-types/mock-errors.d.ts +12 -0
  196. package/packages/mailx-send/mailsend/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  197. package/packages/mailx-send/mailsend/node_modules/undici-types/mock-pool.d.ts +25 -0
  198. package/packages/mailx-send/mailsend/node_modules/undici-types/package.json +55 -0
  199. package/packages/mailx-send/mailsend/node_modules/undici-types/patch.d.ts +33 -0
  200. package/packages/mailx-send/mailsend/node_modules/undici-types/pool-stats.d.ts +19 -0
  201. package/packages/mailx-send/mailsend/node_modules/undici-types/pool.d.ts +39 -0
  202. package/packages/mailx-send/mailsend/node_modules/undici-types/proxy-agent.d.ts +28 -0
  203. package/packages/mailx-send/mailsend/node_modules/undici-types/readable.d.ts +65 -0
  204. package/packages/mailx-send/mailsend/node_modules/undici-types/retry-agent.d.ts +8 -0
  205. package/packages/mailx-send/mailsend/node_modules/undici-types/retry-handler.d.ts +116 -0
  206. package/packages/mailx-send/mailsend/node_modules/undici-types/util.d.ts +18 -0
  207. package/packages/mailx-send/mailsend/node_modules/undici-types/webidl.d.ts +228 -0
  208. package/packages/mailx-send/mailsend/node_modules/undici-types/websocket.d.ts +150 -0
  209. package/packages/mailx-server/index.js +1 -1
  210. package/packages/mailx-settings/cloud.js +12 -7
  211. package/packages/mailx-settings/index.js +22 -1
  212. package/client/.gitattributes +0 -10
  213. package/client/app.js.map +0 -1
  214. package/client/app.ts +0 -3190
  215. package/client/components/address-book.js.map +0 -1
  216. package/client/components/address-book.ts +0 -204
  217. package/client/components/alarms.js.map +0 -1
  218. package/client/components/alarms.ts +0 -276
  219. package/client/components/calendar-sidebar.js.map +0 -1
  220. package/client/components/calendar-sidebar.ts +0 -474
  221. package/client/components/calendar.js.map +0 -1
  222. package/client/components/calendar.ts +0 -211
  223. package/client/components/context-menu.js.map +0 -1
  224. package/client/components/context-menu.ts +0 -95
  225. package/client/components/folder-picker.js.map +0 -1
  226. package/client/components/folder-picker.ts +0 -127
  227. package/client/components/folder-tree.js.map +0 -1
  228. package/client/components/folder-tree.ts +0 -1069
  229. package/client/components/message-list.js.map +0 -1
  230. package/client/components/message-list.ts +0 -1129
  231. package/client/components/message-viewer.js.map +0 -1
  232. package/client/components/message-viewer.ts +0 -1257
  233. package/client/components/outbox-view.js.map +0 -1
  234. package/client/components/outbox-view.ts +0 -102
  235. package/client/components/tasks.js.map +0 -1
  236. package/client/components/tasks.ts +0 -234
  237. package/client/compose/compose.js.map +0 -1
  238. package/client/compose/compose.ts +0 -1231
  239. package/client/compose/editor.js.map +0 -1
  240. package/client/compose/editor.ts +0 -599
  241. package/client/compose/ghost-text.js.map +0 -1
  242. package/client/compose/ghost-text.ts +0 -140
  243. package/client/lib/android-bootstrap.js.map +0 -1
  244. package/client/lib/android-bootstrap.ts +0 -9
  245. package/client/lib/api-client.js.map +0 -1
  246. package/client/lib/api-client.ts +0 -439
  247. package/client/lib/local-service.js.map +0 -1
  248. package/client/lib/local-service.ts +0 -646
  249. package/client/lib/local-store.js.map +0 -1
  250. package/client/lib/local-store.ts +0 -283
  251. package/client/lib/message-state.js.map +0 -1
  252. package/client/lib/message-state.ts +0 -160
  253. package/client/tsconfig.json +0 -19
  254. package/packages/mailx-api/.gitattributes +0 -10
  255. package/packages/mailx-api/index.d.ts.map +0 -1
  256. package/packages/mailx-api/index.js.map +0 -1
  257. package/packages/mailx-api/index.ts +0 -283
  258. package/packages/mailx-api/tsconfig.json +0 -9
  259. package/packages/mailx-compose/.gitattributes +0 -10
  260. package/packages/mailx-compose/index.d.ts.map +0 -1
  261. package/packages/mailx-compose/index.js.map +0 -1
  262. package/packages/mailx-compose/index.ts +0 -85
  263. package/packages/mailx-compose/tsconfig.json +0 -9
  264. package/packages/mailx-host/.gitattributes +0 -10
  265. package/packages/mailx-host/index.d.ts +0 -21
  266. package/packages/mailx-host/index.d.ts.map +0 -1
  267. package/packages/mailx-host/index.js +0 -29
  268. package/packages/mailx-host/index.js.map +0 -1
  269. package/packages/mailx-host/index.ts +0 -38
  270. package/packages/mailx-host/package.json +0 -23
  271. package/packages/mailx-host/tsconfig.json +0 -9
  272. package/packages/mailx-host/types-shim.d.ts +0 -14
  273. package/packages/mailx-imap/.gitattributes +0 -10
  274. package/packages/mailx-imap/index.d.ts +0 -442
  275. package/packages/mailx-imap/index.d.ts.map +0 -1
  276. package/packages/mailx-imap/index.js +0 -3684
  277. package/packages/mailx-imap/index.js.map +0 -1
  278. package/packages/mailx-imap/index.ts +0 -3652
  279. package/packages/mailx-imap/package-lock.json +0 -131
  280. package/packages/mailx-imap/package.json +0 -28
  281. package/packages/mailx-imap/providers/gmail-api.d.ts +0 -8
  282. package/packages/mailx-imap/providers/gmail-api.d.ts.map +0 -1
  283. package/packages/mailx-imap/providers/gmail-api.js +0 -8
  284. package/packages/mailx-imap/providers/gmail-api.js.map +0 -1
  285. package/packages/mailx-imap/providers/gmail-api.ts +0 -8
  286. package/packages/mailx-imap/providers/outlook-api.ts +0 -7
  287. package/packages/mailx-imap/providers/types.d.ts +0 -9
  288. package/packages/mailx-imap/providers/types.d.ts.map +0 -1
  289. package/packages/mailx-imap/providers/types.js +0 -9
  290. package/packages/mailx-imap/providers/types.js.map +0 -1
  291. package/packages/mailx-imap/providers/types.ts +0 -9
  292. package/packages/mailx-imap/tsconfig.json +0 -9
  293. package/packages/mailx-imap/tsconfig.tsbuildinfo +0 -1
  294. package/packages/mailx-send/.gitattributes +0 -10
  295. package/packages/mailx-send/cli-queue.d.ts.map +0 -1
  296. package/packages/mailx-send/cli-queue.js.map +0 -1
  297. package/packages/mailx-send/cli-queue.ts +0 -62
  298. package/packages/mailx-send/cli-send.d.ts.map +0 -1
  299. package/packages/mailx-send/cli-send.js.map +0 -1
  300. package/packages/mailx-send/cli-send.ts +0 -83
  301. package/packages/mailx-send/cli.d.ts.map +0 -1
  302. package/packages/mailx-send/cli.js.map +0 -1
  303. package/packages/mailx-send/cli.ts +0 -126
  304. package/packages/mailx-send/index.d.ts.map +0 -1
  305. package/packages/mailx-send/index.js.map +0 -1
  306. package/packages/mailx-send/index.ts +0 -333
  307. package/packages/mailx-send/mailsend/cli.d.ts.map +0 -1
  308. package/packages/mailx-send/mailsend/cli.js.map +0 -1
  309. package/packages/mailx-send/mailsend/cli.ts +0 -81
  310. package/packages/mailx-send/mailsend/index.d.ts.map +0 -1
  311. package/packages/mailx-send/mailsend/index.js.map +0 -1
  312. package/packages/mailx-send/mailsend/index.ts +0 -333
  313. package/packages/mailx-send/mailsend/tsconfig.json +0 -21
  314. package/packages/mailx-send/package-lock.json +0 -65
  315. package/packages/mailx-send/tsconfig.json +0 -21
  316. package/packages/mailx-server/.gitattributes +0 -10
  317. package/packages/mailx-server/index.d.ts.map +0 -1
  318. package/packages/mailx-server/index.js.map +0 -1
  319. package/packages/mailx-server/index.ts +0 -429
  320. package/packages/mailx-server/tsconfig.json +0 -9
  321. package/packages/mailx-settings/.gitattributes +0 -10
  322. package/packages/mailx-settings/cloud.d.ts.map +0 -1
  323. package/packages/mailx-settings/cloud.js.map +0 -1
  324. package/packages/mailx-settings/cloud.ts +0 -388
  325. package/packages/mailx-settings/index.d.ts.map +0 -1
  326. package/packages/mailx-settings/index.js.map +0 -1
  327. package/packages/mailx-settings/index.ts +0 -892
  328. package/packages/mailx-settings/tsconfig.json +0 -9
  329. package/packages/mailx-store/.gitattributes +0 -10
  330. package/packages/mailx-store/db.d.ts.map +0 -1
  331. package/packages/mailx-store/db.js.map +0 -1
  332. package/packages/mailx-store/db.ts +0 -2007
  333. package/packages/mailx-store/file-store.d.ts.map +0 -1
  334. package/packages/mailx-store/file-store.js.map +0 -1
  335. package/packages/mailx-store/file-store.ts +0 -82
  336. package/packages/mailx-store/index.d.ts.map +0 -1
  337. package/packages/mailx-store/index.js.map +0 -1
  338. package/packages/mailx-store/index.ts +0 -7
  339. package/packages/mailx-store/tsconfig.json +0 -9
  340. package/packages/mailx-types/.gitattributes +0 -10
  341. package/packages/mailx-types/index.d.ts.map +0 -1
  342. package/packages/mailx-types/index.js.map +0 -1
  343. package/packages/mailx-types/index.ts +0 -498
  344. package/packages/mailx-types/tsconfig.json +0 -9
@@ -0,0 +1,18 @@
1
+ export namespace util {
2
+ /**
3
+ * Retrieves a header name and returns its lowercase value.
4
+ * @param value Header name
5
+ */
6
+ export function headerNameToString(value: string | Buffer): string;
7
+
8
+ /**
9
+ * Receives a header object and returns the parsed value.
10
+ * @param headers Header object
11
+ * @param obj Object to specify a proxy object. Used to assign parsed values.
12
+ * @returns If `obj` is specified, it is equivalent to `obj`.
13
+ */
14
+ export function parseHeaders(
15
+ headers: (Buffer | string | (Buffer | string)[])[],
16
+ obj?: Record<string, string | string[]>
17
+ ): Record<string, string | string[]>;
18
+ }
@@ -0,0 +1,228 @@
1
+ // These types are not exported, and are only used internally
2
+
3
+ /**
4
+ * Take in an unknown value and return one that is of type T
5
+ */
6
+ type Converter<T> = (object: unknown) => T
7
+
8
+ type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) => T[]
9
+
10
+ type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
11
+
12
+ interface ConvertToIntOpts {
13
+ clamp?: boolean
14
+ enforceRange?: boolean
15
+ }
16
+
17
+ interface WebidlErrors {
18
+ exception (opts: { header: string, message: string }): TypeError
19
+ /**
20
+ * @description Throw an error when conversion from one type to another has failed
21
+ */
22
+ conversionFailed (opts: {
23
+ prefix: string
24
+ argument: string
25
+ types: string[]
26
+ }): TypeError
27
+ /**
28
+ * @description Throw an error when an invalid argument is provided
29
+ */
30
+ invalidArgument (opts: {
31
+ prefix: string
32
+ value: string
33
+ type: string
34
+ }): TypeError
35
+ }
36
+
37
+ interface WebidlUtil {
38
+ /**
39
+ * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values
40
+ */
41
+ Type (object: unknown):
42
+ | 'Undefined'
43
+ | 'Boolean'
44
+ | 'String'
45
+ | 'Symbol'
46
+ | 'Number'
47
+ | 'BigInt'
48
+ | 'Null'
49
+ | 'Object'
50
+
51
+ /**
52
+ * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
53
+ */
54
+ ConvertToInt (
55
+ V: unknown,
56
+ bitLength: number,
57
+ signedness: 'signed' | 'unsigned',
58
+ opts?: ConvertToIntOpts
59
+ ): number
60
+
61
+ /**
62
+ * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
63
+ */
64
+ IntegerPart (N: number): number
65
+
66
+ /**
67
+ * Stringifies {@param V}
68
+ */
69
+ Stringify (V: any): string
70
+
71
+ /**
72
+ * Mark a value as uncloneable for Node.js.
73
+ * This is only effective in some newer Node.js versions.
74
+ */
75
+ markAsUncloneable (V: any): void
76
+ }
77
+
78
+ interface WebidlConverters {
79
+ /**
80
+ * @see https://webidl.spec.whatwg.org/#es-DOMString
81
+ */
82
+ DOMString (V: unknown, prefix: string, argument: string, opts?: {
83
+ legacyNullToEmptyString: boolean
84
+ }): string
85
+
86
+ /**
87
+ * @see https://webidl.spec.whatwg.org/#es-ByteString
88
+ */
89
+ ByteString (V: unknown, prefix: string, argument: string): string
90
+
91
+ /**
92
+ * @see https://webidl.spec.whatwg.org/#es-USVString
93
+ */
94
+ USVString (V: unknown): string
95
+
96
+ /**
97
+ * @see https://webidl.spec.whatwg.org/#es-boolean
98
+ */
99
+ boolean (V: unknown): boolean
100
+
101
+ /**
102
+ * @see https://webidl.spec.whatwg.org/#es-any
103
+ */
104
+ any <Value>(V: Value): Value
105
+
106
+ /**
107
+ * @see https://webidl.spec.whatwg.org/#es-long-long
108
+ */
109
+ ['long long'] (V: unknown): number
110
+
111
+ /**
112
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long
113
+ */
114
+ ['unsigned long long'] (V: unknown): number
115
+
116
+ /**
117
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-long
118
+ */
119
+ ['unsigned long'] (V: unknown): number
120
+
121
+ /**
122
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-short
123
+ */
124
+ ['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number
125
+
126
+ /**
127
+ * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
128
+ */
129
+ ArrayBuffer (V: unknown): ArrayBufferLike
130
+ ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
131
+
132
+ /**
133
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
134
+ */
135
+ TypedArray (
136
+ V: unknown,
137
+ TypedArray: NodeJS.TypedArray | ArrayBufferLike
138
+ ): NodeJS.TypedArray | ArrayBufferLike
139
+ TypedArray (
140
+ V: unknown,
141
+ TypedArray: NodeJS.TypedArray | ArrayBufferLike,
142
+ opts?: { allowShared: false }
143
+ ): NodeJS.TypedArray | ArrayBuffer
144
+
145
+ /**
146
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
147
+ */
148
+ DataView (V: unknown, opts?: { allowShared: boolean }): DataView
149
+
150
+ /**
151
+ * @see https://webidl.spec.whatwg.org/#BufferSource
152
+ */
153
+ BufferSource (
154
+ V: unknown,
155
+ opts?: { allowShared: boolean }
156
+ ): NodeJS.TypedArray | ArrayBufferLike | DataView
157
+
158
+ ['sequence<ByteString>']: SequenceConverter<string>
159
+
160
+ ['sequence<sequence<ByteString>>']: SequenceConverter<string[]>
161
+
162
+ ['record<ByteString, ByteString>']: RecordConverter<string, string>
163
+
164
+ [Key: string]: (...args: any[]) => unknown
165
+ }
166
+
167
+ export interface Webidl {
168
+ errors: WebidlErrors
169
+ util: WebidlUtil
170
+ converters: WebidlConverters
171
+
172
+ /**
173
+ * @description Performs a brand-check on {@param V} to ensure it is a
174
+ * {@param cls} object.
175
+ */
176
+ brandCheck <Interface>(V: unknown, cls: Interface, opts?: { strict?: boolean }): asserts V is Interface
177
+
178
+ /**
179
+ * @see https://webidl.spec.whatwg.org/#es-sequence
180
+ * @description Convert a value, V, to a WebIDL sequence type.
181
+ */
182
+ sequenceConverter <Type>(C: Converter<Type>): SequenceConverter<Type>
183
+
184
+ illegalConstructor (): never
185
+
186
+ /**
187
+ * @see https://webidl.spec.whatwg.org/#es-to-record
188
+ * @description Convert a value, V, to a WebIDL record type.
189
+ */
190
+ recordConverter <K extends string, V>(
191
+ keyConverter: Converter<K>,
192
+ valueConverter: Converter<V>
193
+ ): RecordConverter<K, V>
194
+
195
+ /**
196
+ * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party
197
+ * interfaces are allowed.
198
+ */
199
+ interfaceConverter <Interface>(cls: Interface): (
200
+ V: unknown,
201
+ opts?: { strict: boolean }
202
+ ) => asserts V is typeof cls
203
+
204
+ // TODO(@KhafraDev): a type could likely be implemented that can infer the return type
205
+ // from the converters given?
206
+ /**
207
+ * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are
208
+ * allowed, values allowed, optional and required keys. Auto converts the value to
209
+ * a type given a converter.
210
+ */
211
+ dictionaryConverter (converters: {
212
+ key: string,
213
+ defaultValue?: () => unknown,
214
+ required?: boolean,
215
+ converter: (...args: unknown[]) => unknown,
216
+ allowedValues?: unknown[]
217
+ }[]): (V: unknown) => Record<string, unknown>
218
+
219
+ /**
220
+ * @see https://webidl.spec.whatwg.org/#idl-nullable-type
221
+ * @description allows a type, V, to be null
222
+ */
223
+ nullableConverter <T>(
224
+ converter: Converter<T>
225
+ ): (V: unknown) => ReturnType<typeof converter> | null
226
+
227
+ argumentLengthCheck (args: { length: number }, min: number, context: string): void
228
+ }
@@ -0,0 +1,150 @@
1
+ /// <reference types="node" />
2
+
3
+ import type { Blob } from 'buffer'
4
+ import type { MessagePort } from 'worker_threads'
5
+ import {
6
+ EventInit,
7
+ EventListenerOptions,
8
+ AddEventListenerOptions,
9
+ EventListenerOrEventListenerObject
10
+ } from './patch'
11
+ import Dispatcher from './dispatcher'
12
+ import { HeadersInit } from './fetch'
13
+
14
+ export type BinaryType = 'blob' | 'arraybuffer'
15
+
16
+ interface WebSocketEventMap {
17
+ close: CloseEvent
18
+ error: ErrorEvent
19
+ message: MessageEvent
20
+ open: Event
21
+ }
22
+
23
+ interface WebSocket extends EventTarget {
24
+ binaryType: BinaryType
25
+
26
+ readonly bufferedAmount: number
27
+ readonly extensions: string
28
+
29
+ onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null
30
+ onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null
31
+ onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null
32
+ onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null
33
+
34
+ readonly protocol: string
35
+ readonly readyState: number
36
+ readonly url: string
37
+
38
+ close(code?: number, reason?: string): void
39
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void
40
+
41
+ readonly CLOSED: number
42
+ readonly CLOSING: number
43
+ readonly CONNECTING: number
44
+ readonly OPEN: number
45
+
46
+ addEventListener<K extends keyof WebSocketEventMap>(
47
+ type: K,
48
+ listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
49
+ options?: boolean | AddEventListenerOptions
50
+ ): void
51
+ addEventListener(
52
+ type: string,
53
+ listener: EventListenerOrEventListenerObject,
54
+ options?: boolean | AddEventListenerOptions
55
+ ): void
56
+ removeEventListener<K extends keyof WebSocketEventMap>(
57
+ type: K,
58
+ listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
59
+ options?: boolean | EventListenerOptions
60
+ ): void
61
+ removeEventListener(
62
+ type: string,
63
+ listener: EventListenerOrEventListenerObject,
64
+ options?: boolean | EventListenerOptions
65
+ ): void
66
+ }
67
+
68
+ export declare const WebSocket: {
69
+ prototype: WebSocket
70
+ new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket
71
+ readonly CLOSED: number
72
+ readonly CLOSING: number
73
+ readonly CONNECTING: number
74
+ readonly OPEN: number
75
+ }
76
+
77
+ interface CloseEventInit extends EventInit {
78
+ code?: number
79
+ reason?: string
80
+ wasClean?: boolean
81
+ }
82
+
83
+ interface CloseEvent extends Event {
84
+ readonly code: number
85
+ readonly reason: string
86
+ readonly wasClean: boolean
87
+ }
88
+
89
+ export declare const CloseEvent: {
90
+ prototype: CloseEvent
91
+ new (type: string, eventInitDict?: CloseEventInit): CloseEvent
92
+ }
93
+
94
+ interface MessageEventInit<T = any> extends EventInit {
95
+ data?: T
96
+ lastEventId?: string
97
+ origin?: string
98
+ ports?: (typeof MessagePort)[]
99
+ source?: typeof MessagePort | null
100
+ }
101
+
102
+ interface MessageEvent<T = any> extends Event {
103
+ readonly data: T
104
+ readonly lastEventId: string
105
+ readonly origin: string
106
+ readonly ports: ReadonlyArray<typeof MessagePort>
107
+ readonly source: typeof MessagePort | null
108
+ initMessageEvent(
109
+ type: string,
110
+ bubbles?: boolean,
111
+ cancelable?: boolean,
112
+ data?: any,
113
+ origin?: string,
114
+ lastEventId?: string,
115
+ source?: typeof MessagePort | null,
116
+ ports?: (typeof MessagePort)[]
117
+ ): void;
118
+ }
119
+
120
+ export declare const MessageEvent: {
121
+ prototype: MessageEvent
122
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
123
+ }
124
+
125
+ interface ErrorEventInit extends EventInit {
126
+ message?: string
127
+ filename?: string
128
+ lineno?: number
129
+ colno?: number
130
+ error?: any
131
+ }
132
+
133
+ interface ErrorEvent extends Event {
134
+ readonly message: string
135
+ readonly filename: string
136
+ readonly lineno: number
137
+ readonly colno: number
138
+ readonly error: any
139
+ }
140
+
141
+ export declare const ErrorEvent: {
142
+ prototype: ErrorEvent
143
+ new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent
144
+ }
145
+
146
+ interface WebSocketInit {
147
+ protocols?: string | string[],
148
+ dispatcher?: Dispatcher,
149
+ headers?: HeadersInit
150
+ }
@@ -14,7 +14,7 @@ import { ports } from "@bobfrankston/miscinfo";
14
14
  import { createServer } from "node:http";
15
15
  const PORT = ports.mailx;
16
16
  // ── File logging ──
17
- const logDir = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".mailx", "logs");
17
+ const logDir = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".rmfmail", "logs");
18
18
  fs.mkdirSync(logDir, { recursive: true });
19
19
  // Rotate: delete logs older than 7 days
20
20
  try {
@@ -19,7 +19,7 @@
19
19
  import fs from "node:fs";
20
20
  import path from "node:path";
21
21
  import { authenticateOAuth } from "@bobfrankston/oauthsupport";
22
- const SETTINGS_DIR = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".mailx");
22
+ const SETTINGS_DIR = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".rmfmail");
23
23
  // ── Credentials ──
24
24
  // Google Drive: reuse iflow's OAuth credentials (same Google Cloud project)
25
25
  function findGoogleCredentials() {
@@ -55,9 +55,11 @@ const GDRIVE_TOKEN_DIR = path.join(SETTINGS_DIR, "tokens", "gdrive");
55
55
  // bigger privacy ask. Token cache at tokens/gdrive/ will re-auth on scope change.
56
56
  const GDRIVE_SCOPES = "https://www.googleapis.com/auth/drive";
57
57
  /** Paths to try when no config.path is set (fresh install). Order matters:
58
- * "home/.mailx" is the user convention for shared family settings; "mailx"
59
- * is the auto-created default. First one that exists on GDrive wins. */
60
- const GDRIVE_PATH_SEARCH_ORDER = ["home/.mailx", "mailx"];
58
+ * "rmfmail" is the new auto-created default; "home/.mailx" + "mailx" are
59
+ * legacy from the pre-rename era and stay in the list so existing setups
60
+ * keep working without manual reconfig. First one that exists on GDrive
61
+ * wins. (REMOVE legacy entries once nobody is on the old layout.) */
62
+ const GDRIVE_PATH_SEARCH_ORDER = ["rmfmail", "home/.mailx", "mailx"];
61
63
  // ── Token helpers ──
62
64
  /** Get a GDrive-capable token. Prefers the Gmail token (which now includes
63
65
  * drive scope) — avoids a second OAuth consent prompt. Falls back to the
@@ -103,7 +105,7 @@ async function getGoogleDriveToken() {
103
105
  // Strategy 2: dedicated GDrive token (legacy path or non-Gmail setups)
104
106
  const creds = findGoogleCredentials();
105
107
  if (!creds) {
106
- console.error(" [cloud] No Google credentials found (checked ~/.mailx/google-credentials.json and iflow package)");
108
+ console.error(" [cloud] No Google credentials found (checked ~/.rmfmail/google-credentials.json and iflow package)");
107
109
  return null;
108
110
  }
109
111
  const tokenPath = path.join(GDRIVE_TOKEN_DIR, "token.json");
@@ -245,8 +247,11 @@ export async function gDriveFindOrCreateFolder() {
245
247
  }
246
248
  console.log(` [cloud] Path '${tryPath}' not found on GDrive`);
247
249
  }
248
- // None found — create the last (simplest) path
249
- const createPath = configuredPath || GDRIVE_PATH_SEARCH_ORDER[GDRIVE_PATH_SEARCH_ORDER.length - 1];
250
+ // None found — create the new-install default (first entry).
251
+ // Was previously LAST entry, but legacy paths now sit at the tail
252
+ // for migration discovery; fresh installs should land in the new
253
+ // "rmfmail" folder, not the legacy "mailx".
254
+ const createPath = configuredPath || GDRIVE_PATH_SEARCH_ORDER[0];
250
255
  const segments = createPath.split(/[/\\]/).filter(Boolean);
251
256
  const created = await walkGDrivePath(token, segments, true);
252
257
  if (created)
@@ -20,7 +20,28 @@ import * as path from "node:path";
20
20
  import { parse as parseJsonc } from "jsonc-parser";
21
21
  import { getCloudProvider, gDriveFindOrCreateFolder } from "./cloud.js";
22
22
  // ── Paths ──
23
- const LOCAL_DIR = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".mailx");
23
+ // REMOVE 2026-05-15 one-shot migration of legacy ~/.mailx → ~/.rmfmail.
24
+ // Runs at module load before any consumer touches LOCAL_DIR. Idempotent
25
+ // (no-op if newDir already exists or oldDir is missing). The cloud-side
26
+ // rename (the "mailx" folder on Google Drive) is handled separately by
27
+ // the user via the Drive web UI — folderId in config.jsonc still resolves
28
+ // regardless of the display name, so this is cosmetic rather than load-
29
+ // bearing for cloud auth.
30
+ {
31
+ const home = process.env.USERPROFILE || process.env.HOME || ".";
32
+ const oldDir = path.join(home, ".mailx");
33
+ const newDir = path.join(home, ".rmfmail");
34
+ if (!fs.existsSync(newDir) && fs.existsSync(oldDir)) {
35
+ try {
36
+ fs.renameSync(oldDir, newDir);
37
+ console.log("[migrate] ~/.mailx → ~/.rmfmail");
38
+ }
39
+ catch (e) {
40
+ console.error(`[migrate] rename failed: ${e?.message || e}`);
41
+ }
42
+ }
43
+ }
44
+ const LOCAL_DIR = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".rmfmail");
24
45
  const LOCAL_CONFIG_PATH = path.join(LOCAL_DIR, "config.jsonc");
25
46
  const LEGACY_CONFIG_PATH = path.join(LOCAL_DIR, "config.json");
26
47
  const DEFAULT_STORE_PATH = path.join(LOCAL_DIR, "mailxstore");
@@ -1,10 +0,0 @@
1
- # Force LF line endings for all text files
2
- * text=auto eol=lf
3
-
4
- # Ensure these are always LF
5
- *.ts text eol=lf
6
- *.js text eol=lf
7
- *.json text eol=lf
8
- *.md text eol=lf
9
- *.yml text eol=lf
10
- *.yaml text eol=lf