fix `expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. Consider using the '-Xexpect-actual-classes' flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573

This commit is contained in:
2025-12-10 09:06:48 +01:00
parent f0d85aa4da
commit 52f7b33cbb
11 changed files with 17 additions and 2 deletions
@@ -1,3 +1,5 @@
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
package at.mocode.frontend.core.localdb
import app.cash.sqldelight.db.SqlDriver
@@ -1,3 +1,5 @@
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
package at.mocode.frontend.core.localdb
import app.cash.sqldelight.db.SqlDriver
@@ -1,3 +1,5 @@
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
package at.mocode.frontend.core.localdb
import app.cash.sqldelight.db.SqlDriver
@@ -1,5 +1,6 @@
package at.mocode.frontend.core.network
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
expect object PlatformConfig {
fun resolveApiBaseUrl(): String
}
@@ -2,7 +2,7 @@ package at.mocode.frontend.core.network
import kotlinx.browser.window
@Suppress("UnsafeCastFromDynamic")
@Suppress("UnsafeCastFromDynamic", "EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
actual object PlatformConfig {
actual fun resolveApiBaseUrl(): String {
// 1) Prefer a global JS variable (can be injected by index.html or nginx)
@@ -1,5 +1,6 @@
package at.mocode.frontend.core.network
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
actual object PlatformConfig {
actual fun resolveApiBaseUrl(): String {
// Prefer environment variable
@@ -23,7 +23,10 @@ val authFeatureModule = module {
// Bridge to core network TokenProvider without adding a hard dependency there
single<TokenProvider> {
object : TokenProvider {
override fun getAccessToken(): String? = get<AuthTokenManager>().getToken()
override fun getAccessToken(): String? {
val token = get<AuthTokenManager>().getToken()
return token
}
}
}
}
@@ -2,6 +2,7 @@ package at.mocode.clients.authfeature.oauth
data class CallbackParams(val code: String, val state: String?)
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
expect object AuthCallbackParams {
/**
* Parse OAuth callback parameters from the current environment.
@@ -19,6 +19,7 @@ object OAuthParams {
* For the desktop (JVM) target we currently do not start a browser flow,
* but we provide hashing to keep API parity.
*/
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
expect object OAuthPkceService {
/** Starts a PKCE auth attempt and stores transient state in memory. */
suspend fun startAuth(): PkceState
@@ -2,6 +2,7 @@ package at.mocode.clients.authfeature.oauth
import kotlinx.browser.window
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
actual object AuthCallbackParams {
actual fun parse(): CallbackParams? {
val search = window.location.search
@@ -43,6 +43,7 @@ private fun sha256(input: String): Promise<ArrayBuffer> {
return subtle.digest("SHA-256", data) as Promise<ArrayBuffer>
}
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
actual object OAuthPkceService {
actual suspend fun startAuth(): PkceState {
val codeVerifier = randomUrlSafe(64)