ac-ses 1.2.2 → 1.2.4
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/.eslintrc.js +1 -1
- package/CHANGELOG.md +40 -0
- package/index.js +4 -0
- package/package.json +12 -11
- package/test/test.js +16 -15
package/.eslintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
<a name="1.2.4"></a>
|
|
2
|
+
|
|
3
|
+
## [1.2.4](https://github.com/admiralcloud/ac-ses/compare/v1.2.3..v1.2.4) (2023-01-31 11:26:12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fix
|
|
7
|
+
|
|
8
|
+
* **App:** Add debug mode for SES headers | MP | [b11e0374c5956236e80f4b81d9895ba9fd5916f3](https://github.com/admiralcloud/ac-ses/commit/b11e0374c5956236e80f4b81d9895ba9fd5916f3)
|
|
9
|
+
Add debug mode for SES headers
|
|
10
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
11
|
+
### Tests
|
|
12
|
+
|
|
13
|
+
* **App:** Fixed tests after package updates | MP | [ba0a41496ffa202c9bac3d7fbde5a7c4b542d24b](https://github.com/admiralcloud/ac-ses/commit/ba0a41496ffa202c9bac3d7fbde5a7c4b542d24b)
|
|
14
|
+
Fixed tests after package updates
|
|
15
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
16
|
+
### Chores
|
|
17
|
+
|
|
18
|
+
* **App:** Updated packages | MP | [f3affc2c748a2ed6cb96eaad6a31fae2af646d37](https://github.com/admiralcloud/ac-ses/commit/f3affc2c748a2ed6cb96eaad6a31fae2af646d37)
|
|
19
|
+
Updated packages
|
|
20
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
21
|
+
### Chores
|
|
22
|
+
|
|
23
|
+
* **App:** Updated ESLint setting | MP | [a5dd3adfa10ef02ca1c886a0485d324b6ac73aee](https://github.com/admiralcloud/ac-ses/commit/a5dd3adfa10ef02ca1c886a0485d324b6ac73aee)
|
|
24
|
+
Updated ESLint setting to ECMA 2021
|
|
25
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
26
|
+
<a name="1.2.3"></a>
|
|
27
|
+
|
|
28
|
+
## [1.2.3](https://github.com/admiralcloud/ac-ses/compare/v1.2.2..v1.2.3) (2022-07-22 05:34:50)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fix
|
|
32
|
+
|
|
33
|
+
* **App:** Package update | MP | [236062a467063f128394757e9f8e08562591416e](https://github.com/admiralcloud/ac-ses/commit/236062a467063f128394757e9f8e08562591416e)
|
|
34
|
+
Package update
|
|
35
|
+
Related issues: [/issues#undefined](https://github.com//issues/undefined)
|
|
36
|
+
### Chores
|
|
37
|
+
|
|
38
|
+
* **App:** Updated gitignore | MP | [d545d8c49202a68737ee0723db629ddd2d071ac7](https://github.com/admiralcloud/ac-ses/commit/d545d8c49202a68737ee0723db629ddd2d071ac7)
|
|
39
|
+
Ignore vscode settings
|
|
40
|
+
Related issues: [/issues#undefined](https://github.com//issues/undefined)
|
|
1
41
|
<a name="1.2.2"></a>
|
|
2
42
|
|
|
3
43
|
## [1.2.2](https://github.com/admiralcloud/ac-ses/compare/v1.2.1..v1.2.2) (2021-10-09 17:45:18)
|
package/index.js
CHANGED
|
@@ -109,6 +109,7 @@ const acses = function() {
|
|
|
109
109
|
// OPTIONS
|
|
110
110
|
{ field: 'replyTo', type: _.isArray },
|
|
111
111
|
{ field: 'attachments', type: _.isArray },
|
|
112
|
+
{ field: 'debug', type: _.isBoolean },
|
|
112
113
|
]
|
|
113
114
|
|
|
114
115
|
_.some(fieldCheck, (field) => {
|
|
@@ -155,6 +156,9 @@ const acses = function() {
|
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
raw += 'Subject: ' + (useEnvironmentPrefixInSubject ? (_.toUpper(environment) + ' | ') : '') + params.subject + '\n'
|
|
159
|
+
if (params?.debug) {
|
|
160
|
+
console.log('ACSES | DEBUG Headers | %j', raw.split('/n'))
|
|
161
|
+
}
|
|
158
162
|
|
|
159
163
|
// announce multipart/mixed
|
|
160
164
|
raw += 'Mime-Version: 1.0\n'
|
package/package.json
CHANGED
|
@@ -4,28 +4,29 @@
|
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "admiralcloud/ac-ses",
|
|
6
6
|
"homepage": "https://www.admiralcloud.com",
|
|
7
|
-
"version": "1.2.
|
|
7
|
+
"version": "1.2.4",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"async": "^3.2.
|
|
10
|
-
"aws-sdk": "^2.
|
|
9
|
+
"async": "^3.2.4",
|
|
10
|
+
"aws-sdk": "^2.1305.0",
|
|
11
11
|
"lodash": "^4.17.21",
|
|
12
12
|
"quoted-printable": "^1.0.1",
|
|
13
13
|
"utf8": "^3.0.0",
|
|
14
|
-
"uuid": "^
|
|
14
|
+
"uuid": "^9.x"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"ac-semantic-release": "^0.
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"ioredis": "^
|
|
21
|
-
"
|
|
22
|
-
"mocha
|
|
17
|
+
"ac-semantic-release": "^0.3.4",
|
|
18
|
+
"chai": "^4.3.7",
|
|
19
|
+
"eslint": "8.x",
|
|
20
|
+
"ioredis": "^5.3.0",
|
|
21
|
+
"expect": "^29.4.1",
|
|
22
|
+
"mocha": "^10.2.0",
|
|
23
|
+
"mocha-jenkins-reporter": "0.4.8"
|
|
23
24
|
},
|
|
24
25
|
"scripts": {
|
|
25
26
|
"test": "mocha --reporter spec",
|
|
26
27
|
"test-jenkins": "JUNIT_REPORT_PATH=./report.xml mocha --colors --reporter mocha-jenkins-reporter --reporter-options junit_report_name='AC-SES'"
|
|
27
28
|
},
|
|
28
29
|
"engines": {
|
|
29
|
-
"node": ">=
|
|
30
|
+
"node": ">=16.0.0"
|
|
30
31
|
}
|
|
31
32
|
}
|
package/test/test.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const fs = require('fs')
|
|
2
2
|
|
|
3
|
-
const expect = require('expect')
|
|
4
3
|
const acses = require('../index')
|
|
5
4
|
|
|
5
|
+
const expect = require('chai').expect
|
|
6
|
+
|
|
6
7
|
var Redis = require('ioredis')
|
|
7
8
|
var redis = new Redis({
|
|
8
9
|
host: process.env.REDIS_HOST || 'localhost',
|
|
@@ -15,7 +16,7 @@ describe('CHECKING ERRORS', function () {
|
|
|
15
16
|
it('Send email without init', function(done) {
|
|
16
17
|
let params = testConfig.email
|
|
17
18
|
acses.sendEmail(params, (err) => {
|
|
18
|
-
expect(err).
|
|
19
|
+
expect(err).eql({ message: 'pleaseUseInitBeforeSendingEmail' })
|
|
19
20
|
return done()
|
|
20
21
|
})
|
|
21
22
|
})
|
|
@@ -31,8 +32,8 @@ describe('TESTING EMAIL', function () {
|
|
|
31
32
|
let params = testConfig.email
|
|
32
33
|
acses.sendEmail(params, (err, result) => {
|
|
33
34
|
if (err) return done(err)
|
|
34
|
-
expect(result).
|
|
35
|
-
expect(result).
|
|
35
|
+
expect(result).to.have.property('ResponseMetadata')
|
|
36
|
+
expect(result).to.have.property('MessageId')
|
|
36
37
|
return done()
|
|
37
38
|
})
|
|
38
39
|
})
|
|
@@ -45,8 +46,8 @@ describe('TESTING EMAIL', function () {
|
|
|
45
46
|
params.html = data.toString()
|
|
46
47
|
acses.sendEmail(params, (err, result) => {
|
|
47
48
|
if (err) return done(err)
|
|
48
|
-
expect(result).
|
|
49
|
-
expect(result).
|
|
49
|
+
expect(result).to.have.property('ResponseMetadata')
|
|
50
|
+
expect(result).to.have.property('MessageId')
|
|
50
51
|
return done()
|
|
51
52
|
})
|
|
52
53
|
})
|
|
@@ -56,8 +57,8 @@ describe('TESTING EMAIL', function () {
|
|
|
56
57
|
let params = testConfig.securityEmail
|
|
57
58
|
acses.informSecurity(params, (err, result) => {
|
|
58
59
|
if (err) return done(err)
|
|
59
|
-
expect(result).
|
|
60
|
-
expect(result).
|
|
60
|
+
expect(result).to.have.property('ResponseMetadata')
|
|
61
|
+
expect(result).to.have.property('MessageId')
|
|
61
62
|
return done()
|
|
62
63
|
})
|
|
63
64
|
})
|
|
@@ -66,8 +67,8 @@ describe('TESTING EMAIL', function () {
|
|
|
66
67
|
let params = testConfig.supportEmail
|
|
67
68
|
acses.informSecurity(params, (err, result) => {
|
|
68
69
|
if (err) return done(err)
|
|
69
|
-
expect(result).
|
|
70
|
-
expect(result).
|
|
70
|
+
expect(result).to.have.property('ResponseMetadata')
|
|
71
|
+
expect(result).to.have.property('MessageId')
|
|
71
72
|
return done()
|
|
72
73
|
})
|
|
73
74
|
})
|
|
@@ -89,8 +90,8 @@ describe('TESTING BLOCK TIME', function() {
|
|
|
89
90
|
params.blockTime = 10
|
|
90
91
|
acses.sendEmail(params, (err, result) => {
|
|
91
92
|
if (err) return done(err)
|
|
92
|
-
expect(result).
|
|
93
|
-
expect(result).
|
|
93
|
+
expect(result).to.have.property('ResponseMetadata')
|
|
94
|
+
expect(result).to.have.property('MessageId')
|
|
94
95
|
return done()
|
|
95
96
|
})
|
|
96
97
|
})
|
|
@@ -99,7 +100,7 @@ describe('TESTING BLOCK TIME', function() {
|
|
|
99
100
|
let params = testConfig.email
|
|
100
101
|
acses.sendEmail(params, (err, result) => {
|
|
101
102
|
if (err) return done(err)
|
|
102
|
-
expect(result).
|
|
103
|
+
expect(result).to.be.undefined
|
|
103
104
|
return done()
|
|
104
105
|
})
|
|
105
106
|
})
|
|
@@ -114,8 +115,8 @@ describe('TESTING BLOCK TIME', function() {
|
|
|
114
115
|
params.subject = 'Test after block time'
|
|
115
116
|
acses.sendEmail(params, (err, result) => {
|
|
116
117
|
if (err) return done(err)
|
|
117
|
-
expect(result).
|
|
118
|
-
expect(result).
|
|
118
|
+
expect(result).to.have.property('ResponseMetadata')
|
|
119
|
+
expect(result).to.have.property('MessageId')
|
|
119
120
|
return done()
|
|
120
121
|
})
|
|
121
122
|
})
|