Minor Changes
-
#1290
46c50fcThanks @james-elicx! - feature: add opt-in batch upload viarclonefor fast R2 cache population.Key Changes:
-
Optional
rcloneUpload: Install the optionalrclone.jspeer dependency and pass--rcloneto opt in torclonebased batch uploads.R2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEYCF_ACCOUNT_ID
-
Explicit Opt-in: The existing worker-based population path remains the default.
rcloneis only loaded when--rcloneis used for a remote cache. -
Clear Errors: The CLI reports missing credentials or a missing
rclone.jsinstallation when the option is used.
Usage:
Install
rclone.js, then add the secrets in a.env/.dev.varsfile in your project root:pnpm add rclone.js pnpm approve-builds # select rclone.js pnpm rebuild rclone.js R2_ACCESS_KEY_ID=your_key R2_SECRET_ACCESS_KEY=your_secret CF_ACCOUNT_ID=your_account opennextjs-cloudflare deploy --rcloneYou can also set the environment variables for CI builds.
Notes:
- You can follow documentation https://developers.cloudflare.com/r2/api/tokens/ for creating API tokens with appropriate permissions for R2 access.
rclonemay not be supported on all platforms.
-
Patch Changes
-
#1289
eef243fThanks @thatssoheil! - fix: spread SQLite bindings in BucketCachePurge alarm so tag purges runBucketCachePurge.alarm()passed its tag bindings toSqlStorage.execas a
single array.exec(query, ...bindings)is variadic over its bindings, so for a
multi-tagDELETE ... WHERE tag IN (?, ?, …)the binding count (1) disagreed
with the placeholder count (N) andexecthrew "Wrong number of parameter
bindings" on every flush. On-demandrevalidateTagpurges therefore never
reached the Cloudflare cache, and withbypassTagCacheOnCacheHitenabled pages
served stale until the ISR TTL expired.Spread the bindings, normalise the
INSERTto the same variadic form, and
tighten the drain loop's guard fromwhile (tags.length >= 0)(which never
exits via the condition) towhile (tags.length > 0). -
#1291
51439b1Thanks @james-elicx! - fix: disable response compression when provisioning R2 cache bucketsAvoid truncated compressed Cloudflare API responses causing R2 cache bucket provisioning to fail.