[eas-cli] Add --dev-domain flag to eas deploy#4004
Open
brentvatne wants to merge 2 commits into
Open
Conversation
Allows assigning the EAS Hosting preview URL subdomain on a project's first deployment without the interactive prompt, so first-time deploys can run with --non-interactive and a custom URL. - Validates the name eagerly (shared rules with the interactive prompt, plus rejecting anything the prompt would have auto-reformatted) - Errors clearly when the requested name is taken, instead of the previous behavior in non-interactive mode where a taken suggested name caused infinite recursion in assignDevDomainNameAsync - Errors when the project already has a different dev domain rather than silently ignoring the flag
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
|
✅ Thank you for adding the changelog entry! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4004 +/- ##
==========================================
+ Coverage 59.67% 59.75% +0.08%
==========================================
Files 941 941
Lines 41319 41339 +20
Branches 8675 8684 +9
==========================================
+ Hits 24654 24696 +42
+ Misses 16571 16549 -22
Partials 94 94 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On a project's first
eas deploy, the CLI interactively prompts for the preview URL subdomain (dev domain name). There is currently no way to provide it non-interactively, and when the server-suggested name is taken, non-interactive mode recurses forever inassignDevDomainNameAsync(it retries with the same taken name).How
--dev-domain <name>flag oneas deploy: assigns the preview URL on first deployment without prompting.formatDevDomainName(name) !== name).--dev-domain.DeploymentsQuery.getDevDomainNameByAppIdAsync+ regenerated GraphQL types (includes small unrelated schema-drift comments codegen picked up).Test Plan
yarn test src/worker/__tests__/deployment.test.ts— 19 new tests: validation rules, flag assignment without prompting, taken-name errors (flag + non-interactive suggested), existing-domain mismatch/match, full first-deploy retry flow.yarn typecheck,yarn lint,yarn fmt:check— clean.bin/dev:deploy --helpshows the flag;--dev-domain 'My App!!'/'ab'/'ends-with-'fail fast with specific messages.Manual:
eas deploy --non-interactive --dev-domain my-fresh-name→ assignsmy-fresh-name.expo.app, no prompt.🤖 Generated with Claude Code