-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add --domain flag to deploy command for custom domains #10312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
🦋 Changeset detectedLatest commit: c75252b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
- Add --domain flag (alias: --domains) to wrangler deploy command - Convert domain strings to custom domain route format automatically - Add comprehensive tests for domain flag functionality - Validate domains using existing custom domain validation rules Fixes #10215 Co-Authored-By: [email protected] <[email protected]>
df254b2 to
c7f34c7
Compare
|
Thanks for the question! You're absolutely right to question this behavior. I investigated how Current
Current
This is actually consistent behavior. The test case name was misleading, so I updated it to "should deploy --domain flags alongside routes (from config when no CLI routes)" to clarify that domains work with the active route source. The key insight is that domains are a different type of route (custom domain routes) that complement regular routes, rather than replacing them. This allows users to deploy to both regular routes and custom domains in a single command. The behavior is working as intended - domains add custom domain routes to whatever route configuration is active (CLI routes if provided, otherwise config routes). |
Co-Authored-By: [email protected] <[email protected]>
|
Congratulations @devin-ai-integration[bot], the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cme7jjh3j101707iej9txcbk0 This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
threepointone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved!
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
Fixes #10215
This PR adds a new
--domainflag to thewrangler deploycommand that allows users to deploy directly to custom domains without manually configuring routes in theirwrangler.tomlfile.Changes
Core Implementation:
domainsflag (withdomainalias) to the deploy command definition{ pattern: domain, custom_domain: true })triggersDeployfunction'sPropstype to acceptRoute[]instead ofstring[]for routesUser Experience:
Testing:
Key Implementation Details
The
--domainflag leverages the existing custom domain infrastructure by converting domain strings to the same route format that custom domains already use internally. This ensures consistency with existing validation, deployment, and error handling.Type System Change: Updated
triggersDeployProps to acceptRoute[]instead ofstring[]for routes to support the mixed route types (string routes and custom domain route objects).Review Focus Areas
string[]toRoute[]intriggersDeployProps - verify this doesn't break other callers{ pattern: domain, custom_domain: true }formatLink to Devin run: https://app.devin.ai/sessions/3f13f8ef54434b64accdb268e89f3aa1
Requested by: @petebacondarwin
--domainoption towrangler deploycloudflare-docs#24296