ac-ses 2.0.8 → 2.0.9

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.
@@ -0,0 +1,34 @@
1
+ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
+
4
+ name: Node.js CI
5
+
6
+ on:
7
+ push:
8
+ branches: [ master ]
9
+ pull_request:
10
+ branches: [ master ]
11
+
12
+ jobs:
13
+
14
+ build:
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ runs-on: ubuntu-latest
20
+
21
+ strategy:
22
+ matrix:
23
+ node-version: [22.x, 24.x]
24
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
25
+
26
+ steps:
27
+ - uses: actions/checkout@v5
28
+ - name: Use Node.js ${{ matrix.node-version }}
29
+ uses: actions/setup-node@v5
30
+ with:
31
+ node-version: ${{ matrix.node-version }}
32
+
33
+ - run: yarn install
34
+ - run: yarn run test
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## [2.0.9](https://github.com/admiralcloud/ac-ses/compare/v2.0.8..v2.0.9) (2026-04-04 10:57:03)
2
+
3
+
4
+ ### Bug Fix
5
+
6
+
7
+ * **App:** Package updates | MP | [1537e74db415f5ee26244227c67fea8193d59646](https://github.com/admiralcloud/ac-ses/commit/1537e74db415f5ee26244227c67fea8193d59646)
8
+ Package updates
9
+ Related issues:
10
+ ### Tests
11
+
12
+
13
+ * **App:** Fixed tests | MP | [0458d1360ff563bc4b47e1a5c49e5d944236a796](https://github.com/admiralcloud/ac-ses/commit/0458d1360ff563bc4b47e1a5c49e5d944236a796)
14
+ Fixed tests
15
+ Related issues:
16
+ ### Documentation
17
+
18
+
19
+ * **App:** Added badge | MP | [bbe44fd42bbbd29b05fb3a52e59552649ef2f8eb](https://github.com/admiralcloud/ac-ses/commit/bbe44fd42bbbd29b05fb3a52e59552649ef2f8eb)
20
+ Added CI badge
21
+ Related issues:
22
+ ### Chores
23
+
24
+
25
+ * **App:** Added Github actions | MP | [3b3888b843f859024e73969317d5e8e38ed12cb5](https://github.com/admiralcloud/ac-ses/commit/3b3888b843f859024e73969317d5e8e38ed12cb5)
26
+ Added Github actions
27
+ Related issues:
1
28
 
2
29
  ## [2.0.8](https://github.com/admiralcloud/ac-ses/compare/v2.0.7..v2.0.8) (2026-03-21 11:25:41)
3
30
 
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # AC SES
2
2
  A helper tool to send emails via AWS SES.
3
3
 
4
+ [![Node.js CI](https://github.com/AdmiralCloud/ac-ses/actions/workflows/node.js.yml/badge.svg)](https://github.com/AdmiralCloud/ac-ses/actions/workflows/node.js.yml) [![CodeQL](https://github.com/AdmiralCloud/ac-ses/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/AdmiralCloud/ac-ses/actions/workflows/github-code-scanning/codeql)
5
+
4
6
  ## BREAKING CHANGES VERSION 2
5
7
  + use async/await
6
8
  + no more support for blocktime - use your application logic instead
package/package.json CHANGED
@@ -4,17 +4,17 @@
4
4
  "license": "MIT",
5
5
  "repository": "admiralcloud/ac-ses",
6
6
  "homepage": "https://www.admiralcloud.com",
7
- "version": "2.0.8",
7
+ "version": "2.0.9",
8
8
  "dependencies": {
9
- "@aws-sdk/client-sesv2": "^3.1014.0",
10
- "ac-custom-error": "^2.0.2",
11
- "lodash": "^4.17.23",
9
+ "@aws-sdk/client-sesv2": "^3.1024.0",
10
+ "ac-custom-error": "^2.0.3",
11
+ "lodash": "^4.18.1",
12
12
  "quoted-printable": "^1.0.1",
13
13
  "utf8": "^3.0.0",
14
14
  "uuid": "^11.x"
15
15
  },
16
16
  "devDependencies": {
17
- "ac-semantic-release": "^0.4.10",
17
+ "ac-semantic-release": "^1.0.1",
18
18
  "chai": "^4.5.0",
19
19
  "eslint": "10.x",
20
20
  "expect": "^30.3.0",
@@ -24,7 +24,7 @@
24
24
  "test": "mocha --reporter spec"
25
25
  },
26
26
  "engines": {
27
- "node": ">=20.0.0"
27
+ "node": ">=22.0.0"
28
28
  },
29
29
  "resolutions": {
30
30
  "mocha/diff": "^8.0.3",
package/test/test.js CHANGED
@@ -2,12 +2,29 @@ const fs = require('fs/promises')
2
2
 
3
3
  const acses = require('../index')
4
4
 
5
- const expect = require('chai').expect
6
- const testConfig = require('./testConfig.js')
5
+ const expect = require('chai').expect
6
+
7
+ const initConfig = {
8
+ testMode: true,
9
+ region: process.env.AWS_REGION || 'eu-west-1',
10
+ defaultSender: {
11
+ address: process.env.TEST_SENDER_ADDRESS || 'test@admiralcloud.com',
12
+ name: process.env.TEST_SENDER_NAME || 'AdmiralCloud | Support TEST'
13
+ }
14
+ }
15
+
16
+ const emailParams = {
17
+ to: [{
18
+ name: process.env.TEST_RECIPIENT_NAME || 'Test User',
19
+ address: process.env.TEST_RECIPIENT_ADDRESS || 'test@example.com'
20
+ }],
21
+ subject: 'Test from ac-ses',
22
+ text: 'Text of the message'
23
+ }
7
24
 
8
25
  describe('CHECKING ERRORS', function () {
9
26
  it('Send email without init', async() => {
10
- let params = testConfig.email
27
+ let params = { ...emailParams }
11
28
  try {
12
29
  await acses.sendEmail(params)
13
30
  }
@@ -19,18 +36,18 @@ describe('CHECKING ERRORS', function () {
19
36
 
20
37
  describe('TESTING EMAIL', function () {
21
38
  it('Init AC SES', async() => {
22
- acses.init(testConfig.init)
39
+ acses.init(initConfig)
23
40
  })
24
41
 
25
42
  it('Send a text email', async() => {
26
- let params = testConfig.email
43
+ let params = { ...emailParams }
27
44
  let result = await acses.sendEmail(params)
28
45
  expect(result).to.have.property('$metadata')
29
46
  expect(result).to.have.property('MessageId')
30
47
  })
31
48
 
32
49
  it('Send a HTML email', async() => {
33
- let params = testConfig.email
50
+ let params = { ...emailParams }
34
51
  const data = await fs.readFile(process.cwd() + '/test/htmlTemplate.html')
35
52
  params.subject = 'HTML Test E-Mail'
36
53
  params.html = data.toString()
@@ -38,4 +55,4 @@ describe('TESTING EMAIL', function () {
38
55
  expect(result).to.have.property('$metadata')
39
56
  expect(result).to.have.property('MessageId')
40
57
  })
41
- })
58
+ })