[#3175] added jsvm crypto primitives

This commit is contained in:
Gani Georgiev
2023-08-24 11:25:00 +03:00
parent cdbe6d78d3
commit 02495554cf
7 changed files with 201 additions and 54 deletions
+14 -7
View File
@@ -23,13 +23,13 @@
- Added cron expression macros ([#3132](https://github.com/pocketbase/pocketbase/issues/3132)):
```
"@yearly": "0 0 1 1 *"
"@annually": "0 0 1 1 *"
"@monthly": "0 0 1 * *"
"@weekly": "0 0 * * 0"
"@daily": "0 0 * * *"
"@midnight": "0 0 * * *"
"@hourly": "0 * * * *"
@yearly - "0 0 1 1 *"
@annually - "0 0 1 1 *"
@monthly - "0 0 1 * *"
@weekly - "0 0 * * 0"
@daily - "0 0 * * *"
@midnight - "0 0 * * *"
@hourly - "0 * * * *"
```
- (@todo update docs examples) To minimize the footguns with `Dao.FindFirstRecordByFilter()` and `Dao.FindRecordsByFilter()`, the functions now supports an optional placeholder params argument that is safe to be populated with untrusted user input.
@@ -55,6 +55,13 @@
- Added JSVM `$mails.*` binds for the corresponding Go [mails package](https://pkg.go.dev/github.com/pocketbase/pocketbase/mails) functions.
- Added JSVM helper crypto primitives under the `$security.*` namespace:
```js
$security.md5(text)
$security.sha256(text)
$security.sha512(text)
```
- Fill the `LastVerificationSentAt` and `LastResetSentAt` fields only after a successfull email send ([#3121](https://github.com/pocketbase/pocketbase/issues/3121)).
- Skip API `fields` json transformations for non 20x responses ([#3176](https://github.com/pocketbase/pocketbase/issues/3176)).