Skip to content
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

Merged
merged 17 commits into from
Sep 22, 2023

Conversation

bryanoltman
Copy link
Contributor

Description

Introduces the ArtifactManager to handle common artifact operations, such a downloading, diffing, and unzipping.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@bryanoltman bryanoltman changed the title Bo/artifact diff generator refactor(shorebird_cli): introduce ArtifactManager as home for common artifact operations Sep 22, 2023
@bryanoltman bryanoltman reopened this Sep 22, 2023
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% ⚠️

Comparison is base (e6d6fbd) 99.04% compared to head (c22e0a0) 99.04%.

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              
Flag Coverage Δ
shorebird_cli 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...s/shorebird_cli/lib/src/shorebird_build_mixin.dart 100.00% <ø> (ø)
...ckages/shorebird_cli/lib/src/artifact_manager.dart 100.00% <100.00%> (ø)
..._cli/lib/src/commands/patch/patch_aar_command.dart 100.00% <100.00%> (ø)
.../lib/src/commands/patch/patch_android_command.dart 100.00% <100.00%> (ø)
...horebird_cli/lib/src/commands/preview_command.dart 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

PreviewCommand({
http.Client? httpClient,
}) : _httpClient = httpClient ??
retryingHttpClient(LoggingClient(httpClient: http.Client())) {
Copy link
Contributor

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

Copy link
Contributor Author

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);
Copy link
Contributor

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

@bryanoltman bryanoltman merged commit 5204311 into main Sep 22, 2023
8 checks passed
@bryanoltman bryanoltman deleted the bo/artifact-diff-generator branch September 22, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants