Skip to content

fix: route cleanup#25

Merged
alanshaw merged 1 commit into
mainfrom
ash/fix/route-cleanup
May 22, 2026
Merged

fix: route cleanup#25
alanshaw merged 1 commit into
mainfrom
ash/fix/route-cleanup

Conversation

@alanshaw

@alanshaw alanshaw commented May 22, 2026

Copy link
Copy Markdown
Member

The binding package is the outer layer sugar, it can depend on lower levels but lower levels should not depend on it.

This PR moves the NewRoute[Args, OK CBORValue](cmd Binding[Args, OK], fn HandlerFunc[Args, OK]) function to the binding package and adds a Route(...) method to Binding allowing users to create a route directly from the binding (similar to Handler(...)).

The Route type stays in server package since it is a useful container type even if you're not using the binding package.

I've added a NewRoute(cmd ucan.Command, fn execution.HandlerFunc) to server in place of the binding specific NewRoute for convenience.

@alanshaw alanshaw requested a review from frrist May 22, 2026 09:27
@alanshaw alanshaw merged commit eda937b into main May 22, 2026
1 check passed
@alanshaw alanshaw deleted the ash/fix/route-cleanup branch May 22, 2026 15:21
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.

2 participants