|
29 | 29 | This update adds optional batch upload support for R2 cache population, significantly improving upload performance for large caches when enabled via .env or environment variables. |
30 | 30 |
|
31 | 31 | **Key Changes:** |
32 | | - |
33 | 32 | 1. **Optional Batch Upload**: Configure R2 credentials via .env or environment variables to enable faster batch uploads: |
34 | | - |
35 | 33 | - `R2_ACCESS_KEY_ID` |
36 | 34 | - `R2_SECRET_ACCESS_KEY` |
37 | 35 | - `CF_ACCOUNT_ID` |
|
40 | 38 | 3. **Smart Fallback**: If credentials are not configured, the CLI falls back to standard Wrangler uploads with a helpful message about enabling batch upload for better performance |
41 | 39 |
|
42 | 40 | **All deployment commands support batch upload:** |
43 | | - |
44 | 41 | - `populateCache` - Explicit cache population |
45 | 42 | - `deploy` - Deploy with cache population |
46 | 43 | - `upload` - Upload version with cache population |
47 | 44 | - `preview` - Preview with cache population |
48 | 45 |
|
49 | 46 | **Performance Benefits (when batch upload is enabled):** |
50 | | - |
51 | 47 | - Parallel transfer capabilities (32 concurrent transfers) |
52 | 48 | - Significantly faster for large caches |
53 | 49 | - Reduced API calls to Cloudflare |
|
91 | 87 | - [#937](https://github.com/opennextjs/opennextjs-cloudflare/pull/937) [`32ba91a`](https://github.com/opennextjs/opennextjs-cloudflare/commit/32ba91a6d3fa6b9a8b2cd5a8c973c3b3eb1108f0) Thanks [@vicb](https://github.com/vicb)! - feat: retrieve CLI environment variables from `process.env` and `.env*` files |
92 | 88 |
|
93 | 89 | Recommended usage on CI: |
94 | | - |
95 | 90 | - Add your secrets to `process.env` (i.e. `CF_ACCOUNT_ID`) |
96 | 91 | - Add public values to the wrangler config `wrangler.jsonc` (i.e. `R2_CACHE_PREFIX_ENV_NAME`) |
97 | 92 |
|
98 | 93 | Recommended usage for local dev: |
99 | | - |
100 | 94 | - Add your secrets to either a `.dev.vars*` or `.env*` file (i.e. `CF_ACCOUNT_ID`) |
101 | 95 | - Add public values to the wrangler config `wrangler.jsonc` (i.e. `R2_CACHE_PREFIX_ENV_NAME`) |
102 | 96 |
|
|
153 | 147 | - [#888](https://github.com/opennextjs/opennextjs-cloudflare/pull/888) [`51322a8`](https://github.com/opennextjs/opennextjs-cloudflare/commit/51322a8c02eda77ff106e50e57f41ca3832ebd87) Thanks [@james-elicx](https://github.com/james-elicx)! - fix: remote flag not working for preview command's cache population |
154 | 148 |
|
155 | 149 | Previously, passing the `--remote` flag when running `opennextjs-cloudflare preview --remote` would not result in the remote preview binding being populated, and would throw errors due to a missing preview flag when populating Workers KV. The remote flag is now supported for the cache popoulation step when running the preview command. |
156 | | - |
157 | 150 | - `opennextjs-cloudflare preview --remote` will populate the remote binding for the preview ID specified in your Wrangler config. |
158 | 151 | - `opennextjs-cloudflare preview` will continue to populate the local binding in your Wrangler config. |
159 | 152 |
|
|
510 | 503 | - [#593](https://github.com/opennextjs/opennextjs-cloudflare/pull/593) [`faca3e1`](https://github.com/opennextjs/opennextjs-cloudflare/commit/faca3e1376dd47216f97a5dcaef6275fd16d84cb) Thanks [@vicb](https://github.com/vicb)! - Use the workerd build condition by default |
511 | 504 |
|
512 | 505 | - [#641](https://github.com/opennextjs/opennextjs-cloudflare/pull/641) [`e07a2ed`](https://github.com/opennextjs/opennextjs-cloudflare/commit/e07a2ede88896982fc4e91f1a2f131590bcdcd32) Thanks [@conico974](https://github.com/conico974)! - some performance improvements |
513 | | - |
514 | 506 | - `enableCacheInterception` can be enabled using `defineCloudflareConfig`, it loads ISR/SSG pages from cache without waiting for the js page bundle to load. PPR is not supported at the moment |
515 | 507 | - `routePreloadingBehavior` is now set to `withWaitUntil`, which means a single route js will be lazy loaded on cold start, but other routes will be preloaded using `waitUntil` for better performance |
516 | 508 |
|
|
587 | 579 | Bump `@opennextjs/aws` to 3.5.4 |
588 | 580 |
|
589 | 581 | BREAKING CHANGES |
590 | | - |
591 | 582 | - `DurableObjectQueueHandler` renamed to `DOQueueHandler` |
592 | 583 | - `NEXT_CACHE_DO_QUEUE_MAX_NUM_REVALIDATIONS` renamed to `NEXT_CACHE_DO_QUEUE_MAX_RETRIES` |
593 | 584 | - `D1TagCache` has been removed, use `D1NextModeTagCache` instead. |
|
662 | 653 | Overrides: |
663 | 654 |
|
664 | 655 | Overrides now live in `@opennextjs/cloudflare/overrides` and some files have been renamed. |
665 | | - |
666 | 656 | - Incremental cache overrides: `@opennextjs/cloudflare/overrides/incremental-cache/...` |
667 | 657 | - Tag cache overrides: `@opennextjs/cloudflare/overrides/tag-cache/...` |
668 | 658 | - Queue overrides: `@opennextjs/cloudflare/overrides/queue/...` |
669 | 659 |
|
670 | 660 | For example the KV incremental cache override can be imported as `@opennextjs/cloudflare/overrides/incremental-cache/kv-incremental-cache`. |
671 | 661 |
|
672 | 662 | Environment variables and bindings name changes: |
673 | | - |
674 | 663 | - `NEXT_CACHE_WORKERS_KV` -> `NEXT_INC_CACHE_KV` |
675 | 664 | - `NEXT_CACHE_R2_...` -> `NEXT_INC_CACHE_R2_...` |
676 | 665 | - `NEXT_CACHE_D1` -> `NEXT_TAG_CACHE_D1` |
|
686 | 675 | - [#479](https://github.com/opennextjs/opennextjs-cloudflare/pull/479) [`0c93e8b`](https://github.com/opennextjs/opennextjs-cloudflare/commit/0c93e8b3e22960553c6537b6e83b84cbd8724423) Thanks [@james-elicx](https://github.com/james-elicx)! - feat: commands for cli actions |
687 | 676 |
|
688 | 677 | The OpenNext Cloudflare CLI now uses the following commands; |
689 | | - |
690 | 678 | - `build`: build the application |
691 | 679 | - `populateCache`: populate either the local or remote cache |
692 | 680 | - `preview`: populate the local cache and start a dev server |
|
0 commit comments