network middlewares #60

Merged
teidesu merged 2 commits from net-middlewares into master 2024-07-17 00:17:54 +03:00
teidesu commented 2024-07-07 03:08:46 +03:00 (Migrated from github.com)

allow intercepting, modifying and early responding to outgoing requests

this is a basis for many previously impossible use-cases, including a global rpc error handler, client-level request caching and more granular control over request delaying

allow intercepting, modifying and early responding to outgoing requests this is a basis for many previously impossible use-cases, including a global rpc error handler, client-level request caching and more granular control over request delaying
codecov[bot] commented 2024-07-07 03:11:18 +03:00 (Migrated from github.com)

Codecov Report

Attention: Patch coverage is 63.98210% with 161 lines in your changes missing coverage. Please review.

Project coverage is 56.35%. Comparing base (4f3295b) to head (bb7baf2).

Files Patch % Lines
...kages/core/src/network/middlewares/flood-waiter.ts 52.34% 61 Missing ⚠️
packages/core/src/network/network-manager.ts 61.90% 32 Missing ⚠️
...es/core/src/network/middlewares/internal-errors.ts 63.38% 26 Missing ⚠️
packages/core/src/network/middlewares/on-method.ts 68.51% 17 Missing ⚠️
packages/core/src/network/middlewares/on-error.ts 67.34% 16 Missing ⚠️
packages/core/src/utils/abort-signal.ts 10.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
+ Coverage   56.27%   56.35%   +0.08%     
==========================================
  Files         674      682       +8     
  Lines       73683    73980     +297     
  Branches     3240     3259      +19     
==========================================
+ Hits        41465    41692     +227     
- Misses      32218    32288      +70     

View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

## [Codecov](https://app.codecov.io/gh/mtcute/mtcute/pull/60?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) Report Attention: Patch coverage is `63.98210%` with `161 lines` in your changes missing coverage. Please review. > Project coverage is 56.35%. Comparing base [(`4f3295b`)](https://app.codecov.io/gh/mtcute/mtcute/commit/4f3295b8a77f57f459bb536ba5de871de8148a18?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) to head [(`bb7baf2`)](https://app.codecov.io/gh/mtcute/mtcute/commit/bb7baf263b8fac2e9bff6cb7c992b4b98478787f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute). | [Files](https://app.codecov.io/gh/mtcute/mtcute/pull/60?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) | Patch % | Lines | |---|---|---| | [...kages/core/src/network/middlewares/flood-waiter.ts](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&filepath=packages%2Fcore%2Fsrc%2Fnetwork%2Fmiddlewares%2Fflood-waiter.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute#diff-cGFja2FnZXMvY29yZS9zcmMvbmV0d29yay9taWRkbGV3YXJlcy9mbG9vZC13YWl0ZXIudHM=) | 52.34% | [61 Missing :warning: ](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) | | [packages/core/src/network/network-manager.ts](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&filepath=packages%2Fcore%2Fsrc%2Fnetwork%2Fnetwork-manager.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute#diff-cGFja2FnZXMvY29yZS9zcmMvbmV0d29yay9uZXR3b3JrLW1hbmFnZXIudHM=) | 61.90% | [32 Missing :warning: ](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) | | [...es/core/src/network/middlewares/internal-errors.ts](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&filepath=packages%2Fcore%2Fsrc%2Fnetwork%2Fmiddlewares%2Finternal-errors.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute#diff-cGFja2FnZXMvY29yZS9zcmMvbmV0d29yay9taWRkbGV3YXJlcy9pbnRlcm5hbC1lcnJvcnMudHM=) | 63.38% | [26 Missing :warning: ](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) | | [packages/core/src/network/middlewares/on-method.ts](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&filepath=packages%2Fcore%2Fsrc%2Fnetwork%2Fmiddlewares%2Fon-method.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute#diff-cGFja2FnZXMvY29yZS9zcmMvbmV0d29yay9taWRkbGV3YXJlcy9vbi1tZXRob2QudHM=) | 68.51% | [17 Missing :warning: ](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) | | [packages/core/src/network/middlewares/on-error.ts](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&filepath=packages%2Fcore%2Fsrc%2Fnetwork%2Fmiddlewares%2Fon-error.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute#diff-cGFja2FnZXMvY29yZS9zcmMvbmV0d29yay9taWRkbGV3YXJlcy9vbi1lcnJvci50cw==) | 67.34% | [16 Missing :warning: ](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) | | [packages/core/src/utils/abort-signal.ts](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&filepath=packages%2Fcore%2Fsrc%2Futils%2Fabort-signal.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute#diff-cGFja2FnZXMvY29yZS9zcmMvdXRpbHMvYWJvcnQtc2lnbmFsLnRz) | 10.00% | [9 Missing :warning: ](https://app.codecov.io/gh/mtcute/mtcute/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute) | <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## master #60 +/- ## ========================================== + Coverage 56.27% 56.35% +0.08% ========================================== Files 674 682 +8 Lines 73683 73980 +297 Branches 3240 3259 +19 ========================================== + Hits 41465 41692 +227 - Misses 32218 32288 +70 ``` </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/mtcute/mtcute/pull/60?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mtcute).
Sign in to join this conversation.
No description provided.