-
Notifications
You must be signed in to change notification settings - Fork 16
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
Handle No Local Schema Files #505
Conversation
fd3a7cc
to
454c665
Compare
src/commands/schema/status.mjs
Outdated
const gatherFSL = container.resolve("gatherFSL"); | ||
const fsl = reformatFSL(await gatherFSL(argv.dir)); | ||
|
||
const hasLocalSchema = fsl.entries().next().done === false; | ||
|
||
const statusParams = new URLSearchParams({ diff: "summary" }); |
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.
There is no diff
param documented for /status
or /diff
endpoints. Maybe that's an old value? Is the format: "summary"
the param you want?
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.
Can confirm — format
is the new alias for diff
.
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.
cool - I've updated the command to use format
as well as the expectation in the tests
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.
Looks good aside from a minor test suggestion.
Co-authored-by: James Rodewig <[email protected]>
Ticket(s): FE-6217
Problem
When no local schema files are found
schema status
tells the user that everything will be removed.Solution
Detect if no files were found and output a message to that effect instead.
Result
Users will know that they have specified the wrong schema directory.
Testing
Updated & added tests.