Skip to content

Commit

Permalink
refactor(artifact_proxy): upgrade analysis_options (#2713)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Dec 18, 2024
1 parent 0975a1a commit 1efa7e4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
4 changes: 3 additions & 1 deletion packages/artifact_proxy/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include: package:very_good_analysis/analysis_options.5.1.0.yaml
include: package:very_good_analysis/analysis_options.7.0.0.yaml
analyzer:
exclude: "*.g.dart"
3 changes: 0 additions & 3 deletions packages/artifact_proxy/bin/server.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore_for_file: avoid_print

import 'dart:io';

import 'package:artifact_proxy/artifact_proxy.dart';
Expand All @@ -24,7 +22,6 @@ Future<HttpServer> serve(Handler proxy, InternetAddress ip, int port) async {
const pipeline = Pipeline();
final handler = pipeline.addMiddleware(logRequests()).addHandler(proxy);
final server = await shelf_io.serve(handler, ip, port);
print('Serving at http://localhost:${server.port}');
server.autoCompress = true;
return server;
}
1 change: 1 addition & 0 deletions packages/artifact_proxy/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ targets:
- cast_nullable_to_non_nullable
- lines_longer_than_80_chars
- strict_raw_type
- document_ignores
json_serializable:
options:
field_rename: snake
Expand Down
3 changes: 2 additions & 1 deletion packages/artifact_proxy/lib/src/artifact_proxy.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// print is used for diagnostic logs.
// ignore_for_file: avoid_print

import 'package:artifact_proxy/artifact_proxy.dart';
Expand Down Expand Up @@ -60,7 +61,7 @@ Handler artifactProxyHandler({required ArtifactManifestClient client}) {
final ArtifactsManifest manifest;
try {
manifest = await client.getManifest(shorebirdEngineRevision);
} catch (error) {
} on Exception catch (error) {
return Response.notFound(
'Failed to fetch manifest for $shorebirdEngineRevision\n$error',
);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/artifact_proxy/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,10 @@ packages:
dependency: "direct dev"
description:
name: very_good_analysis
sha256: "1fb637c0022034b1f19ea2acb42a3603cbd8314a470646a59a2fb01f5f3a8629"
sha256: "62d2b86d183fb81b2edc22913d9f155d26eb5cf3855173adb1f59fac85035c63"
url: "https://pub.dev"
source: hosted
version: "6.0.0"
version: "7.0.0"
vm_service:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/artifact_proxy/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ dev_dependencies:
json_serializable: ^6.9.0
mocktail: ^1.0.4
test: ^1.25.12
very_good_analysis: ^6.0.0
very_good_analysis: ^7.0.0

0 comments on commit 1efa7e4

Please sign in to comment.