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

improve: anyware builder #1254

Merged
merged 38 commits into from
Nov 11, 2024
Merged

improve: anyware builder #1254

merged 38 commits into from
Nov 11, 2024

Conversation

jasonkuhrt
Copy link
Member

@jasonkuhrt jasonkuhrt commented Nov 5, 2024

progresses #1236

@jasonkuhrt jasonkuhrt changed the title improve: anyware builder improve: modular anyware Nov 7, 2024
@jasonkuhrt
Copy link
Member Author

Update:

I have gotten types passing.

I need now to fill in implementation.

It should be minimal effort because the runtime of anyware has essentially not been touched.

It should be just a matter of wiring a few function inputs to the pipeline type.

One unresolved maybe issue is how return errors type has broken. It has gone from union of ContextualError|DOMException to ContextualErrorAggregate. This may be an acceptable loss to keep momentum going, and keeping in mind the entire outputs system is generally in need an of an iteration (for example the input config for it).

Recapping the priorities:

  • Get this merged
  • Anyware gains a concept of pipeline context data, not tied to input or output of any one hook. How to make this available to interceptors requires some thinking:
    • union types of input that branch on context conditions
    • context spans all hooks so should it come from top level parameter? but then how to reconcile with above point?
  • Anyware gains an ability to have extensions that can:
    • extend the context type
    • extend hook input/ouput types
    • provide a runtime for 1 or more hooks
    • declare a context-condition (e.g. use me when context data has transport=http)

This PR has focused on reworking the Anyware interface to something clean enough to pursue the significant challenge above.

@jasonkuhrt jasonkuhrt changed the title improve: modular anyware improve: anyware builder Nov 9, 2024
@jasonkuhrt jasonkuhrt marked this pull request as ready for review November 11, 2024 19:50
@jasonkuhrt jasonkuhrt merged commit c92a67b into main Nov 11, 2024
14 checks passed
@jasonkuhrt jasonkuhrt deleted the improve/anyware-buidler branch November 11, 2024 19:59
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.

1 participant