From 139658f549ae9544905b8eb9d48d31437093d46a Mon Sep 17 00:00:00 2001 From: Elijah Quartey Date: Mon, 29 Jan 2024 09:19:27 -0600 Subject: [PATCH] fix build errors --- packages/aws_common/lib/src/http/aws_clock_skew.dart | 4 ++-- packages/aws_common/lib/src/http/aws_date_time.dart | 2 -- packages/aws_common/lib/src/http/aws_http_client.dart | 2 +- packages/aws_common/pubspec.yaml | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/aws_common/lib/src/http/aws_clock_skew.dart b/packages/aws_common/lib/src/http/aws_clock_skew.dart index cea890db62..a50f54e0a7 100644 --- a/packages/aws_common/lib/src/http/aws_clock_skew.dart +++ b/packages/aws_common/lib/src/http/aws_clock_skew.dart @@ -4,7 +4,7 @@ import 'package:aws_common/aws_common.dart'; class AWSClockSkew { final _skewWindow = const Duration(minutes: 5); - /// Updates the clock skew of the given [request] based on the [serverTime]. + /// Updates the clock skew of the given [request] based on the [clockSkewOffsetInMs]. /// Returns the updated [request] with the corrected date header. AWSBaseHttpRequest updateClockSkew( AWSBaseHttpRequest request, @@ -27,7 +27,7 @@ class AWSClockSkew { return newDate.formatFull(); } - /// Calculates and returns the updated system clock offset based on the [clockTime] + /// Calculates and returns the updated system clock offset based on the [offsetInMs] /// received from the server and the [offsetInMs]. int getUpdatedSystemClockOffset( String serverHeader, diff --git a/packages/aws_common/lib/src/http/aws_date_time.dart b/packages/aws_common/lib/src/http/aws_date_time.dart index 6be059b8f0..e22b81eb0a 100644 --- a/packages/aws_common/lib/src/http/aws_date_time.dart +++ b/packages/aws_common/lib/src/http/aws_date_time.dart @@ -58,11 +58,9 @@ class AWSDateTime { /// Find the difference between two dates Duration difference(DateTime d) { - final years = dateTime.year - d.year; final days = dateTime.day - d.day; final hours = dateTime.hour - d.hour; final minutes = dateTime.minute - d.minute; - print('years: $years, days: $days, hours: $hours, minutes: $minutes'); return Duration(days: days, hours: hours, minutes: minutes); } diff --git a/packages/aws_common/lib/src/http/aws_http_client.dart b/packages/aws_common/lib/src/http/aws_http_client.dart index 5b08219911..36fc7e5ccd 100644 --- a/packages/aws_common/lib/src/http/aws_http_client.dart +++ b/packages/aws_common/lib/src/http/aws_http_client.dart @@ -179,7 +179,7 @@ abstract class AWSBaseHttpClient extends AWSCustomHttpClient { safePrint(e.message); return send(request).operation.value; } - throw e; + throw e as Exception; }, ), ); diff --git a/packages/aws_common/pubspec.yaml b/packages/aws_common/pubspec.yaml index 52ef6bd7e7..c5f7dc3208 100644 --- a/packages/aws_common/pubspec.yaml +++ b/packages/aws_common/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: built_value: ">=8.6.0 <8.9.0" collection: ^1.15.0 http2: ^2.0.0 - intl: ^0.18.1 # todo: update to 19.0 before merge -- requires project wide bump + intl: ">=0.18.0 <1.0.0" js: ^0.6.4 json_annotation: ">=4.8.1 <4.9.0" logging: ^1.0.0 @@ -22,10 +22,10 @@ dependencies: mime: ^1.0.0 os_detect: ^2.0.0 path: ">=1.8.0 <2.0.0" - stream_transform: ^2.0.0 - uuid: ">=3.0.6 <5.0.0" smithy: 0.6.2 smithy_aws: 0.6.1 + stream_transform: ^2.0.0 + uuid: ">=3.0.6 <5.0.0" dev_dependencies: amplify_lints: ">=3.0.0 <3.1.0"