-
Notifications
You must be signed in to change notification settings - Fork 142
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
refactor(shorebird_cli): introduce ArtifactManager as home for common artifact operations #1308
Conversation
# Conflicts: # packages/shorebird_cli/test/src/commands/patch/patch_aar_command_test.dart # packages/shorebird_cli/test/src/commands/patch/patch_android_command_test.dart # packages/shorebird_cli/test/src/commands/preview_command_test.dart # packages/shorebird_cli/test/src/mocks.dart
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1308 +/- ##
==========================================
- Coverage 99.04% 99.04% -0.01%
==========================================
Files 180 181 +1
Lines 4813 4800 -13
==========================================
- Hits 4767 4754 -13
Misses 46 46
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
PreviewCommand({ | ||
http.Client? httpClient, | ||
}) : _httpClient = httpClient ?? | ||
retryingHttpClient(LoggingClient(httpClient: http.Client())) { |
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.
might be nice to have a scoped httpClient for this type of thing
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.
Agreed, filed #1310
}) async { | ||
await Isolate.run(() async { | ||
final inputStream = InputFileStream(zipFile.path); | ||
final archive = ZipDecoder().decodeBuffer(inputStream); |
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.
probably also want to be able to mock the zip decoder to speed up test runs but doesn't have to be done in this PR
Description
Introduces the
ArtifactManager
to handle common artifact operations, such a downloading, diffing, and unzipping.Type of Change