-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Create the command dvm doctor
#80
Merged
Merged
Conversation
This file contains 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
- Add `gen/cli_info.dart` and local `cli_info.dart` for CLI info management in `app_container.dart`. - Refactor `doctor_command_service.dart` to use `PackageVersionService` instead of `PackageService`, removing unused `SdkService`. - Remove `package_service.dart` and its content, shifting functionality to `PackageVersionService`. - Introduce `cli_info.dart` and `cli_info.g.dart` for local CLI information handling. - Implement `package_version_status.dart` for detailed package version status management. - Create `package_version_service.dart` and `package_version_service.g.dart`, incorporating the previously handled logic by `PackageService` for version checking.
- Introduce `GlobalConfigStatus` class to handle various global configuration states such as found, not found, and errors related to JSON formatting, parameter formatting, and unknown errors. - Implement `checkGlobalConfig` method in `GlobalConfigService` to check for the existence of the global configuration file and parse it, returning the appropriate `GlobalConfigStatus`.
- Add `ProjectConfigStatus` class for detailed handling of project configuration states including found, not found, and various error scenarios. - Implement `checkProjectConfig` method in `ProjectConfigService` to validate the presence and integrity of the project configuration file, returning an appropriate `ProjectConfigStatus`.
- Rename `checkVersion` to `checkPackageVersion` in `PackageVersionService` for clearer distinction of its functionality.
- Update hash in `doctor_command_service.g.dart` reflecting changes in dependencies. - Adjust dependencies to include `packageVersionServiceProvider`, `globalConfigServiceProvider`, and `projectConfigServiceProvider`, ensuring alignment with service modifications.
- Implement checks for package version, global configuration, and project configuration within `DoctorCommandService`. - Utilize `progress` from `ConsoleService` to indicate the beginning and completion of the checks.
- Create `CheckStatus` enum with values `success`, `warning`, and `error` to represent the outcome of various checks within the application.
- Extend `ConsoleService` to include a `checkResult` method, allowing for detailed reporting of check outcomes based on `CheckStatus`. - Utilize color-coded tags to visually distinguish between success, warning, and error statuses in console outputs. - Implement conditional detail printing for comprehensive feedback on check results.
- Add `toString` overrides to `GlobalConfig` and `ProjectConfig` classes for improved debuggability and logging, displaying the Dart SDK version.
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.
Overview
dvm doctor
Provides a comprehensive overview of the tool's version, configuration settings, and any potential issues with the setup.
Issues
Closes #7