GitBulletin

Repository: farcasterxyz/hub-monorepo

"Innovative Leap in Event Processing: New Hooks Unleashed in Shuttle Update!"

2024-07-13 01:28:26 UTC

"Developers gain unprecedented control with before and after event processing hooks, paving the way for customized logic and enhanced efficiency."

Commit Details:

feat(shuttle): Support running before/after hooks when processing events (#2176) ## Why is this change needed? We want the ability to provide custom pre/post-processing logic when processing events. Expose optional hooks that can be specified. This has the added benefit that the `beforeProcess` hook can be used to skip processing of an event. ## Merge Checklist - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [x] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the `@farcaster/shuttle` package by adding support for running before/after hooks when processing events. ### Detailed summary - Added `beforeProcess` and `afterProcess` handlers to `EventStreamHubSubscriber` and `HubEventStreamConsumer` - Implemented handling of preprocess and postprocess actions for event processing - Introduced `EventStreamHubSubscriberOptions` and `EventStreamConsumerOptions` interfaces - Updated `HubEventStreamConsumer` to extend `TypedEmitter` for custom event tracking > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->

Search Similar