mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
chore(deadcode): trim unused discord vitest runtime shims
This commit is contained in:
parent
4c736df975
commit
880425b03c
4 changed files with 1 additions and 216 deletions
|
|
@ -1,18 +0,0 @@
|
|||
// Discord gateway types runtime helper loads discord-api-types gateway v10 at runtime.
|
||||
import { createRequire } from "node:module";
|
||||
import type * as DiscordGatewayApiTypes from "discord-api-types/gateway/v10";
|
||||
|
||||
const requireDiscordGatewayApiTypes = createRequire(import.meta.url);
|
||||
const discordGatewayApiTypes = requireDiscordGatewayApiTypes(
|
||||
"discord-api-types/gateway/v10",
|
||||
) as typeof DiscordGatewayApiTypes;
|
||||
|
||||
export default discordGatewayApiTypes;
|
||||
export const {
|
||||
GatewayCloseCodes,
|
||||
GatewayDispatchEvents,
|
||||
GatewayIntentBits,
|
||||
GatewayOpcodes,
|
||||
GatewayVersion,
|
||||
VoiceChannelEffectSendAnimationType,
|
||||
} = discordGatewayApiTypes;
|
||||
|
|
@ -8,103 +8,4 @@ const discordPayloadApiTypes = requireDiscordPayloadApiTypes(
|
|||
) as typeof DiscordPayloadApiTypes;
|
||||
|
||||
export default discordPayloadApiTypes;
|
||||
export const {
|
||||
APIApplicationCommandPermissionsConstant,
|
||||
ActivityFlags,
|
||||
ActivityLocationKind,
|
||||
ActivityPlatform,
|
||||
ActivityType,
|
||||
AllowedMentionsTypes,
|
||||
ApplicationCommandOptionType,
|
||||
ApplicationCommandPermissionType,
|
||||
ApplicationCommandType,
|
||||
ApplicationFlags,
|
||||
ApplicationIntegrationType,
|
||||
ApplicationRoleConnectionMetadataType,
|
||||
ApplicationWebhookEventStatus,
|
||||
ApplicationWebhookEventType,
|
||||
ApplicationWebhookType,
|
||||
AttachmentFlags,
|
||||
AuditLogEvent,
|
||||
AuditLogOptionsType,
|
||||
AutoModerationActionType,
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleKeywordPresetType,
|
||||
AutoModerationRuleTriggerType,
|
||||
BaseThemeType,
|
||||
ButtonStyle,
|
||||
ChannelFlags,
|
||||
ChannelType,
|
||||
ComponentType,
|
||||
ConnectionService,
|
||||
ConnectionVisibility,
|
||||
EmbedFlags,
|
||||
EmbedMediaFlags,
|
||||
EmbedType,
|
||||
EntitlementType,
|
||||
EntryPointCommandHandlerType,
|
||||
ForumLayoutType,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildHubType,
|
||||
GuildMFALevel,
|
||||
GuildMemberFlags,
|
||||
GuildNSFWLevel,
|
||||
GuildOnboardingMode,
|
||||
GuildOnboardingPromptType,
|
||||
GuildPremiumTier,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
GuildScheduledEventRecurrenceRuleFrequency,
|
||||
GuildScheduledEventRecurrenceRuleMonth,
|
||||
GuildScheduledEventRecurrenceRuleWeekday,
|
||||
GuildScheduledEventStatus,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
IntegrationExpireBehavior,
|
||||
InteractionContextType,
|
||||
InteractionResponseType,
|
||||
InteractionType,
|
||||
InviteFlags,
|
||||
InviteTargetType,
|
||||
InviteType,
|
||||
MembershipScreeningFieldType,
|
||||
MessageActivityType,
|
||||
MessageFlags,
|
||||
MessageReferenceType,
|
||||
MessageSearchAuthorType,
|
||||
MessageSearchEmbedType,
|
||||
MessageSearchHasType,
|
||||
MessageSearchSortMode,
|
||||
MessageType,
|
||||
NameplatePalette,
|
||||
OAuth2Scopes,
|
||||
OverwriteType,
|
||||
PermissionFlagsBits,
|
||||
PollLayoutType,
|
||||
PresenceUpdateStatus,
|
||||
RoleFlags,
|
||||
SKUFlags,
|
||||
SKUType,
|
||||
SelectMenuDefaultValueType,
|
||||
SeparatorSpacingSize,
|
||||
SortOrderType,
|
||||
StageInstancePrivacyLevel,
|
||||
StatusDisplayType,
|
||||
StickerFormatType,
|
||||
StickerType,
|
||||
SubscriptionStatus,
|
||||
TeamMemberMembershipState,
|
||||
TeamMemberRole,
|
||||
TextInputStyle,
|
||||
ThreadAutoArchiveDuration,
|
||||
ThreadMemberFlags,
|
||||
UnfurledMediaItemFlags,
|
||||
UnfurledMediaItemLoadingState,
|
||||
UserFlags,
|
||||
UserPremiumType,
|
||||
VideoQualityMode,
|
||||
WebhookType,
|
||||
} = discordPayloadApiTypes;
|
||||
export const { PollLayoutType } = discordPayloadApiTypes;
|
||||
|
|
|
|||
|
|
@ -7,113 +7,24 @@ const discordApiTypes = requireDiscordApiTypes("discord-api-types/v10") as typeo
|
|||
|
||||
export default discordApiTypes;
|
||||
export const {
|
||||
APIApplicationCommandPermissionsConstant,
|
||||
ActivityFlags,
|
||||
ActivityLocationKind,
|
||||
ActivityPlatform,
|
||||
ActivityType,
|
||||
AllowedMentionsTypes,
|
||||
ApplicationCommandOptionType,
|
||||
ApplicationCommandPermissionType,
|
||||
ApplicationCommandType,
|
||||
ApplicationFlags,
|
||||
ApplicationIntegrationType,
|
||||
ApplicationRoleConnectionMetadataType,
|
||||
ApplicationWebhookEventStatus,
|
||||
ApplicationWebhookEventType,
|
||||
ApplicationWebhookType,
|
||||
AttachmentFlags,
|
||||
AuditLogEvent,
|
||||
AuditLogOptionsType,
|
||||
AutoModerationActionType,
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleKeywordPresetType,
|
||||
AutoModerationRuleTriggerType,
|
||||
BaseThemeType,
|
||||
ButtonStyle,
|
||||
ChannelFlags,
|
||||
ChannelType,
|
||||
ComponentType,
|
||||
ConnectionService,
|
||||
ConnectionVisibility,
|
||||
EmbedFlags,
|
||||
EmbedMediaFlags,
|
||||
EmbedType,
|
||||
EntitlementType,
|
||||
EntryPointCommandHandlerType,
|
||||
ForumLayoutType,
|
||||
GatewayCloseCodes,
|
||||
GatewayDispatchEvents,
|
||||
GatewayIntentBits,
|
||||
GatewayOpcodes,
|
||||
GatewayVersion,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildHubType,
|
||||
GuildMFALevel,
|
||||
GuildMemberFlags,
|
||||
GuildNSFWLevel,
|
||||
GuildOnboardingMode,
|
||||
GuildOnboardingPromptType,
|
||||
GuildPremiumTier,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
GuildScheduledEventRecurrenceRuleFrequency,
|
||||
GuildScheduledEventRecurrenceRuleMonth,
|
||||
GuildScheduledEventRecurrenceRuleWeekday,
|
||||
GuildScheduledEventStatus,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
ImageFormat,
|
||||
IntegrationExpireBehavior,
|
||||
InteractionContextType,
|
||||
InteractionResponseType,
|
||||
InteractionType,
|
||||
InviteFlags,
|
||||
InviteTargetType,
|
||||
InviteType,
|
||||
Locale,
|
||||
MembershipScreeningFieldType,
|
||||
MessageActivityType,
|
||||
MessageFlags,
|
||||
MessageReferenceType,
|
||||
MessageSearchAuthorType,
|
||||
MessageSearchEmbedType,
|
||||
MessageSearchHasType,
|
||||
MessageSearchSortMode,
|
||||
MessageType,
|
||||
NameplatePalette,
|
||||
OAuth2Scopes,
|
||||
OverwriteType,
|
||||
PermissionFlagsBits,
|
||||
PollLayoutType,
|
||||
PresenceUpdateStatus,
|
||||
ReactionType,
|
||||
RoleFlags,
|
||||
Routes,
|
||||
SKUFlags,
|
||||
SKUType,
|
||||
SelectMenuDefaultValueType,
|
||||
SeparatorSpacingSize,
|
||||
SortOrderType,
|
||||
StageInstancePrivacyLevel,
|
||||
StatusDisplayType,
|
||||
StickerFormatType,
|
||||
StickerType,
|
||||
SubscriptionStatus,
|
||||
TeamMemberMembershipState,
|
||||
TeamMemberRole,
|
||||
TextInputStyle,
|
||||
ThreadAutoArchiveDuration,
|
||||
ThreadMemberFlags,
|
||||
UnfurledMediaItemFlags,
|
||||
UnfurledMediaItemLoadingState,
|
||||
UserFlags,
|
||||
UserPremiumType,
|
||||
Utils,
|
||||
VideoQualityMode,
|
||||
VoiceChannelEffectSendAnimationType,
|
||||
WebhookType,
|
||||
} = discordApiTypes;
|
||||
|
|
|
|||
|
|
@ -164,15 +164,6 @@ export const sharedVitestConfig = {
|
|||
find: "discord-api-types/v10",
|
||||
replacement: path.join(repoRoot, "test", "vitest", "discord-api-types-v10-runtime.ts"),
|
||||
},
|
||||
{
|
||||
find: "discord-api-types/gateway/v10",
|
||||
replacement: path.join(
|
||||
repoRoot,
|
||||
"test",
|
||||
"vitest",
|
||||
"discord-api-types-gateway-v10-runtime.ts",
|
||||
),
|
||||
},
|
||||
{
|
||||
find: "discord-api-types/payloads/v10",
|
||||
replacement: path.join(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue