diff --git a/core/exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsRepoCommonTests.kt b/core/exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsRepoCommonTests.kt index 7773949f..4765e576 100644 --- a/core/exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsRepoCommonTests.kt +++ b/core/exposed/src/test/kotlin/com/insanusmokrassar/postssystem/core/exposed/ExposedPostsRepoCommonTests.kt @@ -1,7 +1,7 @@ package com.insanusmokrassar.postssystem.core.exposed import com.insanusmokrassar.postssystem.core.post.SimplePost -import kotlinx.coroutines.* +import kotlinx.coroutines.runBlocking import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.transactions.transactionManager import java.io.File diff --git a/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/content/WriteContentRepoKtorClient.kt b/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/content/WriteContentRepoKtorClient.kt index 04126f49..a7b71515 100644 --- a/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/content/WriteContentRepoKtorClient.kt +++ b/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/content/WriteContentRepoKtorClient.kt @@ -6,8 +6,6 @@ import com.insanusmokrassar.postssystem.core.ktor.* import com.insanusmokrassar.postssystem.ktor.client.* import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import io.ktor.client.HttpClient -import io.ktor.client.request.post -import io.ktor.client.request.url import kotlinx.coroutines.flow.Flow import kotlinx.serialization.builtins.nullable import kotlinx.serialization.builtins.serializer diff --git a/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/post/WritePostsRepoKtorClient.kt b/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/post/WritePostsRepoKtorClient.kt index ec4c283d..3a9aed1f 100644 --- a/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/post/WritePostsRepoKtorClient.kt +++ b/core/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/ktor/client/post/WritePostsRepoKtorClient.kt @@ -7,8 +7,6 @@ import com.insanusmokrassar.postssystem.ktor.client.* import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import io.ktor.client.HttpClient import io.ktor.client.features.websocket.WebSockets -import io.ktor.client.request.post -import io.ktor.client.request.url import kotlinx.coroutines.flow.Flow import kotlinx.serialization.builtins.nullable import kotlinx.serialization.builtins.serializer diff --git a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/ReadContentRepoRoutingConfigurator.kt b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/ReadContentRepoRoutingConfigurator.kt index 96e17313..b54c04b7 100644 --- a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/ReadContentRepoRoutingConfigurator.kt +++ b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/ReadContentRepoRoutingConfigurator.kt @@ -6,12 +6,9 @@ import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo import com.insanusmokrassar.postssystem.core.ktor.* import com.insanusmokrassar.postssystem.ktor.server.* import com.insanusmokrassar.postssystem.ktor.server.configurators.ApplicationRoutingConfigurator -import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import io.ktor.application.call -import io.ktor.http.HttpStatusCode -import io.ktor.response.respond -import io.ktor.response.respondBytes -import io.ktor.routing.* +import io.ktor.routing.Route +import io.ktor.routing.get import kotlinx.serialization.builtins.nullable fun Route.configureReadContentRepoRoutes( diff --git a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/WriteContentRepoRoutingConfigurator.kt b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/WriteContentRepoRoutingConfigurator.kt index 10db47f8..6d14145e 100644 --- a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/WriteContentRepoRoutingConfigurator.kt +++ b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/content/WriteContentRepoRoutingConfigurator.kt @@ -7,10 +7,8 @@ import com.insanusmokrassar.postssystem.ktor.server.* import com.insanusmokrassar.postssystem.ktor.server.configurators.ApplicationRoutingConfigurator import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import io.ktor.application.call -import io.ktor.response.respondBytes import io.ktor.routing.Route import io.ktor.routing.post -import io.ktor.util.toByteArray import kotlinx.serialization.builtins.nullable import kotlinx.serialization.builtins.serializer diff --git a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/ReadPostsRepoRoutingConfigurator.kt b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/ReadPostsRepoRoutingConfigurator.kt index f1c68bce..e4c498d4 100644 --- a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/ReadPostsRepoRoutingConfigurator.kt +++ b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/ReadPostsRepoRoutingConfigurator.kt @@ -7,13 +7,9 @@ import com.insanusmokrassar.postssystem.core.post.RegisteredPost import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo import com.insanusmokrassar.postssystem.ktor.server.* import com.insanusmokrassar.postssystem.ktor.server.configurators.ApplicationRoutingConfigurator -import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import com.insanusmokrassar.postssystem.utils.common.MAX_DATE import com.insanusmokrassar.postssystem.utils.common.MIN_DATE import io.ktor.application.call -import io.ktor.http.HttpStatusCode -import io.ktor.response.respond -import io.ktor.response.respondBytes import io.ktor.routing.Route import io.ktor.routing.get import kotlinx.serialization.builtins.nullable diff --git a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/WritePostsRepoRoutingConfigurator.kt b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/WritePostsRepoRoutingConfigurator.kt index bcfee761..68eb1f6a 100644 --- a/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/WritePostsRepoRoutingConfigurator.kt +++ b/core/ktor/server/src/main/kotlin/com/insanusmokrassar/postssystem/core/ktor/server/post/WritePostsRepoRoutingConfigurator.kt @@ -7,9 +7,8 @@ import com.insanusmokrassar.postssystem.ktor.server.* import com.insanusmokrassar.postssystem.ktor.server.configurators.ApplicationRoutingConfigurator import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import io.ktor.application.call -import io.ktor.response.respondBytes -import io.ktor.routing.* -import io.ktor.util.toByteArray +import io.ktor.routing.Route +import io.ktor.routing.post import kotlinx.serialization.builtins.nullable import kotlinx.serialization.builtins.serializer diff --git a/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/FlowsWebsockets.kt b/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/FlowsWebsockets.kt index 21fea0fe..190780d1 100644 --- a/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/FlowsWebsockets.kt +++ b/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/FlowsWebsockets.kt @@ -1,11 +1,13 @@ package com.insanusmokrassar.postssystem.ktor.client -import com.insanusmokrassar.postssystem.ktor.* +import com.insanusmokrassar.postssystem.ktor.asCorrectWebSocketUrl import com.insanusmokrassar.postssystem.utils.common.safely import io.ktor.client.HttpClient import io.ktor.client.features.websocket.ws -import io.ktor.http.cio.websocket.* -import kotlinx.coroutines.flow.* +import io.ktor.http.cio.websocket.Frame +import io.ktor.http.cio.websocket.readBytes +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.channelFlow /** * @param checkReconnection This lambda will be called when it is required to reconnect to websocket to establish diff --git a/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/StandardHttpClientGetPost.kt b/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/StandardHttpClientGetPost.kt index ed42c57c..06b042fe 100644 --- a/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/StandardHttpClientGetPost.kt +++ b/ktor/client/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/client/StandardHttpClientGetPost.kt @@ -4,7 +4,8 @@ import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import io.ktor.client.HttpClient import io.ktor.client.request.get import io.ktor.client.request.post -import kotlinx.serialization.* +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerializationStrategy typealias BodyPair = Pair, T> diff --git a/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/FlowsWebsocket.kt b/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/FlowsWebsocket.kt index dd4a04b5..8e86a864 100644 --- a/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/FlowsWebsocket.kt +++ b/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/FlowsWebsocket.kt @@ -1,10 +1,9 @@ package com.insanusmokrassar.postssystem.ktor.server -import com.insanusmokrassar.postssystem.ktor.* +import com.insanusmokrassar.postssystem.ktor.CorrectCloseException import com.insanusmokrassar.postssystem.utils.common.safely import io.ktor.http.cio.websocket.* import io.ktor.routing.Route -import io.ktor.routing.route import io.ktor.websocket.webSocket import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.collect diff --git a/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/ServerRoutingShortcuts.kt b/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/ServerRoutingShortcuts.kt index 035287ed..906e3321 100644 --- a/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/ServerRoutingShortcuts.kt +++ b/ktor/server/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/ktor/server/ServerRoutingShortcuts.kt @@ -2,7 +2,6 @@ package com.insanusmokrassar.postssystem.ktor.server import com.insanusmokrassar.postssystem.ktor.standardKtorSerialFormat import io.ktor.application.ApplicationCall -import io.ktor.application.call import io.ktor.http.HttpStatusCode import io.ktor.response.respond import io.ktor.response.respondBytes diff --git a/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/AbstractMarkupPlugin.kt b/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/AbstractMarkupPlugin.kt index 43cd3dd5..8fd9f496 100644 --- a/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/AbstractMarkupPlugin.kt +++ b/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/AbstractMarkupPlugin.kt @@ -1,11 +1,5 @@ package com.insanusmokrassar.postssystem.markups.core -import com.insanusmokrassar.postssystem.core.content.RegisteredContent -import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo -import com.insanusmokrassar.postssystem.core.post.PostId -import com.insanusmokrassar.postssystem.core.post.RegisteredPost -import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo - //abstract class AbstractMarkupPlugin( // @Suppress("MemberVisibilityCanBePrivate") // protected val postsRepo: ReadPostsRepo, diff --git a/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupPlugin.kt b/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupPlugin.kt index 9e3833fd..e1046f27 100644 --- a/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupPlugin.kt +++ b/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupPlugin.kt @@ -1,7 +1,5 @@ package com.insanusmokrassar.postssystem.markups.core -import com.insanusmokrassar.postssystem.core.post.PostId - typealias MarkupPluginName = String typealias MarkupPluginIdentifier = String diff --git a/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupsSystem.kt b/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupsSystem.kt index a7de89e6..78b3bfdd 100644 --- a/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupsSystem.kt +++ b/markups/commons/src/commonMain/kotlin/com/insanusmokrassar/postssystem/markups/core/MarkupsSystem.kt @@ -1,6 +1,6 @@ package com.insanusmokrassar.postssystem.markups.core -import com.insanusmokrassar.postssystem.markups.core.utils.* +import com.insanusmokrassar.postssystem.markups.core.utils.ListBuilder import com.insanusmokrassar.postssystem.utils.common.pagination.* import com.insanusmokrassar.postssystem.utils.repos.ReadStandardCRUDRepo import kotlin.math.min diff --git a/markups/html/src/jsMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt b/markups/html/src/jsMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt index ee950f65..afd825b5 100644 --- a/markups/html/src/jsMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt +++ b/markups/html/src/jsMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt @@ -1,9 +1,5 @@ package com.insanusmokrassar.postssystem.markups.html -import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo -import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo -import kotlinx.html.FlowContent - //abstract class HtmlMarkupPlugin( // postsRepo: ReadPostsRepo, // postsContentRepo: ReadContentRepo diff --git a/markups/html/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt b/markups/html/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt index ee950f65..afd825b5 100644 --- a/markups/html/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt +++ b/markups/html/src/jvmMain/kotlin/com/insanusmokrassar/postssystem/markups/html/HtmlMarkupPlugin.kt @@ -1,9 +1,5 @@ package com.insanusmokrassar.postssystem.markups.html -import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo -import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo -import kotlinx.html.FlowContent - //abstract class HtmlMarkupPlugin( // postsRepo: ReadPostsRepo, // postsContentRepo: ReadContentRepo diff --git a/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingTrigger.kt b/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingTrigger.kt index ec047e3e..217bf2f3 100644 --- a/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingTrigger.kt +++ b/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingTrigger.kt @@ -3,7 +3,6 @@ package com.insanusmokrassar.postssystem.core.publishing import com.insanusmokrassar.postssystem.core.post.PostId import com.insanusmokrassar.postssystem.core.post.RegisteredPost import com.insanusmokrassar.postssystem.core.post.repo.PostsRepo -import com.insanusmokrassar.postssystem.core.post.repo.WritePostsRepo import com.insanusmokrassar.postssystem.core.publishing.repos.PublishedPostsWriteRepo import com.insanusmokrassar.postssystem.core.publishing.repos.PublishingKeysRepo import kotlinx.coroutines.channels.BroadcastChannel