express-sweet 1.0.41 → 1.0.42

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 (66) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/INSTALL-Redis.md +65 -39
  3. package/README.md +7 -0
  4. package/dist/build.common.js +66 -19
  5. package/dist/build.esm.js +66 -19
  6. package/docs/index.html +3 -3
  7. package/package.json +12 -20
  8. package/types/database/Database.d.ts +181 -181
  9. package/types/database/Model.d.ts +221 -221
  10. package/types/database/index.d.ts +3 -4
  11. package/types/database/loadModels.d.ts +6 -6
  12. package/types/exceptions/FaceCollectionCreateFailed.d.ts +25 -25
  13. package/types/exceptions/FaceCollectionDeleteFailed.d.ts +25 -25
  14. package/types/exceptions/FaceIndexFailed.d.ts +20 -20
  15. package/types/exceptions/FaceMissingInPhoto.d.ts +11 -11
  16. package/types/exceptions/FacesMultipleInPhoto.d.ts +11 -11
  17. package/types/exceptions/index.d.ts +5 -6
  18. package/types/handlebars_helpers/comparison.d.ts +351 -351
  19. package/types/handlebars_helpers/date.d.ts +19 -19
  20. package/types/handlebars_helpers/html.d.ts +12 -12
  21. package/types/handlebars_helpers/index.d.ts +7 -8
  22. package/types/handlebars_helpers/math.d.ts +81 -81
  23. package/types/handlebars_helpers/number.d.ts +18 -18
  24. package/types/handlebars_helpers/object.d.ts +21 -21
  25. package/types/handlebars_helpers/string.d.ts +50 -50
  26. package/types/index.d.ts +7 -8
  27. package/types/interfaces/AuthenticationConfig.d.ts +108 -108
  28. package/types/interfaces/BasicConfig.d.ts +74 -74
  29. package/types/interfaces/BoundingBox.d.ts +25 -25
  30. package/types/interfaces/DatabaseConfig.d.ts +7 -7
  31. package/types/interfaces/FaceDetails.d.ts +30 -0
  32. package/types/interfaces/FaceDetailsEmotions.d.ts +40 -40
  33. package/types/interfaces/FaceMatch.d.ts +31 -31
  34. package/types/interfaces/IndexFaceDetails.d.ts +29 -0
  35. package/types/interfaces/RekognitionOptions.d.ts +26 -26
  36. package/types/interfaces/SesOptions.d.ts +27 -27
  37. package/types/interfaces/ViewConfig.d.ts +44 -44
  38. package/types/interfaces/index.d.ts +8 -9
  39. package/types/middlewares/Authentication.d.ts +13 -13
  40. package/types/middlewares/CORS.d.ts +10 -10
  41. package/types/middlewares/Environment.d.ts +10 -10
  42. package/types/middlewares/ErrorHandler.d.ts +10 -10
  43. package/types/middlewares/Global.d.ts +13 -13
  44. package/types/middlewares/Http.d.ts +10 -10
  45. package/types/middlewares/Local.d.ts +13 -13
  46. package/types/middlewares/View.d.ts +14 -14
  47. package/types/middlewares/index.d.ts +7 -8
  48. package/types/mount.d.ts +7 -7
  49. package/types/routing/Router.d.ts +13 -13
  50. package/types/routing/index.d.ts +1 -2
  51. package/types/services/AWSRekognitionClient.d.ts +126 -126
  52. package/types/services/AWSSesClient.d.ts +57 -57
  53. package/types/services/Authentication.d.ts +34 -34
  54. package/types/services/index.d.ts +3 -4
  55. package/types/utils/Types.d.ts +24 -24
  56. package/types/utils/index.d.ts +9 -12
  57. package/types/utils/isArray.d.ts +8 -8
  58. package/types/utils/isAsyncFunction.d.ts +12 -12
  59. package/types/utils/isFunction.d.ts +13 -13
  60. package/types/utils/isObject.d.ts +8 -8
  61. package/types/utils/isString.d.ts +8 -8
  62. package/types/utils/loadAuthenticationConfig.d.ts +8 -8
  63. package/types/utils/loadBasicConfig.d.ts +8 -8
  64. package/types/utils/loadDatabaseConfig.d.ts +8 -8
  65. package/types/utils/loadViewConfig.d.ts +8 -8
  66. package/types/services/RedisClient.d.ts +0 -80
package/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [1.0.42] - 2023/8/31
5
+ ### Changed
6
+ - Update TypeScript version from 4.8.4 to 5.2.2.
7
+ - Update redis dependency package used for user authentication.
8
+ - Updated redis package version from 4.3.1 to 4.6.8.
9
+ [Here](https://github.com/redis/node-redis/blob/master/CHANGELOG.md) are the changes.
10
+ - Updated connect-redis package version from 6.1.3 to 7.1.0.
11
+ [Here](https://github.com/tj/connect-redis/releases) are the changes.
12
+
13
+
4
14
  ## [1.0.41] - 2023/8/4
5
15
  ### Changed
6
16
  - Added an option to the method that searches for faces in the collection to throw an exception if a face is not found or if multiple faces are found.
@@ -828,4 +838,5 @@ All notable changes to this project will be documented in this file.
828
838
  [1.0.38]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.37...v1.0.38
829
839
  [1.0.39]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.38...v1.0.39
830
840
  [1.0.40]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.39...v1.0.40
831
- [1.0.41]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.40...v1.0.41
841
+ [1.0.41]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.40...v1.0.41
842
+ [1.0.42]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.41...v1.0.42
package/INSTALL-Redis.md CHANGED
@@ -1,51 +1,77 @@
1
1
  # Install Redis
2
2
  ==============
3
3
 
4
+ ## Environment for this procedure
4
5
  * OS: `Amazon Linux 2`
5
6
  * Redis: `v6.2.6 or later`
6
7
  * see more: https://redis.io/download#installation
7
8
 
8
- Check the version of Redis that can be installed.
9
- ```sh
10
- amazon-linux-extras list|grep redis
11
- # Below is an example of the output.
12
- # 56 redis6 available [ =stable ]
13
- ```
14
9
 
15
- Install Redis by specifying the version.
16
- ```sh
17
- sudo amazon-linux-extras install -y redis6
18
- ```
10
+ ## Install Redis
11
+ 1. Check the version of Redis that can be installed.
12
+ ```sh
13
+ amazon-linux-extras list|grep redis
14
+ # Below is an example of the output.
15
+ # 56 redis6 available [ =stable ]
16
+ ```
19
17
 
20
- Configure and start Redis autostart.
21
- ```sh
22
- sudo systemctl status redis.service
23
- sudo systemctl start redis.service
24
- sudo systemctl enable redis.service
25
- sudo systemctl is-enabled redis.service
26
- ```
18
+ 1. Install Redis by specifying the version.
19
+ ```sh
20
+ sudo amazon-linux-extras install -y redis6
21
+ ```
22
+ 1. Configure and start Redis autostart.
23
+ ```sh
24
+ sudo systemctl status redis.service
25
+ sudo systemctl start redis.service
26
+ sudo systemctl enable redis.service
27
+ sudo systemctl is-enabled redis.service
28
+ ```
29
+ 1. Check Redis process.
30
+ ```sh
31
+ ps -ef | grep redis | grep -v grep
32
+ # Below is an example of the output.
33
+ # redis 5407 1 0 11:02 ? 00:00:00 /usr/bin/redis-server 127.0.0.1:6379
34
+ ```
35
+ 1. Check Redis behavior. If "redis-cli ping" returns PONG, it is success.
36
+ ```sh
37
+ redis-cli ping
38
+ # Below is an example of the output.
39
+ # PONG
40
+ ```
41
+ 1. Test Redis read/write.
42
+ ```sh
43
+ redis-cli
27
44
 
28
- Check Redis process.
29
- ```sh
30
- ps -ef | grep redis | grep -v grep
31
- # Below is an example of the output.
32
- # redis 5407 1 0 11:02 ? 00:00:00 /usr/bin/redis-server 127.0.0.1:6379
33
- ```
45
+ set myMessage "hello world"
46
+ # OK
34
47
 
35
- Check Redis behavior. If "redis-cli ping" returns PONG, it is success.
36
- ```sh
37
- redis-cli ping
38
- # Below is an example of the output.
39
- # PONG
40
- ```
48
+ get myMessage
49
+ # "hello world"
50
+ ```
41
51
 
42
- Test Redis read/write.
43
- ```sh
44
- redis-cli
45
-
46
- set myMessage "hello world"
47
- # OK
48
-
49
- get myMessage
50
- # "hello world"
51
- ```
52
+ ## Commonly used Redis commands
53
+ - Start Redis CLI
54
+ ```sh
55
+ redis-cli
56
+ ```
57
+ - Key List
58
+ ```sh
59
+ redis-cli --raw keys \*
60
+ ```
61
+
62
+ or
63
+ ```sh
64
+ redis-cli --scan
65
+ ```
66
+ - Value List
67
+ ```sh
68
+ redis-cli --raw mget $(redis-cli --scan)
69
+ ```
70
+ - Key and Value List
71
+ ```sh
72
+ for i in $(redis-cli keys \*); do echo $i: $(redis-cli GET $i); done
73
+ ```
74
+ - Delete key
75
+ ```sh
76
+ redis-cli del myMessage
77
+ ```
package/README.md CHANGED
@@ -152,6 +152,13 @@ See <a href="https://takuya-motoshima.github.io/express-sweet/" target="_blank">
152
152
  npm start
153
153
  ```
154
154
 
155
+ ## Testing
156
+ With [npm](http://npmjs.org) do:
157
+
158
+ ```sh
159
+ npm test
160
+ ```
161
+
155
162
  ## Author
156
163
  **Takuya Motoshima**
157
164