@beignet/provider-mail-resend 0.0.42 → 0.0.44

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @beignet/provider-mail-resend
2
2
 
3
+ ## 0.0.44
4
+
5
+ ## 0.0.43
6
+
7
+ ### Patch Changes
8
+
9
+ - 19b9c52: Modernize generated Zod and Drizzle syntax, flush Pino logs during provider shutdown, strengthen shared credential redaction, add mail operation durations, and correct copied documentation examples.
10
+
3
11
  ## 0.0.42
4
12
 
5
13
  ## 0.0.41
package/README.md CHANGED
@@ -115,7 +115,8 @@ The provider contributes:
115
115
  ## Devtools
116
116
 
117
117
  When `ctx.ports.devtools` is installed, this provider records `mail.send`,
118
- `mail.sent`, and `mail.failed` events under the `mail` watcher.
118
+ `mail.sent`, and `mail.failed` events under the `mail` watcher. Completed and
119
+ failed events include `durationMs` in their details.
119
120
 
120
121
  ## Failure and retry semantics
121
122
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,WAAW,EAEhB,KAAK,UAAU,EAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,uBAAuB,EAG5B,KAAK,6BAA6B,EAClC,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAA2B,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQzD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OA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M,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAC9C,OAAO,EACP,uBAAuB,CAAC,gBAAgB,CAAC,EACzC,IAAI,CAAC,uBAAuB,EAAE,MAAM,uBAAuB,CAAC,CAC7D,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,6BAA6B,CAAC;CACjD;AA2DD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,EACJ,eAAe,EAAE,qBAAqB,GACvC,EAAE,yBAAyB,GAAG,UAAU,CA4FxC;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CA0CpB"}
package/dist/index.js CHANGED
@@ -54,6 +54,7 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
54
54
  });
55
55
  return {
56
56
  async send(message) {
57
+ const startedAt = Date.now();
57
58
  const payload = createResendPayload(message, from);
58
59
  const recipientCount = countRecipients(message);
59
60
  instrumentation.custom({
@@ -78,6 +79,7 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
78
79
  subject: message.subject,
79
80
  to: payload.to,
80
81
  error: result.error.message,
82
+ durationMs: Date.now() - startedAt,
81
83
  },
82
84
  });
83
85
  throw new MailDeliveryError({
@@ -95,6 +97,7 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
95
97
  subject: message.subject,
96
98
  to: payload.to,
97
99
  id: result.data?.id,
100
+ durationMs: Date.now() - startedAt,
98
101
  },
99
102
  });
100
103
  return {
@@ -115,6 +118,7 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
115
118
  subject: message.subject,
116
119
  to: payload.to,
117
120
  error: error instanceof Error ? error.message : String(error),
121
+ durationMs: Date.now() - startedAt,
118
122
  },
119
123
  });
120
124
  throw new MailDeliveryError({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beignet/provider-mail-resend",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "type": "module",
5
5
  "description": "Resend mail provider for Beignet - adds mailer port using Resend",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -163,6 +163,7 @@ export function createResendMailer({
163
163
 
164
164
  return {
165
165
  async send(message): Promise<SendMailResult> {
166
+ const startedAt = Date.now();
166
167
  const payload = createResendPayload(message, from);
167
168
  const recipientCount = countRecipients(message);
168
169
  instrumentation.custom({
@@ -189,6 +190,7 @@ export function createResendMailer({
189
190
  subject: message.subject,
190
191
  to: payload.to,
191
192
  error: result.error.message,
193
+ durationMs: Date.now() - startedAt,
192
194
  },
193
195
  });
194
196
  throw new MailDeliveryError({
@@ -209,6 +211,7 @@ export function createResendMailer({
209
211
  subject: message.subject,
210
212
  to: payload.to,
211
213
  id: result.data?.id,
214
+ durationMs: Date.now() - startedAt,
212
215
  },
213
216
  });
214
217
 
@@ -230,6 +233,7 @@ export function createResendMailer({
230
233
  subject: message.subject,
231
234
  to: payload.to,
232
235
  error: error instanceof Error ? error.message : String(error),
236
+ durationMs: Date.now() - startedAt,
233
237
  },
234
238
  });
235
239