Merged
Conversation
- Added support for an API key option in the CLI, allowing users to authenticate without a personal token. - Updated the `authStore` to handle API keys and modified the `getToken` method accordingly. - Removed the `companies` command and related code as it was no longer needed. - Cleaned up error handling in various commands to ensure consistent logging and user feedback. - Improved the handling of API URLs and base URLs in the CLI commands.
…neration - Integrated a background version check in the CLI to notify users of available updates. - Added a `--check-only` option to the `generateTypesAction` for validating if types are up to date without generating them. - Introduced a new utility function to check types in files, improving type management. - Updated dependencies in `package.json` and `yarn.lock` to include `@types/semver` and `semver` version 7.7.2.
…on updates - Bumped CLI version to 2.0.0 in package.json. - Added `--api-key` option for non-interactive authentication in README.md. - Enhanced documentation for using the CLI in CI/CD pipelines. - Updated success message in `generateTypesAction` for clarity. - Removed redundant success message in `generateTypesAction` to streamline output.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces Bucket CLI 2.0 with significant breaking changes and new features focused on CI/CD integration. The major changes include adding non-interactive authentication via API keys, implementing a type checking system for validation, and removing deprecated functionality to streamline the codebase.
- Added
--api-keyoption for CI/CD authentication and--check-onlyflag for type validation - Implemented automatic version checking at startup to notify users of available updates
- Removed deprecated commands and services including companies, users, feedback, and feature access management
Reviewed Changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/utils/version.ts | New utility for version checking and NPM registry integration |
| packages/cli/utils/options.ts | Added API key and check-only options, removed deprecated feature options |
| packages/cli/utils/gen.ts | Added type checking functionality for CI/CD validation |
| packages/cli/utils/errors.ts | Enhanced error handling with structured ResponseError class |
| packages/cli/utils/auth.ts | Enhanced authentication to support API keys and improved error handling |
| packages/cli/stores/auth.ts | Updated token management to support API key authentication |
| packages/cli/commands/features.ts | Integrated check-only functionality and removed deprecated feature access commands |
| packages/cli/index.ts | Added version checking and API key support to main CLI entry point |
| Multiple service files | Removed deprecated services (companies, users, feedback, stages) |
Comments suppressed due to low confidence (1)
packages/cli/utils/version.ts:7
- [nitpick] The function name 'current' is ambiguous in this context. Consider renaming it to 'getCurrentVersion' or 'readCurrentVersion' to be more descriptive.
export async function current() {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…handling and error messages - Simplified token retrieval in `loginAction` and `logoutAction` for better readability. - Added checks for existing tokens to prevent unnecessary login/logout attempts. - Improved error handling in `waitForAccessToken` with more descriptive messages. - Removed unused `loginUrl` utility function to streamline code. - Introduced `getOAuthServerUrls` to fetch OAuth server metadata dynamically.
roncohen
reviewed
Jul 25, 2025
roncohen
reviewed
Jul 25, 2025
…flow - Removed the `checkOnly` option from `generateTypesAction` to simplify the type generation process. - Improved error handling in `waitForAccessToken` with more descriptive messages and a consistent timeout mechanism. - Introduced a new `registerClient` function to encapsulate client registration logic with the OAuth server. - Added a `DEFAULT_AUTH_TIMEOUT` constant for configurable authentication timeout. - Cleaned up unused code related to type checking in files to enhance maintainability.
…exchange - Renamed variable for clarity from `jsonResponse` to `errorResponse` to better reflect its purpose. - Consolidated response parsing to avoid multiple calls to `response.json()`, enhancing performance and readability. - Improved error handling by ensuring a consistent structure for error messages returned during token exchange.
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.
--api-keyoption for non-interactive authentication,--check-onlyflag for types generation,