spacetime publish --yes now takes optional arguments#4885
Open
spacetime publish --yes now takes optional arguments#4885
spacetime publish --yes now takes optional arguments#4885Conversation
spacetime publish --accept-remotespacetime publish --yes now takes optional arguments
Implements #3784. `--yes` is now an enum-valued flag accepting all|remote|migrate|break-clients|skip-login, combinable with '|' (e.g. --yes='migrate|skip-login'). With no value it defaults to all, matching the previous behavior. Each prompt site reads from the corresponding YesFlags field. The legacy --break-clients flag is preserved as an alias for --yes=break-clients. Uses require_equals so `spacetime publish --yes my-db` parses my-db as the database name rather than as a value to --yes.
7e6c142 to
1d455ec
Compare
MDX interprets `{...}` as a JSX expression, which broke `cargo ci docs`
when rendering the regenerated CLI reference. Reword the value list to
avoid braces.
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.
Description of Changes
This was prompted from another request from the discord. Conversation context: https://discord.com/channels/1037340874172014652/1138987509834059867/1496964407278698656
We've had the ticket to make
--yestake an enum value: #3784 . Since we can do this in a non-API/ABI breaking way we're just implementing this ticket.Disclaimer: I used claude to write ~90% of this PR.
API and ABI breaking changes
None.
--yesnow just takes an optional argument string that we parse, existing CLI commands that use--yeswill be unaffected.Expected complexity level and risk
1 - This is just modifying the
--yesargument and I've included tests in the PR.Testing
spacetime publish --yesstill works as expectedspacetime publish --yes=alldoes the same thing asspacetime publish --yesspacetime publish --yes=remoteonly skips asking if publishing to a remote server is ok.spacetime publish --yes=remoteonly skips asking if publishing to a remote server is ok.spacetime publish --yes=migrate|remoteskips both the migrate prompt and the remote server prompt.