-
Notifications
You must be signed in to change notification settings - Fork 358
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
chore: convert log command #6324
chore: convert log command #6324
Conversation
Just a note to say this branch now includes code to convert the open command to clack |
src/commands/logs/functions.ts
Outdated
} | ||
|
||
const levelsToPrint = options.level || LOG_LEVELS_LIST | ||
|
||
const { functions = [] } = await client.searchSiteFunctions({ siteId }) | ||
|
||
if (functions.length === 0) { | ||
log(`No functions found for the site`) | ||
return | ||
NetlifyLog.error(`No functions found for the site`) |
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.
Think we need to exit here
const { result } = await inquirer.prompt({ | ||
name: 'result', | ||
type: 'list', | ||
const result = await select({ |
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've managed to narrow down the failing tests to this select prompt but I have no idea why that would cause the timeouts. Digging further...
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.
Ah it's because we previously mocked the interaction for inquirer but we need to do the same here for the clack prompt
d8e422c
into
CP-101/design-system-clack-implementation
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes: https://linear.app/netlify/issue/CT-479/convert-logs-command-to-clack
This converts the
logs
command into using the new NetlifyLog. It is part of a bigger piece of work that can be seen in #6293. This is also the reason why this PR is merged into the branch CP-101/design-system-clack-implementation. It's a way in which I'm trying to keep possible failing tests, but also the review work to a minimum amount of work for those who are reviewing.#6325 was also merged into this branch which converts the open command to clack
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)