@backstage/plugin-notifications-backend-module-email 0.3.4 → 0.3.5-next.1

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 (3) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +35 -4
  3. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @backstage/plugin-notifications-backend-module-email
2
2
 
3
+ ## 0.3.5-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/types@1.2.1-next.0
9
+ - @backstage/backend-plugin-api@1.1.1-next.1
10
+ - @backstage/catalog-model@1.7.3-next.0
11
+ - @backstage/config@1.3.2-next.0
12
+ - @backstage/plugin-catalog-node@1.15.1-next.1
13
+ - @backstage/integration-aws-node@0.1.15-next.0
14
+ - @backstage/plugin-notifications-node@0.2.11-next.1
15
+ - @backstage/catalog-client@1.9.1-next.0
16
+ - @backstage/plugin-notifications-common@0.0.8-next.0
17
+
18
+ ## 0.3.5-next.0
19
+
20
+ ### Patch Changes
21
+
22
+ - bed5f35: Added more examples of the plugin configuration
23
+ - Updated dependencies
24
+ - @backstage/backend-plugin-api@1.1.1-next.0
25
+ - @backstage/catalog-client@1.9.0
26
+ - @backstage/catalog-model@1.7.2
27
+ - @backstage/config@1.3.1
28
+ - @backstage/integration-aws-node@0.1.14
29
+ - @backstage/types@1.2.0
30
+ - @backstage/plugin-catalog-node@1.15.1-next.0
31
+ - @backstage/plugin-notifications-common@0.0.7
32
+ - @backstage/plugin-notifications-node@0.2.11-next.0
33
+
3
34
  ## 0.3.4
4
35
 
5
36
  ### Patch Changes
package/README.md CHANGED
@@ -24,13 +24,13 @@ export const notificationsModuleEmailDecorator = createBackendModule({
24
24
  },
25
25
  async init({ emailTemplates }) {
26
26
  emailTemplates.setTemplateRenderer({
27
- getSubject(notification) {
27
+ async getSubject(notification) {
28
28
  return `New notification from ${notification.source}`;
29
29
  },
30
- getText(notification) {
30
+ async getText(notification) {
31
31
  return notification.content;
32
32
  },
33
- getHtml(notification) {
33
+ async getHtml(notification) {
34
34
  return `<p>${notification.content}</p>`;
35
35
  },
36
36
  });
@@ -54,19 +54,50 @@ notifications:
54
54
  secure: false
55
55
  username: 'my-username'
56
56
  password: 'my-password'
57
+
58
+ # AWS SES
59
+ # transportConfig:
60
+ # transport: 'ses'
61
+ # accessKeyId: 'my-access-key
62
+ # region: 'us-west-2'
63
+
64
+ # sendmail
65
+ # transportConfig:
66
+ # transport: 'sendmail'
67
+ # path: '/usr/sbin/sendmail'
68
+ # newline: 'unix'
69
+
57
70
  # The email sender address
58
71
  sender: 'sender@mycompany.com'
59
72
  replyTo: 'no-reply@mycompany.com'
60
- # Who to get email for broadcast notifications
73
+ # Who to send email for broadcast notifications
61
74
  broadcastConfig:
62
75
  receiver: 'users'
63
76
  # How many emails to send concurrently, defaults to 2
64
77
  concurrencyLimit: 10
78
+ # How much to throttle between emails, defaults to 100ms
79
+ throttleInterval:
80
+ seconds: 60
65
81
  # Cache configuration for email addresses
66
82
  # This is to prevent unnecessary calls to the catalog
67
83
  cache:
68
84
  ttl:
69
85
  days: 1
86
+ # Notification filter which this processor will handle
87
+ filter:
88
+ # Minimum severity of the notification to send email
89
+ minSeverity: high
90
+ # Maximum severity of the notification to send email
91
+ maxSeverity: critical
92
+ # Topics that are excluded from sending email
93
+ excludedTopics:
94
+ - scaffolder
95
+ # List of allowed email addresses to get notifications via email
96
+ allowlistEmailAddresses:
97
+ - john.doe@backstage.io
98
+ # List of denied email addresses to get notifications via email
99
+ denylistEmailAddresses:
100
+ - jane.doe@backstage.io
70
101
  ```
71
102
 
72
103
  See `config.d.ts` for more options for configuration.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-notifications-backend-module-email",
3
- "version": "0.3.4",
3
+ "version": "0.3.5-next.1",
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-plugin-api": "^1.1.0",
40
- "@backstage/catalog-client": "^1.9.0",
41
- "@backstage/catalog-model": "^1.7.2",
42
- "@backstage/config": "^1.3.1",
43
- "@backstage/integration-aws-node": "^0.1.14",
44
- "@backstage/plugin-catalog-node": "^1.15.0",
45
- "@backstage/plugin-notifications-common": "^0.0.7",
46
- "@backstage/plugin-notifications-node": "^0.2.10",
47
- "@backstage/types": "^1.2.0",
39
+ "@backstage/backend-plugin-api": "1.1.1-next.1",
40
+ "@backstage/catalog-client": "1.9.1-next.0",
41
+ "@backstage/catalog-model": "1.7.3-next.0",
42
+ "@backstage/config": "1.3.2-next.0",
43
+ "@backstage/integration-aws-node": "0.1.15-next.0",
44
+ "@backstage/plugin-catalog-node": "1.15.1-next.1",
45
+ "@backstage/plugin-notifications-common": "0.0.8-next.0",
46
+ "@backstage/plugin-notifications-node": "0.2.11-next.1",
47
+ "@backstage/types": "1.2.1-next.0",
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": "^1.2.0",
54
- "@backstage/cli": "^0.29.4",
53
+ "@backstage/backend-test-utils": "1.2.1-next.1",
54
+ "@backstage/cli": "0.29.5-next.1",
55
55
  "@types/nodemailer": "^6.4.14"
56
56
  },
57
57
  "configSchema": "config.d.ts",