-
Notifications
You must be signed in to change notification settings - Fork 281
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
Improve logs in the login command #1028
Conversation
We detected some changes in |
Co-authored-by: Gray Gilmore <[email protected]>
@graygilmore @blittle I've updated the OP with new images. Now we only show the loader after pressing a key, so the "press a key" message should be more visible. |
Updated to stable cli-kit. Please review 🙌 |
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.
👍🏻 auth logs looked good in my testing!
* Add login and logout commands * Refactor graphql client and requests, add unit tests * Update shopify-config methods and tests * Update renderErrors to use cli Command * Rework env-pull to call login and remove silent param * Rework link command to call login and remove --shop flag * Update list command to call login and remove --shop flag * Update env-list command to call login and remove --shop flag * Oclif manifest * Cleanup * Rework log replacer * Mute cli-kit auth logs * Fix mock * Update cli-kit version * Add GraphQL schema generator for local development * Use business platform login to render a list of shops * Improve login logs * Merge main branch * Fix tests * Minor changes * Update package-lock * Apply suggestions from code review Co-authored-by: Gray Gilmore <[email protected]> * Change link color * Skip writing config when no directory is passed to login * Improve unit tests * Changesets * Refactor to getUserAccount and add tests * Store shopName and email in local config * Show shopName and email after login * Force prompt during login when not passing --shop flag * Fix tests * Only show loader after pressing a key * Show short version of link in terminal * Update cli-kit version and its deps * Cleanup * Update package-lock * Remove duplicated code chunk --------- Co-authored-by: Gray Gilmore <[email protected]>
* Add login and logout commands * Refactor graphql client and requests, add unit tests * Update shopify-config methods and tests * Update renderErrors to use cli Command * Rework env-pull to call login and remove silent param * Rework link command to call login and remove --shop flag * Update list command to call login and remove --shop flag * Update env-list command to call login and remove --shop flag * Oclif manifest * Cleanup * Rework log replacer * Mute cli-kit auth logs * Fix mock * Update cli-kit version * Add GraphQL schema generator for local development * Use business platform login to render a list of shops * Improve login logs * Merge main branch * Fix tests * Minor changes * Update package-lock * Apply suggestions from code review Co-authored-by: Gray Gilmore <[email protected]> * Change link color * Skip writing config when no directory is passed to login * Improve unit tests * Changesets * Refactor to getUserAccount and add tests * Store shopName and email in local config * Show shopName and email after login * Force prompt during login when not passing --shop flag * Fix tests * Only show loader after pressing a key * Show short version of link in terminal * Update cli-kit version and its deps * Cleanup * Update package-lock * Remove duplicated code chunk --------- Co-authored-by: Gray Gilmore <[email protected]>
Builds on top of #1023
Cli-kit does not provide a way to change the logs of the authentication features, and it probably would take a while to refactor that since the logs are added in very deep functions.
For now, this should do the job. It's replacing the default logs with
renderTasks
and so on.🎩 :
h2 logout
;h2 login
and do the normal flow.h2 logout
;h2login
again but this time open the browser with a keypress and don't login. Return to the terminal and wait for 10 seconds until the timeout happens. Click theOpen
link.Gotchas:
First screen:
After pressing a key:
After timeout:
After successful login and selecting 1 shop:
Checklist