feat: add ESLint and Prettier configuration for code quality

- Added ESLint with TypeScript support and custom rules.
- Introduced Prettier for consistent code formatting.
- Updated package.json to include lint and format scripts.
- Modified db.ts to ensure proper parsing of BIGINT types from PostgreSQL.
- Enhanced webRoutes to coerce timestamp fields to numbers and format isDeleted as boolean.
This commit is contained in:
2025-10-25 17:33:48 +02:00
parent 09a2b09913
commit 14c80197cc
13 changed files with 1620 additions and 44 deletions
@@ -36,6 +36,7 @@ object WebSocketSyncClient {
.connectTimeout(15, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.writeTimeout(30, TimeUnit.SECONDS)
.pingInterval(15, TimeUnit.SECONDS)
.build()
private fun buildWebSocketUrl(httpApiBaseUrl: String): String {
@@ -127,8 +128,8 @@ object WebSocketSyncClient {
try {
socket = client.newWebSocket(httpRequest, listener)
// Wait up to 15s for response
val result = withTimeout(15_000) { deferred.await() }
// Wait up to 30s for response (WS roundtrip)
val result = withTimeout(30_000) { deferred.await() }
return@withContext result
} catch (e: Exception) {
Logger.w("WS", "Falling back to HTTP sync: ${e.message}")