Skip to content

Commit

Permalink
Dependency-updates (#369)
Browse files Browse the repository at this point in the history
* migrate to axum 7.5

* migrate to qsync 1.0.1

* migrate to tsync 2.1.0

* Bump mio from 0.8.7 to 0.8.11

Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.7 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](tokio-rs/mio@v0.8.7...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update subdependencies `cargo update`

* Misc dependency updates

* update template for latest tsync version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
AnthonyMichaelTDM and dependabot[bot] authored May 20, 2024
1 parent 5d1a0cb commit 46965a5
Show file tree
Hide file tree
Showing 9 changed files with 1,638 additions and 1,109 deletions.
2,610 changes: 1,564 additions & 1,046 deletions Cargo.lock

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions create-rust-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,66 +20,66 @@ categories = [
##
## COMMON / DEFAULT - required dependencies
##
dotenv = "0.15.0" # + plugin_dev
serde_json = "1.0.96"
lettre = "0.10.4"
tera = { version = "1.18.1" }
lazy_static = { version = "1.4.0" }
serde = { version = "1.0.163", features = ["derive"] }
diesel = { version = "2.1.0", default-features = false, features = [
dotenv = "0.15" # + plugin_dev
serde_json = "1"
lettre = "0.11.7"
tera = { version = "1.19" }
lazy_static = { version = "1.4" }
serde = { version = "1", features = ["derive"] }
diesel = { version = "2.1", default-features = false, features = [
"uuid",
"r2d2",
"chrono",
] } # + plugin_dev, plugin_auth
once_cell = "1.17.1"
once_cell = "1.19"
diesel_logger = "0.3.0"

##
## Database
##

# sqlite dependencies
libsqlite3-sys = { version = "0.26", optional = true, features = ["bundled"] }
libsqlite3-sys = { version = "0.26.0", optional = true, features = ["bundled"] }

##
## PLUGINS
##

# plugin_auth
rust-argon2 = { optional = true, version = "1.0" }
rust-argon2 = { optional = true, version = "2.1" }
rand = { optional = true, version = "0.8.5" }
jsonwebtoken = { optional = true, version = "8.3.0" }
tsync = { optional = true, version = "1.7.0" }
chrono = { optional = true, version = "0.4.24", default-features = false, features = [
jsonwebtoken = { optional = true, version = "9.3" }
tsync = { optional = true, version = "2.1" }
chrono = { optional = true, version = "0.4.38", default-features = false, features = [
"clock",
"serde",
] }
dyn-clone = { optional = true, version = "1.0" } # needed to allow the Mailer struct to be cloned

# plugin_dev
diesel_migrations = { optional = true, version = "2.1.0" }
cargo_metadata = { optional = true, version = "0.15.4" }
watchexec = { optional = true, version = "2.3.0" }
diesel_migrations = { optional = true, version = "2.1" }
cargo_metadata = { optional = true, version = "0.18.1" }
watchexec = { optional = true, version = "2.3" }
#### tracing = { optional=true, version="0.1" }
#### tracing-subscriber = { optional=true, version="0.3.16", features=["env-filter"] }
clearscreen = { optional = true, version = "2.0" }
open = { optional = true, version = "4.1.0" }
cargo_toml = { optional = true, version = "0.15.2" }
reqwest = { optional = true, version = "0.11.18" }
open = { optional = true, version = "5.1" }
cargo_toml = { optional = true, version = "0.15.3" }
reqwest = { optional = true, version = "0.11.27" }

# plugin_storage
# aws-config = { optional = true, version = "0.14.0" }
aws-types = { optional = true, version = "0.8.0" }
# aws-endpoint = { optional = true, version = "0.14.0" }
aws-sdk-s3 = { optional = true, version = "0.8.0" }
http = { optional = true, version = "0.2.9" }
diesel_derives = { optional = true, version = "2.1.0" }
uuid = { optional = true, version = "1.3.3", features = ["v4", "serde"] }
http = { optional = true, version = "0.2.12" }
diesel_derives = { optional = true, version = "2.1" }
uuid = { optional = true, version = "1.8", features = ["v4", "serde"] }
md5 = { optional = true, version = "0.7.0" }
base64 = { optional = true, version = "0.21.2" }
base64 = { optional = true, version = "0.22.1" }

# plugin_auth-oidc
openidconnect = { optional = true, version = "3.3.0" }
openidconnect = { optional = true, version = "3.5" }

# plugin_utoipa dependencies
utoipa = { optional = true, version = "4", features = [
Expand All @@ -96,37 +96,37 @@ fang = { optional = true, version = "0.10.4", features = ["asynk"] }
##

# poem dependencies
poem = { optional = true, version = "1.3.55", features = [
poem = { optional = true, version = "1.3", features = [
"anyhow",
"cookie",
"static-files",
] }

# actix_web dependencies
# actix-multipart = { optional = true, version = "0.6.0" }
actix-files = { optional = true, version = "0.6.2" }
actix-http = { optional = true, version = "3.3.1" }
actix-web = { optional = true, version = "4.3.1" }
actix-files = { optional = true, version = "0.6.5" }
actix-http = { optional = true, version = "3.6" }
actix-web = { optional = true, version = "4.5" }
# actix-web-httpauth = { optional = true, version = "0.8.0" }
derive_more = { optional = true, version = "0.99.17" }
futures = { optional = true, version = "0.3.28" }
futures = { optional = true, version = "0.3.30" }
# env_logger = { optional = true, version = "0.10.0" }

# axum dependencies (not yet released; only used for plugin_dev)

axum = { optional = true, version = "0.6.18" }
axum = { optional = true, version = "0.7.5" }

##
## MISC - here, we list deps which are required by multiple features but are not required in all configurations
##

mime_guess = { optional = true, version = "2.0.4" } # backend_poem, plugin_storage
anyhow = { optional = true, version = "1.0.71" } # backend_poem, plugin_auth, plugin_dev
anyhow = { optional = true, version = "1" } # backend_poem, plugin_auth, plugin_dev
tokio = { optional = true, version = "1", features = [
"full",
] } # backend_poem, backend_axum, plugin_storage, plugin_tasks
async-priority-channel = "0.1.0" # plugin_dev
futures-util = { optional = true, version = "0.3.28" } # plugin_dev, plugin_storage
futures-util = { optional = true, version = "0.3.30" } # plugin_dev, plugin_storage

[features]
default = [
Expand Down
7 changes: 4 additions & 3 deletions create-rust-app/src/dev/dev_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ pub async fn start(
.with_state(app_state);

println!("Starting dev server @ http://localhost:{dev_port}/");

axum::Server::bind(&format!("0.0.0.0:{dev_port}").parse().unwrap())
.serve(app.into_make_service())
let listener = tokio::net::TcpListener::bind(&format!("0.0.0.0:{dev_port}"))
.await
.unwrap();
axum::serve(listener, app.into_make_service())
.await
.unwrap();
}
Expand Down
22 changes: 11 additions & 11 deletions create-rust-app_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ categories = [
default-run = "create-rust-app"

[dependencies]
Inflector = "0.11.4"
anyhow = "1.0.71"
console = "0.15.7"
dialoguer = "0.10.4"
indoc = "2.0.1"
walkdir = "2.3.3"
rust-embed = { version = "6.6.1", features = ["debug-embed"] }
clap = { version = "4.3", features = ["wrap_help", "derive", "cargo"] }
toml = "0.7.4"
Inflector = "0.11"
anyhow = "1"
console = "0.15.8"
dialoguer = "0.11.0"
indoc = "2.0"
walkdir = "2.5"
rust-embed = { version = "8.3", features = ["debug-embed"] }
clap = { version = "4.5", features = ["wrap_help", "derive", "cargo"] }
toml = "0.7.8"
# tsync = "1"
update-informer = "1.0.0"
qsync = { version = "0.1" }
update-informer = "1.1"
qsync = { version = "1.0.1" }

[[bin]]
name = "create-rust-app"
Expand Down
4 changes: 2 additions & 2 deletions create-rust-app_cli/qsync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ license = "MIT OR Apache-2.0"

[dependencies]
Inflector = "0.11.4"
regex = "1.8.3"
regex = "1.10"
syn = { version = "1", features = ["full", "extra-traits", "parsing"] }
walkdir = "2.3.3"
walkdir = "2.5"
qsync-macro = { version = "0.1.0" }
darling = "0.14.4"
proc-macro2 = "1"
Expand Down
25 changes: 13 additions & 12 deletions create-rust-app_cli/src/content/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,16 @@ pub fn create(project_name: &str, creation_options: CreationOptions) -> Result<(
enabled_features = ", features=[".to_string() + &enabled_features + "]";
}

// TODO: update dependencies to use the latest versions
match framework {
BackendFramework::ActixWeb => {
add_dependency(&project_dir, "actix-files", r#"actix-files = "0.6.0""#)?;
add_dependency(&project_dir, "actix-http", r#"actix-http = "3.0.0""#)?;
add_dependency(&project_dir, "actix-web", r#"actix-web = "4.0.1""#)?;
add_dependency(&project_dir, "actix-http", r#"actix-http = "3.6""#)?;
add_dependency(&project_dir, "actix-web", r#"actix-web = "4.5""#)?;
add_dependency(
&project_dir,
"actix-multipart",
r#"actix-multipart = "0.4.0""#,
r#"actix-multipart = "0.6.0""#,
)?;
add_dependency(
&project_dir,
Expand All @@ -399,12 +400,12 @@ pub fn create(project_name: &str, creation_options: CreationOptions) -> Result<(
add_dependency(
&project_dir,
"poem",
r#"poem = { version="1.3.18", features=["anyhow", "cookie", "static-files", "multipart"] }"#,
r#"poem = { version="1.3", features=["anyhow", "cookie", "static-files", "multipart"] }"#,
)?;
add_dependency(
&project_dir,
"tokio",
r#"tokio = { version = "1.15.0", features = ["rt-multi-thread", "macros"] }"#,
r#"tokio = { version = "1", features = ["rt-multi-thread", "macros"] }"#,
)?;
add_dependency(
&project_dir,
Expand All @@ -413,27 +414,27 @@ pub fn create(project_name: &str, creation_options: CreationOptions) -> Result<(
)?;
}
}
add_dependency(&project_dir, "simple_logger", r#"simple_logger = "4.3.3""#)?;
add_dependency(&project_dir, "futures-util", r#"futures-util = "0.3.21""#)?;
add_dependency(&project_dir, "simple_logger", r#"simple_logger = "5.0""#)?;
add_dependency(&project_dir, "futures-util", r#"futures-util = "0.3.30""#)?;
add_dependency(
&project_dir,
"serde",
r#"serde = { version = "1.0.133", features = ["derive"] }"#,
r#"serde = { version = "1", features = ["derive"] }"#,
)?;
add_dependency(&project_dir, "serde_json", r#"serde_json = "1.0.79""#)?;
add_dependency(&project_dir, "serde_json", r#"serde_json = "1""#)?;
add_dependency(
&project_dir,
"chrono",
r#"chrono = { version = "0.4.19", features = ["serde"] }"#,
r#"chrono = { version = "0.4.38", features = ["serde"] }"#,
)?;
// todo: move these deps to the helper crate (./create-rust-app/Cargo.toml) behind feature flags
add_dependency(&project_dir, "tsync", r#"tsync = "1""#)?;
add_dependency(&project_dir, "tsync", r#"tsync = "2""#)?;
add_dependency(&project_dir, "dsync", r#"dsync = "0""#)?;
add_dependency(
&project_dir,
"diesel",
&format!(
r#"diesel = {{ version="2.0.0-rc.1", default-features = false, features = ["{db}", "r2d2", "chrono"] }}"#,
r#"diesel = {{ version="2.1", default-features = false, features = ["{db}", "r2d2", "chrono"] }}"#,
db = match database {
BackendDatabase::Postgres => "postgres",
BackendDatabase::Sqlite => "sqlite",
Expand Down
13 changes: 11 additions & 2 deletions create-rust-app_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use clap::{
builder::{EnumValueParser, PossibleValue, ValueHint},
Parser, Subcommand, ValueEnum,
};
use qsync::{QsyncInput, QsyncOptions};
use std::path::PathBuf;

use crate::project::CreationOptions;
Expand Down Expand Up @@ -555,10 +556,18 @@ fn configure_project(
};

qsync::process(
qsync_input_files.unwrap_or_else(|| vec![PathBuf::from("backend/services")]),
qsync_input_files
.unwrap_or_else(|| vec![PathBuf::from("backend/services")])
.into_iter()
.map(|path| {
QsyncInput::new(
path,
QsyncOptions::new(qsync_debug, "api".to_string(), vec![]),
)
})
.collect(),
qsync_output_file
.unwrap_or_else(|| PathBuf::from("frontend/src/api.generated.ts")),
qsync_debug,
);
}
1 => {
Expand Down
2 changes: 1 addition & 1 deletion create-rust-app_cli/template/.cargo/bin/tsync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pub fn main() {
let inputs = vec![PathBuf::from_iter([dir, "backend"])];
let output = PathBuf::from_iter([dir, "frontend/src/types/rust.d.ts"]);

tsync::generate_typescript_defs(inputs, output, false);
tsync::generate_typescript_defs(inputs, output, false, false);
}
File renamed without changes.

0 comments on commit 46965a5

Please sign in to comment.