Skip to content

feat(try-it): show the decdn: URI installer one-liner - #307

Merged
alpergundogdu merged 1 commit into
mainfrom
claude/decdn-get-uri
Oct 14, 2026
Merged

alpergundogdu merged 1 commit into
mainfrom
claude/decdn-get-uri

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

The sponsord installers take get <decdn: URI> in place of pull <hash> (decdn/sponsord#75), following decdn get in decdn/decdn#2460 and decdn/decdn#2461. This PR moves the site's one-liner to match:

curl -fsSL https://up.decdn.org/decdn.sh | sh -s -- get 'decdn:<hex>/?ns=<id>'
  • lib/models.ts: pullCommand becomes getCommand, built on a new bundleUri(hash, namespace). The catalogue keeps its b3: 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.
  • The try-it panel, llms-full.txt and the "testnet is live" post show the new line.
  • The hero terminal on main shows the settlement feed and no decdn fetch line, 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 new bundleUri and getCommand cases
  • pnpm typecheck, pnpm lint
  • pnpm build (including check:out and check:og-image); the built homepage and llms-full.txt carry get 'decdn:9194000d…/?ns=1'

🤖 Generated with Claude Code

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]>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 12:33
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 pullCommand with getCommand, built on a new bundleUri(hash, namespace) helper that strips the b3: 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 new get line.
  • Rewrite the unit tests to cover bundleUri and getCommand, 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.

@alpergundogdu
alpergundogdu merged commit 8d34dab into main Oct 14, 2026
7 checks passed
@alpergundogdu
alpergundogdu deleted the claude/decdn-get-uri branch October 14, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants