optimize imports
This commit is contained in:
parent
7d2b1772bb
commit
b3133cec77
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.insanusmokrassar.postssystem.markups.core
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.post.PostId
|
||||
|
||||
typealias MarkupPluginName = String
|
||||
typealias MarkupPluginIdentifier = String
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user