feat(registry): the shell and the package page in the brand tokens #296
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/12-registry-package-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #12
The registry's shell and a static page per package, in the brand tokens (BRAND.md slice 2).
Commit 1,
feat(docs): the registry's shell and package page styles:site-registry.trb(shell with thepackageslabel,chipList,capabilityChips,registryPageHtmlwithsearchAction: String?),assets/registry.cssandassets/registry.jswritten bytorb docs site, tests, docs/tooling/torb-docs-site.md.Commit 2,
feat(registry): static package pages:tools/registry/src/packages.trbwritespackages/<owner>/<name>/index.htmlfrom the database: name, latest non-yanked version, description, keyword and capability chips ("none" without capabilities), a copyabletorb add owner/name(selectable code block without script), runtime dependencies, dependents, publish date, a docs link where rendered, and a table of all versions with yanked ones tinted, with the word and the reason. Every stored value is escaped. Pages are rewritten under the write lock on publish, yank and unyank (and for the packages whose dependents count moved), by the documentation worker after a render, and filled at start. A package with every release yanked keeps its page. nginx.conf, Dockerfile.site and compose.example.yml serve/packages/and/assets/on the registry host. RELEASE.md 7.11, the registry README and BRAND.md are updated.Not in this PR: advisories, README/license on the page, the capability summary (#51), the search page (#241), the account pages (#295).
Verification is by CI only (format, compile, tests); nothing .trb ran locally.
Parallel PRs #292 and #294 touch the same registry hooks and files; this branch is based on current main.
f38cce90c949e77c936b49e77c936bc169e22413Review of
c169e22(closes #12)site-registry.test.trbcovers the shell, no inline script/style=/handler, escaping, token-only stylesheet and brand drawings;packages.test.trbruns publish, newer publish, yank, unyank, all-yanked, docs link and start-time fill end to end. CI green on this head, including tier A/B and tools/registry.Version, dependents count (including the dependency's page after a dependent's publish/yank), all-yanked page with notice and notorb add. Page failures are printed and never undo a publish/yank.escapedHtml, also in thedata-copyattribute and the hrefs; pages carry a single script (own file). nginx serves/packages/underdefault-src 'none'; script-src 'self'; style-src 'self'; ...; frame-ancestors 'none'plusnosniff, with all headers repeated becauseadd_headerreplaces the server's. No secrets, no new external requests or services./assets/(documented in the Dockerfile and compose comments).Non-blocking:
pageRefreshed.