Compare commits

..

19 Commits

Author SHA1 Message Date
renovate[bot]
7863da397e Update Gradle to v9 2026-05-13 04:10:26 +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
63f15e96bf Merge pull request #130 from InsanusMokrassar/0.28.0
0.28.0
2025-12-17 14:45:58 +06:00
167f302eff update dependencies
org.jetbrains.kotlin:kotlin-gradle-plugin 2.2.20 -> 2.2.21
dev.inmo:tgbotapi 30.0.0 -> 30.0.2
dev.inmo:micro_utils.repos.common 0.26.6 -> 0.26.8
dev.inmo:plagubot.plugin 10.9.0 -> 10.10.0
com.gradleup.nmcp 1.2.0 -> 1.3.0
2025-12-17 14:44:02 +06:00
8332ed482e start 0.28.0 2025-12-17 14:30:30 +06:00
061bac146c Merge pull request #127 from InsanusMokrassar/0.27.0
0.27.0
2025-10-21 23:20:45 +06:00
00fc2a1e0b update dependencies 2025-10-21 23:20:18 +06:00
1e2e45c404 start 0.27.0 2025-10-21 23:17:55 +06:00
17398781a5 Merge pull request #124 from InsanusMokrassar/0.26.8
0.26.8
2025-09-04 17:44:40 +06:00
f86dbcefce update dependencies 2025-09-04 17:38:47 +06:00
e4aba03cdc start 0.26.8 2025-09-04 17:33:39 +06:00
c8f8608a60 Merge pull request #117 from InsanusMokrassar/0.26.7
0.26.7
2025-08-04 13:47:08 +06:00
19fcee9f3e start 0.26.7 and update dependencies 2025-08-04 13:38:57 +06:00
10 changed files with 43 additions and 42 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.1.20
kotlin_serialisation_core_version=1.8.1
kotlin_version=2.3.20
kotlin_serialisation_core_version=1.11.0
github_release_plugin_version=2.5.2
tgbotapi_version=26.0.0
micro_utils_version=0.25.8
exposed_version=0.61.0
plagubot_version=10.6.0
tgbotapi_version=33.1.0
micro_utils_version=0.29.2
exposed_version=1.2.0
plagubot_version=11.2.0
nmcp_version=0.2.1
nmcp_version=1.4.4
# Dokka
dokka_version=2.0.0
dokka_version=2.2.0
# Project data
group=dev.inmo
version=0.26.6
version=0.30.0

Binary file not shown.

View File

@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

7
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 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/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/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,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ 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" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

32
gradlew.bat vendored
View File

@@ -23,8 +23,8 @@
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Set local scope for the variables, and ensure extensions are enabled
setlocal EnableExtensions
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@@ -51,7 +51,7 @@ echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
"%COMSPEC%" /c exit 1
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
@@ -65,30 +65,18 @@ echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
"%COMSPEC%" /c exit 1
: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%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
:exitWithErrorLevel
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
"%COMSPEC%" /c exit %ERRORLEVEL%