@backstage/plugin-notifications-backend-module-email 0.0.0-nightly-20240730021827 → 0.0.0-nightly-20240731020649

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +64 -4
  2. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @backstage/plugin-notifications-backend-module-email
2
2
 
3
- ## 0.0.0-nightly-20240730021827
3
+ ## 0.0.0-nightly-20240731020649
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -50,15 +50,75 @@
50
50
  ### Patch Changes
51
51
 
52
52
  - Updated dependencies
53
- - @backstage/backend-common@0.0.0-nightly-20240730021827
54
- - @backstage/backend-plugin-api@0.0.0-nightly-20240730021827
53
+ - @backstage/backend-common@0.0.0-nightly-20240731020649
54
+ - @backstage/backend-plugin-api@0.0.0-nightly-20240731020649
55
55
  - @backstage/catalog-client@1.6.5
56
56
  - @backstage/catalog-model@1.5.0
57
57
  - @backstage/config@1.2.0
58
58
  - @backstage/integration-aws-node@0.1.12
59
59
  - @backstage/types@1.1.1
60
60
  - @backstage/plugin-notifications-common@0.0.5
61
- - @backstage/plugin-notifications-node@0.0.0-nightly-20240730021827
61
+ - @backstage/plugin-notifications-node@0.0.0-nightly-20240731020649
62
+
63
+ ## 0.2.0-next.1
64
+
65
+ ### Minor Changes
66
+
67
+ - def53a7: **BREAKING** Following `NotificationTemplateRenderer` methods now return a Promise and **must** be awaited: `getSubject`, `getText` and `getHtml`.
68
+
69
+ Required changes and example usage:
70
+
71
+ ```diff
72
+ import { notificationsEmailTemplateExtensionPoint } from '@backstage/plugin-notifications-backend-module-email';
73
+ import { Notification } from '@backstage/plugin-notifications-common';
74
+ +import { getNotificationSubject, getNotificationTextContent, getNotificationHtmlContent } from 'my-notification-processing-library`
75
+ export const notificationsModuleEmailDecorator = createBackendModule({
76
+ pluginId: 'notifications',
77
+ moduleId: 'email.templates',
78
+ register(reg) {
79
+ reg.registerInit({
80
+ deps: {
81
+ emailTemplates: notificationsEmailTemplateExtensionPoint,
82
+ },
83
+ async init({ emailTemplates }) {
84
+ emailTemplates.setTemplateRenderer({
85
+ - getSubject(notification) {
86
+ + async getSubject(notification) {
87
+ - return `New notification from ${notification.source}`;
88
+ + const subject = await getNotificationSubject(notification);
89
+ + return `New notification from ${subject}`;
90
+ },
91
+ - getText(notification) {
92
+ + async getText(notification) {
93
+ - return notification.content;
94
+ + const text = await getNotificationTextContent(notification);
95
+ + return text;
96
+ },
97
+ - getHtml(notification) {
98
+ + async getHtml(notification) {
99
+ - return `<p>${notification.content}</p>`;
100
+ + const html = await getNotificationHtmlContent(notification);
101
+ + return html;
102
+ },
103
+ });
104
+ },
105
+ });
106
+ },
107
+ });
108
+ ```
109
+
110
+ ### Patch Changes
111
+
112
+ - Updated dependencies
113
+ - @backstage/backend-plugin-api@0.7.1-next.1
114
+ - @backstage/backend-common@0.23.4-next.1
115
+ - @backstage/integration-aws-node@0.1.12
116
+ - @backstage/catalog-client@1.6.5
117
+ - @backstage/catalog-model@1.5.0
118
+ - @backstage/config@1.2.0
119
+ - @backstage/types@1.1.1
120
+ - @backstage/plugin-notifications-common@0.0.5
121
+ - @backstage/plugin-notifications-node@0.2.4-next.1
62
122
 
63
123
  ## 0.1.4-next.0
64
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-notifications-backend-module-email",
3
- "version": "0.0.0-nightly-20240730021827",
3
+ "version": "0.0.0-nightly-20240731020649",
4
4
  "description": "The email backend module for the notifications plugin.",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -36,22 +36,22 @@
36
36
  "dependencies": {
37
37
  "@aws-sdk/client-ses": "^3.550.0",
38
38
  "@aws-sdk/types": "^3.347.0",
39
- "@backstage/backend-common": "^0.0.0-nightly-20240730021827",
40
- "@backstage/backend-plugin-api": "^0.0.0-nightly-20240730021827",
39
+ "@backstage/backend-common": "^0.0.0-nightly-20240731020649",
40
+ "@backstage/backend-plugin-api": "^0.0.0-nightly-20240731020649",
41
41
  "@backstage/catalog-client": "^1.6.5",
42
42
  "@backstage/catalog-model": "^1.5.0",
43
43
  "@backstage/config": "^1.2.0",
44
44
  "@backstage/integration-aws-node": "^0.1.12",
45
45
  "@backstage/plugin-notifications-common": "^0.0.5",
46
- "@backstage/plugin-notifications-node": "^0.0.0-nightly-20240730021827",
46
+ "@backstage/plugin-notifications-node": "^0.0.0-nightly-20240731020649",
47
47
  "@backstage/types": "^1.1.1",
48
48
  "lodash": "^4.17.21",
49
49
  "nodemailer": "^6.9.13",
50
50
  "p-throttle": "^4.1.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@backstage/backend-test-utils": "^0.0.0-nightly-20240730021827",
54
- "@backstage/cli": "^0.0.0-nightly-20240730021827",
53
+ "@backstage/backend-test-utils": "^0.0.0-nightly-20240731020649",
54
+ "@backstage/cli": "^0.0.0-nightly-20240731020649",
55
55
  "@types/nodemailer": "^6.4.14"
56
56
  },
57
57
  "configSchema": "config.d.ts"