From 02fd7d4f71a1f28f25525d28367e7cf676cf428a Mon Sep 17 00:00:00 2001 From: Illia Kovalov Date: Sat, 29 Jun 2024 09:50:29 +0200 Subject: [PATCH] spotless --- build.gradle.kts | 20 +- .../com.github.ikovalyov.model/Article.kt | 308 +++++++++--------- .../kotlin/com.github.ikovalyov.model/Item.kt | 30 +- .../kotlin/com.github.ikovalyov.model/Tag.kt | 87 +++-- .../com.github.ikovalyov.model/Template.kt | 37 +-- .../TemplateListItem.kt | 9 +- .../markers/IEditable.kt | 5 +- .../security/Security.kt | 4 +- .../security/ShortString.kt | 8 +- .../security/User.kt | 141 ++++---- .../security/UserRole.kt | 30 +- .../validator/EmailValidator.kt | 4 +- .../kotlin/com/github/ikovalyov/Api.kt | 18 +- src/jsMain/kotlin/com.github.ikovalyov/App.kt | 20 +- .../kotlin/com.github.ikovalyov/Main.kt | 14 +- .../model/security/service/SecurityService.kt | 6 +- .../model/service/TemplateService.kt | 6 +- .../model/service/UserService.kt | 13 +- .../components/bootstrap/ScreenReaderSpan.kt | 2 +- .../react/components/bootstrap/nav/Anchor.kt | 4 +- .../bootstrap/nav/CollapseButton.kt | 2 +- .../components/bootstrap/nav/MenuItem.kt | 4 +- .../react/components/template/Crud.kt | 48 +-- .../react/components/template/ItemList.kt | 44 ++- .../react/components/template/TemplateEdit.kt | 167 +++++----- .../components/template/TemplateInsert.kt | 180 +++++----- .../react/components/template/TemplateView.kt | 37 +-- .../react/components/template/table/Button.kt | 6 +- .../react/components/template/table/Table.kt | 29 +- .../com.github.ikovalyov/routes/Index.kt | 26 +- .../ikovalyov/application/UsersController.kt | 2 +- .../application/api/ArticlesController.kt | 6 +- .../application/api/RecordsController.kt | 10 +- .../application/api/TemplateController.kt | 6 +- .../application/api/UserRolesController.kt | 6 +- .../application/api/UsersApiController.kt | 6 +- .../application/api/ViewsController.kt | 6 +- .../application/auth/AuthController.kt | 6 +- .../ikovalyov/command/DynamoDbInitCommand.kt | 2 +- .../converter/DynamodbArticleConverter.kt | 4 +- .../dynamodb/factory/DynamoDbClientFactory.kt | 20 +- .../repository/AbstractKeyValueRepository.kt | 9 +- .../dynamodb/repository/ArticleRepository.kt | 32 +- .../repository/ConfigurationRepository.kt | 65 ++-- .../dynamodb/repository/CrudRepository.kt | 37 +-- .../dynamodb/repository/RecordsRepository.kt | 7 +- .../dynamodb/repository/TemplateRepository.kt | 37 +-- .../dynamodb/repository/UserRepository.kt | 39 +-- .../dynamodb/repository/UserRoleRepository.kt | 48 ++- .../infrastructure/service/TemplateService.kt | 4 +- .../infrastructure/service/UserService.kt | 4 +- .../ikovalyov/model/extension/Template.kt | 28 +- .../model/extension/UserExtension.kt | 40 +-- .../model/extension/UserRoleExtension.kt | 24 +- .../template/DynamoDbTemplateLoader.kt | 5 +- .../application/api/TemplateControllerTest.kt | 10 +- .../api/UserRolesControllerTest.kt | 26 +- .../repository/ConfigurationRepositoryTest.kt | 3 +- .../repository/RecordsRepositoryTest.kt | 3 +- .../repository/TemplateRepositoryTest.kt | 3 +- .../repository/UserRolesRepositoryTest.kt | 3 +- 61 files changed, 836 insertions(+), 974 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 22f855b6..0b96ecb5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -81,8 +81,8 @@ kotlin { implementation(kotlin("stdlib-js")) implementation( project.dependencies.enforcedPlatform( - "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.763" - ) + "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.763", + ), ) implementation("org.jetbrains.kotlin-wrappers:kotlin-react") implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom") @@ -131,8 +131,8 @@ kotlin { configurations["kapt"].dependencies.addAll( listOf( project.dependencies.create("io.micronaut:micronaut-inject-java:3.10.4"), - project.dependencies.create("info.picocli:picocli-codegen:4.7.6") - ) + project.dependencies.create("info.picocli:picocli-codegen:4.7.6"), + ), ) if (System.getProperty("os.name").lowercase(Locale.getDefault()).contains("mac")) { implementation("io.micronaut:micronaut-runtime-osx") @@ -146,8 +146,8 @@ kotlin { configurations["kaptTest"].dependencies.addAll( listOf( project.dependencies.create("io.micronaut:micronaut-inject-java:3.10.4"), - project.dependencies.create("info.picocli:picocli-codegen:4.7.6") - ) + project.dependencies.create("info.picocli:picocli-codegen:4.7.6"), + ), ) implementation(kotlin("test-junit5")) @@ -212,8 +212,8 @@ spotless { .editorConfigOverride( mapOf( "max_line_length" to "256", - "insert_final_newline" to "true" - ) + "insert_final_newline" to "true", + ), ) } kotlinGradle { @@ -221,8 +221,8 @@ spotless { .editorConfigOverride( mapOf( "max_line_length" to "256", - "insert_final_newline" to "true" - ) + "insert_final_newline" to "true", + ), ) } } diff --git a/src/commonMain/kotlin/com.github.ikovalyov.model/Article.kt b/src/commonMain/kotlin/com.github.ikovalyov.model/Article.kt index 7cf4c2c0..5745ae0c 100644 --- a/src/commonMain/kotlin/com.github.ikovalyov.model/Article.kt +++ b/src/commonMain/kotlin/com.github.ikovalyov.model/Article.kt @@ -26,162 +26,158 @@ data class Article( val meta: List?, val template: Template?, // Template uuid val userList: List, - val templateList: List