Align schema commands with public schema endpoints #570
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.
issues: FE-6178, FE-6233
Problem
We've published the schema API, but don't use it the same way in the commands, and are not consistent between commands.
Solution
Following the published spec
format
instead ofdiff
URL param.force
.version
is optional.BONUS: fix .gitignore lines for fauna config files
Result
No change in behavior, but the code is internally consistent between commands and the published API.
Testing
We don't have integration tests, so I am a little paranoid about changing the schema endpoint calls. I ran each command with old and new code. The
fauna
commands are for using the currentmain
branch, and./src/user-entrypoint.mjs
is for using this branch.schema status
calls are sprinkled in with the context.schema pull
schema push
schema abandon
schema commit
schema diff