optimize imports

This commit is contained in:
InsanusMokrassar 2020-08-15 15:26:46 +06:00
parent 7d2b1772bb
commit b3133cec77
17 changed files with 14 additions and 44 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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(

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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<T> = Pair<SerializationStrategy<T>, T>

View File

@ -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

View File

@ -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

View File

@ -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<MarkupTarget>(
// @Suppress("MemberVisibilityCanBePrivate")
// protected val postsRepo: ReadPostsRepo,

View File

@ -1,7 +1,5 @@
package com.insanusmokrassar.postssystem.markups.core
import com.insanusmokrassar.postssystem.core.post.PostId
typealias MarkupPluginName = String
typealias MarkupPluginIdentifier = String

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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