@beignet/provider-mail-resend 0.0.49 → 0.0.50
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 +8 -0
- package/README.md +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -14
- package/package.json +1 -1
- package/src/index.ts +8 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @beignet/provider-mail-resend
|
|
2
2
|
|
|
3
|
+
## 0.0.50
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4be4573: Keep mail content out of provider instrumentation, document the Redis
|
|
8
|
+
deployment policy required for monotonic fencing, and align generated agent
|
|
9
|
+
guidance with optional seed, worker, and migration paths.
|
|
10
|
+
|
|
3
11
|
## 0.0.49
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -119,7 +119,9 @@ The provider contributes:
|
|
|
119
119
|
|
|
120
120
|
When `ctx.ports.devtools` is installed, this provider records `mail.send`,
|
|
121
121
|
`mail.sent`, and `mail.failed` events under the `mail` watcher. Completed and
|
|
122
|
-
failed events include `durationMs` in their details.
|
|
122
|
+
failed events include `durationMs` in their details. Events retain the provider,
|
|
123
|
+
recipient count, delivery ID when available, and duration, but never include
|
|
124
|
+
addresses, subjects, message bodies, or raw Resend errors.
|
|
123
125
|
|
|
124
126
|
## Failure and retry semantics
|
|
125
127
|
|
|
@@ -130,8 +132,9 @@ delivered, so a blind provider retry risks duplicate emails.
|
|
|
130
132
|
|
|
131
133
|
Delivery failures throw `MailDeliveryError` from `@beignet/core/mail` with the
|
|
132
134
|
provider name, the recipient count, and the original Resend error preserved as
|
|
133
|
-
`cause
|
|
134
|
-
|
|
135
|
+
`cause` for app-owned handling. The error is not copied into provider
|
|
136
|
+
instrumentation. Redact or restrict access when an application logs the cause.
|
|
137
|
+
Startup configuration problems throw during provider setup.
|
|
135
138
|
|
|
136
139
|
When mail needs retries, dispatch it from a job or an outbox-backed listener
|
|
137
140
|
and own idempotency there. The job or outbox row should choose attempts and
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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;;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,U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AAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CA0CpB"}
|
package/dist/index.js
CHANGED
|
@@ -60,11 +60,10 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
|
|
|
60
60
|
instrumentation.custom({
|
|
61
61
|
name: "mail.send",
|
|
62
62
|
label: "Mail send",
|
|
63
|
-
summary:
|
|
63
|
+
summary: "Sending mail",
|
|
64
64
|
details: {
|
|
65
65
|
provider: "resend",
|
|
66
|
-
|
|
67
|
-
to: payload.to,
|
|
66
|
+
recipientCount,
|
|
68
67
|
},
|
|
69
68
|
});
|
|
70
69
|
try {
|
|
@@ -73,12 +72,10 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
|
|
|
73
72
|
instrumentation.custom({
|
|
74
73
|
name: "mail.failed",
|
|
75
74
|
label: "Mail failed",
|
|
76
|
-
summary:
|
|
75
|
+
summary: "Mail delivery failed",
|
|
77
76
|
details: {
|
|
78
77
|
provider: "resend",
|
|
79
|
-
|
|
80
|
-
to: payload.to,
|
|
81
|
-
error: result.error.message,
|
|
78
|
+
recipientCount,
|
|
82
79
|
durationMs: Date.now() - startedAt,
|
|
83
80
|
},
|
|
84
81
|
});
|
|
@@ -91,11 +88,10 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
|
|
|
91
88
|
instrumentation.custom({
|
|
92
89
|
name: "mail.sent",
|
|
93
90
|
label: "Mail sent",
|
|
94
|
-
summary:
|
|
91
|
+
summary: "Mail sent",
|
|
95
92
|
details: {
|
|
96
93
|
provider: "resend",
|
|
97
|
-
|
|
98
|
-
to: payload.to,
|
|
94
|
+
recipientCount,
|
|
99
95
|
id: result.data?.id,
|
|
100
96
|
durationMs: Date.now() - startedAt,
|
|
101
97
|
},
|
|
@@ -112,12 +108,10 @@ export function createResendMailer({ client, from, instrumentation: instrumentat
|
|
|
112
108
|
instrumentation.custom({
|
|
113
109
|
name: "mail.failed",
|
|
114
110
|
label: "Mail failed",
|
|
115
|
-
summary:
|
|
111
|
+
summary: "Mail delivery failed",
|
|
116
112
|
details: {
|
|
117
113
|
provider: "resend",
|
|
118
|
-
|
|
119
|
-
to: payload.to,
|
|
120
|
-
error: error instanceof Error ? error.message : String(error),
|
|
114
|
+
recipientCount,
|
|
121
115
|
durationMs: Date.now() - startedAt,
|
|
122
116
|
},
|
|
123
117
|
});
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -169,11 +169,10 @@ export function createResendMailer({
|
|
|
169
169
|
instrumentation.custom({
|
|
170
170
|
name: "mail.send",
|
|
171
171
|
label: "Mail send",
|
|
172
|
-
summary:
|
|
172
|
+
summary: "Sending mail",
|
|
173
173
|
details: {
|
|
174
174
|
provider: "resend",
|
|
175
|
-
|
|
176
|
-
to: payload.to,
|
|
175
|
+
recipientCount,
|
|
177
176
|
},
|
|
178
177
|
});
|
|
179
178
|
|
|
@@ -184,12 +183,10 @@ export function createResendMailer({
|
|
|
184
183
|
instrumentation.custom({
|
|
185
184
|
name: "mail.failed",
|
|
186
185
|
label: "Mail failed",
|
|
187
|
-
summary:
|
|
186
|
+
summary: "Mail delivery failed",
|
|
188
187
|
details: {
|
|
189
188
|
provider: "resend",
|
|
190
|
-
|
|
191
|
-
to: payload.to,
|
|
192
|
-
error: result.error.message,
|
|
189
|
+
recipientCount,
|
|
193
190
|
durationMs: Date.now() - startedAt,
|
|
194
191
|
},
|
|
195
192
|
});
|
|
@@ -205,11 +202,10 @@ export function createResendMailer({
|
|
|
205
202
|
instrumentation.custom({
|
|
206
203
|
name: "mail.sent",
|
|
207
204
|
label: "Mail sent",
|
|
208
|
-
summary:
|
|
205
|
+
summary: "Mail sent",
|
|
209
206
|
details: {
|
|
210
207
|
provider: "resend",
|
|
211
|
-
|
|
212
|
-
to: payload.to,
|
|
208
|
+
recipientCount,
|
|
213
209
|
id: result.data?.id,
|
|
214
210
|
durationMs: Date.now() - startedAt,
|
|
215
211
|
},
|
|
@@ -227,12 +223,10 @@ export function createResendMailer({
|
|
|
227
223
|
instrumentation.custom({
|
|
228
224
|
name: "mail.failed",
|
|
229
225
|
label: "Mail failed",
|
|
230
|
-
summary:
|
|
226
|
+
summary: "Mail delivery failed",
|
|
231
227
|
details: {
|
|
232
228
|
provider: "resend",
|
|
233
|
-
|
|
234
|
-
to: payload.to,
|
|
235
|
-
error: error instanceof Error ? error.message : String(error),
|
|
229
|
+
recipientCount,
|
|
236
230
|
durationMs: Date.now() - startedAt,
|
|
237
231
|
},
|
|
238
232
|
});
|