From 09e6f9bd972ce8de084144a85d50e21e0f9d0c53 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sun, 18 Dec 2022 21:36:34 +0800 Subject: [PATCH] To `diox` (#37) --- .github/FUNDING.yml | 12 ------ .github/PULL_REQUEST_TEMPLATE.md | 19 +++++---- .github/stale.yml | 29 -------------- .github/workflows/test-report.yml | 37 ----------------- README-ZH.md | 12 +++--- README.md | 12 +++--- dio/CHANGELOG.md | 4 +- dio/README-ZH.md | 34 ++++++++-------- dio/README.md | 18 ++++----- dio/example/dio.dart | 4 +- dio/lib/src/parameter.dart | 2 +- .../browser_progress_stream.dart | 2 +- .../progress_stream/io_progress_stream.dart | 2 +- dio/pubspec.yaml | 5 ++- dio/test/basic_test.dart | 2 +- dio/test/dio_mixin_test.dart | 2 +- dio/test/download_test.dart | 2 +- dio/test/encoding_test.dart | 2 +- dio/test/exception_test.dart | 4 +- dio/test/formdata_test.dart | 3 +- dio/test/interceptor_test.dart | 2 +- dio/test/mimetype_test.dart | 2 +- dio/test/mock/adapters.dart | 4 +- dio/test/options_test.dart | 2 +- dio/test/pinning_test.dart | 4 +- dio/test/readtimeout_test.dart | 4 +- dio/test/request_test.dart | 2 +- dio/test/upload_stream_test.dart | 2 +- example/lib/adapter.dart | 3 +- example/lib/cancel_request.dart | 3 +- example/lib/certificate_pinning.dart | 7 ++-- example/lib/cookie_mgr.dart | 4 +- example/lib/custom_cache_interceptor.dart | 2 +- example/lib/dio.dart | 3 +- example/lib/download.dart | 3 +- example/lib/download_with_trunks.dart | 3 +- example/lib/extend_dio.dart | 4 +- example/lib/formdata.dart | 4 +- example/lib/generic.dart | 2 +- example/lib/http2_adapter.dart | 4 +- example/lib/options.dart | 3 +- example/lib/post_stream_and_bytes.dart | 2 +- example/lib/proxy.dart | 5 ++- example/lib/queue_interceptors.dart | 2 +- example/lib/queued_interceptor_crsftoken.dart | 2 +- example/lib/request_interceptors.dart | 2 +- example/lib/response_interceptor.dart | 2 +- example/lib/test.dart | 2 +- example/lib/transformer.dart | 3 +- example/pubspec.yaml | 12 +++--- example/test/example_test.dart | 40 +++++++++---------- example_flutter_app/lib/http.dart | 2 +- example_flutter_app/lib/main.dart | 2 +- example_flutter_app/lib/routes/request.dart | 3 +- example_flutter_app/pubspec.yaml | 2 +- plugins/cookie_manager/README.md | 14 +++---- plugins/cookie_manager/example/example.dart | 4 +- .../cookie_manager/lib/src/cookie_mgr.dart | 2 +- plugins/cookie_manager/pubspec.yaml | 11 +++-- plugins/cookie_manager/test/basic_test.dart | 4 +- plugins/http2_adapter/README.md | 12 +++--- plugins/http2_adapter/example/example.dart | 4 +- .../http2_adapter/lib/src/http2_adapter.dart | 2 +- plugins/http2_adapter/pubspec.yaml | 10 ++--- plugins/http2_adapter/test/http2_test.dart | 4 +- 65 files changed, 178 insertions(+), 244 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/stale.yml delete mode 100644 .github/workflows/test-report.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 00a13278b..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: ['https://paypal.me/wendux91','https://camo.githubusercontent.com/3442fb56bdedc11300c23d958a2f62e813adae4903bd714fe852232623bb97c6/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f666c75747465726368696e612f666c75747465722d696e2d616374696f6e40312e302e332f646f63732f696d67732f7061792e6a706567'] diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 99914eba4..7f158db0b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,15 +1,14 @@ + + ### New Pull Request Checklist -- [ ] I have read the [Documentation](https://pub.dartlang.org/packages/dio) -- [ ] I have searched for a similar pull request in the [project](https://github.com/flutterchina/dio/pulls) and found none -- [ ] I have updated this branch with the latest `develop` to avoid conflicts (via merge from master or rebase) -- [ ] I have added the required tests to prove the fix/feature I am adding +- [ ] I have read the [Documentation](https://pub.dev/documentation/diox/latest/) +- [ ] I have searched for a similar pull request in the [project](https://github.com/cfug/diox/pulls) and found none +- [ ] I have updated this branch with the latest `main` branch to avoid conflicts (via merge from master or rebase) +- [ ] I have added the required tests to prove the fix/feature I'm adding - [ ] I have updated the documentation (if necessary) -- [ ] I have run the tests and they pass - -This merge request fixes / refers to the following issues: ... - -### Pull Request Description +- [ ] I have run the tests without failures -... +### Additional context and info (if any) + diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 470dec312..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 30 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - important - - pinned -# Label to use when marking an issue as stale -staleLabel: stale -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. - If this is still an issue, please make sure it is up to date and if so, - add a comment that this is still an issue to keep it open. - Thank you for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -pulls: - daysUntilStale: 60 - markComment: > - This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. - If this is still applicable, please make sure it is up to date and if so, - add a comment that this is still an issue to keep it open. - Thank you for your contributions. diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml deleted file mode 100644 index a82dbba6c..000000000 --- a/.github/workflows/test-report.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Publish Test Report - -on: - workflow_run: - workflows: - - 'Dio' - - 'Example' - - 'Cookie Manager' - - 'HTTP2 Adapter' - types: - - completed - -jobs: - report: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Download and Extract Artifacts - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - run: | - mkdir -p artifacts && cd artifacts - - artifacts_url=${{ github.event.workflow_run.artifacts_url }} - - gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact - do - IFS=$'\t' read name url <<< "$artifact" - gh api $url > "$name.zip" - unzip -d "$name" "$name.zip" - done - - name: Publish test reports - uses: dorny/test-reporter@v1 - with: - name: ${{ github.event.workflow_run.workflow.name }} Test results - path: 'artifacts/**/test-results.json' - reporter: dart-json diff --git a/README-ZH.md b/README-ZH.md index ee0c86509..6fb3c83c4 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -1,18 +1,18 @@ -# dio +# diox Language: [English](README.md) | 简体中文 -此处是 dio 项目的基础仓库。请前往项目各自的路径查看指引。 +此处是 **diox** 项目的基础仓库。请前往项目各自的路径查看指引。 -- dio: [链接](dio) - [![Pub](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio) +- diox: [链接](dio) + [![Pub](https://img.shields.io/pub/v/diox.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/diox) ### 插件 - cookie_manager: [链接](plugins/cookie_manager) - [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio_cookie_manager) + [![Pub](https://img.shields.io/pub/v/diox_cookie_manager.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/diox_cookie_manager) - http2_adapter: [链接](plugins/http2_adapter) - [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio_http2_adapter) + [![Pub](https://img.shields.io/pub/v/diox_http2_adapter.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/diox_http2_adapter) ### 示例 diff --git a/README.md b/README.md index b3e657081..8736c7a5f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ -# dio +# diox Language: English | [简体中文](README-ZH.md) -This is the base repo of the dio project. +This is the base repo of the **diox** project. Please move specific paths for projects instructions. -- dio: [link](dio) - [![Pub](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio) +- diox: [link](dio) + [![Pub](https://img.shields.io/pub/v/diox.svg?label=dev&include_prereleases)](https://pub.dev/packages/diox) ### Plugins - cookie_manager: [link](plugins/cookie_manager) - [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_cookie_manager) + [![Pub](https://img.shields.io/pub/v/diox_cookie_manager.svg?label=dev&include_prereleases)](https://pub.dev/packages/diox_cookie_manager) - http2_adapter: [link](plugins/http2_adapter) - [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_http2_adapter) + [![Pub](https://img.shields.io/pub/v/diox_http2_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/diox_http2_adapter) ### Examples diff --git a/dio/CHANGELOG.md b/dio/CHANGELOG.md index c14bf5d82..67cf4ba35 100644 --- a/dio/CHANGELOG.md +++ b/dio/CHANGELOG.md @@ -13,8 +13,8 @@ - Improve `DioError`s. There are now more cases in which the inner original stacktrace is supplied. - `HttpClientAdapter` must now be implemented instead of extended. -- Any classes specific to `dart:io` platforms can now be imported via `import 'package:dio/io.dart';`. - Classes specific to web can be imported via `import 'package:dio/browser.dart';`. +- Any classes specific to `dart:io` platforms can now be imported via `import 'package:diox/io.dart';`. + Classes specific to web can be imported via `import 'package:diox/browser.dart';`. - `connectTimeout`, `sendTimeout`, and `receiveTimeout` are now `Duration`s. ## 4.0.6 diff --git a/dio/README-ZH.md b/dio/README-ZH.md index 377782b3b..3f26eaf3e 100644 --- a/dio/README-ZH.md +++ b/dio/README-ZH.md @@ -63,7 +63,7 @@ dependencies: ## 一个极简的示例 ```dart -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; final dio = Dio(); @@ -79,17 +79,17 @@ void getHttp() async { ### 相关插件 -| 仓库 | 最新版本 | 描述 | -|----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| -| [dio_cookie_manager](https://github.com/flutterchina/dio/tree/master/plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.flutter-io.cn/packages/dio_cookie_manager) | Cookie 管理 | -| [dio_http2_adapter](https://github.com/flutterchina/dio/tree/master/plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.flutter-io.cn/packages/dio_http2_adapter) | 支持 HTTP/2 的自定义适配器 | -| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry) | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.flutter-io.cn/packages/dio_smart_retry) | 支持灵活地请求重试 | -| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning) | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.flutter-io.cn/packages/http_certificate_pinning) | 用于 Flutter 的 HTTPS 证书锁定 | -| [curl_logger_dio_interceptor](https://github.com/OwnWeb/curl_logger_dio_interceptor) | [![Pub](https://img.shields.io/pub/v/curl_logger_dio_interceptor.svg)](https://pub.flutter-io.cn/packages/curl_logger_dio_interceptor) | 用于 Flutter 的 CURL 命令生成器 | -| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor) | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg)](https://pub.flutter-io.cn/packages/dio_cache_interceptor) | 具有多个符合 HTTP 指令的 HTTP 缓存拦截器, | -| [dio_http_cache](https://github.com/hurshi/dio-http-cache) | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg)](https://pub.flutter-io.cn/packages/dio_http_cache) | 类似 Android 中的 RxCache 的缓存管理 | -| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger) | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg)](https://pub.flutter-io.cn/packages/pretty_dio_logger) | 基于拦截器的简明易读的请求日志打印 | -| [native_dio_client](https://github.com/ueman/native-dio-client) | [![Pub](https://img.shields.io/pub/v/native_dio_client.svg)](https://pub.flutter-io.cn/packages/native_dio_client) | 使用 cupertino_http 和 cronet_http 以适配器代理实现的原生网络请求功能。 | +| 仓库 | 最新版本 | 描述 | +|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| +| [diox_cookie_manager](https://github.com/cfug/diox/blob/main/plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/diox_cookie_manager.svg)](https://pub.flutter-io.cn/packages/diox_cookie_manager) | Cookie 管理 | +| [diox_http2_adapter](https://github.com/cfug/diox/blob/main/plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/diox_http2_adapter.svg)](https://pub.flutter-io.cn/packages/diox_http2_adapter) | 支持 HTTP/2 的自定义适配器 | +| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry) | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.flutter-io.cn/packages/dio_smart_retry) | 支持灵活地请求重试 | +| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning) | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.flutter-io.cn/packages/http_certificate_pinning) | 用于 Flutter 的 HTTPS 证书锁定 | +| [curl_logger_dio_interceptor](https://github.com/OwnWeb/curl_logger_dio_interceptor) | [![Pub](https://img.shields.io/pub/v/curl_logger_dio_interceptor.svg)](https://pub.flutter-io.cn/packages/curl_logger_dio_interceptor) | 用于 Flutter 的 CURL 命令生成器 | +| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor) | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg)](https://pub.flutter-io.cn/packages/dio_cache_interceptor) | 具有多个符合 HTTP 指令的 HTTP 缓存拦截器, | +| [dio_http_cache](https://github.com/hurshi/dio-http-cache) | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg)](https://pub.flutter-io.cn/packages/dio_http_cache) | 类似 Android 中的 RxCache 的缓存管理 | +| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger) | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg)](https://pub.flutter-io.cn/packages/pretty_dio_logger) | 基于拦截器的简明易读的请求日志打印 | +| [native_dio_client](https://github.com/ueman/native-dio-client) | [![Pub](https://img.shields.io/pub/v/native_dio_client.svg)](https://pub.flutter-io.cn/packages/native_dio_client) | 使用 cupertino_http 和 cronet_http 以适配器代理实现的原生网络请求功能。 | ### 相关的项目 @@ -101,7 +101,7 @@ void getHttp() async { 发起一个 `GET` 请求 : ```dart -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; final dio = Dio(); @@ -398,7 +398,7 @@ dio.interceptors.add( 一个简单的自定义拦截器示例: ```dart -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; class CustomInterceptors extends Interceptor { @override void onRequest(RequestOptions options, RequestInterceptorHandler handler) { @@ -743,7 +743,7 @@ void initAdapter() { ## HTTP/2 支持 -[dio_http2_adapter](../plugins/http2_adapter) 提供了一个支持 HTTP/2 的桥接 。 +[diox_http2_adapter](../plugins/http2_adapter) 提供了一个支持 HTTP/2 的桥接 。 ## 请求取消 @@ -772,8 +772,8 @@ token.cancel('cancelled'); 但是可以继承 `DioForNative` 或 `DioForBrowser`: ```dart -import 'package:dio/dio.dart'; -import 'package:dio/native_imp.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/native_imp.dart'; // 在浏览器中,导入 'package:dio/browser.dart'。 class Http extends DioForNative { diff --git a/dio/README.md b/dio/README.md index 597f205ef..d3cab25c0 100644 --- a/dio/README.md +++ b/dio/README.md @@ -67,7 +67,7 @@ The latest version including pre-releases is: ![Pub](ttps://img.shields.io/pub/v ### Super simple to use ```dart -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; final dio = Dio(); @@ -85,8 +85,8 @@ void getHttp() async { | Repository | Status | Description | |--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| [dio_cookie_manager](../plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.dev/packages/dio_cookie_manager) | A cookie manager for Dio | -| [dio_http2_adapter](../plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.dev/packages/dio_http2_adapter) | A Dio HttpClientAdapter which support Http/2.0 | +| [diox_cookie_manager](../plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/diox_cookie_manager.svg)](https://pub.dev/packages/diox_cookie_manager) | A cookie manager for Dio | +| [diox_http2_adapter](../plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/diox_http2_adapter.svg)](https://pub.dev/packages/diox_http2_adapter) | A Dio HttpClientAdapter which support Http/2.0 | | [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry) | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.dev/packages/dio_smart_retry) | Flexible retry library for Dio | | [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning) | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.dev/packages/http_certificate_pinning) | Https Certificate pinning for Flutter | | [curl_logger_dio_interceptor](https://github.com/OwnWeb/curl_logger_dio_interceptor) | [![Pub](https://img.shields.io/pub/v/curl_logger_dio_interceptor.svg)](https://pub.dev/packages/curl_logger_dio_interceptor) | A Flutter curl-command generator for Dio. | @@ -105,7 +105,7 @@ in [here](https://github.com/flutterchina/dio/issues/347). Performing a `GET` request: ```dart -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; final dio = Dio(); @@ -425,7 +425,7 @@ dio.interceptors.add( Simple interceptor example: ```dart -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; class CustomInterceptors extends Interceptor { @override void onRequest(RequestOptions options, RequestInterceptorHandler handler) { @@ -787,7 +787,7 @@ so it's not recommended to use in common cases. ## HTTP/2 support -[dio_http2_adapter](../plugins/http2_adapter) is a Dio `HttpClientAdapter` +[diox_http2_adapter](../plugins/http2_adapter) is a Dio `HttpClientAdapter` which supports HTTP/2. ## Cancellation @@ -818,9 +818,9 @@ so we don't extend `Dio` class direct. We can extend `DioForNative` or `DioForBrowser` instead, for example: ```dart -import 'package:dio/dio.dart'; -import 'package:dio/io.dart'; -// If in browser, import 'package:dio/browser.dart'. +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; +// If in browser, import 'package:diox/browser.dart'. class Http extends DioForNative { Http([BaseOptions options]) : super(options) { diff --git a/dio/example/dio.dart b/dio/example/dio.dart index 40c6dc285..de27ad4c9 100644 --- a/dio/example/dio.dart +++ b/dio/example/dio.dart @@ -1,6 +1,6 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; -/// More examples see https://github.com/flutterchina/dio/tree/master/example +/// More examples see https://github.com/cfug/diox/blob/main/example void main() async { final dio = Dio(); final response = await dio.get('https://pub.dev'); diff --git a/dio/lib/src/parameter.dart b/dio/lib/src/parameter.dart index e78ed7bc4..8d02eb452 100644 --- a/dio/lib/src/parameter.dart +++ b/dio/lib/src/parameter.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; class ListParam { final ListFormat format; diff --git a/dio/lib/src/progress_stream/browser_progress_stream.dart b/dio/lib/src/progress_stream/browser_progress_stream.dart index 43a4e6f22..f95a15562 100644 --- a/dio/lib/src/progress_stream/browser_progress_stream.dart +++ b/dio/lib/src/progress_stream/browser_progress_stream.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:typed_data'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; Stream addProgress( Stream> stream, diff --git a/dio/lib/src/progress_stream/io_progress_stream.dart b/dio/lib/src/progress_stream/io_progress_stream.dart index 53c1a3aab..aa518f0a0 100644 --- a/dio/lib/src/progress_stream/io_progress_stream.dart +++ b/dio/lib/src/progress_stream/io_progress_stream.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:typed_data'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; Stream addProgress( Stream> stream, diff --git a/dio/pubspec.yaml b/dio/pubspec.yaml index a73a6d3d0..313b6a231 100644 --- a/dio/pubspec.yaml +++ b/dio/pubspec.yaml @@ -1,7 +1,8 @@ -name: dio +name: diox description: A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc. version: 5.0.0-dev.1 -homepage: https://github.com/flutterchina/dio +homepage: https://github.com/cfug/diox +repository: https://github.com/cfug/diox/blob/main/dio environment: sdk: '>=2.13.0 <3.0.0' diff --git a/dio/test/basic_test.dart b/dio/test/basic_test.dart index 00e4d2f0a..e7b83d143 100644 --- a/dio/test/basic_test.dart +++ b/dio/test/basic_test.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; void main() { diff --git a/dio/test/dio_mixin_test.dart b/dio/test/dio_mixin_test.dart index 446ee4985..eef488257 100644 --- a/dio/test/dio_mixin_test.dart +++ b/dio/test/dio_mixin_test.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; void main() { diff --git a/dio/test/download_test.dart b/dio/test/download_test.dart index 49e0905f7..38f25c850 100644 --- a/dio/test/download_test.dart +++ b/dio/test/download_test.dart @@ -5,7 +5,7 @@ @TestOn('vm') import 'dart:io'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; import 'mock/adapters.dart'; diff --git a/dio/test/encoding_test.dart b/dio/test/encoding_test.dart index 32f96e674..ab181ddab 100644 --- a/dio/test/encoding_test.dart +++ b/dio/test/encoding_test.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; void main() { diff --git a/dio/test/exception_test.dart b/dio/test/exception_test.dart index 82a6df936..cf5b19ba7 100644 --- a/dio/test/exception_test.dart +++ b/dio/test/exception_test.dart @@ -1,6 +1,6 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; import 'package:test/test.dart'; -import 'package:dio/io.dart'; void main() { test('catch DioError', () async { diff --git a/dio/test/formdata_test.dart b/dio/test/formdata_test.dart index 9a3312fd2..743c05f2e 100644 --- a/dio/test/formdata_test.dart +++ b/dio/test/formdata_test.dart @@ -4,7 +4,8 @@ @TestOn('vm') import 'dart:convert'; import 'dart:io'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; import 'package:test/test.dart'; void main() async { diff --git a/dio/test/interceptor_test.dart b/dio/test/interceptor_test.dart index 7a51c91c2..f26a33c17 100644 --- a/dio/test/interceptor_test.dart +++ b/dio/test/interceptor_test.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; import 'mock/adapters.dart'; diff --git a/dio/test/mimetype_test.dart b/dio/test/mimetype_test.dart index 5b2fe5e3e..ca4154dbd 100644 --- a/dio/test/mimetype_test.dart +++ b/dio/test/mimetype_test.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; void main() { diff --git a/dio/test/mock/adapters.dart b/dio/test/mock/adapters.dart index b2043df22..f03452833 100644 --- a/dio/test/mock/adapters.dart +++ b/dio/test/mock/adapters.dart @@ -3,8 +3,8 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; -import 'package:dio/dio.dart'; -import 'package:dio/io.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; class MockAdapter implements HttpClientAdapter { static const mockHost = 'mockserver'; diff --git a/dio/test/options_test.dart b/dio/test/options_test.dart index c5a8a86c1..62f407724 100644 --- a/dio/test/options_test.dart +++ b/dio/test/options_test.dart @@ -4,7 +4,7 @@ @TestOn('vm') import 'dart:convert'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; import 'mock/adapters.dart'; diff --git a/dio/test/pinning_test.dart b/dio/test/pinning_test.dart index 626419d70..d06be45ef 100644 --- a/dio/test/pinning_test.dart +++ b/dio/test/pinning_test.dart @@ -2,9 +2,9 @@ import 'dart:io'; import 'package:crypto/crypto.dart'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; import 'package:test/test.dart'; -import 'package:dio/io.dart'; void main() { // NOTE: Run test.sh to download the currrent certs to the file below. diff --git a/dio/test/readtimeout_test.dart b/dio/test/readtimeout_test.dart index 07c12b2aa..aa16eb2db 100644 --- a/dio/test/readtimeout_test.dart +++ b/dio/test/readtimeout_test.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'dart:io'; -import 'package:dio/io.dart'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; import 'package:test/test.dart'; const _sleepDurationAfterConnectionEstablished = Duration(seconds: 5); diff --git a/dio/test/request_test.dart b/dio/test/request_test.dart index 84d309840..fc2eb414f 100644 --- a/dio/test/request_test.dart +++ b/dio/test/request_test.dart @@ -5,7 +5,7 @@ @TestOn('vm') import 'dart:convert'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; import 'utils.dart'; diff --git a/dio/test/upload_stream_test.dart b/dio/test/upload_stream_test.dart index 09d053cf2..347c8294b 100644 --- a/dio/test/upload_stream_test.dart +++ b/dio/test/upload_stream_test.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:test/test.dart'; void main() { diff --git a/example/lib/adapter.dart b/example/lib/adapter.dart index caaa18cd9..e5c34149b 100644 --- a/example/lib/adapter.dart +++ b/example/lib/adapter.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:typed_data'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; class MyAdapter implements HttpClientAdapter { final HttpClientAdapter _adapter = HttpClientAdapter(); diff --git a/example/lib/cancel_request.dart b/example/lib/cancel_request.dart index 5e178a199..a7462f7e8 100644 --- a/example/lib/cancel_request.dart +++ b/example/lib/cancel_request.dart @@ -1,5 +1,6 @@ import 'dart:async'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/certificate_pinning.dart b/example/lib/certificate_pinning.dart index 836eea011..95106956b 100644 --- a/example/lib/certificate_pinning.dart +++ b/example/lib/certificate_pinning.dart @@ -1,7 +1,8 @@ -import 'package:crypto/crypto.dart'; import 'dart:io'; -import 'package:dio/dio.dart'; -import 'package:dio/io.dart'; + +import 'package:crypto/crypto.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/cookie_mgr.dart b/example/lib/cookie_mgr.dart index efe0192e6..560fc43db 100644 --- a/example/lib/cookie_mgr.dart +++ b/example/lib/cookie_mgr.dart @@ -1,6 +1,6 @@ import 'package:cookie_jar/cookie_jar.dart'; -import 'package:dio/dio.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_cookie_manager/dio_cookie_manager.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/custom_cache_interceptor.dart b/example/lib/custom_cache_interceptor.dart index 2c890cf03..1e0813999 100644 --- a/example/lib/custom_cache_interceptor.dart +++ b/example/lib/custom_cache_interceptor.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; class CacheInterceptor extends Interceptor { CacheInterceptor(); diff --git a/example/lib/dio.dart b/example/lib/dio.dart index 9ec5cbf28..3f0274f68 100644 --- a/example/lib/dio.dart +++ b/example/lib/dio.dart @@ -1,5 +1,6 @@ import 'dart:io'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/download.dart b/example/lib/download.dart index a56b9c142..38bddc97c 100644 --- a/example/lib/download.dart +++ b/example/lib/download.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; // In this example we download a image and listen the downloading progress. void main() async { diff --git a/example/lib/download_with_trunks.dart b/example/lib/download_with_trunks.dart index f43af0c2e..3f6c84bf7 100644 --- a/example/lib/download_with_trunks.dart +++ b/example/lib/download_with_trunks.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; void main() async { final url = 'http://download.dcloud.net.cn/HBuilder.9.0.2.macosx_64.dmg'; diff --git a/example/lib/extend_dio.dart b/example/lib/extend_dio.dart index 1e2e2020b..9c2f807e8 100644 --- a/example/lib/extend_dio.dart +++ b/example/lib/extend_dio.dart @@ -1,5 +1,5 @@ -import 'package:dio/dio.dart'; -import 'package:dio/io.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; class HttpService extends DioForNative { HttpService([BaseOptions? baseOptions]) : super(baseOptions) { diff --git a/example/lib/formdata.dart b/example/lib/formdata.dart index 71384bcc3..7f9800906 100644 --- a/example/lib/formdata.dart +++ b/example/lib/formdata.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:dio/io.dart'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; void showProgress(received, total) { if (total != -1) { diff --git a/example/lib/generic.dart b/example/lib/generic.dart index 4106a9107..1177018ca 100644 --- a/example/lib/generic.dart +++ b/example/lib/generic.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; void main() async { final dio = Dio( diff --git a/example/lib/http2_adapter.dart b/example/lib/http2_adapter.dart index 9c5592781..305766c42 100644 --- a/example/lib/http2_adapter.dart +++ b/example/lib/http2_adapter.dart @@ -1,5 +1,5 @@ -import 'package:dio/dio.dart'; -import 'package:dio_http2_adapter/dio_http2_adapter.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_http2_adapter/dio_http2_adapter.dart'; void main() async { final dio = Dio() diff --git a/example/lib/options.dart b/example/lib/options.dart index a5613f7ab..bccb986e9 100644 --- a/example/lib/options.dart +++ b/example/lib/options.dart @@ -1,5 +1,6 @@ import 'dart:io'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; void main() async { final dio = Dio(BaseOptions( diff --git a/example/lib/post_stream_and_bytes.dart b/example/lib/post_stream_and_bytes.dart index c768d449f..d8eea58f4 100644 --- a/example/lib/post_stream_and_bytes.dart +++ b/example/lib/post_stream_and_bytes.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; void main() async { final dio = Dio(BaseOptions( diff --git a/example/lib/proxy.dart b/example/lib/proxy.dart index ca2b25e65..b3b4cf85b 100644 --- a/example/lib/proxy.dart +++ b/example/lib/proxy.dart @@ -1,6 +1,7 @@ import 'dart:io'; -import 'package:dio/dio.dart'; -import 'package:dio/io.dart'; + +import 'package:diox/dio.dart'; +import 'package:diox/io.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/queue_interceptors.dart b/example/lib/queue_interceptors.dart index f00c4f7d1..7075c80ab 100644 --- a/example/lib/queue_interceptors.dart +++ b/example/lib/queue_interceptors.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/queued_interceptor_crsftoken.dart b/example/lib/queued_interceptor_crsftoken.dart index cd4369763..5d9d4d42f 100644 --- a/example/lib/queued_interceptor_crsftoken.dart +++ b/example/lib/queued_interceptor_crsftoken.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:convert'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/request_interceptors.dart b/example/lib/request_interceptors.dart index f08ec6583..1842bcabe 100644 --- a/example/lib/request_interceptors.dart +++ b/example/lib/request_interceptors.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; void main() async { final dio = Dio(); diff --git a/example/lib/response_interceptor.dart b/example/lib/response_interceptor.dart index 91f030e57..b7ec8ef59 100644 --- a/example/lib/response_interceptor.dart +++ b/example/lib/response_interceptor.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; void main() async { const urlNotFound = 'https://wendux.github.io/xxxxx/'; diff --git a/example/lib/test.dart b/example/lib/test.dart index 6efbebcf9..5345700d0 100644 --- a/example/lib/test.dart +++ b/example/lib/test.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; // void getHttp() async { // final dio = Dio(); diff --git a/example/lib/transformer.dart b/example/lib/transformer.dart index adb59788e..9eae2b842 100644 --- a/example/lib/transformer.dart +++ b/example/lib/transformer.dart @@ -1,5 +1,6 @@ import 'dart:async'; -import 'package:dio/dio.dart'; + +import 'package:diox/dio.dart'; /// If the request data is a `List` type, the [DefaultTransformer] will send data /// by calling its `toString()` method. However, normally the List object is diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 3a2e451fa..534039643 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,4 +1,4 @@ -name: dio_example +name: diox_example description: The example snippets for Dio. version: 0.0.1 publish_to: "none" @@ -7,14 +7,16 @@ environment: sdk: ">=2.12.1 <3.0.0" dependencies: - dio: - dio_cookie_manager: + cookie_jar: + crypto: + diox: + diox_cookie_manager: path: ../plugins/cookie_manager - dio_http2_adapter: + diox_http2_adapter: path: ../plugins/http2_adapter dependency_overrides: - dio: + diox: path: ../dio dev_dependencies: diff --git a/example/test/example_test.dart b/example/test/example_test.dart index 34727d53a..a082855ec 100644 --- a/example/test/example_test.dart +++ b/example/test/example_test.dart @@ -1,25 +1,25 @@ // ignore_for_file: unused_import -import 'package:dio_example/adapter.dart'; -import 'package:dio_example/cancel_request.dart'; -import 'package:dio_example/cookie_mgr.dart'; -import 'package:dio_example/custom_cache_interceptor.dart'; -import 'package:dio_example/dio.dart'; -import 'package:dio_example/download.dart'; -import 'package:dio_example/download_with_trunks.dart'; -import 'package:dio_example/extend_dio.dart'; -import 'package:dio_example/formdata.dart'; -import 'package:dio_example/generic.dart'; -import 'package:dio_example/http2_adapter.dart'; -import 'package:dio_example/options.dart'; -import 'package:dio_example/post_stream_and_bytes.dart'; -import 'package:dio_example/proxy.dart'; -import 'package:dio_example/queue_interceptors.dart'; -import 'package:dio_example/queued_interceptor_crsftoken.dart'; -import 'package:dio_example/request_interceptors.dart'; -import 'package:dio_example/response_interceptor.dart'; -import 'package:dio_example/test.dart'; -import 'package:dio_example/transformer.dart'; +import 'package:diox_example/adapter.dart'; +import 'package:diox_example/cancel_request.dart'; +import 'package:diox_example/cookie_mgr.dart'; +import 'package:diox_example/custom_cache_interceptor.dart'; +import 'package:diox_example/dio.dart'; +import 'package:diox_example/download.dart'; +import 'package:diox_example/download_with_trunks.dart'; +import 'package:diox_example/extend_dio.dart'; +import 'package:diox_example/formdata.dart'; +import 'package:diox_example/generic.dart'; +import 'package:diox_example/http2_adapter.dart'; +import 'package:diox_example/options.dart'; +import 'package:diox_example/post_stream_and_bytes.dart'; +import 'package:diox_example/proxy.dart'; +import 'package:diox_example/queue_interceptors.dart'; +import 'package:diox_example/queued_interceptor_crsftoken.dart'; +import 'package:diox_example/request_interceptors.dart'; +import 'package:diox_example/response_interceptor.dart'; +import 'package:diox_example/test.dart'; +import 'package:diox_example/transformer.dart'; import 'package:test/test.dart'; /// This test ensures that all examples are included in the compilation unit diff --git a/example_flutter_app/lib/http.dart b/example_flutter_app/lib/http.dart index 37cd2749b..edeedd567 100644 --- a/example_flutter_app/lib/http.dart +++ b/example_flutter_app/lib/http.dart @@ -1,4 +1,4 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; final dio = Dio(BaseOptions( connectTimeout: Duration(seconds: 3), diff --git a/example_flutter_app/lib/main.dart b/example_flutter_app/lib/main.dart index 60f9b8795..244d64220 100644 --- a/example_flutter_app/lib/main.dart +++ b/example_flutter_app/lib/main.dart @@ -1,8 +1,8 @@ import 'dart:convert'; +import 'package:diox/dio.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:dio/dio.dart'; import 'http.dart'; // make dio as global top-level variable import 'routes/request.dart'; diff --git a/example_flutter_app/lib/routes/request.dart b/example_flutter_app/lib/routes/request.dart index 21d7ef857..d23c652f2 100644 --- a/example_flutter_app/lib/routes/request.dart +++ b/example_flutter_app/lib/routes/request.dart @@ -1,5 +1,6 @@ -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:flutter/material.dart'; + import '../http.dart'; class RequestRoute extends StatefulWidget { diff --git a/example_flutter_app/pubspec.yaml b/example_flutter_app/pubspec.yaml index 6286c3aeb..4e968db05 100644 --- a/example_flutter_app/pubspec.yaml +++ b/example_flutter_app/pubspec.yaml @@ -23,7 +23,7 @@ environment: dependencies: flutter: sdk: flutter - dio: + diox: path: ../dio diff --git a/plugins/cookie_manager/README.md b/plugins/cookie_manager/README.md index 8072f63f2..2eee9af43 100644 --- a/plugins/cookie_manager/README.md +++ b/plugins/cookie_manager/README.md @@ -1,8 +1,8 @@ -# dio_cookie_manager +# diox_cookie_manager -[![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg?style=flat-square)](https://pub.dev/packages/dio_cookie_manager) +[![Pub](https://img.shields.io/pub/v/diox_cookie_manager.svg)](https://pub.dev/packages/diox_cookie_manager) -A cookie manager for [Dio](https://github.com/flutterchina/dio). +A cookie manager for [diox](https://github.com/cfug/diox). ## Getting Started @@ -10,15 +10,15 @@ A cookie manager for [Dio](https://github.com/flutterchina/dio). ```yaml dependencies: - dio_cookie_manager: ^2.0.0 # latest version + diox_cookie_manager: ^2.0.0 # latest version ``` ### Usage ```dart import 'package:cookie_jar/cookie_jar.dart'; -import 'package:dio/dio.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_cookie_manager/dio_cookie_manager.dart'; void main() async { final dio = Dio(); @@ -38,7 +38,7 @@ void main() async { `CookieManager` Interceptor can help us manage the request/response cookies automatically. `CookieManager` depends on the `cookie_jar` package: -> The dio_cookie_manager manage API is based on the withdrawn +> The diox_cookie_manager manage API is based on the withdrawn > [cookie_jar](https://github.com/flutterchina/cookie_jar). You can create a `CookieJar` or `PersistCookieJar` to manage cookies automatically, diff --git a/plugins/cookie_manager/example/example.dart b/plugins/cookie_manager/example/example.dart index 3b37b8ded..bf17a1ec8 100644 --- a/plugins/cookie_manager/example/example.dart +++ b/plugins/cookie_manager/example/example.dart @@ -1,6 +1,6 @@ import 'package:cookie_jar/cookie_jar.dart'; -import 'package:dio/dio.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_cookie_manager/dio_cookie_manager.dart'; void main() async { final dio = Dio(); diff --git a/plugins/cookie_manager/lib/src/cookie_mgr.dart b/plugins/cookie_manager/lib/src/cookie_mgr.dart index 1b81b6889..ffb0280b0 100644 --- a/plugins/cookie_manager/lib/src/cookie_mgr.dart +++ b/plugins/cookie_manager/lib/src/cookie_mgr.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'package:cookie_jar/cookie_jar.dart'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; const _kIsWeb = bool.hasEnvironment('dart.library.js_util') ? bool.fromEnvironment('dart.library.js_util') diff --git a/plugins/cookie_manager/pubspec.yaml b/plugins/cookie_manager/pubspec.yaml index 069fe053e..626218278 100644 --- a/plugins/cookie_manager/pubspec.yaml +++ b/plugins/cookie_manager/pubspec.yaml @@ -1,21 +1,20 @@ -name: dio_cookie_manager +name: diox_cookie_manager description: A cookie manager for Dio, which supports persistent cookies in RAM and file. version: 2.0.0 -homepage: https://github.com/flutterchina/dio/tree/master/plugins/cookie_manager +homepage: https://github.com/cfug/diox +repository: https://github.com/cfug/diox/blob/main/plugins/cookie_manager environment: sdk: '>=2.12.1 <3.0.0' dependencies: cookie_jar: ^3.0.0 - dio: ^4.0.0 + diox: ^5.0.0-dev.1 dependency_overrides: - dio: + diox: path: ../../dio dev_dependencies: lints: ^1.0.1 test: ^1.16.4 - - diff --git a/plugins/cookie_manager/test/basic_test.dart b/plugins/cookie_manager/test/basic_test.dart index 41a98c83e..1dddf248b 100644 --- a/plugins/cookie_manager/test/basic_test.dart +++ b/plugins/cookie_manager/test/basic_test.dart @@ -1,6 +1,6 @@ import 'package:cookie_jar/cookie_jar.dart'; -import 'package:dio/dio.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_cookie_manager/dio_cookie_manager.dart'; import 'package:test/test.dart'; void main() { diff --git a/plugins/http2_adapter/README.md b/plugins/http2_adapter/README.md index 0bf64faf1..a6d738bc5 100644 --- a/plugins/http2_adapter/README.md +++ b/plugins/http2_adapter/README.md @@ -1,8 +1,8 @@ -# dio_http2_adapter +# diox_http2_adapter -[![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg?style=flat-square)](https://pub.dev/packages/dio_http2_adapter) +[![Pub](https://img.shields.io/pub/v/diox_http2_adapter.svg)](https://pub.dev/packages/diox_http2_adapter) -An HTTP/2 adapter for [Dio](https://github.com/flutterchina/dio). +An HTTP/2 adapter for [diox](https://github.com/cfug/diox). ## Getting Started @@ -10,14 +10,14 @@ An HTTP/2 adapter for [Dio](https://github.com/flutterchina/dio). ```yaml dependencies: - dio_http2_adapter: ^2.0.0 # latest version + diox_http2_adapter: ^2.0.0 # latest version ``` ### Usage ```dart -import 'package:dio/dio.dart'; -import 'package:dio_http2_adapter/dio_http2_adapter.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_http2_adapter/dio_http2_adapter.dart'; void main() async { final dio = Dio() diff --git a/plugins/http2_adapter/example/example.dart b/plugins/http2_adapter/example/example.dart index 2e9449db2..b5ddd1c6c 100644 --- a/plugins/http2_adapter/example/example.dart +++ b/plugins/http2_adapter/example/example.dart @@ -1,5 +1,5 @@ -import 'package:dio/dio.dart'; -import 'package:dio_http2_adapter/dio_http2_adapter.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_http2_adapter/dio_http2_adapter.dart'; void main() async { final dio = Dio() diff --git a/plugins/http2_adapter/lib/src/http2_adapter.dart b/plugins/http2_adapter/lib/src/http2_adapter.dart index ff3b56066..6558f4683 100644 --- a/plugins/http2_adapter/lib/src/http2_adapter.dart +++ b/plugins/http2_adapter/lib/src/http2_adapter.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; import 'package:http2/http2.dart'; part 'client_setting.dart'; diff --git a/plugins/http2_adapter/pubspec.yaml b/plugins/http2_adapter/pubspec.yaml index fbb5eead6..d9bf97d0d 100644 --- a/plugins/http2_adapter/pubspec.yaml +++ b/plugins/http2_adapter/pubspec.yaml @@ -1,20 +1,20 @@ -name: dio_http2_adapter +name: diox_http2_adapter description: A Dio HttpClientAdapter which support Http/2.0(Support connection reuse, header compression, server pushing is not supported yet.) version: 2.0.0 -homepage: https://github.com/flutterchina/dio/tree/master/plugins/http2_adapter +homepage: https://github.com/cfug/diox +repository: https://github.com/cfug/diox/blob/main/plugins/http2_adapter environment: sdk: '>=2.12.1 <3.0.0' dependencies: http2: ^2.0.0 - dio: ^4.0.0 + diox: ^5.0.0-dev.1 dependency_overrides: - dio: + diox: path: ../../dio dev_dependencies: lints: ^1.0.1 test: ^1.16.4 - diff --git a/plugins/http2_adapter/test/http2_test.dart b/plugins/http2_adapter/test/http2_test.dart index 7d2dfe627..2cf670875 100644 --- a/plugins/http2_adapter/test/http2_test.dart +++ b/plugins/http2_adapter/test/http2_test.dart @@ -1,9 +1,9 @@ import 'dart:io'; import 'package:crypto/crypto.dart'; -import 'package:dio/dio.dart'; +import 'package:diox/dio.dart'; +import 'package:diox_http2_adapter/dio_http2_adapter.dart'; import 'package:test/test.dart'; -import 'package:dio_http2_adapter/dio_http2_adapter.dart'; void main() { // NOTE: Run test.sh to download the currrent certs to the file below.