feat(enterprise): wire Pro extension points for custom fields and frontend#96
Merged
Conversation
…ion point Adds CustomFieldsHandler to enterprise.Hooks so the Pro binary can register custom field routes without shipping code in the OSS build. OSS no-op returns 402 on all /api/v1/custom-fields routes. SetEnterpriseHooks() lets regen-pro inject the full Hooks struct before calling Execute(), keeping the OSS binary unchanged for users who don't have a Pro licence.
The regen-pro binary imports the enterprise interfaces to inject Pro implementations. Go's internal/ restriction prevents cross-module imports, so the package must live at backend/enterprise/ instead of backend/internal/enterprise/. All import paths updated; no-op stubs and interfaces unchanged.
Adds a UIProvider interface to enterprise.Hooks so the Pro binary can serve its own embedded frontend (with Pro-only pages and components) instead of the OSS build. The OSS no-op delegates to ui.FS() — behaviour is unchanged for the OSS binary. routes.go now calls hooks.UI.FS() instead of ui.FS() directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Custom fields and future Pro-only pages must not ship in the OSS build. This PR wires the extension points so `regen-pro` can register real handlers and serve its own frontend without any Pro code in the OSS repo.
Test plan