backend-manager 5.12.0 → 5.13.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/docs/email-system.md +4 -2
- package/package.json +1 -1
- package/src/manager/functions/core/actions/api/admin/send-email.js +0 -8
- package/src/manager/libraries/email/data/disposable-domains.json +246 -1
- package/src/manager/libraries/email/generators/lib/templates/plain.js +1 -2
- package/src/manager/libraries/email/prepare.js +3 -12
- package/src/manager/routes/user/signup/post.js +10 -28
- package/src/test/fixtures/firebase-project/.temp/newsletter/run-2026-08-05T01-21-40/metadata.json +14 -0
- package/src/test/fixtures/firebase-project/.temp/newsletter/run-2026-08-05T01-21-40/newsletter.html +486 -0
- package/src/test/fixtures/firebase-project/.temp/newsletter/run-2026-08-05T01-21-40/newsletter.md +41 -0
- package/src/test/fixtures/firebase-project/.temp/newsletter/run-2026-08-05T01-21-40/newsletter.mjml +97 -0
- package/src/test/fixtures/firebase-project/.temp/newsletter/run-2026-08-05T01-21-40/structure.json +42 -0
- package/src/test/fixtures/firebase-project/.temp/newsletter/run-2026-08-05T01-21-40/summary.md +1 -0
- package/src/test/fixtures/firebase-project/.temp/test-mode.json +1 -1
- package/src/test/fixtures/firebase-project/database-debug.log +8 -8
- package/src/test/fixtures/firebase-project/firestore-debug.log +61 -55
- package/src/test/fixtures/firebase-project/pubsub-debug.log +3 -3
package/docs/email-system.md
CHANGED
|
@@ -33,7 +33,7 @@ Both transactional and marketing paths share the same preparation layer:
|
|
|
33
33
|
| `resolveBrand(Manager)` | Clones brand config, sanitizes images (SVG→PNG via CDN naming) |
|
|
34
34
|
| `resolveSender({ sender, from, group }, brand, brandDomain)` | Resolves sender from/display-name/ASM group by category key |
|
|
35
35
|
| `renderContent({ content, html }, utmOptions)` | Markdown→HTML via markdown-it, applies UTM link tagging |
|
|
36
|
-
| `resolveSignoff(signoff)` |
|
|
36
|
+
| `resolveSignoff(signoff)` | Defaults `type` to `'team'`; personal signoffs render only with caller-provided details (name/image/url) — no built-in personal defaults |
|
|
37
37
|
| `buildCategories(type, brandId, extra)` | Builds categories array: `['transactional', brandId, ...extra]` |
|
|
38
38
|
| `buildUnsubscribeUrl({ email, groupId, template, websiteUrl })` | HMAC-signed one-click unsubscribe URL |
|
|
39
39
|
| `buildTemplateData({ brand, subject, ... })` | Deep-merges system defaults with caller data into the template data tree |
|
|
@@ -96,11 +96,13 @@ await email.send({
|
|
|
96
96
|
categories: ['account/welcome'],
|
|
97
97
|
data: {
|
|
98
98
|
content: { title: 'Welcome!', message: '# Hello!\n\nMarkdown here.' },
|
|
99
|
-
signoff: { type: 'personal' },
|
|
99
|
+
signoff: { type: 'personal', name: 'Jane Doe, CEO', image: 'https://cdn.example.com/headshot.jpg', url: 'https://example.com', urlText: '@janedoe' },
|
|
100
100
|
},
|
|
101
101
|
});
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
A `personal` signoff without a `name` falls back to the team rendering — there are no built-in personal defaults.
|
|
105
|
+
|
|
104
106
|
### Per-template `data.content` shapes
|
|
105
107
|
|
|
106
108
|
| Template | `data.content` fields |
|
package/package.json
CHANGED
|
@@ -171,14 +171,6 @@ Module.prototype.defaultize = function () {
|
|
|
171
171
|
email.dynamicTemplateData.signoff = options?.data?.signoff || {};
|
|
172
172
|
email.dynamicTemplateData.signoff.type = options?.data?.signoff?.type || 'team';
|
|
173
173
|
|
|
174
|
-
if (email.dynamicTemplateData.signoff.type === 'personal') {
|
|
175
|
-
email.dynamicTemplateData.signoff.image = options?.data?.signoff?.image
|
|
176
|
-
|| 'https://cdn.itwcreativeworks.com/assets/ian-wiedenman/images/website/ian-wiedenman-headshot-2021-color-1024x1024.jpg';
|
|
177
|
-
email.dynamicTemplateData.signoff.name = options?.data?.signoff?.name || 'Ian Wiedenman, CEO';
|
|
178
|
-
email.dynamicTemplateData.signoff.url = options?.data?.signoff?.url || 'https://ianwiedenman.com';
|
|
179
|
-
email.dynamicTemplateData.signoff.urlText = options?.data?.signoff?.urlText || '@ianwieds';
|
|
180
|
-
}
|
|
181
|
-
|
|
182
174
|
email.dynamicTemplateData.user = Manager.User(options.user).properties;
|
|
183
175
|
|
|
184
176
|
// Get brand configuration from Manager.config.brand (backend-manager-config.json)
|