From d84f4675a2d52504d863d3d24f80a57430a49ce2 Mon Sep 17 00:00:00 2001 From: NathanFallet Date: Fri, 21 Nov 2025 21:36:58 +0100 Subject: [PATCH] chore: updating deps and cdp models --- .../dev/kdriver/cdp/generate/Poetize.kt | 2 +- cdp/build.gradle.kts | 3 +- .../dev/kdriver/cdp/MessageSerializer.kt | 1 - .../kotlin/dev/kdriver/cdp/Serialization.kt | 10 +++++ .../dev/kdriver/cdp/domain/Accessibility.kt | 1 - .../dev/kdriver/cdp/domain/Animation.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Audits.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Autofill.kt | 1 - .../kdriver/cdp/domain/BackgroundService.kt | 1 - .../kdriver/cdp/domain/BluetoothEmulation.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Browser.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/CSS.kt | 1 - .../dev/kdriver/cdp/domain/CacheStorage.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Cast.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Console.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/DOM.kt | 1 - .../dev/kdriver/cdp/domain/DOMDebugger.kt | 1 - .../dev/kdriver/cdp/domain/DOMSnapshot.kt | 1 - .../dev/kdriver/cdp/domain/DOMStorage.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Debugger.kt | 1 - .../dev/kdriver/cdp/domain/DeviceAccess.kt | 1 - .../kdriver/cdp/domain/DeviceOrientation.kt | 1 - .../dev/kdriver/cdp/domain/Emulation.kt | 1 - .../kdriver/cdp/domain/EventBreakpoints.kt | 1 - .../dev/kdriver/cdp/domain/Extensions.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/FedCm.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Fetch.kt | 1 - .../dev/kdriver/cdp/domain/FileSystem.kt | 1 - .../cdp/domain/HeadlessExperimental.kt | 1 - .../dev/kdriver/cdp/domain/HeapProfiler.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/IO.kt | 1 - .../dev/kdriver/cdp/domain/IndexedDB.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Input.kt | 1 - .../dev/kdriver/cdp/domain/Inspector.kt | 1 - .../dev/kdriver/cdp/domain/LayerTree.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Log.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Media.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Memory.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Network.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Overlay.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/PWA.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Page.kt | 1 - .../dev/kdriver/cdp/domain/Performance.kt | 1 - .../kdriver/cdp/domain/PerformanceTimeline.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Preload.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Profiler.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Runtime.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Schema.kt | 14 +------ .../kotlin/dev/kdriver/cdp/domain/Security.kt | 1 - .../dev/kdriver/cdp/domain/ServiceWorker.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Storage.kt | 1 - .../dev/kdriver/cdp/domain/SystemInfo.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Target.kt | 1 - .../dev/kdriver/cdp/domain/Tethering.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/Tracing.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/WebAudio.kt | 1 - .../kotlin/dev/kdriver/cdp/domain/WebAuthn.kt | 1 - core/build.gradle.kts | 16 ++++---- .../dev/kdriver/core/browser/HTTPApi.kt | 2 +- .../core/connection/DefaultConnection.kt | 5 ++- .../kotlin/dev/kdriver/core/dom/Extensions.kt | 2 +- .../dev/kdriver/core/network/Extensions.kt | 2 +- .../kotlin/dev/kdriver/core/tab/DefaultTab.kt | 4 +- .../kotlin/dev/kdriver/core/tab/Extensions.kt | 3 +- gradle/libs.versions.toml | 41 +++++++++++++++++++ settings.gradle.kts | 41 ------------------- 66 files changed, 73 insertions(+), 125 deletions(-) create mode 100644 cdp/src/commonMain/kotlin/dev/kdriver/cdp/Serialization.kt create mode 100644 gradle/libs.versions.toml diff --git a/cdp-generate/src/main/kotlin/dev/kdriver/cdp/generate/Poetize.kt b/cdp-generate/src/main/kotlin/dev/kdriver/cdp/generate/Poetize.kt index 1e3608ecb..3141fa7a0 100644 --- a/cdp-generate/src/main/kotlin/dev/kdriver/cdp/generate/Poetize.kt +++ b/cdp-generate/src/main/kotlin/dev/kdriver/cdp/generate/Poetize.kt @@ -9,7 +9,7 @@ val CDP = ClassName(BASE_PACKAGE_NAME, "CDP") val DOMAIN = ClassName(BASE_PACKAGE_NAME, "Domain") val COMMAND_MODE = ClassName(PACKAGE_NAME, "CommandMode") val FLOW = ClassName("kotlinx.coroutines.flow", "Flow") -val SERIALIZATION = ClassName("dev.kaccelero.serializers", "Serialization") +val SERIALIZATION = ClassName("dev.kdriver.cdp", "Serialization") val SERIALIZABLE = ClassName("kotlinx.serialization", "Serializable") val SERIALNAME = ClassName("kotlinx.serialization", "SerialName") val JSONELEMENT = ClassName("kotlinx.serialization.json", "JsonElement") diff --git a/cdp/build.gradle.kts b/cdp/build.gradle.kts index 9ce2368ec..721d59c74 100644 --- a/cdp/build.gradle.kts +++ b/cdp/build.gradle.kts @@ -86,7 +86,8 @@ kotlin { } val commonMain by getting { dependencies { - api(libs.kaccelero.core) + api(libs.kotlinx.coroutines.core) + api(libs.kotlinx.serialization.json) } } val jvmTest by getting { diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/MessageSerializer.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/MessageSerializer.kt index 73dfae952..15afd5567 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/MessageSerializer.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/MessageSerializer.kt @@ -1,6 +1,5 @@ package dev.kdriver.cdp -import dev.kaccelero.serializers.Serialization import kotlinx.serialization.InternalSerializationApi import kotlinx.serialization.KSerializer import kotlinx.serialization.descriptors.SerialDescriptor diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/Serialization.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/Serialization.kt new file mode 100644 index 000000000..13da66a81 --- /dev/null +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/Serialization.kt @@ -0,0 +1,10 @@ +package dev.kdriver.cdp + +import kotlinx.serialization.json.Json + +object Serialization { + val json = Json { + ignoreUnknownKeys = true + explicitNulls = false + } +} diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Accessibility.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Accessibility.kt index 2605d14dd..8c27d1f73 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Accessibility.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Accessibility.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Animation.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Animation.kt index a9711e0f1..55faeec81 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Animation.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Animation.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Audits.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Audits.kt index f25f8a5b8..ec54a71c3 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Audits.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Audits.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Autofill.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Autofill.kt index 6d4b71558..ecc68f1c3 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Autofill.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Autofill.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BackgroundService.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BackgroundService.kt index 8f6ef74a1..b281db4b3 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BackgroundService.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BackgroundService.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BluetoothEmulation.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BluetoothEmulation.kt index 12f7632a1..99cf27c11 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BluetoothEmulation.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/BluetoothEmulation.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Browser.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Browser.kt index d6fdf66c2..50e0165e3 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Browser.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Browser.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CSS.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CSS.kt index e8b609d54..636dc6c34 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CSS.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CSS.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CacheStorage.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CacheStorage.kt index 74e3b4b76..8d19ce273 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CacheStorage.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/CacheStorage.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Cast.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Cast.kt index cea62159c..ca87078ae 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Cast.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Cast.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Console.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Console.kt index ead4a0952..4a12b567e 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Console.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Console.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOM.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOM.kt index 69b8f9720..76475cb29 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOM.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOM.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMDebugger.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMDebugger.kt index e1a0a83bb..b7d709953 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMDebugger.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMDebugger.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMSnapshot.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMSnapshot.kt index 20b1de588..6cb2a1bc2 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMSnapshot.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMSnapshot.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.decodeFromJsonElement diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMStorage.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMStorage.kt index 9c500c0a3..97ba8c5c4 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMStorage.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DOMStorage.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Debugger.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Debugger.kt index fc137f221..9ff4205b0 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Debugger.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Debugger.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceAccess.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceAccess.kt index f930218fe..17d627105 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceAccess.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceAccess.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceOrientation.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceOrientation.kt index 036219f15..5d88bac05 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceOrientation.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/DeviceOrientation.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.encodeToJsonElement diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Emulation.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Emulation.kt index f5a5795e7..2f1216fcf 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Emulation.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Emulation.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/EventBreakpoints.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/EventBreakpoints.kt index e30615962..36cfa1ae6 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/EventBreakpoints.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/EventBreakpoints.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.encodeToJsonElement diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Extensions.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Extensions.kt index 2004cf9e3..e0a718089 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Extensions.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Extensions.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FedCm.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FedCm.kt index 00317fe14..580c66b1c 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FedCm.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FedCm.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Fetch.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Fetch.kt index 20fe1ace3..8f37df8a8 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Fetch.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Fetch.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FileSystem.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FileSystem.kt index 268adb512..d0812f066 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FileSystem.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/FileSystem.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.decodeFromJsonElement diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeadlessExperimental.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeadlessExperimental.kt index d5d9783dc..e564ea8b9 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeadlessExperimental.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeadlessExperimental.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.decodeFromJsonElement diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeapProfiler.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeapProfiler.kt index 5c184dc22..42b82bba4 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeapProfiler.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/HeapProfiler.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IO.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IO.kt index b4fee8e05..a8579e792 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IO.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IO.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.decodeFromJsonElement diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IndexedDB.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IndexedDB.kt index 40fa235e8..048aacfeb 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IndexedDB.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/IndexedDB.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.decodeFromJsonElement diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Input.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Input.kt index 9f0be9d84..6fa89c1db 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Input.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Input.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Inspector.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Inspector.kt index fa6fef4c9..8a2fc1177 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Inspector.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Inspector.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/LayerTree.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/LayerTree.kt index 946502e53..12af03ea7 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/LayerTree.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/LayerTree.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Log.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Log.kt index 1014fdef5..670c07976 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Log.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Log.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Media.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Media.kt index f2ed4e347..6db1fa380 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Media.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Media.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Memory.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Memory.kt index 7cd5555e0..875cc8b74 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Memory.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Memory.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Network.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Network.kt index 0908361cf..f4b400279 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Network.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Network.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Overlay.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Overlay.kt index 4e14ab734..4a69f1b42 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Overlay.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Overlay.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PWA.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PWA.kt index 894ba93cf..bb12c1df7 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PWA.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PWA.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Page.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Page.kt index 0e21fe1b6..ecfaf81e3 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Page.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Page.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Performance.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Performance.kt index f1dc89481..dcb791474 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Performance.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Performance.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PerformanceTimeline.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PerformanceTimeline.kt index 9250acfbb..86225057a 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PerformanceTimeline.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/PerformanceTimeline.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Preload.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Preload.kt index 1c3c93a13..2d5201ad7 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Preload.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Preload.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Profiler.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Profiler.kt index e014a51f9..a5ea4c408 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Profiler.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Profiler.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Runtime.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Runtime.kt index 48f1d9330..194b171f1 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Runtime.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Runtime.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Schema.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Schema.kt index c8e6b373c..b7c15bb56 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Schema.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Schema.kt @@ -2,21 +2,9 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization -import dev.kdriver.cdp.CDP -import dev.kdriver.cdp.CommandMode -import dev.kdriver.cdp.Domain -import dev.kdriver.cdp.cacheGeneratedDomain -import dev.kdriver.cdp.getGeneratedDomain -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlinx.coroutines.flow.filter -import kotlinx.coroutines.flow.filterNotNull -import kotlinx.coroutines.flow.map +import dev.kdriver.cdp.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.decodeFromJsonElement -import kotlinx.serialization.json.encodeToJsonElement /** * This domain is deprecated. diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Security.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Security.kt index 055d15b38..dbb20cb1e 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Security.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Security.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/ServiceWorker.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/ServiceWorker.kt index 1880e0985..f83e3aa49 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/ServiceWorker.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/ServiceWorker.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Storage.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Storage.kt index c0e79da9b..52d00e983 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Storage.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Storage.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/SystemInfo.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/SystemInfo.kt index 1a45a3bd0..505aa3ad9 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/SystemInfo.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/SystemInfo.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Target.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Target.kt index 598c8999d..7e0a31431 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Target.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Target.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tethering.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tethering.kt index ca92f07ef..accd30eed 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tethering.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tethering.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tracing.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tracing.kt index e43b04eac..74b78155a 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tracing.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/Tracing.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAudio.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAudio.kt index eb639e814..41eb35497 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAudio.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAudio.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAuthn.kt b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAuthn.kt index 8a706c0e3..9d899c804 100644 --- a/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAuthn.kt +++ b/cdp/src/commonMain/kotlin/dev/kdriver/cdp/domain/WebAuthn.kt @@ -2,7 +2,6 @@ package dev.kdriver.cdp.domain -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 549289956..c8b4326ab 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -70,26 +70,26 @@ kotlin { val commonMain by getting { dependencies { api(project(":cdp")) - api(libs.ktor.serialization.kotlinx.json) - api(libs.ktor.client.content.negotiation) + api(libs.ktor.serializationKotlinxJson) + api(libs.ktor.clientContentNegotiation) api(libs.kotlinx.io) } } val jvmMain by getting { dependencies { - api(libs.ktor.client.apache) - api(libs.ktor.client.cio) + api(libs.ktor.clientApache) + api(libs.ktor.clientCio) api(libs.zstd) } } val jsMain by getting { dependencies { - api(libs.ktor.client.js) + api(libs.ktor.clientJs) } } val appleMain by getting { dependencies { - api(libs.ktor.client.darwin) + api(libs.ktor.clientDarwin) } } val posixMain by creating { @@ -98,7 +98,7 @@ kotlin { val linuxMain by getting { dependsOn(posixMain) dependencies { - api(libs.ktor.client.curl) + api(libs.ktor.clientCurl) } } val macosMain by getting { @@ -106,7 +106,7 @@ kotlin { } val mingwMain by getting { dependencies { - api(libs.ktor.client.winhttp) + api(libs.ktor.clientWinhttp) } } val jvmTest by getting { diff --git a/core/src/commonMain/kotlin/dev/kdriver/core/browser/HTTPApi.kt b/core/src/commonMain/kotlin/dev/kdriver/core/browser/HTTPApi.kt index 70252b590..497345bc6 100644 --- a/core/src/commonMain/kotlin/dev/kdriver/core/browser/HTTPApi.kt +++ b/core/src/commonMain/kotlin/dev/kdriver/core/browser/HTTPApi.kt @@ -1,6 +1,6 @@ package dev.kdriver.core.browser -import dev.kaccelero.serializers.Serialization +import dev.kdriver.cdp.Serialization import dev.kdriver.core.connection.getHttpApiClientEngine import io.ktor.client.* import io.ktor.client.call.* diff --git a/core/src/commonMain/kotlin/dev/kdriver/core/connection/DefaultConnection.kt b/core/src/commonMain/kotlin/dev/kdriver/core/connection/DefaultConnection.kt index ebaebfd91..678fabff4 100644 --- a/core/src/commonMain/kotlin/dev/kdriver/core/connection/DefaultConnection.kt +++ b/core/src/commonMain/kotlin/dev/kdriver/core/connection/DefaultConnection.kt @@ -1,6 +1,5 @@ package dev.kdriver.core.connection -import dev.kaccelero.serializers.Serialization import dev.kdriver.cdp.* import dev.kdriver.cdp.domain.* import dev.kdriver.core.browser.Browser @@ -18,14 +17,16 @@ import kotlinx.coroutines.flow.filterIsInstance import kotlinx.coroutines.flow.first import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock -import kotlinx.datetime.Clock import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.jsonPrimitive import kotlin.reflect.KClass +import kotlin.time.Clock +import kotlin.time.ExperimentalTime /** * Default implementation of the [Connection] interface. */ +@OptIn(ExperimentalTime::class) open class DefaultConnection( private val websocketUrl: String, private val messageListeningScope: CoroutineScope, diff --git a/core/src/commonMain/kotlin/dev/kdriver/core/dom/Extensions.kt b/core/src/commonMain/kotlin/dev/kdriver/core/dom/Extensions.kt index 3425838b8..4784eb872 100644 --- a/core/src/commonMain/kotlin/dev/kdriver/core/dom/Extensions.kt +++ b/core/src/commonMain/kotlin/dev/kdriver/core/dom/Extensions.kt @@ -1,6 +1,6 @@ package dev.kdriver.core.dom -import dev.kaccelero.serializers.Serialization +import dev.kdriver.cdp.Serialization import dev.kdriver.cdp.domain.DOM import dev.kdriver.cdp.domain.Input import kotlinx.serialization.json.JsonNull diff --git a/core/src/commonMain/kotlin/dev/kdriver/core/network/Extensions.kt b/core/src/commonMain/kotlin/dev/kdriver/core/network/Extensions.kt index 06b9dc61d..c9c9c9541 100644 --- a/core/src/commonMain/kotlin/dev/kdriver/core/network/Extensions.kt +++ b/core/src/commonMain/kotlin/dev/kdriver/core/network/Extensions.kt @@ -1,6 +1,6 @@ package dev.kdriver.core.network -import dev.kaccelero.serializers.Serialization +import dev.kdriver.cdp.Serialization import kotlin.io.encoding.ExperimentalEncodingApi /** diff --git a/core/src/commonMain/kotlin/dev/kdriver/core/tab/DefaultTab.kt b/core/src/commonMain/kotlin/dev/kdriver/core/tab/DefaultTab.kt index 63b22aabe..e3ae57530 100644 --- a/core/src/commonMain/kotlin/dev/kdriver/core/tab/DefaultTab.kt +++ b/core/src/commonMain/kotlin/dev/kdriver/core/tab/DefaultTab.kt @@ -18,7 +18,6 @@ import io.ktor.util.logging.* import io.ktor.utils.io.core.* import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.delay -import kotlinx.datetime.Clock import kotlinx.io.buffered import kotlinx.io.files.Path import kotlinx.io.files.SystemFileSystem @@ -26,7 +25,9 @@ import kotlinx.serialization.json.JsonElement import kotlin.io.encoding.Base64 import kotlin.io.encoding.ExperimentalEncodingApi import kotlin.math.abs +import kotlin.time.Clock import kotlin.time.Duration.Companion.seconds +import kotlin.time.ExperimentalTime /** * Represents a browser tab, which is a connection to a specific target in the browser. @@ -34,6 +35,7 @@ import kotlin.time.Duration.Companion.seconds * This class provides methods to interact with the tab, such as navigating to URLs, * managing history, evaluating JavaScript expressions, and manipulating the DOM. */ +@OptIn(ExperimentalTime::class) open class DefaultTab( websocketUrl: String, messageListeningScope: CoroutineScope, diff --git a/core/src/commonMain/kotlin/dev/kdriver/core/tab/Extensions.kt b/core/src/commonMain/kotlin/dev/kdriver/core/tab/Extensions.kt index df9d584fe..8364b5c9b 100644 --- a/core/src/commonMain/kotlin/dev/kdriver/core/tab/Extensions.kt +++ b/core/src/commonMain/kotlin/dev/kdriver/core/tab/Extensions.kt @@ -1,9 +1,8 @@ package dev.kdriver.core.tab -import dev.kaccelero.serializers.Serialization +import dev.kdriver.cdp.Serialization import kotlinx.serialization.json.decodeFromJsonElement - /** * Evaluates a JavaScript expression in the context of the tab. * diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..c7e8f7795 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,41 @@ +[versions] +kotlin = "2.1.21" +kover = "0.8.3" +detekt = "1.23.8" +dokka = "2.0.0" +ksp = "2.1.21-2.0.2" +maven = "0.30.0" +ktor = "3.1.3" +mockk = "1.13.12" +jsoup = "1.16.2" +kotlinx-coroutines = "1.10.2" +kotlinx-serialization = "1.9.0" +kotlinx-io = "0.7.0" +zstd = "1.5.7-4" + +[plugins] +multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +maven = { id = "com.vanniktech.maven.publish", version.ref = "maven" } + +[libraries] +ktor-serializationKotlinxJson = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } +ktor-clientWebsockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" } +ktor-clientContentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } +ktor-clientApache = { module = "io.ktor:ktor-client-apache", version.ref = "ktor" } +ktor-clientCio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } +ktor-clientJs = { module = "io.ktor:ktor-client-js", version.ref = "ktor" } +ktor-clientDarwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } +ktor-clientCurl = { module = "io.ktor:ktor-client-curl", version.ref = "ktor" } +ktor-clientWinhttp = { module = "io.ktor:ktor-client-winhttp", version.ref = "ktor" } +tests-mockk = { module = "io.mockk:mockk", version.ref = "mockk" } +tests-jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" } +tests-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } +kotlinx-io = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version.ref = "kotlinx-io" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } +zstd = { module = "com.github.luben:zstd-jni", version.ref = "zstd" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 02dc479fc..0cca6f1ff 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,47 +9,6 @@ plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" } -dependencyResolutionManagement { - versionCatalogs { - create("libs") { - // Plugins - version("kotlin", "2.1.21") - plugin("multiplatform", "org.jetbrains.kotlin.multiplatform").versionRef("kotlin") - plugin("serialization", "org.jetbrains.kotlin.plugin.serialization").versionRef("kotlin") - plugin("kover", "org.jetbrains.kotlinx.kover").version("0.8.3") - plugin("detekt", "io.gitlab.arturbosch.detekt").version("1.23.8") - plugin("dokka", "org.jetbrains.dokka").version("2.0.0") - plugin("ksp", "com.google.devtools.ksp").version("2.1.21-2.0.2") - plugin("maven", "com.vanniktech.maven.publish").version("0.30.0") - - // Kaccelero - version("kaccelero", "0.6.7") - library("kaccelero-core", "dev.kaccelero", "core").versionRef("kaccelero") - - // Ktor - version("ktor", "3.1.3") - library("ktor-serialization-kotlinx-json", "io.ktor", "ktor-serialization-kotlinx-json").versionRef("ktor") - library("ktor-client-websockets", "io.ktor", "ktor-client-websockets").versionRef("ktor") - library("ktor-client-content-negotiation", "io.ktor", "ktor-client-content-negotiation").versionRef("ktor") - library("ktor-client-apache", "io.ktor", "ktor-client-apache").versionRef("ktor") - library("ktor-client-cio", "io.ktor", "ktor-client-cio").versionRef("ktor") - library("ktor-client-js", "io.ktor", "ktor-client-js").versionRef("ktor") - library("ktor-client-darwin", "io.ktor", "ktor-client-darwin").versionRef("ktor") - library("ktor-client-curl", "io.ktor", "ktor-client-curl").versionRef("ktor") - library("ktor-client-winhttp", "io.ktor", "ktor-client-winhttp").versionRef("ktor") - - // Tests - library("tests-mockk", "io.mockk:mockk:1.13.12") - library("tests-jsoup", "org.jsoup:jsoup:1.16.2") - library("tests-coroutines", "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0") - - // Others - library("kotlinx-io", "org.jetbrains.kotlinx:kotlinx-io-core:0.7.0") - library("zstd", "com.github.luben:zstd-jni:1.5.7-4") - } - } -} - rootProject.name = "kdriver" includeBuild("cdp-generate") include(":cdp")