From 93a2f8e0e88d2ff6b450d6fbcf73debc76972113 Mon Sep 17 00:00:00 2001 From: NikaHsn Date: Tue, 14 Nov 2023 14:42:37 -0800 Subject: [PATCH] feat(logging): cloudwatch logging plugin to implement logging plugin interface (#4107) * feat(logging): cloudwatch logging plugin to implement logging plugin interface --- .github/dependabot.yaml | 354 ++--- .../workflows/amplify_analytics_pinpoint.yaml | 4 - .../amplify_analytics_pinpoint_dart.yaml | 4 - .../amplify_analytics_pinpoint_example.yaml | 8 - .github/workflows/amplify_api.yaml | 20 - .github/workflows/amplify_api_dart.yaml | 16 - .github/workflows/amplify_api_example.yaml | 8 - .github/workflows/amplify_auth_cognito.yaml | 8 - .../workflows/amplify_auth_cognito_dart.yaml | 4 - .../amplify_auth_cognito_example.yaml | 8 - .../workflows/amplify_auth_cognito_test.yaml | 4 - .github/workflows/amplify_authenticator.yaml | 8 - .../amplify_authenticator_example.yaml | 8 - .github/workflows/amplify_core.yaml | 16 - .github/workflows/amplify_datastore.yaml | 16 - .../workflows/amplify_datastore_example.yaml | 8 - .../amplify_datastore_plugin_interface.yaml | 16 - .github/workflows/amplify_db_common.yaml | 12 - .github/workflows/amplify_db_common_dart.yaml | 12 - .../workflows/amplify_db_common_example.yaml | 12 - .github/workflows/amplify_flutter.yaml | 20 - .../workflows/amplify_flutter_example.yaml | 8 - .../workflows/amplify_push_notifications.yaml | 16 - .../amplify_push_notifications_example.yaml | 16 - .../amplify_push_notifications_pinpoint.yaml | 8 - ...y_push_notifications_pinpoint_example.yaml | 8 - .github/workflows/amplify_storage_s3.yaml | 4 - .../workflows/amplify_storage_s3_dart.yaml | 4 - .../workflows/amplify_storage_s3_example.yaml | 8 - .github/workflows/cognito_example.yaml | 4 - .github/workflows/storage_s3_example.yaml | 4 - .../amplify_flutter/lib/src/amplify_impl.dart | 4 - .../lib/src/amplify_logging_cloudwatch.dart | 61 - .../amplify_flutter/lib/src/hybrid_impl.dart | 2 + packages/amplify/amplify_flutter/pubspec.yaml | 2 - packages/amplify_core/lib/amplify_core.dart | 2 +- .../amplify_core/lib/src/amplify_class.dart | 10 +- .../lib/src/amplify_class_impl.dart | 5 +- .../lib/src/config/amplify_config.dart | 7 - .../lib/src/config/amplify_config.g.dart | 4 - .../src/config/amplify_plugin_registry.dart | 4 - .../logging/cloudwatch_logging_config.dart | 30 +- .../logging/cloudwatch_logging_config.g.dart | 2 +- .../src/config/logging/logging_config.dart | 33 - .../src/config/logging/logging_config.g.dart | 19 - .../lib/src/logger/amplify_logger.dart | 2 +- .../logger/amplify_logging_cloudwatch.dart | 59 - packages/amplify_core/lib/src/version.dart | 2 +- packages/amplify_core/pubspec.yaml | 1 - .../amplify_logging_cloudwatch_test.dart | 121 -- .../lib/src/logging/aws_logger.dart | 6 + .../lib/amplifyconfiguration_logging.dart | 4 - .../example/lib/homepage.dart | 14 +- .../example/lib/main.dart | 15 +- .../src/amplify_cloudwatch_logger_plugin.dart | 53 +- .../src/amplify_log_stream_name_provider.dart | 2 +- .../lib/src/cloudwatch_logger_plugin.dart | 213 ++- .../test/cloudwatch_logger_plugin_test.dart | 1397 ++++++++--------- .../aws_logging_cloudwatch/test/mocks.dart | 6 + 59 files changed, 1000 insertions(+), 1726 deletions(-) delete mode 100644 packages/amplify/amplify_flutter/lib/src/amplify_logging_cloudwatch.dart delete mode 100644 packages/amplify_core/lib/src/config/logging/logging_config.dart delete mode 100644 packages/amplify_core/lib/src/config/logging/logging_config.g.dart delete mode 100644 packages/amplify_core/lib/src/logger/amplify_logging_cloudwatch.dart delete mode 100644 packages/amplify_core/test/logger/amplify_logging_cloudwatch_test.dart diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 5005f3e58d..e663651086 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -173,20 +173,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -208,11 +206,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - package-ecosystem: "pub" directory: "packages/aft" schedule: @@ -275,12 +269,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -308,20 +297,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -344,20 +331,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -377,11 +362,7 @@ updates: # Ignore all repo packages - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: async: @@ -429,20 +410,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -472,11 +451,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: async: @@ -522,13 +497,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -537,6 +507,9 @@ updates: - dependency-name: "amplify_datastore_plugin_interface" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "amplify_analytics_pinpoint_dart" + - dependency-name: "amplify_db_common_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" - package-ecosystem: "pub" directory: "packages/amplify_datastore/example" @@ -553,13 +526,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -568,6 +536,9 @@ updates: - dependency-name: "amplify_datastore_plugin_interface" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "amplify_analytics_pinpoint_dart" + - dependency-name: "amplify_db_common_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" - package-ecosystem: "pub" directory: "packages/amplify_datastore_plugin_interface" @@ -582,11 +553,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - package-ecosystem: "pub" directory: "packages/amplify_lints" schedule: @@ -674,14 +641,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" # Group dependencies which have a constraint set in the global "pubspec.yaml" @@ -732,20 +698,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -778,20 +742,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -822,14 +784,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: built_value: @@ -873,13 +834,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -907,13 +863,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -921,6 +872,9 @@ updates: - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_analytics_pinpoint" - dependency-name: "amplify_analytics_pinpoint_dart" + - dependency-name: "amplify_db_common_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -945,13 +899,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -959,6 +908,9 @@ updates: - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_analytics_pinpoint" - dependency-name: "amplify_analytics_pinpoint_dart" + - dependency-name: "amplify_db_common_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -981,11 +933,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: async: @@ -1018,20 +966,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: async: @@ -1077,13 +1023,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -1091,6 +1032,9 @@ updates: - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_analytics_pinpoint" - dependency-name: "amplify_analytics_pinpoint_dart" + - dependency-name: "amplify_db_common_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -1125,13 +1069,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -1139,6 +1078,9 @@ updates: - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_analytics_pinpoint" - dependency-name: "amplify_analytics_pinpoint_dart" + - dependency-name: "amplify_db_common_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -1172,14 +1114,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: @@ -1240,14 +1181,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" - dependency-name: "example_common" - dependency-name: "amplify_api_dart" @@ -1280,14 +1220,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" - dependency-name: "example_common" - dependency-name: "amplify_api_dart" @@ -1319,14 +1258,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" # Group dependencies which have a constraint set in the global "pubspec.yaml" @@ -1365,20 +1303,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: async: @@ -1409,20 +1345,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_authenticator" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" @@ -1447,20 +1381,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_authenticator" - dependency-name: "amplify_api" - dependency-name: "amplify_api_dart" @@ -1486,20 +1418,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - package-ecosystem: "pub" directory: "packages/authenticator/amplify_authenticator_test/example" schedule: @@ -1517,20 +1447,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - package-ecosystem: "pub" directory: "packages/aws_common" schedule: @@ -1662,10 +1590,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: drift: @@ -1708,10 +1633,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: drift: @@ -1738,10 +1660,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: drift: @@ -1766,10 +1685,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: async: @@ -1807,10 +1723,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "example_common" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: @@ -1840,10 +1753,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "example_common" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: @@ -1908,9 +1818,9 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" + - dependency-name: "aws_signature_v4" - dependency-name: "aws_logging_cloudwatch" - dependency-name: "amplify_db_common_dart" - - dependency-name: "aws_signature_v4" - dependency-name: "smithy" - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" @@ -1918,9 +1828,6 @@ updates: device_info_plus: patterns: - "device_info_plus" - drift: - patterns: - - "drift" intl: patterns: - "intl" @@ -1952,21 +1859,21 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_authenticator" + - dependency-name: "amplify_logging_cloudwatch" + - dependency-name: "aws_logging_cloudwatch" - package-ecosystem: "pub" directory: "packages/logging_cloudwatch/amplify_logging_cloudwatch/example" schedule: @@ -1983,21 +1890,21 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_authenticator" + - dependency-name: "amplify_logging_cloudwatch" + - dependency-name: "aws_logging_cloudwatch" - package-ecosystem: "pub" directory: "packages/logging_cloudwatch/aws_logging_cloudwatch" schedule: @@ -2109,11 +2016,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -2171,11 +2074,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -2194,11 +2093,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -2218,21 +2113,19 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_push_notifications" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: @@ -2261,20 +2154,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_push_notifications_pinpoint" - dependency-name: "amplify_push_notifications" - package-ecosystem: "pub" @@ -2293,20 +2184,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_push_notifications_pinpoint" - dependency-name: "amplify_push_notifications" - package-ecosystem: "pub" @@ -3200,13 +3089,12 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_storage_s3_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - package-ecosystem: "pub" directory: "packages/storage/amplify_storage_s3/example" schedule: @@ -3223,20 +3111,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_authenticator" - dependency-name: "amplify_storage_s3" - dependency-name: "amplify_storage_s3_dart" @@ -3270,20 +3156,18 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_authenticator" - dependency-name: "amplify_storage_s3" - dependency-name: "amplify_storage_s3_dart" @@ -3314,9 +3198,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" + - dependency-name: "amplify_db_common_dart" - dependency-name: "smithy" - dependency-name: "smithy_aws" # Group dependencies which have a constraint set in the global "pubspec.yaml" @@ -3363,14 +3246,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" - dependency-name: "amplify_storage_s3_dart" - dependency-name: "example_common" @@ -3397,14 +3279,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" - dependency-name: "amplify_storage_s3_dart" - dependency-name: "example_common" @@ -3431,13 +3312,8 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - dependency-name: "amplify_flutter" - - dependency-name: "amplify_logging_cloudwatch" - dependency-name: "amplify_secure_storage" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" @@ -3445,6 +3321,9 @@ updates: - dependency-name: "amplify_auth_cognito" - dependency-name: "amplify_analytics_pinpoint" - dependency-name: "amplify_analytics_pinpoint_dart" + - dependency-name: "amplify_db_common_dart" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "amplify_db_common" - dependency-name: "amplify_auth_cognito_dart" - dependency-name: "smithy_codegen" @@ -3471,14 +3350,13 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" + - dependency-name: "amplify_db_common_dart" - dependency-name: "amplify_secure_storage_dart" - dependency-name: "worker_bee" - dependency-name: "worker_bee_builder" + - dependency-name: "smithy" + - dependency-name: "smithy_aws" - dependency-name: "smithy_codegen" # Group dependencies which have a constraint set in the global "pubspec.yaml" groups: @@ -3510,11 +3388,7 @@ updates: - dependency-name: "amplify_core" - dependency-name: "aws_common" - dependency-name: "amplify_lints" - - dependency-name: "aws_logging_cloudwatch" - - dependency-name: "amplify_db_common_dart" - dependency-name: "aws_signature_v4" - - dependency-name: "smithy" - - dependency-name: "smithy_aws" - package-ecosystem: "pub" directory: "packages/test/pub_server" schedule: diff --git a/.github/workflows/amplify_analytics_pinpoint.yaml b/.github/workflows/amplify_analytics_pinpoint.yaml index d2c9c45bf4..f32941147d 100644 --- a/.github/workflows/amplify_analytics_pinpoint.yaml +++ b/.github/workflows/amplify_analytics_pinpoint.yaml @@ -26,8 +26,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -62,8 +60,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_analytics_pinpoint_dart.yaml b/.github/workflows/amplify_analytics_pinpoint_dart.yaml index a7c9d3df98..ed15a15a2e 100644 --- a/.github/workflows/amplify_analytics_pinpoint_dart.yaml +++ b/.github/workflows/amplify_analytics_pinpoint_dart.yaml @@ -26,8 +26,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' @@ -60,8 +58,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' diff --git a/.github/workflows/amplify_analytics_pinpoint_example.yaml b/.github/workflows/amplify_analytics_pinpoint_example.yaml index ce35852b2e..a50caa25e4 100644 --- a/.github/workflows/amplify_analytics_pinpoint_example.yaml +++ b/.github/workflows/amplify_analytics_pinpoint_example.yaml @@ -43,10 +43,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -100,10 +96,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_api.yaml b/.github/workflows/amplify_api.yaml index 1c5c37a25a..548a3c6625 100644 --- a/.github/workflows/amplify_api.yaml +++ b/.github/workflows/amplify_api.yaml @@ -24,20 +24,10 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' @@ -62,20 +52,10 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' diff --git a/.github/workflows/amplify_api_dart.yaml b/.github/workflows/amplify_api_dart.yaml index 88a3a85db4..b8bde5ebc3 100644 --- a/.github/workflows/amplify_api_dart.yaml +++ b/.github/workflows/amplify_api_dart.yaml @@ -24,14 +24,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' pull_request: paths: - '.github/composite_actions/setup_firefox/action.yaml' @@ -52,14 +44,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' schedule: - cron: "0 13 * * *" # Everyday at 06:00 PST defaults: diff --git a/.github/workflows/amplify_api_example.yaml b/.github/workflows/amplify_api_example.yaml index 1ca54502f8..defebf81e4 100644 --- a/.github/workflows/amplify_api_example.yaml +++ b/.github/workflows/amplify_api_example.yaml @@ -45,10 +45,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -104,10 +100,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_auth_cognito.yaml b/.github/workflows/amplify_auth_cognito.yaml index 711e0871de..f8e5aa2f8b 100644 --- a/.github/workflows/amplify_auth_cognito.yaml +++ b/.github/workflows/amplify_auth_cognito.yaml @@ -32,10 +32,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -78,10 +74,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_auth_cognito_dart.yaml b/.github/workflows/amplify_auth_cognito_dart.yaml index cdac0ac622..b7ef591a1e 100644 --- a/.github/workflows/amplify_auth_cognito_dart.yaml +++ b/.github/workflows/amplify_auth_cognito_dart.yaml @@ -25,8 +25,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' @@ -60,8 +58,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' diff --git a/.github/workflows/amplify_auth_cognito_example.yaml b/.github/workflows/amplify_auth_cognito_example.yaml index b83cccedb7..9dac5006d4 100644 --- a/.github/workflows/amplify_auth_cognito_example.yaml +++ b/.github/workflows/amplify_auth_cognito_example.yaml @@ -47,10 +47,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -108,10 +104,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_auth_cognito_test.yaml b/.github/workflows/amplify_auth_cognito_test.yaml index a8b1a650cb..4ca4a3622e 100644 --- a/.github/workflows/amplify_auth_cognito_test.yaml +++ b/.github/workflows/amplify_auth_cognito_test.yaml @@ -30,8 +30,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' @@ -70,8 +68,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' diff --git a/.github/workflows/amplify_authenticator.yaml b/.github/workflows/amplify_authenticator.yaml index 98a711dcf6..015ff22b16 100644 --- a/.github/workflows/amplify_authenticator.yaml +++ b/.github/workflows/amplify_authenticator.yaml @@ -34,10 +34,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -82,10 +78,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_authenticator_example.yaml b/.github/workflows/amplify_authenticator_example.yaml index 58f59b4d35..08821fff5f 100644 --- a/.github/workflows/amplify_authenticator_example.yaml +++ b/.github/workflows/amplify_authenticator_example.yaml @@ -45,10 +45,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -104,10 +100,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_core.yaml b/.github/workflows/amplify_core.yaml index 60bb40b7ff..e6155bb673 100644 --- a/.github/workflows/amplify_core.yaml +++ b/.github/workflows/amplify_core.yaml @@ -22,14 +22,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' pull_request: paths: - '.github/composite_actions/setup_firefox/action.yaml' @@ -48,14 +40,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' schedule: - cron: "0 13 * * *" # Everyday at 06:00 PST defaults: diff --git a/.github/workflows/amplify_datastore.yaml b/.github/workflows/amplify_datastore.yaml index 03facfd76b..43302c7ef3 100644 --- a/.github/workflows/amplify_datastore.yaml +++ b/.github/workflows/amplify_datastore.yaml @@ -22,14 +22,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' pull_request: paths: - '.github/workflows/amplify_datastore.yaml' @@ -48,14 +40,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' schedule: - cron: "0 13 * * *" # Everyday at 06:00 PST defaults: diff --git a/.github/workflows/amplify_datastore_example.yaml b/.github/workflows/amplify_datastore_example.yaml index a7f3e37282..cd5a20deb9 100644 --- a/.github/workflows/amplify_datastore_example.yaml +++ b/.github/workflows/amplify_datastore_example.yaml @@ -38,10 +38,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -90,10 +86,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_datastore_plugin_interface.yaml b/.github/workflows/amplify_datastore_plugin_interface.yaml index 4399997ded..5e003a16dc 100644 --- a/.github/workflows/amplify_datastore_plugin_interface.yaml +++ b/.github/workflows/amplify_datastore_plugin_interface.yaml @@ -20,14 +20,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' pull_request: paths: - '.github/workflows/amplify_datastore_plugin_interface.yaml' @@ -44,14 +36,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' schedule: - cron: "0 13 * * *" # Everyday at 06:00 PST defaults: diff --git a/.github/workflows/amplify_db_common.yaml b/.github/workflows/amplify_db_common.yaml index b57676baa1..7c28645143 100644 --- a/.github/workflows/amplify_db_common.yaml +++ b/.github/workflows/amplify_db_common.yaml @@ -22,12 +22,6 @@ on: - 'packages/common/amplify_db_common/test/**/*' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' pull_request: paths: - '.github/workflows/amplify_db_common.yaml' @@ -46,12 +40,6 @@ on: - 'packages/common/amplify_db_common/test/**/*' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' schedule: - cron: "0 13 * * *" # Everyday at 06:00 PST defaults: diff --git a/.github/workflows/amplify_db_common_dart.yaml b/.github/workflows/amplify_db_common_dart.yaml index e054bada40..0a1fb69557 100644 --- a/.github/workflows/amplify_db_common_dart.yaml +++ b/.github/workflows/amplify_db_common_dart.yaml @@ -24,12 +24,6 @@ on: - 'packages/common/amplify_db_common_dart/**/*.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*' - 'packages/common/amplify_db_common_dart/test/**/*' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' pull_request: paths: - '.github/composite_actions/setup_firefox/action.yaml' @@ -50,12 +44,6 @@ on: - 'packages/common/amplify_db_common_dart/**/*.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*' - 'packages/common/amplify_db_common_dart/test/**/*' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' schedule: - cron: "0 13 * * *" # Everyday at 06:00 PST defaults: diff --git a/.github/workflows/amplify_db_common_example.yaml b/.github/workflows/amplify_db_common_example.yaml index a03c095002..ba8c8b4c37 100644 --- a/.github/workflows/amplify_db_common_example.yaml +++ b/.github/workflows/amplify_db_common_example.yaml @@ -29,12 +29,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' pull_request: paths: - '.github/workflows/amplify_db_common_example.yaml' @@ -60,12 +54,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' schedule: - cron: "0 13 * * *" # Everyday at 06:00 PST defaults: diff --git a/.github/workflows/amplify_flutter.yaml b/.github/workflows/amplify_flutter.yaml index 3141406530..ac3aeb3e8c 100644 --- a/.github/workflows/amplify_flutter.yaml +++ b/.github/workflows/amplify_flutter.yaml @@ -20,20 +20,10 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' @@ -54,20 +44,10 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' diff --git a/.github/workflows/amplify_flutter_example.yaml b/.github/workflows/amplify_flutter_example.yaml index 2b8ad34219..0bc3ae3f17 100644 --- a/.github/workflows/amplify_flutter_example.yaml +++ b/.github/workflows/amplify_flutter_example.yaml @@ -42,10 +42,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -102,10 +98,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/amplify_push_notifications.yaml b/.github/workflows/amplify_push_notifications.yaml index db29a6a34c..a58278b1a3 100644 --- a/.github/workflows/amplify_push_notifications.yaml +++ b/.github/workflows/amplify_push_notifications.yaml @@ -19,10 +19,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/**/*.yaml' - 'packages/notifications/push/amplify_push_notifications/lib/**/*' @@ -31,10 +27,6 @@ on: - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' @@ -54,10 +46,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/**/*.yaml' - 'packages/notifications/push/amplify_push_notifications/lib/**/*' @@ -66,10 +54,6 @@ on: - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' diff --git a/.github/workflows/amplify_push_notifications_example.yaml b/.github/workflows/amplify_push_notifications_example.yaml index 730d5f4750..42a3f90b11 100644 --- a/.github/workflows/amplify_push_notifications_example.yaml +++ b/.github/workflows/amplify_push_notifications_example.yaml @@ -16,10 +16,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/example/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/example/**/*.yaml' - 'packages/notifications/push/amplify_push_notifications/example/lib/**/*' @@ -30,10 +26,6 @@ on: - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' @@ -50,10 +42,6 @@ on: - 'packages/aws_common/pubspec.yaml' - 'packages/aws_signature_v4/lib/**/*.dart' - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/example/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/example/**/*.yaml' - 'packages/notifications/push/amplify_push_notifications/example/lib/**/*' @@ -64,10 +52,6 @@ on: - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - 'packages/worker_bee/worker_bee/lib/**/*.dart' - 'packages/worker_bee/worker_bee/pubspec.yaml' - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' diff --git a/.github/workflows/amplify_push_notifications_pinpoint.yaml b/.github/workflows/amplify_push_notifications_pinpoint.yaml index c032b9718f..ab255edf6b 100644 --- a/.github/workflows/amplify_push_notifications_pinpoint.yaml +++ b/.github/workflows/amplify_push_notifications_pinpoint.yaml @@ -30,10 +30,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/lib/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications_pinpoint/**/*.dart' @@ -80,10 +76,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/lib/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications_pinpoint/**/*.dart' diff --git a/.github/workflows/amplify_push_notifications_pinpoint_example.yaml b/.github/workflows/amplify_push_notifications_pinpoint_example.yaml index 9a62fde252..f212af2c7a 100644 --- a/.github/workflows/amplify_push_notifications_pinpoint_example.yaml +++ b/.github/workflows/amplify_push_notifications_pinpoint_example.yaml @@ -30,10 +30,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/lib/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications_pinpoint/example/**/*.dart' @@ -82,10 +78,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications/lib/**/*.dart' - 'packages/notifications/push/amplify_push_notifications/pubspec.yaml' - 'packages/notifications/push/amplify_push_notifications_pinpoint/example/**/*.dart' diff --git a/.github/workflows/amplify_storage_s3.yaml b/.github/workflows/amplify_storage_s3.yaml index a13869af41..dc135a2544 100644 --- a/.github/workflows/amplify_storage_s3.yaml +++ b/.github/workflows/amplify_storage_s3.yaml @@ -20,8 +20,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' - 'packages/smithy/smithy/pubspec.yaml' - 'packages/smithy/smithy_aws/lib/**/*.dart' @@ -48,8 +46,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' - 'packages/smithy/smithy/pubspec.yaml' - 'packages/smithy/smithy_aws/lib/**/*.dart' diff --git a/.github/workflows/amplify_storage_s3_dart.yaml b/.github/workflows/amplify_storage_s3_dart.yaml index 4050a51663..1789a249bb 100644 --- a/.github/workflows/amplify_storage_s3_dart.yaml +++ b/.github/workflows/amplify_storage_s3_dart.yaml @@ -19,8 +19,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' - 'packages/smithy/smithy/pubspec.yaml' - 'packages/smithy/smithy_aws/lib/**/*.dart' @@ -44,8 +42,6 @@ on: - 'packages/aws_signature_v4/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' - 'packages/smithy/smithy/pubspec.yaml' - 'packages/smithy/smithy_aws/lib/**/*.dart' diff --git a/.github/workflows/amplify_storage_s3_example.yaml b/.github/workflows/amplify_storage_s3_example.yaml index cc688f7e60..ac794d86b3 100644 --- a/.github/workflows/amplify_storage_s3_example.yaml +++ b/.github/workflows/amplify_storage_s3_example.yaml @@ -37,10 +37,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' @@ -96,10 +92,6 @@ on: - 'packages/common/amplify_db_common/pubspec.yaml' - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/amplify_logging_cloudwatch/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' diff --git a/.github/workflows/cognito_example.yaml b/.github/workflows/cognito_example.yaml index 176087592b..701a6adbe0 100644 --- a/.github/workflows/cognito_example.yaml +++ b/.github/workflows/cognito_example.yaml @@ -30,8 +30,6 @@ on: - 'packages/common/amplify_db_common_dart/pubspec.yaml' - 'packages/example_common/lib/**/*.dart' - 'packages/example_common/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' @@ -70,8 +68,6 @@ on: - 'packages/common/amplify_db_common_dart/pubspec.yaml' - 'packages/example_common/lib/**/*.dart' - 'packages/example_common/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' diff --git a/.github/workflows/storage_s3_example.yaml b/.github/workflows/storage_s3_example.yaml index 936d8f57ed..8961e6af11 100644 --- a/.github/workflows/storage_s3_example.yaml +++ b/.github/workflows/storage_s3_example.yaml @@ -24,8 +24,6 @@ on: - 'packages/common/amplify_db_common_dart/pubspec.yaml' - 'packages/example_common/lib/**/*.dart' - 'packages/example_common/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' @@ -64,8 +62,6 @@ on: - 'packages/common/amplify_db_common_dart/pubspec.yaml' - 'packages/example_common/lib/**/*.dart' - 'packages/example_common/pubspec.yaml' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/lib/**/*.dart' - - 'packages/logging_cloudwatch/aws_logging_cloudwatch/pubspec.yaml' - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - 'packages/smithy/smithy/lib/**/*.dart' diff --git a/packages/amplify/amplify_flutter/lib/src/amplify_impl.dart b/packages/amplify/amplify_flutter/lib/src/amplify_impl.dart index 0934b96b9a..10204dba04 100644 --- a/packages/amplify/amplify_flutter/lib/src/amplify_impl.dart +++ b/packages/amplify/amplify_flutter/lib/src/amplify_impl.dart @@ -7,7 +7,6 @@ import 'dart:io'; import 'package:amplify_core/amplify_core.dart'; import 'package:amplify_core/src/amplify_class_impl.dart' as core; -import 'package:amplify_flutter/src/amplify_logging_cloudwatch.dart'; import 'package:amplify_flutter/src/hybrid_impl.dart'; import 'package:meta/meta.dart'; @@ -25,7 +24,4 @@ class AmplifyClassImpl extends core.AmplifyClassImpl { /// {@macro amplify_flutter.amplify_class} @protected AmplifyClassImpl.protected(); - - @override - AmplifyFlutterLogging get logging => AmplifyFlutterLogging(); } diff --git a/packages/amplify/amplify_flutter/lib/src/amplify_logging_cloudwatch.dart b/packages/amplify/amplify_flutter/lib/src/amplify_logging_cloudwatch.dart deleted file mode 100644 index 9a4ac48604..0000000000 --- a/packages/amplify/amplify_flutter/lib/src/amplify_logging_cloudwatch.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// ignore_for_file: invalid_use_of_internal_member, implementation_imports - -@internal -library; - -import 'package:amplify_core/amplify_core.dart'; -import 'package:amplify_core/src/logger/amplify_logging_cloudwatch.dart'; -import 'package:amplify_logging_cloudwatch/amplify_logging_cloudwatch.dart'; -import 'package:meta/meta.dart'; - -/// {@macro amplify_core.logger.amplify_logging_cloudwatch} -class AmplifyFlutterLogging extends AmplifyLogging { - static AmplifyCloudWatchLoggerPlugin? _plugin; - static final _logger = AWSLogger(); - - @override - void configure( - AmplifyConfig amplifyConfig, - AmplifyAuthProviderRepository authProviderRepository, - ) { - if (_plugin != null) { - return; - } - - final pluginConfig = amplifyConfig.logging?.awsPlugin; - if (pluginConfig == null) { - return; - } - - final credentialsProvider = authProviderRepository - .getAuthProvider(APIAuthorizationType.iam.authProviderToken); - if (credentialsProvider == null) { - throw ConfigurationError( - 'No credential provider found for CloudWatch Logging.', - recoverySuggestion: - "If you haven't already, please add amplify_auth_cognito plugin to your App.", - ); - } - - _plugin = AmplifyCloudWatchLoggerPlugin( - credentialsProvider: credentialsProvider, - pluginConfig: pluginConfig, - ); - _logger - ..registerPlugin(_plugin!) - ..logLevel = LogLevel.verbose; - } - - @override - @visibleForTesting - Future reset() async { - if (_plugin != null) { - await _plugin!.disable(); - _logger.unregisterPlugin(_plugin!); - _plugin = null; - } - } -} diff --git a/packages/amplify/amplify_flutter/lib/src/hybrid_impl.dart b/packages/amplify/amplify_flutter/lib/src/hybrid_impl.dart index 29ce91dfef..0bc44a25f1 100644 --- a/packages/amplify/amplify_flutter/lib/src/hybrid_impl.dart +++ b/packages/amplify/amplify_flutter/lib/src/hybrid_impl.dart @@ -55,6 +55,8 @@ class AmplifyHybridImpl extends AmplifyClassImpl { ); } else if (plugin is APIPluginInterface) { await API.addPlugin(plugin, authProviderRepo: authProviderRepo); + } else if (plugin is LoggingPluginInterface) { + await Logging.addPlugin(plugin, authProviderRepo: authProviderRepo); } else if (plugin is PushNotificationsPluginInterface) { await Notifications.Push.addPlugin( plugin, diff --git a/packages/amplify/amplify_flutter/pubspec.yaml b/packages/amplify/amplify_flutter/pubspec.yaml index 79eabf3573..3df6efb7d7 100644 --- a/packages/amplify/amplify_flutter/pubspec.yaml +++ b/packages/amplify/amplify_flutter/pubspec.yaml @@ -20,10 +20,8 @@ platforms: dependencies: amplify_core: ">=1.4.1 <1.5.0" - amplify_logging_cloudwatch: ^0.1.0 amplify_secure_storage: ">=0.4.0+6 <0.5.0" aws_common: ">=0.6.0 <0.7.0" - aws_logging_cloudwatch: ^0.1.0 collection: ^1.15.0 flutter: sdk: flutter diff --git a/packages/amplify_core/lib/amplify_core.dart b/packages/amplify_core/lib/amplify_core.dart index fea4451620..d58229afb3 100644 --- a/packages/amplify_core/lib/amplify_core.dart +++ b/packages/amplify_core/lib/amplify_core.dart @@ -24,7 +24,7 @@ export 'src/config/analytics/analytics_config.dart'; export 'src/config/api/api_config.dart'; export 'src/config/auth/auth_config.dart'; export 'src/config/config_map.dart'; -export 'src/config/logging/logging_config.dart'; +export 'src/config/logging/cloudwatch_logging_config.dart'; export 'src/config/notifications/notifications_config.dart'; export 'src/config/storage/storage_config.dart'; diff --git a/packages/amplify_core/lib/src/amplify_class.dart b/packages/amplify_core/lib/src/amplify_class.dart index 182e646051..0bcc96aeb1 100644 --- a/packages/amplify_core/lib/src/amplify_class.dart +++ b/packages/amplify_core/lib/src/amplify_class.dart @@ -6,7 +6,6 @@ import 'dart:convert'; import 'package:amplify_core/amplify_core.dart'; import 'package:amplify_core/src/amplify_class_impl.dart'; -import 'package:amplify_core/src/logger/amplify_logging_cloudwatch.dart'; import 'package:amplify_core/src/version.dart'; import 'package:graphs/graphs.dart'; import 'package:meta/meta.dart'; @@ -53,9 +52,8 @@ abstract class AmplifyClass { /// The Notifications category. final NotificationsCategory Notifications = NotificationsCategory(); - /// The Amplify Logging utility. - @protected - AmplifyLogging get logging => AmplifyLogging(); + /// The Logging category. + final LoggingCategory Logging = LoggingCategory(); /// Shared dependencies for use across categories. @protected @@ -131,7 +129,6 @@ abstract class AmplifyClass { ); } await _configurePlugins(amplifyConfig); - logging.configure(amplifyConfig, authProviderRepo); _configCompleter.complete(amplifyConfig); } on ConfigurationError catch (e, st) { // Complete with the configuration error and reset the completer so @@ -167,6 +164,7 @@ abstract class AmplifyClass { Category.dataStore: DataStore, Category.pushNotifications: Notifications.Push, Category.storage: Storage, + Category.logging: Logging, }; final sortedCategories = topologicalSort( categories.keys, @@ -203,7 +201,7 @@ abstract class AmplifyClass { DataStore.reset(), Notifications.Push.reset(), Storage.reset(), - logging.reset(), + Logging.reset(), ]); dependencies.close(); } diff --git a/packages/amplify_core/lib/src/amplify_class_impl.dart b/packages/amplify_core/lib/src/amplify_class_impl.dart index 4972db6880..eb6e1c6c81 100644 --- a/packages/amplify_core/lib/src/amplify_class_impl.dart +++ b/packages/amplify_core/lib/src/amplify_class_impl.dart @@ -45,7 +45,10 @@ class AmplifyClassImpl extends AmplifyClass { case Category.hub: throw UnimplementedError(); case Category.logging: - throw UnimplementedError(); + return Logging.addPlugin( + plugin.cast(), + authProviderRepo: authProviderRepo, + ); case Category.pushNotifications: return Notifications.Push.addPlugin( plugin.cast(), diff --git a/packages/amplify_core/lib/src/config/amplify_config.dart b/packages/amplify_core/lib/src/config/amplify_config.dart index eca3bdb007..29ddb0dea1 100644 --- a/packages/amplify_core/lib/src/config/amplify_config.dart +++ b/packages/amplify_core/lib/src/config/amplify_config.dart @@ -18,7 +18,6 @@ class AmplifyConfig with AWSEquatable, AWSSerializable { this.api, this.analytics, this.auth, - this.logging, this.notifications, this.storage, }); @@ -40,9 +39,6 @@ class AmplifyConfig with AWSEquatable, AWSSerializable { /// The Auth category configuration, if available. final AuthConfig? auth; - /// The Logging configuration, if available. - final LoggingConfig? logging; - /// The Notifications category configuration, if available. final NotificationsConfig? notifications; @@ -56,7 +52,6 @@ class AmplifyConfig with AWSEquatable, AWSSerializable { api, analytics, auth, - logging, notifications, storage, ]; @@ -65,7 +60,6 @@ class AmplifyConfig with AWSEquatable, AWSSerializable { ApiConfig? api, AnalyticsConfig? analytics, AuthConfig? auth, - LoggingConfig? logging, NotificationsConfig? notifications, StorageConfig? storage, }) { @@ -75,7 +69,6 @@ class AmplifyConfig with AWSEquatable, AWSSerializable { api: api ?? this.api, analytics: analytics ?? this.analytics, auth: auth ?? this.auth, - logging: logging ?? this.logging, notifications: notifications ?? this.notifications, storage: storage ?? this.storage, ); diff --git a/packages/amplify_core/lib/src/config/amplify_config.g.dart b/packages/amplify_core/lib/src/config/amplify_config.g.dart index 27d692250f..c94be213cc 100644 --- a/packages/amplify_core/lib/src/config/amplify_config.g.dart +++ b/packages/amplify_core/lib/src/config/amplify_config.g.dart @@ -21,9 +21,6 @@ AmplifyConfig _$AmplifyConfigFromJson(Map json) => auth: json['auth'] == null ? null : AuthConfig.fromJson(json['auth'] as Map), - logging: json['logging'] == null - ? null - : LoggingConfig.fromJson(json['logging'] as Map), notifications: json['notifications'] == null ? null : NotificationsConfig.fromJson( @@ -48,7 +45,6 @@ Map _$AmplifyConfigToJson(AmplifyConfig instance) { writeNotNull('api', instance.api?.toJson()); writeNotNull('analytics', instance.analytics?.toJson()); writeNotNull('auth', instance.auth?.toJson()); - writeNotNull('logging', instance.logging?.toJson()); writeNotNull('notifications', instance.notifications?.toJson()); writeNotNull('storage', instance.storage?.toJson()); return val; diff --git a/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart b/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart index 84553afd77..10e8c6127e 100644 --- a/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart +++ b/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart @@ -5,7 +5,6 @@ import 'package:amplify_core/src/config/amplify_plugin_config.dart'; import 'package:amplify_core/src/config/analytics/pinpoint_config.dart'; import 'package:amplify_core/src/config/api/aws_api_config.dart'; import 'package:amplify_core/src/config/auth/cognito_config.dart'; -import 'package:amplify_core/src/config/logging/cloudwatch_logging_config.dart'; import 'package:amplify_core/src/config/notifications/notifications_pinpoint_config.dart'; import 'package:amplify_core/src/config/storage/s3_config.dart'; @@ -26,9 +25,6 @@ const _defaultPlugins = [ // Storage S3PluginConfigFactory(), - - // Logging - CloudWatchPluginConfigFactory(), ]; /// {@template amplify_core.amplify_plugin_config_factory} diff --git a/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.dart b/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.dart index 581da428de..f52782a63b 100644 --- a/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.dart +++ b/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.dart @@ -2,35 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 import 'package:amplify_core/amplify_core.dart'; -import 'package:meta/meta.dart'; part 'cloudwatch_logging_config.g.dart'; -/// {@template amplify_core.cloudwatch_plugin_config_factory} -/// Configuration factory for [CloudWatchPluginConfig]. -/// {@endtemplate} -@internal -class CloudWatchPluginConfigFactory - extends AmplifyPluginConfigFactory { - /// {@macro amplify_core.cloudwatch_plugin_config_factory} - const CloudWatchPluginConfigFactory(); - - @override - CloudWatchPluginConfig build(Map json) { - return CloudWatchPluginConfig.fromJson(json); - } - - @override - String get name => CloudWatchPluginConfig.pluginKey; -} - /// {@template amplify_core.cloudwatch_plugin_config} /// The AWS CloudWatch plugin configuration. /// {@endtemplate} @zAmplifySerializable class CloudWatchPluginConfig - with AWSEquatable, AWSSerializable - implements AmplifyPluginConfig { + with + AWSEquatable, + AWSSerializable> { /// {@macro amplify_core.cloudwatch_plugin_config} const CloudWatchPluginConfig({ this.enable = true, @@ -45,9 +27,6 @@ class CloudWatchPluginConfig factory CloudWatchPluginConfig.fromJson(Map json) => _$CloudWatchPluginConfigFromJson(json); - /// The plugin's configuration key. - static const pluginKey = 'cloudWatchLoggerPluginConfiguration'; - final bool enable; final String logGroupName; final String region; @@ -56,9 +35,6 @@ class CloudWatchPluginConfig final DefaultRemoteConfiguration? defaultRemoteConfiguration; final LoggingConstraints loggingConstraints; - @override - String get name => pluginKey; - @override List get props => [ enable, diff --git a/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.g.dart b/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.g.dart index b7aa0da96a..87b6ccc9f7 100644 --- a/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.g.dart +++ b/packages/amplify_core/lib/src/config/logging/cloudwatch_logging_config.g.dart @@ -90,12 +90,12 @@ Map _$LoggingConstraintsToJson(LoggingConstraints instance) => }; const _$LogLevelEnumMap = { + LogLevel.none: 'NONE', LogLevel.verbose: 'VERBOSE', LogLevel.debug: 'DEBUG', LogLevel.info: 'INFO', LogLevel.warn: 'WARN', LogLevel.error: 'ERROR', - LogLevel.none: 'NONE', }; UserLogLevel _$UserLogLevelFromJson(Map json) => UserLogLevel( diff --git a/packages/amplify_core/lib/src/config/logging/logging_config.dart b/packages/amplify_core/lib/src/config/logging/logging_config.dart deleted file mode 100644 index eb5e296135..0000000000 --- a/packages/amplify_core/lib/src/config/logging/logging_config.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -import 'package:amplify_core/amplify_core.dart'; - -export 'cloudwatch_logging_config.dart' hide CloudWatchPluginConfigFactory; - -part 'logging_config.g.dart'; - -/// {@template amplify_core.logging_config} -/// The Logging configuration. -/// {@endtemplate} -@zAmplifySerializable -class LoggingConfig extends AmplifyPluginConfigMap { - /// {@macro amplify_core.logging_config} - const LoggingConfig({ - required Map plugins, - }) : super(plugins); - - factory LoggingConfig.fromJson(Map json) => - _$LoggingConfigFromJson(json); - - /// The AWS CloudWatch plugin configuration, if available. - @override - CloudWatchPluginConfig? get awsPlugin => - plugins[CloudWatchPluginConfig.pluginKey] as CloudWatchPluginConfig?; - - @override - LoggingConfig copy() => LoggingConfig(plugins: Map.of(plugins)); - - @override - Map toJson() => _$LoggingConfigToJson(this); -} diff --git a/packages/amplify_core/lib/src/config/logging/logging_config.g.dart b/packages/amplify_core/lib/src/config/logging/logging_config.g.dart deleted file mode 100644 index 2c88483fa8..0000000000 --- a/packages/amplify_core/lib/src/config/logging/logging_config.g.dart +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -// ignore_for_file: deprecated_member_use_from_same_package - -part of 'logging_config.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -LoggingConfig _$LoggingConfigFromJson(Map json) => - LoggingConfig( - plugins: AmplifyPluginRegistry.pluginConfigsFromJson(json['plugins']), - ); - -Map _$LoggingConfigToJson(LoggingConfig instance) => - { - 'plugins': instance.plugins.map((k, e) => MapEntry(k, e.toJson())), - }; diff --git a/packages/amplify_core/lib/src/logger/amplify_logger.dart b/packages/amplify_core/lib/src/logger/amplify_logger.dart index 6c1b715001..e0e30f3ed5 100644 --- a/packages/amplify_core/lib/src/logger/amplify_logger.dart +++ b/packages/amplify_core/lib/src/logger/amplify_logger.dart @@ -5,7 +5,7 @@ import 'package:amplify_core/amplify_core.dart'; import 'package:meta/meta.dart'; /// {@macro aws_common.logging.aws_logger} -class AmplifyLogger extends AWSLogger { +class AmplifyLogger extends AWSLogger implements Logger { /// Creates a top-level [AmplifyLogger]. /// /// {@macro aws_common.logging.aws_logger} diff --git a/packages/amplify_core/lib/src/logger/amplify_logging_cloudwatch.dart b/packages/amplify_core/lib/src/logger/amplify_logging_cloudwatch.dart deleted file mode 100644 index fddac22d2c..0000000000 --- a/packages/amplify_core/lib/src/logger/amplify_logging_cloudwatch.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -@internal -library; - -import 'package:amplify_core/amplify_core.dart'; -import 'package:aws_logging_cloudwatch/aws_logging_cloudwatch.dart'; -import 'package:meta/meta.dart'; - -/// {@template amplify_core.logger.amplify_logging_cloudwatch} -/// It configures the [CloudWatchLoggerPlugin] from [AmplifyConfig] to sends -/// [AWSLogger]'s logs to the CloudWatch. -/// {@endtemplate} -class AmplifyLogging { - static CloudWatchLoggerPlugin? _plugin; - static final _logger = AWSLogger(); - - void configure( - AmplifyConfig amplifyConfig, - AmplifyAuthProviderRepository authProviderRepository, - ) { - if (_plugin != null) { - return; - } - - final pluginConfig = amplifyConfig.logging?.awsPlugin; - if (pluginConfig == null) { - return; - } - - final credentialsProvider = authProviderRepository - .getAuthProvider(APIAuthorizationType.iam.authProviderToken); - if (credentialsProvider == null) { - throw ConfigurationError( - 'No credential provider found for CloudWatch Logging.', - recoverySuggestion: - "If you haven't already, please add amplify_auth_cognito plugin to your App.", - ); - } - - _plugin = CloudWatchLoggerPlugin( - credentialsProvider: credentialsProvider, - pluginConfig: pluginConfig, - ); - _logger - ..registerPlugin(_plugin!) - ..logLevel = LogLevel.verbose; - } - - @visibleForTesting - Future reset() async { - if (_plugin != null) { - await _plugin!.disable(); - _logger.unregisterPlugin(_plugin!); - _plugin = null; - } - } -} diff --git a/packages/amplify_core/lib/src/version.dart b/packages/amplify_core/lib/src/version.dart index 6cff3844aa..6e2fe16901 100644 --- a/packages/amplify_core/lib/src/version.dart +++ b/packages/amplify_core/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '1.3.3'; +const packageVersion = '1.4.1'; diff --git a/packages/amplify_core/pubspec.yaml b/packages/amplify_core/pubspec.yaml index 52a17e2e44..d3f7c35bfe 100644 --- a/packages/amplify_core/pubspec.yaml +++ b/packages/amplify_core/pubspec.yaml @@ -11,7 +11,6 @@ environment: dependencies: async: ^2.10.0 aws_common: ">=0.6.0 <0.7.0" - aws_logging_cloudwatch: ^0.1.0 aws_signature_v4: ">=0.5.0 <0.6.0" collection: ^1.15.0 graphs: ^2.1.0 diff --git a/packages/amplify_core/test/logger/amplify_logging_cloudwatch_test.dart b/packages/amplify_core/test/logger/amplify_logging_cloudwatch_test.dart deleted file mode 100644 index 21b9318502..0000000000 --- a/packages/amplify_core/test/logger/amplify_logging_cloudwatch_test.dart +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -import 'dart:convert'; - -import 'package:amplify_core/amplify_core.dart'; -import 'package:amplify_core/src/logger/amplify_logging_cloudwatch.dart'; -import 'package:aws_logging_cloudwatch/aws_logging_cloudwatch.dart'; -import 'package:test/fake.dart'; -import 'package:test/test.dart'; - -void main() { - const jsonConfig1 = '''{ - "plugins": { - "cloudWatchLoggerPluginConfiguration": { - "enable": true, - "logGroupName": "TestLogGroupName", - "region": "us-east-1", - "localStoreMaxSizeInMB": 5, - "flushIntervalInSeconds": 60, - "defaultRemoteConfiguration": { - "endpoint": "URL", - "refreshIntervalInSeconds": 1200 - }, - "loggingConstraints": { - "defaultLogLevel": "ERROR", - "categoryLogLevel": { - "AUTH": "WARN", - "API": "WARN" - }, - "userLogLevel": { - "cognitoSub1": { - "defaultLogLevel": "WARN", - "categoryLogLevel": { - "AUTH": "INFO", - "API": "ERROR" - } - } - } - } - } - } -}'''; - - const jsonConfig2 = '''{ - "plugins": { - "cloudWatchLoggerPluginConfiguration": { - "enable": true, - "logGroupName": "logGroupName", - "region": "region", - "localStoreMaxSizeInMB": 5, - "flushIntervalInSeconds": 60 - } - } -}'''; - - final loggingConfig1 = LoggingConfig.fromJson( - jsonDecode(jsonConfig1) as Map, - ); - final amplifyConfig1 = AmplifyConfig( - logging: loggingConfig1, - ); - - final loggingConfig2 = LoggingConfig.fromJson( - jsonDecode(jsonConfig2) as Map, - ); - final amplifyConfig2 = AmplifyConfig( - logging: loggingConfig2, - ); - - group('configure', () { - setUp(() => AmplifyLogging().reset()); - test('It configures the plugin if it is not configured', () { - AmplifyLogging() - .configure(amplifyConfig1, FakeAmplifyAuthProviderRepository()); - final plugin = AmplifyLogger().getPlugin(); - expect(plugin, isNotNull); - }); - - test('It does not configures the plugin if is already configured', - () async { - AmplifyLogging() - .configure(amplifyConfig1, FakeAmplifyAuthProviderRepository()); - final plugin1 = AmplifyLogger().getPlugin(); - AmplifyLogging() - .configure(amplifyConfig2, FakeAmplifyAuthProviderRepository()); - final plugin2 = AmplifyLogger().getPlugin(); - expect(plugin1, plugin2); - }); - - test('It does not configure the plugin if config is not provided', () { - AmplifyLogging().configure( - const AmplifyConfig(), - FakeAmplifyAuthProviderRepository(), - ); - final plugin = AmplifyLogger().getPlugin(); - expect(plugin, isNull); - }); - }); -} - -class FakeAmplifyAuthProviderRepository extends Fake - implements AmplifyAuthProviderRepository { - final Map _authProviders = { - APIAuthorizationType.iam.authProviderToken: FakeIamAuthProvider(), - }; - - @override - T? getAuthProvider( - AmplifyAuthProviderToken token, - ) { - return _authProviders[token] as T?; - } -} - -class FakeIamAuthProvider extends Fake implements AWSIamAmplifyAuthProvider { - @override - AWSCredentials retrieve() { - return const AWSCredentials('', ''); - } -} diff --git a/packages/aws_common/lib/src/logging/aws_logger.dart b/packages/aws_common/lib/src/logging/aws_logger.dart index e804680a0e..f345302ac1 100644 --- a/packages/aws_common/lib/src/logging/aws_logger.dart +++ b/packages/aws_common/lib/src/logging/aws_logger.dart @@ -49,6 +49,7 @@ class AWSLogger with AWSDebuggable implements Closeable { if (_initialized) return; _initialized = true; hierarchicalLoggingEnabled = true; + rootLogger._logger.level = Level.ALL; rootLogger.registerPlugin(const SimpleLogPrinter()); } @@ -86,6 +87,11 @@ class AWSLogger with AWSDebuggable implements Closeable { /// The namespace of this logger. String get namespace => _logger.fullName; + /// Returns a stream of messages added to this [AWSLogger]. + Stream get onRecord { + return _logger.onRecord.map((record) => record.toLogEntry()); + } + /// Creates an [AWSLogger] with `this` as the parent. AWSLogger createChild(String name) { assert(name.isNotEmpty, 'Name should not be empty'); diff --git a/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/amplifyconfiguration_logging.dart b/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/amplifyconfiguration_logging.dart index 24eb1c1719..c73e240584 100644 --- a/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/amplifyconfiguration_logging.dart +++ b/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/amplifyconfiguration_logging.dart @@ -1,6 +1,4 @@ const loggingconfig = '''{ - "plugins": { - "cloudWatchLoggerPluginConfiguration": { "enable": true, "logGroupName": "", "region": "", @@ -26,6 +24,4 @@ const loggingconfig = '''{ } } } - } - } }'''; diff --git a/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/homepage.dart b/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/homepage.dart index 18e0cef6ae..cfbf538aea 100644 --- a/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/homepage.dart +++ b/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/homepage.dart @@ -1,5 +1,4 @@ import 'package:amplify_flutter/amplify_flutter.dart'; -import 'package:amplify_logging_cloudwatch/amplify_logging_cloudwatch.dart'; import 'package:flutter/material.dart'; class MyHomePage extends StatefulWidget { @@ -18,13 +17,13 @@ class LoggerInfo { this.logLevel = LogLevel.verbose, }); final Category category; - final AmplifyLogger logger; + final Logger logger; final TextEditingController logMsgController; LogLevel? logLevel; LoggerInfo copyWith({ Category? category, - AmplifyLogger? logger, + Logger? logger, TextEditingController? logMsgController, LogLevel? logLevel, }) { @@ -48,13 +47,12 @@ class _MyHomePageState extends State { for (final category in Category.values) { _loggerMap[category] = LoggerInfo( category, - AmplifyLogger.category(category), + Amplify.Logging.logger(category.name), TextEditingController(), ); } } - final _plugin = AmplifyLogger().getPlugin()!; LogLevel? _customLogLevel; final TextEditingController _customLogMsgController = TextEditingController(); final TextEditingController _customLoggerNameController = @@ -122,15 +120,15 @@ class _MyHomePageState extends State { } void _enableLogging() { - _plugin.enable(); + Amplify.Logging.enable(); } void _disableLogging() { - _plugin.disable(); + Amplify.Logging.disable(); } void _flushLogs() { - _plugin.flushLogs(); + Amplify.Logging.flushLogs(); } void _submitLogs() { diff --git a/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/main.dart b/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/main.dart index f68bbea816..9688db8f97 100644 --- a/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/main.dart +++ b/packages/logging_cloudwatch/amplify_logging_cloudwatch/example/lib/main.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_authenticator/amplify_authenticator.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:amplify_logging_cloudwatch/amplify_logging_cloudwatch.dart'; import 'package:amplify_logging_cloudwatch_example/amplifyconfiguration.dart'; import 'package:amplify_logging_cloudwatch_example/amplifyconfiguration_logging.dart'; import 'package:amplify_logging_cloudwatch_example/homepage.dart'; @@ -38,19 +39,13 @@ class _MyAppState extends State { MacOSSecureStorageOptions(useDataProtection: false), ), ); - final amplifyConfigWithLogging = AmplifyConfig.fromJson( - jsonDecode(amplifyconfig) as Map, - ).copyWith( - logging: LoggingConfig.fromJson( + final loggingPlugin = AmplifyCloudWatchLoggerPlugin( + CloudWatchPluginConfig.fromJson( jsonDecode(loggingconfig) as Map, ), ); - - final amplifyConfig = - const JsonEncoder().convert(amplifyConfigWithLogging.toJson()); - - await Amplify.addPlugin(authPlugin); - await Amplify.configure(amplifyConfig); + await Amplify.addPlugins([authPlugin, loggingPlugin]); + await Amplify.configure(amplifyconfig); } @override diff --git a/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_cloudwatch_logger_plugin.dart b/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_cloudwatch_logger_plugin.dart index d06246afdf..bcfaee5f06 100644 --- a/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_cloudwatch_logger_plugin.dart +++ b/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_cloudwatch_logger_plugin.dart @@ -1,3 +1,6 @@ +import 'dart:async'; + +import 'package:amplify_core/amplify_core.dart'; import 'package:amplify_logging_cloudwatch/src/amplify_log_stream_name_provider.dart'; import 'package:amplify_logging_cloudwatch/src/path_provider/flutter_path_provider.dart'; import 'package:aws_logging_cloudwatch/aws_logging_cloudwatch.dart'; @@ -5,25 +8,37 @@ import 'package:aws_logging_cloudwatch/aws_logging_cloudwatch.dart'; /// {@macro aws_logging_cloudwatch.cloudwatch_logger_plugin} class AmplifyCloudWatchLoggerPlugin extends CloudWatchLoggerPlugin { /// {@macro aws_logging_cloudwatch.cloudwatch_logger_plugin} - AmplifyCloudWatchLoggerPlugin({ - required super.credentialsProvider, - required super.pluginConfig, + AmplifyCloudWatchLoggerPlugin( + super.pluginConfig, { + super.remoteLoggingConstraintProvider, + FutureOr Function()? logStreamNameProvider, }) : super( - logStreamProvider: DefaultCloudWatchLogStreamProvider( - credentialsProvider: credentialsProvider, - region: pluginConfig.region, - logGroupName: pluginConfig.logGroupName, - defaultLogStreamNameProvider: - AmplifyLogStreamNameProvider().defaultLogStreamName, - ), - remoteLoggingConstraintProvider: - pluginConfig.defaultRemoteConfiguration == null - ? null - : DefaultRemoteLoggingConstraintProvider( - config: pluginConfig.defaultRemoteConfiguration!, - region: pluginConfig.region, - credentialsProvider: credentialsProvider, - fileStorage: FileStorage(FlutterPathProvider()), - ), + logStreamNameProvider: logStreamNameProvider ?? + AmplifyLogStreamNameProvider().defaultLogStreamName, ); + + @override + Future configure({ + AmplifyConfig? config, + required AmplifyAuthProviderRepository authProviderRepo, + }) async { + // override the path provider dependency added by AmplifyStorageS3Dart + dependencies.addInstance(FlutterPathProvider()); + await super.configure(config: config, authProviderRepo: authProviderRepo); + } + + /// {@template amplify_logging_cloudwatch.plugin_key} + /// A plugin key which can be used with `Amplify.Logging.getPlugin` to retrieve + /// a CloudWatch-specific Logging category interface. + /// {@endtemplate} + static const LoggingPluginKey pluginKey = + _AmplifyCloudWatchLoggerPluginKey(); +} + +class _AmplifyCloudWatchLoggerPluginKey + extends LoggingPluginKey { + const _AmplifyCloudWatchLoggerPluginKey(); + + @override + String get runtimeTypeName => 'AmplifyCloudWatchLoggerPluginKey'; } diff --git a/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_log_stream_name_provider.dart b/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_log_stream_name_provider.dart index 28fc1b66d7..26fcf04fc4 100644 --- a/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_log_stream_name_provider.dart +++ b/packages/logging_cloudwatch/amplify_logging_cloudwatch/lib/src/amplify_log_stream_name_provider.dart @@ -7,7 +7,7 @@ const _guestUserId = 'guest'; /// {@template amplify_logging_cloudwatch.amplify_log_stream_name_provider} /// It uses {mm-dd-yyyy}.{deviceId}.{userId|guest} format for log stream name. /// -/// It gets deviceId from platform inforamtion or uuid if it is `null`. +/// It gets deviceId from platform information or uuid if it is `null`. /// It gets userId from `Amplify.Auth.getCurrentUser()).userId` or uses `guest` /// if userId is not available. /// {@endtemplate} diff --git a/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart b/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart index a39904a5d4..b26b446ccb 100644 --- a/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart +++ b/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart @@ -47,40 +47,96 @@ typedef _LogBatch = (List logQueues, List logEvents); /// {@template aws_logging_cloudwatch.cloudwatch_logger_plugin} /// An [AWSLoggerPlugin] for sending logs to AWS CloudWatch Logs. /// {@endtemplate} -class CloudWatchLoggerPlugin extends AWSLoggerPlugin - with AWSDebuggable, AmplifyLoggerMixin { +class CloudWatchLoggerPlugin extends LoggingPluginInterface with AWSDebuggable { /// {@macro aws_logging_cloudwatch.cloudwatch_logger_plugin} - CloudWatchLoggerPlugin({ - required AWSCredentialsProvider credentialsProvider, - required CloudWatchPluginConfig pluginConfig, + CloudWatchLoggerPlugin( + CloudWatchPluginConfig pluginConfig, { RemoteLoggingConstraintProvider? remoteLoggingConstraintProvider, - CloudWatchLogStreamProvider? logStreamProvider, - @protected QueuedItemStore? logStore, - }) : _enabled = pluginConfig.enable, - _pluginConfig = pluginConfig, - _remoteLoggingConstraintProvider = remoteLoggingConstraintProvider ?? - (pluginConfig.defaultRemoteConfiguration != null - ? DefaultRemoteLoggingConstraintProvider( - config: pluginConfig.defaultRemoteConfiguration!, - credentialsProvider: credentialsProvider, - region: pluginConfig.region, - ) - : null), - _client = CloudWatchLogsClient( - region: pluginConfig.region, + FutureOr Function()? logStreamNameProvider, + @visibleForTesting DependencyManager? dependencyManagerOverride, + }) : _pluginConfig = pluginConfig, + _logStreamNameProvider = logStreamNameProvider, + _dependencyManagerOverride = dependencyManagerOverride { + if (pluginConfig.defaultRemoteConfiguration != null && + _remoteLoggingConstraintProvider != null) { + throw ConfigurationError( + 'AmplifyLoggingCloudWatch is instantiated with' + ' optional remoteLoggingConstraintProvider constructor parameter. Logging' + ' configuration also has defaultRemoteConfiguration', + recoverySuggestion: 'Use either the optional' + ' remoteLoggingConstraintProvider constructor parameter or' + ' defaultRemoteConfiguration in the Logging configuration', + ); + } + remoteLoggingConstraintProvider = remoteLoggingConstraintProvider; + } + + final CloudWatchPluginConfig _pluginConfig; + final FutureOr Function()? _logStreamNameProvider; + final DependencyManager? _dependencyManagerOverride; + RemoteLoggingConstraintProvider? _remoteLoggingConstraintProvider; + + late final QueuedItemStore _logStore; + late final AppPathProvider _appPathProvider; + late final CloudWatchLogsClient _client; + late final CloudWatchLogStreamProvider _logStreamProvider; + late final StreamSubscription _logSubscription; + + String? _userId; + bool _syncing = false; + bool _enabled = false; + StoppableTimer? _timer; + int _retryCount = 0; + DateTime? _retryTime; + final _logger = AmplifyLogger.category(Category.logging); + + @override + DependencyManager get dependencies => + _dependencyManagerOverride ?? super.dependencies; + + @override + Future configure({ + AmplifyConfig? config, + required AmplifyAuthProviderRepository authProviderRepo, + }) async { + final credentialsProvider = authProviderRepo + .getAuthProvider(APIAuthorizationType.iam.authProviderToken); + if (credentialsProvider == null) { + throw ConfigurationError( + 'No credential provider found for CloudWatch Logging.', + recoverySuggestion: + "If you haven't already, please add amplify_auth_cognito plugin to your App.", + ); + } + _appPathProvider = + dependencies.get() ?? const DartAppPathProvider(); + _logStore = dependencies.get() ?? + DartQueuedItemStore(_appPathProvider); + _client = dependencies.get() ?? + CloudWatchLogsClient( + region: _pluginConfig.region, + credentialsProvider: credentialsProvider, + ); + _logStreamProvider = dependencies.get() ?? + DefaultCloudWatchLogStreamProvider( + logGroupName: _pluginConfig.logGroupName, + region: _pluginConfig.region, credentialsProvider: credentialsProvider, - ), - _logStore = - logStore ?? DartQueuedItemStore(const DartAppPathProvider()), - _logStreamProvider = logStreamProvider ?? - DefaultCloudWatchLogStreamProvider( - logGroupName: pluginConfig.logGroupName, - region: pluginConfig.region, - credentialsProvider: credentialsProvider, - ) { - _timer = pluginConfig.flushIntervalInSeconds > 0 + defaultLogStreamNameProvider: _logStreamNameProvider, + ); + _remoteLoggingConstraintProvider ??= + (_pluginConfig.defaultRemoteConfiguration != null + ? DefaultRemoteLoggingConstraintProvider( + config: _pluginConfig.defaultRemoteConfiguration!, + credentialsProvider: credentialsProvider, + region: _pluginConfig.region, + fileStorage: FileStorage(_appPathProvider), + ) + : null); + _enabled = _pluginConfig.enable; + _timer = _pluginConfig.flushIntervalInSeconds > 0 ? StoppableTimer( - duration: Duration(seconds: pluginConfig.flushIntervalInSeconds), + duration: Duration(seconds: _pluginConfig.flushIntervalInSeconds), callback: identifyCall( LoggingCategoryMethod.batchSend, () => _startSyncingIfNotInProgress, @@ -88,7 +144,7 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin onError: _onTimerError, ) : null; - if (!pluginConfig.enable) { + if (!_pluginConfig.enable) { _timer?.stop(); } Amplify.Hub.listen(HubChannel.Auth, (AuthHubEvent event) async { @@ -102,55 +158,15 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin _userId = event.payload?.userId; } }); + _logSubscription = AWSLogger().onRecord.listen(_handleLogEntry); } - /// An [AWSLoggerPlugin] to use only for testing. - @protected - @visibleForTesting - CloudWatchLoggerPlugin.testPlugin({ - required CloudWatchLogsClient client, - required CloudWatchPluginConfig pluginConfig, - required CloudWatchLogStreamProvider logStreamProvider, - required QueuedItemStore logStore, - RemoteLoggingConstraintProvider? remoteLoggingConstraintProvider, - }) : _enabled = pluginConfig.enable, - _pluginConfig = pluginConfig, - _logStore = logStore, - _remoteLoggingConstraintProvider = remoteLoggingConstraintProvider, - _logStreamProvider = logStreamProvider, - _client = client { - Amplify.Hub.listen(HubChannel.Auth, (AuthHubEvent event) async { - if (event.type == AuthHubEventType.signedOut || - event.type == AuthHubEventType.userDeleted || - event.type == AuthHubEventType.sessionExpired) { - _userId = null; - await _clearLogs(); - } - if (event.type == AuthHubEventType.signedIn) { - _userId = event.payload?.userId; - } - }); - } - String? _userId; - final CloudWatchPluginConfig _pluginConfig; - final CloudWatchLogsClient _client; - final CloudWatchLogStreamProvider _logStreamProvider; - final QueuedItemStore _logStore; - bool _syncing = false; - bool _enabled; - StoppableTimer? _timer; - RemoteLoggingConstraintProvider? _remoteLoggingConstraintProvider; - int _retryCount = 0; - DateTime? _retryTime; - set remoteLoggingConstraintProvider( - RemoteLoggingConstraintProvider remoteProvider, - ) { - if (_remoteLoggingConstraintProvider != null) { - throw StateError( - 'remoteLoggingConstraintProvider is already configured.', - ); - } - _remoteLoggingConstraintProvider = remoteProvider; + @override + Future reset() async { + _timer?.stop(); + await _logSubscription.cancel(); + await _logStore.close(); + return super.reset(); } Future _startSyncingIfNotInProgress() async { @@ -214,7 +230,7 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin e.timeInMillisecondsSinceEpoch, ).add(_minusMaxLogEventTimeInFuture); } on Exception catch (e) { - logger.error('Failed to sync logs to CloudWatch.', e); + _logger.error('Failed to sync logs to CloudWatch.', e); } finally { await _handleFullLogStoreAfterSync( retryTime: nextRetry, @@ -250,7 +266,7 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin } void _onTimerError(Object e) { - logger.error('Failed to sync logs to CloudWatch.', e); + _logger.error('Failed to sync logs to CloudWatch.', e); } LoggingConstraints _getLoggingConstraint() { @@ -337,8 +353,7 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin return null; } - @override - Future handleLogEntry(LogEntry logEntry) async { + Future _handleLogEntry(LogEntry logEntry) async { if (!(_isLoggable(logEntry))) { return; } @@ -361,7 +376,23 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin } } + Future _clearLogs() async { + await _logStore.clear(); + } + + @override + Logger logger(String namespace, {Category? category}) { + Logger logger; + if (category != null) { + logger = AmplifyLogger.category(category).createChild(namespace); + } else { + logger = AmplifyLogger(namespace); + } + return logger; + } + /// Enables the plugin. + @override void enable() { if (!_enabled) { _enabled = true; @@ -376,6 +407,7 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin /// /// To send cached logs to CloudWatch call `flushLogs()` before calling /// `disable()`. + @override Future disable() async { _enabled = false; _timer?.stop(); @@ -385,6 +417,7 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin } /// Sends logs on-demand to CloudWatch. + @override Future flushLogs() async { await _startSyncingIfNotInProgress(); } @@ -392,12 +425,20 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin @override String get runtimeTypeName => 'CloudWatchLoggerPlugin'; - Future _clearLogs() async { - await _logStore.clear(); - } + /// {@template amplify_logging_cloudwatch_dart.plugin_key} + /// A plugin key which can be used with `Amplify.Logging.getPlugin` to retrieve + /// a CloudWatch-specific Logging category interface. + /// {@endtemplate} + static const LoggingPluginKey pluginKey = + _CloudWatchLoggerPluginKey(); +} + +class _CloudWatchLoggerPluginKey + extends LoggingPluginKey { + const _CloudWatchLoggerPluginKey(); @override - AmplifyLogger get logger => AmplifyLogger.category(Category.logging); + String get runtimeTypeName => 'CloudWatchLoggerPluginPluginKey'; } extension on QueuedItem { diff --git a/packages/logging_cloudwatch/aws_logging_cloudwatch/test/cloudwatch_logger_plugin_test.dart b/packages/logging_cloudwatch/aws_logging_cloudwatch/test/cloudwatch_logger_plugin_test.dart index aeaa155959..c1f9998d50 100644 --- a/packages/logging_cloudwatch/aws_logging_cloudwatch/test/cloudwatch_logger_plugin_test.dart +++ b/packages/logging_cloudwatch/aws_logging_cloudwatch/test/cloudwatch_logger_plugin_test.dart @@ -18,6 +18,9 @@ void main() { late MockCloudWatchLogStreamProvider mockCloudWatchLogStreamProvider; late CloudWatchLoggerPlugin plugin; late MockSmithyOperation mockPutLogEventsOperation; + late DependencyManager dependencyManagerOverride; + late MockAuthProviderRepo mockAuthProviderRepo; + late MockAWSIamAmplifyAuthProvider mockIamAuthProvider; const loggingConstraint = LoggingConstraints( defaultLogLevel: LogLevel.error, @@ -47,59 +50,7 @@ void main() { region: 'region', loggingConstraints: loggingConstraint, enable: false, - ); - final errorLog = LogEntry( - level: LogLevel.error, - message: 'error message', - loggerName: 'loggerName', - ); - - final warnLog = LogEntry( - level: LogLevel.warn, - message: 'warning message', - loggerName: 'loggerName', - ); - - final infoLog = LogEntry( - level: LogLevel.info, - message: 'info message', - loggerName: 'loggerName', - ); - - final datastoreDebugLog = LogEntry( - level: LogLevel.debug, - message: 'debug message', - loggerName: 'DataStore', - ); - - final datastoreInfoLog = LogEntry( - level: LogLevel.info, - message: 'debug message', - loggerName: 'DataStore', - ); - - final authWarnLog = LogEntry( - level: LogLevel.warn, - message: 'debug message', - loggerName: 'Auth', - ); - - final authDebugLog = LogEntry( - level: LogLevel.debug, - message: 'debug message', - loggerName: 'Auth', - ); - - final authInfoLog = LogEntry( - level: LogLevel.info, - message: 'info message', - loggerName: 'Auth', - ); - - final authVerboseLog = LogEntry( - level: LogLevel.verbose, - message: 'verbose message', - loggerName: 'Auth', + flushIntervalInSeconds: 0, ); final queuedItems = [ @@ -124,438 +75,397 @@ void main() { timestamp: DateTime.timestamp().toIso8601String(), ), ]; - - group('enable/disable: ', () { - final hubEventController = StreamController.broadcast(); - Amplify.Hub.addChannel(HubChannel.Auth, hubEventController.stream); - - setUp(() { + group('logging plugin', () { + setUp(() async { mockCloudWatchLogsClient = MockCloudWatchLogsClient(); mockQueuedItemStore = MockQueuedItemStore(); mockCloudWatchLogStreamProvider = MockCloudWatchLogStreamProvider(); - plugin = CloudWatchLoggerPlugin.testPlugin( - client: mockCloudWatchLogsClient, - pluginConfig: pluginConfig, - logStore: mockQueuedItemStore, - logStreamProvider: mockCloudWatchLogStreamProvider, - ); - }); - - tearDownAll(hubEventController.close); - - test( - 'when enabled, logs are added to the item store ' - 'if loggable at default log level', () async { + mockAuthProviderRepo = MockAuthProviderRepo(); + mockIamAuthProvider = MockAWSIamAmplifyAuthProvider(); + dependencyManagerOverride = DependencyManager() + ..addInstance(mockCloudWatchLogsClient) + ..addInstance(mockQueuedItemStore) + ..addInstance( + mockCloudWatchLogStreamProvider, + ); when( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).thenAnswer((_) async => {}); - - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); - - plugin.enable(); - await expectLater( - plugin.handleLogEntry(errorLog), - completes, - ); - // should not log this because it is below default log level. - await expectLater( - plugin.handleLogEntry(warnLog), - completes, - ); - - verify( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).called(1); - verify( - () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ).called(1); - }); + () => mockAuthProviderRepo + .getAuthProvider(APIAuthorizationType.iam.authProviderToken), + ).thenReturn(mockIamAuthProvider); - test( - 'when enabled, logs are added to the item store ' - 'if loggable at category log level', () async { - when( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).thenAnswer((_) async => {}); - - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); - - plugin.enable(); - await expectLater( - plugin.handleLogEntry(authWarnLog), - completes, - ); - await expectLater( - plugin.handleLogEntry(datastoreDebugLog), - completes, + plugin = CloudWatchLoggerPlugin( + pluginConfig, + dependencyManagerOverride: dependencyManagerOverride, ); - // should not log this because it is below auth category log level. - await expectLater( - plugin.handleLogEntry(authInfoLog), - completes, - ); - - verify( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).called(2); - verify( - () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ).called(2); + await plugin.configure(authProviderRepo: mockAuthProviderRepo); }); + tearDown(() async => plugin.reset()); + + group('enable/disable: ', () { + final hubEventController = StreamController.broadcast(); + Amplify.Hub.addChannel(HubChannel.Auth, hubEventController.stream); + tearDownAll(hubEventController.close); + test( + 'when enabled, logs are added to the item store ' + 'if loggable at default log level', () async { + when( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).thenAnswer((_) async => {}); - test( - 'when enabled, logs are added to the log store if' - ' loggable at user log level', () async { - when( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).thenAnswer((_) async => {}); - - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); - - plugin.enable(); - hubEventController.add(AuthHubEvent.signedIn(MockAuthUser())); - await Future.delayed(Duration.zero); - - await expectLater( - plugin.handleLogEntry(authWarnLog), - completes, - ); - await expectLater( - plugin.handleLogEntry(datastoreInfoLog), - completes, - ); - await expectLater( - plugin.handleLogEntry(warnLog), - completes, - ); - - // should not log these because they are below user log level. - await expectLater( - plugin.handleLogEntry(authVerboseLog), - completes, - ); - await expectLater( - plugin.handleLogEntry(infoLog), - completes, - ); + when(() => mockQueuedItemStore.isFull(any())).thenReturn(false); - verify( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).called(3); - verify( - () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ).called(3); - - hubEventController.add(AuthHubEvent.signedOut()); - await Future.delayed(Duration.zero); - - // should not log this because it is below auth category log level. - await expectLater( - plugin.handleLogEntry(authDebugLog), - completes, - ); + expect( + () { + plugin + ..enable() + ..logger('logger-1').error('error message') + // should not log this because it is below default log level. + ..logger('logger-2').warn('warn message'); + }, + returnsNormally, + ); + await Future.delayed(Duration.zero); - verifyNever( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ); - verifyNever( - () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ); - }); + verify( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).called(1); + verify( + () => mockQueuedItemStore.isFull(any()), + ).called(1); + }); - test( - 'when disabled, logs are cleared from item store and new logs will not' - ' be added to the local store', () async { - when(() => mockQueuedItemStore.clear()).thenAnswer((_) => Future.value()); - await plugin.disable(); - await expectLater( - plugin.handleLogEntry(warnLog), - completes, - ); - verifyNever(() => mockQueuedItemStore.addItem(any(), any())); - verify(() => mockQueuedItemStore.clear()).called(1); - }); - }); + test( + 'when enabled, logs are added to the item store ' + 'if loggable at category log level', () async { + when( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).thenAnswer((_) async => {}); - group('flush logs: ', () { - setUp(() { - registerFallbackValue( - PutLogEventsRequest( - logGroupName: 'logGroupName', - logStreamName: 'logStreamName', - logEvents: [], - ), - ); - mockCloudWatchLogsClient = MockCloudWatchLogsClient(); - mockQueuedItemStore = MockQueuedItemStore(); - mockCloudWatchLogStreamProvider = MockCloudWatchLogStreamProvider(); - mockPutLogEventsOperation = MockSmithyOperation(); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - plugin = CloudWatchLoggerPlugin.testPlugin( - client: mockCloudWatchLogsClient, - pluginConfig: pluginConfig, - logStore: mockQueuedItemStore, - logStreamProvider: mockCloudWatchLogStreamProvider, - ); - }); + expect( + () { + plugin.enable(); + plugin.logger(Category.auth.name) + ..warn('warn message') + // should not log this because it is below auth category log level. + ..info('info message'); + plugin.logger(Category.dataStore.name) + ..debug('debug message') + ..warn('warn message'); + }, + returnsNormally, + ); + await Future.delayed(Duration.zero); - test('it starts a sync when it is not in progress', () async { - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async => Future.value(PutLogEventsResponse()), - ); + verify( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).called(3); + verify( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).called(3); + }); - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); + test( + 'when enabled, logs are added to the log store if' + ' loggable at user log level', () async { + when( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).thenAnswer((_) async => {}); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); + plugin.enable(); + hubEventController.add(AuthHubEvent.signedIn(MockAuthUser())); + await Future.delayed(Duration.zero); - when(() => mockQueuedItemStore.deleteItems(any())) - .thenAnswer((_) async => {}); + expect( + () { + plugin.logger(Category.auth.name) + ..warn('warn message') + // should not log these because they are below user log level. + ..verbose('verbose message'); + plugin.logger(Category.dataStore.name).info('info message'); + plugin.logger('logger') + ..warn('warn message') + // should not log these because they are below user log level. + ..info('info message'); + }, + returnsNormally, + ); + await Future.delayed(Duration.zero); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); + verify( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).called(3); + verify( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).called(3); - await expectLater( - plugin.flushLogs(), - completes, - ); + hubEventController.add(AuthHubEvent.signedOut()); + await Future.delayed(Duration.zero); - verify( - () => mockCloudWatchLogStreamProvider.defaultLogStream, - ).called(1); + expect( + () { + plugin.logger(Category.auth.name) + // should not log this because it is below auth category log level. + ..debug('debug message') + ..warn('warn message'); + }, + returnsNormally, + ); + await Future.delayed(Duration.zero); - verifyNever( - () => mockCloudWatchLogStreamProvider.createLogStream(any()), - ); + verify( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).called(1); + verify( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).called(1); + }); - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(1); + test( + 'when disabled, logs are cleared from item store and new logs will not' + ' be added to the local store', () async { + when(() => mockQueuedItemStore.clear()) + .thenAnswer((_) => Future.value()); - verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(1); + expect( + () { + plugin.disable(); + plugin.logger('logger').warn('warn message'); + }, + returnsNormally, + ); + await Future.delayed(Duration.zero); + verifyNever(() => mockQueuedItemStore.addItem(any(), any())); + verify(() => mockQueuedItemStore.clear()).called(1); + }); }); - test('does not start a sync if a sync is in progress', () async { - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async => Future.value( - PutLogEventsResponse(), - ), - ); - - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); + group('flush logs: ', () { + setUp(() async { + registerFallbackValue( + PutLogEventsRequest( + logGroupName: 'logGroupName', + logStreamName: 'logStreamName', + logEvents: [], + ), + ); + mockPutLogEventsOperation = MockSmithyOperation(); + }); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + test('it starts a sync when it is not in progress', () async { + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async => + Future.value(PutLogEventsResponse()), + ); - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); - final flushLogs = plugin.flushLogs(); - await expectLater( - plugin.flushLogs(), - completes, - ); - await flushLogs; + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - verify( - () => mockCloudWatchLogStreamProvider.defaultLogStream, - ).called(1); + when(() => mockQueuedItemStore.deleteItems(any())) + .thenAnswer((_) async => {}); - verifyNever( - () => mockCloudWatchLogStreamProvider.createLogStream(any()), - ); + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(1); + await expectLater( + plugin.flushLogs(), + completes, + ); - verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(1); - }); + verify( + () => mockCloudWatchLogStreamProvider.defaultLogStream, + ).called(1); - test('does not delete logs if they are too new', () async { - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async => Future.value( - PutLogEventsResponse( - rejectedLogEventsInfo: - RejectedLogEventsInfo(tooNewLogEventStartIndex: 0), - ), - ), - ); + verifyNever( + () => mockCloudWatchLogStreamProvider.createLogStream(any()), + ); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(1); - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); + verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(1); + }); - when(() => mockQueuedItemStore.addItem(any(), any())) - .thenAnswer((_) async => {}); + test('does not start a sync if a sync is in progress', () async { + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async => Future.value( + PutLogEventsResponse(), + ), + ); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); - await expectLater( - plugin.flushLogs(), - completes, - ); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - verify( - () => mockCloudWatchLogStreamProvider.defaultLogStream, - ).called(1); + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); - verifyNever( - () => mockCloudWatchLogStreamProvider.createLogStream(any()), - ); + final flushLogs = plugin.flushLogs(); + await expectLater( + plugin.flushLogs(), + completes, + ); + await flushLogs; - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(1); + verify( + () => mockCloudWatchLogStreamProvider.defaultLogStream, + ).called(1); - verifyNever( - () => mockQueuedItemStore.deleteItems(any()), - ); - }); + verifyNever( + () => mockCloudWatchLogStreamProvider.createLogStream(any()), + ); - test('it calls create log stream on resource not found exception', - () async { - when(() => mockCloudWatchLogsClient.putLogEvents(any())) - .thenThrow(ResourceNotFoundException()); + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(1); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(1); + }); - when(() => mockCloudWatchLogStreamProvider.createLogStream(any())) - .thenAnswer((_) async => Future.value('log stream name')); + test('does not delete logs if they are too new', () async { + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async => Future.value( + PutLogEventsResponse( + rejectedLogEventsInfo: + RejectedLogEventsInfo(tooNewLogEventStartIndex: 0), + ), + ), + ); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); - await expectLater( - plugin.flushLogs(), - completes, - ); + when(() => mockQueuedItemStore.addItem(any(), any())) + .thenAnswer((_) async => {}); - verify( - () => mockCloudWatchLogStreamProvider.defaultLogStream, - ).called(1); + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); - verify( - () => mockCloudWatchLogStreamProvider.createLogStream(any()), - ).called(1); - }); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - test('it enables log rotation when log store is full and retry is set', - () async { - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async => Future.value(PutLogEventsResponse()), - ); + await expectLater( + plugin.flushLogs(), + completes, + ); - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); + verify( + () => mockCloudWatchLogStreamProvider.defaultLogStream, + ).called(1); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + verifyNever( + () => mockCloudWatchLogStreamProvider.createLogStream(any()), + ); - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(true); + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(1); - when(() => mockQueuedItemStore.deleteItems(any())) - .thenAnswer((_) async => {}); + verifyNever( + () => mockQueuedItemStore.deleteItems(any()), + ); + }); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); - plugin.enable(); + test('it calls create log stream on resource not found exception', + () async { + when(() => mockCloudWatchLogsClient.putLogEvents(any())) + .thenThrow(ResourceNotFoundException()); - await expectLater( - plugin.flushLogs(), - completes, - ); + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); - await expectLater( - plugin.handleLogEntry(errorLog), - completes, - ); + when(() => mockCloudWatchLogStreamProvider.createLogStream(any())) + .thenAnswer((_) async => Future.value('log stream name')); - verify( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: true, - ), - ).called(1); - }); + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); - test( - 'it does not enable log rotation when log store is full if retry is not ' - 'set. it start sync on full log store.', - () async { - final isFullResponse = [false, true, false]; when( () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ).thenAnswer((_) => isFullResponse.removeAt(0)); + ).thenReturn(false); + + await expectLater( + plugin.flushLogs(), + completes, + ); + + verify( + () => mockCloudWatchLogStreamProvider.defaultLogStream, + ).called(1); + + verify( + () => mockCloudWatchLogStreamProvider.createLogStream(any()), + ).called(1); + }); + test('it enables log rotation when log store is full and retry is set', + () async { when( () => mockPutLogEventsOperation.result, ).thenAnswer( @@ -570,91 +480,220 @@ void main() { when(() => mockCloudWatchLogStreamProvider.defaultLogStream) .thenAnswer((_) async => Future.value('log stream name')); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(true); + when(() => mockQueuedItemStore.deleteItems(any())) .thenAnswer((_) async => {}); when(() => mockQueuedItemStore.getAll()).thenAnswer( (_) async => Future>.value(queuedItems), ); - plugin.enable(); await expectLater( plugin.flushLogs(), completes, ); - - await expectLater( - plugin.handleLogEntry(errorLog), - completes, + expect( + () { + plugin.logger('logger').error('error message'); + }, + returnsNormally, ); - - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(2); - - verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(2); + await Future.delayed(Duration.zero); verify( () => mockQueuedItemStore.addItem( any(), any(), - enableQueueRotation: false, + enableQueueRotation: true, ), ).called(1); - }, - ); + }); - test('it does not sync on full log store if retry time not reached', + test( + 'it does not enable log rotation when log store is full if retry is not ' + 'set. it start sync on full log store.', () async { - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async => Future.value(PutLogEventsResponse()), + final isFullResponse = [false, true, false]; + when( + () => + mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenAnswer((_) => isFullResponse.removeAt(0)); + + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async => + Future.value(PutLogEventsResponse()), + ); + + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); + + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); + + when(() => mockQueuedItemStore.deleteItems(any())) + .thenAnswer((_) async => {}); + + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); + + plugin.enable(); + + await expectLater( + plugin.flushLogs(), + completes, + ); + + expect( + () { + plugin.logger('logger').error('error message'); + }, + returnsNormally, + ); + await Future.delayed(Duration.zero); + + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(2); + + verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(2); + + verify( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).called(1); + }, ); - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); + test('it does not sync on full log store if retry time not reached', + () async { + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async => + Future.value(PutLogEventsResponse()), + ); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(true); + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); - when(() => mockQueuedItemStore.deleteItems(any())) - .thenAnswer((_) async => {}); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(true); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); - plugin.enable(); + when(() => mockQueuedItemStore.deleteItems(any())) + .thenAnswer((_) async => {}); - await expectLater( - plugin.flushLogs(), - completes, - ); + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); + plugin.enable(); - await expectLater( - plugin.handleLogEntry(errorLog), - completes, - ); + await expectLater( + plugin.flushLogs(), + completes, + ); - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(1); + expect( + () { + plugin.logger('logger').error('error message'); + }, + returnsNormally, + ); + await Future.delayed(Duration.zero); - verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(1); - }); + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(1); + + verify(() => mockQueuedItemStore.deleteItems(queuedItems)).called(1); + }); + + test( + 'it deletes too old logs in the batch and sync the rest', + () async { + final responses = [ + PutLogEventsResponse( + rejectedLogEventsInfo: + RejectedLogEventsInfo(tooOldLogEventEndIndex: 0), + ), + PutLogEventsResponse(), + ]; + + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async { + final response = responses.removeAt(0); + return Future.value(response); + }, + ); + + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); + + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); + + when( + () => + mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); + + when(() => mockQueuedItemStore.deleteItems(any())) + .thenAnswer((_) async => {}); + + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); + plugin.enable(); + + await expectLater( + plugin.flushLogs(), + completes, + ); + + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(2); + + final captures = verify( + () => mockQueuedItemStore + .deleteItems(captureAny>()), + ); + + expect(captures.callCount, 2); + expect( + (captures.captured.first as Iterable).first, + queuedItems.first, + ); + expect( + (captures.captured.last as Iterable), + queuedItems.sublist(1), + ); + }, + ); - test( - 'it deletes too old logs in the batch and sync the rest', - () async { + test('it deletes expired logs in the batch and sync the rest', () async { final responses = [ PutLogEventsResponse( rejectedLogEventsInfo: - RejectedLogEventsInfo(tooOldLogEventEndIndex: 0), + RejectedLogEventsInfo(expiredLogEventEndIndex: 0), ), PutLogEventsResponse(), ]; @@ -710,286 +749,218 @@ void main() { (captures.captured.last as Iterable), queuedItems.sublist(1), ); - }, - ); + }); - test('it deletes expired logs in the batch and sync the rest', () async { - final responses = [ - PutLogEventsResponse( - rejectedLogEventsInfo: - RejectedLogEventsInfo(expiredLogEventEndIndex: 0), - ), - PutLogEventsResponse(), - ]; + test('it leaves too new logs in the batch and sync the rest', () async { + final responses = [ + PutLogEventsResponse( + rejectedLogEventsInfo: + RejectedLogEventsInfo(tooNewLogEventStartIndex: 1), + ), + PutLogEventsResponse(), + ]; - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async { - final response = responses.removeAt(0); - return Future.value(response); - }, - ); + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async { + final response = responses.removeAt(0); + return Future.value(response); + }, + ); - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); - when( - () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ).thenReturn(false); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - when(() => mockQueuedItemStore.deleteItems(any())) - .thenAnswer((_) async => {}); + when(() => mockQueuedItemStore.deleteItems(any())) + .thenAnswer((_) async => {}); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); - plugin.enable(); + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); + plugin.enable(); - await expectLater( - plugin.flushLogs(), - completes, - ); + await expectLater( + plugin.flushLogs(), + completes, + ); - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(2); + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(2); - final captures = verify( - () => - mockQueuedItemStore.deleteItems(captureAny>()), - ); + final captures = verify( + () => mockQueuedItemStore + .deleteItems(captureAny>()), + ); - expect(captures.callCount, 2); - expect( - (captures.captured.first as Iterable).first, - queuedItems.first, - ); - expect( - (captures.captured.last as Iterable), - queuedItems.sublist(1), - ); - }); + expect(captures.callCount, 1); + expect(captures.captured.length, 1); + expect( + (captures.captured.last as Iterable).first, + queuedItems.first, + ); + }); - test('it leaves too new logs in the batch and sync the rest', () async { - final responses = [ - PutLogEventsResponse( - rejectedLogEventsInfo: - RejectedLogEventsInfo(tooNewLogEventStartIndex: 1), - ), - PutLogEventsResponse(), - ]; + test( + 'it deletes old logs and leaves too new logs in the batch' + ' and sync the rest', () async { + final responses = [ + PutLogEventsResponse( + rejectedLogEventsInfo: RejectedLogEventsInfo( + expiredLogEventEndIndex: 0, + tooOldLogEventEndIndex: 1, + tooNewLogEventStartIndex: 3, + ), + ), + PutLogEventsResponse(), + ]; - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async { - final response = responses.removeAt(0); - return Future.value(response); - }, - ); + when( + () => mockPutLogEventsOperation.result, + ).thenAnswer( + (_) async { + final response = responses.removeAt(0); + return Future.value(response); + }, + ); - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); + when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( + (_) => mockPutLogEventsOperation, + ); - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); + when(() => mockCloudWatchLogStreamProvider.defaultLogStream) + .thenAnswer((_) async => Future.value('log stream name')); - when( - () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ).thenReturn(false); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - when(() => mockQueuedItemStore.deleteItems(any())) - .thenAnswer((_) async => {}); + when(() => mockQueuedItemStore.deleteItems(any())) + .thenAnswer((_) async => {}); - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); - plugin.enable(); + when(() => mockQueuedItemStore.getAll()).thenAnswer( + (_) async => Future>.value(queuedItems), + ); + plugin.enable(); - await expectLater( - plugin.flushLogs(), - completes, - ); + await expectLater( + plugin.flushLogs(), + completes, + ); - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(2); + verify( + () => mockCloudWatchLogsClient.putLogEvents(any()), + ).called(2); - final captures = verify( - () => - mockQueuedItemStore.deleteItems(captureAny>()), - ); + final captures = verify( + () => mockQueuedItemStore + .deleteItems(captureAny>()), + ); - expect(captures.callCount, 1); - expect(captures.captured.length, 1); - expect( - (captures.captured.last as Iterable).first, - queuedItems.first, - ); + expect(captures.callCount, 2); + expect( + (captures.captured.first as Iterable), + queuedItems.sublist(0, 2), + ); + + expect( + (captures.captured.last as Iterable), + queuedItems.sublist(2, 3), + ); + }); }); - test( - 'it deltes old logs and leaves too new logs in the batch' - ' and sync the rest', () async { - final responses = [ - PutLogEventsResponse( - rejectedLogEventsInfo: RejectedLogEventsInfo( - expiredLogEventEndIndex: 0, - tooOldLogEventEndIndex: 1, - tooNewLogEventStartIndex: 3, - ), - ), - PutLogEventsResponse(), + group('clear logs on Hub events', () { + final hubEventController = StreamController.broadcast(); + final events = [ + AuthHubEvent.sessionExpired, + AuthHubEvent.signedOut, + AuthHubEvent.userDeleted, ]; + Amplify.Hub.addChannel(HubChannel.Auth, hubEventController.stream); - when( - () => mockPutLogEventsOperation.result, - ).thenAnswer( - (_) async { - final response = responses.removeAt(0); - return Future.value(response); - }, - ); - - when(() => mockCloudWatchLogsClient.putLogEvents(any())).thenAnswer( - (_) => mockPutLogEventsOperation, - ); - - when(() => mockCloudWatchLogStreamProvider.defaultLogStream) - .thenAnswer((_) async => Future.value('log stream name')); - - when( - () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), - ).thenReturn(false); - - when(() => mockQueuedItemStore.deleteItems(any())) - .thenAnswer((_) async => {}); - - when(() => mockQueuedItemStore.getAll()).thenAnswer( - (_) async => Future>.value(queuedItems), - ); - plugin.enable(); - - await expectLater( - plugin.flushLogs(), - completes, - ); + tearDownAll(hubEventController.close); + test('clear logs on expected auth hub events', () async { + when( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).thenAnswer((_) async => {}); - verify( - () => mockCloudWatchLogsClient.putLogEvents(any()), - ).called(2); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - final captures = verify( - () => - mockQueuedItemStore.deleteItems(captureAny>()), - ); + plugin.enable(); + for (final event in events) { + expect( + () { + plugin.logger('logger').error('error message'); + }, + returnsNormally, + ); + hubEventController.add(event()); + } + await Future.delayed(Duration.zero); - expect(captures.callCount, 2); - expect( - (captures.captured.first as Iterable), - queuedItems.sublist(0, 2), - ); + verify( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).called(events.length); - expect( - (captures.captured.last as Iterable), - queuedItems.sublist(2, 3), - ); - }); - }); + verify( + () => mockQueuedItemStore.clear(), + ).called(events.length); + }); - group('clear logs on Hub events', () { - final hubEventController = StreamController.broadcast(); - final events = [ - AuthHubEvent.sessionExpired, - AuthHubEvent.signedOut, - AuthHubEvent.userDeleted, - ]; + test('does not clear logs on unexpected hub events', () async { + when( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).thenAnswer((_) async => {}); - Amplify.Hub.addChannel(HubChannel.Auth, hubEventController.stream); - setUp(() { - mockCloudWatchLogsClient = MockCloudWatchLogsClient(); - mockQueuedItemStore = MockQueuedItemStore(); - mockCloudWatchLogStreamProvider = MockCloudWatchLogStreamProvider(); - plugin = CloudWatchLoggerPlugin.testPlugin( - client: mockCloudWatchLogsClient, - pluginConfig: pluginConfig, - logStore: mockQueuedItemStore, - logStreamProvider: mockCloudWatchLogStreamProvider, - ); - }); - tearDownAll(hubEventController.close); + when( + () => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB), + ).thenReturn(false); - test('clear logs on expected auth hub events', () async { - when( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).thenAnswer((_) async => {}); - - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); - - plugin.enable(); - for (final event in events) { - await expectLater( - plugin.handleLogEntry(errorLog), - completes, + plugin.enable(); + expect( + () { + plugin.logger('logger').error('error message'); + }, + returnsNormally, ); - hubEventController.add(event()); - } - await Future.delayed(Duration.zero); - - verify( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).called(events.length); - - verify( - () => mockQueuedItemStore.clear(), - ).called(events.length); - }); + hubEventController.add(AuthHubEvent.signedIn(MockAuthUser())); + await Future.delayed(Duration.zero); - test('does not clear logs on unexpected hub events', () async { - when( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).thenAnswer((_) async => {}); - - when(() => mockQueuedItemStore.isFull(pluginConfig.localStoreMaxSizeInMB)) - .thenReturn(false); - - plugin.enable(); - await expectLater( - plugin.handleLogEntry(errorLog), - completes, - ); - hubEventController.add(AuthHubEvent.signedIn(MockAuthUser())); - await Future.delayed(Duration.zero); - - verify( - () => mockQueuedItemStore.addItem( - any(), - any(), - enableQueueRotation: false, - ), - ).called(1); - verifyNever( - () => mockQueuedItemStore.clear(), - ); + verify( + () => mockQueuedItemStore.addItem( + any(), + any(), + enableQueueRotation: false, + ), + ).called(1); + verifyNever( + () => mockQueuedItemStore.clear(), + ); + }); }); }); } diff --git a/packages/logging_cloudwatch/aws_logging_cloudwatch/test/mocks.dart b/packages/logging_cloudwatch/aws_logging_cloudwatch/test/mocks.dart index b9832bfd26..b2308a9286 100644 --- a/packages/logging_cloudwatch/aws_logging_cloudwatch/test/mocks.dart +++ b/packages/logging_cloudwatch/aws_logging_cloudwatch/test/mocks.dart @@ -25,3 +25,9 @@ class MockAuthUser extends Mock implements AuthUser { @override final String username = 'mockUser'; } + +class MockAuthProviderRepo extends Mock + implements AmplifyAuthProviderRepository {} + +class MockAWSIamAmplifyAuthProvider extends Mock + implements AWSIamAmplifyAuthProvider {}