Repository navigation
fix: format the account-selection config hint consistently - #242
petebacondarwin merged 1 commit into
Conversation
The tip printed after the account picker now joins clack's guide, wraps to the terminal width, and prints its snippet indented but without guide glyphs, so copying it from the terminal yields valid TypeScript. When a cloudflare.config.ts already exists, the tip names that file and shows only the accountId line to add. --quiet omits the tip. Fixes cloudflare#42
|
Hi @khoinguyenpham04. Thanks for contributing to During the open beta, we’re being very intentional about the changes we accept so that we can prioritise stability for GA. We’re limiting pull requests to contributions coordinated with the team in advance, so this PR has been automatically closed. We’d still love to hear about your use case, so please make sure it’s captured in a |
|
Re-opening to consider this PR. |
|
Hi @khoinguyenpham04. Thanks for contributing to During the open beta, we’re being very intentional about the changes we accept so that we can prioritise stability for GA. We’re limiting pull requests to contributions coordinated with the team in advance, so this PR has been automatically closed. We’d still love to hear about your use case, so please make sure it’s captured in a |
commit: |
Fixes #42.
Summary
cloudflare.config.tsalready exists, name it by relative path and show only theaccountIdline to add--quiet, like cf's other tipsBefore
After
With an existing
cloudflare.config.ts:Testing
pnpm checkpnpm test src/__tests__/lib/account-hint.test.ts src/__tests__/commands/account-selection.test.tsaccount-selection.test.tsrunscf pages listwith two accounts through the real picker and snapshots the picker, tip, snippet, and command output together, with and without--quietaccount-hint.test.tscovers the existing-config variant and wrapping on narrow terminals, including which words stay emphasizedcf pages listagainst a local API mock with several accounts: dark and light backgrounds, 256-color, 53, 60 and 100 columns, and--quiet