Generate the registry.json that blode.co/ui serves - #15
Merged
Conversation
`registry/index.ts` has said `name: "blode"` for a while, with a comment
explaining that shadcn's directory pairs the registry name with the namespace
(`7ovr` -> `@7ovr`) and that a slash does not resolve. Three files claimed to be
that registry and only one agreed with it:
public/r/registry.json name: blode $schema: yes 85 items (generated)
public/registry.json name: blode/ui $schema: no 168 items (stale)
registry.json name: blode/ui $schema: no 168 items (stale)
`public/registry.json` is what blode.co/ui/registry.json serves, and that is the
URL a directory reviewer opens first. So the advertised registry was announcing
a namespace that contradicts `@blode`, with no `$schema`, while the file the CLI
actually resolves was correct the whole time. Nothing regenerated either stale
copy; `buildRegistryJson` only ever wrote to `public/r`.
It now writes both paths from the same payload, and formats both, so
`npm run check` stays green after a rebuild.
Root `registry.json` is deleted rather than fixed. It sits outside `public/`, so
it is not served; nothing imports it; and the only `/registry.json` reference in
the codebase is app/api/well-known/api-catalog, which points at
`${siteUrl}/registry.json` and therefore resolves to the `public/` copy. A stale
duplicate of a generated artefact is what caused this.
Verified after rebuild: both served files report name `blode`, carry `$schema`,
and list 85 items.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_b80e99ba-d992-4f1b-8c24-c6eb97abe2c8) |
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.
Found while checking why shadcn-ui/ui#11543 might get rejected.
registry/index.tshas saidname: "blode"for a while, with a comment explaining that shadcn's directory pairs the registry name with the namespace (7ovr→@7ovr) and a slash doesn't resolve. Three files claimed to be that registry, and only one agreed:$schemapublic/r/registry.jsonblodepublic/registry.jsonblode/uiregistry.jsonblode/uipublic/registry.jsonis what blode.co/ui/registry.json serves, and that's the URL a directory reviewer opens first. So the advertised registry announced a namespace contradicting@blode, with no$schema, while the file the CLI actually resolves (/r/registry.json) was correct all along.Nothing regenerated either stale copy.
buildRegistryJsononly ever wrote topublic/r.Changes
buildRegistryJsonwrites both served paths from the same payload, and formats both, sonpm run checkstays green after a rebuildregistry.jsondeleted rather than fixed: it sits outsidepublic/so it isn't served, nothing imports it, and the only/registry.jsonreference in the codebase (app/api/well-known/api-catalog) points at${siteUrl}/registry.json, which resolves to thepublic/copyVerified
After
npm run build:registry, both served files reportname: "blode", carry$schema, and list 85 items.npm run checkandnpm run typecheckboth pass.Still outstanding
77 files still reference the legacy
/r/styles/default/mirror, whichAGENTS.mdcalls the most likely objection to the directory submission. Not in this PR.Note
Medium Risk
Large generated JSON swap changes what directory reviewers and consumers see at the public registry URL; wrong paths or naming would break installs, but the change is build-pipeline wiring rather than runtime app logic.
Overview
Unifies the advertised registry manifest with what the shadcn CLI already used by having
buildRegistryJsonemit the same payload topublic/r/registry.jsonandpublic/registry.json, and runningoxfmton the latter so rebuilds passnpm run check.Removes the unused root
registry.jsonso there is no third, unserved copy to drift again.Refreshes
public/registry.jsonfrom the generator:nameis nowblode(notblode/ui),$schemais present, example-only entries are dropped, and the catalog matches the currentregistry/default/layout (includingregistry:baseui, titles/descriptions, and expanded component set).Reviewed by Cursor Bugbot for commit 554af9e. Bugbot is set up for automated code reviews on this repo. Configure here.