Commit Graph

3 Commits

Author SHA1 Message Date
Naz
32e42ae276 Added more precise JSDoc to email content generator
refs https://github.com/TryGhost/Toolbox/issues/292

- Provided better type checking/suggestions
2022-05-05 12:17:30 +08:00
Naz
ca693f79f8 Reworked EmailContentGenerator to async/await
refs https://github.com/TryGhost/Toolbox/issues/292

- Makes the code more readable
2022-05-04 17:16:43 +08:00
Naz
0c2cc2af8a Refactored email utils to a class with DI params
refs https://github.com/TryGhost/Toolbox/issues/292

- There's a need to reuse these utils in the version mismatch notification service. Having loads of tightly coupled dependencies makes it super hard to rip out this module for reuse
- It's a groundwork for extraction of the email-utils package
- Rewrote the unit tests that were written for these utils previously - they weren't testing anything useful. The goal of this util is to generate specific content based on provided data and available templates - now the tests do test those specific things, not the mailer itself!
2022-05-04 17:16:43 +08:00