@beignet/provider-mail-resend 0.0.48 → 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 +15 -0
- package/README.md +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -14
- package/package.json +3 -3
- package/src/index.ts +8 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
11
|
+
## 0.0.49
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- e597d53: Require Node.js 22.12 or newer across every Beignet package, generated app,
|
|
16
|
+
and documented workflow.
|
|
17
|
+
|
|
3
18
|
## 0.0.48
|
|
4
19
|
|
|
5
20
|
## 0.0.47
|
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @beignet/provider-mail-resend
|
|
2
2
|
|
|
3
|
+
> **Runtime:** Beignet requires Node.js 22.12 or newer. Bun 1.3.14 or newer is
|
|
4
|
+
> supported for Beignet commands.
|
|
5
|
+
|
|
3
6
|
> [!CAUTION]
|
|
4
7
|
> Beignet is experimental alpha software. The `0.0.x` package line is for early
|
|
5
8
|
> evaluation, and APIs may change between releases while the framework settles.
|
|
@@ -19,8 +22,8 @@ internal.
|
|
|
19
22
|
bun add @beignet/provider-mail-resend @beignet/core resend
|
|
20
23
|
```
|
|
21
24
|
|
|
22
|
-
The provider supports `resend` `^2`, `^3`, `^4`, and `^6`.
|
|
23
|
-
|
|
25
|
+
The provider supports `resend` `^2`, `^3`, `^4`, and `^6`. Beignet's Node.js
|
|
26
|
+
22.12-or-newer runtime baseline also satisfies Resend v6's requirement.
|
|
24
27
|
|
|
25
28
|
## Setup
|
|
26
29
|
|
|
@@ -116,7 +119,9 @@ The provider contributes:
|
|
|
116
119
|
|
|
117
120
|
When `ctx.ports.devtools` is installed, this provider records `mail.send`,
|
|
118
121
|
`mail.sent`, and `mail.failed` events under the `mail` watcher. Completed and
|
|
119
|
-
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.
|
|
120
125
|
|
|
121
126
|
## Failure and retry semantics
|
|
122
127
|
|
|
@@ -127,8 +132,9 @@ delivered, so a blind provider retry risks duplicate emails.
|
|
|
127
132
|
|
|
128
133
|
Delivery failures throw `MailDeliveryError` from `@beignet/core/mail` with the
|
|
129
134
|
provider name, the recipient count, and the original Resend error preserved as
|
|
130
|
-
`cause
|
|
131
|
-
|
|
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.
|
|
132
138
|
|
|
133
139
|
When mail needs retries, dispatch it from a job or an outbox-backed listener
|
|
134
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;IA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AAE,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,UAAU,CAsFxC;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
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beignet/provider-mail-resend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Resend mail provider for Beignet - adds mailer port using Resend",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
|
-
"node": ">=
|
|
54
|
+
"node": ">=22.12.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@beignet/core": ">=0.0.3 <1.0.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@beignet/core": "*",
|
|
65
65
|
"@beignet/devtools": "*",
|
|
66
66
|
"@types/bun": "^1.3.13",
|
|
67
|
-
"@types/node": "^
|
|
67
|
+
"@types/node": "^22.0.0",
|
|
68
68
|
"resend": "^6.14.0",
|
|
69
69
|
"typescript": "^5.3.0"
|
|
70
70
|
},
|
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
|
});
|