fix: `server_fn` `rustls` feature shouldn't pull in `default-tls` (#1343)

This commit is contained in:
Greg Johnston 2023-07-13 19:41:55 -04:00 committed by GitHub
parent 193aa79956
commit 3ea3a40395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 9 deletions

View File

@ -13,16 +13,16 @@ cfg-if = "1"
leptos_dom = { workspace = true }
leptos_macro = { workspace = true }
leptos_reactive = { workspace = true }
leptos_server = { workspace = true}
leptos_server = { workspace = true }
leptos_config = { workspace = true }
tracing = "0.1"
typed-builder = "0.14"
server_fn = { workspace = true}
server_fn = { workspace = true }
web-sys = { version = "0.3.63", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
[dev-dependencies]
leptos = { path = "."}
leptos = { path = "." }
[features]
default = ["serde"]
@ -60,7 +60,15 @@ rkyv = ["leptos_reactive/rkyv"]
tracing = ["leptos_macro/tracing"]
[package.metadata.cargo-all-features]
denylist = ["nightly", "tracing", "template_macro", "rustls", "default-tls", "web-sys", "wasm-bindgen"]
denylist = [
"nightly",
"tracing",
"template_macro",
"rustls",
"default-tls",
"web-sys",
"wasm-bindgen",
]
skip_feature_sets = [
[
"csr",

View File

@ -84,11 +84,18 @@
//! from the server to the client.
//! - `serde-lite` In SSR/hydrate mode, uses [serde-lite](https://docs.rs/serde-lite/latest/serde_lite/) to serialize resources and send them
//! from the server to the client.
//! - `rkyv` In SSR/hydrate mode, uses [rkyv](https://docs.rs/rkyv/latest/rkyv/) to serialize resources and send them
//! from the server to the client.
//! - `miniserde` In SSR/hydrate mode, uses [miniserde](https://docs.rs/miniserde/latest/miniserde/) to serialize resources and send them
//! from the server to the client.
//! - `tracing` Adds additional support for [`tracing`](https://docs.rs/tracing/latest/tracing/) to components.
//! - `default-tls` Use default native TLS support. (Only applies when using server functions with a non-WASM client like a desktop app.)
//! - `rustls` Use `rustls`. (Only applies when using server functions with a non-WASM client like a desktop app.)
//! - `template_macro` Enables the [`template!`](leptos_macro::template) macro, which offers faster DOM node creation for some use cases in `csr`.
//!
//! **Important Note:** You must enable one of `csr`, `hydrate`, or `ssr` to tell Leptos
//! which mode your app is operating in.
//! which mode your app is operating in. You should only enable one of these per build target,
//! i.e., you should not have both `hydrate` and `ssr` enabled for your server binary, only `ssr`.
//!
//! # A Simple Counter
//!

View File

@ -10,7 +10,7 @@ readme = "../README.md"
[dependencies]
leptos_reactive = { workspace = true }
server_fn = { workspace = true}
server_fn = { workspace = true }
lazy_static = "1"
serde = { version = "1", features = ["derive"] }
thiserror = "1"
@ -21,7 +21,6 @@ inventory = "0.3"
leptos = { path = "../leptos" }
[features]
default = ["default-tls"]
csr = ["leptos_reactive/csr"]
default-tls = ["server_fn/default-tls"]
hydrate = ["leptos_reactive/hydrate"]

View File

@ -28,11 +28,10 @@ gloo-net = "0.2"
js-sys = "0.3"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
reqwest = { version = "0.11"}
reqwest = { version = "0.11", default-features = false }
once_cell = "1"
[features]
default = ["default-tls"]
default-tls = ["reqwest/default-tls"]
rustls = ["reqwest/rustls-tls"]
ssr = ["inventory"]