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

feat: add RegistryFactory class #581

Conversation

mshojaei-txfusion
Copy link
Collaborator

@mshojaei-txfusion mshojaei-txfusion commented Feb 13, 2025

Description

Implements a new RegistryFactory class to standardize registry creation and adds proxy URL support for the canonical registry. Changes include:

  • Added PROXY_DEPLOYED_URL constant
  • Implemented RegistryFactory class with support for creating both GitHub and FileSystem registries
  • Added proxy URL support for the canonical registry repository
  • Added comprehensive unit tests for the new factory implementation
  • Exported new registry-related utilities

Backward compatibility

Yes - These changes are backward compatible as they add new functionality without modifying existing behavior.

Related issues

hyperlane-xyz/hyperlane-monorepo#5403

Testing

  • Unit tests have been added covering:
    • Registry creation for both HTTPS and local filesystem paths
    • Proxy URL functionality for canonical repository
    • MergedRegistry creation with multiple URIs
    • Error handling for invalid inputs
  • All existing registry functionality remains tested and unchanged

Copy link

changeset-bot bot commented Feb 13, 2025

🦋 Changeset detected

Latest commit: 7123e5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hyperlane-xyz/registry Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mshojaei-txfusion mshojaei-txfusion changed the title feat: add fromUris static factory method to MergedRegistry feat: add RegistryFactory class Feb 14, 2025
@mshojaei-txfusion
Copy link
Collaborator Author

Closed this as for now we would go with #592
No need for Factory class yet.

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