express-sweet 1.0.27 → 1.0.29

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,6 +1,76 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [1.0.29] - 2023/6/20
5
+ ### Changed
6
+ - Changed class private variables and methods from soft private to hard private.
7
+
8
+ ### Added
9
+ - Added AWS SES email sending client class.
10
+ ```js
11
+ const sweet = require('express-sweet');
12
+
13
+ // Load environment variables.
14
+ sweet.middlewares.Environment.mount();
15
+
16
+ // SES Client.
17
+ const client = new sweet.services.AWSSesClient({
18
+ apiVersion: process.env.SES_API_VERSION,
19
+ region: process.env.SES_REGION,
20
+ accessKeyId: process.env.SES_ACCESS_KEY_ID,
21
+ secretAccessKey: process.env.SES_SECRET_ACCESS_KEY,
22
+ });
23
+
24
+ // Send an email from "test<user1@example.com>" to "user2@example.com".
25
+ await client
26
+ .from('user1@example.com', 'Sender Name')
27
+ .to('user2@example.com')
28
+ .subject('Test email')
29
+ .body('Hi, this is a test email')
30
+ .send();
31
+
32
+ // Use variables in the body of the e-mail.
33
+ // The body can use the handlebars and handlebars-extd syntax.
34
+ await client
35
+ .from('user1@example.com', 'Sender Name')
36
+ .to('user2@example.com')
37
+ .subject('Test email')
38
+ .body('Hello {{name}}', {name: 'Mason'})
39
+ .send();
40
+ ```
41
+
42
+ ## [1.0.28] - 2023/6/16
43
+ ### Changed
44
+ - Updated AWS SDK version from 2 to 3.
45
+ Unit test results:
46
+ ```sh
47
+ npm run test
48
+
49
+ > express-sweet@1.0.25 test
50
+ > jest
51
+
52
+ PASS __tests__/AWSRekognitionClient.test.js (8.773 s)
53
+ ? Should detect one person from the image (448 ms)
54
+ ? Should be able to get facial details (532 ms)
55
+ ? Should detect three persons from the image (589 ms)
56
+ ? The two faces should be the same person (131 ms)
57
+ ? The two faces should be different people (213 ms)
58
+ ? Should be able to create collections (98 ms)
59
+ ? Should index faces in the collection (242 ms)
60
+ ? Should return the details of the indexed face (346 ms)
61
+ ? Should be able to find faces from the collection (153 ms)
62
+ ? Should be able to find faces from the collection (132 ms)
63
+ ? Should list indexed faces (27 ms)
64
+ ? Should delete the face from the collection (53 ms)
65
+ ? Collection should be deleted (62 ms)
66
+
67
+ Test Suites: 1 passed, 1 total
68
+ Tests: 13 passed, 13 total
69
+ Snapshots: 0 total
70
+ Time: 9.323 s
71
+ Ran all test suites.
72
+ ```
73
+
4
74
  ## [1.0.27] - 2023/6/12
5
75
  ### Changed
6
76
  - Request object has been added to the arguments of the beforeRender function in the view configuration (config/view.js).
@@ -115,7 +185,7 @@ All notable changes to this project will be documented in this file.
115
185
  ### Added
116
186
  - Added an option to the face indexing method to retrieve details (gender, emotion, age group) of indexed faces.
117
187
  ```js
118
- const sweet = require('../dist/build.common');
188
+ const sweet = require('express-sweet');
119
189
 
120
190
  // Load environment variables.
121
191
  sweet.middlewares.Environment.mount();
@@ -159,7 +229,7 @@ All notable changes to this project will be documented in this file.
159
229
  ### Added
160
230
  - Added an option to get details (emotion, gender, age group) to the face detection method.
161
231
  ```js
162
- const sweet = require('../dist/build.common');
232
+ const sweet = require('express-sweet');
163
233
 
164
234
  // Load environment variables.
165
235
  sweet.middlewares.Environment.mount();
@@ -445,4 +515,6 @@ All notable changes to this project will be documented in this file.
445
515
  [1.0.24]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.23...v1.0.24
446
516
  [1.0.25]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.24...v1.0.25
447
517
  [1.0.26]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.25...v1.0.26
448
- [1.0.27]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.26...v1.0.27
518
+ [1.0.27]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.26...v1.0.27
519
+ [1.0.28]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.27...v1.0.28
520
+ [1.0.29]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.28...v1.0.29