-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Gradle 8.5 -> 8.6 * Kotlin 1.9.21 -> 1.9.22 * Ktor 2.3.7 -> 2.3.8 * kotlinx.coroutines 1.7.3 -> 1.8.0 * kotlinx.serialization 1.6.2 -> 1.6.3 * kotlin-logging 6.0.1 -> 6.0.3 * SLF4J 2.0.9 -> 2.0.12 * kotlin-node 18.16.12-pre.619 -> 20.11.5-pre.706 * kotlin-multiplatform-bignum 0.3.8 -> 0.3.9 * KSP 1.9.21-1.0.16 -> 1.9.22-1.0.17 * KotlinPoet 1.15.3 -> 1.16.0 * JUnit 5 5.10.1 -> 5.10.2 * MockK 1.13.8 -> 1.13.10 * AtomicFU 0.23.1 -> 0.23.2 * Binary compatibility validator 0.13.2 -> 0.14.0 * gradle-buildconfig-plugin 5.1.0 -> 5.3.5 * Foojay Toolchains Plugin 0.7.0 -> 0.8.0 * gradle/wrapper-validation-action v1 -> v2 * Replace gradle/gradle-build-action with gradle/actions/setup-gradle
- Loading branch information
1 parent
5b2d7f6
commit e733e07
Showing
14 changed files
with
50 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
package dev.kord.gateway | ||
|
||
import io.ktor.client.plugins.websocket.* | ||
import node.process.process | ||
|
||
internal actual fun Throwable.isTimeout() = this is WebSocketException && "ENOTFOUND" in toString() | ||
internal actual val os: String get() = process.platform.toString() | ||
internal actual val os: String get() = js("process.platform") as String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
package dev.kord.test | ||
|
||
import io.ktor.utils.io.* | ||
import js.iterable.toList | ||
import node.buffer.Buffer | ||
import node.buffer.BufferEncoding | ||
import node.process.process | ||
import node.fs.readFile | ||
|
||
internal suspend fun nodeFile(project: String, path: String): String = | ||
node.fs.readFile("${process.env["PROJECT_ROOT"]}/$project/src/commonTest/resources/$path") | ||
.toString(BufferEncoding.utf8) | ||
readFile("${js("process.env[\"PROJECT_ROOT\"]")}/$project/src/commonTest/resources/$path", BufferEncoding.utf8) | ||
|
||
internal suspend fun nodeReadFile(project: String, path: String): ByteReadChannel { | ||
val buffer = node.fs.readFile("${process.env["PROJECT_ROOT"]}/$project/src/commonTest/resources/$path") | ||
|
||
return ByteReadChannel(buffer.toByteArray()) | ||
} | ||
|
||
private fun Buffer.toByteArray() = values().toList().toByteArray() | ||
internal suspend fun nodeReadFile(project: String, path: String) = ByteReadChannel(nodeFile(project, path)) |