@backstage/plugin-notifications-backend-module-email 0.3.14 → 0.3.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @backstage/plugin-notifications-backend-module-email
2
2
 
3
+ ## 0.3.15
4
+
5
+ ### Patch Changes
6
+
7
+ - f577ae2: Updated `AWS SES` client to version 2 to support `nodemailer` version 7.
8
+
3
9
  ## 0.3.14
4
10
 
5
11
  ### Patch Changes
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
3
  var nodemailer = require('nodemailer');
4
- var clientSes = require('@aws-sdk/client-ses');
4
+ var clientSesv2 = require('@aws-sdk/client-sesv2');
5
5
 
6
6
  const createSesTransport = async (config, credentialsManager) => {
7
7
  const credentials = await credentialsManager.getCredentialProvider({
8
8
  accountId: config.getOptionalString("accountId")
9
9
  });
10
- const ses = new clientSes.SES([
10
+ const sesClient = new clientSesv2.SESv2Client([
11
11
  {
12
- apiVersion: config.getOptionalString("apiVersion") ?? "2010-12-01",
13
- credentials: credentials.sdkCredentialProvider,
12
+ apiVersion: config.getOptionalString("apiVersion"),
14
13
  region: config.getOptionalString("region"),
14
+ credentials: credentials.sdkCredentialProvider,
15
15
  endpoint: config.getOptionalString("endpoint")
16
16
  }
17
17
  ]);
18
18
  return nodemailer.createTransport({
19
- SES: { ses, aws: { SendRawEmailCommand: clientSes.SendRawEmailCommand } }
19
+ SES: { sesClient, SendEmailCommand: clientSesv2.SendEmailCommand }
20
20
  });
21
21
  };
22
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"ses.cjs.js","sources":["../../../src/processor/transports/ses.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createTransport } from 'nodemailer';\nimport { SendRawEmailCommand, SES } from '@aws-sdk/client-ses';\nimport { Config } from '@backstage/config';\nimport { AwsCredentialsManager } from '@backstage/integration-aws-node';\n\nexport const createSesTransport = async (\n config: Config,\n credentialsManager: AwsCredentialsManager,\n) => {\n const credentials = await credentialsManager.getCredentialProvider({\n accountId: config.getOptionalString('accountId'),\n });\n const ses = new SES([\n {\n apiVersion: config.getOptionalString('apiVersion') ?? '2010-12-01',\n credentials: credentials.sdkCredentialProvider,\n region: config.getOptionalString('region'),\n endpoint: config.getOptionalString('endpoint'),\n },\n ]);\n return createTransport({\n SES: { ses, aws: { SendRawEmailCommand } },\n });\n};\n"],"names":["SES","createTransport","SendRawEmailCommand"],"mappings":";;;;;AAoBO,MAAM,kBAAA,GAAqB,OAChC,MAAA,EACA,kBAAA,KACG;AACH,EAAA,MAAM,WAAA,GAAc,MAAM,kBAAA,CAAmB,qBAAA,CAAsB;AAAA,IACjE,SAAA,EAAW,MAAA,CAAO,iBAAA,CAAkB,WAAW;AAAA,GAChD,CAAA;AACD,EAAA,MAAM,GAAA,GAAM,IAAIA,aAAA,CAAI;AAAA,IAClB;AAAA,MACE,UAAA,EAAY,MAAA,CAAO,iBAAA,CAAkB,YAAY,CAAA,IAAK,YAAA;AAAA,MACtD,aAAa,WAAA,CAAY,qBAAA;AAAA,MACzB,MAAA,EAAQ,MAAA,CAAO,iBAAA,CAAkB,QAAQ,CAAA;AAAA,MACzC,QAAA,EAAU,MAAA,CAAO,iBAAA,CAAkB,UAAU;AAAA;AAC/C,GACD,CAAA;AACD,EAAA,OAAOC,0BAAA,CAAgB;AAAA,IACrB,KAAK,EAAE,GAAA,EAAK,GAAA,EAAK,uBAAEC,+BAAoB;AAAE,GAC1C,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"ses.cjs.js","sources":["../../../src/processor/transports/ses.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createTransport } from 'nodemailer';\nimport { SendEmailCommand, SESv2Client } from '@aws-sdk/client-sesv2';\n\nimport { Config } from '@backstage/config';\nimport { AwsCredentialsManager } from '@backstage/integration-aws-node';\n\nexport const createSesTransport = async (\n config: Config,\n credentialsManager: AwsCredentialsManager,\n) => {\n const credentials = await credentialsManager.getCredentialProvider({\n accountId: config.getOptionalString('accountId'),\n });\n\n const sesClient = new SESv2Client([\n {\n apiVersion: config.getOptionalString('apiVersion'),\n region: config.getOptionalString('region'),\n credentials: credentials.sdkCredentialProvider,\n endpoint: config.getOptionalString('endpoint'),\n },\n ]);\n\n return createTransport({\n SES: { sesClient, SendEmailCommand },\n });\n};\n"],"names":["SESv2Client","createTransport","SendEmailCommand"],"mappings":";;;;;AAqBO,MAAM,kBAAA,GAAqB,OAChC,MAAA,EACA,kBAAA,KACG;AACH,EAAA,MAAM,WAAA,GAAc,MAAM,kBAAA,CAAmB,qBAAA,CAAsB;AAAA,IACjE,SAAA,EAAW,MAAA,CAAO,iBAAA,CAAkB,WAAW;AAAA,GAChD,CAAA;AAED,EAAA,MAAM,SAAA,GAAY,IAAIA,uBAAA,CAAY;AAAA,IAChC;AAAA,MACE,UAAA,EAAY,MAAA,CAAO,iBAAA,CAAkB,YAAY,CAAA;AAAA,MACjD,MAAA,EAAQ,MAAA,CAAO,iBAAA,CAAkB,QAAQ,CAAA;AAAA,MACzC,aAAa,WAAA,CAAY,qBAAA;AAAA,MACzB,QAAA,EAAU,MAAA,CAAO,iBAAA,CAAkB,UAAU;AAAA;AAC/C,GACD,CAAA;AAED,EAAA,OAAOC,0BAAA,CAAgB;AAAA,IACrB,GAAA,EAAK,EAAE,SAAA,oBAAWC,4BAAA;AAAiB,GACpC,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-notifications-backend-module-email",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "The email backend module for the notifications plugin.",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -37,7 +37,7 @@
37
37
  "test": "backstage-cli package test"
38
38
  },
39
39
  "dependencies": {
40
- "@aws-sdk/client-ses": "^3.550.0",
40
+ "@aws-sdk/client-sesv2": "^3.911.0",
41
41
  "@azure/communication-email": "^1.0.0",
42
42
  "@azure/identity": "^4.0.0",
43
43
  "@backstage/backend-plugin-api": "^1.4.4",