@steve31415/baselib 3.33.1 → 3.34.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.
package/dist/email.d.ts CHANGED
@@ -15,6 +15,10 @@ export interface EmailMessage {
15
15
  text?: string;
16
16
  html?: string;
17
17
  attachments?: EmailAttachment[];
18
+ /** Extra message headers (`X-Coder-Task`, `In-Reply-To`, …), passed to
19
+ * Resend's `headers` field as given. Coder uses them so Radar can
20
+ * recognise and thread its task mail (2026-10-11). */
21
+ headers?: Record<string, string>;
18
22
  }
19
23
  export interface SendEmailResult {
20
24
  ok: boolean;
package/dist/email.js CHANGED
@@ -54,6 +54,7 @@ export async function sendEmail(msg, deps) {
54
54
  subject: msg.subject,
55
55
  ...(msg.text !== undefined ? { text: msg.text } : {}),
56
56
  ...(msg.html !== undefined ? { html: msg.html } : {}),
57
+ ...(msg.headers && Object.keys(msg.headers).length ? { headers: msg.headers } : {}),
57
58
  ...(msg.attachments?.length
58
59
  ? {
59
60
  attachments: msg.attachments.map((attachment) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steve31415/baselib",
3
- "version": "3.33.1",
3
+ "version": "3.34.0",
4
4
  "description": "Plasticine new-world shared platform library: logging, auth, service-to-service auth, db, HTTP, sync, app updates",
5
5
  "type": "module",
6
6
  "license": "MIT",