Releases: spxbhuhb/zakadabar-stack
2021.8.17.1
Major Breaking Changes
In this release I've normalized package names. There is an upgrade script
in buildSrc
that is able to apply most changes.
- rename
zakadabar.stack
tozakadabar.core
- move packages from
zakadabar.core.backend
tozakadabar.core
- move packages from
zakadabar.core.frontend
tozakadabar.core.browser
- shuffle files around have them in the right place
- normalize accounts, i18, blobs package names
Things to fix manually:
- change the JVM main class in
build.gradle.kts
tozakadabar.core.server.ServerKt
- change browser form
+ select(bo::field) {...}
to+ bo::field query { ... }
- rename business login plugin classes:
Auditor
toBusinessLogicAuditor
Authorizer
toBusinessLogicAuthorizer
Router
toBusinessLogicRouter
Validator
toBusinessLogicValidator
Core
added:
- optional module dependencies
- basic alarm support interface and fields to BusinessLogicCommon
LogAlarmSupport
andLogAlarmSupport
provider- `Router.prepareAction function (convert strings to action function and parameter)
zkLayoutStyles
stylesgrid1
,grid2
,grid3
ZkTable.oneClick
open details with one clickZkTable
now implements ZkFieldBackend
changed:
- move RoutedModule from jvmMain to commonMain
- fields and methods of tab container classes are now open
ZkFieldBase
now has no type parameterZkFieldBase
uses ZkFieldBackend instead the form itselfZkFieldBase.readOnly
is not an abstract field
... actually ... many other changes, but none reads these change logs anyway
Lib: Markdown
- grow source code sections only when needed
- move copy icon out of the source code section
Cookbook
added:
RecipeParser
- automatically add platform before source code links in code sections
- guide for cookbook and recipe for recipe
changed:
Recipe
move from site into cookbook- move
recipe.yaml
content intorecipie.md
2021.8.4
General
Clarification of visibility policy. From now on we use open
and protected
,
private
is not recommended.
Core
added:
- merge environment variables into settings
--ignore-environment
server option to ignore environment variablesLock
class for multiplatformBoSchemaEntry<T>.decodeFromText
BoSchemaEntry<T>.setFromText
EntityBoCompanion<T>.create(func: T.() -> Unit)
convenience functionLogger.debug
to log debug messagesSlf4jLogger
wrapper aroundorg.slf4j.Logger
ModuleStartupBucket
Logger.error(message, ex)
functionLock
for common codeDefaultSettingProvider
setting provider for common code
changed:
ExposedPaTable.table
is now openBoConstraint.type
toconstraintType
because of serialization conflictmodules
is now aModuleStore
and callsonModuleLoad
when the module is addedStdOutLogger
now adds severity label- move
dependencies
,moduleLogger
,resolveDependencies
,clearModules
from global intoModuleStore
ModuleStore
does not extendInstanceStore
ModuleStore
is now thread safe- move
SettingProvider
frombackend
tostack
InstanceStore
instances is nowprotected
Lib: Accounts
AccountBl.authorize
throws Unauthorized when the account does not existAccountBl.authorize
throws Unauthorized when the account state does not exist- security officer can create password credential record for other users even when there is no existing record
Lib: Blobs
added:
BlobBoCompanion<T,RT>.create(content : ByteArray, func: T.() -> Unit)
convenience function
Lib: Email
New module for email sending.
Cookbook
- module bundle recipe
Bender
changed:
- replace
translate
withlocalized
to avoid deprecation warning - remove
data
from BO package name - remove
backend
from BL, PA package names - replace package name
frontend.pages
withbrowser
in generated browser code - table name pattern is now
${baseName}Table
instead of${baseName}ExposedTableGen
- remove
internal
from table columns - table is now a class by default, table name is constructor parameter
- pa name pattern is now
${baseName}Pa
instead of${baseName}ExposedPaGen
- remove generated comments
fixed:
- authorizer example in the documentation
2021.7.29
Breaking
- ZkPage and all variations are now stateless by default
- ZkArgPage: rename constructor parameter
cssClass
tocss
- ZkArgPage:
args
is now non-null,argsOrNull
may be null - authorizer, auditor, router, validator implementations has to handle null query and action returns
- ZkTable search is now case-insensitive
- ZkPageStyles.fixed now has
position: relative
Core
added:
- basic support for
LocalDate
andLocalDateTime
data types - actions and queries now can return with null result
- BO wrappers for primitive types for actions and queries
- auto-fetching select for entity references
- specify a query for the table directly
EntityId.read
function to read an entity directly from the idnewInstance
function for common code and actual implementationsmatcher
property for ZkCustomColumn- convenience to add Ktor features to the server
changed:
- ZkPage and all variations are now stateless by default
- ZkArgPage constructor parameter
cssClass
tocss
- ZkArgPage
args
is now non-null,argsOrNull
may be null - ZkPageStyles.fixed now has
position: relative
- ZkSelectBase hides arrow when in read-only mode
- ZkSelect2Base hides arrow when in read-only mode
- ZkTableStyles.tr uses pointer cursor
- ZkTable search is now case-insensitive
fixed:
- JDBC for Android: getObject now uses getLong without getInt
ZkCssStyleRule.gridGap
usedgrid-column
instead ofgrid-gap
Demos
changed:
- added
;AUTO_SERVER=TRUE
to H2 URLs
Lib: Accounts
added:
Login.onSuccess
function to make customization easier
changes:
module.kt
(JS) - instances can be passed toinstall
to override defaultsLogin.kt
is now an open class
Site
- cookbook is now a table
2021.7.20
Breaking Changes
Authorizer<EmptyEntityBo>
has to be replaced withAuthorizer<BaseBo>
object : EmptyAuthorizer<EmptyEntityBo>()
has to be replaced withobject : Authorizer<BaseBo>
SimpleRoleAuthorizer<EmptyEntityBo>
has to be replaced withSimpleRoleAuthorizer<BaseBo>
object : KtorRouter<T>(this) {
has to be replaces withobject : KtorEntityRouter<T>(this)
- classes that extend
Router
may have to add?
toRS
- changed the breaking change policy
Project
- move dependency versions into buildSrc:Versions.kt
- split core into core-core and core-android
- move doc out of core
Core
added:
BusinessLogicCommon
classschemaValidator
global variableValidatorProvider
interfaceSchemaValidatorProvider
class- ZkLite: JDBC driver for Android SQLite
- basic support for
LocalDate
andLocalDateTime
data types localizedFormats
global variable- convenience functions for Instant, LocalDate, LocalDateTime format and parse
LocalizedFormat
interfaceBuildinLocalizedFormats
implementation ofLocalizedFormat
changed:
- move global
routerProvider
,auditorProvider
,validatorProvider
to common asexpect
ActionBo
type parameter upper bound is nowAny
instead ofBaseBo
- update authorizer, auditor, router, validator for
ActionBo<T:Any>
- provide truly entity-independent actions and queries
ActionBusinessLogic*
now extendsBusinessLogicCommon
instead ofEntityBusinessLogicCommon
QueryBusinessLogic*
now extendsBusinessLogicCommon
instead ofEntityBusinessLogicCommon
KtorRouter
now does not handle entities,KtorEntityRouter
does
Lib: Accounts
added:
Login.onSuccess
function to make customization easier
changes:
module.kt
(JS) - instances can be passed toinstall
to override defaultsLogin.kt
is now an open class
Cookbook
New sub-project for code examples.
added:
- Standalone Action BL For Logged-In Users
- Standalone Action BL With Null Result
- Standalone Query BL With Public Access
- Standalone Query BL With Null Result
- Access Server Description On the Frontend
- Use Font Files
- Database Transfer
Demos
changed:
- added
;AUTO_SERVER=TRUE
to H2 URLs
Site
- doc is not bundled with the site but pulled from git
- cookbook (very preliminary)
2021.7.9
Core
added:
SimpleRoleAuthorizer.LOGGED_IN
- instance variable to avoid need for importSimpleRoleAuthorizer.PUBLIC
- instance variable to avoid need for importSelectOptionProvider
- interface to make form select definition easier
changed:
- most business logic code moved from
jvmMain
tocommonMain
(should not break anything) ValidityReport
is now a BaseBoBadRequest
sends validity reportSchemaValidator
throwsBadRequest
with validity report
fixed:
- errors in upgrade documentation
Lib: Accounts
AccountList.asSelectProvider
- convenience method to easily build selects for accounts
Lib: Markdown
- code blocks and tables now use up to 90% of the screen
2021.7.5
2021.7.5
Breaking Changes
With this release we've introduced quite a few breaking changes. While the list of
changes is long, the upgrade is quite straightforward, don't worry about it.
core
- Kotlin 1.5.20
- Ktor 1.6.1
- serialization 1.2.1
- coroutines 1.5.0
- Gradle 7.1
AccountPublicBo.displayName
- removeAccountPublicBo.id
- rename toaccountId
AccountPublicBo.organizationName
- removeAccountPublicBo.phone
- new propertyAccountPublicBo
- is BaseBo instead of EntityBoActionBoCompanion
- has no type parameterBoSchema
does not accept emptyEntityId
by defaultDataConflictException
- rename toDataConflict
and move tozakadabar.stack.exceptions
packageQueryBoCompanion
- has no type parameterQueryBo
- type parameter can be anything (not a list by default)RolesBase
- change name toAppRolesBase
and move into.authorize
packageStackRoles.anonymous
- removeStackRoles.siteAdmin
- removeStackRoles.siteMember
- replace withSimpleRoleAuthorizer.Companion.LOGGED_IN
StackRoles
- change name toappRoles
and move into.authorize
packageValidityReport
now stores BOs instead of implementationsZkCssStyleRule
values now are plain strings (instead of any)ZkElement.displayName
- removezkFormStyles.buttons
addedmarginBlockStart
andmarginBlockEnd
CommBase
(JS) - 401 throwsUnauthorized
Forbidden
(JVM) - moved to common
lib: accounts
AccountPrivateBo
- move fields toAccountStateBo
andAccountCredentialsBo
AccountPrivateExposedTable
is now a class instead of object, useAccountPrivateExposedTableCommon
insteadAccountbyRole
is now calledAccountsByRole
KtorSessionBl
now checks forModuleSettings.loginActionRole
instead ofappRoles.siteMember
LoginAction
now throws exception for all fails (even for locked)RoleGrantExposedTable
is now a class instead of an object, useRoleGrantExposedTableCommon
insteadRolesByAccount
containsAccountPublicBo
instead ofAccountPrivateBo
lib: blobs
BlobBo
now has two type parametersBlobBo.disposition
new propertyzkImageStyles
rename toblobStyles
zkFormStyles.imageDropArea
- move toblobStyles
zkFormStyles.imageDropAreaMessage
- move toblobStyles
ZkImageField
- constructor parameter changes
lib: i18n
Locale.status
new propertyLocales
rename toLocaleCrud
Translations
rename toTranslationCrud
TranslationBl
now requires security officer for translation changes
Migration
Deployements
Check the upgrade page 2021.6-to-2021.7
Source Code
Use search & replace with regex on the whole project and replace:
QueryBoCompanion<[^>]+>
with
QueryBoCompanion
ActionBoCompanion<[a-zA-Z0-9]+>
with
ActionBoCompanion
import zakadabar\.stack\.StackRoles
with
import zakadabar.stack.authorize.appRoles
StackRoles
with
appRoles
import zakadabar\.stack\.RolesBase
with
import zakadabar.stack.authorize.AppRolesBase
StackRoles\.siteMember
with
LOGGED_IN
- add import manually
Search for QueryBo<T>
and replace it with QueryBo<List<T>>
(manually).
Search for QueryBusinessLogicBase
and add List
to second parameter
class SimpleStandaloneQueryBl : QueryBusinessLogicBase<SimpleStandaloneQuery, List<SimpleQueryResult>>(
Search for ZkCssStyleSheet
and fix errors:
- add unit numbers, see Size Values
- add
.0
for double values (flexGrow)
Core
added:
- CSS convenience classes, see Value Shorthands
- CSS value postfixes:
.px
,.em
, see Size Values - Make server description available without a session #32
BoSchema.custom
- new function signatureBoSchema.validate
-allowEmptyId
parameter to allow emptyEntityId
CustomBoConstraint
- new constraint classForbidden
- common exception (frontend and backend)ListBoProperty
- property class for listsListBoSchemaEntry
- basic support for lists in schemasServerDescriptionBl
- handlesServerDescriptionQuery
, added automaticallyServerDescriptionQuery
- readsServerDescriptionBo
from the serverUnauthorized
- common exception (frontend and backend)ValidityReport.allowEmptyId
- when true, emptyEntityId
is allowed even for mandatory fieldsZkBuiltinStrings.loginMissingRole
ZkCrudTarget.onBeforeAddedCreate
- last minute customization of the editor for createZkCrudTarget.onBeforeAddedDelete
- last minute customization of the editor for deleteZkCrudTarget.onBeforeAddedRead
- last minute customization of the editor for readZkCrudTarget.onBeforeAddedUpdate
- last minute customization of the editor for updateZkForm.onCreateSuccess
ZkStringStore.childStores
application.stringStores
decodeURIComponent
import from JavaScriptwithConfirm
- convenience for executing a code block after user confirmationzkScrollBarStyles.hideScrollBar
- style to hide the scrollbar completelyZkQueryCrudTarget
- crud target with a customized (not all fields) query for tableZkTable.setData(query)
- convenience to set data of a table from a queryKtorServerBuilder
- handle UnauthorizedLinkedExposedPaBase
- base persistence API for data linked to entitiesLinkedExposedPaTable
- base exposed table for data linked to entities
changed:
- Kotlin 1.5.20
- Ktor 1.6.1
- serialization 1.2.1
- coroutines 1.5.0
- datetime 0.2.1
- Gradle 7.1
- Shadow 7.0.0
AccountPublicBo.displayName
- removeAccountPublicBo.id
- rename toaccountId
AccountPublicBo.organizationName
- removeAccountPublicBo.phone
- new propertyAccountPublicBo
- is BaseBo instead of EntityBoActionBoCompanion
has no type parameterCommBase
(JS) - 401 throwsUnauthorized
DataConflictException
- rename toDataConflict
and move tozakadabar.stack.exceptions
packageEmptySessionManager
- reads server description withServerDescriptionQuery
EntityBusinessLogicBase.pa
is now publicQueryBoCompanion
has no type parameterQueryBo
type parameter is not a listRouter.query
change type parameter RQ from Any to QueryBo to ensure type safetySimpleRoleAuthorizer
supportsLOGGED_IN
special valueValidityReport
now stores BOs instead of implementationsZkAppication
-window.path.location
is now decoded withdecodeUriComponent
before routingZkBuiltinStrings.confirmDelete
- default text is "Are you sure you want to delete?"ZkBuiltinStrings.confirmation
- default text is "Please Confirm"ZkElement.displayName
- removeZkStringField
- do not show mandatory mark when empty value is allowedZkStringStore.merge
- also merge into child storesZkTextArea
- do not show mandatory mark when empty value is allowedZkTextArea
- remove hard-codedflexGrow = 1
andresize = "none"
zkFormStyles.buttons
- added margin before and afterForbidden
- moved from JVM to commonForbidden
- is converted toUnauthorized
when the principal is anonymous
deprecated:
BoSchema.custom
old function with a function parameterBuiltinStrings.cannotAttachMoreImage
replaced bycannotAddMore
removed:
stdlib-jdk8
gradle dependency
fixed:
- The server parameters (stack version and project name) are incorrect #51
- The GitHub task number is misleading in release note 2021.6.16. #50
- all form fields support readOnly
- can chain form field decorator functions (readOnly, label, etc.)
Lib : Accounts
added:
AccountCredentialsBo
(common)AccountList
(common)AccountListSecure
(common)AccountStateBo
(common)CredentialTypes
(common)GetAccountState
(common)ModuleSettings.loginActionRole
(common)ModuleSettings.autoValidate
(common)ModuleSettings.enableAccountList
(common)ModuleSettings.phoneInAccountPublic
(common)AccountCredentialsExposedPa
(JVM)AccountCredentialsExposedTable
(JVM)AccountStateExposedPa
(JVM)AccountStateExposedTable
(JVM)AccountPrivateBlAuthorizer
(JVM)AccountPrivateBl.authorize
(JVM) - audit for fail and success- many unit tests (JVM)
AccountSecure
(JS) - account management CRUD for security officersAccountTableSecure
(JS) - list of accounts for security officersServerSettingsLoader
- move settings loading out ofServer
changed:
AccountPrivateBl
- move authorization intoAccountPrivateBlAuthorizer
CreateAccount
- containsvalidated
andlocked
AccountPrivateBo
- move fields toAccountStateBo
andAccountCredentialsBo
CheckName
is now a queryCheckNameResult
containsAccountPublicBo
instead ofAccountPrivateBo
RolesByAccount
containsAccountPublicBo
instead ofAccountPrivateBo
AccountPrivateExposedTable
is now a class instead of objectKtorSessionBl
now checks forModuleSettings.loginActionRole
instead ofappRoles.siteMember
install
now acceptsaccountPrivateBl
as parameterRoleBl
constructor now requires a persistence apiRoleGrantExposedTable
fields are now publicAccountPrivateTable
fields are now publicLoginAction
now throws exception for all fails (even for locked)- `...
2021.6.22
Core
added:
- authorizer providers now support builder function to add queries and actions, see Authorizer
- SimpleRoleAuthorizer now has a
PUBLIC
keyword to provide public access, see Authorizer - TestCompanionBase helper class for unit tests
changed:
- Backend testing guide to use provided base classes
- ZkInstantColumn now generates CSV data
- ZkTable CSV export now uses
;
as delimiter and BOM in front of the file
fixed:
- ZkCrudTarget now adds
zkPageStyles.fixed
for the table
Lib: Accounts
added:
- AuthTestCompanionBase helper class for authorized unit tests
fixed:
- Additional roles are added only when the database is empty #48
Lib: Blobs
added:
- upload and download convenience functions
- documentation
- unit tests
deprecated:
listByReference
- usebyReference
instead
Lib: Markdown
fixed:
- added hljs import for text blocks
2021.6.16
2021.6.15
Core
added:
- module startup picture
- backend testing documentation
Lib: Accounts
added:
- add application specific roles during startup
- provide basic authentication from header
2021.6.9
Core
changed:
ZkStringField
does not show mandatory mark when min length is 0 and blanks are allowed
fixed:
ZkArgPage.open
used the view name without a localeZkRecordIdField
set the first item no matter what the user choseZkOptRecordIdField
set the first item no matter what the user chose