Skip to content

Releases: codeborne/klite

1.6.9

06 Jul 09:21
Compare
Choose a tag to compare
  • core: logger(name) is now accessible without a class instance context
  • core: Any.logger() will now take the closest non-anonymous superclass
  • server: errors.on(StatusCode) convenience reified function added
  • server: AssetsHandler will now allow serving of SPA index.html even if requested directory in assets exists
  • jdbc: BaseCrudRepository.list() and by() now both have the suffix parameter
  • jdbc: handle Postgres "cached plan must not change result type" exception by enabling autosave=conservative by default

1.6.8

06 Apr 09:17
Compare
Choose a tag to compare
  • server: ErrorHandler now supports finding of handlers using exception super classes
  • jobs: fix deprecated schedule() method implementation

1.6.7

02 Apr 18:59
Compare
Choose a tag to compare
  • core: Converter can now force initialize type arguments' companion objects
  • core: Decimal.absoluteValue and Decimal.sign introduced, like other numeric types in Kotlin
  • core: Registry and TypedHttpClient moved from server module, so that JsonHttpClient can be used without the server
  • server: HttpExchange.path<>(), query<>(), and session<>() now allow for automatic String conversion into value types
  • server: Browser class better detects various iOS browsers that run on Apple WebKit
  • jobs: deprecated non-Duration schedule() methods
  • oauth: support for missing first or last names or locale
  • jdbc: initial support for Postgres listen/notify
  • slf4j: fix length optimization of stack traces in StackTraceOptimizingLogger

1.6.6

04 Mar 21:47
Compare
Choose a tag to compare
  • core: Converter will force initialize companion objects to better support init { Converter.use {...} }
  • core: Converter now supports inline classes with multiple constructors automatically
  • core: Converter now supports any static(String) method automatically, not only parse()
  • core: Cache keepAlive function introduced to prolong external cache entries
  • server: KeyCipher now uses base64UrlEncode() internally instead of plain base64
  • jdbc: db.upsert() now uses excluded special table name for update part instead of setting values twice

1.6.5

07 Feb 13:00
Compare
Choose a tag to compare
  • core: simple Cache with expiration timer implemented
  • oauth: AppleOAuthClient updated and tested
  • oauth: JWT helper class introduced
  • jdbc: introduced db.upsertBatch()
  • jobs: runOnce() introduced for convenience
  • json: throw more descriptive errors from JsonNode.get() in case of missing keys

1.6.4

24 Jan 08:42
Compare
Choose a tag to compare
  • core: added common value types for Email, Phone, and Password, also StringValue base class
  • jdbc: introduced db.insertBatch()
  • jdbc: deprecated Entity interface (UUID-based), which can be replaced with BaseEntity
  • jdbc: support SqlComputed with other operators, e.g. where = "date" lte SqlComputed("currrent_date")
  • server: added path to annotated(), to make paths more visible in one place
  • server: make a few more Server properties public (sessionStore, notFoundHandler, etc)
  • server: bugfix after 1.6.0: wrap notFoundHandler correctly to produce correct 404 response
  • server: NotFoundRoute introduced to be easily distinguishable from normal routes
  • oauth: new experimental OAuth 2.0 login module

1.6.3

07 Jan 19:50
Compare
Choose a tag to compare
  • 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 in BaseRepository.save

1.6.2

18 Dec 21:36
Compare
Choose a tag to compare
  • 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

18 Dec 21:35
Compare
Choose a tag to compare
  • jdbc: and() introduced in addition to or() for more convenient composition of where expressions
  • Kotlin and other dependency updates

1.6.0

25 Aug 14:07
Compare
Choose a tag to compare
  • 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