backend-manager 5.0.185 → 5.0.186
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 +4 -0
- package/TODO-2.md +16 -0
- package/TODO-email-auth.md +14 -0
- package/package.json +1 -1
- package/src/manager/libraries/email/transactional/index.js +24 -24
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
+
# [5.0.186] - 2026-04-01
|
|
18
|
+
### Fixed
|
|
19
|
+
- Move markdown rendering and UTM link tagging to run after `_.merge()` so caller overrides to `body.message` and `email.body` are properly processed
|
|
20
|
+
|
|
17
21
|
# [5.0.185] - 2026-04-01
|
|
18
22
|
### Changed
|
|
19
23
|
- Use `_.merge` for dynamic template data so callers can override any nested field (e.g. `email.preview`, `personalization.name`, `data.body.*`)
|
package/TODO-2.md
CHANGED
|
@@ -10,10 +10,26 @@ payments/reactivate
|
|
|
10
10
|
payments/upgrade
|
|
11
11
|
* takes a subscription id and a new plan id and upgrades the user's subscription to the new plan. this can only be done if the user has an active subscription.
|
|
12
12
|
|
|
13
|
+
I'd call that cancellation-reversed — it pairs naturally with the existing cancellation-requested transition and clearly communicates the action (they reversed/undid the pending cancellation).
|
|
14
|
+
|
|
15
|
+
on the email we send, for payment recovered what is the category
|
|
16
|
+
Let me check the handler.
|
|
17
|
+
|
|
18
|
+
Read payment-recovered.js
|
|
19
|
+
The category is order/payment-recovered (line 13).
|
|
20
|
+
|
|
21
|
+
TODO-2.md
|
|
22
|
+
waht about when they request a cancel
|
|
23
|
+
Read cancellation-requested.js
|
|
24
|
+
The category is order/cancellation-requested (line 13).
|
|
25
|
+
|
|
13
26
|
---
|
|
14
27
|
GHOSTII REVAMP
|
|
15
28
|
* better logic for generating posts. better model? claude?
|
|
16
29
|
|
|
30
|
+
---- MCP
|
|
31
|
+
* ability for consuming prjec to specify MCP functions
|
|
32
|
+
|
|
17
33
|
-------
|
|
18
34
|
UPSELL
|
|
19
35
|
* products in BEM can have an UPSELL where you link another product ID and it allows you to add it to your cart OR shows you after checkout?
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
https://github.com/disposable-email-domains/disposable-email-domains?tab=readme-ov-file
|
|
2
|
+
https://www.npmjs.com/package/disposable-domains
|
|
3
|
+
https://github.com/tompec/disposable-email-domains
|
|
4
|
+
|
|
5
|
+
Two repos:
|
|
6
|
+
|
|
7
|
+
Repo Domains Approach
|
|
8
|
+
disposable-email-domains/disposable-email-domains 5,359 Curated, conservative, high confidence
|
|
9
|
+
ivolo/disposable-email-domains 121,569 Aggressive, aggregated from many sources, more false positives
|
|
10
|
+
Our current list has 854 — so even the smaller curated list is 6x larger.
|
|
11
|
+
|
|
12
|
+
For our use case (currently only used to skip marketing sync, not blocking signups), I'd recommend the 5,359 curated list — it's comprehensive enough without being overly aggressive. And if we ever do use it for blocking signups, the false positive risk is much lower.
|
|
13
|
+
|
|
14
|
+
Want to swap to that one?
|
package/package.json
CHANGED
|
@@ -188,30 +188,6 @@ Transactional.prototype.build = async function (settings) {
|
|
|
188
188
|
signoff.urlText = signoff.urlText || '@ianwieds';
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
// Process markdown in body fields
|
|
192
|
-
if (settings?.data?.body?.message) {
|
|
193
|
-
settings.data.body.message = md.render(settings.data.body.message);
|
|
194
|
-
}
|
|
195
|
-
if (settings?.data?.email?.body) {
|
|
196
|
-
settings.data.email.body = md.render(settings.data.email.body);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Tag links with UTM params for attribution
|
|
200
|
-
const utmOptions = {
|
|
201
|
-
brandUrl: brand?.url,
|
|
202
|
-
brandId: brand?.id,
|
|
203
|
-
campaign: settings.sender || templateId,
|
|
204
|
-
type: 'transactional',
|
|
205
|
-
utm: settings.utm,
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
if (settings?.data?.body?.message) {
|
|
209
|
-
settings.data.body.message = tagLinks(settings.data.body.message, utmOptions);
|
|
210
|
-
}
|
|
211
|
-
if (settings?.data?.email?.body) {
|
|
212
|
-
settings.data.email.body = tagLinks(settings.data.email.body, utmOptions);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
191
|
// Build dynamic template data defaults
|
|
216
192
|
const dynamicTemplateData = {
|
|
217
193
|
email: {
|
|
@@ -242,6 +218,30 @@ Transactional.prototype.build = async function (settings) {
|
|
|
242
218
|
_.merge(dynamicTemplateData, settings.data);
|
|
243
219
|
}
|
|
244
220
|
|
|
221
|
+
// Process markdown in body fields (after merge so all data paths are resolved)
|
|
222
|
+
if (dynamicTemplateData.data?.body?.message) {
|
|
223
|
+
dynamicTemplateData.data.body.message = md.render(dynamicTemplateData.data.body.message);
|
|
224
|
+
}
|
|
225
|
+
if (dynamicTemplateData.email?.body) {
|
|
226
|
+
dynamicTemplateData.email.body = md.render(dynamicTemplateData.email.body);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Tag links with UTM params for attribution
|
|
230
|
+
const utmOptions = {
|
|
231
|
+
brandUrl: brand?.url,
|
|
232
|
+
brandId: brand?.id,
|
|
233
|
+
campaign: settings.sender || templateId,
|
|
234
|
+
type: 'transactional',
|
|
235
|
+
utm: settings.utm,
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
if (dynamicTemplateData.data?.body?.message) {
|
|
239
|
+
dynamicTemplateData.data.body.message = tagLinks(dynamicTemplateData.data.body.message, utmOptions);
|
|
240
|
+
}
|
|
241
|
+
if (dynamicTemplateData.email?.body) {
|
|
242
|
+
dynamicTemplateData.email.body = tagLinks(dynamicTemplateData.email.body, utmOptions);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
245
|
// Build the email object
|
|
246
246
|
const email = {
|
|
247
247
|
to,
|