v0.26.0
Features
- Added support for migrations. See Migrations.
- Added an
error
hook toRemultServerOptions
that is called whenever there is an error in the API lifecycle. See RemultServerOptions. - Added
ForbiddenError
to the API, you can throw it anywhere in the request lifecycle to display a forbidden 401 error. - Added
@Fields.literal
and@Fields.enum
. - Added support for
better-sqlite3
without knex, see Connection a Database. - Added support for
bun:sqlite
#387. - Added a generic implementation for
sqlite
that can be easily extended to any provider. - Added
apiPreprocessFilter
andbackendPreprocessFilter
, see access control. - Added a way to analyze filter and query it -
Filter.getPreciseValues
, which returns aFilterPreciseValues
object containing the precise values for each property. see access control. - Added an exception when calling
updateMany
ordeleteMany
without a filter - to protect against accidental deleting/updating all data. - Added updateMany and deleteMany to OpenAPI (swagger) & graphql
Improvements
- Added validation for
@Fields.number
&Fields.integer
that the value is a valid number. - Added "basic" supports for environments where async hooks doesn't work well - mostly for web based dev machines.
- Improved the API of
rawFilter
so it can now return the SQL where to be added to the command. see Leveraging Custom Filters for Enhanced Data Filtering KnexDataProvider
now supports allexecute
andcreateCommand
and can be used with anySqlDatabase
functionality.- Changed postgres schema builder to use
timestamptz
instead oftimestamp
. - Changed the default storage of
@Fields.object
totext
(varchar max) instead of string 255 inknex
andsqlite
.
Documentation Updates
- Added or rewrote the following articles:
- Migrations
- Access Control
- Custom/SQL Filter
- Direct Database Access
- Extensibility
- Lots of
jsdocs
improvements
Bug Fixes
- Fixed an issue with entity ids that included date.
- Fixed an issue with
repo(Entity,dataProvider)
- where saving wasn't fired because of wrongisProxy
inference. - Fixed an issue with chaining of validators that in some cases caused a validator to be overwritten.
- Fixed
ValueConverters
Number
fromInput
handle 0 as a valid value.
Breaking Changes
- Changed the signature of
updateMany
anddeleteMany
to require awhere
parameter:repo(Task).delete({ where: { completed: true } })
. - Changed the signature of
getDb
to receiveDataProvider
as a parameter instead ofRemult
. - Changed the POST REST API queries to include the filter under the
where
key in the body - previously, it included the filter as the body itself.
New Contributors
Full Changelog: v0.25.8...v0.26.0