feat(cli): improve interactive prompt UI with @clack/prompts#1370
Open
feat(cli): improve interactive prompt UI with @clack/prompts#1370
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1370 +/- ##
==========================================
- Coverage 88.31% 88.20% -0.12%
==========================================
Files 74 74
Lines 10430 10458 +28
Branches 1427 1432 +5
==========================================
+ Hits 9211 9224 +13
- Misses 1191 1206 +15
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Improves the interactive CLI experience for deploy approvals, text prompts, and the flags command by adopting
@clack/prompts— a modern, actively maintained prompt library with beautiful default styling.The CLI previously relied on
promptlyandenquirerfor user interaction, both of which are unmaintained and produce plain, unstyled output.@clack/promptsprovides a consistent, visually polished prompt experience out of the box, with clear confirmation dialogs, styled select menus, and proper cancellation handling via Ctrl+C.Beyond the immediate UI improvements, this also lays the groundwork for richer CLI interactions in the future.
@clack/promptsships withspinner,taskLog, and structured logging utilities that can be used to improve deploy progress, asset upload feedback, and other long-running operations.Before / After
Deploy approval
Before
After
Flags interactive menu
Before
After
Text input
Before
After
Since
@clack/promptsis an ESM-only package and Jest runs in CJS mode, a global mock file is provided attest/_helpers/mock-clack-prompts.js. This is appropriate because prompt functions are inherently interactive and should always be mocked in tests. The bundled CLI binary is unaffected since esbuild handles ESM→CJS interop at build time.Fixes #
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license