@visulima/email 2.1.8 → 3.0.0

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 (279) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE.md +159 -19
  3. package/dist/crypto/index.d.ts +50 -47
  4. package/dist/crypto/index.js +1 -1
  5. package/dist/deliverability/dmarc-report.js +1 -1
  6. package/dist/deliverability/index.js +1 -1
  7. package/dist/events/index.js +1 -1
  8. package/dist/inbound/index.js +1 -1
  9. package/dist/index.d.ts +2 -3
  10. package/dist/index.js +1 -1
  11. package/dist/middleware/index.d.ts +19 -6
  12. package/dist/middleware/index.js +1 -1
  13. package/dist/packem_chunks/index.js +27 -0
  14. package/dist/packem_shared/ALL_EVENTS-CSpGgYbV.js +1 -0
  15. package/dist/packem_shared/DkimSigner-CCxFKitN.js +4 -0
  16. package/dist/packem_shared/DraftMailMessage-B0gwf8n_.js +1 -0
  17. package/dist/packem_shared/EmailError-BIaHK1Uw.js +1 -0
  18. package/dist/packem_shared/Mail-DmYNQ0KK.js +1 -0
  19. package/dist/packem_shared/MailMessage-DmmaNHHc.js +1 -0
  20. package/dist/packem_shared/MemorySuppressionStore-D_bge6rS.js +1 -0
  21. package/dist/packem_shared/RATE_LIMIT_PRESETS-BIFmRuh2.js +1 -0
  22. package/dist/packem_shared/RequiredOptionError-ctDEEB1s.js +1 -0
  23. package/dist/packem_shared/SmimeEncrypter-DnlfpjUX.js +6 -0
  24. package/dist/packem_shared/SmimeSigner-DTvclzLq.js +8 -0
  25. package/dist/packem_shared/address-formatter-w36S9ZYj.js +1 -0
  26. package/dist/packem_shared/aggregate-features-Bst55u8k.js +1 -0
  27. package/dist/packem_shared/ahaSendProvider-C1qvG8Cj.js +1 -0
  28. package/dist/packem_shared/arcMessageSignatureBase-su9VTRB7.js +9 -0
  29. package/dist/packem_shared/attachment-processor-BJFDS343.js +1 -0
  30. package/dist/packem_shared/autoSendProvider-yxUx3sEj.js +1 -0
  31. package/dist/packem_shared/awsSesProvider-DTnLwAbE.js +32 -0
  32. package/dist/packem_shared/azureProvider-CLLRKtOf.js +1 -0
  33. package/dist/packem_shared/brevoProvider-CHlodyzV.js +1 -0
  34. package/dist/packem_shared/build-mime-message-BCFKPqaW.js +3 -0
  35. package/dist/packem_shared/buildListUnsubscribe-g1CoihSv.js +1 -0
  36. package/dist/packem_shared/buildMtaStsPolicy-BA2YXL72.js +6 -0
  37. package/dist/packem_shared/canonicalize-BEjQUnUe.js +11 -0
  38. package/dist/packem_shared/circuitBreakerMiddleware-DcBN7K6H.js +1 -0
  39. package/dist/packem_shared/cloudflareEmailProvider-Ckh_u-0D.js +1 -0
  40. package/dist/packem_shared/composeMiddleware-B3RCDFsy.js +1 -0
  41. package/dist/packem_shared/create-logger-CazqtXcL.js +1 -0
  42. package/dist/packem_shared/create-token-cache-BdMsMzf7.js +1 -0
  43. package/dist/packem_shared/createSuppressionStore-DbocihI8.js +1 -0
  44. package/dist/packem_shared/createTestEmail-sB6z8m6Z.js +1 -0
  45. package/dist/packem_shared/createWorker-ChuTgETP.js +1 -0
  46. package/dist/packem_shared/dedupeMiddleware-BTo8Qjje.js +1 -0
  47. package/dist/packem_shared/defineInboundHandler-CnYn10ex.js +1 -0
  48. package/dist/packem_shared/detectMimeType-BRz3Qjyz.js +1 -0
  49. package/dist/packem_shared/emailMatchers-DpwItmkN.js +1 -0
  50. package/dist/packem_shared/extractReply-CLoWMY97.js +5 -0
  51. package/dist/packem_shared/failoverProvider-DSsuXHYK.js +1 -0
  52. package/dist/packem_shared/format-address-Bb7xk8G_.js +1 -0
  53. package/dist/packem_shared/{generate-boundary-0xGe9GqK.js → generate-boundary-BCSUEi6x.js} +1 -1
  54. package/dist/packem_shared/generate-message-id-B2n2yqR6.js +1 -0
  55. package/dist/packem_shared/headers-to-record-ZOZ7Dubo.js +1 -0
  56. package/dist/packem_shared/httpProvider-CdoJ-tL7.js +1 -0
  57. package/dist/packem_shared/infobipProvider-BEu1ycxS.js +1 -0
  58. package/dist/packem_shared/isValidSigningCertUrl-CK1t2a7x.js +3 -0
  59. package/dist/packem_shared/loggingMiddleware-DNVf8O1B.js +1 -0
  60. package/dist/packem_shared/loopsProvider-CKJ_rzLq.js +1 -0
  61. package/dist/packem_shared/{mail.d-B9JyPxzq.d.ts → mail.d-BdyyyQO5.d.ts} +11 -9
  62. package/dist/packem_shared/mailCrabProvider-BQ5ELwPU.js +1 -0
  63. package/dist/packem_shared/mailPaceProvider-Ca3cz8JU.js +1 -0
  64. package/dist/packem_shared/mailchannelsProvider-BZeuZk3d.js +1 -0
  65. package/dist/packem_shared/mailerSendProvider-C_Db652T.js +1 -0
  66. package/dist/packem_shared/mailgunProvider-CU2b8ie8.js +1 -0
  67. package/dist/packem_shared/mailjetProvider-VqvqCS7I.js +1 -0
  68. package/dist/packem_shared/mailomatProvider-FMk4FZZz.js +1 -0
  69. package/dist/packem_shared/mailtrapProvider-Qs0exKiJ.js +1 -0
  70. package/dist/packem_shared/make-request-Cyz5_yu8.js +1 -0
  71. package/dist/packem_shared/mandrillProvider-Co_EfMxl.js +1 -0
  72. package/dist/packem_shared/mockProvider-Bf5eJ_rl.js +1 -0
  73. package/dist/packem_shared/netcoreProvider-_kXjZ0bE.js +1 -0
  74. package/dist/packem_shared/nodemailerProvider-CJ4zkTPF.js +1 -0
  75. package/dist/packem_shared/normalizeMessageId-0yB1zeyC.js +1 -0
  76. package/dist/packem_shared/oauth2Middleware-C0M1w3_2.js +1 -0
  77. package/dist/packem_shared/opentelemetryProvider-s0gvh05u.js +1 -0
  78. package/dist/packem_shared/outlook365Provider-DKMz0Vvh.js +1 -0
  79. package/dist/packem_shared/parseAddress-DW9suGjV.js +1 -0
  80. package/dist/packem_shared/parseArfReport-VbQeofN4.js +6 -0
  81. package/dist/packem_shared/parseCloudflareInbound-BKZzk0De.js +1 -0
  82. package/dist/packem_shared/parseDmarcRecord-9B3Qhba8.js +1 -0
  83. package/dist/packem_shared/parseMailgunInbound-nY-DXZrK.js +1 -0
  84. package/dist/packem_shared/parsePostmarkInbound-0zG71J7F.js +1 -0
  85. package/dist/packem_shared/parseSendGridInbound-BzEhN-gd.js +4 -0
  86. package/dist/packem_shared/parseSesInbound-C4cRtAUq.js +1 -0
  87. package/dist/packem_shared/parseTlsReport-DSiCaKFH.js +1 -0
  88. package/dist/packem_shared/plunkProvider-B-JtCJQy.js +1 -0
  89. package/dist/packem_shared/postalProvider-tEBNXL3h.js +1 -0
  90. package/dist/packem_shared/postmarkProvider-DdavP5x5.js +1 -0
  91. package/dist/packem_shared/provider-base-BEz00m9R.js +1 -0
  92. package/dist/packem_shared/quoted-printable-BgiHOYdV.js +7 -0
  93. package/dist/packem_shared/resendProvider-CMtlyIye.js +1 -0
  94. package/dist/packem_shared/retry-aghj7y8m.js +1 -0
  95. package/dist/packem_shared/retryMiddleware-CaTv0UIm.js +1 -0
  96. package/dist/packem_shared/roundRobinProvider-Dr1DdT2L.js +1 -0
  97. package/dist/packem_shared/sanitize-header-CW0f3IT7.js +1 -0
  98. package/dist/packem_shared/scalewayProvider-BFA1PQ73.js +1 -0
  99. package/dist/packem_shared/sendGridProvider-DV80Lg7a.js +1 -0
  100. package/dist/packem_shared/smtpProvider-BCEzJmay.js +14 -0
  101. package/dist/packem_shared/sparkpostProvider-C3pATjJX.js +1 -0
  102. package/dist/packem_shared/sweegoProvider-CkFtUAzq.js +1 -0
  103. package/dist/packem_shared/toEmailSnapshot-BOhTn44E.js +1 -0
  104. package/dist/packem_shared/{types.d-B0t3PQ3t.d.ts → types.d-Cb5fls_X.d.ts} +1 -1
  105. package/dist/packem_shared/utils-CDV8xy3e.js +1 -0
  106. package/dist/packem_shared/validate-email-options-DxdAVLlu.js +1 -0
  107. package/dist/packem_shared/{verifyMailgunWebhook-DNk080BF.js → verifyMailgunWebhook-DS4o0kZL.js} +1 -1
  108. package/dist/packem_shared/{verifyPostmarkWebhook-B4OIEHQF.js → verifyPostmarkWebhook-pLwWmeOl.js} +1 -1
  109. package/dist/packem_shared/verifyResendWebhook-D3GuwWjv.js +1 -0
  110. package/dist/packem_shared/verifySendGridWebhook-csuRasH3.js +1 -0
  111. package/dist/packem_shared/withEvents-BinK2hMw.js +1 -0
  112. package/dist/packem_shared/withMetrics-i3mZVfeE.js +1 -0
  113. package/dist/packem_shared/withRender-Ce6leoYE.js +1 -0
  114. package/dist/packem_shared/withSuppression-B0eZ2xNQ.js +1 -0
  115. package/dist/packem_shared/{withTelemetry-DL2qo0Hp.js → withTelemetry-DEKTis1I.js} +1 -1
  116. package/dist/packem_shared/zeptomailProvider-tqRYpQlv.js +1 -0
  117. package/dist/providers/ahasend/index.js +1 -1
  118. package/dist/providers/autosend/index.js +1 -1
  119. package/dist/providers/aws-ses/index.js +1 -1
  120. package/dist/providers/azure/index.js +1 -1
  121. package/dist/providers/brevo/index.js +1 -1
  122. package/dist/providers/cloudflare-email/index.d.ts +17 -1
  123. package/dist/providers/cloudflare-email/index.js +1 -1
  124. package/dist/providers/failover/index.js +1 -1
  125. package/dist/providers/http/index.js +1 -1
  126. package/dist/providers/infobip/index.js +1 -1
  127. package/dist/providers/loops/index.js +1 -1
  128. package/dist/providers/mailchannels/index.js +1 -1
  129. package/dist/providers/mailcrab/index.js +1 -1
  130. package/dist/providers/mailersend/index.js +1 -1
  131. package/dist/providers/mailgun/index.js +1 -1
  132. package/dist/providers/mailjet/index.js +1 -1
  133. package/dist/providers/mailomat/index.js +1 -1
  134. package/dist/providers/mailpace/index.js +1 -1
  135. package/dist/providers/mailtrap/index.js +1 -1
  136. package/dist/providers/mandrill/index.js +1 -1
  137. package/dist/providers/mock/index.js +1 -1
  138. package/dist/providers/netcore/index.js +1 -1
  139. package/dist/providers/nodemailer/index.js +1 -1
  140. package/dist/providers/opentelemetry/index.d.ts +1 -1
  141. package/dist/providers/opentelemetry/index.js +1 -1
  142. package/dist/providers/outlook365/index.js +1 -1
  143. package/dist/providers/plunk/index.js +1 -1
  144. package/dist/providers/postal/index.js +1 -1
  145. package/dist/providers/postmark/index.js +1 -1
  146. package/dist/providers/resend/index.js +1 -1
  147. package/dist/providers/roundrobin/index.js +1 -1
  148. package/dist/providers/scaleway/index.js +1 -1
  149. package/dist/providers/sendgrid/index.js +1 -1
  150. package/dist/providers/smtp/index.d.ts +9 -5
  151. package/dist/providers/smtp/index.js +1 -1
  152. package/dist/providers/sparkpost/index.js +1 -1
  153. package/dist/providers/sweego/index.js +1 -1
  154. package/dist/providers/zeptomail/index.js +1 -1
  155. package/dist/queue/bullmq-queue.js +1 -1
  156. package/dist/queue/index.js +1 -1
  157. package/dist/queue/pg-boss-queue.js +1 -1
  158. package/dist/queue/sqs-queue.js +1 -1
  159. package/dist/queue/unstorage-queue.js +1 -1
  160. package/dist/render/cid.js +1 -1
  161. package/dist/render/css-inline.js +1 -1
  162. package/dist/render/dark-mode.js +1 -1
  163. package/dist/render/preheader.js +1 -1
  164. package/dist/template-engines/handlebars.js +1 -1
  165. package/dist/template-engines/html-to-text.js +1 -1
  166. package/dist/template-engines/i18n.js +1 -1
  167. package/dist/template-engines/jsx-email.js +1 -1
  168. package/dist/template-engines/liquid.js +1 -1
  169. package/dist/template-engines/mjml.js +1 -1
  170. package/dist/template-engines/react-email.js +1 -1
  171. package/dist/template-engines/vue-email.js +1 -1
  172. package/dist/test/index.d.ts +2 -3
  173. package/dist/test/index.js +1 -1
  174. package/dist/utils/cache.js +1 -1
  175. package/dist/utils/format-email-address.js +1 -1
  176. package/dist/utils/parse-address.js +1 -1
  177. package/dist/utils/parse-eml.js +4 -4
  178. package/dist/utils/result.js +1 -1
  179. package/dist/utils/validation/check-feature-support.js +1 -1
  180. package/dist/utils/validation/validate-email.js +1 -1
  181. package/dist/webhooks/index.js +1 -1
  182. package/package.json +6 -6
  183. package/dist/packem_shared/ALL_EVENTS-3kwh5CBE.js +0 -1
  184. package/dist/packem_shared/DkimSigner-udCl3JXO.js +0 -18
  185. package/dist/packem_shared/DraftMailMessage-BgP1OF1G.js +0 -1
  186. package/dist/packem_shared/EmailError-2CCyVX1S.js +0 -1
  187. package/dist/packem_shared/Mail-DduRntbB.js +0 -1
  188. package/dist/packem_shared/MailMessage-BRBT4Jea.js +0 -1
  189. package/dist/packem_shared/MemorySuppressionStore-DZnbz-_B.js +0 -1
  190. package/dist/packem_shared/RATE_LIMIT_PRESETS-BPADLgcA.js +0 -1
  191. package/dist/packem_shared/RequiredOptionError-BmpC5whN.js +0 -1
  192. package/dist/packem_shared/SmimeEncrypter-Dm9McVTQ.js +0 -6
  193. package/dist/packem_shared/SmimeSigner-B6hkacNk.js +0 -8
  194. package/dist/packem_shared/address-formatter-bfmGfQ83.js +0 -1
  195. package/dist/packem_shared/aggregate-features-BqEjPd42.js +0 -1
  196. package/dist/packem_shared/ahaSendProvider-C6nBGCCa.js +0 -1
  197. package/dist/packem_shared/arcMessageSignatureBase-B2uArM48.js +0 -17
  198. package/dist/packem_shared/attachment-processor-DjbjtJ6H.js +0 -1
  199. package/dist/packem_shared/autoSendProvider-Dhig--Zo.js +0 -1
  200. package/dist/packem_shared/awsSesProvider-CMqAmU5N.js +0 -32
  201. package/dist/packem_shared/azureProvider-C-bNOOil.js +0 -1
  202. package/dist/packem_shared/brevoProvider-CkOjDyir.js +0 -1
  203. package/dist/packem_shared/build-mime-message-t8KYiQkO.js +0 -3
  204. package/dist/packem_shared/buildListUnsubscribe-Cdr8MvR_.js +0 -1
  205. package/dist/packem_shared/buildMtaStsPolicy-oEQg8y_C.js +0 -6
  206. package/dist/packem_shared/circuitBreakerMiddleware-BSCPR72q.js +0 -1
  207. package/dist/packem_shared/cloudflareEmailProvider-RCixPWnY.js +0 -1
  208. package/dist/packem_shared/composeMiddleware-BHwLLEzK.js +0 -1
  209. package/dist/packem_shared/create-logger-BQTS3f-I.js +0 -1
  210. package/dist/packem_shared/create-token-cache-D56KQGVQ.js +0 -1
  211. package/dist/packem_shared/createSuppressionStore-CeAZKCbY.js +0 -1
  212. package/dist/packem_shared/createTestEmail-XiF5E8vJ.js +0 -1
  213. package/dist/packem_shared/createWorker-_-yMWcNQ.js +0 -1
  214. package/dist/packem_shared/dedupeMiddleware-CYYI_O7S.js +0 -1
  215. package/dist/packem_shared/defineInboundHandler-CnL2BzlL.js +0 -1
  216. package/dist/packem_shared/detectMimeType-B9_7ujpC.js +0 -1
  217. package/dist/packem_shared/emailMatchers-DZDkrZ_3.js +0 -1
  218. package/dist/packem_shared/extractReply-BUjIBt9A.js +0 -5
  219. package/dist/packem_shared/failoverProvider-BkOOP7pt.js +0 -1
  220. package/dist/packem_shared/format-address-DTl-9O70.js +0 -1
  221. package/dist/packem_shared/generate-message-id-gXAuMz4g.js +0 -1
  222. package/dist/packem_shared/headers-to-record-De1Eg951.js +0 -1
  223. package/dist/packem_shared/httpProvider-6idLfv-f.js +0 -1
  224. package/dist/packem_shared/index-y0s2wQdc.js +0 -11
  225. package/dist/packem_shared/infobipProvider-CHHsqRXy.js +0 -1
  226. package/dist/packem_shared/isValidSigningCertUrl-D7PuiRW4.js +0 -3
  227. package/dist/packem_shared/loggingMiddleware-CZIiVMVp.js +0 -1
  228. package/dist/packem_shared/loopsProvider-Cl-dOuCN.js +0 -1
  229. package/dist/packem_shared/mailCrabProvider-De2YxPlF.js +0 -1
  230. package/dist/packem_shared/mailPaceProvider-DwNTuFb2.js +0 -1
  231. package/dist/packem_shared/mailchannelsProvider-Dwl0Typz.js +0 -1
  232. package/dist/packem_shared/mailerSendProvider-CyMIbqGq.js +0 -1
  233. package/dist/packem_shared/mailgunProvider-DWKJYRKT.js +0 -1
  234. package/dist/packem_shared/mailjetProvider-DXPJQO1G.js +0 -1
  235. package/dist/packem_shared/mailomatProvider-DopZk27y.js +0 -1
  236. package/dist/packem_shared/mailtrapProvider-CTg4z3GN.js +0 -1
  237. package/dist/packem_shared/make-request-CDhxj-9b.js +0 -1
  238. package/dist/packem_shared/mandrillProvider-CAQeMtU_.js +0 -1
  239. package/dist/packem_shared/mockProvider-EcpYlg-_.js +0 -1
  240. package/dist/packem_shared/netcoreProvider-ua1avx07.js +0 -1
  241. package/dist/packem_shared/nodemailerProvider-BZmQfKlM.js +0 -1
  242. package/dist/packem_shared/normalizeMessageId-DAx2pGe2.js +0 -1
  243. package/dist/packem_shared/oauth2Middleware-DQh-hIkv.js +0 -1
  244. package/dist/packem_shared/opentelemetryProvider-CAfWpywa.js +0 -1
  245. package/dist/packem_shared/outlook365Provider-SFYELGDr.js +0 -1
  246. package/dist/packem_shared/parseAddress-DdbViBAJ.js +0 -1
  247. package/dist/packem_shared/parseArfReport-Ds6S3c4J.js +0 -6
  248. package/dist/packem_shared/parseCloudflareInbound-C__j-oNa.js +0 -1
  249. package/dist/packem_shared/parseDmarcRecord-DXZ-_rF0.js +0 -1
  250. package/dist/packem_shared/parseMailgunInbound-BpC6uPNe.js +0 -1
  251. package/dist/packem_shared/parsePostmarkInbound-Co3_c6-9.js +0 -1
  252. package/dist/packem_shared/parseSendGridInbound-DsALoijO.js +0 -4
  253. package/dist/packem_shared/parseSesInbound-CH5tHIjp.js +0 -1
  254. package/dist/packem_shared/parseTlsReport-wPe1lIDs.js +0 -1
  255. package/dist/packem_shared/plunkProvider-9amwuQri.js +0 -1
  256. package/dist/packem_shared/postalProvider-CeF3TOIW.js +0 -1
  257. package/dist/packem_shared/postmarkProvider-BPgKEkgF.js +0 -1
  258. package/dist/packem_shared/provider-base-B-xhQSqE.js +0 -1
  259. package/dist/packem_shared/quoted-printable-nSGDA1tA.js +0 -7
  260. package/dist/packem_shared/resendProvider-C9_sM8bH.js +0 -1
  261. package/dist/packem_shared/retry-D1Rh-6Z4.js +0 -1
  262. package/dist/packem_shared/retryMiddleware-DbViDX4r.js +0 -1
  263. package/dist/packem_shared/roundRobinProvider-BPzLWZf-.js +0 -1
  264. package/dist/packem_shared/sanitize-header-DtQwAnzg.js +0 -1
  265. package/dist/packem_shared/scalewayProvider-DfC7275i.js +0 -1
  266. package/dist/packem_shared/sendGridProvider-CUBBHBzs.js +0 -1
  267. package/dist/packem_shared/smtpProvider-9nBSGtQl.js +0 -27
  268. package/dist/packem_shared/sparkpostProvider-Be_d7S8o.js +0 -1
  269. package/dist/packem_shared/sweegoProvider-CP1cNC-d.js +0 -1
  270. package/dist/packem_shared/toEmailSnapshot-DeRqM5SJ.js +0 -1
  271. package/dist/packem_shared/utils-DjEtR3qT.js +0 -1
  272. package/dist/packem_shared/validate-email-options-mCM9dVug.js +0 -1
  273. package/dist/packem_shared/verifyResendWebhook-C7E32LZ1.js +0 -1
  274. package/dist/packem_shared/verifySendGridWebhook-DtFMgBRP.js +0 -1
  275. package/dist/packem_shared/withEvents-CytsykaK.js +0 -1
  276. package/dist/packem_shared/withMetrics-DWywX_6M.js +0 -1
  277. package/dist/packem_shared/withRender-VP9wE5Yr.js +0 -1
  278. package/dist/packem_shared/withSuppression-wDl4NTb-.js +0 -1
  279. package/dist/packem_shared/zeptomailProvider-BZ0fK0Lk.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## @visulima/email [3.0.0](https://github.com/visulima/visulima/compare/%40visulima%2Femail%402.1.9...%40visulima%2Femail%403.0.0) (2026-08-18)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/fs:** upgraded to 6.0.2
7
+
8
+ ## @visulima/email [2.1.9](https://github.com/visulima/visulima/compare/%40visulima%2Femail%402.1.8...%40visulima%2Femail%402.1.9) (2026-08-17)
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * **@visulima/fs:** upgraded to 6.0.1
14
+
1
15
  ## @visulima/email [2.1.8](https://github.com/visulima/visulima/compare/%40visulima%2Femail%402.1.7...%40visulima%2Femail%402.1.8) (2026-08-02)
2
16
 
3
17
 
package/LICENSE.md CHANGED
@@ -427,9 +427,41 @@ Repository: git+https://github.com/visulima/visulima.git
427
427
  >
428
428
  > # Licenses of bundled types
429
429
  > The published @visulima/fs artifact additionally contains code with the following licenses:
430
- > ISC, MIT
430
+ > MIT, (MIT OR CC0-1.0)
431
431
  >
432
432
  > # Bundled types:
433
+ > ## @visulima/yaml
434
+ > License: MIT
435
+ > By: Daniel Bannert
436
+ > Repository: git+https://github.com/visulima/visulima.git
437
+ >
438
+ > > MIT License
439
+ > >
440
+ > > Copyright (c) 2026 visulima
441
+ > >
442
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy
443
+ > > of this software and associated documentation files (the "Software"), to deal
444
+ > > in the Software without restriction, including without limitation the rights
445
+ > > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
446
+ > > copies of the Software, and to permit persons to whom the Software is
447
+ > > furnished to do so, subject to the following conditions:
448
+ > >
449
+ > > The above copyright notice and this permission notice shall be included in all
450
+ > > copies or substantial portions of the Software.
451
+ > >
452
+ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
453
+ > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
454
+ > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
455
+ > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
456
+ > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
457
+ > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
458
+ > > SOFTWARE.
459
+ > >
460
+ > >
461
+ > >
462
+ >
463
+ > ---------------------------------------
464
+ >
433
465
  > ## is-fs-case-sensitive
434
466
  > License: MIT
435
467
  > By: Hiroki Osame
@@ -488,24 +520,132 @@ Repository: git+https://github.com/visulima/visulima.git
488
520
  >
489
521
  > ---------------------------------------
490
522
  >
491
- > ## yaml
492
- > License: ISC
493
- > By: Eemeli Aro
494
- > Repository: github:eemeli/yaml
495
- >
496
- > > Copyright Eemeli Aro <eemeli@gmail.com>
497
- > >
498
- > > Permission to use, copy, modify, and/or distribute this software for any purpose
499
- > > with or without fee is hereby granted, provided that the above copyright notice
500
- > > and this permission notice appear in all copies.
501
- > >
502
- > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
503
- > > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
504
- > > FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
505
- > > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
506
- > > OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
507
- > > TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
508
- > > THIS SOFTWARE.
523
+ > ## type-fest
524
+ > License: (MIT OR CC0-1.0)
525
+ > By: Sindre Sorhus
526
+ > Repository: sindresorhus/type-fest
527
+ >
528
+ > > Creative Commons Legal Code
529
+ > >
530
+ > > CC0 1.0 Universal
531
+ > >
532
+ > > CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
533
+ > > LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
534
+ > > ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
535
+ > > INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
536
+ > > REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
537
+ > > PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
538
+ > > THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
539
+ > > HEREUNDER.
540
+ > >
541
+ > > Statement of Purpose
542
+ > >
543
+ > > The laws of most jurisdictions throughout the world automatically confer
544
+ > > exclusive Copyright and Related Rights (defined below) upon the creator
545
+ > > and subsequent owner(s) (each and all, an "owner") of an original work of
546
+ > > authorship and/or a database (each, a "Work").
547
+ > >
548
+ > > Certain owners wish to permanently relinquish those rights to a Work for
549
+ > > the purpose of contributing to a commons of creative, cultural and
550
+ > > scientific works ("Commons") that the public can reliably and without fear
551
+ > > of later claims of infringement build upon, modify, incorporate in other
552
+ > > works, reuse and redistribute as freely as possible in any form whatsoever
553
+ > > and for any purposes, including without limitation commercial purposes.
554
+ > > These owners may contribute to the Commons to promote the ideal of a free
555
+ > > culture and the further production of creative, cultural and scientific
556
+ > > works, or to gain reputation or greater distribution for their Work in
557
+ > > part through the use and efforts of others.
558
+ > >
559
+ > > For these and/or other purposes and motivations, and without any
560
+ > > expectation of additional consideration or compensation, the person
561
+ > > associating CC0 with a Work (the "Affirmer"), to the extent that he or she
562
+ > > is an owner of Copyright and Related Rights in the Work, voluntarily
563
+ > > elects to apply CC0 to the Work and publicly distribute the Work under its
564
+ > > terms, with knowledge of his or her Copyright and Related Rights in the
565
+ > > Work and the meaning and intended legal effect of CC0 on those rights.
566
+ > >
567
+ > > 1. Copyright and Related Rights. A Work made available under CC0 may be
568
+ > > protected by copyright and related or neighboring rights ("Copyright and
569
+ > > Related Rights"). Copyright and Related Rights include, but are not
570
+ > > limited to, the following:
571
+ > >
572
+ > > i. the right to reproduce, adapt, distribute, perform, display,
573
+ > > communicate, and translate a Work;
574
+ > > ii. moral rights retained by the original author(s) and/or performer(s);
575
+ > > iii. publicity and privacy rights pertaining to a person's image or
576
+ > > likeness depicted in a Work;
577
+ > > iv. rights protecting against unfair competition in regards to a Work,
578
+ > > subject to the limitations in paragraph 4(a), below;
579
+ > > v. rights protecting the extraction, dissemination, use and reuse of data
580
+ > > in a Work;
581
+ > > vi. database rights (such as those arising under Directive 96/9/EC of the
582
+ > > European Parliament and of the Council of 11 March 1996 on the legal
583
+ > > protection of databases, and under any national implementation
584
+ > > thereof, including any amended or successor version of such
585
+ > > directive); and
586
+ > > vii. other similar, equivalent or corresponding rights throughout the
587
+ > > world based on applicable law or treaty, and any national
588
+ > > implementations thereof.
589
+ > >
590
+ > > 2. Waiver. To the greatest extent permitted by, but not in contravention
591
+ > > of, applicable law, Affirmer hereby overtly, fully, permanently,
592
+ > > irrevocably and unconditionally waives, abandons, and surrenders all of
593
+ > > Affirmer's Copyright and Related Rights and associated claims and causes
594
+ > > of action, whether now known or unknown (including existing as well as
595
+ > > future claims and causes of action), in the Work (i) in all territories
596
+ > > worldwide, (ii) for the maximum duration provided by applicable law or
597
+ > > treaty (including future time extensions), (iii) in any current or future
598
+ > > medium and for any number of copies, and (iv) for any purpose whatsoever,
599
+ > > including without limitation commercial, advertising or promotional
600
+ > > purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
601
+ > > member of the public at large and to the detriment of Affirmer's heirs and
602
+ > > successors, fully intending that such Waiver shall not be subject to
603
+ > > revocation, rescission, cancellation, termination, or any other legal or
604
+ > > equitable action to disrupt the quiet enjoyment of the Work by the public
605
+ > > as contemplated by Affirmer's express Statement of Purpose.
606
+ > >
607
+ > > 3. Public License Fallback. Should any part of the Waiver for any reason
608
+ > > be judged legally invalid or ineffective under applicable law, then the
609
+ > > Waiver shall be preserved to the maximum extent permitted taking into
610
+ > > account Affirmer's express Statement of Purpose. In addition, to the
611
+ > > extent the Waiver is so judged Affirmer hereby grants to each affected
612
+ > > person a royalty-free, non transferable, non sublicensable, non exclusive,
613
+ > > irrevocable and unconditional license to exercise Affirmer's Copyright and
614
+ > > Related Rights in the Work (i) in all territories worldwide, (ii) for the
615
+ > > maximum duration provided by applicable law or treaty (including future
616
+ > > time extensions), (iii) in any current or future medium and for any number
617
+ > > of copies, and (iv) for any purpose whatsoever, including without
618
+ > > limitation commercial, advertising or promotional purposes (the
619
+ > > "License"). The License shall be deemed effective as of the date CC0 was
620
+ > > applied by Affirmer to the Work. Should any part of the License for any
621
+ > > reason be judged legally invalid or ineffective under applicable law, such
622
+ > > partial invalidity or ineffectiveness shall not invalidate the remainder
623
+ > > of the License, and in such case Affirmer hereby affirms that he or she
624
+ > > will not (i) exercise any of his or her remaining Copyright and Related
625
+ > > Rights in the Work or (ii) assert any associated claims and causes of
626
+ > > action with respect to the Work, in either case contrary to Affirmer's
627
+ > > express Statement of Purpose.
628
+ > >
629
+ > > 4. Limitations and Disclaimers.
630
+ > >
631
+ > > a. No trademark or patent rights held by Affirmer are waived, abandoned,
632
+ > > surrendered, licensed or otherwise affected by this document.
633
+ > > b. Affirmer offers the Work as-is and makes no representations or
634
+ > > warranties of any kind concerning the Work, express, implied,
635
+ > > statutory or otherwise, including without limitation warranties of
636
+ > > title, merchantability, fitness for a particular purpose, non
637
+ > > infringement, or the absence of latent or other defects, accuracy, or
638
+ > > the present or absence of errors, whether or not discoverable, all to
639
+ > > the greatest extent permissible under applicable law.
640
+ > > c. Affirmer disclaims responsibility for clearing rights of other persons
641
+ > > that may apply to the Work or any use thereof, including without
642
+ > > limitation any person's Copyright and Related Rights in the Work.
643
+ > > Further, Affirmer disclaims responsibility for obtaining any necessary
644
+ > > consents, permissions or other rights required for any use of the
645
+ > > Work.
646
+ > > d. Affirmer understands and acknowledges that Creative Commons is not a
647
+ > > party to this document and has no duty or obligation with respect to
648
+ > > this CC0 or use of the Work.
509
649
 
510
650
  ---------------------------------------
511
651
 
@@ -1,6 +1,6 @@
1
1
  import { KeyObject } from 'node:crypto';
2
+ import { D as DkimOptions, S as SmimeEncryptOptions, E as EmailEncrypter, a as SmimeSignOptions, b as EmailSigner } from "../packem_shared/types.d-Cb5fls_X.js";
2
3
  import { E as EmailOptions } from "../packem_shared/types.d-B9295M4_.js";
3
- import { D as DkimOptions, E as EmailSigner, S as SmimeEncryptOptions, a as EmailEncrypter, b as SmimeSignOptions } from "../packem_shared/types.d-B0t3PQ3t.js";
4
4
  import 'node:buffer';
5
5
  /**
6
6
  * The signature algorithm for the ARC headers. RSA per RFC 8617, Ed25519 per RFC 8463.
@@ -104,11 +104,12 @@ interface ArcVerifyResult {
104
104
  * Computes the exact byte string that the ARC-Message-Signature `b=` value signs.
105
105
  *
106
106
  * Exposed so ARC verifiers (and tests) can re-derive the signing input.
107
- * @param email The email being sealed.
107
+ * @param message The serialized MIME message being sealed.
108
108
  * @param options The seal options.
109
109
  * @returns The AMS header (without the `b=` value) and the data signed.
110
+ * @throws {Error} When `message` has no header/body separator.
110
111
  */
111
- declare const arcMessageSignatureBase: (email: EmailOptions, options: ArcSealOptions) => {
112
+ declare const arcMessageSignatureBase: (message: string, options: ArcSealOptions) => {
112
113
  header: string;
113
114
  signBase: string;
114
115
  };
@@ -133,57 +134,43 @@ declare const arcSealBase: (aarValue: string, amsValue: string, options: ArcSeal
133
134
  * your service forwards mail and wants downstream receivers to trust the authentication results you
134
135
  * observed. Supports RSA (default) and Ed25519 (`algorithm: "ed25519-sha256"`, RFC 8463) keys.
135
136
  *
136
- * IMPORTANT: the body hash (`bh=`) is computed over `text` + "\n\n" + `html` with relaxed
137
- * canonicalization — the same simplification as the DKIM signer. For a third-party ARC verifier to
138
- * accept the seal, the body actually transmitted on the wire must canonicalize to this same value, so
139
- * apply ARC at the point where the MIME body is finalized (or feed in the exact rendered body).
140
- * @param email The email to seal.
137
+ * Takes the serialized message rather than `EmailOptions`, because an ARC seal like a DKIM
138
+ * signaturecommits to the bytes on the wire: `bh=` hashes the transmitted body and `h=` covers
139
+ * the headers a downstream verifier will actually read. Forwarding is where ARC belongs, and there
140
+ * the raw message is what you already have.
141
+ * @param message The serialized MIME message to seal.
141
142
  * @param options The seal options. See {@link ArcSealOptions}.
142
- * @returns The email with the ARC header set added, and the raw {@link ArcHeaderSet}.
143
- * @throws {Error} When the private key cannot be loaded or signing fails.
143
+ * @returns The message with the ARC header set prepended, and the raw {@link ArcHeaderSet}.
144
+ * @throws {Error} When the message is not a complete MIME message, the private key cannot be
145
+ * loaded, or signing fails.
144
146
  */
145
- declare const signArc: (email: EmailOptions, options: ArcSealOptions) => Promise<{
146
- email: EmailOptions;
147
+ declare const signArc: (message: string, options: ArcSealOptions) => Promise<{
147
148
  headers: ArcHeaderSet;
149
+ message: string;
148
150
  }>;
149
151
  /**
150
152
  * Verifies an originating (i=1) ARC header set against the signing domain's public key.
151
153
  *
152
- * Re-derives the AMS and ARC-Seal signing inputs from `email` + the supplied ARC headers, recomputes
153
- * the body hash, and checks all three. The public key must be the one published for the seal's
154
- * `s=`/`d=` (the DKIM-style `&lt;selector>._domainkey.&lt;domain>` TXT `p=` value).
155
- * @param email The message that was sealed (same fields used when signing).
154
+ * Re-derives the AMS and ARC-Seal signing inputs from the message + the supplied ARC headers,
155
+ * recomputes the body hash, and checks all three. The public key must be the one published for the
156
+ * seal's `s=`/`d=` (the DKIM-style `&lt;selector>._domainkey.&lt;domain>` TXT `p=` value).
157
+ * @param message The serialized MIME message that was sealed, without the ARC header set.
156
158
  * @param headers The ARC header set (or any record containing the three `ARC-*` headers).
157
159
  * @param options Verification options. See {@link ArcVerifyOptions}.
158
160
  * @returns The verification result. See {@link ArcVerifyResult}.
159
161
  */
160
- declare const verifyArc: (email: EmailOptions, headers: ArcHeaderSet | Record<string, string>, options: ArcVerifyOptions) => ArcVerifyResult;
162
+ declare const verifyArc: (message: string, headers: ArcHeaderSet | Record<string, string>, options: ArcVerifyOptions) => ArcVerifyResult;
161
163
  /**
162
- * DKIM signer implementation
164
+ * DKIM signer.
165
+ *
166
+ * DKIM signs the message **as transmitted**: the `bh=` tag is a hash of the canonicalized MIME
167
+ * body, and `h=` covers the headers the recipient's MTA will see. That means signing can only
168
+ * happen after the message has been serialized, so this deliberately does **not** implement
169
+ * `EmailSigner` — `MailMessage.sign()` runs at the `EmailOptions` layer, where the body does not
170
+ * exist yet, and passing a DKIM signer there is a compile error rather than a runtime surprise.
171
+ * Configure DKIM on a transport that emits raw MIME instead.
163
172
  */
164
- declare class DkimSigner implements EmailSigner {
165
- /**
166
- * Sanitizes a display name for use in quoted email headers per RFC 5322.
167
- * Removes/replaces CR, LF, tabs with space, escapes backslashes and quotes,
168
- * and strips non-printable control characters.
169
- * @param name The display name to sanitize.
170
- * @returns The sanitized display name, or empty string if nothing remains.
171
- */
172
- private static sanitizeDisplayName;
173
- /**
174
- * Formats an email address for use in email headers.
175
- * @param address The email address object to format.
176
- * @param address.email The email address string.
177
- * @param address.name Optional display name for the email address.
178
- * @returns The formatted email address string in RFC 5322 format.
179
- */
180
- private static formatAddress;
181
- /**
182
- * Formats email addresses for headers.
183
- * @param addresses The email address(es) to format (single or array).
184
- * @returns The formatted email addresses string (comma-separated if multiple).
185
- */
186
- private static formatAddresses;
173
+ declare class DkimSigner {
187
174
  private readonly options;
188
175
  /**
189
176
  * Creates a new DKIM signer.
@@ -191,12 +178,18 @@ declare class DkimSigner implements EmailSigner {
191
178
  */
192
179
  constructor(options: DkimOptions);
193
180
  /**
194
- * Signs an email message with DKIM.
195
- * @param email The email options to sign.
196
- * @returns The email options with DKIM signature header added.
197
- * @throws {Error} When signing fails (e.g., invalid private key).
181
+ * Signs a fully-built MIME message and returns it with a `DKIM-Signature` header prepended.
182
+ * @param message The complete MIME message: headers, a blank line, then the body, CRLF-delimited.
183
+ * @returns The message with the signature prepended.
184
+ * @throws {Error} When the message has no header/body separator, has no signable `From` header,
185
+ * or signing fails (e.g. an unreadable or malformed private key).
186
+ * @example
187
+ * ```typescript
188
+ * const raw = await buildMimeMessage(emailOptions);
189
+ * const signed = await createDkimSigner({ domainName: "example.com", keySelector: "s1", privateKey }).signMimeMessage(raw);
190
+ * ```
198
191
  */
199
- sign(email: EmailOptions): Promise<EmailOptions>;
192
+ signMimeMessage(message: string): Promise<string>;
200
193
  }
201
194
  /**
202
195
  * Creates a DKIM signer instance.
@@ -204,6 +197,16 @@ declare class DkimSigner implements EmailSigner {
204
197
  * @returns A new DkimSigner instance.
205
198
  */
206
199
  declare const createDkimSigner: (options: DkimOptions) => DkimSigner;
200
+ /**
201
+ * Builds a signer for a transport that writes the MIME message itself.
202
+ *
203
+ * Canonicalization defaults to relaxed/relaxed rather than the `simple/simple` of
204
+ * {@link DkimOptions}: SMTP hops routinely re-wrap whitespace, which `simple` does not survive.
205
+ * Callers can still override either field.
206
+ * @param options DKIM signing options from the transport config.
207
+ * @returns A signer configured for on-the-wire use.
208
+ */
209
+ declare const createTransportDkimSigner: (options: DkimOptions) => DkimSigner;
207
210
  /**
208
211
  * S/MIME encrypter implementation using PKIjs
209
212
  * Note: Requires pkijs and asn1js for S/MIME operations
@@ -301,4 +304,4 @@ declare class SmimeSigner implements EmailSigner {
301
304
  * @returns A new SmimeSigner instance ready to sign emails.
302
305
  */
303
306
  declare const createSmimeSigner: (options: SmimeSignOptions) => SmimeSigner;
304
- export { type ArcAlgorithm, type ArcHeaderSet, type ArcSealOptions, type ArcVerifyOptions, type ArcVerifyResult, type DkimOptions, DkimSigner, type EmailEncrypter, type EmailSigner, type SmimeEncryptOptions, SmimeEncrypter, type SmimeSignOptions, SmimeSigner, arcMessageSignatureBase, arcSealBase, createDkimSigner, createSmimeEncrypter, createSmimeSigner, signArc, verifyArc };
307
+ export { type ArcAlgorithm, type ArcHeaderSet, type ArcSealOptions, type ArcVerifyOptions, type ArcVerifyResult, type DkimOptions, DkimSigner, type EmailEncrypter, type EmailSigner, type SmimeEncryptOptions, SmimeEncrypter, type SmimeSignOptions, SmimeSigner, arcMessageSignatureBase, arcSealBase, createDkimSigner, createSmimeEncrypter, createSmimeSigner, createTransportDkimSigner, signArc, verifyArc };
@@ -1 +1 @@
1
- import{arcMessageSignatureBase as m,arcSealBase as i,signArc as a,verifyArc as t}from"../packem_shared/arcMessageSignatureBase-B2uArM48.js";import{DkimSigner as c,createDkimSigner as n}from"../packem_shared/DkimSigner-udCl3JXO.js";import{SmimeEncrypter as g,createSmimeEncrypter as p}from"../packem_shared/SmimeEncrypter-Dm9McVTQ.js";import{SmimeSigner as s,createSmimeSigner as x}from"../packem_shared/SmimeSigner-B6hkacNk.js";export{c as DkimSigner,g as SmimeEncrypter,s as SmimeSigner,m as arcMessageSignatureBase,i as arcSealBase,n as createDkimSigner,p as createSmimeEncrypter,x as createSmimeSigner,a as signArc,t as verifyArc};
1
+ import{arcMessageSignatureBase as i,arcSealBase as m,signArc as a,verifyArc as t}from"../packem_shared/arcMessageSignatureBase-su9VTRB7.js";import{DkimSigner as c,createDkimSigner as n,createTransportDkimSigner as o}from"../packem_shared/DkimSigner-CCxFKitN.js";import{SmimeEncrypter as p,createSmimeEncrypter as s}from"../packem_shared/SmimeEncrypter-DnlfpjUX.js";import{SmimeSigner as x,createSmimeSigner as k}from"../packem_shared/SmimeSigner-DTvclzLq.js";export{c as DkimSigner,p as SmimeEncrypter,x as SmimeSigner,i as arcMessageSignatureBase,m as arcSealBase,n as createDkimSigner,s as createSmimeEncrypter,k as createSmimeSigner,o as createTransportDkimSigner,a as signArc,t as verifyArc};
@@ -1 +1 @@
1
- import l from"../packem_shared/EmailError-2CCyVX1S.js";const g=a=>a==null?[]:Array.isArray(a)?a:[a],e=a=>{if(typeof a=="string")return a;if(typeof a=="number"||typeof a=="boolean")return String(a)},c=a=>{const r=e(a);if(r===void 0)return;const s=Number(r);return Number.isNaN(s)?void 0:s},f=a=>g(a).map(r=>({domain:e(r.domain),result:e(r.result)})),h=async a=>{let r;try{({XMLParser:r}=await import("fast-xml-parser"))}catch(t){throw t instanceof Error&&(t.code==="ERR_MODULE_NOT_FOUND"||t.message.includes("Cannot find module")||t.message.includes("Cannot find package"))?new l("deliverability","fast-xml-parser is not installed. Please install it: pnpm add fast-xml-parser",{cause:t}):new l("deliverability",`Failed to load fast-xml-parser: ${t.message}`,{cause:t})}let s;try{s=new r({ignoreAttributes:!0,parseTagValue:!1}).parse(a)}catch(t){throw new l("deliverability",`Failed to parse DMARC report: ${t.message}`,{cause:t})}const n=s.feedback??{},o=n.report_metadata??{},m=o.date_range??{},i=n.policy_published??{},y=g(n.record).map(t=>{const d=t.row??{},p=d.policy_evaluated??{},b=t.identifiers??{},u=t.auth_results??{};return{authResults:{dkim:f(u.dkim),spf:f(u.spf)},count:c(d.count)??0,disposition:e(p.disposition),dkim:e(p.dkim),headerFrom:e(b.header_from),sourceIp:e(d.source_ip),spf:e(p.spf)}});return{dateRangeBegin:e(m.begin),dateRangeEnd:e(m.end),email:e(o.email),organizationName:e(o.org_name),policyPublished:{adkim:e(i.adkim),aspf:e(i.aspf),domain:e(i.domain),p:e(i.p),pct:c(i.pct),sp:e(i.sp)},records:y,reportId:e(o.report_id)}};export{h as parseDmarcReport};
1
+ import c from"../packem_shared/EmailError-BIaHK1Uw.js";const g=r=>r==null?[]:Array.isArray(r)?r:[r],e=r=>{if(typeof r=="string")return r;if(typeof r=="number"||typeof r=="boolean")return String(r)},u=r=>{const a=e(r);if(a===void 0)return;const i=Number(a);return Number.isNaN(i)?void 0:i},f=r=>g(r).map(a=>({domain:e(a.domain),result:e(a.result)})),_=async r=>{let a;try{({XMLParser:a}=await import("fast-xml-parser"))}catch(t){throw t instanceof Error&&(t.code==="ERR_MODULE_NOT_FOUND"||t.message.includes("Cannot find module")||t.message.includes("Cannot find package"))?new c("deliverability","fast-xml-parser is not installed. Please install it: pnpm add fast-xml-parser",{cause:t}):new c("deliverability",`Failed to load fast-xml-parser: ${t.message}`,{cause:t})}let i;try{i=new a({ignoreAttributes:!0,parseTagValue:!1}).parse(r)}catch(t){throw new c("deliverability",`Failed to parse DMARC report: ${t.message}`,{cause:t})}const n=i.feedback??{},o=n.report_metadata??{},m=o.date_range??{},s=n.policy_published??{},y=g(n.record).map(t=>{const d=t.row??{},p=d.policy_evaluated??{},b=t.identifiers??{},l=t.auth_results??{};return{authResults:{dkim:f(l.dkim),spf:f(l.spf)},count:u(d.count)??0,disposition:e(p.disposition),dkim:e(p.dkim),headerFrom:e(b.header_from),sourceIp:e(d.source_ip),spf:e(p.spf)}});return{dateRangeBegin:e(m.begin),dateRangeEnd:e(m.end),email:e(o.email),organizationName:e(o.org_name),policyPublished:{adkim:e(s.adkim),aspf:e(s.aspf),domain:e(s.domain),p:e(s.p),pct:u(s.pct),sp:e(s.sp)},records:y,reportId:e(o.report_id)}};export{_ as parseDmarcReport};
@@ -1 +1 @@
1
- import{parseArfReport as o}from"../packem_shared/parseArfReport-Ds6S3c4J.js";import{parseDmarcRecord as p}from"../packem_shared/parseDmarcRecord-DXZ-_rF0.js";import{buildListUnsubscribe as a,parseListUnsubscribe as i}from"../packem_shared/buildListUnsubscribe-Cdr8MvR_.js";import{buildMtaStsPolicy as m,parseMtaStsPolicy as c}from"../packem_shared/buildMtaStsPolicy-oEQg8y_C.js";import{createSuppressionStore as u,filterSuppressed as x}from"../packem_shared/createSuppressionStore-CeAZKCbY.js";import{parseTlsReport as b,parseTlsRptRecord as d}from"../packem_shared/parseTlsReport-wPe1lIDs.js";import{default as n}from"../packem_shared/MemorySuppressionStore-DZnbz-_B.js";export{n as MemorySuppressionStore,a as buildListUnsubscribe,m as buildMtaStsPolicy,u as createSuppressionStore,x as filterSuppressed,o as parseArfReport,p as parseDmarcRecord,i as parseListUnsubscribe,c as parseMtaStsPolicy,b as parseTlsReport,d as parseTlsRptRecord};
1
+ import{parseArfReport as o}from"../packem_shared/parseArfReport-VbQeofN4.js";import{parseDmarcRecord as p}from"../packem_shared/parseDmarcRecord-9B3Qhba8.js";import{buildListUnsubscribe as a,parseListUnsubscribe as i}from"../packem_shared/buildListUnsubscribe-g1CoihSv.js";import{buildMtaStsPolicy as m,parseMtaStsPolicy as c}from"../packem_shared/buildMtaStsPolicy-BA2YXL72.js";import{createSuppressionStore as u,filterSuppressed as x}from"../packem_shared/createSuppressionStore-DbocihI8.js";import{parseTlsReport as b,parseTlsRptRecord as d}from"../packem_shared/parseTlsReport-DSiCaKFH.js";import{default as n}from"../packem_shared/MemorySuppressionStore-D_bge6rS.js";export{n as MemorySuppressionStore,a as buildListUnsubscribe,m as buildMtaStsPolicy,u as createSuppressionStore,x as filterSuppressed,o as parseArfReport,p as parseDmarcRecord,i as parseListUnsubscribe,c as parseMtaStsPolicy,b as parseTlsReport,d as parseTlsRptRecord};
@@ -1 +1 @@
1
- import{ALL_EVENTS as r,EventBus as t}from"../packem_shared/ALL_EVENTS-3kwh5CBE.js";import{default as f}from"../packem_shared/MemoryEventStore-CuhfO9aj.js";export{r as ALL_EVENTS,t as EventBus,f as MemoryEventStore};
1
+ import{ALL_EVENTS as r,EventBus as t}from"../packem_shared/ALL_EVENTS-CSpGgYbV.js";import{default as f}from"../packem_shared/MemoryEventStore-CuhfO9aj.js";export{r as ALL_EVENTS,t as EventBus,f as MemoryEventStore};
@@ -1 +1 @@
1
- import{defineInboundHandler as o,parseInbound as a}from"../packem_shared/defineInboundHandler-CnL2BzlL.js";import{default as d}from"../packem_shared/parseCloudflareInbound-C__j-oNa.js";import{default as t}from"../packem_shared/parseMailgunInbound-BpC6uPNe.js";import{default as f}from"../packem_shared/parsePostmarkInbound-Co3_c6-9.js";import{default as l}from"../packem_shared/parseSendGridInbound-DsALoijO.js";import{default as x}from"../packem_shared/parseSesInbound-CH5tHIjp.js";import{extractReply as I}from"../packem_shared/extractReply-BUjIBt9A.js";import{normalizeMessageId as c,normalizeSubject as S,stitchThreads as g}from"../packem_shared/normalizeMessageId-DAx2pGe2.js";import{parseAddress as z,parseAddressList as A,parseReferences as M}from"../packem_shared/parseAddress-DdbViBAJ.js";export{o as defineInboundHandler,I as extractReply,c as normalizeMessageId,S as normalizeSubject,z as parseAddress,A as parseAddressList,d as parseCloudflareInbound,a as parseInbound,t as parseMailgunInbound,f as parsePostmarkInbound,M as parseReferences,l as parseSendGridInbound,x as parseSesInbound,g as stitchThreads};
1
+ import{defineInboundHandler as o,parseInbound as a}from"../packem_shared/defineInboundHandler-CnYn10ex.js";import{default as d}from"../packem_shared/parseCloudflareInbound-BKZzk0De.js";import{default as t}from"../packem_shared/parseMailgunInbound-nY-DXZrK.js";import{default as f}from"../packem_shared/parsePostmarkInbound-0zG71J7F.js";import{default as l}from"../packem_shared/parseSendGridInbound-BzEhN-gd.js";import{default as x}from"../packem_shared/parseSesInbound-C4cRtAUq.js";import{extractReply as I}from"../packem_shared/extractReply-CLoWMY97.js";import{normalizeMessageId as c,normalizeSubject as S,stitchThreads as g}from"../packem_shared/normalizeMessageId-0yB1zeyC.js";import{parseAddress as z,parseAddressList as A,parseReferences as M}from"../packem_shared/parseAddress-DW9suGjV.js";export{o as defineInboundHandler,I as extractReply,c as normalizeMessageId,S as normalizeSubject,z as parseAddress,A as parseAddressList,d as parseCloudflareInbound,a as parseInbound,t as parseMailgunInbound,f as parsePostmarkInbound,M as parseReferences,l as parseSendGridInbound,x as parseSesInbound,g as stitchThreads};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { type A as AttachmentDataOptions, type a as AttachmentOptions, type B as BatchBase, type b as BatchRenderer, D as DraftMailMessage, type F as FeatureCheckMode, M as Mail, type c as MailGlobalConfig, d as MailMessage, type e as MailOptions, type P as Personalization, type S as SendBatchOptions, type f as SendableMessage, g as createMail, h as detectMimeType, i as generateContentId, r as readFileAsBuffer } from "./packem_shared/mail.d-B9JyPxzq.js";
1
+ export { type A as AttachmentDataOptions, type a as AttachmentOptions, type B as BatchBase, type b as BatchRenderer, D as DraftMailMessage, type F as FeatureCheckMode, M as Mail, type c as MailGlobalConfig, d as MailMessage, type e as MailOptions, type P as Personalization, type S as SendBatchOptions, type f as SendableMessage, g as createMail, h as detectMimeType, i as generateContentId, r as readFileAsBuffer } from "./packem_shared/mail.d-BdyyyQO5.js";
2
2
  export type { M as Middleware, S as SendFunction } from "./packem_shared/types.d-GKqPNk0I.js";
3
3
  export { type a as Provider, type P as ProviderFactory, d as defineProvider } from "./packem_shared/provider.d-Cx5YQJdP.js";
4
4
  export type { T as TemplateRenderer } from "./packem_shared/types.d-I-KeZ5w2.js";
@@ -8,8 +8,7 @@ export { type OkResult, isErr, isOk, mapOk, tryAsync, unwrap, unwrapOr } from ".
8
8
  export { type FeatureSupportResult, type FeatureViolation, default as checkFeatureSupport } from "./utils/validation/check-feature-support.js";
9
9
  import 'ical-generator';
10
10
  import 'node:buffer';
11
- import 'node:crypto';
12
- import "./packem_shared/types.d-B0t3PQ3t.js";
11
+ import "./packem_shared/types.d-Cb5fls_X.js";
13
12
  interface ErrorProperties {
14
13
  cause?: unknown;
15
14
  hint?: ErrorHint;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{detectMimeType as a,generateContentId as t,readFileAsBuffer as o}from"./packem_shared/detectMimeType-B9_7ujpC.js";import{default as p}from"./packem_shared/DraftMailMessage-BgP1OF1G.js";import{default as m}from"./packem_shared/EmailError-2CCyVX1S.js";import{default as l}from"./packem_shared/RequiredOptionError-BmpC5whN.js";import{Mail as u,createMail as x}from"./packem_shared/Mail-DduRntbB.js";import{default as M}from"./packem_shared/MailMessage-BRBT4Jea.js";import{defineProvider as E}from"./packem_shared/defineProvider-C9q-7iwt.js";import{default as g}from"./utils/parse-eml.js";import{isErr as y,isOk as w,mapOk as A,tryAsync as F,unwrap as h,unwrapOr as q}from"./utils/result.js";import{default as B}from"./utils/validation/check-feature-support.js";export{p as DraftMailMessage,m as EmailError,u as Mail,M as MailMessage,l as RequiredOptionError,B as checkFeatureSupport,x as createMail,E as defineProvider,a as detectMimeType,t as generateContentId,y as isErr,w as isOk,A as mapOk,g as parseEml,o as readFileAsBuffer,F as tryAsync,h as unwrap,q as unwrapOr};
1
+ import{detectMimeType as a,generateContentId as t,readFileAsBuffer as o}from"./packem_shared/detectMimeType-BRz3Qjyz.js";import{default as p}from"./packem_shared/DraftMailMessage-B0gwf8n_.js";import{default as m}from"./packem_shared/EmailError-BIaHK1Uw.js";import{default as l}from"./packem_shared/RequiredOptionError-ctDEEB1s.js";import{Mail as u,createMail as x}from"./packem_shared/Mail-DmYNQ0KK.js";import{default as M}from"./packem_shared/MailMessage-DmmaNHHc.js";import{defineProvider as E}from"./packem_shared/defineProvider-C9q-7iwt.js";import{default as g}from"./utils/parse-eml.js";import{isErr as y,isOk as w,mapOk as A,tryAsync as F,unwrap as h,unwrapOr as q}from"./utils/result.js";import{default as B}from"./utils/validation/check-feature-support.js";export{p as DraftMailMessage,m as EmailError,u as Mail,M as MailMessage,l as RequiredOptionError,B as checkFeatureSupport,x as createMail,E as defineProvider,a as detectMimeType,t as generateContentId,y as isErr,w as isOk,A as mapOk,g as parseEml,o as readFileAsBuffer,F as tryAsync,h as unwrap,q as unwrapOr};
@@ -177,8 +177,16 @@ interface OAuth2MiddlewareOptions {
177
177
  */
178
178
  fetchToken: () => Promise<OAuth2Token> | OAuth2Token;
179
179
  /**
180
- * The header to inject the credential into.
181
- * @default "Authorization"
180
+ * Inject the credential into this **message** header.
181
+ *
182
+ * `EmailOptions.headers` are MIME headers written onto the outgoing message (see
183
+ * `buildMimeMessage`), so every recipient — and every hop — sees this value. Providers
184
+ * authenticate over their own transport (`apiKey` in the HTTP request, SMTP XOAUTH2), never
185
+ * from here, so there is no legitimate reason to set this to `Authorization`.
186
+ *
187
+ * Leave it unset unless a provider genuinely requires a custom credential header on the
188
+ * message itself. Use {@link OAuth2MiddlewareOptions.onToken} instead.
189
+ * @default undefined — no header is injected
182
190
  */
183
191
  headerName?: string;
184
192
  /**
@@ -203,13 +211,18 @@ interface OAuth2MiddlewareOptions {
203
211
  skewMs?: number;
204
212
  }
205
213
  /**
206
- * Injects an OAuth2 bearer credential into each outgoing message, refreshing it on demand and caching
207
- * it until just before expiry.
214
+ * Acquires an OAuth2 credential for each outgoing message, refreshing it on demand and caching it
215
+ * until just before expiry.
208
216
  *
209
- * Supplies the token to provider clients (Gmail, Microsoft 365) either via a request header or the
210
- * {@link OAuth2MiddlewareOptions.onToken} callback (for SMTP XOAUTH2).
217
+ * The token is handed to the caller through {@link OAuth2MiddlewareOptions.onToken} the channel
218
+ * provider clients (Gmail, Microsoft 365, SMTP XOAUTH2) authenticate from. It is **not** written
219
+ * onto the message unless {@link OAuth2MiddlewareOptions.headerName} is set explicitly, because
220
+ * `EmailOptions.headers` are MIME headers the recipient can read.
211
221
  * @param options OAuth2 configuration. See {@link OAuth2MiddlewareOptions}.
212
222
  * @returns The middleware.
223
+ * @throws {TypeError} If neither `onToken` nor `headerName` is supplied — the token would have
224
+ * nowhere to go and the middleware would silently do nothing but burn token-endpoint calls — or if
225
+ * `headerName` is empty.
213
226
  */
214
227
  declare const oauth2Middleware: (options: OAuth2MiddlewareOptions) => Middleware;
215
228
  /**
@@ -1 +1 @@
1
- import{circuitBreakerMiddleware as o}from"../packem_shared/circuitBreakerMiddleware-BSCPR72q.js";import{dedupeMiddleware as i}from"../packem_shared/dedupeMiddleware-CYYI_O7S.js";import{withEvents as p}from"../packem_shared/withEvents-CytsykaK.js";import{loggingMiddleware as f}from"../packem_shared/loggingMiddleware-CZIiVMVp.js";import{withMetrics as w}from"../packem_shared/withMetrics-DWywX_6M.js";import{oauth2Middleware as l}from"../packem_shared/oauth2Middleware-DQh-hIkv.js";import{RATE_LIMIT_PRESETS as h,rateLimitMiddleware as s}from"../packem_shared/RATE_LIMIT_PRESETS-BPADLgcA.js";import{default as c}from"../packem_shared/withRender-VP9wE5Yr.js";import{retryMiddleware as E}from"../packem_shared/retryMiddleware-DbViDX4r.js";import{withSuppression as g}from"../packem_shared/withSuppression-wDl4NTb-.js";import{withTelemetry as S}from"../packem_shared/withTelemetry-DL2qo0Hp.js";import{composeMiddleware as I}from"../packem_shared/composeMiddleware-BHwLLEzK.js";export{h as RATE_LIMIT_PRESETS,o as circuitBreakerMiddleware,I as composeMiddleware,i as dedupeMiddleware,f as loggingMiddleware,l as oauth2Middleware,s as rateLimitMiddleware,E as retryMiddleware,p as withEvents,w as withMetrics,c as withRender,g as withSuppression,S as withTelemetry};
1
+ import{circuitBreakerMiddleware as o}from"../packem_shared/circuitBreakerMiddleware-DcBN7K6H.js";import{dedupeMiddleware as i}from"../packem_shared/dedupeMiddleware-BTo8Qjje.js";import{withEvents as p}from"../packem_shared/withEvents-BinK2hMw.js";import{loggingMiddleware as f}from"../packem_shared/loggingMiddleware-DNVf8O1B.js";import{withMetrics as w}from"../packem_shared/withMetrics-i3mZVfeE.js";import{oauth2Middleware as l}from"../packem_shared/oauth2Middleware-C0M1w3_2.js";import{RATE_LIMIT_PRESETS as h,rateLimitMiddleware as s}from"../packem_shared/RATE_LIMIT_PRESETS-BIFmRuh2.js";import{default as c}from"../packem_shared/withRender-Ce6leoYE.js";import{retryMiddleware as E}from"../packem_shared/retryMiddleware-CaTv0UIm.js";import{withSuppression as g}from"../packem_shared/withSuppression-B0eZ2xNQ.js";import{withTelemetry as S}from"../packem_shared/withTelemetry-DEKTis1I.js";import{composeMiddleware as I}from"../packem_shared/composeMiddleware-B3RCDFsy.js";export{h as RATE_LIMIT_PRESETS,o as circuitBreakerMiddleware,I as composeMiddleware,i as dedupeMiddleware,f as loggingMiddleware,l as oauth2Middleware,s as rateLimitMiddleware,E as retryMiddleware,p as withEvents,w as withMetrics,c as withRender,g as withSuppression,S as withTelemetry};