From 8a8d1ce56166c4494e46e9dc22ef1b887dfb49f4 Mon Sep 17 00:00:00 2001 From: lukellmann Date: Thu, 25 May 2023 22:24:31 +0200 Subject: [PATCH] Update dependencies * Kotlin 1.8.21 -> 1.9.0 * Ktor 2.3.0 -> 2.3.2 * kotlinx.coroutines 1.7.1 -> 1.7.2 * kotlin-node 18.16.3-pre.546 -> 18.16.12-pre.591-compat * KSP 1.8.21-1.0.11 -> 1.9.0-1.0.11 * KotlinPoet 1.13.2 -> 1.14.2 * Dokka 1.8.10 -> 1.8.20 * AtomicFU 0.20.2 -> 0.21.0 * Binary compatibility validator 0.13.1 -> 0.13.2 * gradle-buildconfig-plugin 4.0.4 -> 4.1.1 * Foojay Toolchains Plugin 0.4.0 -> 0.5.0 --- buildSrc/src/main/kotlin/Compiler.kt | 3 +- .../kotlin/kord-internal-module.gradle.kts | 5 - .../src/main/kotlin/kord-module.gradle.kts | 12 +- common/api/common.api | 8 + .../dev/kord/common/entity/ActivityType.kt | 25 +- .../kord/common/entity/AllowedMentionType.kt | 23 +- .../entity/ApplicationCommandOptionType.kt | 22 +- .../ApplicationCommandPermissionType.kt | 24 +- .../common/entity/ApplicationCommandType.kt | 24 +- .../ApplicationRoleConnectionMetadataType.kt | 24 +- .../dev/kord/common/entity/AuditLogEvent.kt | 25 +- .../common/entity/AutoModerationActionType.kt | 24 +- .../entity/AutoModerationRuleEventType.kt | 24 +- .../AutoModerationRuleKeywordPresetType.kt | 24 +- .../entity/AutoModerationRuleTriggerType.kt | 24 +- .../dev/kord/common/entity/ButtonStyle.kt | 25 +- .../dev/kord/common/entity/ChannelType.kt | 25 +- .../dev/kord/common/entity/ComponentType.kt | 28 +- .../entity/DefaultMessageNotificationLevel.kt | 24 +- .../entity/DiscordConnectionVisibility.kt | 24 +- .../dev/kord/common/entity/EmbedType.kt | 24 +- .../common/entity/ExplicitContentFilter.kt | 24 +- .../dev/kord/common/entity/ForumLayoutType.kt | 24 +- .../dev/kord/common/entity/GuildFeature.kt | 27 +- .../entity/GuildScheduledEventPrivacyLevel.kt | 24 +- .../entity/GuildScheduledEventStatus.kt | 24 +- .../entity/IntegrationExpireBehavior.kt | 24 +- .../common/entity/InteractionResponseType.kt | 24 +- .../dev/kord/common/entity/InteractionType.kt | 25 +- .../kord/common/entity/InviteTargetType.kt | 24 +- .../kotlin/dev/kord/common/entity/MFALevel.kt | 25 +- .../kord/common/entity/MessageActivityType.kt | 24 +- .../kord/common/entity/MessageStickerType.kt | 24 +- .../dev/kord/common/entity/MessageType.kt | 25 +- .../dev/kord/common/entity/NsfwLevel.kt | 25 +- .../common/entity/OnboardingPromptType.kt | 24 +- .../dev/kord/common/entity/OverwriteType.kt | 25 +- .../dev/kord/common/entity/PremiumTier.kt | 25 +- .../dev/kord/common/entity/PresenceStatus.kt | 24 +- .../kord/common/entity/ScheduledEntityType.kt | 24 +- .../dev/kord/common/entity/SortOrderType.kt | 25 +- .../entity/StageInstancePrivacyLevel.kt | 25 +- .../kord/common/entity/TeamMembershipState.kt | 24 +- .../dev/kord/common/entity/TextInputStyle.kt | 25 +- .../dev/kord/common/entity/UserPremium.kt | 25 +- .../kord/common/entity/VerificationLevel.kt | 24 +- .../kord/common/entity/VideoQualityMode.kt | 24 +- .../dev/kord/common/entity/WebhookType.kt | 25 +- common/src/commonMain/kotlin/DiscordBitSet.kt | 4 +- .../commonMain/kotlin/KordConfiguration.kt | 11 +- .../nonJvmMain/kotlin/ConcurrentHashMap.kt | 4 +- core/src/commonTest/kotlin/UtilKtTest.kt | 2 +- gateway/api/gateway.api | 2 + .../src/commonMain/kotlin/DefaultGateway.kt | 4 +- gateway/src/commonMain/kotlin/OpCode.kt | 3 +- .../commonMain/kotlin/builder/LoginBuilder.kt | 2 +- gateway/src/commonTest/kotlin/json/Util.kt | 1 - gradle/libs.versions.toml | 20 +- kotlin-js-store/yarn.lock | 459 +----------------- ksp-annotations/build.gradle.kts | 4 +- .../src/main/kotlin/KotlinPoetDsl.kt | 30 +- .../kotlin/kordenum/KordEnumGeneration.kt | 7 +- rest/api/rest.api | 2 + .../commonMain/kotlin/json/JsonErrorCode.kt | 3 +- .../commonMain/kotlin/request/HttpUtils.kt | 2 +- .../kotlin/dev/kord/gateway/GatewayExample.kt | 2 - settings.gradle.kts | 3 +- test-kit/src/jsMain/kotlin/Platform.node.kt | 4 +- voice/api/voice.api | 2 + .../kotlin/dev/kord/voice/EncryptionMode.kt | 24 +- .../encryption/XSalsa20Poly1305Encryption.kt | 6 +- voice/src/main/kotlin/gateway/OpCode.kt | 3 +- 72 files changed, 537 insertions(+), 1170 deletions(-) diff --git a/buildSrc/src/main/kotlin/Compiler.kt b/buildSrc/src/main/kotlin/Compiler.kt index 9186be66c29a..97fed44a4643 100644 --- a/buildSrc/src/main/kotlin/Compiler.kt +++ b/buildSrc/src/main/kotlin/Compiler.kt @@ -12,7 +12,6 @@ object OptIns { } val kordOptIns = listOf( - "kotlin.time.ExperimentalTime", "kotlin.contracts.ExperimentalContracts", "dev.kord.common.annotation.KordInternal", @@ -27,7 +26,7 @@ object Jvm { fun KotlinCommonCompilerOptions.applyKordCompilerOptions() { allWarningsAsErrors = true - freeCompilerArgs.add("-progressive") + progressiveMode = true } fun KotlinSourceSet.applyKordOptIns() { diff --git a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts index b61a5411875d..102f730ea2ee 100644 --- a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { org.jetbrains.kotlin.jvm } @@ -10,9 +8,6 @@ repositories { kotlin { jvmToolchain(Jvm.target) -} - -tasks.withType().configureEach { compilerOptions { applyKordCompilerOptions() } diff --git a/buildSrc/src/main/kotlin/kord-module.gradle.kts b/buildSrc/src/main/kotlin/kord-module.gradle.kts index 9d321ee57167..bb56104574fb 100644 --- a/buildSrc/src/main/kotlin/kord-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-module.gradle.kts @@ -28,6 +28,11 @@ kotlin { jvmToolchain(Jvm.target) + compilerOptions { + applyKordCompilerOptions() + optIn.addAll(kordOptIns) + } + sourceSets { // allow `ExperimentalCoroutinesApi` for `TestScope.currentTime` test { languageSettings.optIn(OptIns.coroutines) } @@ -37,13 +42,6 @@ kotlin { configureAtomicFU() tasks { - withType().configureEach { - compilerOptions { - applyKordCompilerOptions() - freeCompilerArgs.addAll(kordOptIns.map { "-opt-in=$it" }) - } - } - withType().configureEach { useJUnitPlatform() } diff --git a/common/api/common.api b/common/api/common.api index b218c9cb7a25..9c9e56f072d8 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -70,6 +70,7 @@ public final class dev/kord/common/DiscordTimestampStyle : java/lang/Enum { public static final field ShortDate Ldev/kord/common/DiscordTimestampStyle; public static final field ShortDateTime Ldev/kord/common/DiscordTimestampStyle; public static final field ShortTime Ldev/kord/common/DiscordTimestampStyle; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getStyle ()Ljava/lang/String; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/DiscordTimestampStyle; public static fun values ()[Ldev/kord/common/DiscordTimestampStyle; @@ -193,6 +194,7 @@ public final class dev/kord/common/entity/ActivityFlag : java/lang/Enum { public static final field Play Ldev/kord/common/entity/ActivityFlag; public static final field Spectate Ldev/kord/common/entity/ActivityFlag; public static final field Sync Ldev/kord/common/entity/ActivityFlag; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ActivityFlag; public static fun values ()[Ldev/kord/common/entity/ActivityFlag; @@ -544,6 +546,7 @@ public final class dev/kord/common/entity/ApplicationFlag : java/lang/Enum { public static final field GatewayPresenceLimited Ldev/kord/common/entity/ApplicationFlag; public static final field VerificationPendingGuildLimit Ldev/kord/common/entity/ApplicationFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun plus (Ldev/kord/common/entity/ApplicationFlag;)Ldev/kord/common/entity/ApplicationFlags; public final fun plus (Ldev/kord/common/entity/ApplicationFlags;)Ldev/kord/common/entity/ApplicationFlags; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ApplicationFlag; @@ -1452,6 +1455,7 @@ public final class dev/kord/common/entity/ChannelFlag : java/lang/Enum { public static final field Pinned Ldev/kord/common/entity/ChannelFlag; public static final field RequireTag Ldev/kord/common/entity/ChannelFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun plus (Ldev/kord/common/entity/ChannelFlag;)Ldev/kord/common/entity/ChannelFlags; public final fun plus (Ldev/kord/common/entity/ChannelFlags;)Ldev/kord/common/entity/ChannelFlags; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ChannelFlag; @@ -6614,6 +6618,7 @@ public final class dev/kord/common/entity/GuildMemberFlag : java/lang/Enum { public static final field DidRejoin Ldev/kord/common/entity/GuildMemberFlag; public static final field StartedOnboarding Ldev/kord/common/entity/GuildMemberFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/GuildMemberFlag; public static fun values ()[Ldev/kord/common/entity/GuildMemberFlag; } @@ -7132,6 +7137,7 @@ public final class dev/kord/common/entity/MessageFlag : java/lang/Enum { public static final field SuppressNotifications Ldev/kord/common/entity/MessageFlag; public static final field Urgent Ldev/kord/common/entity/MessageFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/MessageFlag; public static fun values ()[Ldev/kord/common/entity/MessageFlag; } @@ -8156,6 +8162,7 @@ public final class dev/kord/common/entity/SystemChannelFlag : java/lang/Enum { public static final field SuppressRoleSubscriptionPurchaseNotificationReplies Ldev/kord/common/entity/SystemChannelFlag; public static final field SuppressRoleSubscriptionPurchaseNotifications Ldev/kord/common/entity/SystemChannelFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/SystemChannelFlag; public static fun values ()[Ldev/kord/common/entity/SystemChannelFlag; } @@ -8252,6 +8259,7 @@ public final class dev/kord/common/entity/UserFlag : java/lang/Enum { public static final field VerifiedBot Ldev/kord/common/entity/UserFlag; public static final field VerifiedBotDeveloper Ldev/kord/common/entity/UserFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/UserFlag; public static fun values ()[Ldev/kord/common/entity/UserFlag; } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityType.kt index d7a730b00d06..c5ba2fd3f755 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class ActivityType( */ public val code: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ActivityType && this.code == other.code) - public final override fun hashCode(): Int = code.hashCode() + final override fun hashCode(): Int = code.hashCode() - public final override fun toString(): String = - "ActivityType.${this::class.simpleName}(code=$code)" + final override fun toString(): String = "ActivityType.${this::class.simpleName}(code=$code)" /** * An unknown [ActivityType]. @@ -60,13 +53,15 @@ public sealed class ActivityType( public object Competing : ActivityType(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ActivityType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ActivityType) = - encoder.encodeInt(value.code) + override fun serialize(encoder: Encoder, `value`: ActivityType) { + encoder.encodeInt(value.code) + } - public override fun deserialize(decoder: Decoder) = when (val code = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ActivityType = + when (val code = decoder.decodeInt()) { 0 -> Game 1 -> Streaming 2 -> Listening diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt index 7e0809b33c70..14d65ad5fb4f 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class AllowedMentionType( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AllowedMentionType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AllowedMentionType.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,15 @@ public sealed class AllowedMentionType( public object EveryoneMentions : AllowedMentionType("everyone") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AllowedMentionType", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: AllowedMentionType) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: AllowedMentionType) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): AllowedMentionType = when (val value = decoder.decodeString()) { "roles" -> RoleMentions "users" -> UserMentions diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt index 3009f6405875..d04de5de8d73 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt @@ -1,14 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -28,12 +24,12 @@ public sealed class ApplicationCommandOptionType( */ public val type: Int, ) { - public final override fun equals(other: Any?): kotlin.Boolean = this === other || + final override fun equals(other: Any?): kotlin.Boolean = this === other || (other is ApplicationCommandOptionType && this.type == other.type) - public final override fun hashCode(): Int = type.hashCode() + final override fun hashCode(): Int = type.hashCode() - public final override fun toString(): kotlin.String = + final override fun toString(): kotlin.String = "ApplicationCommandOptionType.${this::class.simpleName}(type=$type)" /** @@ -81,14 +77,16 @@ public sealed class ApplicationCommandOptionType( public object Attachment : ApplicationCommandOptionType(11) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationCommandOptionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ApplicationCommandOptionType) = - encoder.encodeInt(value.type) + override fun serialize(encoder: Encoder, `value`: ApplicationCommandOptionType) { + encoder.encodeInt(value.type) + } - public override fun deserialize(decoder: Decoder) = when (val type = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ApplicationCommandOptionType = + when (val type = decoder.decodeInt()) { 1 -> SubCommand 2 -> SubCommandGroup 3 -> String diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt index f98288a8e2de..0a8721eb3eeb 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ApplicationCommandPermissionType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ApplicationCommandPermissionType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ApplicationCommandPermissionType.${this::class.simpleName}(value=$value)" /** @@ -55,14 +49,16 @@ public sealed class ApplicationCommandPermissionType( public object Channel : ApplicationCommandPermissionType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationCommandPermissionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ApplicationCommandPermissionType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ApplicationCommandPermissionType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ApplicationCommandPermissionType = + when (val value = decoder.decodeInt()) { 1 -> Role 2 -> User 3 -> Channel diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt index 37540d3e6b56..a2d52294ee0b 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ApplicationCommandType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ApplicationCommandType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ApplicationCommandType.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,16 @@ public sealed class ApplicationCommandType( public object Message : ApplicationCommandType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationCommandType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ApplicationCommandType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ApplicationCommandType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ApplicationCommandType = + when (val value = decoder.decodeInt()) { 1 -> ChatInput 2 -> User 3 -> Message diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationRoleConnectionMetadataType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationRoleConnectionMetadataType.kt index 2f941b28036e..9e209e048c32 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationRoleConnectionMetadataType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationRoleConnectionMetadataType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -35,12 +29,12 @@ public sealed class ApplicationRoleConnectionMetadataType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ApplicationRoleConnectionMetadataType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ApplicationRoleConnectionMetadataType.${this::class.simpleName}(value=$value)" /** @@ -98,14 +92,16 @@ public sealed class ApplicationRoleConnectionMetadataType( public object BooleanNotEqual : ApplicationRoleConnectionMetadataType(8) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationRoleConnectionMetadataType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, - `value`: ApplicationRoleConnectionMetadataType) = encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ApplicationRoleConnectionMetadataType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ApplicationRoleConnectionMetadataType = + when (val value = decoder.decodeInt()) { 1 -> IntegerLessThanOrEqual 2 -> IntegerGreaterThanOrEqual 3 -> IntegerEqual diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt index 81ac1e4e0148..bc7dcffc6153 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class AuditLogEvent( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AuditLogEvent && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "AuditLogEvent.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "AuditLogEvent.${this::class.simpleName}(value=$value)" /** * An unknown [AuditLogEvent]. @@ -318,13 +311,15 @@ public sealed class AuditLogEvent( public object AutoModerationUserCommunicationDisabled : AuditLogEvent(145) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AuditLogEvent", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AuditLogEvent) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AuditLogEvent) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AuditLogEvent = + when (val value = decoder.decodeInt()) { 1 -> GuildUpdate 10 -> ChannelCreate 11 -> ChannelUpdate diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt index 2dd057cf911e..13fa66327a50 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationActionType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationActionType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationActionType.${this::class.simpleName}(value=$value)" /** @@ -74,14 +68,16 @@ public sealed class AutoModerationActionType( public object Timeout : AutoModerationActionType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationActionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AutoModerationActionType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationActionType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationActionType = + when (val value = decoder.decodeInt()) { 1 -> BlockMessage 2 -> SendAlertMessage 3 -> Timeout diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt index 7f285d457160..25e4056c19c2 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationRuleEventType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationRuleEventType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationRuleEventType.${this::class.simpleName}(value=$value)" /** @@ -56,14 +50,16 @@ public sealed class AutoModerationRuleEventType( public object MessageSend : AutoModerationRuleEventType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationRuleEventType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AutoModerationRuleEventType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationRuleEventType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationRuleEventType = + when (val value = decoder.decodeInt()) { 1 -> MessageSend else -> Unknown(value) } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt index 0fd6bd7c1ce8..663350fcb1cb 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationRuleKeywordPresetType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationRuleKeywordPresetType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationRuleKeywordPresetType.${this::class.simpleName}(value=$value)" /** @@ -66,14 +60,16 @@ public sealed class AutoModerationRuleKeywordPresetType( public object Slurs : AutoModerationRuleKeywordPresetType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationRuleKeywordPresetType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, - `value`: AutoModerationRuleKeywordPresetType) = encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationRuleKeywordPresetType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationRuleKeywordPresetType = + when (val value = decoder.decodeInt()) { 1 -> Profanity 2 -> SexualContent 3 -> Slurs diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt index 38d7f7282d96..66135a2a1aae 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationRuleTriggerType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationRuleTriggerType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationRuleTriggerType.${this::class.simpleName}(value=$value)" /** @@ -71,14 +65,16 @@ public sealed class AutoModerationRuleTriggerType( public object MentionSpam : AutoModerationRuleTriggerType(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationRuleTriggerType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AutoModerationRuleTriggerType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationRuleTriggerType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationRuleTriggerType = + when (val value = decoder.decodeInt()) { 1 -> Keyword 3 -> Spam 4 -> KeywordPreset diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt index f211625cbb8f..01f0010c0848 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,13 +26,12 @@ public sealed class ButtonStyle( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ButtonStyle && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "ButtonStyle.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "ButtonStyle.${this::class.simpleName}(value=$value)" /** * An unknown [ButtonStyle]. @@ -75,13 +68,15 @@ public sealed class ButtonStyle( public object Link : ButtonStyle(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ButtonStyle", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ButtonStyle) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ButtonStyle) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ButtonStyle = + when (val value = decoder.decodeInt()) { 1 -> Primary 2 -> Secondary 3 -> Success diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt index 04a3e6b1db63..2b625a585d51 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class ChannelType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ChannelType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "ChannelType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "ChannelType.${this::class.simpleName}(value=$value)" /** * An unknown [ChannelType]. @@ -115,13 +108,15 @@ public sealed class ChannelType( public object GuildForum : ChannelType(15) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ChannelType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ChannelType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ChannelType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ChannelType = + when (val value = decoder.decodeInt()) { 0 -> GuildText 1 -> DM 2 -> GuildVoice diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt index a087d810bfc8..b1b20aaef60f 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt @@ -1,19 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -33,13 +24,12 @@ public sealed class ComponentType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ComponentType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "ComponentType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "ComponentType.${this::class.simpleName}(value=$value)" /** * An unknown [ComponentType]. @@ -102,13 +92,15 @@ public sealed class ComponentType( public object SelectMenu : ComponentType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ComponentType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ComponentType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ComponentType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ComponentType = + when (val value = decoder.decodeInt()) { 1 -> ActionRow 2 -> Button 3 -> StringSelect diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt index 2f67ffa23031..c8ec1246bda8 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class DefaultMessageNotificationLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is DefaultMessageNotificationLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "DefaultMessageNotificationLevel.${this::class.simpleName}(value=$value)" /** @@ -59,14 +53,16 @@ public sealed class DefaultMessageNotificationLevel( public object OnlyMentions : DefaultMessageNotificationLevel(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.DefaultMessageNotificationLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: DefaultMessageNotificationLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: DefaultMessageNotificationLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): DefaultMessageNotificationLevel = + when (val value = decoder.decodeInt()) { 0 -> AllMessages 1 -> OnlyMentions else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt index 5ac2c352fc18..2060887d0409 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class DiscordConnectionVisibility( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is DiscordConnectionVisibility && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "DiscordConnectionVisibility.${this::class.simpleName}(value=$value)" /** @@ -59,14 +53,16 @@ public sealed class DiscordConnectionVisibility( public object Everyone : DiscordConnectionVisibility(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.DiscordConnectionVisibility", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: DiscordConnectionVisibility) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: DiscordConnectionVisibility) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): DiscordConnectionVisibility = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> Everyone else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt index 7922959a0fbc..92fbefbab02b 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class EmbedType( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is EmbedType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "EmbedType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "EmbedType.${this::class.simpleName}(value=$value)" /** * An unknown [EmbedType]. @@ -78,13 +71,14 @@ public sealed class EmbedType( public object Link : EmbedType("link") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.EmbedType", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: EmbedType) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: EmbedType) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): EmbedType = when (val value = decoder.decodeString()) { "rich" -> Rich "image" -> Image diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt index b8f46401e9e6..ee9c6ffc9bf0 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ExplicitContentFilter( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ExplicitContentFilter && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ExplicitContentFilter.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,16 @@ public sealed class ExplicitContentFilter( public object AllMembers : ExplicitContentFilter(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ExplicitContentFilter", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ExplicitContentFilter) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ExplicitContentFilter) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ExplicitContentFilter = + when (val value = decoder.decodeInt()) { 0 -> Disabled 1 -> MembersWithoutRoles 2 -> AllMembers diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt index b611756d4120..0dd349bb04ce 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ForumLayoutType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ForumLayoutType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ForumLayoutType.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,16 @@ public sealed class ForumLayoutType( public object GalleryView : ForumLayoutType(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ForumLayoutType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ForumLayoutType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ForumLayoutType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ForumLayoutType = + when (val value = decoder.decodeInt()) { 0 -> NotSet 1 -> ListView 2 -> GalleryView diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt index e668c8329b58..271af2da61b8 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt @@ -1,19 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -33,13 +24,12 @@ public sealed class GuildFeature( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is GuildFeature && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "GuildFeature.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "GuildFeature.${this::class.simpleName}(value=$value)" /** * An unknown [GuildFeature]. @@ -204,14 +194,15 @@ public sealed class GuildFeature( public object WelcomeScreenEnabled : GuildFeature("WELCOME_SCREEN_ENABLED") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.GuildFeature", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: GuildFeature) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: GuildFeature) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): GuildFeature = when (val value = decoder.decodeString()) { "ANIMATED_BANNER" -> AnimatedBanner "ANIMATED_ICON" -> AnimatedIcon diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt index 99cea88ebdc1..f0998d030a70 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class GuildScheduledEventPrivacyLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is GuildScheduledEventPrivacyLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "GuildScheduledEventPrivacyLevel.${this::class.simpleName}(value=$value)" /** @@ -54,14 +48,16 @@ public sealed class GuildScheduledEventPrivacyLevel( public object GuildOnly : GuildScheduledEventPrivacyLevel(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.GuildScheduledEventPrivacyLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: GuildScheduledEventPrivacyLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: GuildScheduledEventPrivacyLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): GuildScheduledEventPrivacyLevel = + when (val value = decoder.decodeInt()) { 2 -> GuildOnly else -> Unknown(value) } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt index 08653c462722..072c5fc6d872 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class GuildScheduledEventStatus( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is GuildScheduledEventStatus && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "GuildScheduledEventStatus.${this::class.simpleName}(value=$value)" /** @@ -57,14 +51,16 @@ public sealed class GuildScheduledEventStatus( public object Cancelled : GuildScheduledEventStatus(4) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.GuildScheduledEventStatus", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: GuildScheduledEventStatus) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: GuildScheduledEventStatus) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): GuildScheduledEventStatus = + when (val value = decoder.decodeInt()) { 1 -> Scheduled 2 -> Active 3 -> Completed diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt index 5d6b120f2e50..851a8a4aa47a 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class IntegrationExpireBehavior( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is IntegrationExpireBehavior && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "IntegrationExpireBehavior.${this::class.simpleName}(value=$value)" /** @@ -53,14 +47,16 @@ public sealed class IntegrationExpireBehavior( public object Kick : IntegrationExpireBehavior(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.IntegrationExpireBehavior", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: IntegrationExpireBehavior) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: IntegrationExpireBehavior) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): IntegrationExpireBehavior = + when (val value = decoder.decodeInt()) { 0 -> RemoveRole 1 -> Kick else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt index 81062aee2999..447ea96c57cc 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class InteractionResponseType( */ public val type: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is InteractionResponseType && this.type == other.type) - public final override fun hashCode(): Int = type.hashCode() + final override fun hashCode(): Int = type.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "InteractionResponseType.${this::class.simpleName}(type=$type)" /** @@ -85,14 +79,16 @@ public sealed class InteractionResponseType( public object Modal : InteractionResponseType(9) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.InteractionResponseType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: InteractionResponseType) = - encoder.encodeInt(value.type) + override fun serialize(encoder: Encoder, `value`: InteractionResponseType) { + encoder.encodeInt(value.type) + } - public override fun deserialize(decoder: Decoder) = when (val type = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): InteractionResponseType = + when (val type = decoder.decodeInt()) { 1 -> Pong 4 -> ChannelMessageWithSource 5 -> DeferredChannelMessageWithSource diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt index 5cc9105e0a1c..e02279c781e7 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class InteractionType( */ public val type: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is InteractionType && this.type == other.type) - public final override fun hashCode(): Int = type.hashCode() + final override fun hashCode(): Int = type.hashCode() - public final override fun toString(): String = - "InteractionType.${this::class.simpleName}(type=$type)" + final override fun toString(): String = "InteractionType.${this::class.simpleName}(type=$type)" /** * An unknown [InteractionType]. @@ -58,14 +51,16 @@ public sealed class InteractionType( public object ModalSubmit : InteractionType(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.InteractionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: InteractionType) = - encoder.encodeInt(value.type) + override fun serialize(encoder: Encoder, `value`: InteractionType) { + encoder.encodeInt(value.type) + } - public override fun deserialize(decoder: Decoder) = when (val type = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): InteractionType = + when (val type = decoder.decodeInt()) { 1 -> Ping 2 -> ApplicationCommand 3 -> Component diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt index b2c887f81899..958b29aea793 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class InviteTargetType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is InviteTargetType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "InviteTargetType.${this::class.simpleName}(value=$value)" /** @@ -52,14 +46,16 @@ public sealed class InviteTargetType( public object EmbeddedApplication : InviteTargetType(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.InviteTargetType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: InviteTargetType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: InviteTargetType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): InviteTargetType = + when (val value = decoder.decodeInt()) { 1 -> Stream 2 -> EmbeddedApplication else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt index 522db376f61a..0323297c1066 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class MFALevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MFALevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "MFALevel.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "MFALevel.${this::class.simpleName}(value=$value)" /** * An unknown [MFALevel]. @@ -58,13 +51,15 @@ public sealed class MFALevel( public object Elevated : MFALevel(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MFALevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MFALevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: MFALevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MFALevel = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> Elevated else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt index 5ff513a4a219..f51cb807b51f 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class MessageActivityType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MessageActivityType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "MessageActivityType.${this::class.simpleName}(value=$value)" /** @@ -56,14 +50,16 @@ public sealed class MessageActivityType( public object JoinRequest : MessageActivityType(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MessageActivityType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MessageActivityType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: MessageActivityType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MessageActivityType = + when (val value = decoder.decodeInt()) { 1 -> Join 2 -> Spectate 3 -> Listen diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt index bc15db08ab51..8d58e52ddef8 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class MessageStickerType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MessageStickerType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "MessageStickerType.${this::class.simpleName}(value=$value)" /** @@ -56,14 +50,16 @@ public sealed class MessageStickerType( public object GIF : MessageStickerType(4) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MessageStickerType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MessageStickerType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: MessageStickerType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MessageStickerType = + when (val value = decoder.decodeInt()) { 1 -> PNG 2 -> APNG 3 -> LOTTIE diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt index 6e2644407e4d..8638a65dcc8a 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class MessageType( */ public val code: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MessageType && this.code == other.code) - public final override fun hashCode(): Int = code.hashCode() + final override fun hashCode(): Int = code.hashCode() - public final override fun toString(): String = - "MessageType.${this::class.simpleName}(code=$code)" + final override fun toString(): String = "MessageType.${this::class.simpleName}(code=$code)" /** * An unknown [MessageType]. @@ -110,13 +103,15 @@ public sealed class MessageType( public object GuildApplicationPremiumSubscription : MessageType(32) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MessageType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MessageType) = - encoder.encodeInt(value.code) + override fun serialize(encoder: Encoder, `value`: MessageType) { + encoder.encodeInt(value.code) + } - public override fun deserialize(decoder: Decoder) = when (val code = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MessageType = + when (val code = decoder.decodeInt()) { 0 -> Default 1 -> RecipientAdd 2 -> RecipientRemove diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt index ed5b734e8077..7658504778fa 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class NsfwLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is NsfwLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "NsfwLevel.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "NsfwLevel.${this::class.simpleName}(value=$value)" /** * An unknown [NsfwLevel]. @@ -56,13 +49,15 @@ public sealed class NsfwLevel( public object AgeRestricted : NsfwLevel(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.NsfwLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: NsfwLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: NsfwLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): NsfwLevel = + when (val value = decoder.decodeInt()) { 0 -> Default 1 -> Explicit 2 -> Safe diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt index c4816f8c5ce0..cd87eb25dd0c 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class OnboardingPromptType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is OnboardingPromptType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "OnboardingPromptType.${this::class.simpleName}(value=$value)" /** @@ -52,14 +46,16 @@ public sealed class OnboardingPromptType( public object Dropdown : OnboardingPromptType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.OnboardingPromptType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: OnboardingPromptType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: OnboardingPromptType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): OnboardingPromptType = + when (val value = decoder.decodeInt()) { 0 -> MultipleChoice 1 -> Dropdown else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt index 7f1dfff1524c..56e13231fef3 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class OverwriteType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is OverwriteType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "OverwriteType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "OverwriteType.${this::class.simpleName}(value=$value)" /** * An unknown [OverwriteType]. @@ -52,13 +45,15 @@ public sealed class OverwriteType( public object Member : OverwriteType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.OverwriteType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: OverwriteType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: OverwriteType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): OverwriteType = + when (val value = decoder.decodeInt()) { 0 -> Role 1 -> Member else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt index 52ec298744e1..1e8e37c293ad 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class PremiumTier( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is PremiumTier && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "PremiumTier.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "PremiumTier.${this::class.simpleName}(value=$value)" /** * An unknown [PremiumTier]. @@ -68,13 +61,15 @@ public sealed class PremiumTier( public object Three : PremiumTier(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.PremiumTier", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: PremiumTier) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: PremiumTier) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): PremiumTier = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> One 2 -> Two diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt index 1bc0e8ff650a..2d81d6690892 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class PresenceStatus( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is PresenceStatus && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "PresenceStatus.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "PresenceStatus.${this::class.simpleName}(value=$value)" /** * An unknown [PresenceStatus]. @@ -73,14 +66,15 @@ public sealed class PresenceStatus( public object Offline : PresenceStatus("offline") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.PresenceStatus", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: PresenceStatus) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: PresenceStatus) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): PresenceStatus = when (val value = decoder.decodeString()) { "online" -> Online "dnd" -> DoNotDisturb diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt index 951565d3988e..b14d9b75cfdf 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ScheduledEntityType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ScheduledEntityType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ScheduledEntityType.${this::class.simpleName}(value=$value)" /** @@ -54,14 +48,16 @@ public sealed class ScheduledEntityType( public object External : ScheduledEntityType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ScheduledEntityType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ScheduledEntityType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ScheduledEntityType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ScheduledEntityType = + when (val value = decoder.decodeInt()) { 1 -> StageInstance 2 -> Voice 3 -> External diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt index f8ea7de7f847..3b6ac659433f 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class SortOrderType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is SortOrderType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "SortOrderType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "SortOrderType.${this::class.simpleName}(value=$value)" /** * An unknown [SortOrderType]. @@ -58,13 +51,15 @@ public sealed class SortOrderType( public object CreationDate : SortOrderType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.SortOrderType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: SortOrderType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: SortOrderType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): SortOrderType = + when (val value = decoder.decodeInt()) { 0 -> LatestActivity 1 -> CreationDate else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt index 7e7509179c7f..207576cdcfc7 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt @@ -1,17 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -31,12 +24,12 @@ public sealed class StageInstancePrivacyLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is StageInstancePrivacyLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "StageInstancePrivacyLevel.${this::class.simpleName}(value=$value)" /** @@ -61,14 +54,16 @@ public sealed class StageInstancePrivacyLevel( public object GuildOnly : StageInstancePrivacyLevel(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.StageInstancePrivacyLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: StageInstancePrivacyLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: StageInstancePrivacyLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): StageInstancePrivacyLevel = + when (val value = decoder.decodeInt()) { 1 -> @Suppress("DEPRECATION") Public 2 -> GuildOnly else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt index 6a2d4e6c13c8..113fd5f51a6a 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class TeamMembershipState( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is TeamMembershipState && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "TeamMembershipState.${this::class.simpleName}(value=$value)" /** @@ -52,14 +46,16 @@ public sealed class TeamMembershipState( public object Accepted : TeamMembershipState(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.TeamMembershipState", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: TeamMembershipState) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: TeamMembershipState) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): TeamMembershipState = + when (val value = decoder.decodeInt()) { 1 -> Invited 2 -> Accepted else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt index 2755562695bd..35f67d4dfb14 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,13 +26,12 @@ public sealed class TextInputStyle( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is TextInputStyle && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "TextInputStyle.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "TextInputStyle.${this::class.simpleName}(value=$value)" /** * An unknown [TextInputStyle]. @@ -60,14 +53,16 @@ public sealed class TextInputStyle( public object Paragraph : TextInputStyle(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.TextInputStyle", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: TextInputStyle) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: TextInputStyle) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): TextInputStyle = + when (val value = decoder.decodeInt()) { 1 -> Short 2 -> Paragraph else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt index 9c922410ce00..49f25c2e6f96 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,13 +26,12 @@ public sealed class UserPremium( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is UserPremium && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "UserPremium.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "UserPremium.${this::class.simpleName}(value=$value)" /** * An unknown [UserPremium]. @@ -58,13 +51,15 @@ public sealed class UserPremium( public object NitroBasic : UserPremium(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.UserPremium", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: UserPremium) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: UserPremium) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): UserPremium = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> NitroClassic 2 -> Nitro diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt index 174f9a6c3942..aebbf730d515 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class VerificationLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is VerificationLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "VerificationLevel.${this::class.simpleName}(value=$value)" /** @@ -73,14 +67,16 @@ public sealed class VerificationLevel( public object VeryHigh : VerificationLevel(4) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.VerificationLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: VerificationLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: VerificationLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): VerificationLevel = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> Low 2 -> Medium diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt index 22c92b3ae03c..b120af87b942 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class VideoQualityMode( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is VideoQualityMode && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "VideoQualityMode.${this::class.simpleName}(value=$value)" /** @@ -58,14 +52,16 @@ public sealed class VideoQualityMode( public object Full : VideoQualityMode(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.VideoQualityMode", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: VideoQualityMode) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: VideoQualityMode) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): VideoQualityMode = + when (val value = decoder.decodeInt()) { 1 -> Auto 2 -> Full else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt index 5a2509adc670..ad723e7c4873 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class WebhookType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is WebhookType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "WebhookType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "WebhookType.${this::class.simpleName}(value=$value)" /** * An unknown [WebhookType]. @@ -64,13 +57,15 @@ public sealed class WebhookType( public object Application : WebhookType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.WebhookType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: WebhookType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: WebhookType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): WebhookType = + when (val value = decoder.decodeInt()) { 1 -> Incoming 2 -> ChannelFollower 3 -> Application diff --git a/common/src/commonMain/kotlin/DiscordBitSet.kt b/common/src/commonMain/kotlin/DiscordBitSet.kt index 8098026c4701..48fd6f492863 100644 --- a/common/src/commonMain/kotlin/DiscordBitSet.kt +++ b/common/src/commonMain/kotlin/DiscordBitSet.kt @@ -40,7 +40,7 @@ public class DiscordBitSet(internal var data: LongArray) { // data is in little- override fun equals(other: Any?): Boolean { if (other !is DiscordBitSet) return false // trailing zeros are ignored -> getOrZero - for (i in 0 until max(this.data.size, other.data.size)) { + for (i in 0.. = ConcurrentMutableMap +// using an actual typealias seems to be broken in Kotlin/JS 1.9.0 +// public actual typealias ConcurrentHashMap = ConcurrentMutableMap +public actual class ConcurrentHashMap : MutableMap by ConcurrentMutableMap() diff --git a/core/src/commonTest/kotlin/UtilKtTest.kt b/core/src/commonTest/kotlin/UtilKtTest.kt index e276e55e2005..bebabae722a5 100644 --- a/core/src/commonTest/kotlin/UtilKtTest.kt +++ b/core/src/commonTest/kotlin/UtilKtTest.kt @@ -19,7 +19,7 @@ internal class UtilKtTest { value += 1u //don't include the position id buildList(100) { - (value until (value + 100u)).reversed().forEach { snowflake -> //biggest/youngest -> smallest/oldest + (value..<(value + 100u)).reversed().forEach { snowflake -> //biggest/youngest -> smallest/oldest add(Snowflake(snowflake)) } } diff --git a/gateway/api/gateway.api b/gateway/api/gateway.api index c850b42868f4..8e6f0f90642c 100644 --- a/gateway/api/gateway.api +++ b/gateway/api/gateway.api @@ -637,6 +637,7 @@ public final class dev/kord/gateway/GatewayCloseCode : java/lang/Enum { public static final field Unknown Ldev/kord/gateway/GatewayCloseCode; public static final field UnknownOpCode Ldev/kord/gateway/GatewayCloseCode; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/gateway/GatewayCloseCode; public static fun values ()[Ldev/kord/gateway/GatewayCloseCode; } @@ -1512,6 +1513,7 @@ public final class dev/kord/gateway/OpCode : java/lang/Enum { public static final field Unknown Ldev/kord/gateway/OpCode; public static final field VoiceStateUpdate Ldev/kord/gateway/OpCode; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/gateway/OpCode; public static fun values ()[Ldev/kord/gateway/OpCode; } diff --git a/gateway/src/commonMain/kotlin/DefaultGateway.kt b/gateway/src/commonMain/kotlin/DefaultGateway.kt index ba175d68d684..5528a9a0269e 100644 --- a/gateway/src/commonMain/kotlin/DefaultGateway.kt +++ b/gateway/src/commonMain/kotlin/DefaultGateway.kt @@ -200,7 +200,7 @@ public class DefaultGateway(private val data: DefaultGatewayData) : Gateway { } ?: return defaultGatewayLogger.trace { "Gateway closed: ${reason.code} ${reason.message}" } - val discordReason = values().firstOrNull { it.code == reason.code.toInt() } ?: return + val discordReason = gatewayCloseCodeByCode[reason.code.toInt()] ?: return data.eventFlow.emit(Close.DiscordClose(discordReason, discordReason.retry)) @@ -285,6 +285,8 @@ public class DefaultGateway(private val data: DefaultGatewayData) : Gateway { private const val gatewayRunningError = "The Gateway is already running, call stop() first." private const val gatewayDetachedError = "The Gateway has been detached and can no longer be used, create a new instance instead." + + private val gatewayCloseCodeByCode = GatewayCloseCode.entries.associateBy { it.code } } } diff --git a/gateway/src/commonMain/kotlin/OpCode.kt b/gateway/src/commonMain/kotlin/OpCode.kt index 2720eb769cff..bf063fe862dc 100644 --- a/gateway/src/commonMain/kotlin/OpCode.kt +++ b/gateway/src/commonMain/kotlin/OpCode.kt @@ -72,9 +72,10 @@ public enum class OpCode(public val code: Int) { override val descriptor: SerialDescriptor get() = PrimitiveSerialDescriptor("op", PrimitiveKind.INT) + private val entriesByCode = entries.associateBy { it.code } override fun deserialize(decoder: Decoder): OpCode { val code = decoder.decodeInt() - return values().firstOrNull { it.code == code } ?: Unknown + return entriesByCode[code] ?: Unknown } override fun serialize(encoder: Encoder, value: OpCode) { diff --git a/gateway/src/commonMain/kotlin/builder/LoginBuilder.kt b/gateway/src/commonMain/kotlin/builder/LoginBuilder.kt index 048cb758da16..738374a3b31f 100644 --- a/gateway/src/commonMain/kotlin/builder/LoginBuilder.kt +++ b/gateway/src/commonMain/kotlin/builder/LoginBuilder.kt @@ -7,7 +7,7 @@ import dev.kord.gateway.Intents import kotlin.contracts.InvocationKind import kotlin.contracts.contract -public data class Shards(val totalShards: Int, val indices: Iterable = 0 until totalShards) +public data class Shards(val totalShards: Int, val indices: Iterable = 0.. { override fun toLong() = value.toLong() override fun toFloat() = value.toFloat() override fun toDouble() = value.toDouble() - override fun toChar() = value.toInt().toChar() override fun compareTo(other: ULongNumber) = this.value.compareTo(other.value) override fun equals(other: Any?) = other is ULongNumber && this.value == other.value override fun hashCode() = value.hashCode() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bde605a19e30..2ef034cbadc8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,23 +1,23 @@ [versions] # api dependencies -kotlin = "1.8.21" # https://github.com/JetBrains/kotlin -ktor = "2.3.0" # https://github.com/ktorio/ktor -kotlinx-coroutines = "1.7.1" # https://github.com/Kotlin/kotlinx.coroutines +kotlin = "1.9.0" # https://github.com/JetBrains/kotlin +ktor = "2.3.2" # https://github.com/ktorio/ktor +kotlinx-coroutines = "1.7.2" # https://github.com/Kotlin/kotlinx.coroutines kotlinx-serialization = "1.5.1" # https://github.com/Kotlin/kotlinx.serialization kotlinx-datetime = "0.4.0" # https://github.com/Kotlin/kotlinx-datetime kotlin-logging = "3.0.5" # https://github.com/oshai/kotlin-logging kord-cache = "0.4.0" # https://github.com/kordlib/cache # implementation dependencies -kotlin-node = "18.16.3-pre.546" # https://github.com/JetBrains/kotlin-wrappers +kotlin-node = "18.16.12-pre.591-compat" # https://github.com/JetBrains/kotlin-wrappers bignum = "0.3.8" # https://github.com/ionspin/kotlin-multiplatform-bignum stately = "2.0.0-rc1" # https://github.com/touchlab/Stately fastZlib = "2.0.1" # https://github.com/timotejroiko/fast-zlib # code generation -ksp = "1.8.21-1.0.11" # https://github.com/google/ksp -kotlinpoet = "1.13.2" # https://github.com/square/kotlinpoet +ksp = "1.9.0-1.0.11" # https://github.com/google/ksp +kotlinpoet = "1.14.2" # https://github.com/square/kotlinpoet # tests junit5 = "5.9.3" # https://github.com/junit-team/junit5 @@ -25,10 +25,10 @@ mockk = "1.13.5" # https://github.com/mockk/mockk slf4j = "2.0.7" # https://www.slf4j.org # plugins -dokka = "1.8.10" # https://github.com/Kotlin/dokka -kotlinx-atomicfu = "0.20.2" # https://github.com/Kotlin/kotlinx-atomicfu -binary-compatibility-validator = "0.13.1" # https://github.com/Kotlin/binary-compatibility-validator -buildconfig = "4.0.4" # https://github.com/gmazzo/gradle-buildconfig-plugin +dokka = "1.8.20" # https://github.com/Kotlin/dokka +kotlinx-atomicfu = "0.21.0" # https://github.com/Kotlin/kotlinx-atomicfu +binary-compatibility-validator = "0.13.2" # https://github.com/Kotlin/binary-compatibility-validator +buildconfig = "4.1.1" # https://github.com/gmazzo/gradle-buildconfig-plugin [libraries] diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 3ba5cc5c544f..3fe9b3c84085 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -2,156 +2,11 @@ # yarn lockfile v1 -"@babel/code-frame@^7.10.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" - integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/helper-validator-identifier@^7.18.6": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@jridgewell/gen-mapping@^0.3.0": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.3.tgz#8108265659d4c33e72ffe14e33d6cc5eb59f2fda" - integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - "@js-joda/core@3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-3.2.0.tgz#3e61e21b7b2b8a6be746df1335cf91d70db2a273" integrity sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg== -"@rollup/plugin-commonjs@^21.0.1": - version "21.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz#45576d7b47609af2db87f55a6d4b46e44fc3a553" - integrity sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA== - dependencies: - "@rollup/pluginutils" "^3.1.0" - commondir "^1.0.1" - estree-walker "^2.0.1" - glob "^7.1.6" - is-reference "^1.2.1" - magic-string "^0.25.7" - resolve "^1.17.0" - -"@rollup/plugin-node-resolve@^13.1.3": - version "13.3.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz#da1c5c5ce8316cef96a2f823d111c1e4e498801c" - integrity sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw== - dependencies: - "@rollup/pluginutils" "^3.1.0" - "@types/resolve" "1.17.1" - deepmerge "^4.2.2" - is-builtin-module "^3.1.0" - is-module "^1.0.0" - resolve "^1.19.0" - -"@rollup/plugin-typescript@^8.3.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.5.0.tgz#7ea11599a15b0a30fa7ea69ce3b791d41b862515" - integrity sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ== - dependencies: - "@rollup/pluginutils" "^3.1.0" - resolve "^1.17.0" - -"@rollup/pluginutils@^3.0.9", "@rollup/pluginutils@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" - integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== - dependencies: - "@types/estree" "0.0.39" - estree-walker "^1.0.1" - picomatch "^2.2.2" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@0.0.39": - version "0.0.39" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" - integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== - -"@types/node@*": - version "18.15.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" - integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== - -"@types/node@^12.12.14": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/node@^18.16.3": - version "18.16.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.3.tgz#6bda7819aae6ea0b386ebc5b24bdf602f1b42b01" - integrity sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q== - -"@types/resolve@1.17.1": - version "1.17.1" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" - integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== - dependencies: - "@types/node" "*" - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - abort-controller@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -159,11 +14,6 @@ abort-controller@3.0.0: dependencies: event-target-shim "^5.0.0" -acorn@^8.5.0: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -174,13 +24,6 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -201,11 +44,6 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -248,25 +86,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -builtin-modules@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" - integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== - camelcase@^6.0.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -299,13 +123,6 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -313,26 +130,11 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -350,29 +152,11 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -decode-uri-component@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - diff@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== -dukat@0.5.8-rc.4: - version "0.5.8-rc.4" - resolved "https://registry.yarnpkg.com/dukat/-/dukat-0.5.8-rc.4.tgz#90384dcb50b14c26f0e99dae92b2dea44f5fce21" - integrity sha512-ZnMt6DGBjlVgK2uQamXfd7uP/AxH7RqI0BL9GLrrJb2gKdDxvJChWy+M9AQEaL+7/6TmxzJxFOsRiInY9oGWTA== - dependencies: - google-protobuf "3.12.2" - typescript "3.9.5" - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -388,21 +172,6 @@ escape-string-regexp@4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -estree-walker@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" - integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== - -estree-walker@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -433,7 +202,7 @@ flat@^5.0.2: resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -format-util@1.0.5, format-util@^1.0.5: +format-util@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== @@ -448,11 +217,6 @@ fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -477,40 +241,11 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3, glob@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -google-protobuf@3.12.2: - version "3.12.2" - resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.12.2.tgz#50ce9f9b6281235724eb243d6a83e969a2176e53" - integrity sha512-4CZhpuRr1d6HjlyrxoXoocoGFnRYgKULgMtikMddA9ztRyYR59Aondv2FioyxWVamRo0rF2XpYawkTCBEQOSkA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -536,25 +271,6 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-builtin-module@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" - integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== - dependencies: - builtin-modules "^3.3.0" - -is-core-module@^2.11.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" - integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== - dependencies: - has "^1.0.3" - -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -572,11 +288,6 @@ is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" - integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -587,39 +298,11 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -is-reference@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" - integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== - dependencies: - "@types/estree" "*" - is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -jest-worker@^26.2.1: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - js-yaml@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -642,18 +325,6 @@ log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -magic-string@^0.25.7: - version "0.25.9" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" - integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== - dependencies: - sourcemap-codec "^1.4.8" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - minimatch@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" @@ -661,19 +332,18 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.4: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -mocha@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" - integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== +mocha@10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== dependencies: - "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" chokidar "3.5.3" @@ -754,12 +424,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2: +picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -783,47 +448,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -resolve@^1.17.0, resolve@^1.19.0: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -rimraf@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup-plugin-sourcemaps@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed" - integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw== - dependencies: - "@rollup/pluginutils" "^3.0.9" - source-map-resolve "^0.6.0" - -rollup-plugin-terser@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" - integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== - dependencies: - "@babel/code-frame" "^7.10.4" - jest-worker "^26.2.1" - serialize-javascript "^4.0.0" - terser "^5.0.0" - -rollup@^2.68.0: - version "2.79.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" - integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== - optionalDependencies: - fsevents "~2.3.2" - safe-buffer@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -836,22 +460,7 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - -source-map-resolve@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2" - integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - -source-map-support@0.5.21, source-map-support@~0.5.20: +source-map-support@0.5.21: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -864,11 +473,6 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -897,35 +501,13 @@ supports-color@8.1.1: dependencies: has-flag "^4.0.0" -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -terser@^5.0.0: - version "5.16.9" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.9.tgz#7a28cb178e330c484369886f2afd623d9847495f" - integrity sha512-HPa/FdTB9XGI2H1/keLFZHxl6WNvAI4YalHGtDQTlMnJcoqSab1UwL4l1hGEhs6/GmLHBZIg/YgB++jcbzoOEg== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -938,25 +520,10 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -tslib@^2.3.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -typescript@3.9.5: - version "3.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36" - integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ== - -typescript@4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== - -typescript@^3.7.2: - version "3.9.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" - integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== webidl-conversions@^3.0.0: version "3.0.1" diff --git a/ksp-annotations/build.gradle.kts b/ksp-annotations/build.gradle.kts index f4f0c10edf1c..0c68a988730b 100644 --- a/ksp-annotations/build.gradle.kts +++ b/ksp-annotations/build.gradle.kts @@ -9,5 +9,7 @@ plugins { } tasks.withType().configureEach { - enabled = false + dokkaSourceSets.configureEach { + suppress = true + } } diff --git a/ksp-processors/src/main/kotlin/KotlinPoetDsl.kt b/ksp-processors/src/main/kotlin/KotlinPoetDsl.kt index f4f95be3bd14..0d1d0fd24f5c 100644 --- a/ksp-processors/src/main/kotlin/KotlinPoetDsl.kt +++ b/ksp-processors/src/main/kotlin/KotlinPoetDsl.kt @@ -27,25 +27,25 @@ internal inline fun FileSpec(className: ClassName, builder: FileSpecBuilder) = FileSpec.builder(className).apply(builder).build() -// extensions for `FileSpec.Builder` +// extensions for `Annotatable.Builder` @DelicateKotlinPoetApi("See 'AnnotationSpec.get'") -internal fun FileSpec.Builder.addAnnotation(annotation: Annotation, includeDefaultValues: Boolean = false) = - addAnnotation(AnnotationSpec.get(annotation, includeDefaultValues)) +internal fun > T.addAnnotation( + annotation: Annotation, + includeDefaultValues: Boolean = false, +) = addAnnotation(AnnotationSpec.get(annotation, includeDefaultValues)) -internal inline fun FileSpec.Builder.addClass(className: ClassName, builder: TypeSpecBuilder) = - addType(TypeSpec.classBuilder(className).apply(builder).build()) +internal inline fun Annotatable.Builder<*>.addAnnotation(builder: AnnotationSpecBuilder) = + addAnnotation(AnnotationSpec.builder(A::class).apply(builder).build()) -// extensions for `TypeSpec.Builder` +// extensions for `FileSpec.Builder` -internal inline fun TypeSpec.Builder.addAnnotation(builder: AnnotationSpecBuilder) = - addAnnotation(AnnotationSpec.builder(A::class).apply(builder).build()) +internal inline fun FileSpec.Builder.addClass(className: ClassName, builder: TypeSpecBuilder) = + addType(TypeSpec.classBuilder(className).apply(builder).build()) -@DelicateKotlinPoetApi("See 'AnnotationSpec.get'") -internal fun TypeSpec.Builder.addAnnotation(annotation: Annotation, includeDefaultValues: Boolean = false) = - addAnnotation(AnnotationSpec.get(annotation, includeDefaultValues)) +// extensions for `TypeSpec.Builder` internal inline fun TypeSpec.Builder.addClass(name: String, builder: TypeSpecBuilder) = addType(TypeSpec.classBuilder(name).apply(builder).build()) @@ -77,10 +77,6 @@ internal inline fun TypeSpec.Builder.primaryConstructor(builder: FunSpecBuilder) // extensions for `FunSpec.Builder` -@DelicateKotlinPoetApi("See 'AnnotationSpec.get'") -internal fun FunSpec.Builder.addAnnotation(annotation: Annotation, includeDefaultValues: Boolean = false) = - addAnnotation(AnnotationSpec.get(annotation, includeDefaultValues)) - internal inline fun FunSpec.Builder.addParameter(name: String, vararg modifiers: KModifier) = addParameter(name, typeNameOf(), *modifiers) @@ -92,10 +88,6 @@ internal inline fun FunSpec.Builder.withControlFlow(controlFlow: String, vararg // extensions for `PropertySpec.Builder` -@DelicateKotlinPoetApi("See 'AnnotationSpec.get'") -internal fun PropertySpec.Builder.addAnnotation(annotation: Annotation, includeDefaultValues: Boolean = false) = - addAnnotation(AnnotationSpec.get(annotation, includeDefaultValues)) - internal inline fun PropertySpec.Builder.delegate(builder: CodeBlockBuilder) = delegate(CodeBlock.builder().apply(builder).build()) diff --git a/ksp-processors/src/main/kotlin/kordenum/KordEnumGeneration.kt b/ksp-processors/src/main/kotlin/kordenum/KordEnumGeneration.kt index 6e18cc592f16..1bfb5ed8f1cd 100644 --- a/ksp-processors/src/main/kotlin/kordenum/KordEnumGeneration.kt +++ b/ksp-processors/src/main/kotlin/kordenum/KordEnumGeneration.kt @@ -65,7 +65,7 @@ internal fun KordEnum.generateFileSpec(originatingFile: KSFile): FileSpec { return FileSpec(enumName) { indent(" ") - addFileComment("THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT!") + addFileComment("THIS FILE IS AUTO-GENERATED, DO NOT EDIT!") @OptIn(DelicateKotlinPoetApi::class) // `AnnotationSpec.get` is ok for `Suppress` addAnnotation( @@ -78,6 +78,8 @@ internal fun KordEnum.generateFileSpec(originatingFile: KSFile): FileSpec { ) ) + addKotlinDefaultImports(includeJvm = false, includeJs = false) + addClass(enumName) { // for ksp incremental processing @@ -165,11 +167,12 @@ internal fun KordEnum.generateFileSpec(originatingFile: KSFile): FileSpec { addModifiers(OVERRIDE) addParameter("encoder") addParameter("value", enumName) - addStatement("return encoder.encode$encodingPostfix(value.$valueName)") + addStatement("encoder.encode$encodingPostfix(value.$valueName)") } addFunction("deserialize") { addModifiers(OVERRIDE) + returns(enumName) addParameter("decoder") withControlFlow("return when·(val·$valueName·=·decoder.decode$encodingPostfix())") { for (entry in relevantEntriesForSerializerAndCompanion) { diff --git a/rest/api/rest.api b/rest/api/rest.api index a2293cb63f5f..555809488244 100644 --- a/rest/api/rest.api +++ b/rest/api/rest.api @@ -55,6 +55,7 @@ public final class dev/kord/rest/Image$Size : java/lang/Enum { public static final field Size4096 Ldev/kord/rest/Image$Size; public static final field Size512 Ldev/kord/rest/Image$Size; public static final field Size64 Ldev/kord/rest/Image$Size; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getMaxRes ()I public static fun valueOf (Ljava/lang/String;)Ldev/kord/rest/Image$Size; public static fun values ()[Ldev/kord/rest/Image$Size; @@ -2644,6 +2645,7 @@ public final class dev/kord/rest/json/JsonErrorCode : java/lang/Enum { public static final field WebhooksCanOnlyCreateThreadsInForumChannels Ldev/kord/rest/json/JsonErrorCode; public static final field WrongChannelType Ldev/kord/rest/json/JsonErrorCode; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/rest/json/JsonErrorCode; public static fun values ()[Ldev/kord/rest/json/JsonErrorCode; } diff --git a/rest/src/commonMain/kotlin/json/JsonErrorCode.kt b/rest/src/commonMain/kotlin/json/JsonErrorCode.kt index a3d038dad627..7cf232b26e61 100644 --- a/rest/src/commonMain/kotlin/json/JsonErrorCode.kt +++ b/rest/src/commonMain/kotlin/json/JsonErrorCode.kt @@ -625,9 +625,10 @@ public enum class JsonErrorCode(public val code: Int) { internal object Serializer : KSerializer { override val descriptor = PrimitiveSerialDescriptor("JsonErrorCodeSerializer", PrimitiveKind.INT) + private val entriesByCode = entries.associateBy { it.code } override fun deserialize(decoder: Decoder): JsonErrorCode { val code = decoder.decodeInt() - return values().firstOrNull { it.code == code } ?: Unknown + return entriesByCode[code] ?: Unknown } override fun serialize(encoder: Encoder, value: JsonErrorCode) { diff --git a/rest/src/commonMain/kotlin/request/HttpUtils.kt b/rest/src/commonMain/kotlin/request/HttpUtils.kt index 3c3067e6a033..75408082b7a7 100644 --- a/rest/src/commonMain/kotlin/request/HttpUtils.kt +++ b/rest/src/commonMain/kotlin/request/HttpUtils.kt @@ -34,7 +34,7 @@ public fun HttpResponse.channelResetPoint(clock: Clock): Instant { } public val HttpResponse.isRateLimit: Boolean get() = status.value == 429 -public val HttpResponse.isError: Boolean get() = status.value in 400 until 600 +public val HttpResponse.isError: Boolean get() = status.value in 400..<600 public val HttpResponse.isErrorWithRateLimit: Boolean get() = status.value == 403 || status.value == 401 public val HttpResponse.isGlobalRateLimit: Boolean get() = headers[rateLimitGlobalHeader] != null public val HttpResponse.rateLimitTotal: Long? get() = headers[rateLimit]?.toLongOrNull() diff --git a/samples/src/commonMain/kotlin/dev/kord/gateway/GatewayExample.kt b/samples/src/commonMain/kotlin/dev/kord/gateway/GatewayExample.kt index c947094f62db..90a43f26a688 100644 --- a/samples/src/commonMain/kotlin/dev/kord/gateway/GatewayExample.kt +++ b/samples/src/commonMain/kotlin/dev/kord/gateway/GatewayExample.kt @@ -7,9 +7,7 @@ import kotlinx.coroutines.flow.filterIsInstance import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import kotlin.time.Duration.Companion.seconds -import kotlin.time.ExperimentalTime -@OptIn(ExperimentalTime::class) suspend fun main(args: Array) { val token = args.firstOrNull() ?: error("expected a token") diff --git a/settings.gradle.kts b/settings.gradle.kts index a355a4dd5486..539e25a6612a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,6 @@ plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0" + // https://github.com/gradle/foojay-toolchains + id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" } rootProject.name = "kord" diff --git a/test-kit/src/jsMain/kotlin/Platform.node.kt b/test-kit/src/jsMain/kotlin/Platform.node.kt index 0a4e8786c585..2949105f5510 100644 --- a/test-kit/src/jsMain/kotlin/Platform.node.kt +++ b/test-kit/src/jsMain/kotlin/Platform.node.kt @@ -16,6 +16,4 @@ internal suspend fun nodeReadFile(project: String, path: String): ByteReadChanne return ByteReadChannel(buffer.toByteArray()) } -private fun Buffer.toByteArray() = values().toList() - .map(Int::toByte) - .toByteArray() +private fun Buffer.toByteArray() = values().toList().toByteArray() diff --git a/voice/api/voice.api b/voice/api/voice.api index 441ddcb992d2..eb705e2e1922 100644 --- a/voice/api/voice.api +++ b/voice/api/voice.api @@ -249,6 +249,7 @@ public final class dev/kord/voice/SpeakingFlag : java/lang/Enum { public static final field Priority Ldev/kord/voice/SpeakingFlag; public static final field Soundshare Ldev/kord/voice/SpeakingFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/voice/SpeakingFlag; public static fun values ()[Ldev/kord/voice/SpeakingFlag; } @@ -650,6 +651,7 @@ public final class dev/kord/voice/gateway/OpCode : java/lang/Enum { public static final field Speaking Ldev/kord/voice/gateway/OpCode; public static final field Unknown Ldev/kord/voice/gateway/OpCode; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/voice/gateway/OpCode; public static fun values ()[Ldev/kord/voice/gateway/OpCode; } diff --git a/voice/build/generated/ksp/main/kotlin/dev/kord/voice/EncryptionMode.kt b/voice/build/generated/ksp/main/kotlin/dev/kord/voice/EncryptionMode.kt index c977d45f5d20..d8490699d3fe 100644 --- a/voice/build/generated/ksp/main/kotlin/dev/kord/voice/EncryptionMode.kt +++ b/voice/build/generated/ksp/main/kotlin/dev/kord/voice/EncryptionMode.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.voice -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class EncryptionMode( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is EncryptionMode && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "EncryptionMode.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "EncryptionMode.${this::class.simpleName}(value=$value)" /** * An unknown [EncryptionMode]. @@ -54,13 +47,14 @@ public sealed class EncryptionMode( public object XSalsa20Poly1305Lite : EncryptionMode("xsalsa20_poly1305_lite") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.voice.EncryptionMode", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: EncryptionMode) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: EncryptionMode) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): EncryptionMode = when (val value = decoder.decodeString()) { "xsalsa20_poly1305" -> XSalsa20Poly1305 "xsalsa20_poly1305_suffix" -> XSalsa20Poly1305Suffix diff --git a/voice/src/main/kotlin/encryption/XSalsa20Poly1305Encryption.kt b/voice/src/main/kotlin/encryption/XSalsa20Poly1305Encryption.kt index 782127377950..808e9d502ae9 100644 --- a/voice/src/main/kotlin/encryption/XSalsa20Poly1305Encryption.kt +++ b/voice/src/main/kotlin/encryption/XSalsa20Poly1305Encryption.kt @@ -18,7 +18,7 @@ internal class XSalsa20Poly1305Encryption(private val key: ByteArray) { m.fill(0) c.fill(0) - for (i in 0 until mLength) + for (i in 0..