express-sweet 1.0.12 → 1.0.16
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 +87 -5
- package/dist/build.common.js +3 -3
- package/dist/build.esm.js +3 -3
- package/docs/index.html +319 -297
- package/docs/styles/docs.css +5 -10
- package/package.json +1 -1
- package/types/database/Model.d.ts +51 -20
- package/types/handlebars_helpers/comparison.d.ts +48 -7
- package/types/interfaces/AuthenticationOptions.d.ts +2 -2
- package/types/services/AWSRekognitionClient.d.ts +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,84 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.0.16] - 2022-02-14
|
|
6
|
+
### Fixed
|
|
7
|
+
- I forgot to include the build file, so I added the build file.
|
|
8
|
+
|
|
9
|
+
## [1.0.15] - 2022-02-14
|
|
10
|
+
### Fixed
|
|
11
|
+
- Changed the type of 'config/authentication.js#allow_unauthenticated' from'string[]' to'(string|RegExp)[]}'.
|
|
12
|
+
|
|
13
|
+
## [1.0.14] - 2022-01-17
|
|
14
|
+
### Fixed
|
|
15
|
+
- empty view helper can now check any type. Previously I could only check arrays.
|
|
16
|
+
```html
|
|
17
|
+
// If the value is an array.
|
|
18
|
+
let value = [5, 6];
|
|
19
|
+
{{empty value}} => false
|
|
20
|
+
|
|
21
|
+
{{#if (empty value)}}
|
|
22
|
+
Hello
|
|
23
|
+
{{/if}}
|
|
24
|
+
|
|
25
|
+
// If the value is a string.
|
|
26
|
+
let value = 'Hello';
|
|
27
|
+
{{empty value}} => false
|
|
28
|
+
|
|
29
|
+
let value = '';
|
|
30
|
+
{{empty value}} => true
|
|
31
|
+
|
|
32
|
+
let value = ' ';
|
|
33
|
+
{{empty value}} => true
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- Added not_empty view helper.
|
|
37
|
+
```html
|
|
38
|
+
// If the value is an array.
|
|
39
|
+
let value = [5, 6];
|
|
40
|
+
{{not_empty value}} => true
|
|
41
|
+
|
|
42
|
+
{{#if (not_empty value)}}
|
|
43
|
+
Hello
|
|
44
|
+
{{/if}}
|
|
45
|
+
|
|
46
|
+
// If the value is a string.
|
|
47
|
+
let value = 'Hello';
|
|
48
|
+
{{not_empty value}} => true
|
|
49
|
+
|
|
50
|
+
let value = '';
|
|
51
|
+
{{not_empty value}} => false
|
|
52
|
+
|
|
53
|
+
let value = ' ';
|
|
54
|
+
{{not_empty value}} => false
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## [1.0.13] - 2021-12-13
|
|
58
|
+
### Fixed
|
|
59
|
+
- The model's begin method now accepts the transaction option.
|
|
60
|
+
See [Transaction | Sequelize](https://sequelize.org/master/class/lib/transaction.js~Transaction.html) for transaction options.
|
|
61
|
+
```js
|
|
62
|
+
let transaction;
|
|
63
|
+
try {
|
|
64
|
+
transaction = await BookModel.begin({
|
|
65
|
+
isolationLevel: BookModel.Transaction.ISOLATION_LEVELS.REPEATABLE_READ,
|
|
66
|
+
type: BookModel.Transaction.TYPES.DEFERRED,
|
|
67
|
+
});
|
|
68
|
+
const book = await BookModel.findOne({where: {id: 1}}, {transaction});
|
|
69
|
+
book.title = 'When Im Gone';
|
|
70
|
+
await book.save({transaction});
|
|
71
|
+
await transaction.commit();
|
|
72
|
+
|
|
73
|
+
// Check the update result.
|
|
74
|
+
// Output: New title of book: When Im Gone
|
|
75
|
+
await book.reload();
|
|
76
|
+
console.log(`New title of book: ${book.title}`);
|
|
77
|
+
} catch (err) {
|
|
78
|
+
if (transaction)
|
|
79
|
+
await transaction.rollback();
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
5
83
|
## [1.0.12] - 2021-11-16
|
|
6
84
|
### Fixed
|
|
7
85
|
- Added a method to the model that can execute raw SQL.
|
|
@@ -10,11 +88,11 @@ All notable changes to this project will be documented in this file.
|
|
|
10
88
|
```js
|
|
11
89
|
// By default the function will return two arguments - a results array, and an object containing metadata (such as amount of affected rows, etc).
|
|
12
90
|
// Note that since this is a raw query, the metadata are dialect specific.
|
|
13
|
-
const [results, metadata] = await
|
|
91
|
+
const [results, metadata] = await BookModel.query("UPDATE book SET title = 'When Im Gone' WHERE id = 1");
|
|
14
92
|
|
|
15
93
|
// In cases where you don't need to access the metadata you can pass in a query type to tell sequelize how to format the results. For example, for a simple select query you could do:
|
|
16
94
|
// We didn't need to destructure the result here - the results were returned directly
|
|
17
|
-
const users = await
|
|
95
|
+
const users = await BookModel.query("SELECT * FROM book", {type: BookModel.QueryTypes.SELECT});
|
|
18
96
|
```
|
|
19
97
|
|
|
20
98
|
## [1.0.11] - 2021-11-10
|
|
@@ -90,8 +168,8 @@ All notable changes to this project will be documented in this file.
|
|
|
90
168
|
### Fixed
|
|
91
169
|
- Fixed a bug that caused an error when reading options defined in ESM's default Export.
|
|
92
170
|
|
|
93
|
-
[1.0.1]: https://github.com/takuya-motoshima/express-sweet/
|
|
94
|
-
[1.0.2]: https://github.com/takuya-motoshima/express-sweet/
|
|
171
|
+
[1.0.1]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.0...v1.0.1
|
|
172
|
+
[1.0.2]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.1...v1.0.2
|
|
95
173
|
[1.0.3]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.2...v1.0.3
|
|
96
174
|
[1.0.4]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.3...v1.0.4
|
|
97
175
|
[1.0.5]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.4...v1.0.5
|
|
@@ -101,4 +179,8 @@ All notable changes to this project will be documented in this file.
|
|
|
101
179
|
[1.0.9]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.8...v1.0.9
|
|
102
180
|
[1.0.10]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.9...v1.0.10
|
|
103
181
|
[1.0.11]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.10...v1.0.11
|
|
104
|
-
[1.0.12]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.11...v1.0.12
|
|
182
|
+
[1.0.12]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.11...v1.0.12
|
|
183
|
+
[1.0.13]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.12...v1.0.13
|
|
184
|
+
[1.0.14]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.13...v1.0.14
|
|
185
|
+
[1.0.15]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.14...v1.0.15
|
|
186
|
+
[1.0.16]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.15...v1.0.16
|