Repository navigation
feat(try-it): show the decdn: URI installer one-liner - #307
Conversation
The sponsord installers take get <decdn: URI> in place of pull <hash> (decdn/decdn#2449, decdn/sponsord#75). getCommand builds get 'decdn:<hex>/?ns=<id>' from a catalogue item, quoted so no shell reads the ? as a pattern. The try-it panel, llms-full.txt and the testnet launch post use it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying website with
|
| Latest commit: |
5204ab2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ff2371df.website-70y.pages.dev |
| Branch Preview URL: | https://claude-decdn-get-uri.website-70y.pages.dev |
There was a problem hiding this comment.
🔵 Needs a closer look
The code is correct and well-tested, but it ships a one-liner to the live/indexable production origin that the author notes is refused by the current installer until decdn/sponsord#75 is deployed, so a human should own the cross-repo merge timing.
0 open findings
What changed in this PR
This PR updates the site's installer one-liner to match the new decdn get <decdn: URI> interface that the sponsord installers adopt (decdn/sponsord#75), replacing the old pull <hash> --namespace <id> form. The one-liner is surfaced in three places — the interactive try-it panel, the llms-full.txt mirror, and the "testnet is live" blog post — all fed from a single lib/models.ts builder, so the refactor centralizes the URI construction and keeps the catalogue's canonical b3: hashes intact while deriving the decdn: URI at render time.
Changes:
- Replace
pullCommandwithgetCommand, built on a newbundleUri(hash, namespace)helper that strips theb3:prefix and appends the?ns=routing hint; the URI is single-quoted so?isn't glob/pattern-expanded in zsh/PowerShell. - Update the three consumers (
TryIt.tsx,app/llms-full.txt/route.ts,content/blog/09-testnet-is-live.mdx) to the newgetline. - Rewrite the unit tests to cover
bundleUriandgetCommand, including namespace, Windows, and placeholder cases.
| File | Description |
|---|---|
| lib/models.ts | Introduces bundleUri, renames pullCommand → getCommand, and updates the Item.namespace doc comment to reference the ?ns= URI form. |
| lib/models.test.ts | Adds bundleUri tests and migrates getCommand tests to the new one-liner output. |
| components/site/TryIt.tsx | Switches the rendered command to getCommand. |
| app/llms-full.txt/route.ts | Updates the plain-text mirror's try-it lines to getCommand, using a bare <hash> placeholder. |
| content/blog/09-testnet-is-live.mdx | Updates the macOS/Linux and PowerShell copy-paste lines to the new get 'decdn:…/?ns=1' form. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The sponsord installers take
get <decdn: URI>in place ofpull <hash>(decdn/sponsord#75), followingdecdn getin decdn/decdn#2460 and decdn/decdn#2461. This PR moves the site's one-liner to match:lib/models.ts:pullCommandbecomesgetCommand, built on a newbundleUri(hash, namespace). The catalogue keeps itsb3:hashes (also served as/demo.json); the URI strips the prefix. The URI is single-quoted so zsh and PowerShell do not read the?as a pattern.llms-full.txtand the "testnet is live" post show the new line.mainshows the settlement feed and nodecdn fetchline, so it needs no change.Merge with decdn/sponsord#75, once up.decdn.org serves the new installer. Until then the new line is refused by the live installer.
Verification
pnpm test: 603 passed, with newbundleUriandgetCommandcasespnpm typecheck,pnpm lintpnpm build(includingcheck:outandcheck:og-image); the built homepage andllms-full.txtcarryget 'decdn:9194000d…/?ns=1'🤖 Generated with Claude Code