-
Notifications
You must be signed in to change notification settings - Fork 343
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
feat: convert status command to clack #6323
feat: convert status command to clack #6323
Conversation
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.
Some small feedback!
src/commands/status/status.ts
Outdated
log() | ||
log('Login with "netlify login" command') | ||
exit() | ||
NetlifyLog.error(`Not logged in. Please log in to see site status.`) |
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.
For this one, you might want to add a second parameter with {exit: false}
so that line 16 doesn't immediately exit the process. Otherwise line 17 and 18 won't be shown. OR you can change it into a NetlifyLog.warn
because it is more informative than actually going wrong :)
I also think we don't need the additional empty one on line 17. I've so far removed all the empty log()
ones I've seen.
Then on line 18 you can just use NetlifyLog.message()
and then after that you could do outro()
.
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.
Awesome, I needed this thank you
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 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.
done
src/commands/status/status.ts
Outdated
@@ -93,5 +91,6 @@ export const status = async (options: OptionValues, command: BaseCommand) => { | |||
'Site Id': chalk.yellowBright(siteInfo.id), | |||
}), | |||
) | |||
log() | |||
NetlifyLog.message() |
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.
I'd just remove this :)
b8daf92
into
CP-101/design-system-clack-implementation
π Thanks for submitting a pull request! π
Summary
Converts status command to clack
Before:
![image](https://private-user-images.githubusercontent.com/15314252/297337182-dccc2942-b662-4564-866a-1020fd0e2689.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA2NDcyNDAsIm5iZiI6MTcyMDY0Njk0MCwicGF0aCI6Ii8xNTMxNDI1Mi8yOTczMzcxODItZGNjYzI5NDItYjY2Mi00NTY0LTg2NmEtMTAyMGZkMGUyNjg5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDIxMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwNmVlNjEzZGZiOGIyZWZhZDQzNjE4OTU0M2U1YmZmODY5ZjU4OTMxYzUwMTg0N2U1NzFjYjAyMjcyYjI1NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.sdGMCrJ5REHl4XmnDtw2oXFDVpDEHH2B37urvnSEi3I)
After:
![image](https://private-user-images.githubusercontent.com/15314252/297336787-c558c3e4-28c6-4e19-8f4d-b4a7703ed4f0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA2NDcyNDAsIm5iZiI6MTcyMDY0Njk0MCwicGF0aCI6Ii8xNTMxNDI1Mi8yOTczMzY3ODctYzU1OGMzZTQtMjhjNi00ZTE5LThmNGQtYjRhNzcwM2VkNGYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDIxMjkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYxNzU5YmQwOWNhZWU5MzYyNWUzYjE0ZjUzMjJlYTZiMzViMjIxMzNkNjZiNjI5NzU4MzcwOTNiMzA4ZmY5NmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BOnSdXG3CisBK7W0fbhasXK-QeXK4akB5w21TR3zmIc)
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)