From ff95ab2cf6e59424575a5408251aed543ea85368 Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:35:56 +0100 Subject: [PATCH 01/11] Moved abstractions into a subfolder and updated READMEs --- .gitignore | 2 +- README.md | 34 ++++--------------- .../abstractions/CHANGELOG.md | 0 packages/abstractions/README.md | 24 +++++++++++++ .../abstractions/analysis_options.yaml | 0 .../abstractions/lib}/kiota_abstractions.dart | 0 .../lib}/src/api_client_builder.dart | 0 .../abstractions/lib}/src/api_exception.dart | 0 .../lib}/src/base_request_builder.dart | 0 .../lib}/src/case_insensitive_map.dart | 0 .../abstractions/lib}/src/date_only.dart | 0 .../abstractions/lib}/src/error_mappings.dart | 0 .../base_request_builder_extensions.dart | 0 .../src/extensions/date_only_extensions.dart | 0 .../lib}/src/extensions/map_extensions.dart | 0 .../request_information_extensions.dart | 0 .../src/extensions/time_only_extensions.dart | 0 .../abstractions/lib}/src/http_headers.dart | 0 .../abstractions/lib}/src/http_method.dart | 0 .../abstractions/lib}/src/multipart_body.dart | 0 .../lib}/src/native_response_handler.dart | 0 .../lib}/src/native_response_wrapper.dart | 0 .../lib}/src/path_parameters.dart | 0 .../lib}/src/query_parameters.dart | 0 .../lib}/src/request_adapter.dart | 0 .../lib}/src/request_configuration.dart | 0 .../lib}/src/request_information.dart | 0 .../abstractions/lib}/src/request_option.dart | 0 .../lib}/src/response_handler.dart | 0 .../lib}/src/response_handler_option.dart | 0 .../serialization/additional_data_holder.dart | 0 .../lib}/src/serialization/parsable.dart | 0 .../src/serialization/parsable_factory.dart | 0 .../lib}/src/serialization/parsable_hook.dart | 0 .../lib}/src/serialization/parse_node.dart | 0 .../src/serialization/parse_node_factory.dart | 0 .../parse_node_factory_registry.dart | 0 .../parse_node_proxy_factory.dart | 0 .../serialization/serialization_writer.dart | 0 .../serialization_writer_factory.dart | 0 ...serialization_writer_factory_registry.dart | 0 .../serialization_writer_proxy_factory.dart | 0 .../lib}/src/store/backed_model.dart | 0 .../lib}/src/store/backing_store.dart | 0 .../lib}/src/store/backing_store_factory.dart | 0 .../backing_store_factory_singleton.dart | 0 .../backing_store_parse_node_factory.dart | 0 ...re_serialization_writer_proxy_factory.dart | 0 .../backing_store_subscription_callback.dart | 0 .../src/store/in_memory_backing_store.dart | 0 .../in_memory_backing_store_factory.dart | 0 .../abstractions/lib}/src/time_only.dart | 0 .../abstractions/pubspec.yaml | 0 .../abstractions/test}/date_only_test.dart | 0 .../abstractions/test}/http_headers_test.dart | 0 .../test}/multipart_body_test.dart | 0 .../test}/request_builder_test.dart | 0 .../test}/request_builder_test.mocks.dart | 0 .../test}/request_information_test.dart | 0 .../test}/request_information_test.mocks.dart | 0 .../store/in_memory_backing_store_test.dart | 0 .../in_memory_backing_store_test.mocks.dart | 0 .../abstractions/test}/time_only_test.dart | 0 63 files changed, 32 insertions(+), 28 deletions(-) rename CHANGELOG.md => packages/abstractions/CHANGELOG.md (100%) create mode 100644 packages/abstractions/README.md rename analysis_options.yaml => packages/abstractions/analysis_options.yaml (100%) rename {lib => packages/abstractions/lib}/kiota_abstractions.dart (100%) rename {lib => packages/abstractions/lib}/src/api_client_builder.dart (100%) rename {lib => packages/abstractions/lib}/src/api_exception.dart (100%) rename {lib => packages/abstractions/lib}/src/base_request_builder.dart (100%) rename {lib => packages/abstractions/lib}/src/case_insensitive_map.dart (100%) rename {lib => packages/abstractions/lib}/src/date_only.dart (100%) rename {lib => packages/abstractions/lib}/src/error_mappings.dart (100%) rename {lib => packages/abstractions/lib}/src/extensions/base_request_builder_extensions.dart (100%) rename {lib => packages/abstractions/lib}/src/extensions/date_only_extensions.dart (100%) rename {lib => packages/abstractions/lib}/src/extensions/map_extensions.dart (100%) rename {lib => packages/abstractions/lib}/src/extensions/request_information_extensions.dart (100%) rename {lib => packages/abstractions/lib}/src/extensions/time_only_extensions.dart (100%) rename {lib => packages/abstractions/lib}/src/http_headers.dart (100%) rename {lib => packages/abstractions/lib}/src/http_method.dart (100%) rename {lib => packages/abstractions/lib}/src/multipart_body.dart (100%) rename {lib => packages/abstractions/lib}/src/native_response_handler.dart (100%) rename {lib => packages/abstractions/lib}/src/native_response_wrapper.dart (100%) rename {lib => packages/abstractions/lib}/src/path_parameters.dart (100%) rename {lib => packages/abstractions/lib}/src/query_parameters.dart (100%) rename {lib => packages/abstractions/lib}/src/request_adapter.dart (100%) rename {lib => packages/abstractions/lib}/src/request_configuration.dart (100%) rename {lib => packages/abstractions/lib}/src/request_information.dart (100%) rename {lib => packages/abstractions/lib}/src/request_option.dart (100%) rename {lib => packages/abstractions/lib}/src/response_handler.dart (100%) rename {lib => packages/abstractions/lib}/src/response_handler_option.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/additional_data_holder.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/parsable.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/parsable_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/parsable_hook.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/parse_node.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/parse_node_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/parse_node_factory_registry.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/parse_node_proxy_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/serialization_writer.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/serialization_writer_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/serialization_writer_factory_registry.dart (100%) rename {lib => packages/abstractions/lib}/src/serialization/serialization_writer_proxy_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/store/backed_model.dart (100%) rename {lib => packages/abstractions/lib}/src/store/backing_store.dart (100%) rename {lib => packages/abstractions/lib}/src/store/backing_store_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/store/backing_store_factory_singleton.dart (100%) rename {lib => packages/abstractions/lib}/src/store/backing_store_parse_node_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/store/backing_store_serialization_writer_proxy_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/store/backing_store_subscription_callback.dart (100%) rename {lib => packages/abstractions/lib}/src/store/in_memory_backing_store.dart (100%) rename {lib => packages/abstractions/lib}/src/store/in_memory_backing_store_factory.dart (100%) rename {lib => packages/abstractions/lib}/src/time_only.dart (100%) rename pubspec.yaml => packages/abstractions/pubspec.yaml (100%) rename {test => packages/abstractions/test}/date_only_test.dart (100%) rename {test => packages/abstractions/test}/http_headers_test.dart (100%) rename {test => packages/abstractions/test}/multipart_body_test.dart (100%) rename {test => packages/abstractions/test}/request_builder_test.dart (100%) rename {test => packages/abstractions/test}/request_builder_test.mocks.dart (100%) rename {test => packages/abstractions/test}/request_information_test.dart (100%) rename {test => packages/abstractions/test}/request_information_test.mocks.dart (100%) rename {test => packages/abstractions/test}/store/in_memory_backing_store_test.dart (100%) rename {test => packages/abstractions/test}/store/in_memory_backing_store_test.mocks.dart (100%) rename {test => packages/abstractions/test}/time_only_test.dart (100%) diff --git a/.gitignore b/.gitignore index ac5aa98..0299f8f 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,7 @@ migrate_working_dir/ # Flutter/Dart/Pub related # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock +pubspec.lock **/doc/api/ .dart_tool/ build/ diff --git a/README.md b/README.md index 0a81154..bd32b07 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,6 @@ -The Kiota abstractions library for Dart defines the basic constructs Kiota projects need once -a client has been generated from an OpenAPI definition. +# `dart_kiota` -A [Kiota](https://github.com/microsoft/kiota) generated project will need a reference to the -abstraction package to build and run. - -## Usage - -Install the package in the generated project: - -> For now, you can add the git repository as a dependency in your `pubspec.yaml` file: -> -> ```yaml -> dependencies: -> kiota_abstractions: -> git: -> url: https://github.com/ricardoboss/dart_kiota_abstractions.git -> ref: main -> ``` - -```bash -dart pub add kiota_abstractions -``` +This is the Dart implementation of the Kiota library. ## Development @@ -35,20 +15,20 @@ From the comment at: https://github.com/microsoft/kiota/issues/2199#issuecomment #### Abstractions -- [x] Backing stores https://github.com/ricardoboss/dart_kiota_abstractions/pull/10 -- [x] Authentication https://github.com/ricardoboss/dart_kiota_abstractions/pull/12 +- [x] Backing store abstractions https://github.com/ricardoboss/dart_kiota_abstractions/pull/10 +- [x] Authentication abstractions https://github.com/ricardoboss/dart_kiota_abstractions/pull/12 #### Implementations - [ ] Text serialization/deserialization - [ ] JSON serialization/deserialization - [ ] Form data serialization/deserialization - -These could be added in the future or by other packages. +- [ ] Muli-part serialization/deserialization +- [ ] Dart HTTP request adapter ### License -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details. --- diff --git a/CHANGELOG.md b/packages/abstractions/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to packages/abstractions/CHANGELOG.md diff --git a/packages/abstractions/README.md b/packages/abstractions/README.md new file mode 100644 index 0000000..9837f2d --- /dev/null +++ b/packages/abstractions/README.md @@ -0,0 +1,24 @@ +The Kiota abstractions library for Dart defines the basic constructs Kiota projects need once +a client has been generated from an OpenAPI definition. + +A [Kiota](https://github.com/microsoft/kiota) generated project will need a reference to the +abstraction package to build and run. + +## Usage + +Install the package in the generated project: + +> For now, you can add the git repository as a dependency in your `pubspec.yaml` file: +> +> ```yaml +> dependencies: +> kiota_abstractions: +> git: +> url: https://github.com/ricardoboss/dart_kiota_abstractions.git +> ref: main +> path: packages/abstractions +> ``` + +```bash +dart pub add kiota_abstractions +``` diff --git a/analysis_options.yaml b/packages/abstractions/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to packages/abstractions/analysis_options.yaml diff --git a/lib/kiota_abstractions.dart b/packages/abstractions/lib/kiota_abstractions.dart similarity index 100% rename from lib/kiota_abstractions.dart rename to packages/abstractions/lib/kiota_abstractions.dart diff --git a/lib/src/api_client_builder.dart b/packages/abstractions/lib/src/api_client_builder.dart similarity index 100% rename from lib/src/api_client_builder.dart rename to packages/abstractions/lib/src/api_client_builder.dart diff --git a/lib/src/api_exception.dart b/packages/abstractions/lib/src/api_exception.dart similarity index 100% rename from lib/src/api_exception.dart rename to packages/abstractions/lib/src/api_exception.dart diff --git a/lib/src/base_request_builder.dart b/packages/abstractions/lib/src/base_request_builder.dart similarity index 100% rename from lib/src/base_request_builder.dart rename to packages/abstractions/lib/src/base_request_builder.dart diff --git a/lib/src/case_insensitive_map.dart b/packages/abstractions/lib/src/case_insensitive_map.dart similarity index 100% rename from lib/src/case_insensitive_map.dart rename to packages/abstractions/lib/src/case_insensitive_map.dart diff --git a/lib/src/date_only.dart b/packages/abstractions/lib/src/date_only.dart similarity index 100% rename from lib/src/date_only.dart rename to packages/abstractions/lib/src/date_only.dart diff --git a/lib/src/error_mappings.dart b/packages/abstractions/lib/src/error_mappings.dart similarity index 100% rename from lib/src/error_mappings.dart rename to packages/abstractions/lib/src/error_mappings.dart diff --git a/lib/src/extensions/base_request_builder_extensions.dart b/packages/abstractions/lib/src/extensions/base_request_builder_extensions.dart similarity index 100% rename from lib/src/extensions/base_request_builder_extensions.dart rename to packages/abstractions/lib/src/extensions/base_request_builder_extensions.dart diff --git a/lib/src/extensions/date_only_extensions.dart b/packages/abstractions/lib/src/extensions/date_only_extensions.dart similarity index 100% rename from lib/src/extensions/date_only_extensions.dart rename to packages/abstractions/lib/src/extensions/date_only_extensions.dart diff --git a/lib/src/extensions/map_extensions.dart b/packages/abstractions/lib/src/extensions/map_extensions.dart similarity index 100% rename from lib/src/extensions/map_extensions.dart rename to packages/abstractions/lib/src/extensions/map_extensions.dart diff --git a/lib/src/extensions/request_information_extensions.dart b/packages/abstractions/lib/src/extensions/request_information_extensions.dart similarity index 100% rename from lib/src/extensions/request_information_extensions.dart rename to packages/abstractions/lib/src/extensions/request_information_extensions.dart diff --git a/lib/src/extensions/time_only_extensions.dart b/packages/abstractions/lib/src/extensions/time_only_extensions.dart similarity index 100% rename from lib/src/extensions/time_only_extensions.dart rename to packages/abstractions/lib/src/extensions/time_only_extensions.dart diff --git a/lib/src/http_headers.dart b/packages/abstractions/lib/src/http_headers.dart similarity index 100% rename from lib/src/http_headers.dart rename to packages/abstractions/lib/src/http_headers.dart diff --git a/lib/src/http_method.dart b/packages/abstractions/lib/src/http_method.dart similarity index 100% rename from lib/src/http_method.dart rename to packages/abstractions/lib/src/http_method.dart diff --git a/lib/src/multipart_body.dart b/packages/abstractions/lib/src/multipart_body.dart similarity index 100% rename from lib/src/multipart_body.dart rename to packages/abstractions/lib/src/multipart_body.dart diff --git a/lib/src/native_response_handler.dart b/packages/abstractions/lib/src/native_response_handler.dart similarity index 100% rename from lib/src/native_response_handler.dart rename to packages/abstractions/lib/src/native_response_handler.dart diff --git a/lib/src/native_response_wrapper.dart b/packages/abstractions/lib/src/native_response_wrapper.dart similarity index 100% rename from lib/src/native_response_wrapper.dart rename to packages/abstractions/lib/src/native_response_wrapper.dart diff --git a/lib/src/path_parameters.dart b/packages/abstractions/lib/src/path_parameters.dart similarity index 100% rename from lib/src/path_parameters.dart rename to packages/abstractions/lib/src/path_parameters.dart diff --git a/lib/src/query_parameters.dart b/packages/abstractions/lib/src/query_parameters.dart similarity index 100% rename from lib/src/query_parameters.dart rename to packages/abstractions/lib/src/query_parameters.dart diff --git a/lib/src/request_adapter.dart b/packages/abstractions/lib/src/request_adapter.dart similarity index 100% rename from lib/src/request_adapter.dart rename to packages/abstractions/lib/src/request_adapter.dart diff --git a/lib/src/request_configuration.dart b/packages/abstractions/lib/src/request_configuration.dart similarity index 100% rename from lib/src/request_configuration.dart rename to packages/abstractions/lib/src/request_configuration.dart diff --git a/lib/src/request_information.dart b/packages/abstractions/lib/src/request_information.dart similarity index 100% rename from lib/src/request_information.dart rename to packages/abstractions/lib/src/request_information.dart diff --git a/lib/src/request_option.dart b/packages/abstractions/lib/src/request_option.dart similarity index 100% rename from lib/src/request_option.dart rename to packages/abstractions/lib/src/request_option.dart diff --git a/lib/src/response_handler.dart b/packages/abstractions/lib/src/response_handler.dart similarity index 100% rename from lib/src/response_handler.dart rename to packages/abstractions/lib/src/response_handler.dart diff --git a/lib/src/response_handler_option.dart b/packages/abstractions/lib/src/response_handler_option.dart similarity index 100% rename from lib/src/response_handler_option.dart rename to packages/abstractions/lib/src/response_handler_option.dart diff --git a/lib/src/serialization/additional_data_holder.dart b/packages/abstractions/lib/src/serialization/additional_data_holder.dart similarity index 100% rename from lib/src/serialization/additional_data_holder.dart rename to packages/abstractions/lib/src/serialization/additional_data_holder.dart diff --git a/lib/src/serialization/parsable.dart b/packages/abstractions/lib/src/serialization/parsable.dart similarity index 100% rename from lib/src/serialization/parsable.dart rename to packages/abstractions/lib/src/serialization/parsable.dart diff --git a/lib/src/serialization/parsable_factory.dart b/packages/abstractions/lib/src/serialization/parsable_factory.dart similarity index 100% rename from lib/src/serialization/parsable_factory.dart rename to packages/abstractions/lib/src/serialization/parsable_factory.dart diff --git a/lib/src/serialization/parsable_hook.dart b/packages/abstractions/lib/src/serialization/parsable_hook.dart similarity index 100% rename from lib/src/serialization/parsable_hook.dart rename to packages/abstractions/lib/src/serialization/parsable_hook.dart diff --git a/lib/src/serialization/parse_node.dart b/packages/abstractions/lib/src/serialization/parse_node.dart similarity index 100% rename from lib/src/serialization/parse_node.dart rename to packages/abstractions/lib/src/serialization/parse_node.dart diff --git a/lib/src/serialization/parse_node_factory.dart b/packages/abstractions/lib/src/serialization/parse_node_factory.dart similarity index 100% rename from lib/src/serialization/parse_node_factory.dart rename to packages/abstractions/lib/src/serialization/parse_node_factory.dart diff --git a/lib/src/serialization/parse_node_factory_registry.dart b/packages/abstractions/lib/src/serialization/parse_node_factory_registry.dart similarity index 100% rename from lib/src/serialization/parse_node_factory_registry.dart rename to packages/abstractions/lib/src/serialization/parse_node_factory_registry.dart diff --git a/lib/src/serialization/parse_node_proxy_factory.dart b/packages/abstractions/lib/src/serialization/parse_node_proxy_factory.dart similarity index 100% rename from lib/src/serialization/parse_node_proxy_factory.dart rename to packages/abstractions/lib/src/serialization/parse_node_proxy_factory.dart diff --git a/lib/src/serialization/serialization_writer.dart b/packages/abstractions/lib/src/serialization/serialization_writer.dart similarity index 100% rename from lib/src/serialization/serialization_writer.dart rename to packages/abstractions/lib/src/serialization/serialization_writer.dart diff --git a/lib/src/serialization/serialization_writer_factory.dart b/packages/abstractions/lib/src/serialization/serialization_writer_factory.dart similarity index 100% rename from lib/src/serialization/serialization_writer_factory.dart rename to packages/abstractions/lib/src/serialization/serialization_writer_factory.dart diff --git a/lib/src/serialization/serialization_writer_factory_registry.dart b/packages/abstractions/lib/src/serialization/serialization_writer_factory_registry.dart similarity index 100% rename from lib/src/serialization/serialization_writer_factory_registry.dart rename to packages/abstractions/lib/src/serialization/serialization_writer_factory_registry.dart diff --git a/lib/src/serialization/serialization_writer_proxy_factory.dart b/packages/abstractions/lib/src/serialization/serialization_writer_proxy_factory.dart similarity index 100% rename from lib/src/serialization/serialization_writer_proxy_factory.dart rename to packages/abstractions/lib/src/serialization/serialization_writer_proxy_factory.dart diff --git a/lib/src/store/backed_model.dart b/packages/abstractions/lib/src/store/backed_model.dart similarity index 100% rename from lib/src/store/backed_model.dart rename to packages/abstractions/lib/src/store/backed_model.dart diff --git a/lib/src/store/backing_store.dart b/packages/abstractions/lib/src/store/backing_store.dart similarity index 100% rename from lib/src/store/backing_store.dart rename to packages/abstractions/lib/src/store/backing_store.dart diff --git a/lib/src/store/backing_store_factory.dart b/packages/abstractions/lib/src/store/backing_store_factory.dart similarity index 100% rename from lib/src/store/backing_store_factory.dart rename to packages/abstractions/lib/src/store/backing_store_factory.dart diff --git a/lib/src/store/backing_store_factory_singleton.dart b/packages/abstractions/lib/src/store/backing_store_factory_singleton.dart similarity index 100% rename from lib/src/store/backing_store_factory_singleton.dart rename to packages/abstractions/lib/src/store/backing_store_factory_singleton.dart diff --git a/lib/src/store/backing_store_parse_node_factory.dart b/packages/abstractions/lib/src/store/backing_store_parse_node_factory.dart similarity index 100% rename from lib/src/store/backing_store_parse_node_factory.dart rename to packages/abstractions/lib/src/store/backing_store_parse_node_factory.dart diff --git a/lib/src/store/backing_store_serialization_writer_proxy_factory.dart b/packages/abstractions/lib/src/store/backing_store_serialization_writer_proxy_factory.dart similarity index 100% rename from lib/src/store/backing_store_serialization_writer_proxy_factory.dart rename to packages/abstractions/lib/src/store/backing_store_serialization_writer_proxy_factory.dart diff --git a/lib/src/store/backing_store_subscription_callback.dart b/packages/abstractions/lib/src/store/backing_store_subscription_callback.dart similarity index 100% rename from lib/src/store/backing_store_subscription_callback.dart rename to packages/abstractions/lib/src/store/backing_store_subscription_callback.dart diff --git a/lib/src/store/in_memory_backing_store.dart b/packages/abstractions/lib/src/store/in_memory_backing_store.dart similarity index 100% rename from lib/src/store/in_memory_backing_store.dart rename to packages/abstractions/lib/src/store/in_memory_backing_store.dart diff --git a/lib/src/store/in_memory_backing_store_factory.dart b/packages/abstractions/lib/src/store/in_memory_backing_store_factory.dart similarity index 100% rename from lib/src/store/in_memory_backing_store_factory.dart rename to packages/abstractions/lib/src/store/in_memory_backing_store_factory.dart diff --git a/lib/src/time_only.dart b/packages/abstractions/lib/src/time_only.dart similarity index 100% rename from lib/src/time_only.dart rename to packages/abstractions/lib/src/time_only.dart diff --git a/pubspec.yaml b/packages/abstractions/pubspec.yaml similarity index 100% rename from pubspec.yaml rename to packages/abstractions/pubspec.yaml diff --git a/test/date_only_test.dart b/packages/abstractions/test/date_only_test.dart similarity index 100% rename from test/date_only_test.dart rename to packages/abstractions/test/date_only_test.dart diff --git a/test/http_headers_test.dart b/packages/abstractions/test/http_headers_test.dart similarity index 100% rename from test/http_headers_test.dart rename to packages/abstractions/test/http_headers_test.dart diff --git a/test/multipart_body_test.dart b/packages/abstractions/test/multipart_body_test.dart similarity index 100% rename from test/multipart_body_test.dart rename to packages/abstractions/test/multipart_body_test.dart diff --git a/test/request_builder_test.dart b/packages/abstractions/test/request_builder_test.dart similarity index 100% rename from test/request_builder_test.dart rename to packages/abstractions/test/request_builder_test.dart diff --git a/test/request_builder_test.mocks.dart b/packages/abstractions/test/request_builder_test.mocks.dart similarity index 100% rename from test/request_builder_test.mocks.dart rename to packages/abstractions/test/request_builder_test.mocks.dart diff --git a/test/request_information_test.dart b/packages/abstractions/test/request_information_test.dart similarity index 100% rename from test/request_information_test.dart rename to packages/abstractions/test/request_information_test.dart diff --git a/test/request_information_test.mocks.dart b/packages/abstractions/test/request_information_test.mocks.dart similarity index 100% rename from test/request_information_test.mocks.dart rename to packages/abstractions/test/request_information_test.mocks.dart diff --git a/test/store/in_memory_backing_store_test.dart b/packages/abstractions/test/store/in_memory_backing_store_test.dart similarity index 100% rename from test/store/in_memory_backing_store_test.dart rename to packages/abstractions/test/store/in_memory_backing_store_test.dart diff --git a/test/store/in_memory_backing_store_test.mocks.dart b/packages/abstractions/test/store/in_memory_backing_store_test.mocks.dart similarity index 100% rename from test/store/in_memory_backing_store_test.mocks.dart rename to packages/abstractions/test/store/in_memory_backing_store_test.mocks.dart diff --git a/test/time_only_test.dart b/packages/abstractions/test/time_only_test.dart similarity index 100% rename from test/time_only_test.dart rename to packages/abstractions/test/time_only_test.dart From 563a1b58b3a6a14790f93b31e2b01513ef71e3a2 Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:39:32 +0100 Subject: [PATCH 02/11] Added matrix strategy to test packages in parallel --- .github/workflows/dart.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index c91e472..45d2476 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -8,7 +8,11 @@ on: jobs: test: - name: Analyze, format, and test + strategy: + matrix: + package: ['abstractions'] + + name: Analyze, format, and test (${{ matrix.package }}) runs-on: ubuntu-latest steps: @@ -24,17 +28,22 @@ jobs: - name: Install dependencies run: dart pub get + working-directory: packages/${{ matrix.package }} - name: Verify formatting continue-on-error: true run: dart format --output=none --set-exit-if-changed . + working-directory: packages/${{ matrix.package }} - name: Analyze project source continue-on-error: true run: dart analyze --fatal-infos + working-directory: packages/${{ matrix.package }} - name: Run build_runner run: dart run build_runner build --delete-conflicting-outputs + working-directory: packages/${{ matrix.package }} - name: Run tests run: dart test + working-directory: packages/${{ matrix.package }} From e7622b9eaa63d8a83ad50ff926810997859bbeac Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:44:00 +0100 Subject: [PATCH 03/11] Release preparation --- packages/abstractions/CHANGELOG.md | 3 +-- packages/abstractions/pubspec.yaml | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/abstractions/CHANGELOG.md b/packages/abstractions/CHANGELOG.md index df374e5..0f1d9f8 100644 --- a/packages/abstractions/CHANGELOG.md +++ b/packages/abstractions/CHANGELOG.md @@ -1,4 +1,3 @@ -## 0.0.1-dev.1 +## Unreleased * Provides interfaces and base classes for a basic Kiota client - * Not included are backing stores, authentication or basic de-/serialization diff --git a/packages/abstractions/pubspec.yaml b/packages/abstractions/pubspec.yaml index 7805a1a..b342896 100644 --- a/packages/abstractions/pubspec.yaml +++ b/packages/abstractions/pubspec.yaml @@ -1,7 +1,7 @@ name: kiota_abstractions -description: "Kiota abstractions for Dart." -version: 0.0.1-dev.1 -homepage: https://github.com/ricardoboss/dart_kiota_abstractions +description: "Kiota abstractions for Dart" +version: 0.0.1-pre.1 +homepage: https://github.com/ricardoboss/dart_kiota_abstractions/tree/main/packages/abstractions publish_to: 'none' topics: From b98b36c8e9d8fbf7bfc712f2829e77e9f545a9fe Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:47:36 +0100 Subject: [PATCH 04/11] Added stub for http_client package --- .github/workflows/dart.yml | 2 +- packages/http_client/README.md | 20 ++++++++++++++++++++ packages/http_client/pubspec.yaml | 14 ++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 packages/http_client/README.md create mode 100644 packages/http_client/pubspec.yaml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 45d2476..5f60f0a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -10,7 +10,7 @@ jobs: test: strategy: matrix: - package: ['abstractions'] + package: ['abstractions', 'http_client'] name: Analyze, format, and test (${{ matrix.package }}) runs-on: ubuntu-latest diff --git a/packages/http_client/README.md b/packages/http_client/README.md new file mode 100644 index 0000000..8444326 --- /dev/null +++ b/packages/http_client/README.md @@ -0,0 +1,20 @@ +The `kiota_http_client` package implements a HTTP client for generated Kiota clients. + +## Usage + +Install the package in the generated project: + +> For now, you can add the git repository as a dependency in your `pubspec.yaml` file: +> +> ```yaml +> dependencies: +> kiota_http_client: +> git: +> url: https://github.com/ricardoboss/dart_kiota_abstractions.git +> ref: main +> path: packages/http_client +> ``` + +```bash +dart pub add kiota_http_client +``` diff --git a/packages/http_client/pubspec.yaml b/packages/http_client/pubspec.yaml new file mode 100644 index 0000000..53994de --- /dev/null +++ b/packages/http_client/pubspec.yaml @@ -0,0 +1,14 @@ +name: kiota_http_client +description: "Kiota http client for Dart" +version: 0.0.1-pre.1 +homepage: https://github.com/ricardoboss/dart_kiota_abstractions/tree/main/packages/http_client +publish_to: 'none' + +environment: + sdk: '>=3.2.6 <4.0.0' + +dependencies: + kiota_abstractions: + path: ../abstractions + http: ^1.2.1 + http_parser: ^4.0.2 From eb669c6d75001afca103c4f9fed3821420d5efae Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:50:26 +0100 Subject: [PATCH 05/11] Add condition to only run build_runner for certain packages --- .github/workflows/dart.yml | 1 + packages/http_client/pubspec.yaml | 2 ++ packages/http_client/test/.gitkeep | 0 3 files changed, 3 insertions(+) create mode 100644 packages/http_client/test/.gitkeep diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 5f60f0a..4b5075f 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -41,6 +41,7 @@ jobs: working-directory: packages/${{ matrix.package }} - name: Run build_runner + if: contains(fromJson('[ "abstractions" ]'), matrix.package) run: dart run build_runner build --delete-conflicting-outputs working-directory: packages/${{ matrix.package }} diff --git a/packages/http_client/pubspec.yaml b/packages/http_client/pubspec.yaml index 53994de..88a8cab 100644 --- a/packages/http_client/pubspec.yaml +++ b/packages/http_client/pubspec.yaml @@ -12,3 +12,5 @@ dependencies: path: ../abstractions http: ^1.2.1 http_parser: ^4.0.2 +dev_dependencies: + test: ^1.25.2 diff --git a/packages/http_client/test/.gitkeep b/packages/http_client/test/.gitkeep new file mode 100644 index 0000000..e69de29 From d7b42f55a2dd6051f90c93a744e41423084158bd Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:51:38 +0100 Subject: [PATCH 06/11] Added dummy test --- packages/http_client/test/.gitkeep | 0 packages/http_client/test/dummy.dart | 7 +++++++ 2 files changed, 7 insertions(+) delete mode 100644 packages/http_client/test/.gitkeep create mode 100644 packages/http_client/test/dummy.dart diff --git a/packages/http_client/test/.gitkeep b/packages/http_client/test/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/packages/http_client/test/dummy.dart b/packages/http_client/test/dummy.dart new file mode 100644 index 0000000..4db2e30 --- /dev/null +++ b/packages/http_client/test/dummy.dart @@ -0,0 +1,7 @@ +import 'package:test/test.dart'; + +void main() { + test('dummy test', () { + expect(1, 1); + }); +} From 8abf0c70449cb9b936d66bb77506ebeacfb765c2 Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:52:29 +0100 Subject: [PATCH 07/11] Don't cancel other package workflows --- .github/workflows/dart.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 4b5075f..da5dc21 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -9,10 +9,11 @@ on: jobs: test: strategy: + fail-fast: false matrix: package: ['abstractions', 'http_client'] - name: Analyze, format, and test (${{ matrix.package }}) + name: '${{ matrix.package }}: Analyze, format, and test' runs-on: ubuntu-latest steps: From a70c74c1144e80c91e5e31335d328c7359f51c78 Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:53:23 +0100 Subject: [PATCH 08/11] Use correct file schema --- packages/http_client/test/{dummy.dart => dummy_test.dart} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/http_client/test/{dummy.dart => dummy_test.dart} (100%) diff --git a/packages/http_client/test/dummy.dart b/packages/http_client/test/dummy_test.dart similarity index 100% rename from packages/http_client/test/dummy.dart rename to packages/http_client/test/dummy_test.dart From 00f418ba0c3c2c4e479dc11cd10f9bf402fb6b26 Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 05:54:52 +0100 Subject: [PATCH 09/11] Shorter name --- .github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index da5dc21..70d70fd 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -13,7 +13,7 @@ jobs: matrix: package: ['abstractions', 'http_client'] - name: '${{ matrix.package }}: Analyze, format, and test' + name: '${{ matrix.package }}: Analyze & Test' runs-on: ubuntu-latest steps: From 44e45a9a60a6e0f34cb92d2c2d9a338dcb848033 Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Wed, 20 Mar 2024 22:38:00 +0100 Subject: [PATCH 10/11] Moved authentication classes to new package subfolder --- packages/abstractions/lib/kiota_abstractions.dart | 8 ++++---- .../lib}/src/authentication/access_token_provider.dart | 0 .../lib}/src/authentication/allowed_hosts_validator.dart | 0 .../authentication/anonymous_authentication_provider.dart | 0 .../authentication/api_key_authentication_provider.dart | 0 .../lib}/src/authentication/api_key_location.dart | 0 .../lib}/src/authentication/authentication_provider.dart | 0 .../base_bearer_token_authentication_provider.dart | 0 packages/abstractions/lib/src/case_insensitive_map.dart | 2 ++ .../authentication/allowed_hosts_validator_test.dart | 0 .../api_key_authentication_provider_test.dart | 0 .../base_bearer_token_authentication_provider_test.dart | 0 ...e_bearer_token_authentication_provider_test.mocks.dart | 0 13 files changed, 6 insertions(+), 4 deletions(-) rename {lib => packages/abstractions/lib}/src/authentication/access_token_provider.dart (100%) rename {lib => packages/abstractions/lib}/src/authentication/allowed_hosts_validator.dart (100%) rename {lib => packages/abstractions/lib}/src/authentication/anonymous_authentication_provider.dart (100%) rename {lib => packages/abstractions/lib}/src/authentication/api_key_authentication_provider.dart (100%) rename {lib => packages/abstractions/lib}/src/authentication/api_key_location.dart (100%) rename {lib => packages/abstractions/lib}/src/authentication/authentication_provider.dart (100%) rename {lib => packages/abstractions/lib}/src/authentication/base_bearer_token_authentication_provider.dart (100%) rename {test => packages/abstractions/test}/authentication/allowed_hosts_validator_test.dart (100%) rename {test => packages/abstractions/test}/authentication/api_key_authentication_provider_test.dart (100%) rename {test => packages/abstractions/test}/authentication/base_bearer_token_authentication_provider_test.dart (100%) rename {test => packages/abstractions/test}/authentication/base_bearer_token_authentication_provider_test.mocks.dart (100%) diff --git a/packages/abstractions/lib/kiota_abstractions.dart b/packages/abstractions/lib/kiota_abstractions.dart index 8e8e0d9..c8834c2 100644 --- a/packages/abstractions/lib/kiota_abstractions.dart +++ b/packages/abstractions/lib/kiota_abstractions.dart @@ -11,19 +11,19 @@ import 'dart:collection'; import 'dart:math'; import 'dart:typed_data'; -import 'package:kiota_abstractions/src/case_insensitive_map.dart'; import 'package:std_uritemplate/std_uritemplate.dart'; import 'package:uuid/uuid.dart'; -part 'src/authentication/allowed_hosts_validator.dart'; +part 'src/api_client_builder.dart'; part 'src/authentication/access_token_provider.dart'; +part 'src/authentication/allowed_hosts_validator.dart'; part 'src/authentication/anonymous_authentication_provider.dart'; part 'src/authentication/api_key_authentication_provider.dart'; part 'src/authentication/api_key_location.dart'; part 'src/authentication/authentication_provider.dart'; part 'src/authentication/base_bearer_token_authentication_provider.dart'; -part 'src/api_client_builder.dart'; part 'src/base_request_builder.dart'; +part 'src/case_insensitive_map.dart'; part 'src/date_only.dart'; part 'src/error_mappings.dart'; part 'src/extensions/base_request_builder_extensions.dart'; @@ -55,7 +55,6 @@ part 'src/serialization/parse_node_proxy_factory.dart'; part 'src/serialization/serialization_writer.dart'; part 'src/serialization/serialization_writer_factory.dart'; part 'src/serialization/serialization_writer_factory_registry.dart'; -part 'src/time_only.dart'; part 'src/serialization/serialization_writer_proxy_factory.dart'; part 'src/store/backed_model.dart'; part 'src/store/backing_store.dart'; @@ -66,3 +65,4 @@ part 'src/store/backing_store_serialization_writer_proxy_factory.dart'; part 'src/store/backing_store_subscription_callback.dart'; part 'src/store/in_memory_backing_store.dart'; part 'src/store/in_memory_backing_store_factory.dart'; +part 'src/time_only.dart'; diff --git a/lib/src/authentication/access_token_provider.dart b/packages/abstractions/lib/src/authentication/access_token_provider.dart similarity index 100% rename from lib/src/authentication/access_token_provider.dart rename to packages/abstractions/lib/src/authentication/access_token_provider.dart diff --git a/lib/src/authentication/allowed_hosts_validator.dart b/packages/abstractions/lib/src/authentication/allowed_hosts_validator.dart similarity index 100% rename from lib/src/authentication/allowed_hosts_validator.dart rename to packages/abstractions/lib/src/authentication/allowed_hosts_validator.dart diff --git a/lib/src/authentication/anonymous_authentication_provider.dart b/packages/abstractions/lib/src/authentication/anonymous_authentication_provider.dart similarity index 100% rename from lib/src/authentication/anonymous_authentication_provider.dart rename to packages/abstractions/lib/src/authentication/anonymous_authentication_provider.dart diff --git a/lib/src/authentication/api_key_authentication_provider.dart b/packages/abstractions/lib/src/authentication/api_key_authentication_provider.dart similarity index 100% rename from lib/src/authentication/api_key_authentication_provider.dart rename to packages/abstractions/lib/src/authentication/api_key_authentication_provider.dart diff --git a/lib/src/authentication/api_key_location.dart b/packages/abstractions/lib/src/authentication/api_key_location.dart similarity index 100% rename from lib/src/authentication/api_key_location.dart rename to packages/abstractions/lib/src/authentication/api_key_location.dart diff --git a/lib/src/authentication/authentication_provider.dart b/packages/abstractions/lib/src/authentication/authentication_provider.dart similarity index 100% rename from lib/src/authentication/authentication_provider.dart rename to packages/abstractions/lib/src/authentication/authentication_provider.dart diff --git a/lib/src/authentication/base_bearer_token_authentication_provider.dart b/packages/abstractions/lib/src/authentication/base_bearer_token_authentication_provider.dart similarity index 100% rename from lib/src/authentication/base_bearer_token_authentication_provider.dart rename to packages/abstractions/lib/src/authentication/base_bearer_token_authentication_provider.dart diff --git a/packages/abstractions/lib/src/case_insensitive_map.dart b/packages/abstractions/lib/src/case_insensitive_map.dart index 309af3b..a3795f8 100644 --- a/packages/abstractions/lib/src/case_insensitive_map.dart +++ b/packages/abstractions/lib/src/case_insensitive_map.dart @@ -1,3 +1,5 @@ +part of '../kiota_abstractions.dart'; + /// Stores key-value pairs with case-insensitive keys. /// /// Internally uses two maps to store the data. The first map stores the diff --git a/test/authentication/allowed_hosts_validator_test.dart b/packages/abstractions/test/authentication/allowed_hosts_validator_test.dart similarity index 100% rename from test/authentication/allowed_hosts_validator_test.dart rename to packages/abstractions/test/authentication/allowed_hosts_validator_test.dart diff --git a/test/authentication/api_key_authentication_provider_test.dart b/packages/abstractions/test/authentication/api_key_authentication_provider_test.dart similarity index 100% rename from test/authentication/api_key_authentication_provider_test.dart rename to packages/abstractions/test/authentication/api_key_authentication_provider_test.dart diff --git a/test/authentication/base_bearer_token_authentication_provider_test.dart b/packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.dart similarity index 100% rename from test/authentication/base_bearer_token_authentication_provider_test.dart rename to packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.dart diff --git a/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart b/packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart similarity index 100% rename from test/authentication/base_bearer_token_authentication_provider_test.mocks.dart rename to packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart From fb2132ac26f3478e8abe27c2f76d219cc80d7e2e Mon Sep 17 00:00:00 2001 From: Ricardo Boss Date: Thu, 28 Mar 2024 01:20:22 +0100 Subject: [PATCH 11/11] Renamed package folders to be the same as the package name --- .github/workflows/dart.yml | 4 ++-- packages/http_client/README.md | 20 ------------------ .../CHANGELOG.md | 0 .../README.md | 4 ++-- .../analysis_options.yaml | 0 .../lib/kiota_abstractions.dart | 0 .../lib/src/api_client_builder.dart | 0 .../lib/src/api_exception.dart | 0 .../authentication/access_token_provider.dart | 0 .../allowed_hosts_validator.dart | 0 .../anonymous_authentication_provider.dart | 0 .../api_key_authentication_provider.dart | 0 .../src/authentication/api_key_location.dart | 0 .../authentication_provider.dart | 0 ..._bearer_token_authentication_provider.dart | 0 .../lib/src/base_request_builder.dart | 0 .../lib/src/case_insensitive_map.dart | 0 .../lib/src/date_only.dart | 0 .../lib/src/error_mappings.dart | 0 .../base_request_builder_extensions.dart | 0 .../src/extensions/date_only_extensions.dart | 0 .../lib/src/extensions/map_extensions.dart | 0 .../request_information_extensions.dart | 0 .../src/extensions/time_only_extensions.dart | 0 .../lib/src/http_headers.dart | 0 .../lib/src/http_method.dart | 0 .../lib/src/multipart_body.dart | 0 .../lib/src/native_response_handler.dart | 0 .../lib/src/native_response_wrapper.dart | 0 .../lib/src/path_parameters.dart | 0 .../lib/src/query_parameters.dart | 0 .../lib/src/request_adapter.dart | 0 .../lib/src/request_configuration.dart | 0 .../lib/src/request_information.dart | 0 .../lib/src/request_option.dart | 0 .../lib/src/response_handler.dart | 0 .../lib/src/response_handler_option.dart | 0 .../serialization/additional_data_holder.dart | 0 .../lib/src/serialization/parsable.dart | 0 .../src/serialization/parsable_factory.dart | 0 .../lib/src/serialization/parsable_hook.dart | 0 .../lib/src/serialization/parse_node.dart | 0 .../src/serialization/parse_node_factory.dart | 0 .../parse_node_factory_registry.dart | 0 .../parse_node_proxy_factory.dart | 0 .../serialization/serialization_writer.dart | 0 .../serialization_writer_factory.dart | 0 ...serialization_writer_factory_registry.dart | 0 .../serialization_writer_proxy_factory.dart | 0 .../lib/src/store/backed_model.dart | 0 .../lib/src/store/backing_store.dart | 0 .../lib/src/store/backing_store_factory.dart | 0 .../backing_store_factory_singleton.dart | 0 .../backing_store_parse_node_factory.dart | 0 ...re_serialization_writer_proxy_factory.dart | 0 .../backing_store_subscription_callback.dart | 0 .../src/store/in_memory_backing_store.dart | 0 .../in_memory_backing_store_factory.dart | 0 .../lib/src/time_only.dart | 0 .../pubspec.yaml | 6 +++--- .../allowed_hosts_validator_test.dart | 0 .../api_key_authentication_provider_test.dart | 0 ...er_token_authentication_provider_test.dart | 0 ...en_authentication_provider_test.mocks.dart | 0 .../test/date_only_test.dart | 0 .../test/http_headers_test.dart | 0 .../test/multipart_body_test.dart | 0 .../test/request_builder_test.dart | 0 .../test/request_builder_test.mocks.dart | 0 .../test/request_information_test.dart | 0 .../test/request_information_test.mocks.dart | 0 .../store/in_memory_backing_store_test.dart | 0 .../in_memory_backing_store_test.mocks.dart | 0 .../test/time_only_test.dart | 0 packages/kiota_http/README.md | 21 +++++++++++++++++++ .../{http_client => kiota_http}/pubspec.yaml | 7 ++++--- .../test/dummy_test.dart | 0 77 files changed, 32 insertions(+), 30 deletions(-) delete mode 100644 packages/http_client/README.md rename packages/{abstractions => kiota_abstractions}/CHANGELOG.md (100%) rename packages/{abstractions => kiota_abstractions}/README.md (83%) rename packages/{abstractions => kiota_abstractions}/analysis_options.yaml (100%) rename packages/{abstractions => kiota_abstractions}/lib/kiota_abstractions.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/api_client_builder.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/api_exception.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/authentication/access_token_provider.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/authentication/allowed_hosts_validator.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/authentication/anonymous_authentication_provider.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/authentication/api_key_authentication_provider.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/authentication/api_key_location.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/authentication/authentication_provider.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/authentication/base_bearer_token_authentication_provider.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/base_request_builder.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/case_insensitive_map.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/date_only.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/error_mappings.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/extensions/base_request_builder_extensions.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/extensions/date_only_extensions.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/extensions/map_extensions.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/extensions/request_information_extensions.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/extensions/time_only_extensions.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/http_headers.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/http_method.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/multipart_body.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/native_response_handler.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/native_response_wrapper.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/path_parameters.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/query_parameters.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/request_adapter.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/request_configuration.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/request_information.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/request_option.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/response_handler.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/response_handler_option.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/additional_data_holder.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/parsable.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/parsable_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/parsable_hook.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/parse_node.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/parse_node_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/parse_node_factory_registry.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/parse_node_proxy_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/serialization_writer.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/serialization_writer_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/serialization_writer_factory_registry.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/serialization/serialization_writer_proxy_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/backed_model.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/backing_store.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/backing_store_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/backing_store_factory_singleton.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/backing_store_parse_node_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/backing_store_serialization_writer_proxy_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/backing_store_subscription_callback.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/in_memory_backing_store.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/store/in_memory_backing_store_factory.dart (100%) rename packages/{abstractions => kiota_abstractions}/lib/src/time_only.dart (100%) rename packages/{abstractions => kiota_abstractions}/pubspec.yaml (81%) rename packages/{abstractions => kiota_abstractions}/test/authentication/allowed_hosts_validator_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/authentication/api_key_authentication_provider_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/authentication/base_bearer_token_authentication_provider_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/date_only_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/http_headers_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/multipart_body_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/request_builder_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/request_builder_test.mocks.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/request_information_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/request_information_test.mocks.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/store/in_memory_backing_store_test.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/store/in_memory_backing_store_test.mocks.dart (100%) rename packages/{abstractions => kiota_abstractions}/test/time_only_test.dart (100%) create mode 100644 packages/kiota_http/README.md rename packages/{http_client => kiota_http}/pubspec.yaml (78%) rename packages/{http_client => kiota_http}/test/dummy_test.dart (100%) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 70d70fd..8e04434 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - package: ['abstractions', 'http_client'] + package: ['kiota_abstractions', 'kiota_http'] name: '${{ matrix.package }}: Analyze & Test' runs-on: ubuntu-latest @@ -42,7 +42,7 @@ jobs: working-directory: packages/${{ matrix.package }} - name: Run build_runner - if: contains(fromJson('[ "abstractions" ]'), matrix.package) + if: contains(fromJson('[ "kiota_abstractions" ]'), matrix.package) run: dart run build_runner build --delete-conflicting-outputs working-directory: packages/${{ matrix.package }} diff --git a/packages/http_client/README.md b/packages/http_client/README.md deleted file mode 100644 index 8444326..0000000 --- a/packages/http_client/README.md +++ /dev/null @@ -1,20 +0,0 @@ -The `kiota_http_client` package implements a HTTP client for generated Kiota clients. - -## Usage - -Install the package in the generated project: - -> For now, you can add the git repository as a dependency in your `pubspec.yaml` file: -> -> ```yaml -> dependencies: -> kiota_http_client: -> git: -> url: https://github.com/ricardoboss/dart_kiota_abstractions.git -> ref: main -> path: packages/http_client -> ``` - -```bash -dart pub add kiota_http_client -``` diff --git a/packages/abstractions/CHANGELOG.md b/packages/kiota_abstractions/CHANGELOG.md similarity index 100% rename from packages/abstractions/CHANGELOG.md rename to packages/kiota_abstractions/CHANGELOG.md diff --git a/packages/abstractions/README.md b/packages/kiota_abstractions/README.md similarity index 83% rename from packages/abstractions/README.md rename to packages/kiota_abstractions/README.md index 9837f2d..bdc728a 100644 --- a/packages/abstractions/README.md +++ b/packages/kiota_abstractions/README.md @@ -14,9 +14,9 @@ Install the package in the generated project: > dependencies: > kiota_abstractions: > git: -> url: https://github.com/ricardoboss/dart_kiota_abstractions.git +> url: https://github.com/ricardoboss/dart_kiota.git > ref: main -> path: packages/abstractions +> path: packages/kiota_abstractions > ``` ```bash diff --git a/packages/abstractions/analysis_options.yaml b/packages/kiota_abstractions/analysis_options.yaml similarity index 100% rename from packages/abstractions/analysis_options.yaml rename to packages/kiota_abstractions/analysis_options.yaml diff --git a/packages/abstractions/lib/kiota_abstractions.dart b/packages/kiota_abstractions/lib/kiota_abstractions.dart similarity index 100% rename from packages/abstractions/lib/kiota_abstractions.dart rename to packages/kiota_abstractions/lib/kiota_abstractions.dart diff --git a/packages/abstractions/lib/src/api_client_builder.dart b/packages/kiota_abstractions/lib/src/api_client_builder.dart similarity index 100% rename from packages/abstractions/lib/src/api_client_builder.dart rename to packages/kiota_abstractions/lib/src/api_client_builder.dart diff --git a/packages/abstractions/lib/src/api_exception.dart b/packages/kiota_abstractions/lib/src/api_exception.dart similarity index 100% rename from packages/abstractions/lib/src/api_exception.dart rename to packages/kiota_abstractions/lib/src/api_exception.dart diff --git a/packages/abstractions/lib/src/authentication/access_token_provider.dart b/packages/kiota_abstractions/lib/src/authentication/access_token_provider.dart similarity index 100% rename from packages/abstractions/lib/src/authentication/access_token_provider.dart rename to packages/kiota_abstractions/lib/src/authentication/access_token_provider.dart diff --git a/packages/abstractions/lib/src/authentication/allowed_hosts_validator.dart b/packages/kiota_abstractions/lib/src/authentication/allowed_hosts_validator.dart similarity index 100% rename from packages/abstractions/lib/src/authentication/allowed_hosts_validator.dart rename to packages/kiota_abstractions/lib/src/authentication/allowed_hosts_validator.dart diff --git a/packages/abstractions/lib/src/authentication/anonymous_authentication_provider.dart b/packages/kiota_abstractions/lib/src/authentication/anonymous_authentication_provider.dart similarity index 100% rename from packages/abstractions/lib/src/authentication/anonymous_authentication_provider.dart rename to packages/kiota_abstractions/lib/src/authentication/anonymous_authentication_provider.dart diff --git a/packages/abstractions/lib/src/authentication/api_key_authentication_provider.dart b/packages/kiota_abstractions/lib/src/authentication/api_key_authentication_provider.dart similarity index 100% rename from packages/abstractions/lib/src/authentication/api_key_authentication_provider.dart rename to packages/kiota_abstractions/lib/src/authentication/api_key_authentication_provider.dart diff --git a/packages/abstractions/lib/src/authentication/api_key_location.dart b/packages/kiota_abstractions/lib/src/authentication/api_key_location.dart similarity index 100% rename from packages/abstractions/lib/src/authentication/api_key_location.dart rename to packages/kiota_abstractions/lib/src/authentication/api_key_location.dart diff --git a/packages/abstractions/lib/src/authentication/authentication_provider.dart b/packages/kiota_abstractions/lib/src/authentication/authentication_provider.dart similarity index 100% rename from packages/abstractions/lib/src/authentication/authentication_provider.dart rename to packages/kiota_abstractions/lib/src/authentication/authentication_provider.dart diff --git a/packages/abstractions/lib/src/authentication/base_bearer_token_authentication_provider.dart b/packages/kiota_abstractions/lib/src/authentication/base_bearer_token_authentication_provider.dart similarity index 100% rename from packages/abstractions/lib/src/authentication/base_bearer_token_authentication_provider.dart rename to packages/kiota_abstractions/lib/src/authentication/base_bearer_token_authentication_provider.dart diff --git a/packages/abstractions/lib/src/base_request_builder.dart b/packages/kiota_abstractions/lib/src/base_request_builder.dart similarity index 100% rename from packages/abstractions/lib/src/base_request_builder.dart rename to packages/kiota_abstractions/lib/src/base_request_builder.dart diff --git a/packages/abstractions/lib/src/case_insensitive_map.dart b/packages/kiota_abstractions/lib/src/case_insensitive_map.dart similarity index 100% rename from packages/abstractions/lib/src/case_insensitive_map.dart rename to packages/kiota_abstractions/lib/src/case_insensitive_map.dart diff --git a/packages/abstractions/lib/src/date_only.dart b/packages/kiota_abstractions/lib/src/date_only.dart similarity index 100% rename from packages/abstractions/lib/src/date_only.dart rename to packages/kiota_abstractions/lib/src/date_only.dart diff --git a/packages/abstractions/lib/src/error_mappings.dart b/packages/kiota_abstractions/lib/src/error_mappings.dart similarity index 100% rename from packages/abstractions/lib/src/error_mappings.dart rename to packages/kiota_abstractions/lib/src/error_mappings.dart diff --git a/packages/abstractions/lib/src/extensions/base_request_builder_extensions.dart b/packages/kiota_abstractions/lib/src/extensions/base_request_builder_extensions.dart similarity index 100% rename from packages/abstractions/lib/src/extensions/base_request_builder_extensions.dart rename to packages/kiota_abstractions/lib/src/extensions/base_request_builder_extensions.dart diff --git a/packages/abstractions/lib/src/extensions/date_only_extensions.dart b/packages/kiota_abstractions/lib/src/extensions/date_only_extensions.dart similarity index 100% rename from packages/abstractions/lib/src/extensions/date_only_extensions.dart rename to packages/kiota_abstractions/lib/src/extensions/date_only_extensions.dart diff --git a/packages/abstractions/lib/src/extensions/map_extensions.dart b/packages/kiota_abstractions/lib/src/extensions/map_extensions.dart similarity index 100% rename from packages/abstractions/lib/src/extensions/map_extensions.dart rename to packages/kiota_abstractions/lib/src/extensions/map_extensions.dart diff --git a/packages/abstractions/lib/src/extensions/request_information_extensions.dart b/packages/kiota_abstractions/lib/src/extensions/request_information_extensions.dart similarity index 100% rename from packages/abstractions/lib/src/extensions/request_information_extensions.dart rename to packages/kiota_abstractions/lib/src/extensions/request_information_extensions.dart diff --git a/packages/abstractions/lib/src/extensions/time_only_extensions.dart b/packages/kiota_abstractions/lib/src/extensions/time_only_extensions.dart similarity index 100% rename from packages/abstractions/lib/src/extensions/time_only_extensions.dart rename to packages/kiota_abstractions/lib/src/extensions/time_only_extensions.dart diff --git a/packages/abstractions/lib/src/http_headers.dart b/packages/kiota_abstractions/lib/src/http_headers.dart similarity index 100% rename from packages/abstractions/lib/src/http_headers.dart rename to packages/kiota_abstractions/lib/src/http_headers.dart diff --git a/packages/abstractions/lib/src/http_method.dart b/packages/kiota_abstractions/lib/src/http_method.dart similarity index 100% rename from packages/abstractions/lib/src/http_method.dart rename to packages/kiota_abstractions/lib/src/http_method.dart diff --git a/packages/abstractions/lib/src/multipart_body.dart b/packages/kiota_abstractions/lib/src/multipart_body.dart similarity index 100% rename from packages/abstractions/lib/src/multipart_body.dart rename to packages/kiota_abstractions/lib/src/multipart_body.dart diff --git a/packages/abstractions/lib/src/native_response_handler.dart b/packages/kiota_abstractions/lib/src/native_response_handler.dart similarity index 100% rename from packages/abstractions/lib/src/native_response_handler.dart rename to packages/kiota_abstractions/lib/src/native_response_handler.dart diff --git a/packages/abstractions/lib/src/native_response_wrapper.dart b/packages/kiota_abstractions/lib/src/native_response_wrapper.dart similarity index 100% rename from packages/abstractions/lib/src/native_response_wrapper.dart rename to packages/kiota_abstractions/lib/src/native_response_wrapper.dart diff --git a/packages/abstractions/lib/src/path_parameters.dart b/packages/kiota_abstractions/lib/src/path_parameters.dart similarity index 100% rename from packages/abstractions/lib/src/path_parameters.dart rename to packages/kiota_abstractions/lib/src/path_parameters.dart diff --git a/packages/abstractions/lib/src/query_parameters.dart b/packages/kiota_abstractions/lib/src/query_parameters.dart similarity index 100% rename from packages/abstractions/lib/src/query_parameters.dart rename to packages/kiota_abstractions/lib/src/query_parameters.dart diff --git a/packages/abstractions/lib/src/request_adapter.dart b/packages/kiota_abstractions/lib/src/request_adapter.dart similarity index 100% rename from packages/abstractions/lib/src/request_adapter.dart rename to packages/kiota_abstractions/lib/src/request_adapter.dart diff --git a/packages/abstractions/lib/src/request_configuration.dart b/packages/kiota_abstractions/lib/src/request_configuration.dart similarity index 100% rename from packages/abstractions/lib/src/request_configuration.dart rename to packages/kiota_abstractions/lib/src/request_configuration.dart diff --git a/packages/abstractions/lib/src/request_information.dart b/packages/kiota_abstractions/lib/src/request_information.dart similarity index 100% rename from packages/abstractions/lib/src/request_information.dart rename to packages/kiota_abstractions/lib/src/request_information.dart diff --git a/packages/abstractions/lib/src/request_option.dart b/packages/kiota_abstractions/lib/src/request_option.dart similarity index 100% rename from packages/abstractions/lib/src/request_option.dart rename to packages/kiota_abstractions/lib/src/request_option.dart diff --git a/packages/abstractions/lib/src/response_handler.dart b/packages/kiota_abstractions/lib/src/response_handler.dart similarity index 100% rename from packages/abstractions/lib/src/response_handler.dart rename to packages/kiota_abstractions/lib/src/response_handler.dart diff --git a/packages/abstractions/lib/src/response_handler_option.dart b/packages/kiota_abstractions/lib/src/response_handler_option.dart similarity index 100% rename from packages/abstractions/lib/src/response_handler_option.dart rename to packages/kiota_abstractions/lib/src/response_handler_option.dart diff --git a/packages/abstractions/lib/src/serialization/additional_data_holder.dart b/packages/kiota_abstractions/lib/src/serialization/additional_data_holder.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/additional_data_holder.dart rename to packages/kiota_abstractions/lib/src/serialization/additional_data_holder.dart diff --git a/packages/abstractions/lib/src/serialization/parsable.dart b/packages/kiota_abstractions/lib/src/serialization/parsable.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/parsable.dart rename to packages/kiota_abstractions/lib/src/serialization/parsable.dart diff --git a/packages/abstractions/lib/src/serialization/parsable_factory.dart b/packages/kiota_abstractions/lib/src/serialization/parsable_factory.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/parsable_factory.dart rename to packages/kiota_abstractions/lib/src/serialization/parsable_factory.dart diff --git a/packages/abstractions/lib/src/serialization/parsable_hook.dart b/packages/kiota_abstractions/lib/src/serialization/parsable_hook.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/parsable_hook.dart rename to packages/kiota_abstractions/lib/src/serialization/parsable_hook.dart diff --git a/packages/abstractions/lib/src/serialization/parse_node.dart b/packages/kiota_abstractions/lib/src/serialization/parse_node.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/parse_node.dart rename to packages/kiota_abstractions/lib/src/serialization/parse_node.dart diff --git a/packages/abstractions/lib/src/serialization/parse_node_factory.dart b/packages/kiota_abstractions/lib/src/serialization/parse_node_factory.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/parse_node_factory.dart rename to packages/kiota_abstractions/lib/src/serialization/parse_node_factory.dart diff --git a/packages/abstractions/lib/src/serialization/parse_node_factory_registry.dart b/packages/kiota_abstractions/lib/src/serialization/parse_node_factory_registry.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/parse_node_factory_registry.dart rename to packages/kiota_abstractions/lib/src/serialization/parse_node_factory_registry.dart diff --git a/packages/abstractions/lib/src/serialization/parse_node_proxy_factory.dart b/packages/kiota_abstractions/lib/src/serialization/parse_node_proxy_factory.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/parse_node_proxy_factory.dart rename to packages/kiota_abstractions/lib/src/serialization/parse_node_proxy_factory.dart diff --git a/packages/abstractions/lib/src/serialization/serialization_writer.dart b/packages/kiota_abstractions/lib/src/serialization/serialization_writer.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/serialization_writer.dart rename to packages/kiota_abstractions/lib/src/serialization/serialization_writer.dart diff --git a/packages/abstractions/lib/src/serialization/serialization_writer_factory.dart b/packages/kiota_abstractions/lib/src/serialization/serialization_writer_factory.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/serialization_writer_factory.dart rename to packages/kiota_abstractions/lib/src/serialization/serialization_writer_factory.dart diff --git a/packages/abstractions/lib/src/serialization/serialization_writer_factory_registry.dart b/packages/kiota_abstractions/lib/src/serialization/serialization_writer_factory_registry.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/serialization_writer_factory_registry.dart rename to packages/kiota_abstractions/lib/src/serialization/serialization_writer_factory_registry.dart diff --git a/packages/abstractions/lib/src/serialization/serialization_writer_proxy_factory.dart b/packages/kiota_abstractions/lib/src/serialization/serialization_writer_proxy_factory.dart similarity index 100% rename from packages/abstractions/lib/src/serialization/serialization_writer_proxy_factory.dart rename to packages/kiota_abstractions/lib/src/serialization/serialization_writer_proxy_factory.dart diff --git a/packages/abstractions/lib/src/store/backed_model.dart b/packages/kiota_abstractions/lib/src/store/backed_model.dart similarity index 100% rename from packages/abstractions/lib/src/store/backed_model.dart rename to packages/kiota_abstractions/lib/src/store/backed_model.dart diff --git a/packages/abstractions/lib/src/store/backing_store.dart b/packages/kiota_abstractions/lib/src/store/backing_store.dart similarity index 100% rename from packages/abstractions/lib/src/store/backing_store.dart rename to packages/kiota_abstractions/lib/src/store/backing_store.dart diff --git a/packages/abstractions/lib/src/store/backing_store_factory.dart b/packages/kiota_abstractions/lib/src/store/backing_store_factory.dart similarity index 100% rename from packages/abstractions/lib/src/store/backing_store_factory.dart rename to packages/kiota_abstractions/lib/src/store/backing_store_factory.dart diff --git a/packages/abstractions/lib/src/store/backing_store_factory_singleton.dart b/packages/kiota_abstractions/lib/src/store/backing_store_factory_singleton.dart similarity index 100% rename from packages/abstractions/lib/src/store/backing_store_factory_singleton.dart rename to packages/kiota_abstractions/lib/src/store/backing_store_factory_singleton.dart diff --git a/packages/abstractions/lib/src/store/backing_store_parse_node_factory.dart b/packages/kiota_abstractions/lib/src/store/backing_store_parse_node_factory.dart similarity index 100% rename from packages/abstractions/lib/src/store/backing_store_parse_node_factory.dart rename to packages/kiota_abstractions/lib/src/store/backing_store_parse_node_factory.dart diff --git a/packages/abstractions/lib/src/store/backing_store_serialization_writer_proxy_factory.dart b/packages/kiota_abstractions/lib/src/store/backing_store_serialization_writer_proxy_factory.dart similarity index 100% rename from packages/abstractions/lib/src/store/backing_store_serialization_writer_proxy_factory.dart rename to packages/kiota_abstractions/lib/src/store/backing_store_serialization_writer_proxy_factory.dart diff --git a/packages/abstractions/lib/src/store/backing_store_subscription_callback.dart b/packages/kiota_abstractions/lib/src/store/backing_store_subscription_callback.dart similarity index 100% rename from packages/abstractions/lib/src/store/backing_store_subscription_callback.dart rename to packages/kiota_abstractions/lib/src/store/backing_store_subscription_callback.dart diff --git a/packages/abstractions/lib/src/store/in_memory_backing_store.dart b/packages/kiota_abstractions/lib/src/store/in_memory_backing_store.dart similarity index 100% rename from packages/abstractions/lib/src/store/in_memory_backing_store.dart rename to packages/kiota_abstractions/lib/src/store/in_memory_backing_store.dart diff --git a/packages/abstractions/lib/src/store/in_memory_backing_store_factory.dart b/packages/kiota_abstractions/lib/src/store/in_memory_backing_store_factory.dart similarity index 100% rename from packages/abstractions/lib/src/store/in_memory_backing_store_factory.dart rename to packages/kiota_abstractions/lib/src/store/in_memory_backing_store_factory.dart diff --git a/packages/abstractions/lib/src/time_only.dart b/packages/kiota_abstractions/lib/src/time_only.dart similarity index 100% rename from packages/abstractions/lib/src/time_only.dart rename to packages/kiota_abstractions/lib/src/time_only.dart diff --git a/packages/abstractions/pubspec.yaml b/packages/kiota_abstractions/pubspec.yaml similarity index 81% rename from packages/abstractions/pubspec.yaml rename to packages/kiota_abstractions/pubspec.yaml index b342896..230dad5 100644 --- a/packages/abstractions/pubspec.yaml +++ b/packages/kiota_abstractions/pubspec.yaml @@ -1,7 +1,7 @@ name: kiota_abstractions description: "Kiota abstractions for Dart" version: 0.0.1-pre.1 -homepage: https://github.com/ricardoboss/dart_kiota_abstractions/tree/main/packages/abstractions +homepage: https://github.com/ricardoboss/dart_kiota_abstractions/tree/main/packages/kiota_abstractions publish_to: 'none' topics: @@ -14,11 +14,11 @@ environment: sdk: '>=3.2.6 <4.0.0' dependencies: - std_uritemplate: ^0.0.52 + std_uritemplate: ^0.0.55 uuid: ^4.3.3 dev_dependencies: strict: ^2.0.0 - test: ^1.25.0 + test: ^1.25.2 mockito: ^5.4.4 build_runner: ^2.4.8 diff --git a/packages/abstractions/test/authentication/allowed_hosts_validator_test.dart b/packages/kiota_abstractions/test/authentication/allowed_hosts_validator_test.dart similarity index 100% rename from packages/abstractions/test/authentication/allowed_hosts_validator_test.dart rename to packages/kiota_abstractions/test/authentication/allowed_hosts_validator_test.dart diff --git a/packages/abstractions/test/authentication/api_key_authentication_provider_test.dart b/packages/kiota_abstractions/test/authentication/api_key_authentication_provider_test.dart similarity index 100% rename from packages/abstractions/test/authentication/api_key_authentication_provider_test.dart rename to packages/kiota_abstractions/test/authentication/api_key_authentication_provider_test.dart diff --git a/packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.dart b/packages/kiota_abstractions/test/authentication/base_bearer_token_authentication_provider_test.dart similarity index 100% rename from packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.dart rename to packages/kiota_abstractions/test/authentication/base_bearer_token_authentication_provider_test.dart diff --git a/packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart b/packages/kiota_abstractions/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart similarity index 100% rename from packages/abstractions/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart rename to packages/kiota_abstractions/test/authentication/base_bearer_token_authentication_provider_test.mocks.dart diff --git a/packages/abstractions/test/date_only_test.dart b/packages/kiota_abstractions/test/date_only_test.dart similarity index 100% rename from packages/abstractions/test/date_only_test.dart rename to packages/kiota_abstractions/test/date_only_test.dart diff --git a/packages/abstractions/test/http_headers_test.dart b/packages/kiota_abstractions/test/http_headers_test.dart similarity index 100% rename from packages/abstractions/test/http_headers_test.dart rename to packages/kiota_abstractions/test/http_headers_test.dart diff --git a/packages/abstractions/test/multipart_body_test.dart b/packages/kiota_abstractions/test/multipart_body_test.dart similarity index 100% rename from packages/abstractions/test/multipart_body_test.dart rename to packages/kiota_abstractions/test/multipart_body_test.dart diff --git a/packages/abstractions/test/request_builder_test.dart b/packages/kiota_abstractions/test/request_builder_test.dart similarity index 100% rename from packages/abstractions/test/request_builder_test.dart rename to packages/kiota_abstractions/test/request_builder_test.dart diff --git a/packages/abstractions/test/request_builder_test.mocks.dart b/packages/kiota_abstractions/test/request_builder_test.mocks.dart similarity index 100% rename from packages/abstractions/test/request_builder_test.mocks.dart rename to packages/kiota_abstractions/test/request_builder_test.mocks.dart diff --git a/packages/abstractions/test/request_information_test.dart b/packages/kiota_abstractions/test/request_information_test.dart similarity index 100% rename from packages/abstractions/test/request_information_test.dart rename to packages/kiota_abstractions/test/request_information_test.dart diff --git a/packages/abstractions/test/request_information_test.mocks.dart b/packages/kiota_abstractions/test/request_information_test.mocks.dart similarity index 100% rename from packages/abstractions/test/request_information_test.mocks.dart rename to packages/kiota_abstractions/test/request_information_test.mocks.dart diff --git a/packages/abstractions/test/store/in_memory_backing_store_test.dart b/packages/kiota_abstractions/test/store/in_memory_backing_store_test.dart similarity index 100% rename from packages/abstractions/test/store/in_memory_backing_store_test.dart rename to packages/kiota_abstractions/test/store/in_memory_backing_store_test.dart diff --git a/packages/abstractions/test/store/in_memory_backing_store_test.mocks.dart b/packages/kiota_abstractions/test/store/in_memory_backing_store_test.mocks.dart similarity index 100% rename from packages/abstractions/test/store/in_memory_backing_store_test.mocks.dart rename to packages/kiota_abstractions/test/store/in_memory_backing_store_test.mocks.dart diff --git a/packages/abstractions/test/time_only_test.dart b/packages/kiota_abstractions/test/time_only_test.dart similarity index 100% rename from packages/abstractions/test/time_only_test.dart rename to packages/kiota_abstractions/test/time_only_test.dart diff --git a/packages/kiota_http/README.md b/packages/kiota_http/README.md new file mode 100644 index 0000000..c9dfa54 --- /dev/null +++ b/packages/kiota_http/README.md @@ -0,0 +1,21 @@ +The `kiota_http` package implements a HTTP client for generated Kiota clients using the +[`http`](https://pub.dev/packages/http) package. + +## Usage + +Install the package in the generated project: + +> For now, you can add the git repository as a dependency in your `pubspec.yaml` file: +> +> ```yaml +> dependencies: +> kiota_http_client: +> git: +> url: https://github.com/ricardoboss/dart_kiota.git +> ref: main +> path: packages/kiota_http +> ``` + +```bash +dart pub add kiota_http +``` diff --git a/packages/http_client/pubspec.yaml b/packages/kiota_http/pubspec.yaml similarity index 78% rename from packages/http_client/pubspec.yaml rename to packages/kiota_http/pubspec.yaml index 88a8cab..5f5fcc2 100644 --- a/packages/http_client/pubspec.yaml +++ b/packages/kiota_http/pubspec.yaml @@ -1,7 +1,7 @@ -name: kiota_http_client +name: kiota_http description: "Kiota http client for Dart" version: 0.0.1-pre.1 -homepage: https://github.com/ricardoboss/dart_kiota_abstractions/tree/main/packages/http_client +homepage: https://github.com/ricardoboss/dart_kiota_abstractions/tree/main/packages/kiota_http publish_to: 'none' environment: @@ -9,8 +9,9 @@ environment: dependencies: kiota_abstractions: - path: ../abstractions + path: ../kiota_abstractions http: ^1.2.1 http_parser: ^4.0.2 + dev_dependencies: test: ^1.25.2 diff --git a/packages/http_client/test/dummy_test.dart b/packages/kiota_http/test/dummy_test.dart similarity index 100% rename from packages/http_client/test/dummy_test.dart rename to packages/kiota_http/test/dummy_test.dart