Files
radicle-explorer/explorer/package.json
T
Daniel Norman 0dc1e557a5 Move repo facts outside the project payload
Repos need not carry a `xyz.radicle.project` payload; the default
branch can come from `xyz.radicle.crefs` alone. Such repos got no
counts and no default branch, and failed schema validation in
explorer, which broke the parse of a whole listing.

httpd:
- Add top-level `cobs` with issue, patch and bucketed release counts
- Add top-level `defaultBranch`, qualified like the crefs payload
- Omit a count the node cannot determine instead of reporting zero
- Drop `head`: the tip is `refs[defaultBranch]`
- Keep counts in the project payload for older clients until a
  major release
- Keep the project payload when a COB read fails
- Keep `meta.releases` a single count: delegate + other
- Log and skip canonical ref rules and refs that fail to read,
  so one bad ref doesn't drop the default branch tip

explorer:
- Model `cobs` and `defaultBranch`, adapting older nodes to one shape
- Resolve the default branch from the crefs HEAD on older nodes
- Collect the shims for older httpd in http-client/lib/compat.ts,
  each naming the httpd release that the client can drop it with
- Add `defaultBranchTip`, replacing `head`, with a fallback to the
  legacy `meta.head`
- Make the project payload and its legacy meta optional
- Fall back to the RID for the repo name, and show a placeholder
  for a missing name in repo cards and the header
- Hide a counter instead of reading a missing count as zero
- Fall back to a full-page check for "More" without counts
- Add a `repo.sourceUnavailable` route for repos without a
  default branch or tip
- Browse explicit revisions and offer the branch selector without
  a default branch
- List these repos in repo grids and on the landing page
- Say the node is older or built without releases
- Scope release pages in the client, so views never call the shims
- Read OG worker repos through the same compat shims
- Share the repo name and default branch helpers with the OG worker

CI:
- Add check:open-graph, a wrangler deploy dry run
- Run it in GitHub CI, Buildkite and check:ci
- Install explorer's dependencies first: the worker
  resolves compat.ts imports, such as zod, from there

Tests:
- Test that a build without releases omits the count
- Test that one failing rule keeps the others
- Test the repo shape across httpd versions and the release shims
- Test `hasMorePages` and `repoName`
- Test repos without a project payload end to end
2026-10-29 18:21:09 +01:00

96 lines
3.3 KiB
JSON

{
"name": "radicle-explorer",
"private": true,
"version": "1.0.0",
"scripts": {
"start": "vite",
"start:httpd": "cargo run -p radicle-httpd --release -- --listen 127.0.0.1:8080",
"serve": "vite preview",
"build": "vite build",
"check": "scripts/check",
"check:ci": "scripts/check-ci",
"check:open-graph": "cd workers/open-graph && npx wrangler deploy --dry-run",
"check:radicle-httpd": "cargo clippy --all --tests && cargo fmt --all --check",
"format": "npx prettier . --write",
"test:unit": "TZ='UTC' vitest run",
"test:e2e": "NODE_CONFIG_ENV='test' TZ='UTC' playwright test",
"test:e2e:local": "scripts/compile-local-httpd && USE_LOCAL_HTTPD=true NODE_CONFIG_ENV='test' TZ='UTC' playwright test",
"test:http-client:unit": "NODE_CONFIG_ENV='test' TZ='UTC' vitest run --config http-client/vite.config.ts --reporter verbose",
"test:http-client:unit:local": "scripts/compile-local-httpd && USE_LOCAL_HTTPD=true NODE_CONFIG_ENV='test' TZ='UTC' vitest run --config http-client/vite.config.ts --reporter verbose",
"test:radicle-httpd": "cargo test --all-features",
"deploy": "rimraf build && npm clean-install && NODE_CONFIG_ENV='radicle.network' npm run build && scripts/inject-plausible && npx wrangler deploy",
"deploy:open-graph": "cd workers/open-graph && npx wrangler deploy",
"start:open-graph": "cd workers/open-graph && npx wrangler dev"
},
"type": "module",
"engines": {
"node": ">=24"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@playwright/test": "^1.61.1",
"@sveltejs/vite-plugin-svelte": "^7.2.0",
"@tsconfig/svelte": "^5.0.8",
"@types/js-yaml": "^4.0.9",
"@types/katex": "^0.16.8",
"@types/linkify-it": "^5.0.0",
"@types/lodash": "^4.17.24",
"@types/md5": "^2.3.6",
"@types/node": "^24",
"@types/wait-on": "^5.3.4",
"@typescript-eslint/parser": "^8.64.0",
"chalk": "^5.6.2",
"config": "^4.4.2",
"eslint": "^10.7.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.20.0",
"execa": "^9.6.1",
"get-port": "^7.2.0",
"globals": "^17.7.0",
"jsdom": "^29.1.1",
"katex": "^0.18.9",
"mdsvex": "^0.12.7",
"prettier": "^3.9.5",
"prettier-plugin-svelte": "^4.1.1",
"rehype-slug": "^6.0.0",
"remark-unwrap-images": "^4.0.1",
"rimraf": "^6.1.3",
"shiki": "^4.3.1",
"svelte-check": "^4.7.2",
"svelte-eslint-parser": "^1.8.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.64.0",
"vite": "^8.1.4",
"vitest": "^4.1.12",
"wait-on": "^9.0.10"
},
"dependencies": {
"@radicle-gui/ui": "0.0.0",
"@twemoji/svg": "^15.0.0",
"@wooorm/starry-night": "^3.10.0",
"async-mutex": "^0.5.0",
"baconjs": "^3.0.23",
"bs58": "^6.0.0",
"buffer": "^6.0.3",
"compare-versions": "^6.1.1",
"dompurify": "^3.4.12",
"fuzzysort": "^3.1.0",
"hast-util-to-dom": "^4.0.1",
"hast-util-to-html": "^9.0.5",
"js-yaml": "^5.2.1",
"linkify-it": "^6.0.0",
"lodash": "^4.18.1",
"lru-cache": "^11.5.2",
"marked": "^18.0.6",
"marked-emoji": "^2.0.3",
"marked-footnote": "^1.4.0",
"marked-katex-extension": "^5.1.10",
"marked-linkify-it": "^3.1.15",
"md5": "^2.3.0",
"mermaid": "^11.16.0",
"svelte": "^5.56.5",
"twemoji": "^14.0.2",
"zod": "^4.4.3"
}
}