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