fix: email processor esm issue with p-throttle + config read

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-05-02 08:11:35 +03:00
parent 32cc4e6468
commit d541ff686f
6 changed files with 23 additions and 13 deletions
@@ -45,7 +45,7 @@
"@backstage/types": "workspace:^",
"lodash": "^4.17.21",
"nodemailer": "^6.9.13",
"p-throttle": "^6.1.0"
"p-throttle": "^4.1.1"
},
"devDependencies": {
"@backstage/backend-test-utils": "workspace:^",
@@ -52,7 +52,7 @@ describe('NotificationsEmailProcessor', () => {
notifications: {
processors: {
email: {
transport: {
transportConfig: {
transport: 'smtp',
hostname: 'localhost',
port: 465,
@@ -98,7 +98,7 @@ describe('NotificationsEmailProcessor', () => {
notifications: {
processors: {
email: {
transport: {
transportConfig: {
transport: 'ses',
region: 'us-west-2',
},
@@ -138,7 +138,7 @@ describe('NotificationsEmailProcessor', () => {
notifications: {
processors: {
email: {
transport: {
transportConfig: {
transport: 'sendmail',
path: '/usr/local/bin/sendmail',
},
@@ -189,7 +189,7 @@ describe('NotificationsEmailProcessor', () => {
notifications: {
processors: {
email: {
transport: {
transportConfig: {
transport: 'sendmail',
path: '/usr/local/bin/sendmail',
},
@@ -246,7 +246,7 @@ describe('NotificationsEmailProcessor', () => {
notifications: {
processors: {
email: {
transport: {
transportConfig: {
transport: 'sendmail',
path: '/usr/local/bin/sendmail',
},
@@ -306,7 +306,7 @@ describe('NotificationsEmailProcessor', () => {
notifications: {
processors: {
email: {
transport: {
transportConfig: {
transport: 'sendmail',
path: '/usr/local/bin/sendmail',
},
@@ -62,7 +62,7 @@ export class NotificationsEmailProcessor implements NotificationProcessor {
const emailProcessorConfig = config.getConfig(
'notifications.processors.email',
);
this.transportConfig = emailProcessorConfig.getConfig('transport');
this.transportConfig = emailProcessorConfig.getConfig('transportConfig');
this.broadcastConfig =
emailProcessorConfig.getOptionalConfig('broadcastConfig');
this.sender = emailProcessorConfig.getString('sender');