refactor(build, dependencies): introduce SQLDelight WebWorker setup, update Spring Boot dependencies, and align versions

Configured `sqlite.worker.js` for OPFS-backed SQLite WASM operations in the frontend build pipeline. Added new Spring Boot dependency bundles including secure service configurations. Integrated updated database utilities with enhanced error handling. Removed outdated circuit breaker tests and replaced them with modern unit and integration test setups.
This commit is contained in:
2026-01-12 17:05:44 +01:00
parent 2f8529156a
commit 32e43b8fb0
23 changed files with 402 additions and 526 deletions
@@ -3,6 +3,6 @@ package at.mocode.frontend.core.localdb
import app.cash.sqldelight.db.SqlDriver
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
expect class DatabaseDriverFactory {
expect class DatabaseDriverFactory() {
suspend fun createDriver(): SqlDriver
}
@@ -0,0 +1,26 @@
package at.mocode.frontend.core.localdb
import org.koin.dsl.module
/**
* Thin wrapper around SQLDelight `AppDatabase` creation.
*
* The platform-specific part is the `DatabaseDriverFactory` (expect/actual),
* which provides the appropriate SQLDelight driver (JVM sqlite driver, JS WebWorkerDriver, ...).
*/
class DatabaseProvider(
private val driverFactory: DatabaseDriverFactory
) {
suspend fun createDatabase(): AppDatabase {
val driver = driverFactory.createDriver()
return AppDatabase(driver)
}
}
/**
* Koin module to provide the SQLDelight database for all frontend targets.
*/
val localDbModule = module {
single<DatabaseDriverFactory> { DatabaseDriverFactory() }
single<DatabaseProvider> { DatabaseProvider(get()) }
}