express-sweet 2.0.5 → 2.0.7

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,8 +1,28 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [2.0.7] - 2025/7/22
5
+
6
+ ### Changed
7
+
8
+ - Updated dependencies to address vulnerabilities
9
+ - `express`: 4.19.2 => 4.21.2
10
+ - `express-session`: 1.18.0 => 1.18.2
11
+ - `body-parser`: 1.19.0 => 2.2.0
12
+ - `cookie-parser`: 1.4.4 => 1.4.7
13
+ - `morgan`: 1.10.0 => 1.10.1
14
+ - `rollup`: 4.21.2 => 4.45.1
15
+
16
+ ## [2.0.6] - 2025/2/9
17
+
18
+ ### Fixed
19
+
20
+ - Fixed a bug that caused redirection to fail when a path with query parameters was set for the logout redirect URL (`failure_redirect` in `config/authentication.js`).
21
+
4
22
  ## [2.0.5] - 2025/2/4
23
+
5
24
  ### Added
25
+
6
26
  - Added a Handlebars helper, available for use in views, to replace HTML tags in a string.
7
27
 
8
28
  Example:
@@ -19,13 +39,16 @@ All notable changes to this project will be documented in this file.
19
39
  ```
20
40
 
21
41
  ## [2.0.4] - 2025/1/14
42
+
22
43
  ### Changed
44
+
23
45
  - Refactored variable names.
24
46
  - Fix Docker demo.
25
47
  - Changed the directory name for storing custom error classes in the demo from `exceptions` to `errors`.
26
48
  - Added a section to the README.md API reference about considerations when using the `hasMany` association with the `findAll` method.
27
49
 
28
50
  ### Added
51
+
29
52
  - **`findObjectInArray` Handlebars helper:** This helper is added to the view, allowing you to find an object in an array based on a specified field name and value.
30
53
 
31
54
  Example:
@@ -43,7 +66,9 @@ All notable changes to this project will be documented in this file.
43
66
  ```
44
67
 
45
68
  ## [2.0.3] - 2024/9/3
69
+
46
70
  ### Changed
71
+
47
72
  - Add `"type": "module"` to the `package.json` of the esm app generated by `express-sweet-generator`. It is fully esm compliant.
48
73
  - `require` was changed to dynamic import.
49
74
  - Template engine changed from `express-hbs` to `express-handlebars`.
@@ -89,30 +114,40 @@ All notable changes to this project will be documented in this file.
89
114
  - Update passport from 0.4.1 to 0.7.0
90
115
 
91
116
  ## [2.0.2] - 2024/9/1
117
+
92
118
  ### Changed
119
+
93
120
  - Update express from 4.18.3 to 4.19.2.
94
121
  - Update rollup from 2.79.1 to 4.21.2.
95
122
  - Rename build files (build.common.js => build.cjs, build.esm.js => build.mjs).
96
123
  - The express package was excluded from the build file. Instead, users should install express on their own.
97
124
 
98
125
  ## [2.0.1] - 2024/4/5
126
+
99
127
  ### Changed
128
+
100
129
  - Removed [nodejs-shared](https://www.npmjs.com/package/nodejs-shared) package dependency.
101
130
 
102
131
  ## [2.0.0] - 2024/3/24
132
+
103
133
  ### Changed
134
+
104
135
  - EXPRESS SWEET version 2 no longer depends on the AWS SDK.
105
136
  The `services.AWSRekognitionClient` and `services.AWSSesClient` have been migrated to the [AWS SDK Extension](https://www.npmjs.com/package/aws-sdk-extension) NPM package, so please install from there if needed.
106
137
 
107
138
  ## [1.1.1] - 2024/3/23
139
+
108
140
  ### Changed
141
+
109
142
  - When cookie security is enabled (`config/authentication.js#cookie_secure`) and the application is running on the HTTP protocol, the following warning message is output upon user authentication.
110
143
  ```bash
111
144
  Warning: Cookie security must be disabled for user authentication to work over the HTTP protocol (config/authentication.js#cookie_secure)
112
145
  ```
113
146
 
114
147
  ## [1.1.0] - 2024/3/6
148
+
115
149
  ### Changed
150
+
116
151
  - Updated EXPRESS SWEET's dependency packages.
117
152
  - [express](https://www.npmjs.com/package/express) from v4.18.2 to v4.18.3
118
153
  - [multer](https://www.npmjs.com/package/multer) from v1.4.4 to v1.4.5-lts.1
@@ -122,15 +157,21 @@ All notable changes to this project will be documented in this file.
122
157
  - [moment](https://www.npmjs.com/package/moment) from v2.29.4 to v2.30.1
123
158
 
124
159
  ## [1.0.44] - 2023/12/30
160
+
125
161
  ### Changed
162
+
126
163
  - The `Secure` and `HttpOnly` attributes of the session cookie can now be set from the authentication configuration file (`config/authentication.js`).
127
164
 
128
165
  ## [1.0.43] - 2023/12/30
166
+
129
167
  ### Changed
168
+
130
169
  - The cookie name for storing session IDs can now be set in the `cookie_name` field of the authentication configuration file (`config/authentication.js`).
131
170
 
132
171
  ## [1.0.42] - 2023/8/31
172
+
133
173
  ### Changed
174
+
134
175
  - Update TypeScript version from 4.8.4 to 5.2.2.
135
176
  - Update redis dependency package used for user authentication.
136
177
  - Updated redis package version from 4.3.1 to 4.6.8.
@@ -140,15 +181,21 @@ All notable changes to this project will be documented in this file.
140
181
 
141
182
 
142
183
  ## [1.0.41] - 2023/8/4
184
+
143
185
  ### Changed
186
+
144
187
  - 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.
145
188
 
146
189
  ## [1.0.40] - 2023/8/4
190
+
147
191
  ### Changed
192
+
148
193
  - Fixed to return null instead of throwing an error when looking for faces in the collection using images without faces (<code>AWSRekognitionClient.searchFaces()</code>).
149
194
 
150
195
  ## [1.0.39] - 2023/7/24
196
+
151
197
  ### Changed
198
+
152
199
  - Changed exception class name.
153
200
  <table>
154
201
  <thead>
@@ -219,40 +266,57 @@ All notable changes to this project will be documented in this file.
219
266
  </table>
220
267
 
221
268
  ## [1.0.38] - 2023/7/17
269
+
222
270
  ### Fixed
271
+
223
272
  - Fixed a bug that login user data (req.user) could not be referenced in the function called just before view rendering (config/view.js#beforeRender).
224
273
 
225
274
  ## [1.0.37] - 2023/7/17
275
+
226
276
  ### Changed
277
+
227
278
  - The beforeRender option in the view configuration (config/view.js) can now specify asynchronous functions.
228
279
 
229
280
  ### Added
281
+
230
282
  - New Math-related view helpers have been added.
231
283
 
232
284
  ## [1.0.36] - 2023/7/12
285
+
233
286
  ### Changed
287
+
234
288
  - Moved the Ajax determination option (is_ajax) in the authentication configuration (config/authentication.js) to the basic configuration (config/config.js).
235
289
  - The error handle option (error_handler) in the basic configuration (config/config.js) has been removed and an option to hook error handles (hook_handle_error) added instead.
236
290
 
237
291
  ## [1.0.35] - 2023/7/11
292
+
238
293
  ### Changed
294
+
239
295
  - The URL to redirect to when login fails (failure_redirect) option in the authentication configuration (config/authentication.js) can now be defined with a function.
240
296
  - The arguments of the failureRedirect method of the authentication service class (services/Authentication) have changed. The argument to the Authentication.failureRedirect method used to be just express.Response, but now it requires express.Request and express.Response.
241
297
 
242
298
  ## [1.0.34] - 2023/7/1
299
+
243
300
  ### Changed
301
+
244
302
  - Changed the response status code from 403 to 401 when asynchronous communication requiring authentication fails to authenticate.
245
303
 
246
304
  ## [1.0.33] - 2023/7/1
305
+
247
306
  ### Added
307
+
248
308
  - Added regular expression comparison view helper.
249
309
 
250
310
  ## [1.0.32] - 2023/7/1
311
+
251
312
  ### Fixed
313
+
252
314
  - Fixed a bug that cookies (req.cookies) cannot be referenced in the hook function before view rendering (config/view.js#beforeRender).
253
315
 
254
316
  ## [1.0.31] - 2023/6/29
317
+
255
318
  ### Changed
319
+
256
320
  - Changed helper function names in the view (Handlebars) from SnakeCase to CamelCase.
257
321
  |After|Before|Description|
258
322
  |--|--|--|
@@ -264,29 +328,41 @@ All notable changes to this project will be documented in this file.
264
328
  |formatBytes|format_bytes|Convert bytes to just the right units(KB, MB, GB, TB, PB, EB, ZB, YB).|
265
329
 
266
330
  ### Added
331
+
267
332
  - Added view helper to convert numeric values to strings with language-sensitive representations.
268
333
 
269
334
  ## [1.0.30] - 2023/6/26
335
+
270
336
  ### Changed
337
+
271
338
  - Fixed AWS Rekognition credentials passing.
272
339
 
273
340
  ## [1.0.29] - 2023/6/20
341
+
274
342
  ### Changed
343
+
275
344
  - Changed class private variables and methods from soft private to hard private.
276
345
 
277
346
  ### Added
347
+
278
348
  - Added AWS SES email sending client class.
279
349
 
280
350
  ## [1.0.28] - 2023/6/16
351
+
281
352
  ### Changed
353
+
282
354
  - Updated AWS SDK version from 2 to 3.
283
355
 
284
356
  ## [1.0.27] - 2023/6/12
357
+
285
358
  ### Changed
359
+
286
360
  - Request object has been added to the arguments of the beforeRender function in the view configuration (config/view.js).
287
361
 
288
362
  ## [1.0.26] - 2023/6/11
363
+
289
364
  ### Changed
365
+
290
366
  - Update Sequelize from v5 to v6.
291
367
  - Changed the framework debug log to output only when the environment variable EXPRESS_DEBUG is defined.
292
368
  .env:
@@ -295,35 +371,51 @@ All notable changes to this project will be documented in this file.
295
371
  ```
296
372
 
297
373
  ## [1.0.25] - 2022/11/24
374
+
298
375
  ### Added
376
+
299
377
  - Added formatBytes view helper to convert bytes to appropriate units.
300
378
 
301
379
  ## [1.0.24] - 2022/10/24
380
+
302
381
  ### Added
382
+
303
383
  - Added is_ajax option to user authentication (config/authentication.js).
304
384
 
305
385
  ## [1.0.23] - 2022/10/20
386
+
306
387
  ### Added
388
+
307
389
  - A request body object has been added to the parameters of the callback function for user authentication.
308
390
 
309
391
  ## [1.0.22] - 2022/7/27
392
+
310
393
  ### Added
394
+
311
395
  - You can now set hook functions that are called before the view is rendered. Hook functions can be used, for example, to set local variables that can be used in the view.
312
396
 
313
397
  ## [1.0.21] - 2022/526
398
+
314
399
  ### Added
400
+
315
401
  - Added an option to the face indexing method to retrieve details (gender, emotion, age group) of indexed faces.
316
402
 
317
403
  ## [1.0.20] - 2022/5/25
404
+
318
405
  ### Added
406
+
319
407
  - Added an option to get details (emotion, gender, age group) to the face detection method.
320
408
 
321
409
  ## [1.0.19] - 2022/5/20
410
+
322
411
  ### Added
412
+
323
413
  - Add date format helper to view.
324
414
 
325
415
  ## [1.0.18] - 2022/5/18
416
+
326
417
  ### Added
418
+
327
419
  - User authentication sessions can now be stored in redis. To use redis for session storage, simply add the following option to config/authentication.js. Please give it a try.
328
420
  config/authentication.js:
329
421
  ```json
@@ -332,23 +424,33 @@ All notable changes to this project will be documented in this file.
332
424
  ```
333
425
 
334
426
  ## [1.0.17] - 2022/5/17
427
+
335
428
  ### Changed
429
+
336
430
  - Updated documentation and refactored variable names.
337
431
 
338
432
  ## [1.0.16] - 2022/2/14
433
+
339
434
  ### Fixed
435
+
340
436
  - I forgot to include the build file, so I added the build file.
341
437
 
342
438
  ## [1.0.15] - 2022/2/14
439
+
343
440
  ### Changed
441
+
344
442
  - Changed the type of 'config/authentication.js#allow_unauthenticated' from'string[]' to'(string|RegExp)[]}'.
345
443
 
346
444
  ## [1.0.14] - 2022/1/17
445
+
347
446
  ### Changed
447
+
348
448
  - empty view helper can now check any type. Previously I could only check arrays.
349
449
 
350
450
  ## [1.0.13] - 2021/12/13
451
+
351
452
  ### Added
453
+
352
454
  - The model's begin method now accepts the transaction option.
353
455
  ```js
354
456
  let transaction;
@@ -371,7 +473,9 @@ All notable changes to this project will be documented in this file.
371
473
  ```
372
474
 
373
475
  ## [1.0.12] - 2021/11/16
476
+
374
477
  ### Added
478
+
375
479
  - Added a method to the model that can execute raw SQL. As there are often use cases in which it is just easier to execute raw / already prepared SQL queries, you can use the Model.query method.
376
480
  ```js
377
481
  // By default the function will return two arguments - a results array, and an object containing metadata (such as amount of affected rows, etc).
@@ -384,41 +488,59 @@ All notable changes to this project will be documented in this file.
384
488
  ```
385
489
 
386
490
  ## [1.0.11] - 2021/11/10
491
+
387
492
  ### Fixed
493
+
388
494
  - Fixed a bug that the database config was read before NODE_ENV was set and the database config matching NODE_ENV could not be read.
389
495
 
390
496
  ## [1.0.10] - 2021/10/19
497
+
391
498
  ### Changed
499
+
392
500
  - Added face similarity found to face search results in collection.
393
501
 
394
502
  ## [1.0.9] - 2021/10/13
503
+
395
504
  ### Changed
505
+
396
506
  - Updated dependent package'sharp'from 0.25.4 to 0.29.1.
397
507
  This update statically links sharp's pre-built libvips binaries, eliminating the need to install Phton.
398
508
  Click [here](https://sharp.pixelplumbing.com/changelog) for sharp change log.
399
509
 
400
510
  ## [1.0.8] - 2021/9/25
511
+
401
512
  ### Fixed
513
+
402
514
  - Fixed a bug where the default router couldn't aqua from the endpoint URL.
403
515
 
404
516
  ## [1.0.7] - 2021/8/13
517
+
405
518
  ### Added
519
+
406
520
  - Added where member functions to Model class.
407
521
 
408
522
  ## [1.0.6] - 2021/8/13
523
+
409
524
  ### Added
525
+
410
526
  - Added fn, col and literal member functions to Model class.
411
527
 
412
528
  ## [1.0.5] - 2021/8/12
529
+
413
530
  ### Changed
531
+
414
532
  - Changed the maximum size per field for multipart (multipart/form-data) requests from 1MB to unlimited.
415
533
 
416
534
  ## [1.0.4] - 2021/6/13
535
+
417
536
  ### Fixed
537
+
418
538
  - Fixed a bug where the referrer URL was set in app.locals.currentPath instead of the current URL.
419
539
 
420
540
  ## [1.0.3] - 2021/6/13
541
+
421
542
  ### Changed
543
+
422
544
  - Change the current URL path of a local variable.app.locals.currentPath is a USVString containing an initial '/' followed by the path of the URL not including the query string or fragment.
423
545
  ```js
424
546
  // For example, when the current URL is "https://example.com/docs/api?q=value", "/docs/api" is set for "app.locals.currentPath".
@@ -426,14 +548,19 @@ All notable changes to this project will be documented in this file.
426
548
  ```
427
549
 
428
550
  ## [1.0.2] - 2021//6/10
551
+
429
552
  ### Changed
553
+
430
554
  - Updated rollup from version 2.44 to 2.51.
431
555
 
432
556
  ### Fixed
557
+
433
558
  - Fixed a bug where preloading models failed in cjs.
434
559
 
435
560
  ## [1.0.1] - 2021/6/2
561
+
436
562
  ### Fixed
563
+
437
564
  - Fixed a bug that caused an error when reading options defined in ESM's default Export.
438
565
 
439
566
  [1.0.1]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.0...v1.0.1
@@ -488,4 +615,6 @@ All notable changes to this project will be documented in this file.
488
615
  [2.0.2]: https://github.com/takuya-motoshima/express-sweet/compare/v2.0.1...v2.0.2
489
616
  [2.0.3]: https://github.com/takuya-motoshima/express-sweet/compare/v2.0.2...v2.0.3
490
617
  [2.0.4]: https://github.com/takuya-motoshima/express-sweet/compare/v2.0.3...v2.0.4
491
- [2.0.5]: https://github.com/takuya-motoshima/express-sweet/compare/v2.0.4...v2.0.5
618
+ [2.0.5]: https://github.com/takuya-motoshima/express-sweet/compare/v2.0.4...v2.0.5
619
+ [2.0.6]: https://github.com/takuya-motoshima/express-sweet/compare/v2.0.5...v2.0.6
620
+ [2.0.7]: https://github.com/takuya-motoshima/express-sweet/compare/v2.0.6...v2.0.7