chore: clean up optional dependencies (#546)
This commit is contained in:
parent
cc96f379ba
commit
46e149ee8b
3 changed files with 10 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ tokio-util = { version = "0.7" }
|
|||
pin-project-lite = "0.2"
|
||||
pastey = { version = "0.2.0", optional = true }
|
||||
# oauth2 support
|
||||
oauth2 = { version = "5.0", optional = true }
|
||||
oauth2 = { version = "5.0", optional = true, default-features = false, features = ["reqwest"] }
|
||||
|
||||
# for auto generate schema
|
||||
schemars = { version = "1.0", optional = true, features = ["chrono04"] }
|
||||
|
|
@ -108,7 +108,7 @@ client-side-sse = ["dep:sse-stream", "dep:http"]
|
|||
|
||||
# Streamable HTTP client
|
||||
transport-streamable-http-client = ["client-side-sse", "transport-worker"]
|
||||
transport-streamable-http-client-reqwest = ["transport-streamable-http-client", "reqwest"]
|
||||
transport-streamable-http-client-reqwest = ["transport-streamable-http-client", "__reqwest"]
|
||||
|
||||
transport-async-rw = ["tokio/io-util", "tokio-util/codec"]
|
||||
transport-io = ["transport-async-rw", "tokio/io-std"]
|
||||
|
|
@ -207,4 +207,4 @@ path = "tests/test_task.rs"
|
|||
[[test]]
|
||||
name = "test_streamable_http_priming"
|
||||
required-features = ["server", "client", "transport-streamable-http-server", "reqwest"]
|
||||
path = "tests/test_streamable_http_priming.rs"
|
||||
path = "tests/test_streamable_http_priming.rs"
|
||||
|
|
|
|||
|
|
@ -335,7 +335,12 @@ impl<C: StreamableHttpClient> Worker for StreamableHttpClientWorker<C> {
|
|||
};
|
||||
// Store session info for cleanup when run() exits (not spawned, so cleanup completes before close() returns)
|
||||
let session_cleanup_info = session_id.as_ref().map(|sid| {
|
||||
(self.client.clone(), config.uri.clone(), sid.clone(), config.auth_header.clone())
|
||||
(
|
||||
self.client.clone(),
|
||||
config.uri.clone(),
|
||||
sid.clone(),
|
||||
config.auth_header.clone(),
|
||||
)
|
||||
});
|
||||
|
||||
context.send_to_handler(message).await?;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ mod common;
|
|||
use std::time::Duration;
|
||||
|
||||
use common::handlers::{TestClientHandler, TestServer};
|
||||
use rmcp::{service::QuitReason, ServiceExt};
|
||||
use rmcp::{ServiceExt, service::QuitReason};
|
||||
|
||||
/// Test that close() properly shuts down the connection
|
||||
#[tokio::test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue