@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
package/mailx.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "url": "http://localhost:9333",
3
- "pos": {
4
- "x": 1200,
5
- "y": 600,
6
- "screen": 0
7
- },
8
- "detach": true
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- upgrade: true,
5
- reject: [
6
- // API changes break existing tests
7
- 'proxy'
8
- ]
9
- };
@@ -1,8 +0,0 @@
1
- node_modules
2
- coverage
3
- *.min.js
4
- dist
5
- build
6
- .nyc_output
7
- package-lock.json
8
- CHANGELOG.md
@@ -1,12 +0,0 @@
1
- {
2
- "printWidth": 140,
3
- "tabWidth": 4,
4
- "useTabs": false,
5
- "semi": true,
6
- "singleQuote": true,
7
- "quoteProps": "as-needed",
8
- "trailingComma": "none",
9
- "bracketSpacing": true,
10
- "arrowParens": "avoid",
11
- "endOfLine": "lf"
12
- }
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- printWidth: 160,
5
- tabWidth: 4,
6
- singleQuote: true,
7
- endOfLine: 'lf',
8
- trailingComma: 'none',
9
- arrowParens: 'avoid'
10
- };
@@ -1,9 +0,0 @@
1
- {
2
- "packages": {
3
- ".": {
4
- "release-type": "node",
5
- "package-name": "nodemailer",
6
- "pull-request-title-pattern": "chore${scope}: release ${version} [skip-ci]"
7
- }
8
- }
9
- }
@@ -1,16 +0,0 @@
1
- Copyright (c) 2011-2023 Andris Reinman
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- SOFTWARE.
@@ -1,86 +0,0 @@
1
- # Nodemailer
2
-
3
- [![Nodemailer](https://raw.githubusercontent.com/nodemailer/nodemailer/master/assets/nm_logo_200x136.png)](https://nodemailer.com/about/)
4
-
5
- Send emails from Node.js – easy as cake! 🍰✉️
6
-
7
- [![NPM](https://nodei.co/npm/nodemailer.png?downloads=true&downloadRank=true&stars=true)](https://nodemailer.com/about/)
8
-
9
- See [nodemailer.com](https://nodemailer.com/) for documentation and terms.
10
-
11
- > [!TIP]
12
- > Check out **[EmailEngine](https://emailengine.app/?utm_source=github-nodemailer&utm_campaign=nodemailer&utm_medium=readme-link)** – a self-hosted email gateway that allows making **REST requests against IMAP and SMTP servers**. EmailEngine also sends webhooks whenever something changes on the registered accounts.\
13
- > \
14
- > Using the email accounts registered with EmailEngine, you can receive and [send emails](https://emailengine.app/sending-emails?utm_source=github-nodemailer&utm_campaign=nodemailer&utm_medium=readme-link). EmailEngine supports OAuth2, delayed sends, opens and clicks tracking, bounce detection, etc. All on top of regular email accounts without an external MTA service.
15
-
16
- ## Having an issue?
17
-
18
- #### First review the docs
19
-
20
- Documentation for Nodemailer can be found at [nodemailer.com](https://nodemailer.com/about/).
21
-
22
- #### Nodemailer throws a SyntaxError for "..."
23
-
24
- You are using an older Node.js version than v6.0. Upgrade Node.js to get support for the spread operator. Nodemailer supports all Node.js versions starting from Node.js@v6.0.0.
25
-
26
- #### I'm having issues with Gmail
27
-
28
- Gmail either works well, or it does not work at all. It is probably easier to switch to an alternative service instead of fixing issues with Gmail. If Gmail does not work for you, then don't use it. Read more about it [here](https://nodemailer.com/usage/using-gmail/).
29
-
30
- #### I get ETIMEDOUT errors
31
-
32
- Check your firewall settings. Timeout usually occurs when you try to open a connection to a firewalled port either on the server or on your machine. Some ISPs also block email ports to prevent spamming.
33
-
34
- #### Nodemailer works on one machine but not in another
35
-
36
- It's either a firewall issue, or your SMTP server blocks authentication attempts from some servers.
37
-
38
- #### I get TLS errors
39
-
40
- - If you are running the code on your machine, check your antivirus settings. Antiviruses often mess around with email ports usage. Node.js might not recognize the MITM cert your antivirus is using.
41
- - Latest Node versions allow only TLS versions 1.2 and higher. Some servers might still use TLS 1.1 or lower. Check Node.js docs on how to get correct TLS support for your app. You can change this with [tls.minVersion](https://nodejs.org/dist/latest-v16.x/docs/api/tls.html#tls_tls_createsecurecontext_options) option
42
- - You might have the wrong value for the `secure` option. This should be set to `true` only for port 465. For every other port, it should be `false`. Setting it to `false` does not mean that Nodemailer would not use TLS. Nodemailer would still try to upgrade the connection to use TLS if the server supports it.
43
- - Older Node versions do not fully support the certificate chain of the newest Let's Encrypt certificates. Either set [tls.rejectUnauthorized](https://nodejs.org/dist/latest-v16.x/docs/api/tls.html#tlsconnectoptions-callback) to `false` to skip chain verification or upgrade your Node version
44
-
45
- ```js
46
- let configOptions = {
47
- host: 'smtp.example.com',
48
- port: 587,
49
- tls: {
50
- rejectUnauthorized: true,
51
- minVersion: 'TLSv1.2'
52
- }
53
- };
54
- ```
55
-
56
- #### I have issues with DNS / hosts file
57
-
58
- Node.js uses [c-ares](https://nodejs.org/en/docs/meta/topics/dependencies/#c-ares) to resolve domain names, not the DNS library provided by the system, so if you have some custom DNS routing set up, it might be ignored. Nodemailer runs [dns.resolve4()](https://nodejs.org/dist/latest-v16.x/docs/api/dns.html#dnsresolve4hostname-options-callback) and [dns.resolve6()](https://nodejs.org/dist/latest-v16.x/docs/api/dns.html#dnsresolve6hostname-options-callback) to resolve hostname into an IP address. If both calls fail, then Nodemailer will fall back to [dns.lookup()](https://nodejs.org/dist/latest-v16.x/docs/api/dns.html#dnslookuphostname-options-callback). If this does not work for you, you can hard code the IP address into the configuration like shown below. In that case, Nodemailer would not perform any DNS lookups.
59
-
60
- ```js
61
- let configOptions = {
62
- host: '1.2.3.4',
63
- port: 465,
64
- secure: true,
65
- tls: {
66
- // must provide server name, otherwise TLS certificate check will fail
67
- servername: 'example.com'
68
- }
69
- };
70
- ```
71
-
72
- #### I have an issue with TypeScript types
73
-
74
- Nodemailer has official support for Node.js only. For anything related to TypeScript, you need to directly contact the authors of the [type definitions](https://www.npmjs.com/package/@types/nodemailer).
75
-
76
- #### I have a different problem
77
-
78
- If you are having issues with Nodemailer, then the best way to find help would be [Stack Overflow](https://stackoverflow.com/search?q=nodemailer) or revisit the [docs](https://nodemailer.com/about/).
79
-
80
- ### License
81
-
82
- Nodemailer is licensed under the **MIT No Attribution license**
83
-
84
- ---
85
-
86
- The Nodemailer logo was designed by [Sven Kristjansen](https://www.behance.net/kristjansen).
@@ -1,22 +0,0 @@
1
- -----BEGIN PGP SIGNED MESSAGE-----
2
- Hash: SHA256
3
-
4
- Contact: mailto:andris@reinman.eu
5
- Encryption: https://keys.openpgp.org/vks/v1/by-fingerprint/5D952A46E1D8C931F6364E01DC6C83F4D584D364
6
- Preferred-Languages: en, et
7
- -----BEGIN PGP SIGNATURE-----
8
-
9
- iQIzBAEBCAAdFiEEXZUqRuHYyTH2Nk4B3GyD9NWE02QFAmFDnUgACgkQ3GyD9NWE
10
- 02RqUA/+MM3afmRYq874C7wp+uN6dTMCvUX5g5zqBZ2yKpFr46L+PYvM7o8TMm5h
11
- hmLT2I1zZmi+xezOL3zHFizaw0tKkZIz9cWl3Jrgs0FLp0zOsSz1xucp9Q2tYM/Q
12
- vbiP6ys0gbim4tkDGRmZOEiO23s0BuRnmHt7vZg210O+D105Yd8/Ohzbj6PSLBO5
13
- W1tA7Xw5t0FQ14NNH5+MKyDIKoCX12n0FmrC6qLTXeojf291UgKhCUPda3LIGTmx
14
- mTXz0y68149Mw+JikRCYP8HfGRY9eA4XZrYXF7Bl2T9OJpKD3JAH+69P3xBw19Gn
15
- Csaw3twu8P1bxoVGjY4KRrBOp68W8TwZYjWVWbqY6oV8hb/JfrMxa+kaSxRuloFs
16
- oL6+phrDSPTWdOj2LlEDBJbPOMeDFzIlsBBcJ/JHCEHTvlHl7LoWr3YuWce9PUwl
17
- 4r3JUovvaeuJxLgC0vu3WCB3Jeocsl3SreqNkrVc1IjvkSomn3YGm5nCNAd/2F0V
18
- exCGRk/8wbkSjAY38GwQ8K/VuFsefWN3L9sVwIMAMu88KFCAN+GzVFiwvyIXehF5
19
- eogP9mIXzdQ5YReQjUjApOzGz54XnDyv9RJ3sdvMHosLP+IOg+0q5t9agWv6aqSR
20
- 2HzCpiQnH/gmM5NS0AU4Koq/L7IBeLu1B8+61/+BiHgZJJmPdgU=
21
- =BUZr
22
- -----END PGP SIGNATURE-----
@@ -1,88 +0,0 @@
1
- 'use strict';
2
-
3
- const globals = require('globals');
4
-
5
- module.exports = [
6
- {
7
- ignores: ['node_modules/**', 'coverage/**', 'dist/**', 'build/**', '.nyc_output/**']
8
- },
9
- {
10
- files: ['**/*.js'],
11
- languageOptions: {
12
- ecmaVersion: 2017,
13
- sourceType: 'script',
14
- globals: Object.assign({}, globals.node, globals.es2017, {
15
- it: true,
16
- describe: true,
17
- beforeEach: true,
18
- afterEach: true
19
- })
20
- },
21
- rules: {
22
- // Error detection
23
- 'for-direction': 'error',
24
- 'no-await-in-loop': 'error',
25
- 'no-div-regex': 'error',
26
- eqeqeq: 'error',
27
- 'dot-notation': 'error',
28
- curly: 'error',
29
- 'no-fallthrough': 'error',
30
- 'no-unused-expressions': [
31
- 'error',
32
- {
33
- allowShortCircuit: true
34
- }
35
- ],
36
- 'no-unused-vars': [
37
- 'error',
38
- {
39
- varsIgnorePattern: '^_',
40
- argsIgnorePattern: '^_',
41
- caughtErrorsIgnorePattern: '^_'
42
- }
43
- ],
44
- 'handle-callback-err': 'error',
45
- 'no-new': 'error',
46
- 'new-cap': 'error',
47
- 'no-eval': 'error',
48
- 'no-invalid-this': 'error',
49
- radix: ['error', 'always'],
50
- 'no-use-before-define': ['error', 'nofunc'],
51
- 'callback-return': ['error', ['callback', 'cb', 'done']],
52
- 'no-regex-spaces': 'error',
53
- 'no-empty': 'error',
54
- 'no-duplicate-case': 'error',
55
- 'no-empty-character-class': 'error',
56
- 'no-redeclare': 'off', // Disabled per project preference
57
- 'block-scoped-var': 'error',
58
- 'no-sequences': 'error',
59
- 'no-throw-literal': 'error',
60
- 'no-useless-call': 'error',
61
- 'no-useless-concat': 'error',
62
- 'no-void': 'error',
63
- yoda: 'error',
64
- 'no-undef': 'error',
65
- 'global-require': 'error',
66
- 'no-var': 'error',
67
- 'no-bitwise': 'error',
68
- 'no-lonely-if': 'error',
69
- 'no-mixed-spaces-and-tabs': 'error',
70
- 'arrow-body-style': ['error', 'as-needed'],
71
- 'arrow-parens': ['error', 'as-needed'],
72
- 'prefer-arrow-callback': 'error',
73
- 'object-shorthand': 'error',
74
- 'prefer-spread': 'error',
75
- 'no-prototype-builtins': 'off', // Disabled per project preference
76
- strict: ['error', 'global'],
77
-
78
- // Disable all formatting rules (handled by Prettier)
79
- indent: 'off',
80
- quotes: 'off',
81
- 'linebreak-style': 'off',
82
- semi: 'off',
83
- 'quote-props': 'off',
84
- 'comma-dangle': 'off',
85
- 'comma-style': 'off'
86
- }
87
- }
88
- ];
@@ -1,383 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Converts tokens for a single address into an address object
5
- *
6
- * @param {Array} tokens Tokens object
7
- * @param {Number} depth Current recursion depth for nested group protection
8
- * @return {Object} Address object
9
- */
10
- function _handleAddress(tokens, depth) {
11
- let isGroup = false;
12
- let state = 'text';
13
- let address;
14
- let addresses = [];
15
- let data = {
16
- address: [],
17
- comment: [],
18
- group: [],
19
- text: [],
20
- textWasQuoted: [] // Track which text tokens came from inside quotes
21
- };
22
- let i;
23
- let len;
24
- let insideQuotes = false; // Track if we're currently inside a quoted string
25
-
26
- // Filter out <addresses>, (comments) and regular text
27
- for (i = 0, len = tokens.length; i < len; i++) {
28
- let token = tokens[i];
29
- let prevToken = i ? tokens[i - 1] : null;
30
- if (token.type === 'operator') {
31
- switch (token.value) {
32
- case '<':
33
- state = 'address';
34
- insideQuotes = false;
35
- break;
36
- case '(':
37
- state = 'comment';
38
- insideQuotes = false;
39
- break;
40
- case ':':
41
- state = 'group';
42
- isGroup = true;
43
- insideQuotes = false;
44
- break;
45
- case '"':
46
- // Track quote state for text tokens
47
- insideQuotes = !insideQuotes;
48
- state = 'text';
49
- break;
50
- default:
51
- state = 'text';
52
- insideQuotes = false;
53
- break;
54
- }
55
- } else if (token.value) {
56
- if (state === 'address') {
57
- // handle use case where unquoted name includes a "<"
58
- // Apple Mail truncates everything between an unexpected < and an address
59
- // and so will we
60
- token.value = token.value.replace(/^[^<]*<\s*/, '');
61
- }
62
-
63
- if (prevToken && prevToken.noBreak && data[state].length) {
64
- // join values
65
- data[state][data[state].length - 1] += token.value;
66
- if (state === 'text' && insideQuotes) {
67
- data.textWasQuoted[data.textWasQuoted.length - 1] = true;
68
- }
69
- } else {
70
- data[state].push(token.value);
71
- if (state === 'text') {
72
- data.textWasQuoted.push(insideQuotes);
73
- }
74
- }
75
- }
76
- }
77
-
78
- // If there is no text but a comment, replace the two
79
- if (!data.text.length && data.comment.length) {
80
- data.text = data.comment;
81
- data.comment = [];
82
- }
83
-
84
- if (isGroup) {
85
- // http://tools.ietf.org/html/rfc2822#appendix-A.1.3
86
- data.text = data.text.join(' ');
87
-
88
- // Parse group members, but flatten any nested groups (RFC 5322 doesn't allow nesting)
89
- let groupMembers = [];
90
- if (data.group.length) {
91
- let parsedGroup = addressparser(data.group.join(','), { _depth: depth + 1 });
92
- // Flatten: if any member is itself a group, extract its members into the sequence
93
- parsedGroup.forEach(member => {
94
- if (member.group) {
95
- // Nested group detected - flatten it by adding its members directly
96
- groupMembers = groupMembers.concat(member.group);
97
- } else {
98
- groupMembers.push(member);
99
- }
100
- });
101
- }
102
-
103
- addresses.push({
104
- name: data.text || (address && address.name),
105
- group: groupMembers
106
- });
107
- } else {
108
- // If no address was found, try to detect one from regular text
109
- if (!data.address.length && data.text.length) {
110
- for (i = data.text.length - 1; i >= 0; i--) {
111
- // Security fix: Do not extract email addresses from quoted strings
112
- // RFC 5321 allows @ inside quoted local-parts like "user@domain"@example.com
113
- // Extracting emails from quoted text leads to misrouting vulnerabilities
114
- if (!data.textWasQuoted[i] && data.text[i].match(/^[^@\s]+@[^@\s]+$/)) {
115
- data.address = data.text.splice(i, 1);
116
- data.textWasQuoted.splice(i, 1);
117
- break;
118
- }
119
- }
120
-
121
- let _regexHandler = function (address) {
122
- if (!data.address.length) {
123
- data.address = [address.trim()];
124
- return ' ';
125
- } else {
126
- return address;
127
- }
128
- };
129
-
130
- // still no address
131
- if (!data.address.length) {
132
- for (i = data.text.length - 1; i >= 0; i--) {
133
- // Security fix: Do not extract email addresses from quoted strings
134
- if (!data.textWasQuoted[i]) {
135
- // fixed the regex to parse email address correctly when email address has more than one @
136
- data.text[i] = data.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/, _regexHandler).trim();
137
- if (data.address.length) {
138
- break;
139
- }
140
- }
141
- }
142
- }
143
- }
144
-
145
- // If there's still is no text but a comment exixts, replace the two
146
- if (!data.text.length && data.comment.length) {
147
- data.text = data.comment;
148
- data.comment = [];
149
- }
150
-
151
- // Keep only the first address occurence, push others to regular text
152
- if (data.address.length > 1) {
153
- data.text = data.text.concat(data.address.splice(1));
154
- }
155
-
156
- // Join values with spaces
157
- data.text = data.text.join(' ');
158
- data.address = data.address.join(' ');
159
-
160
- if (!data.address && isGroup) {
161
- return [];
162
- } else {
163
- address = {
164
- address: data.address || data.text || '',
165
- name: data.text || data.address || ''
166
- };
167
-
168
- if (address.address === address.name) {
169
- if ((address.address || '').match(/@/)) {
170
- address.name = '';
171
- } else {
172
- address.address = '';
173
- }
174
- }
175
-
176
- addresses.push(address);
177
- }
178
- }
179
-
180
- return addresses;
181
- }
182
-
183
- /**
184
- * Creates a Tokenizer object for tokenizing address field strings
185
- *
186
- * @constructor
187
- * @param {String} str Address field string
188
- */
189
- class Tokenizer {
190
- constructor(str) {
191
- this.str = (str || '').toString();
192
- this.operatorCurrent = '';
193
- this.operatorExpecting = '';
194
- this.node = null;
195
- this.escaped = false;
196
-
197
- this.list = [];
198
- /**
199
- * Operator tokens and which tokens are expected to end the sequence
200
- */
201
- this.operators = {
202
- '"': '"',
203
- '(': ')',
204
- '<': '>',
205
- ',': '',
206
- ':': ';',
207
- // Semicolons are not a legal delimiter per the RFC2822 grammar other
208
- // than for terminating a group, but they are also not valid for any
209
- // other use in this context. Given that some mail clients have
210
- // historically allowed the semicolon as a delimiter equivalent to the
211
- // comma in their UI, it makes sense to treat them the same as a comma
212
- // when used outside of a group.
213
- ';': ''
214
- };
215
- }
216
-
217
- /**
218
- * Tokenizes the original input string
219
- *
220
- * @return {Array} An array of operator|text tokens
221
- */
222
- tokenize() {
223
- let list = [];
224
-
225
- for (let i = 0, len = this.str.length; i < len; i++) {
226
- let chr = this.str.charAt(i);
227
- let nextChr = i < len - 1 ? this.str.charAt(i + 1) : null;
228
- this.checkChar(chr, nextChr);
229
- }
230
-
231
- this.list.forEach(node => {
232
- node.value = (node.value || '').toString().trim();
233
- if (node.value) {
234
- list.push(node);
235
- }
236
- });
237
-
238
- return list;
239
- }
240
-
241
- /**
242
- * Checks if a character is an operator or text and acts accordingly
243
- *
244
- * @param {String} chr Character from the address field
245
- */
246
- checkChar(chr, nextChr) {
247
- if (this.escaped) {
248
- // ignore next condition blocks
249
- } else if (chr === this.operatorExpecting) {
250
- this.node = {
251
- type: 'operator',
252
- value: chr
253
- };
254
-
255
- if (nextChr && ![' ', '\t', '\r', '\n', ',', ';'].includes(nextChr)) {
256
- this.node.noBreak = true;
257
- }
258
-
259
- this.list.push(this.node);
260
- this.node = null;
261
- this.operatorExpecting = '';
262
- this.escaped = false;
263
-
264
- return;
265
- } else if (!this.operatorExpecting && chr in this.operators) {
266
- this.node = {
267
- type: 'operator',
268
- value: chr
269
- };
270
- this.list.push(this.node);
271
- this.node = null;
272
- this.operatorExpecting = this.operators[chr];
273
- this.escaped = false;
274
- return;
275
- } else if (['"', "'"].includes(this.operatorExpecting) && chr === '\\') {
276
- this.escaped = true;
277
- return;
278
- }
279
-
280
- if (!this.node) {
281
- this.node = {
282
- type: 'text',
283
- value: ''
284
- };
285
- this.list.push(this.node);
286
- }
287
-
288
- if (chr === '\n') {
289
- // Convert newlines to spaces. Carriage return is ignored as \r and \n usually
290
- // go together anyway and there already is a WS for \n. Lone \r means something is fishy.
291
- chr = ' ';
292
- }
293
-
294
- if (chr.charCodeAt(0) >= 0x21 || [' ', '\t'].includes(chr)) {
295
- // skip command bytes
296
- this.node.value += chr;
297
- }
298
-
299
- this.escaped = false;
300
- }
301
- }
302
-
303
- /**
304
- * Maximum recursion depth for parsing nested groups.
305
- * RFC 5322 doesn't allow nested groups, so this is a safeguard against
306
- * malicious input that could cause stack overflow.
307
- */
308
- const MAX_NESTED_GROUP_DEPTH = 50;
309
-
310
- /**
311
- * Parses structured e-mail addresses from an address field
312
- *
313
- * Example:
314
- *
315
- * 'Name <address@domain>'
316
- *
317
- * will be converted to
318
- *
319
- * [{name: 'Name', address: 'address@domain'}]
320
- *
321
- * @param {String} str Address field
322
- * @param {Object} options Optional options object
323
- * @param {Number} options._depth Internal recursion depth counter (do not set manually)
324
- * @return {Array} An array of address objects
325
- */
326
- function addressparser(str, options) {
327
- options = options || {};
328
- let depth = options._depth || 0;
329
-
330
- // Prevent stack overflow from deeply nested groups (DoS protection)
331
- if (depth > MAX_NESTED_GROUP_DEPTH) {
332
- return [];
333
- }
334
-
335
- let tokenizer = new Tokenizer(str);
336
- let tokens = tokenizer.tokenize();
337
-
338
- let addresses = [];
339
- let address = [];
340
- let parsedAddresses = [];
341
-
342
- tokens.forEach(token => {
343
- if (token.type === 'operator' && (token.value === ',' || token.value === ';')) {
344
- if (address.length) {
345
- addresses.push(address);
346
- }
347
- address = [];
348
- } else {
349
- address.push(token);
350
- }
351
- });
352
-
353
- if (address.length) {
354
- addresses.push(address);
355
- }
356
-
357
- addresses.forEach(address => {
358
- address = _handleAddress(address, depth);
359
- if (address.length) {
360
- parsedAddresses = parsedAddresses.concat(address);
361
- }
362
- });
363
-
364
- if (options.flatten) {
365
- let addresses = [];
366
- let walkAddressList = list => {
367
- list.forEach(address => {
368
- if (address.group) {
369
- return walkAddressList(address.group);
370
- } else {
371
- addresses.push(address);
372
- }
373
- });
374
- };
375
- walkAddressList(parsedAddresses);
376
- return addresses;
377
- }
378
-
379
- return parsedAddresses;
380
- }
381
-
382
- // expose to the world
383
- module.exports = addressparser;