Skip to content

feat(blob): migrate to @vite-hub/blob 0.0.4 - #49

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
feat/migrate-vite-hub-blob-0.0.4
Sep 26, 2026
Merged

kodiakhq[bot] merged 1 commit into
mainfrom
feat/migrate-vite-hub-blob-0.0.4

Conversation

@RedStar071

@RedStar071 RedStar071 commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Supersedes #39. The bare bump fails the Workers build on the optional @aws-sdk/client-s3 peer, and 0.0.4 also changes the API (head() and get() return [error, value], the nitro and storage subpaths are gone), so server/utils/blob.ts needed a real migration.

fetchObject now uses the blob helper instead of assembling the storage by hand. Things that are easy to miss:

  • bucketName in the blob config is what selects the native R2 binding driver. Without it the plugin picks the S3 HTTP one.
  • nitro: { preset: 'cloudflare_module' } in vite.config.ts and hubBlob() listed before nitro() are both needed. Otherwise the plugin also emits a Vercel output, or the middleware that sets the R2 env is never registered and every request returns 500.
  • The wolfstar_cdn R2 binding is generated from blob now, so I removed r2_buckets from wrangler.jsonc. Keeping both gives wolfstar_cdn assigned to multiple R2 Bucket bindings on deploy.

Once this lands, #39 can be closed and the version hold from #48 dropped.

🤖 AI disclosure: Wolfstar Agent Kit modified this description. My AI open-source policy.

RetriggerConfidence Score: 5/5

No blocking issue was identified; the change is safe to merge based on the available evidence.

What we checked:

  • T-Rex ran the requested verification, but its local artifact references were not uploaded. T-Rex
  • T-Rex performed the PR binding-check against the PR-built Worker, confirming binding consistency between HEAD~1 wrangler.jsonc and the generated config, and noted that the missing-binding negative control returned HTTP 500 while the main checks returned HTTP 200, with the parent build unable to establish runtime behavior due to missing optional AWS SDK exports and no tracked files altered. T-Rex

Reviews (1) · Last reviewed commit: "feat(blob): migrate to @vite-hub/blob 0...."

Use the blob runtime helper and its [error, value] results instead of
building the storage by hand. Select the native R2 driver with bucketName
so the S3 peer dependencies are no longer pulled in, and let hubBlob()
generate the R2 binding.
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~2 changed · 🔴 -0 removed · 1 flow · 6 files · commit 7c04831


Architecture

Architecture diagram for wolfstar-project/cdn at 7c04831

2 components touched across 5 lanes.

Play the interactive walkthrough


Data flow

Data flow diagram for wolfstar-project/cdn at 7c04831

Fetching an asset from storage

Follow each request, response and payload


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • Push a commit and the drawing stays, with a note that it is out of date. Tick Redraw in the note to draw the new head

Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

@RedStar071

Copy link
Copy Markdown
Member Author

Checked by hand, since CI only builds:

  • Ran the built worker with wrangler dev against a local R2 bucket holding one 27 byte text object
  • GET returned 200 with the body and text/plain, HEAD returned 200 with Content-Length: 27
  • Range: bytes=0-4 returned 206 Content-Range: bytes 0-4/27 and hello
  • A missing key returned 404 for both GET and HEAD
  • wrangler deploy --dry-run lists a single wolfstar_cdn R2 binding

Not covered: image transformations (cf.image needs the real edge) and the production R2 bucket.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vite-hub/​blob@​0.0.1 ⏵ 0.0.482 +6100100 +1390 +2100

View full report

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
worker-r2-cdn 7c04831 Commit Preview URL

Branch Preview URL
Sep 26 2026, 03:59 PM

@kodiakhq
kodiakhq Bot merged commit 094cf24 into main Sep 26, 2026
7 checks passed
@kodiakhq
kodiakhq Bot deleted the feat/migrate-vite-hub-blob-0.0.4 branch September 26, 2026 16:06
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.

1 participant