Compare commits

..

8 Commits

Author SHA1 Message Date
renovate[bot]
0615050b0d Update Gradle to v8.14.5 2026-05-07 17:48:49 +00:00
6f3488518b Merge pull request #143 from InsanusMokrassar/0.30.0
0.30.0
2026-04-20 00:26:58 +06:00
cd4c893f7c update plagubot version 2026-04-20 00:20:42 +06:00
2487d51606 update dependencies 2026-04-20 00:18:57 +06:00
6b28e89595 start 0.30.0 2026-04-19 23:56:21 +06:00
7729ada3bb Merge pull request #136 from InsanusMokrassar/0.29.0
0.29.0
2026-03-10 15:13:05 +06:00
58c4fe90b9 update dependencies and fix build 2026-03-10 15:06:58 +06:00
60cbe3bb70 start 0.29.0 2026-03-08 15:05:47 +06:00
10 changed files with 36 additions and 18 deletions

10
CHANGELOG.md Normal file
View File

@@ -0,0 +1,10 @@
# Changelog
## 0.30.0
* `Kotlin`: `2.3.20`
* `MicroUtils`: `0.29.2`
* `Exposed`: `1.2.0`
* `PlaguBot`: `11.2.0`
* `TgBotAPI`: `33.1.0`
* `Serialization`: `1.11.0`

View File

@@ -34,7 +34,7 @@ class DefaultAdminsCacheAPIRepoImpl(
private val scope: CoroutineScope
) : DefaultAdminsCacheAPIRepo {
private val actor = scope.actorAsync<RepoActions<*>>(Channel.UNLIMITED) {
safelyWithoutExceptions(
runCatchingLogging (
{ e ->
it.deferred.completeExceptionally(e)
}

View File

@@ -14,7 +14,7 @@ import kotlinx.serialization.*
import kotlinx.serialization.json.Json
import kotlinx.serialization.modules.SerializersModule
import kotlinx.serialization.modules.polymorphic
import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.v1.jdbc.Database
val telegramAdminsSerializationFormat = Json {
ignoreUnknownKeys = true

View File

@@ -16,7 +16,7 @@ import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import kotlinx.serialization.*
import kotlinx.serialization.json.JsonObject
import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.v1.jdbc.Database
import org.koin.core.Koin
import org.koin.core.module.Module
import org.koin.core.qualifier.named

View File

@@ -1,3 +1,5 @@
@file:Suppress("RemoveExplicitTypeArguments", "unused")
package dev.inmo.tgbotapi.libraries.cache.media.micro_utils
import dev.inmo.micro_utils.repos.*
@@ -8,7 +10,6 @@ import dev.inmo.tgbotapi.types.MessageId
import dev.inmo.tgbotapi.types.message.content.MessageContent
import kotlinx.serialization.*
import kotlinx.serialization.builtins.PairSerializer
import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.json.Json
import kotlinx.serialization.modules.SerializersModule
import kotlin.js.JsName
@@ -52,11 +53,12 @@ val chatIdToMessageIdentifierSerializer = PairSerializer(
val messageContentSerializer = PolymorphicSerializer<MessageContent>(MessageContent::class)
inline fun <K> KeyValueRepo<K, MessageContent>.asMessageContentCache() = SimpleKeyValueMessageContentCache(this)
fun <K> KeyValueRepo<K, MessageContent>.asMessageContentCache() = SimpleKeyValueMessageContentCache(this)
inline fun KeyValueRepo<String, String>.asMessageContentCache(
serialFormatCreator: (SerializersModule) -> StringFormat = { Json { serializersModule = it } }
): StandardKeyValueRepo<Pair<ChatId, MessageId>, MessageContent> {
@Suppress("OPT_IN_USAGE")
val serialFormat = serialFormatCreator(MessageContent.serializationModule())
return withMapper<Pair<ChatId, MessageId>, MessageContent, String, String>(
{ serialFormat.encodeToString(chatIdToMessageIdentifierSerializer, this) },
@@ -71,6 +73,7 @@ inline fun KeyValueRepo<String, String>.asMessageContentCache(
inline fun KeyValueRepo<String, String>.asMessageContentCache(
serialFormatCreator: (SerializersModule) -> BinaryFormat
): StandardKeyValueRepo<Pair<ChatId, MessageId>, MessageContent> {
@Suppress("OPT_IN_USAGE")
val serialFormat = serialFormatCreator(MessageContent.serializationModule())
return withMapper<Pair<ChatId, MessageId>, MessageContent, String, String>(
{ serialFormat.encodeToHexString(chatIdToMessageIdentifierSerializer, this) },
@@ -85,6 +88,7 @@ inline fun KeyValueRepo<String, String>.asMessageContentCache(
inline fun KeyValueRepo<ByteArray, ByteArray>.asMessageContentCache(
serialFormatCreator: (SerializersModule) -> BinaryFormat
): StandardKeyValueRepo<Pair<ChatId, MessageId>, MessageContent> {
@Suppress("OPT_IN_USAGE")
val serialFormat = serialFormatCreator(MessageContent.serializationModule())
return withMapper<Pair<ChatId, MessageId>, MessageContent, ByteArray, ByteArray>(
{ serialFormat.encodeToByteArray(chatIdToMessageIdentifierSerializer, this) },

View File

@@ -6,23 +6,23 @@ kotlin.incremental=true
kotlin.incremental.js=true
kotlin_version=2.2.21
kotlin_serialisation_core_version=1.9.0
kotlin_version=2.3.20
kotlin_serialisation_core_version=1.11.0
github_release_plugin_version=2.5.2
tgbotapi_version=30.0.2
micro_utils_version=0.26.8
exposed_version=0.61.0
plagubot_version=10.10.0
tgbotapi_version=33.1.0
micro_utils_version=0.29.2
exposed_version=1.2.0
plagubot_version=11.2.0
nmcp_version=1.3.0
nmcp_version=1.4.4
# Dokka
dokka_version=2.1.0
dokka_version=2.2.0
# Project data
group=dev.inmo
version=0.28.0
version=0.30.0

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

7
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -114,6 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -171,6 +172,7 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -210,6 +212,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

3
gradlew.bat vendored
View File

@@ -70,10 +70,11 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell