Skip to content

Commit

Permalink
Update dependency versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
azriel91 committed Aug 26, 2023
1 parent f4e3cca commit 366280b
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 86 deletions.
38 changes: 19 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,38 +103,38 @@ peace_item_tar_x = { path = "items/tar_x", version = "0.0.11" }
#
# This does not include examples' dependencies, because we want it to be easy for
# developers to see the dependencies to create an automation tool.
async-trait = "0.1.68"
async-trait = "0.1.73"
base64 = "0.21.2"
bytes = "1.4.0"
cfg-if = "1.0.0"
chrono = { version = "0.4.26", default-features = false, features = ["clock", "serde"] }
console = "0.15.7"
derivative = "2.2.0"
diff-struct = "0.5.2"
diff-struct = "0.5.3"
downcast-rs = "1.2.0"
dyn-clone = "1.0.11"
dyn-clone = "1.0.13"
enser = "0.1.4"
erased-serde = "0.3.25"
fn_graph = { version = "0.8.3", features = ["resman"] }
erased-serde = "0.3.30"
fn_graph = { version = "0.8.4", features = ["resman"] }
futures = "0.3.28"
heck = "0.4.1"
indexmap = "2.0.0"
indicatif = "0.17.5"
miette = "5.9.0"
pretty_assertions = "1.3.0"
proc-macro2 = "1.0.63"
quote = "1.0.28"
reqwest = "0.11.18"
indicatif = "0.17.6"
miette = "5.10.0"
pretty_assertions = "1.4.0"
proc-macro2 = "1.0.66"
quote = "1.0.33"
reqwest = "0.11.20"
resman = "0.16.1"
serde = "1.0.164"
serde = "1.0.186"
serde-wasm-bindgen = "0.5.0"
serde_json = "1.0.99"
serde_yaml = "0.9.22"
syn = "2.0.22"
tar = "0.4.38"
tempfile = "3.6.0"
thiserror = "1.0.40"
tokio = "1.28.2"
serde_json = "1.0.105"
serde_yaml = "0.9.25"
syn = "2.0.29"
tar = "0.4.40"
tempfile = "3.8.0"
thiserror = "1.0.47"
tokio = "1.32.0"
tokio-util = "0.7.8"
tynm = "0.1.8"
type_reg = { version = "0.6.0", features = ["debug", "untagged", "ordered"] }
Expand Down
8 changes: 4 additions & 4 deletions examples/download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
peace = { path = "../..", default-features = false }
peace_items = { path = "../../items", features = ["file_download"] }
thiserror = "1.0.40"
thiserror = "1.0.47"
url = { version = "2.4.0", features = ["serde"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
clap = { version = "4.3.8", features = ["derive"] }
tokio = { version = "1.28.2", features = ["net", "time", "rt"] }
clap = { version = "4.4.0", features = ["derive"] }
tokio = { version = "1.32.0", features = ["net", "time", "rt"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.7"
serde-wasm-bindgen = "0.5.0"
tokio = "1.28.2"
tokio = "1.32.0"
wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "0.4.37"
js-sys = "0.3.64"
Expand Down
36 changes: 18 additions & 18 deletions examples/envman/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ test = false
crate-type = ["cdylib", "rlib"]

[dependencies]
aws-config = { version = "0.55.3", optional = true }
aws-sdk-iam = { version = "0.28.0", optional = true }
aws-sdk-s3 = { version = "0.28.0", optional = true }
aws-smithy-http = { version = "0.55.3", optional = true } # used to reference error type, otherwise not recommended for direct usage
aws-config = { version = "0.56.1", optional = true }
aws-sdk-iam = { version = "0.30.0", optional = true }
aws-sdk-s3 = { version = "0.30.0", optional = true }
aws-smithy-http = { version = "0.56.1", optional = true } # used to reference error type, otherwise not recommended for direct usage
base64 = { version = "0.21.2", optional = true }
cfg-if = "1.0.0"
chrono = { version = "0.4.26", default-features = false, features = ["clock", "serde"], optional = true }
Expand All @@ -30,35 +30,35 @@ futures = { version = "0.3.28", optional = true }
md5-rs = { version = "0.1.5", optional = true } # WASM compatible, and reads bytes as stream
peace = { path = "../..", default-features = false }
peace_items = { path = "../../items", features = ["file_download", "tar_x"] }
semver = { version = "1.0.17", optional = true }
serde = { version = "1.0.164", features = ["derive"] }
thiserror = { version = "1.0.40", optional = true }
semver = { version = "1.0.18", optional = true }
serde = { version = "1.0.186", features = ["derive"] }
thiserror = { version = "1.0.47", optional = true }
url = { version = "2.4.0", features = ["serde"] }
urlencoding = { version = "2.1.2", optional = true }
urlencoding = { version = "2.1.3", optional = true }
whoami = { version = "1.4.1", optional = true }

# web_server
# ssr
axum = { version = "0.6.18", optional = true }
axum = { version = "0.6.20", optional = true }
hyper = { version = "0.14.27", optional = true }
leptos = { version = "0.3.1", default-features = false, features = ["serde", "stable"] }
leptos_axum = { version = "0.3.1", optional = true }
leptos_meta = { version = "0.3.1", default-features = false, features = ["stable"] }
leptos_router = { version = "0.3.1", default-features = false, features = ["stable"] }
leptos = { version = "0.5.0-beta", default-features = false, features = ["serde"] }
leptos_axum = { version = "0.5.0-beta", optional = true }
leptos_meta = { version = "0.5.0-beta", default-features = false }
leptos_router = { version = "0.5.0-beta", default-features = false }
tower = { version = "0.4.13", optional = true }
tower-http = { version = "0.4.1", optional = true, features = ["fs"] }
tower-http = { version = "0.4.3", optional = true, features = ["fs"] }
tracing = { version = "0.1.37", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
clap = { version = "4.3.8", features = ["derive"], optional = true }
tokio = { version = "1.28.2", features = ["rt", "rt-multi-thread"], optional = true }
clap = { version = "4.4.0", features = ["derive"], optional = true }
tokio = { version = "1.32.0", features = ["rt", "rt-multi-thread"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.7"
console_log = { version = "1.0.0", features = ["color"] }
log = "0.4.19"
log = "0.4.20"
serde-wasm-bindgen = "0.5.0"
tokio = "1.28.2"
tokio = "1.32.0"
wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "0.4.37"
js-sys = "0.3.64"
Expand Down
3 changes: 1 addition & 2 deletions examples/envman/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ cfg_if::cfg_if! {
let _log = console_log::init_with_level(log::Level::Debug);
console_error_panic_hook::set_once();

leptos::mount_to_body(move |cx| {
leptos::mount_to_body(move || {
view! {
cx,
<Home />
}
});
Expand Down
3 changes: 1 addition & 2 deletions examples/envman/src/web/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ cfg_if::cfg_if! {
let _log = console_log::init_with_level(log::Level::Debug);
console_error_panic_hook::set_once();

leptos::mount_to_body(move |cx| {
leptos::mount_to_body(move || {
view! {
cx,
<div>rara</div>
}
});
Expand Down
21 changes: 7 additions & 14 deletions examples/envman/src/web/components/flow_graph.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
use leptos::{
component, create_signal, server_fn, view, IntoView, Scope, ServerFnError, SignalGet,
SignalUpdate, Transition,
component, create_signal, view, IntoView, ServerFnError, SignalGet, SignalUpdate, Transition,
};

/// Renders the flow graph.
#[component]
pub fn FlowGraph(cx: Scope) -> impl IntoView {
let (count, set_count) = create_signal(cx, 0);
pub fn FlowGraph() -> impl IntoView {
let (count, set_count) = create_signal(0);

let dot_source_resource = leptos::create_resource(
cx,
|| (),
move |()| async move { flow_graph_src(cx).await.unwrap() },
move |()| async move { flow_graph_src().await.unwrap() },
);
let dot_source_result = {
move || {
let dot_source = dot_source_resource
.read(cx)
.read()
.unwrap_or_else(|| String::from("digraph {}"));

let script_src = format!(
Expand All @@ -31,7 +29,6 @@ pub fn FlowGraph(cx: Scope) -> impl IntoView {
);

view! {
cx,
<script type="module">
{ script_src }
</script>
Expand All @@ -40,7 +37,6 @@ pub fn FlowGraph(cx: Scope) -> impl IntoView {
};

view! {
cx,
<div class="flex items-center justify-center">
<div id="flow_dot_diagram"></div>
<br />
Expand All @@ -52,7 +48,7 @@ pub fn FlowGraph(cx: Scope) -> impl IntoView {
</button>
</div>
</div>
<Transition fallback=move || view! {cx, <p>"Loading graph..."</p> }>
<Transition fallback=move || view! { <p>"Loading graph..."</p> }>
{ dot_source_result }
</Transition>
// Client side rendering, if we know what flow we have.
Expand Down Expand Up @@ -80,11 +76,8 @@ pub fn FlowGraph(cx: Scope) -> impl IntoView {
}
}

#[cfg(feature = "hydrate")]
use leptos::server_fn::ServerFn;

#[leptos::server(FlowGraphSrc, "/flow_graph")]
pub async fn flow_graph_src(_cx: Scope) -> Result<String, ServerFnError> {
pub async fn flow_graph_src() -> Result<String, ServerFnError> {
use crate::{flows::AppUploadFlow, web::FlowDotRenderer};
let flow = AppUploadFlow::flow()
.await
Expand Down
10 changes: 4 additions & 6 deletions examples/envman/src/web/components/home.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
use leptos::{component, view, IntoView, Scope};
use leptos::{component, view, IntoView};
use leptos_meta::{provide_meta_context, Link, Stylesheet};
use leptos_router::{Route, Router, Routes};

use crate::web::components::FlowGraph;

#[component]
pub fn Home(cx: Scope) -> impl IntoView {
pub fn Home() -> impl IntoView {
// Provides context that manages stylesheets, titles, meta tags, etc.
provide_meta_context(cx);
provide_meta_context();

view! {
cx,
<Link rel="shortcut icon" type_="image/ico" href="/favicon.ico"/>
<Stylesheet id="tailwind" href="/pkg/envman.css"/>
<Router>
<main>
<Routes>
<Route path="" view=move |cx| view! {
cx,
<Route path="" view=move || view! {
<FlowGraph />
}/>
</Routes>
Expand Down
28 changes: 7 additions & 21 deletions examples/envman/src/web/web_server.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
use std::{net::SocketAddr, path::PathBuf, sync::Arc};
use std::{net::SocketAddr, path::PathBuf};

use axum::{Extension, Router};
use leptos::{view, ServerFn};
use axum::Router;
use leptos::view;
use leptos_axum::LeptosRoutes;
use tokio::io::AsyncWriteExt;
use tower_http::services::ServeDir;

use crate::{
model::EnvManError,
web::components::{FlowGraphSrc, Home},
};
use crate::{model::EnvManError, web::components::Home};

/// Web server that responds to `envman` requests.
#[derive(Debug)]
Expand All @@ -22,9 +19,7 @@ impl WebServer {
let conf = leptos::get_configuration(None).await.unwrap();
let leptos_options = conf.leptos_options;
let socket_addr = socket_addr.unwrap_or(leptos_options.site_addr);
let routes = leptos_axum::generate_route_list(|cx| view! { cx, <Home /> }).await;

let _ = FlowGraphSrc::register();
let routes = leptos_axum::generate_route_list(|| view! { <Home /> }).await;

let app = Router::new()
// serve the pkg directory
Expand All @@ -36,17 +31,8 @@ impl WebServer {
])),
)
// serve the SSR rendered homepage
.leptos_routes(
leptos_options.clone(),
routes,
move |cx| view! { cx, <Home /> },
)
.layer(Extension(Arc::new(leptos_options)))

// When we upgrade leptos:
// .leptos_routes(&leptos_options, routes, move |cx| view! { cx, <Home /> })
// .with_state(leptos_options)
;
.leptos_routes(&leptos_options, routes, move || view! { <Home /> })
.with_state(leptos_options);

let (Ok(()) | Err(_)) = tokio::io::stderr()
.write_all(format!("listening on http://{}\n", socket_addr).as_bytes())
Expand Down

0 comments on commit 366280b

Please sign in to comment.