-
Notifications
You must be signed in to change notification settings - Fork 79
cli: add auth commands #211
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
Conversation
0a5495c
to
1a46e9c
Compare
1a46e9c
to
fb0ae8a
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #211 +/- ##
==========================================
- Coverage 78.64% 78.11% -0.54%
==========================================
Files 49 50 +1
Lines 3695 3870 +175
Branches 483 507 +24
==========================================
+ Hits 2906 3023 +117
- Misses 780 838 +58
Partials 9 9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR adds authentication management commands to the CLI and restructures the codebase for better organization. The changes enable users to manage authentication settings through dedicated CLI commands while maintaining clean separation of concerns.
- Adds new
auth
command withenable
,disable
, androle
subcommands for managing authentication - Restructures the project by moving utilities into a
lib
directory and commands into acommands
directory - Consolidates password prompting functionality into a reusable utility function
Reviewed Changes
Copilot reviewed 12 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/cli/src/lib/ui.ts | Adds reusable password prompting function with validation |
packages/cli/src/lib/config.ts | Updates path resolution for new directory structure |
packages/cli/src/commands/auth.ts | Implements new authentication management commands |
packages/cli/src/commands/install.ts | Updates imports and uses new shared password prompt function |
packages/cli/src/index.ts | Adds auth command configuration and updates help behavior |
Test files | Updates test imports and adds comprehensive auth command tests |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Overview
This PR makes two major changes
auth
, and three sub-commandsa.
enable
- SetsCF_AUTH_ENABLED
to true, checks if other auth secrets exist, and prompts the user for a password if they don'tb.
disable
- SetsCF_AUTH_ENABLED
to false, keeps other auth secrets in placec.
roll
- Allows the user to set a new password