@gramio/contexts
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "@gramio/contexts", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"type": "commonjs", | ||
@@ -12,3 +12,4 @@ "description": "WIP", | ||
"lint:fix": "bun lint --apply", | ||
"prepublishOnly": "bun type && bunx tsup" | ||
"prepublishOnly": "bun type && bunx tsup", | ||
"circular": "bunx madge --circular ./src --extensions=ts" | ||
}, | ||
@@ -15,0 +16,0 @@ "devDependencies": { |
import { execSync } from "node:child_process"; | ||
import { writeFileSync } from "node:fs"; | ||
import { randomUUID } from "node:crypto"; | ||
import { appendFileSync } from "node:fs"; | ||
import { EOL } from "node:os"; | ||
@@ -26,7 +27,11 @@ | ||
const delimiter = `---${randomUUID()}---${EOL}`; | ||
if (process.env.GITHUB_OUTPUT) | ||
writeFileSync( | ||
appendFileSync( | ||
process.env.GITHUB_OUTPUT, | ||
`changelog="${commits.join(EOL.repeat(2))}"${EOL}version=${version}${EOL}`, | ||
`changelog<<${delimiter}${commits.join( | ||
EOL.repeat(2), | ||
)}${EOL}${delimiter}version=${version}${EOL}`, | ||
); | ||
else console.log("Not github actions"); |
@@ -7,1 +7,60 @@ import "reflect-metadata"; | ||
export * from "./types"; | ||
import * as Contexts from "./contexts"; | ||
export const contextsMappings = { | ||
callback_query: Contexts.CallbackQueryContext, | ||
chat_join_request: Contexts.ChatJoinRequestContext, | ||
chat_member: Contexts.ChatMemberContext, | ||
my_chat_member: Contexts.ChatMemberContext, | ||
chosen_inline_result: Contexts.ChosenInlineResultContext, | ||
delete_chat_photo: Contexts.DeleteChatPhotoContext, | ||
group_chat_created: Contexts.GroupChatCreatedContext, | ||
inline_query: Contexts.InlineQueryContext, | ||
invoice: Contexts.InvoiceContext, | ||
left_chat_member: Contexts.LeftChatMemberContext, | ||
location: Contexts.LocationContext, | ||
message_auto_delete_timer_changed: | ||
Contexts.MessageAutoDeleteTimerChangedContext, | ||
message: Contexts.MessageContext, | ||
channel_post: Contexts.MessageContext, | ||
edited_message: Contexts.MessageContext, | ||
edited_channel_post: Contexts.MessageContext, | ||
migrate_from_chat_id: Contexts.MigrateFromChatIdContext, | ||
migrate_to_chat_id: Contexts.MigrateToChatIdContext, | ||
new_chat_members: Contexts.NewChatMembersContext, | ||
new_chat_photo: Contexts.NewChatPhotoContext, | ||
new_chat_title: Contexts.NewChatTitleContext, | ||
passport_data: Contexts.PassportDataContext, | ||
pinned_message: Contexts.PinnedMessageContext, | ||
poll_answer: Contexts.PollAnswerContext, | ||
poll: Contexts.PollContext, | ||
pre_checkout_query: Contexts.PreCheckoutQueryContext, | ||
proximity_alert_triggered: Contexts.ProximityAlertTriggeredContext, | ||
write_access_allowed: Contexts.WriteAccessAllowedContext, | ||
boost_added: Contexts.BoostAddedContext, | ||
forum_topic_created: Contexts.ForumTopicCreatedContext, | ||
forum_topic_edited: Contexts.ForumTopicEditedContext, | ||
forum_topic_closed: Contexts.ForumTopicClosedContext, | ||
forum_topic_reopened: Contexts.ForumTopicReopenedContext, | ||
general_forum_topic_hidden: Contexts.GeneralForumTopicHiddenContext, | ||
general_forum_topic_unhidden: Contexts.GeneralForumTopicUnhiddenContext, | ||
shipping_query: Contexts.ShippingQueryContext, | ||
successful_payment: Contexts.SuccessfulPaymentContext, | ||
users_shared: Contexts.UsersSharedContext, | ||
chat_shared: Contexts.ChatSharedContext, | ||
video_chat_ended: Contexts.VideoChatEndedContext, | ||
video_chat_participants_invited: Contexts.VideoChatParticipantsInvitedContext, | ||
video_chat_scheduled: Contexts.VideoChatScheduledContext, | ||
video_chat_started: Contexts.VideoChatStartedContext, | ||
web_app_data: Contexts.WebAppDataContext, | ||
service_message: Contexts.MessageContext, | ||
message_reaction: Contexts.MessageReactionContext, | ||
message_reaction_count: Contexts.MessageReactionCountContext, | ||
chat_boost: Contexts.ChatBoostContext, | ||
removed_chat_boost: Contexts.RemovedChatBoostContext, | ||
giveaway_created: Contexts.GiveawayCreatedContext, | ||
giveaway_completed: Contexts.GiveawayCompletedContext, | ||
giveaway_winners: Contexts.GiveawayWinnersContext, | ||
}; |
import type { Message } from "#structures"; | ||
import { MessageEventName } from "#types"; | ||
import * as Contexts from "./contexts"; | ||
@@ -94,59 +93,2 @@ export function memoizeGetters<T>( | ||
export const contextsMappings = { | ||
callback_query: Contexts.CallbackQueryContext, | ||
chat_join_request: Contexts.ChatJoinRequestContext, | ||
chat_member: Contexts.ChatMemberContext, | ||
my_chat_member: Contexts.ChatMemberContext, | ||
chosen_inline_result: Contexts.ChosenInlineResultContext, | ||
delete_chat_photo: Contexts.DeleteChatPhotoContext, | ||
group_chat_created: Contexts.GroupChatCreatedContext, | ||
inline_query: Contexts.InlineQueryContext, | ||
invoice: Contexts.InvoiceContext, | ||
left_chat_member: Contexts.LeftChatMemberContext, | ||
location: Contexts.LocationContext, | ||
message_auto_delete_timer_changed: | ||
Contexts.MessageAutoDeleteTimerChangedContext, | ||
message: Contexts.MessageContext, | ||
channel_post: Contexts.MessageContext, | ||
edited_message: Contexts.MessageContext, | ||
edited_channel_post: Contexts.MessageContext, | ||
migrate_from_chat_id: Contexts.MigrateFromChatIdContext, | ||
migrate_to_chat_id: Contexts.MigrateToChatIdContext, | ||
new_chat_members: Contexts.NewChatMembersContext, | ||
new_chat_photo: Contexts.NewChatPhotoContext, | ||
new_chat_title: Contexts.NewChatTitleContext, | ||
passport_data: Contexts.PassportDataContext, | ||
pinned_message: Contexts.PinnedMessageContext, | ||
poll_answer: Contexts.PollAnswerContext, | ||
poll: Contexts.PollContext, | ||
pre_checkout_query: Contexts.PreCheckoutQueryContext, | ||
proximity_alert_triggered: Contexts.ProximityAlertTriggeredContext, | ||
write_access_allowed: Contexts.WriteAccessAllowedContext, | ||
boost_added: Contexts.BoostAddedContext, | ||
forum_topic_created: Contexts.ForumTopicCreatedContext, | ||
forum_topic_edited: Contexts.ForumTopicEditedContext, | ||
forum_topic_closed: Contexts.ForumTopicClosedContext, | ||
forum_topic_reopened: Contexts.ForumTopicReopenedContext, | ||
general_forum_topic_hidden: Contexts.GeneralForumTopicHiddenContext, | ||
general_forum_topic_unhidden: Contexts.GeneralForumTopicUnhiddenContext, | ||
shipping_query: Contexts.ShippingQueryContext, | ||
successful_payment: Contexts.SuccessfulPaymentContext, | ||
users_shared: Contexts.UsersSharedContext, | ||
chat_shared: Contexts.ChatSharedContext, | ||
video_chat_ended: Contexts.VideoChatEndedContext, | ||
video_chat_participants_invited: Contexts.VideoChatParticipantsInvitedContext, | ||
video_chat_scheduled: Contexts.VideoChatScheduledContext, | ||
video_chat_started: Contexts.VideoChatStartedContext, | ||
web_app_data: Contexts.WebAppDataContext, | ||
service_message: Contexts.MessageContext, | ||
message_reaction: Contexts.MessageReactionContext, | ||
message_reaction_count: Contexts.MessageReactionCountContext, | ||
chat_boost: Contexts.ChatBoostContext, | ||
removed_chat_boost: Contexts.RemovedChatBoostContext, | ||
giveaway_created: Contexts.GiveawayCreatedContext, | ||
giveaway_completed: Contexts.GiveawayCompletedContext, | ||
giveaway_winners: Contexts.GiveawayWinnersContext, | ||
}; | ||
export const SERVICE_MESSAGE_EVENTS: MessageEventName[] = [ | ||
@@ -153,0 +95,0 @@ "new_chat_members", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
967054
25682