Repository navigation
feat(blob): migrate to @vite-hub/blob 0.0.4 - #49
Conversation
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.
◈ PR Lens
Architecture 2 components touched across 5 lanes. Play the interactive walkthrough Data flow
Follow each request, response and payload View
Tip Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion 🪧 More tips
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. |
|
Checked by hand, since CI only builds:
Not covered: image transformations ( |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Deploying with
|
| 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 |
❓ Type of change
📚 Description
Supersedes #39. The bare bump fails the Workers build on the optional
@aws-sdk/client-s3peer, and 0.0.4 also changes the API (head()andget()return[error, value], thenitroandstoragesubpaths are gone), soserver/utils/blob.tsneeded a real migration.fetchObjectnow uses theblobhelper instead of assembling the storage by hand. Things that are easy to miss:bucketNamein theblobconfig is what selects the native R2 binding driver. Without it the plugin picks the S3 HTTP one.nitro: { preset: 'cloudflare_module' }invite.config.tsandhubBlob()listed beforenitro()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.wolfstar_cdnR2 binding is generated fromblobnow, so I removedr2_bucketsfromwrangler.jsonc. Keeping both giveswolfstar_cdn assigned to multiple R2 Bucket bindingson deploy.Once this lands, #39 can be closed and the version hold from #48 dropped.
No blocking issue was identified; the change is safe to merge based on the available evidence.
What we checked:
Reviews (1) · Last reviewed commit: "feat(blob): migrate to @vite-hub/blob 0...."