From c1ec3fa1b4796a7c8fed7c4da095e1ecc31ce6d3 Mon Sep 17 00:00:00 2001 From: Christer Eliasi-Swahn Date: Thu, 24 Oct 2024 17:54:11 +0200 Subject: [PATCH] fix: Fix unnecessary_library_name warnings #2901 (#2900) --- .../auth_example_client/lib/src/protocol/protocol.dart | 3 +-- .../auth_example_server/lib/src/generated/protocol.dart | 3 +-- examples/chat/chat_client/lib/src/protocol/protocol.dart | 3 +-- examples/chat/chat_server/lib/src/generated/protocol.dart | 3 +-- .../lib/serverpod_cloud_storage_gcp.dart | 2 +- .../lib/src/aws_s3_client/model/list_bucket_result.dart | 2 -- .../lib/src/aws_s3_client/model/list_bucket_result.g.dart | 2 +- .../src/aws_s3_client/model/list_bucket_result_contents.dart | 2 -- .../src/aws_s3_client/model/list_bucket_result_contents.g.dart | 2 +- .../lib/src/aws_s3_upload/aws_s3_upload.dart | 2 -- .../lib/serverpod_cloud_storage_s3.dart | 2 +- .../lib/src/aws_s3_client/model/list_bucket_result.dart | 2 -- .../lib/src/aws_s3_client/model/list_bucket_result.g.dart | 2 +- .../src/aws_s3_client/model/list_bucket_result_contents.dart | 2 -- .../src/aws_s3_client/model/list_bucket_result_contents.g.dart | 2 +- .../lib/src/aws_s3_upload/aws_s3_upload.dart | 2 -- .../lib/serverpod_auth_apple_flutter.dart | 2 -- .../serverpod_auth_client/lib/src/protocol/protocol.dart | 3 +-- .../lib/serverpod_auth_email_flutter.dart | 2 -- .../lib/serverpod_auth_firebase_flutter.dart | 2 -- .../lib/serverpod_auth_google_flutter.dart | 2 -- modules/serverpod_auth/serverpod_auth_server/lib/module.dart | 2 -- .../serverpod_auth_server/lib/serverpod_auth_server.dart | 2 -- .../serverpod_auth_server/lib/src/generated/protocol.dart | 3 +-- .../lib/serverpod_auth_shared_flutter.dart | 2 -- .../serverpod_chat_client/lib/src/protocol/protocol.dart | 3 +-- .../serverpod_chat_flutter/lib/serverpod_chat_flutter.dart | 2 -- modules/serverpod_chat/serverpod_chat_server/lib/module.dart | 2 -- .../serverpod_chat_server/lib/serverpod_chat_server.dart | 2 -- .../serverpod_chat_server/lib/src/generated/protocol.dart | 3 +-- packages/serverpod/lib/database.dart | 2 -- packages/serverpod/lib/server.dart | 2 -- packages/serverpod/lib/serverpod_internal.dart | 2 +- packages/serverpod/lib/src/generated/protocol.dart | 3 +-- packages/serverpod_client/lib/serverpod_client.dart | 2 -- packages/serverpod_flutter/lib/serverpod_flutter.dart | 2 -- .../serverpod_serialization/lib/serverpod_serialization.dart | 2 -- packages/serverpod_serialization/lib/src/auth_encoding.dart | 2 +- .../serverpod_service_client/lib/serverpod_service_client.dart | 2 +- .../serverpod_service_client/lib/src/protocol/protocol.dart | 3 +-- packages/serverpod_shared/lib/serverpod_shared.dart | 2 -- packages/serverpod_test/lib/serverpod_test.dart | 2 -- packages/serverpod_test/lib/serverpod_test_public_exports.dart | 2 -- .../modulename_client/lib/src/protocol/protocol.dart | 3 +-- .../modulename_server/lib/modulename_server.dart | 2 -- .../modulename_server/lib/src/generated/protocol.dart | 3 +-- .../projectname_client/lib/src/protocol/protocol.dart | 3 +-- .../projectname_server/lib/src/generated/protocol.dart | 3 +-- tests/serverpod_test_client/lib/src/protocol/protocol.dart | 3 +-- .../lib/src/protocol/protocol.dart | 3 +-- .../lib/serverpod_test_module_server.dart | 2 -- .../lib/src/generated/protocol.dart | 3 +-- tests/serverpod_test_server/lib/src/generated/protocol.dart | 3 +-- tests/serverpod_test_shared/lib/serverpod_test_shared.dart | 2 -- tools/serverpod_cli/lib/analyzer.dart | 2 +- .../generator/dart/library_generators/library_generator.dart | 2 -- 56 files changed, 28 insertions(+), 102 deletions(-) diff --git a/examples/auth_example/auth_example_client/lib/src/protocol/protocol.dart b/examples/auth_example/auth_example_client/lib/src/protocol/protocol.dart index 6d11e95c83..10e0396352 100644 --- a/examples/auth_example/auth_example_client/lib/src/protocol/protocol.dart +++ b/examples/auth_example/auth_example_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'example.dart' as _i2; import 'package:serverpod_auth_client/serverpod_auth_client.dart' as _i3; diff --git a/examples/auth_example/auth_example_server/lib/src/generated/protocol.dart b/examples/auth_example/auth_example_server/lib/src/generated/protocol.dart index 680f0a0a9e..f70a5297bd 100644 --- a/examples/auth_example/auth_example_server/lib/src/generated/protocol.dart +++ b/examples/auth_example/auth_example_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'package:serverpod_auth_server/serverpod_auth_server.dart' as _i3; diff --git a/examples/chat/chat_client/lib/src/protocol/protocol.dart b/examples/chat/chat_client/lib/src/protocol/protocol.dart index a972935172..9bb15b49cc 100644 --- a/examples/chat/chat_client/lib/src/protocol/protocol.dart +++ b/examples/chat/chat_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'channel.dart' as _i2; import 'package:chat_client/src/protocol/channel.dart' as _i3; diff --git a/examples/chat/chat_server/lib/src/generated/protocol.dart b/examples/chat/chat_server/lib/src/generated/protocol.dart index 387fee6fe6..e9567d4900 100644 --- a/examples/chat/chat_server/lib/src/generated/protocol.dart +++ b/examples/chat/chat_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'package:serverpod_auth_server/serverpod_auth_server.dart' as _i3; diff --git a/integrations/serverpod_cloud_storage_gcp/lib/serverpod_cloud_storage_gcp.dart b/integrations/serverpod_cloud_storage_gcp/lib/serverpod_cloud_storage_gcp.dart index b6a6a9e7f8..d318845ec0 100644 --- a/integrations/serverpod_cloud_storage_gcp/lib/serverpod_cloud_storage_gcp.dart +++ b/integrations/serverpod_cloud_storage_gcp/lib/serverpod_cloud_storage_gcp.dart @@ -1,6 +1,6 @@ /// Support for doing something awesome. /// /// More dartdocs go here. -library serverpod_cloud_storage_gcp; +library; export 'src/cloud_storage/google_cloud_storage.dart'; diff --git a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.dart b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.dart index 95f5a56d95..bd65d33f1c 100644 --- a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.dart +++ b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.dart @@ -1,5 +1,3 @@ -library list_bucket_result; - import 'dart:convert'; import 'package:built_collection/built_collection.dart'; diff --git a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.g.dart b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.g.dart index 27857dfd69..08bc76ba3d 100644 --- a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.g.dart +++ b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result.g.dart @@ -2,7 +2,7 @@ // ignore_for_file: library_private_types_in_public_api, no_leading_underscores_for_local_identifiers, use_string_in_part_of_directives -part of list_bucket_result; +part of 'list_bucket_result.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.dart b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.dart index d8aecd082e..c4054f5146 100644 --- a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.dart +++ b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.dart @@ -1,5 +1,3 @@ -library list_bucket_result_contents; - import 'dart:convert'; import 'package:built_value/built_value.dart'; diff --git a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart index 98a64bb915..4aaaee9611 100644 --- a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart +++ b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart @@ -2,7 +2,7 @@ // ignore_for_file: library_private_types_in_public_api, no_leading_underscores_for_local_identifiers, use_string_in_part_of_directives -part of list_bucket_result_contents; +part of 'list_bucket_result_contents.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_upload/aws_s3_upload.dart b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_upload/aws_s3_upload.dart index c05f01ab9a..ac7bb0dc5a 100644 --- a/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_upload/aws_s3_upload.dart +++ b/integrations/serverpod_cloud_storage_gcp/lib/src/aws_s3_upload/aws_s3_upload.dart @@ -1,5 +1,3 @@ -library aws_s3_upload; - import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; diff --git a/integrations/serverpod_cloud_storage_s3/lib/serverpod_cloud_storage_s3.dart b/integrations/serverpod_cloud_storage_s3/lib/serverpod_cloud_storage_s3.dart index d6336b68ab..a4aede4b74 100644 --- a/integrations/serverpod_cloud_storage_s3/lib/serverpod_cloud_storage_s3.dart +++ b/integrations/serverpod_cloud_storage_s3/lib/serverpod_cloud_storage_s3.dart @@ -1,6 +1,6 @@ /// Support for doing something awesome. /// /// More dartdocs go here. -library serverpod_cloud_storage_s3; +library; export 'src/cloud_storage.dart/s3_cloud_storage.dart'; diff --git a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.dart b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.dart index 95f5a56d95..bd65d33f1c 100644 --- a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.dart +++ b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.dart @@ -1,5 +1,3 @@ -library list_bucket_result; - import 'dart:convert'; import 'package:built_collection/built_collection.dart'; diff --git a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.g.dart b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.g.dart index 27857dfd69..08bc76ba3d 100644 --- a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.g.dart +++ b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result.g.dart @@ -2,7 +2,7 @@ // ignore_for_file: library_private_types_in_public_api, no_leading_underscores_for_local_identifiers, use_string_in_part_of_directives -part of list_bucket_result; +part of 'list_bucket_result.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.dart b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.dart index d8aecd082e..c4054f5146 100644 --- a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.dart +++ b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.dart @@ -1,5 +1,3 @@ -library list_bucket_result_contents; - import 'dart:convert'; import 'package:built_value/built_value.dart'; diff --git a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart index 98a64bb915..4aaaee9611 100644 --- a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart +++ b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_client/model/list_bucket_result_contents.g.dart @@ -2,7 +2,7 @@ // ignore_for_file: library_private_types_in_public_api, no_leading_underscores_for_local_identifiers, use_string_in_part_of_directives -part of list_bucket_result_contents; +part of 'list_bucket_result_contents.dart'; // ************************************************************************** // BuiltValueGenerator diff --git a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_upload/aws_s3_upload.dart b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_upload/aws_s3_upload.dart index 467afb6cb9..9a4edd18aa 100644 --- a/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_upload/aws_s3_upload.dart +++ b/integrations/serverpod_cloud_storage_s3/lib/src/aws_s3_upload/aws_s3_upload.dart @@ -1,5 +1,3 @@ -library aws_s3_upload; - import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; diff --git a/modules/serverpod_auth/serverpod_auth_apple_flutter/lib/serverpod_auth_apple_flutter.dart b/modules/serverpod_auth/serverpod_auth_apple_flutter/lib/serverpod_auth_apple_flutter.dart index bef51ad4a0..17eff3fa5a 100644 --- a/modules/serverpod_auth/serverpod_auth_apple_flutter/lib/serverpod_auth_apple_flutter.dart +++ b/modules/serverpod_auth/serverpod_auth_apple_flutter/lib/serverpod_auth_apple_flutter.dart @@ -1,5 +1,3 @@ -library serverpod_auth_apple_flutter; - export 'src/signin_button.dart'; export 'src/auth.dart'; export 'package:serverpod_auth_shared_flutter/serverpod_auth_shared_flutter.dart'; diff --git a/modules/serverpod_auth/serverpod_auth_client/lib/src/protocol/protocol.dart b/modules/serverpod_auth/serverpod_auth_client/lib/src/protocol/protocol.dart index 98cbedfa26..76cb518096 100644 --- a/modules/serverpod_auth/serverpod_auth_client/lib/src/protocol/protocol.dart +++ b/modules/serverpod_auth/serverpod_auth_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'apple_auth_info.dart' as _i2; import 'auth_key.dart' as _i3; diff --git a/modules/serverpod_auth/serverpod_auth_email_flutter/lib/serverpod_auth_email_flutter.dart b/modules/serverpod_auth/serverpod_auth_email_flutter/lib/serverpod_auth_email_flutter.dart index 932463c4d4..f7e3371922 100644 --- a/modules/serverpod_auth/serverpod_auth_email_flutter/lib/serverpod_auth_email_flutter.dart +++ b/modules/serverpod_auth/serverpod_auth_email_flutter/lib/serverpod_auth_email_flutter.dart @@ -1,4 +1,2 @@ -library serverpod_auth_email_flutter; - export 'src/signin_button.dart'; export 'src/auth.dart'; diff --git a/modules/serverpod_auth/serverpod_auth_firebase_flutter/lib/serverpod_auth_firebase_flutter.dart b/modules/serverpod_auth/serverpod_auth_firebase_flutter/lib/serverpod_auth_firebase_flutter.dart index 09423994e8..4541ba4262 100644 --- a/modules/serverpod_auth/serverpod_auth_firebase_flutter/lib/serverpod_auth_firebase_flutter.dart +++ b/modules/serverpod_auth/serverpod_auth_firebase_flutter/lib/serverpod_auth_firebase_flutter.dart @@ -1,4 +1,2 @@ -library serverpod_auth_firebase_flutter; - export 'src/auth.dart'; export 'src/signin_button.dart'; diff --git a/modules/serverpod_auth/serverpod_auth_google_flutter/lib/serverpod_auth_google_flutter.dart b/modules/serverpod_auth/serverpod_auth_google_flutter/lib/serverpod_auth_google_flutter.dart index 89280ca7de..8882899df4 100644 --- a/modules/serverpod_auth/serverpod_auth_google_flutter/lib/serverpod_auth_google_flutter.dart +++ b/modules/serverpod_auth/serverpod_auth_google_flutter/lib/serverpod_auth_google_flutter.dart @@ -1,5 +1,3 @@ -library serverpod_auth_google_flutter; - export 'src/auth.dart'; export 'src/signin_button.dart'; export 'package:serverpod_auth_shared_flutter/serverpod_auth_shared_flutter.dart'; diff --git a/modules/serverpod_auth/serverpod_auth_server/lib/module.dart b/modules/serverpod_auth/serverpod_auth_server/lib/module.dart index 0e7a7bc10c..3a7679c0c2 100644 --- a/modules/serverpod_auth/serverpod_auth_server/lib/module.dart +++ b/modules/serverpod_auth/serverpod_auth_server/lib/module.dart @@ -1,5 +1,3 @@ -library protocol; - export 'src/business/config.dart'; export 'src/business/email_auth.dart'; export 'src/business/google_auth.dart'; diff --git a/modules/serverpod_auth/serverpod_auth_server/lib/serverpod_auth_server.dart b/modules/serverpod_auth/serverpod_auth_server/lib/serverpod_auth_server.dart index 7f48ea81c5..24eabfeb54 100644 --- a/modules/serverpod_auth/serverpod_auth_server/lib/serverpod_auth_server.dart +++ b/modules/serverpod_auth/serverpod_auth_server/lib/serverpod_auth_server.dart @@ -1,5 +1,3 @@ -library protocol; - export 'src/business/authentication_handler.dart'; export 'src/business/user_authentication.dart'; export 'src/business/config.dart'; diff --git a/modules/serverpod_auth/serverpod_auth_server/lib/src/generated/protocol.dart b/modules/serverpod_auth/serverpod_auth_server/lib/src/generated/protocol.dart index cf46f47a4e..ebc1f40172 100644 --- a/modules/serverpod_auth/serverpod_auth_server/lib/src/generated/protocol.dart +++ b/modules/serverpod_auth/serverpod_auth_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'apple_auth_info.dart' as _i3; diff --git a/modules/serverpod_auth/serverpod_auth_shared_flutter/lib/serverpod_auth_shared_flutter.dart b/modules/serverpod_auth/serverpod_auth_shared_flutter/lib/serverpod_auth_shared_flutter.dart index 6d196f86e3..215aa25fa6 100644 --- a/modules/serverpod_auth/serverpod_auth_shared_flutter/lib/serverpod_auth_shared_flutter.dart +++ b/modules/serverpod_auth/serverpod_auth_shared_flutter/lib/serverpod_auth_shared_flutter.dart @@ -1,5 +1,3 @@ -library serverpod_auth_shared_flutter; - export 'src/authentication_key_manager.dart'; export 'src/circular_user_image.dart'; export 'src/image_uploader.dart'; diff --git a/modules/serverpod_chat/serverpod_chat_client/lib/src/protocol/protocol.dart b/modules/serverpod_chat/serverpod_chat_client/lib/src/protocol/protocol.dart index 5387a3d579..d7ec928999 100644 --- a/modules/serverpod_chat/serverpod_chat_client/lib/src/protocol/protocol.dart +++ b/modules/serverpod_chat/serverpod_chat_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'chat_join_channel.dart' as _i2; import 'chat_join_channel_failed.dart' as _i3; diff --git a/modules/serverpod_chat/serverpod_chat_flutter/lib/serverpod_chat_flutter.dart b/modules/serverpod_chat/serverpod_chat_flutter/lib/serverpod_chat_flutter.dart index 293d4cd8f5..a5c887460b 100644 --- a/modules/serverpod_chat/serverpod_chat_flutter/lib/serverpod_chat_flutter.dart +++ b/modules/serverpod_chat/serverpod_chat_flutter/lib/serverpod_chat_flutter.dart @@ -1,5 +1,3 @@ -library serverpod_chat_flutter; - export 'src/chat_controller.dart'; export 'src/chat_dispatch.dart'; export 'src/chat_input.dart'; diff --git a/modules/serverpod_chat/serverpod_chat_server/lib/module.dart b/modules/serverpod_chat/serverpod_chat_server/lib/module.dart index 8b457ac209..e0ef543e14 100644 --- a/modules/serverpod_chat/serverpod_chat_server/lib/module.dart +++ b/modules/serverpod_chat/serverpod_chat_server/lib/module.dart @@ -1,5 +1,3 @@ -library protocol; - export 'src/business/config.dart'; export 'src/generated/endpoints.dart'; export 'src/generated/protocol.dart'; diff --git a/modules/serverpod_chat/serverpod_chat_server/lib/serverpod_chat_server.dart b/modules/serverpod_chat/serverpod_chat_server/lib/serverpod_chat_server.dart index 8b457ac209..e0ef543e14 100644 --- a/modules/serverpod_chat/serverpod_chat_server/lib/serverpod_chat_server.dart +++ b/modules/serverpod_chat/serverpod_chat_server/lib/serverpod_chat_server.dart @@ -1,5 +1,3 @@ -library protocol; - export 'src/business/config.dart'; export 'src/generated/endpoints.dart'; export 'src/generated/protocol.dart'; diff --git a/modules/serverpod_chat/serverpod_chat_server/lib/src/generated/protocol.dart b/modules/serverpod_chat/serverpod_chat_server/lib/src/generated/protocol.dart index d25afa2755..5e55406652 100644 --- a/modules/serverpod_chat/serverpod_chat_server/lib/src/generated/protocol.dart +++ b/modules/serverpod_chat/serverpod_chat_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'package:serverpod_auth_server/serverpod_auth_server.dart' as _i3; diff --git a/packages/serverpod/lib/database.dart b/packages/serverpod/lib/database.dart index 7f5d59d0e3..dfc1d6d610 100644 --- a/packages/serverpod/lib/database.dart +++ b/packages/serverpod/lib/database.dart @@ -1,5 +1,3 @@ -library database; - export 'src/database/concepts/columns.dart'; export 'src/database/concepts/database_result.dart'; export 'src/database/concepts/expressions.dart'; diff --git a/packages/serverpod/lib/server.dart b/packages/serverpod/lib/server.dart index a0775a5632..ffc8720cec 100644 --- a/packages/serverpod/lib/server.dart +++ b/packages/serverpod/lib/server.dart @@ -1,5 +1,3 @@ -library server; - export 'src/authentication/authentication_info.dart'; export 'src/authentication/scope.dart'; export 'src/generated/server_health_metric.dart'; diff --git a/packages/serverpod/lib/serverpod_internal.dart b/packages/serverpod/lib/serverpod_internal.dart index 009430c460..edce8c8d19 100644 --- a/packages/serverpod/lib/serverpod_internal.dart +++ b/packages/serverpod/lib/serverpod_internal.dart @@ -1,5 +1,5 @@ // This library should only be imported by Serverpod packages -library serverpod_internal; +library; // ignore: invalid_export_of_internal_element export 'src/server/websocket_request_handlers/helpers/method_stream_manager.dart'; diff --git a/packages/serverpod/lib/src/generated/protocol.dart b/packages/serverpod/lib/src/generated/protocol.dart index 394b6d9a87..9b0d037dbe 100644 --- a/packages/serverpod/lib/src/generated/protocol.dart +++ b/packages/serverpod/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'authentication/revoked_authentication_auth_id.dart' as _i3; diff --git a/packages/serverpod_client/lib/serverpod_client.dart b/packages/serverpod_client/lib/serverpod_client.dart index bc0ba1cc37..58aac6b987 100644 --- a/packages/serverpod_client/lib/serverpod_client.dart +++ b/packages/serverpod_client/lib/serverpod_client.dart @@ -1,5 +1,3 @@ -library serverpod_client; - export 'package:serverpod_serialization/serverpod_serialization.dart'; export 'src/auth_key_manager.dart'; export 'src/connectivity_monitor.dart'; diff --git a/packages/serverpod_flutter/lib/serverpod_flutter.dart b/packages/serverpod_flutter/lib/serverpod_flutter.dart index 1bb7913404..ca938c0714 100644 --- a/packages/serverpod_flutter/lib/serverpod_flutter.dart +++ b/packages/serverpod_flutter/lib/serverpod_flutter.dart @@ -1,4 +1,2 @@ -library serverpod_flutter; - export 'src/flutter_connectivity_monitor.dart'; export 'src/localhost_web.dart' if (dart.library.io) 'src/localhost_io.dart'; diff --git a/packages/serverpod_serialization/lib/serverpod_serialization.dart b/packages/serverpod_serialization/lib/serverpod_serialization.dart index 2a94168ba7..9ef40b2248 100644 --- a/packages/serverpod_serialization/lib/serverpod_serialization.dart +++ b/packages/serverpod_serialization/lib/serverpod_serialization.dart @@ -1,5 +1,3 @@ -library serverpod_serialization; - export 'package:uuid/uuid.dart'; export 'src/auth_encoding.dart'; diff --git a/packages/serverpod_serialization/lib/src/auth_encoding.dart b/packages/serverpod_serialization/lib/src/auth_encoding.dart index 1e41c6d015..35377f1fbb 100644 --- a/packages/serverpod_serialization/lib/src/auth_encoding.dart +++ b/packages/serverpod_serialization/lib/src/auth_encoding.dart @@ -1,5 +1,5 @@ /// Serverpod's default authentication key encoding and decoding. -library serverpod_serialization.auth_encoding; +library; import 'dart:convert'; diff --git a/packages/serverpod_service_client/lib/serverpod_service_client.dart b/packages/serverpod_service_client/lib/serverpod_service_client.dart index 0b27573fb7..9698df5436 100644 --- a/packages/serverpod_service_client/lib/serverpod_service_client.dart +++ b/packages/serverpod_service_client/lib/serverpod_service_client.dart @@ -1,7 +1,7 @@ /// Support for doing something awesome. /// /// More dartdocs go here. -library serverpod_service_client; +library; export 'src/protocol/protocol.dart'; export 'src/service_key_manager.dart'; diff --git a/packages/serverpod_service_client/lib/src/protocol/protocol.dart b/packages/serverpod_service_client/lib/src/protocol/protocol.dart index 08a8436e13..b304a8337f 100644 --- a/packages/serverpod_service_client/lib/src/protocol/protocol.dart +++ b/packages/serverpod_service_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'cache_info.dart' as _i2; import 'caches_info.dart' as _i3; diff --git a/packages/serverpod_shared/lib/serverpod_shared.dart b/packages/serverpod_shared/lib/serverpod_shared.dart index 11872a0520..8dadf8640d 100644 --- a/packages/serverpod_shared/lib/serverpod_shared.dart +++ b/packages/serverpod_shared/lib/serverpod_shared.dart @@ -1,5 +1,3 @@ -library serverpod_shared; - export 'src/certificates.dart'; export 'src/config.dart'; export 'src/constants.dart'; diff --git a/packages/serverpod_test/lib/serverpod_test.dart b/packages/serverpod_test/lib/serverpod_test.dart index 624c7c0605..c71e380892 100644 --- a/packages/serverpod_test/lib/serverpod_test.dart +++ b/packages/serverpod_test/lib/serverpod_test.dart @@ -1,5 +1,3 @@ -library serverpod_test; - export 'src/with_serverpod.dart'; export 'src/test_session_builder.dart'; export 'src/util.dart'; diff --git a/packages/serverpod_test/lib/serverpod_test_public_exports.dart b/packages/serverpod_test/lib/serverpod_test_public_exports.dart index 6f72f89917..089001da31 100644 --- a/packages/serverpod_test/lib/serverpod_test_public_exports.dart +++ b/packages/serverpod_test/lib/serverpod_test_public_exports.dart @@ -1,5 +1,3 @@ -library serverpod_test; - // ATTENTION: This file should never be imported directly. // It is used to re-export the public parts of the test tools // in the generated test tools file. diff --git a/templates/serverpod_templates/modulename_client/lib/src/protocol/protocol.dart b/templates/serverpod_templates/modulename_client/lib/src/protocol/protocol.dart index b6291cb6e1..0643de5315 100644 --- a/templates/serverpod_templates/modulename_client/lib/src/protocol/protocol.dart +++ b/templates/serverpod_templates/modulename_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'module_class.dart' as _i2; export 'module_class.dart'; diff --git a/templates/serverpod_templates/modulename_server/lib/modulename_server.dart b/templates/serverpod_templates/modulename_server/lib/modulename_server.dart index 329391960b..b6706603eb 100644 --- a/templates/serverpod_templates/modulename_server/lib/modulename_server.dart +++ b/templates/serverpod_templates/modulename_server/lib/modulename_server.dart @@ -1,4 +1,2 @@ -library protocol; - export 'src/generated/endpoints.dart'; export 'src/generated/protocol.dart'; diff --git a/templates/serverpod_templates/modulename_server/lib/src/generated/protocol.dart b/templates/serverpod_templates/modulename_server/lib/src/generated/protocol.dart index 07d32f3621..591b873acb 100644 --- a/templates/serverpod_templates/modulename_server/lib/src/generated/protocol.dart +++ b/templates/serverpod_templates/modulename_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'module_class.dart' as _i3; diff --git a/templates/serverpod_templates/projectname_client/lib/src/protocol/protocol.dart b/templates/serverpod_templates/projectname_client/lib/src/protocol/protocol.dart index 819e2b365e..26d56429cf 100644 --- a/templates/serverpod_templates/projectname_client/lib/src/protocol/protocol.dart +++ b/templates/serverpod_templates/projectname_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'example.dart' as _i2; export 'example.dart'; diff --git a/templates/serverpod_templates/projectname_server/lib/src/generated/protocol.dart b/templates/serverpod_templates/projectname_server/lib/src/generated/protocol.dart index 7ca694198f..e5478b4bba 100644 --- a/templates/serverpod_templates/projectname_server/lib/src/generated/protocol.dart +++ b/templates/serverpod_templates/projectname_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'example.dart' as _i3; diff --git a/tests/serverpod_test_client/lib/src/protocol/protocol.dart b/tests/serverpod_test_client/lib/src/protocol/protocol.dart index 9b67ba4980..5a1e265ede 100644 --- a/tests/serverpod_test_client/lib/src/protocol/protocol.dart +++ b/tests/serverpod_test_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'defaults/boolean/bool_default.dart' as _i2; import 'defaults/boolean/bool_default_mix.dart' as _i3; diff --git a/tests/serverpod_test_module/serverpod_test_module_client/lib/src/protocol/protocol.dart b/tests/serverpod_test_module/serverpod_test_module_client/lib/src/protocol/protocol.dart index b6291cb6e1..0643de5315 100644 --- a/tests/serverpod_test_module/serverpod_test_module_client/lib/src/protocol/protocol.dart +++ b/tests/serverpod_test_module/serverpod_test_module_client/lib/src/protocol/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod_client/serverpod_client.dart' as _i1; import 'module_class.dart' as _i2; export 'module_class.dart'; diff --git a/tests/serverpod_test_module/serverpod_test_module_server/lib/serverpod_test_module_server.dart b/tests/serverpod_test_module/serverpod_test_module_server/lib/serverpod_test_module_server.dart index 329391960b..b6706603eb 100644 --- a/tests/serverpod_test_module/serverpod_test_module_server/lib/serverpod_test_module_server.dart +++ b/tests/serverpod_test_module/serverpod_test_module_server/lib/serverpod_test_module_server.dart @@ -1,4 +1,2 @@ -library protocol; - export 'src/generated/endpoints.dart'; export 'src/generated/protocol.dart'; diff --git a/tests/serverpod_test_module/serverpod_test_module_server/lib/src/generated/protocol.dart b/tests/serverpod_test_module/serverpod_test_module_server/lib/src/generated/protocol.dart index c62129b296..e5df74c118 100644 --- a/tests/serverpod_test_module/serverpod_test_module_server/lib/src/generated/protocol.dart +++ b/tests/serverpod_test_module/serverpod_test_module_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'module_class.dart' as _i3; diff --git a/tests/serverpod_test_server/lib/src/generated/protocol.dart b/tests/serverpod_test_server/lib/src/generated/protocol.dart index ea1c8d25f0..1dc8225f88 100644 --- a/tests/serverpod_test_server/lib/src/generated/protocol.dart +++ b/tests/serverpod_test_server/lib/src/generated/protocol.dart @@ -8,8 +8,7 @@ // ignore_for_file: type_literal_in_constant_pattern // ignore_for_file: use_super_parameters -library protocol; // ignore_for_file: no_leading_underscores_for_library_prefixes - +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:serverpod/serverpod.dart' as _i1; import 'package:serverpod/protocol.dart' as _i2; import 'package:serverpod_auth_server/serverpod_auth_server.dart' as _i3; diff --git a/tests/serverpod_test_shared/lib/serverpod_test_shared.dart b/tests/serverpod_test_shared/lib/serverpod_test_shared.dart index 60cd415b20..5ca8182596 100644 --- a/tests/serverpod_test_shared/lib/serverpod_test_shared.dart +++ b/tests/serverpod_test_shared/lib/serverpod_test_shared.dart @@ -1,4 +1,2 @@ -library serverpod_test_shared; - export 'src/external_custom_class.dart'; export 'src/freezed_custom_class.dart'; diff --git a/tools/serverpod_cli/lib/analyzer.dart b/tools/serverpod_cli/lib/analyzer.dart index f138105978..771a1b78f4 100644 --- a/tools/serverpod_cli/lib/analyzer.dart +++ b/tools/serverpod_cli/lib/analyzer.dart @@ -1,5 +1,5 @@ /// Tools for analyzing the protocol files of a Serverpod project. -library analyzer; +library; export 'src/analyzer/protocol_definition.dart' show ProtocolDefinition; export 'src/config/config.dart' show GeneratorConfig, PackageType; diff --git a/tools/serverpod_cli/lib/src/generator/dart/library_generators/library_generator.dart b/tools/serverpod_cli/lib/src/generator/dart/library_generators/library_generator.dart index 69cd68249a..cf6479e73b 100644 --- a/tools/serverpod_cli/lib/src/generator/dart/library_generators/library_generator.dart +++ b/tools/serverpod_cli/lib/src/generator/dart/library_generators/library_generator.dart @@ -25,8 +25,6 @@ class LibraryGenerator { Library generateProtocol() { var library = LibraryBuilder(); - library.name = 'protocol'; - var models = protocolDefinition.models .where((model) => serverCode || !model.serverOnly) .toList();