Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic hook support #181

Merged
merged 3 commits into from
Nov 3, 2023
Merged

Add basic hook support #181

merged 3 commits into from
Nov 3, 2023

Conversation

ejizba
Copy link
Contributor

@ejizba ejizba commented Nov 1, 2023

This PR supports app start, app terminate, pre invocation, and post invocation hooks. Fixes #7

To see example code, check out the end-to-end tests I added here in app/v4/src/index.ts. I also added unit tests in this repo, but they're less meaningful (they mainly ensure hooks are unit-testable by our users as well).

Loosely based off Hossam's work in #115, which has been delayed a lot. I think part of the delay was from feature-creep, so my focus is just to get the MVP out and I don't have any plans to add all the extra features at this time. I'm super excited about hooks even in MVP-form and I think our users will be, too.

src/index.ts Show resolved Hide resolved
test/hooks.test.ts Outdated Show resolved Hide resolved
@ejizba ejizba merged commit 4b0f32b into v4.x Nov 3, 2023
9 checks passed
@ejizba ejizba deleted the ej/hooks branch November 3, 2023 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add hooks api to framework package
2 participants