feat(tasks): add triggers to wrangler deploy config#4046
feat(tasks): add triggers to wrangler deploy config#4046RihanArfan wants to merge 5 commits intonitrojs:mainfrom
Conversation
|
@RihanArfan is attempting to deploy a commit to the Nitro Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughNitro now auto-generates Cloudflare cron triggers from configured scheduledTasks at build time; docs updated to describe this and implementation adds schedules into Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/1.docs/50.tasks.md (1)
90-91: Inconsistent dash style with the adjacent Vercel line.Line 90 uses a hyphen-with-spaces (
-) while line 91 uses an em-dash (—). Consider aligning for consistency.✏️ Proposed fix
-- `cloudflare_module` preset has native integration with [Cron Triggers](https://developers.cloudflare.com/workers/configuration/cron-triggers/). Nitro automatically generates the cron triggers in the wrangler config at build time - no manual wrangler setup required. +- `cloudflare_module` preset has native integration with [Cron Triggers](https://developers.cloudflare.com/workers/configuration/cron-triggers/). Nitro automatically generates the cron triggers in the wrangler config at build time — no manual wrangler setup required.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/1.docs/50.tasks.md` around lines 90 - 91, The two bullet lines use inconsistent dash styles; update the `cloudflare_module` preset line to match the `vercel` preset by replacing the hyphen-with-spaces (" - ") before "no manual wrangler setup required." with the same em-dash (" — ") used in the `vercel` preset so both lines use the same dash style.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/presets/cloudflare/utils.ts`:
- Around line 292-304: The cron injection block is running for both Pages and
Workers targets; restrict it to Workers module builds by checking the Cloudflare
target before mutating wranglerConfig.triggers. Wrap the existing condition that
checks nitro.options.experimental.tasks and nitro.options.scheduledTasks so it
also requires cfTarget === 'module' (or the variable used for the target in this
file), ensuring wranglerConfig.triggers and its crons are only modified for the
"module" target and not for Pages.
---
Nitpick comments:
In `@docs/1.docs/50.tasks.md`:
- Around line 90-91: The two bullet lines use inconsistent dash styles; update
the `cloudflare_module` preset line to match the `vercel` preset by replacing
the hyphen-with-spaces (" - ") before "no manual wrangler setup required." with
the same em-dash (" — ") used in the `vercel` preset so both lines use the same
dash style.
🔗 Linked issue
Closes nuxt-hub/core#648
❓ Type of change
📚 Description
Automatically adds scheduled Nitro tasks cron expressions to the generated Wrangler config for zero-config scheduled Nitro tasks support on Workers.
📝 Checklist