From ad429c7948c305334cd60eedfe5e71bb741e31a7 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 6 May 2022 19:37:29 +0100 Subject: [PATCH 1/5] hide internal macros from public interface (#755) --- core/src/lib.rs | 4 ++-- core/src/macros.rs | 7 +++---- jsonrpsee/src/lib.rs | 1 + jsonrpsee/src/macros.rs | 17 ++++++++--------- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/core/src/lib.rs b/core/src/lib.rs index 50a9b62ddb..f3fc4916e2 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -28,9 +28,9 @@ #![warn(missing_docs, missing_debug_implementations, unreachable_pub)] -#[doc(hidden)] +// Macros useful internally within this crate, but not to be exposed outside of it. #[macro_use] -pub mod macros; +mod macros; /// Error type. pub mod error; diff --git a/core/src/macros.rs b/core/src/macros.rs index 06fda93322..5be3d99ab0 100644 --- a/core/src/macros.rs +++ b/core/src/macros.rs @@ -1,4 +1,3 @@ -#[macro_export] macro_rules! cfg_feature { ($feature:literal, $($item:item)*) => { $( @@ -11,19 +10,19 @@ macro_rules! cfg_feature { macro_rules! cfg_client { ($($item:item)*) => { - $crate::cfg_feature!("client", $($item)*); + cfg_feature!("client", $($item)*); }; } macro_rules! cfg_server { ($($item:item)*) => { - $crate::cfg_feature!("server", $($item)*); + cfg_feature!("server", $($item)*); }; } macro_rules! cfg_http_helpers { ($($item:item)*) => { - $crate::cfg_feature!("http-helpers", $($item)*); + cfg_feature!("http-helpers", $($item)*); }; } diff --git a/jsonrpsee/src/lib.rs b/jsonrpsee/src/lib.rs index 896797c9ba..dcc4b65d23 100644 --- a/jsonrpsee/src/lib.rs +++ b/jsonrpsee/src/lib.rs @@ -48,6 +48,7 @@ //! - **`client-ws-transport`** - Enables `ws` transport with TLS. //! - **`client-ws-transport-no-tls`** - Enables `ws` transport without TLS. +// Macros useful below, but not to be exposed outside of the crate. #[macro_use] mod macros; diff --git a/jsonrpsee/src/macros.rs b/jsonrpsee/src/macros.rs index 8c8093b53e..541f326f43 100644 --- a/jsonrpsee/src/macros.rs +++ b/jsonrpsee/src/macros.rs @@ -1,4 +1,3 @@ -#[macro_export] macro_rules! cfg_feature { ($feature:literal, $($item:item)*) => { $( @@ -20,31 +19,31 @@ macro_rules! cfg_client { macro_rules! cfg_http_client { ($($item:item)*) => { - $crate::cfg_feature!("jsonrpsee-http-client", $($item)*); + cfg_feature!("jsonrpsee-http-client", $($item)*); }; } macro_rules! cfg_ws_client { ($($item:item)*) => { - $crate::cfg_feature!("jsonrpsee-ws-client", $($item)*); + cfg_feature!("jsonrpsee-ws-client", $($item)*); }; } macro_rules! cfg_wasm_client { ($($item:item)*) => { - $crate::cfg_feature!("jsonrpsee-wasm-client", $($item)*); + cfg_feature!("jsonrpsee-wasm-client", $($item)*); }; } macro_rules! cfg_async_client { ($($item:item)*) => { - $crate::cfg_feature!("async-client", $($item)*); + cfg_feature!("async-client", $($item)*); }; } macro_rules! cfg_client_transport { ($($item:item)*) => { - $crate::cfg_feature!("jsonrpsee-client-transport", $($item)*); + cfg_feature!("jsonrpsee-client-transport", $($item)*); }; } @@ -69,19 +68,19 @@ macro_rules! cfg_http_server { macro_rules! cfg_ws_server { ($($item:item)*) => { - $crate::cfg_feature!("jsonrpsee-ws-server", $($item)*); + cfg_feature!("jsonrpsee-ws-server", $($item)*); }; } macro_rules! cfg_proc_macros { ($($item:item)*) => { - $crate::cfg_feature!("jsonrpsee-proc-macros", $($item)*); + cfg_feature!("jsonrpsee-proc-macros", $($item)*); }; } macro_rules! cfg_types { ($($item:item)*) => { - $crate::cfg_feature!("jsonrpsee-types", $($item)*); + cfg_feature!("jsonrpsee-types", $($item)*); }; } From 734196f10e2137633cb1b831eea46f69501d5f3b Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Wed, 11 May 2022 10:53:06 +0200 Subject: [PATCH 2/5] feat: add http health API (#763) * feat: add http health API * Update http-server/src/server.rs * remove needless change * fix middleware nits --- http-server/src/server.rs | 71 ++++++++++++++++++++++++++++++++ tests/tests/helpers.rs | 9 +++- tests/tests/integration_tests.rs | 19 +++++++++ 3 files changed, 98 insertions(+), 1 deletion(-) diff --git a/http-server/src/server.rs b/http-server/src/server.rs index 1bbd019b29..e276b64706 100644 --- a/http-server/src/server.rs +++ b/http-server/src/server.rs @@ -61,6 +61,7 @@ pub struct Builder { /// Custom tokio runtime to run the server on. tokio_runtime: Option, middleware: M, + health_api: Option, } impl Default for Builder { @@ -73,6 +74,7 @@ impl Default for Builder { access_control: AccessControl::default(), tokio_runtime: None, middleware: (), + health_api: None, } } } @@ -119,6 +121,7 @@ impl Builder { access_control: self.access_control, tokio_runtime: self.tokio_runtime, middleware, + health_api: self.health_api, } } @@ -166,6 +169,14 @@ impl Builder { self } + /// Enable health endpoint. + /// Allows you to expose one of the methods under GET / The method will be invoked with no parameters. Error returned from the method will be converted to status 500 response. + /// Expects a tuple with (, ). + pub fn health_api(mut self, path: impl Into, method: impl Into) -> Self { + self.health_api = Some(HealthApi { path: path.into(), method: method.into() }); + self + } + /// Finalizes the configuration of the server with customized TCP settings on the socket and on hyper. /// /// ```rust @@ -213,6 +224,7 @@ impl Builder { resources: self.resources, tokio_runtime: self.tokio_runtime, middleware: self.middleware, + health_api: self.health_api, }) } @@ -256,6 +268,7 @@ impl Builder { resources: self.resources, tokio_runtime: self.tokio_runtime, middleware: self.middleware, + health_api: self.health_api, }) } @@ -290,10 +303,17 @@ impl Builder { resources: self.resources, tokio_runtime: self.tokio_runtime, middleware: self.middleware, + health_api: self.health_api, }) } } +#[derive(Debug, Clone)] +struct HealthApi { + path: String, + method: String, +} + /// Handle used to run or stop the server. #[derive(Debug)] pub struct ServerHandle { @@ -345,6 +365,7 @@ pub struct Server { /// Custom tokio runtime to run the server on. tokio_runtime: Option, middleware: M, + health_api: Option, } impl Server { @@ -364,12 +385,14 @@ impl Server { let middleware = self.middleware; let batch_requests_supported = self.batch_requests_supported; let methods = methods.into().initialize_resources(&resources)?; + let health_api = self.health_api; let make_service = make_service_fn(move |_| { let methods = methods.clone(); let access_control = access_control.clone(); let resources = resources.clone(); let middleware = middleware.clone(); + let health_api = health_api.clone(); async move { Ok::<_, HyperError>(service_fn(move |request| { @@ -377,6 +400,7 @@ impl Server { let access_control = access_control.clone(); let resources = resources.clone(); let middleware = middleware.clone(); + let health_api = health_api.clone(); // Run some validation on the http request, then read the body and try to deserialize it into one of // two cases: a single RPC request or a batch of RPC requests. @@ -430,6 +454,12 @@ impl Server { } Ok(res) } + Method::GET => match health_api.as_ref() { + Some(health) if health.path.as_str() == request.uri().path() => { + process_health_request(health, middleware, methods, max_response_body_size).await + } + _ => Ok(response::method_not_allowed()), + }, // Error scenarios: Method::POST => Ok(response::unsupported_content_type()), _ => Ok(response::method_not_allowed()), @@ -687,3 +717,44 @@ async fn process_validated_request( middleware.on_response(request_start); Ok(response::ok_response(response)) } + +async fn process_health_request( + health_api: &HealthApi, + middleware: impl Middleware, + methods: Methods, + max_response_body_size: u32, +) -> Result, HyperError> { + let (tx, mut rx) = mpsc::unbounded::(); + let sink = MethodSink::new_with_limit(tx, max_response_body_size); + + let request_start = middleware.on_request(); + + let success = match methods.method_with_name(&health_api.method) { + None => false, + Some((name, method_callback)) => match method_callback.inner() { + MethodKind::Sync(callback) => { + let res = (callback)(Id::Number(0), Params::new(None), &sink); + middleware.on_result(name, res, request_start); + res + } + MethodKind::Async(callback) => { + let res = (callback)(Id::Number(0), Params::new(None), sink.clone(), 0, None).await; + middleware.on_result(name, res, request_start); + res + } + + MethodKind::Subscription(_) | MethodKind::Unsubscription(_) => { + middleware.on_result(name, false, request_start); + false + } + }, + }; + + let data = rx.next().await; + middleware.on_response(request_start); + + match data { + Some(resp) if success => Ok(response::ok_response(resp)), + _ => Ok(response::internal_error()), + } +} diff --git a/tests/tests/helpers.rs b/tests/tests/helpers.rs index 15cd3a9d5a..86760db67f 100644 --- a/tests/tests/helpers.rs +++ b/tests/tests/helpers.rs @@ -222,12 +222,19 @@ pub async fn http_server() -> (SocketAddr, HttpServerHandle) { } pub async fn http_server_with_access_control(acl: AccessControl) -> (SocketAddr, HttpServerHandle) { - let server = HttpServerBuilder::default().set_access_control(acl).build("127.0.0.1:0").await.unwrap(); + let server = HttpServerBuilder::default() + .set_access_control(acl) + .health_api("/health", "system_health") + .build("127.0.0.1:0") + .await + .unwrap(); let mut module = RpcModule::new(()); let addr = server.local_addr().unwrap(); module.register_method("say_hello", |_, _| Ok("hello")).unwrap(); module.register_method("notif", |_, _| Ok("")).unwrap(); + module.register_method("system_health", |_, _| Ok("im ok")).unwrap(); + let handle = server.start(module).unwrap(); (addr, handle) } diff --git a/tests/tests/integration_tests.rs b/tests/tests/integration_tests.rs index b0c78d59c3..c9dce9704f 100644 --- a/tests/tests/integration_tests.rs +++ b/tests/tests/integration_tests.rs @@ -750,3 +750,22 @@ async fn ws_subscribe_with_bad_params() { .unwrap_err(); assert!(matches!(err, Error::Call(_))); } + +#[tokio::test] +async fn http_health_api_works() { + use hyper::{Body, Client, Request}; + + let (server_addr, _handle) = http_server().await; + + let http_client = Client::new(); + let uri = format!("http://{}/health", server_addr); + + let req = Request::builder().method("GET").uri(&uri).body(Body::empty()).expect("request builder"); + let res = http_client.request(req).await.unwrap(); + + assert!(res.status().is_success()); + + let bytes = hyper::body::to_bytes(res.into_body()).await.unwrap(); + let out = String::from_utf8(bytes.to_vec()).unwrap(); + assert_eq!(out, "{\"jsonrpc\":\"2.0\",\"result\":\"im ok\",\"id\":0}"); +} From 2be4a66f502a7d386ea1bc80233bc9dba04b65ec Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Wed, 11 May 2022 10:56:31 +0200 Subject: [PATCH 3/5] fix: add `core` behind `http-server` feature (#760) --- jsonrpsee/src/macros.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/jsonrpsee/src/macros.rs b/jsonrpsee/src/macros.rs index 541f326f43..3d826c5bbd 100644 --- a/jsonrpsee/src/macros.rs +++ b/jsonrpsee/src/macros.rs @@ -11,7 +11,7 @@ macro_rules! cfg_feature { macro_rules! cfg_client { ($($item:item)*) => { $( - #[cfg(any(feature = "jsonrpsee-http-client", feature = "jsonrpsee-ws-client", feature = "client", feature = "async-client"))] + #[cfg(any(feature = "jsonrpsee-http-client", feature = "jsonrpsee-wasm-client", feature = "jsonrpsee-ws-client", feature = "client", feature = "async-client"))] $item )* } @@ -58,12 +58,8 @@ macro_rules! cfg_server { macro_rules! cfg_http_server { ($($item:item)*) => { - $( - #[cfg(feature = "jsonrpsee-http-server")] - #[cfg_attr(docsrs, doc(cfg(feature = "jsonrpsee-http-server")))] - $item - )* - } + cfg_feature!("jsonrpsee-http-server", $($item)*); + }; } macro_rules! cfg_ws_server { @@ -87,7 +83,7 @@ macro_rules! cfg_types { macro_rules! cfg_client_or_server { ($($item:item)*) => { $( - #[cfg(any(feature = "jsonrpsee-http-client", feature = "jsonrpsee-ws-client", feature = "client", feature = "async-client", feature = "jsonrpsee-ws-server", feature = "jsonrpsee-http-client"))] + #[cfg(any(feature = "jsonrpsee-http-client", feature = "jsonrpsee-ws-client", feature = "jsonrpsee-wasm-client", feature = "client", feature = "async-client", feature = "jsonrpsee-ws-server", feature = "jsonrpsee-http-server"))] $item )* } From fd450cf5862e2b5bf94ab139dc1e8e804eb0cd72 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Wed, 11 May 2022 11:03:47 +0200 Subject: [PATCH 4/5] chore(release): v0.13.0 --- CHANGELOG.md | 12 ++++++++++++ benches/Cargo.toml | 2 +- client/http-client/Cargo.toml | 6 +++--- client/transport/Cargo.toml | 6 +++--- client/wasm-client/Cargo.toml | 8 ++++---- client/ws-client/Cargo.toml | 8 ++++---- core/Cargo.toml | 4 ++-- examples/Cargo.toml | 2 +- http-server/Cargo.toml | 6 +++--- jsonrpsee/Cargo.toml | 20 ++++++++++---------- proc-macros/Cargo.toml | 2 +- test-utils/Cargo.toml | 2 +- tests/Cargo.toml | 2 +- types/Cargo.toml | 2 +- ws-server/Cargo.toml | 6 +++--- 15 files changed, 50 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bac35102f3..a7f79bb6a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog]. ## [Unreleased] +## [v0.13.0] - 2022-05-11 + +v0.13.0 is release that adds support health API for HTTP server and a few bug fixes. + +### [Added] +feat: add http health API [#763](https://github.com/paritytech/jsonrpsee/pull/763) + +### [Fixed] +- hide internal macros from public interface [#755](https://github.com/paritytech/jsonrpsee/pull/755) +- fix: add `core` behind `http-server` feature [#760](https://github.com/paritytech/jsonrpsee/pull/760) + + ## [v0.12.0] - 2022-05-06 v0.12.0 is mainly a patch release with some minor features added. diff --git a/benches/Cargo.toml b/benches/Cargo.toml index d789df05cf..1251414faa 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-benchmarks" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies "] description = "Benchmarks for jsonrpsee" edition = "2021" diff --git a/client/http-client/Cargo.toml b/client/http-client/Cargo.toml index 89cba33afb..3435e11a0f 100644 --- a/client/http-client/Cargo.toml +++ b/client/http-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-http-client" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] description = "HTTP client for JSON-RPC" edition = "2021" @@ -14,8 +14,8 @@ async-trait = "0.1" rustc-hash = "1" hyper = { version = "0.14.10", features = ["client", "http1", "http2", "tcp"] } hyper-rustls = { version = "0.23", optional = true } -jsonrpsee-types = { path = "../../types", version = "0.12.0" } -jsonrpsee-core = { path = "../../core", version = "0.12.0", features = ["client", "http-helpers"] } +jsonrpsee-types = { path = "../../types", version = "0.13.0" } +jsonrpsee-core = { path = "../../core", version = "0.13.0", features = ["client", "http-helpers"] } serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = "1.0" thiserror = "1.0" diff --git a/client/transport/Cargo.toml b/client/transport/Cargo.toml index a4eaacb041..5bf8cb7674 100644 --- a/client/transport/Cargo.toml +++ b/client/transport/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-client-transport" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] description = "WebSocket client for JSON-RPC" edition = "2021" @@ -10,8 +10,8 @@ homepage = "https://github.com/paritytech/jsonrpsee" documentation = "https://docs.rs/jsonrpsee-ws-client" [dependencies] -jsonrpsee-types = { path = "../../types", version = "0.12.0", optional = true } -jsonrpsee-core = { path = "../../core", version = "0.12.0", features = ["client"] } +jsonrpsee-types = { path = "../../types", version = "0.13.0", optional = true } +jsonrpsee-core = { path = "../../core", version = "0.13.0", features = ["client"] } tracing = "0.1" # optional diff --git a/client/wasm-client/Cargo.toml b/client/wasm-client/Cargo.toml index 749e1a9977..8b21e1a5c3 100644 --- a/client/wasm-client/Cargo.toml +++ b/client/wasm-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-wasm-client" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] description = "WASM client for JSON-RPC" edition = "2021" @@ -10,9 +10,9 @@ homepage = "https://github.com/paritytech/jsonrpsee" documentation = "https://docs.rs/jsonrpsee-ws-client" [dependencies] -jsonrpsee-types = { path = "../../types", version = "0.12.0" } -jsonrpsee-client-transport = { path = "../transport", version = "0.12.0", features = ["web"] } -jsonrpsee-core = { path = "../../core", version = "0.12.0", features = ["async-wasm-client"] } +jsonrpsee-types = { path = "../../types", version = "0.13.0" } +jsonrpsee-client-transport = { path = "../transport", version = "0.13.0", features = ["web"] } +jsonrpsee-core = { path = "../../core", version = "0.13.0", features = ["async-wasm-client"] } [dev-dependencies] env_logger = "0.9" diff --git a/client/ws-client/Cargo.toml b/client/ws-client/Cargo.toml index 6035f13a6d..ba947abee6 100644 --- a/client/ws-client/Cargo.toml +++ b/client/ws-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-ws-client" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] description = "WebSocket client for JSON-RPC" edition = "2021" @@ -10,9 +10,9 @@ homepage = "https://github.com/paritytech/jsonrpsee" documentation = "https://docs.rs/jsonrpsee-ws-client" [dependencies] -jsonrpsee-types = { path = "../../types", version = "0.12.0" } -jsonrpsee-client-transport = { path = "../transport", version = "0.12.0", features = ["ws"] } -jsonrpsee-core = { path = "../../core", version = "0.12.0", features = ["async-client"] } +jsonrpsee-types = { path = "../../types", version = "0.13.0" } +jsonrpsee-client-transport = { path = "../transport", version = "0.13.0", features = ["ws"] } +jsonrpsee-core = { path = "../../core", version = "0.13.0", features = ["async-client"] } [dev-dependencies] env_logger = "0.9" diff --git a/core/Cargo.toml b/core/Cargo.toml index 0c6556b5ff..74587333ff 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-core" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies "] description = "Utilities for jsonrpsee" edition = "2021" @@ -11,7 +11,7 @@ anyhow = "1" async-trait = "0.1" beef = { version = "0.5.1", features = ["impl_serde"] } futures-channel = "0.3.14" -jsonrpsee-types = { path = "../types", version = "0.12.0" } +jsonrpsee-types = { path = "../types", version = "0.13.0" } thiserror = "1" serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = { version = "1", features = ["raw_value"] } diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 4bb9302ea1..31f2e42638 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-examples" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies "] description = "Examples for jsonrpsee" edition = "2021" diff --git a/http-server/Cargo.toml b/http-server/Cargo.toml index 13a6ecfe90..3ba1adb90b 100644 --- a/http-server/Cargo.toml +++ b/http-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-http-server" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] description = "HTTP server for JSON-RPC" edition = "2021" @@ -13,8 +13,8 @@ documentation = "https://docs.rs/jsonrpsee-http-server" hyper = { version = "0.14.10", features = ["server", "http1", "http2", "tcp"] } futures-channel = "0.3.14" futures-util = { version = "0.3.14", default-features = false } -jsonrpsee-types = { path = "../types", version = "0.12.0" } -jsonrpsee-core = { path = "../core", version = "0.12.0", features = ["server", "http-helpers"] } +jsonrpsee-types = { path = "../types", version = "0.13.0" } +jsonrpsee-core = { path = "../core", version = "0.13.0", features = ["server", "http-helpers"] } globset = "0.4" lazy_static = "1.4" tracing = "0.1" diff --git a/jsonrpsee/Cargo.toml b/jsonrpsee/Cargo.toml index ad3007437f..e979f9543a 100644 --- a/jsonrpsee/Cargo.toml +++ b/jsonrpsee/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "jsonrpsee" description = "JSON-RPC crate" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] license = "MIT" edition = "2021" @@ -12,15 +12,15 @@ documentation = "https://docs.rs/jsonrpsee" [dependencies] # No support for namespaced features yet so workspace dependencies are prefixed with `jsonrpsee-`. # See https://github.com/rust-lang/cargo/issues/5565 for more details. -jsonrpsee-http-client = { path = "../client/http-client", version = "0.12.0", optional = true } -jsonrpsee-ws-client = { path = "../client/ws-client", version = "0.12.0", optional = true } -jsonrpsee-wasm-client = { path = "../client/wasm-client", version = "0.12.0", optional = true } -jsonrpsee-client-transport = { path = "../client/transport", version = "0.12.0", optional = true } -jsonrpsee-http-server = { path = "../http-server", version = "0.12.0", optional = true } -jsonrpsee-ws-server = { path = "../ws-server", version = "0.12.0", optional = true } -jsonrpsee-proc-macros = { path = "../proc-macros", version = "0.12.0", optional = true } -jsonrpsee-core = { path = "../core", version = "0.12.0", optional = true } -jsonrpsee-types = { path = "../types", version = "0.12.0", optional = true } +jsonrpsee-http-client = { path = "../client/http-client", version = "0.13.0", optional = true } +jsonrpsee-ws-client = { path = "../client/ws-client", version = "0.13.0", optional = true } +jsonrpsee-wasm-client = { path = "../client/wasm-client", version = "0.13.0", optional = true } +jsonrpsee-client-transport = { path = "../client/transport", version = "0.13.0", optional = true } +jsonrpsee-http-server = { path = "../http-server", version = "0.13.0", optional = true } +jsonrpsee-ws-server = { path = "../ws-server", version = "0.13.0", optional = true } +jsonrpsee-proc-macros = { path = "../proc-macros", version = "0.13.0", optional = true } +jsonrpsee-core = { path = "../core", version = "0.13.0", optional = true } +jsonrpsee-types = { path = "../types", version = "0.13.0", optional = true } tracing = { version = "0.1", optional = true } [features] diff --git a/proc-macros/Cargo.toml b/proc-macros/Cargo.toml index 33eb049fd7..55267372c3 100644 --- a/proc-macros/Cargo.toml +++ b/proc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "jsonrpsee-proc-macros" description = "Procedueral macros for jsonrpsee" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] license = "MIT" edition = "2021" diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index c33c282d16..01b1f7711a 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-test-utils" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies "] license = "MIT" edition = "2021" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index bd39cc240e..5227abf7f0 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-integration-tests" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies "] description = "Integration tests for jsonrpsee" edition = "2021" diff --git a/types/Cargo.toml b/types/Cargo.toml index 8a7129c9cc..17457f9c3c 100644 --- a/types/Cargo.toml +++ b/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-types" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies "] description = "Shared types for jsonrpsee" edition = "2021" diff --git a/ws-server/Cargo.toml b/ws-server/Cargo.toml index 335349ea62..f705f50c1c 100644 --- a/ws-server/Cargo.toml +++ b/ws-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-ws-server" -version = "0.12.0" +version = "0.13.0" authors = ["Parity Technologies ", "Pierre Krieger "] description = "WebSocket server for JSON-RPC" edition = "2021" @@ -12,8 +12,8 @@ documentation = "https://docs.rs/jsonrpsee-ws-server" [dependencies] futures-channel = "0.3.14" futures-util = { version = "0.3.14", default-features = false, features = ["io", "async-await-macro"] } -jsonrpsee-types = { path = "../types", version = "0.12.0" } -jsonrpsee-core = { path = "../core", version = "0.12.0", features = ["server", "soketto"] } +jsonrpsee-types = { path = "../types", version = "0.13.0" } +jsonrpsee-core = { path = "../core", version = "0.13.0", features = ["server", "soketto"] } tracing = "0.1" serde_json = { version = "1", features = ["raw_value"] } soketto = "0.7.1" From ea36d888f71c66962ff9514f8bb2f389290f0739 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Wed, 11 May 2022 11:09:29 +0200 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7f79bb6a4..bac872110b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog]. ## [v0.13.0] - 2022-05-11 -v0.13.0 is release that adds support health API for HTTP server and a few bug fixes. +v0.13.0 is release that adds health API support for the HTTP server and a few bug fixes. ### [Added] feat: add http health API [#763](https://github.com/paritytech/jsonrpsee/pull/763)