Skip to content

Commit 46965a5

Browse files
Dependency-updates (#369)
* 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>
1 parent 5d1a0cb commit 46965a5

File tree

9 files changed

+1638
-1109
lines changed

9 files changed

+1638
-1109
lines changed

Cargo.lock

Lines changed: 1564 additions & 1046 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-rust-app/Cargo.toml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,66 +20,66 @@ categories = [
2020
##
2121
## COMMON / DEFAULT - required dependencies
2222
##
23-
dotenv = "0.15.0" # + plugin_dev
24-
serde_json = "1.0.96"
25-
lettre = "0.10.4"
26-
tera = { version = "1.18.1" }
27-
lazy_static = { version = "1.4.0" }
28-
serde = { version = "1.0.163", features = ["derive"] }
29-
diesel = { version = "2.1.0", default-features = false, features = [
23+
dotenv = "0.15" # + plugin_dev
24+
serde_json = "1"
25+
lettre = "0.11.7"
26+
tera = { version = "1.19" }
27+
lazy_static = { version = "1.4" }
28+
serde = { version = "1", features = ["derive"] }
29+
diesel = { version = "2.1", default-features = false, features = [
3030
"uuid",
3131
"r2d2",
3232
"chrono",
3333
] } # + plugin_dev, plugin_auth
34-
once_cell = "1.17.1"
34+
once_cell = "1.19"
3535
diesel_logger = "0.3.0"
3636

3737
##
3838
## Database
3939
##
4040

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

4444
##
4545
## PLUGINS
4646
##
4747

4848
# plugin_auth
49-
rust-argon2 = { optional = true, version = "1.0" }
49+
rust-argon2 = { optional = true, version = "2.1" }
5050
rand = { optional = true, version = "0.8.5" }
51-
jsonwebtoken = { optional = true, version = "8.3.0" }
52-
tsync = { optional = true, version = "1.7.0" }
53-
chrono = { optional = true, version = "0.4.24", default-features = false, features = [
51+
jsonwebtoken = { optional = true, version = "9.3" }
52+
tsync = { optional = true, version = "2.1" }
53+
chrono = { optional = true, version = "0.4.38", default-features = false, features = [
5454
"clock",
5555
"serde",
5656
] }
5757
dyn-clone = { optional = true, version = "1.0" } # needed to allow the Mailer struct to be cloned
5858

5959
# plugin_dev
60-
diesel_migrations = { optional = true, version = "2.1.0" }
61-
cargo_metadata = { optional = true, version = "0.15.4" }
62-
watchexec = { optional = true, version = "2.3.0" }
60+
diesel_migrations = { optional = true, version = "2.1" }
61+
cargo_metadata = { optional = true, version = "0.18.1" }
62+
watchexec = { optional = true, version = "2.3" }
6363
#### tracing = { optional=true, version="0.1" }
6464
#### tracing-subscriber = { optional=true, version="0.3.16", features=["env-filter"] }
6565
clearscreen = { optional = true, version = "2.0" }
66-
open = { optional = true, version = "4.1.0" }
67-
cargo_toml = { optional = true, version = "0.15.2" }
68-
reqwest = { optional = true, version = "0.11.18" }
66+
open = { optional = true, version = "5.1" }
67+
cargo_toml = { optional = true, version = "0.15.3" }
68+
reqwest = { optional = true, version = "0.11.27" }
6969

7070
# plugin_storage
7171
# aws-config = { optional = true, version = "0.14.0" }
7272
aws-types = { optional = true, version = "0.8.0" }
7373
# aws-endpoint = { optional = true, version = "0.14.0" }
7474
aws-sdk-s3 = { optional = true, version = "0.8.0" }
75-
http = { optional = true, version = "0.2.9" }
76-
diesel_derives = { optional = true, version = "2.1.0" }
77-
uuid = { optional = true, version = "1.3.3", features = ["v4", "serde"] }
75+
http = { optional = true, version = "0.2.12" }
76+
diesel_derives = { optional = true, version = "2.1" }
77+
uuid = { optional = true, version = "1.8", features = ["v4", "serde"] }
7878
md5 = { optional = true, version = "0.7.0" }
79-
base64 = { optional = true, version = "0.21.2" }
79+
base64 = { optional = true, version = "0.22.1" }
8080

8181
# plugin_auth-oidc
82-
openidconnect = { optional = true, version = "3.3.0" }
82+
openidconnect = { optional = true, version = "3.5" }
8383

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

9898
# poem dependencies
99-
poem = { optional = true, version = "1.3.55", features = [
99+
poem = { optional = true, version = "1.3", features = [
100100
"anyhow",
101101
"cookie",
102102
"static-files",
103103
] }
104104

105105
# actix_web dependencies
106106
# actix-multipart = { optional = true, version = "0.6.0" }
107-
actix-files = { optional = true, version = "0.6.2" }
108-
actix-http = { optional = true, version = "3.3.1" }
109-
actix-web = { optional = true, version = "4.3.1" }
107+
actix-files = { optional = true, version = "0.6.5" }
108+
actix-http = { optional = true, version = "3.6" }
109+
actix-web = { optional = true, version = "4.5" }
110110
# actix-web-httpauth = { optional = true, version = "0.8.0" }
111111
derive_more = { optional = true, version = "0.99.17" }
112-
futures = { optional = true, version = "0.3.28" }
112+
futures = { optional = true, version = "0.3.30" }
113113
# env_logger = { optional = true, version = "0.10.0" }
114114

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

117-
axum = { optional = true, version = "0.6.18" }
117+
axum = { optional = true, version = "0.7.5" }
118118

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

123123
mime_guess = { optional = true, version = "2.0.4" } # backend_poem, plugin_storage
124-
anyhow = { optional = true, version = "1.0.71" } # backend_poem, plugin_auth, plugin_dev
124+
anyhow = { optional = true, version = "1" } # backend_poem, plugin_auth, plugin_dev
125125
tokio = { optional = true, version = "1", features = [
126126
"full",
127127
] } # backend_poem, backend_axum, plugin_storage, plugin_tasks
128128
async-priority-channel = "0.1.0" # plugin_dev
129-
futures-util = { optional = true, version = "0.3.28" } # plugin_dev, plugin_storage
129+
futures-util = { optional = true, version = "0.3.30" } # plugin_dev, plugin_storage
130130

131131
[features]
132132
default = [

create-rust-app/src/dev/dev_server.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ pub async fn start(
9090
.with_state(app_state);
9191

9292
println!("Starting dev server @ http://localhost:{dev_port}/");
93-
94-
axum::Server::bind(&format!("0.0.0.0:{dev_port}").parse().unwrap())
95-
.serve(app.into_make_service())
93+
let listener = tokio::net::TcpListener::bind(&format!("0.0.0.0:{dev_port}"))
94+
.await
95+
.unwrap();
96+
axum::serve(listener, app.into_make_service())
9697
.await
9798
.unwrap();
9899
}

create-rust-app_cli/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ categories = [
1818
default-run = "create-rust-app"
1919

2020
[dependencies]
21-
Inflector = "0.11.4"
22-
anyhow = "1.0.71"
23-
console = "0.15.7"
24-
dialoguer = "0.10.4"
25-
indoc = "2.0.1"
26-
walkdir = "2.3.3"
27-
rust-embed = { version = "6.6.1", features = ["debug-embed"] }
28-
clap = { version = "4.3", features = ["wrap_help", "derive", "cargo"] }
29-
toml = "0.7.4"
21+
Inflector = "0.11"
22+
anyhow = "1"
23+
console = "0.15.8"
24+
dialoguer = "0.11.0"
25+
indoc = "2.0"
26+
walkdir = "2.5"
27+
rust-embed = { version = "8.3", features = ["debug-embed"] }
28+
clap = { version = "4.5", features = ["wrap_help", "derive", "cargo"] }
29+
toml = "0.7.8"
3030
# tsync = "1"
31-
update-informer = "1.0.0"
32-
qsync = { version = "0.1" }
31+
update-informer = "1.1"
32+
qsync = { version = "1.0.1" }
3333

3434
[[bin]]
3535
name = "create-rust-app"

create-rust-app_cli/qsync/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ license = "MIT OR Apache-2.0"
77

88
[dependencies]
99
Inflector = "0.11.4"
10-
regex = "1.8.3"
10+
regex = "1.10"
1111
syn = { version = "1", features = ["full", "extra-traits", "parsing"] }
12-
walkdir = "2.3.3"
12+
walkdir = "2.5"
1313
qsync-macro = { version = "0.1.0" }
1414
darling = "0.14.4"
1515
proc-macro2 = "1"

create-rust-app_cli/src/content/project.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,16 @@ pub fn create(project_name: &str, creation_options: CreationOptions) -> Result<(
379379
enabled_features = ", features=[".to_string() + &enabled_features + "]";
380380
}
381381

382+
// TODO: update dependencies to use the latest versions
382383
match framework {
383384
BackendFramework::ActixWeb => {
384385
add_dependency(&project_dir, "actix-files", r#"actix-files = "0.6.0""#)?;
385-
add_dependency(&project_dir, "actix-http", r#"actix-http = "3.0.0""#)?;
386-
add_dependency(&project_dir, "actix-web", r#"actix-web = "4.0.1""#)?;
386+
add_dependency(&project_dir, "actix-http", r#"actix-http = "3.6""#)?;
387+
add_dependency(&project_dir, "actix-web", r#"actix-web = "4.5""#)?;
387388
add_dependency(
388389
&project_dir,
389390
"actix-multipart",
390-
r#"actix-multipart = "0.4.0""#,
391+
r#"actix-multipart = "0.6.0""#,
391392
)?;
392393
add_dependency(
393394
&project_dir,
@@ -399,12 +400,12 @@ pub fn create(project_name: &str, creation_options: CreationOptions) -> Result<(
399400
add_dependency(
400401
&project_dir,
401402
"poem",
402-
r#"poem = { version="1.3.18", features=["anyhow", "cookie", "static-files", "multipart"] }"#,
403+
r#"poem = { version="1.3", features=["anyhow", "cookie", "static-files", "multipart"] }"#,
403404
)?;
404405
add_dependency(
405406
&project_dir,
406407
"tokio",
407-
r#"tokio = { version = "1.15.0", features = ["rt-multi-thread", "macros"] }"#,
408+
r#"tokio = { version = "1", features = ["rt-multi-thread", "macros"] }"#,
408409
)?;
409410
add_dependency(
410411
&project_dir,
@@ -413,27 +414,27 @@ pub fn create(project_name: &str, creation_options: CreationOptions) -> Result<(
413414
)?;
414415
}
415416
}
416-
add_dependency(&project_dir, "simple_logger", r#"simple_logger = "4.3.3""#)?;
417-
add_dependency(&project_dir, "futures-util", r#"futures-util = "0.3.21""#)?;
417+
add_dependency(&project_dir, "simple_logger", r#"simple_logger = "5.0""#)?;
418+
add_dependency(&project_dir, "futures-util", r#"futures-util = "0.3.30""#)?;
418419
add_dependency(
419420
&project_dir,
420421
"serde",
421-
r#"serde = { version = "1.0.133", features = ["derive"] }"#,
422+
r#"serde = { version = "1", features = ["derive"] }"#,
422423
)?;
423-
add_dependency(&project_dir, "serde_json", r#"serde_json = "1.0.79""#)?;
424+
add_dependency(&project_dir, "serde_json", r#"serde_json = "1""#)?;
424425
add_dependency(
425426
&project_dir,
426427
"chrono",
427-
r#"chrono = { version = "0.4.19", features = ["serde"] }"#,
428+
r#"chrono = { version = "0.4.38", features = ["serde"] }"#,
428429
)?;
429430
// todo: move these deps to the helper crate (./create-rust-app/Cargo.toml) behind feature flags
430-
add_dependency(&project_dir, "tsync", r#"tsync = "1""#)?;
431+
add_dependency(&project_dir, "tsync", r#"tsync = "2""#)?;
431432
add_dependency(&project_dir, "dsync", r#"dsync = "0""#)?;
432433
add_dependency(
433434
&project_dir,
434435
"diesel",
435436
&format!(
436-
r#"diesel = {{ version="2.0.0-rc.1", default-features = false, features = ["{db}", "r2d2", "chrono"] }}"#,
437+
r#"diesel = {{ version="2.1", default-features = false, features = ["{db}", "r2d2", "chrono"] }}"#,
437438
db = match database {
438439
BackendDatabase::Postgres => "postgres",
439440
BackendDatabase::Sqlite => "sqlite",

create-rust-app_cli/src/main.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use clap::{
99
builder::{EnumValueParser, PossibleValue, ValueHint},
1010
Parser, Subcommand, ValueEnum,
1111
};
12+
use qsync::{QsyncInput, QsyncOptions};
1213
use std::path::PathBuf;
1314

1415
use crate::project::CreationOptions;
@@ -555,10 +556,18 @@ fn configure_project(
555556
};
556557

557558
qsync::process(
558-
qsync_input_files.unwrap_or_else(|| vec![PathBuf::from("backend/services")]),
559+
qsync_input_files
560+
.unwrap_or_else(|| vec![PathBuf::from("backend/services")])
561+
.into_iter()
562+
.map(|path| {
563+
QsyncInput::new(
564+
path,
565+
QsyncOptions::new(qsync_debug, "api".to_string(), vec![]),
566+
)
567+
})
568+
.collect(),
559569
qsync_output_file
560570
.unwrap_or_else(|| PathBuf::from("frontend/src/api.generated.ts")),
561-
qsync_debug,
562571
);
563572
}
564573
1 => {

create-rust-app_cli/template/.cargo/bin/tsync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ pub fn main() {
66
let inputs = vec![PathBuf::from_iter([dir, "backend"])];
77
let output = PathBuf::from_iter([dir, "frontend/src/types/rust.d.ts"]);
88

9-
tsync::generate_typescript_defs(inputs, output, false);
9+
tsync::generate_typescript_defs(inputs, output, false, false);
1010
}

0 commit comments

Comments
 (0)