Releases: codeborne/klite
Releases · codeborne/klite
1.6.3
- server: added support for SSE (Server-Side Events)
- json: improve parsing of complex types with parameters
- jdbc: introduce
NullableId
for entities with null ids until they are persisted. - jdbc: introduce
UpdatableEntity
for optimistic locking inBaseRepository.save
1.6.2
- server: fix check for requested assets being inside of assets directory
- server: introduced FormDataRenderer
- core/json: KClass.createFrom will report missing parameters in a nicer way
- core: conversion of enum values from string is now case-insensitive
- json: can convert number to a custom type using opts.values
- json: TSGenerator: better detection of types of inline classes with several computed properties
- jdbc: upsert() now has skipUpdateFields parameter
1.6.1
- jdbc: and() introduced in addition to or() for more convenient composition of where expressions
- Kotlin and other dependency updates
1.6.0
- server: notFoundHandler is now decorated separately in each context, so that decorators can intercept and handle missing routes (e.g. CorsHandler)
- server: ErrorHandler will now omit the default message thrown by first() function ("List/Collection is empty.") and generate a standard 404 NotFound response
- server: ThrowableHandler now has HttpExchange as receiver for cleaner code, as it is not used in most handlers anyway
- server: ThrowableHandler returning null will now proceed with next handler, eventually producing error 500 if not handled
- server: Route is now a KAnnotatedElement, so that findAnnotation/hasAnnotation() functions from kotlin-reflect should be used on it (not backwards-compatible)
- jdbc: startDevDB() will now throw an exception if docker-compose returns a non-zero exit code
- jdbc: deprecated 1.4.x functions removed, please upgrade from 1.4.x to 1.5.0 first, fix deprecations, and then to 1.6.x
- openapi: new module that can generate OpenAPI json spec file for all routes in a context
1.5.6
- jdbc: DB_READONLY=true env var can be used to make the whole app read-only (e.g. when migrating the DB, instead of Heroku maintenance mode)
- jdbc: CrudRepository.get() now has optional forUpdate parameter
- HttpExchange.fileName() added for setting of Content-Disposition
- json bugfix: json within json (and '') are now properly escaped
- json bugfix: render Any type as 'any' instead of 'string' in TSGenerator
- csv: new module for CSV parsing/generation
1.5.5
- jdbc: support reading of collections of Decimal from DB array columns
- jdbc: db.upsert() now has an optional "where" parameter
- server: AssetsHandler.headerModifier now gets file parameter to make decisions based on it
- server: allow having annotations on AssetsHandler for e.g. access checks
1.5.4
- json: ValueConverter can now be used to transform strings into types
- json: JsonNode.getList() signature fixed
- json: improve error message when trying to parse an empty stream
- json: JsonParser.readArray can now be used to stream json arrays without loading them into memory
- jdbc: close connection (return to pool) even if autoCommit/commit/rollback fails
- server: support for boolean query parameters without values, e.g. ?flag
- server: support for anonymous handler annotations (fixed in Kotlin 1.8)
1.5.3
- server: TypedHttpClient/JsonHttpClient uses a better logger name (from nearest user class)
- json/jackson: TypedHttpClient/JsonHttpClient now have overridable trimToLog property in case you need to process how requests/responses are logged
- jobs: JobRunner.schedule() now takes kotlin.time.Duration values
- jdbc: PooledDataSource - a simple and easy to configure connection pool (used in DBModule by default)
- jdbc: use HikariModule instead of DBModule if you still want to use Hikari (also add dependency on com.zaxxer:HikariCP)
- liquibase/serialization - dependencies updated
1.5.2
- core: experimental Decimal class to be used for monetary values, with numerical equality (unlike BigDecimal)
- core/json: use default values for explicitly passed nulls if property is not nullable
- core/json: unwrap InvocationTargetException, so that any validation exceptions thrown from data class constructors is propagated properly
- core/json: workaround for a bug in kotlin-reflect, which boxes null values even if nullable inline type is used: https://youtrack.jetbrains.com/issue/KT-57590
- json: TSGenerator can now receive additional library types to generate from command-line, e.g. klite.TSID
- i18n: do not trim translations by default (keep all whitespace)
- jdbc: support binding of Int values to data classes (DB usually returns integers as Long)
- jdbc: possibility to use table aliases when getting of columns from ResultSet with joins/using create (Postgres only)
- jdbc: allow whitespace between -- and keywords in changeset sql files
- server: default RequestLogFormatter will not log StatusCodeExceptions anymore
- server: useHashCodeAsETag() introduced to avoid sending of same responses
- server: run onStop handlers in reverse order of registration, so that e.g. connection pool is stopped after jobs are stopped
- jobs: do not start new jobs on shutdown while waiting for running jobs to finish
1.5.1
- json: ValueConverter.from() can now have access to the expected KType
- json: TSGenerator to generate TypeScript types for data classes/enums
- server: AppScope.async now is the standard async function that returns a Deferred. Use AppScope.launch if you want exceptions to be logged