Repository navigation
Conversation
anilonayy
force-pushed
the
fix/boolean-flags-false
branch
from
October 12, 2026 00:19
240e743 to
ccaaaf7
Compare
Author
|
Hi @Siumauricio, friendly ping on this one when you have a moment. It fixes #58 (generated boolean options couldn't be set to |
Author
|
Hi @Siumauricio, following up on this. It is still mergeable and fixes #58. Happy to adjust the |
Collaborator
|
@anilonayy solve conflicts |
…alse # Conflicts: # src/generated/commands.ts
Author
|
@imrja8 conflicts are resolved. The branch is now up to date with |
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.
Fixes #58
Problem
Generated boolean options are bare flags (
--autoDeploy), so they can only sendtrue. There's no way to turn a setting off from the CLI:Required boolean inputs (e.g.
application save-environment --createEnvFile,--isEnabled,--enabled) are worse: the flag is mandatory, so those commands can only ever sendtrue.Fix
generateOptionLineinscripts/generate.tsnow also emits commander's negated flag for every boolean field:When both
--xand--no-xare defined, commander leaves the valueundefinedif neither is passed. So omitted booleans are still not sent, and partial updates don't overwrite unrelated settings.--xkeeps its current meaning (true), so existing scripts are unaffected. The existing boolean coercion already handlesfalse. For required booleans,--no-xsatisfies the requirement.src/generated/commands.tswas regenerated withpnpm run generate. That also picks upcompose update --pullImages, which was already inopenapi.jsonbut hadn't been regenerated yet.Testing
tests/boolean-flags.test.tsruns the built CLI against a local HTTP server and checks the request body:--autoDeploy→autoDeploy: true--no-autoDeploy --no-cleanCache→ bothfalse--name→ no boolean keys in the payload--helplists--no-autoDeploypnpm run buildandpnpm test(22/22) pass.biome lintis clean on the changed files andbiome checkis clean on the new test file.scripts/generate.tshas formatter diffs that are already onmain; I left them alone to keep this diff small.application save-environment ... --no-createEnvFilegets past option parsing, while leaving the flag out still fails withrequired option '--createEnvFile' not specified.