Skip to content

Commit

Permalink
Merge pull request #166 from shuttle-hq/develop
Browse files Browse the repository at this point in the history
chore: merge develop into main for v0.44.0 release
  • Loading branch information
oddgrd authored Apr 23, 2024
2 parents 2c2302f + db65300 commit bf8b4aa
Show file tree
Hide file tree
Showing 49 changed files with 132 additions and 134 deletions.
4 changes: 2 additions & 2 deletions actix-web/clerk/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ clerk-rs = "0.2.3"
openssl-sys = { version = "0.9.9", features = ["vendored"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
shuttle-actix-web = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-actix-web = "0.44.0"
shuttle-runtime = "0.44.0"
4 changes: 2 additions & 2 deletions actix-web/cookie-authentication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2021"
actix-identity = "0.6.0"
actix-session = { version = "0.8.0", features = ["cookie-session"] }
actix-web = "4.3.1"
shuttle-actix-web = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-actix-web = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
4 changes: 2 additions & 2 deletions actix-web/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ edition = "2021"

[dependencies]
actix-web = "4.3.1"
shuttle-actix-web = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-actix-web = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
6 changes: 3 additions & 3 deletions actix-web/postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
actix-web = "4.3.1"
shuttle-actix-web = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-actix-web = "0.44.0"
shuttle-runtime = "0.44.0"
serde = "1.0.148"
shuttle-shared-db = { version = "0.43.0", features = ["postgres", "sqlx"] }
shuttle-shared-db = { version = "0.44.0", features = ["postgres", "sqlx"] }
sqlx = "0.7.1"
tokio = "1.26.0"
4 changes: 2 additions & 2 deletions actix-web/static-files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
[dependencies]
actix-files = "0.6.2"
actix-web = "4.3.1"
shuttle-actix-web = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-actix-web = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
4 changes: 2 additions & 2 deletions actix-web/websocket-actorless/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ futures = "0.3"
reqwest = "0.11"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
shuttle-actix-web = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-actix-web = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = { version = "1", features = ["rt-multi-thread", "sync"] }
tracing = "0.1"
4 changes: 2 additions & 2 deletions axum/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ edition = "2021"

[dependencies]
axum = "0.7.4"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
6 changes: 3 additions & 3 deletions axum/htmx-crud/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ askama_axum = "0.4.0"
axum = "0.7.4"
serde = { version = "1.0.189", features = ["derive"] }
serde_json = "1.0.107"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-shared-db = { version = "0.43.0", features = ["postgres", "sqlx"] }
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
shuttle-shared-db = { version = "0.44.0", features = ["postgres", "sqlx"] }
sqlx = { version = "0.7.2", features = ["runtime-tokio-rustls", "postgres"] }
tokio = "1.28.2"
tokio-stream = { version = "0.1.14", features = ["sync"] }
4 changes: 2 additions & 2 deletions axum/jwt-authentication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jsonwebtoken = "8.3.0"
once_cell = "1.18.0"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
tracing-subscriber = "0.3.17"
4 changes: 2 additions & 2 deletions axum/metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ edition = "2021"

[dependencies]
axum = "0.7.3"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
6 changes: 3 additions & 3 deletions axum/oauth2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ chrono = { version = "0.4.35", features = ["clock"] }
oauth2 = "4.4.1"
reqwest = { version = "0.11.18", features = ["json"] }
serde = { version = "1.0.183", features = ["derive"] }
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-shared-db = { version = "0.43.0", features = ["postgres", "sqlx"] }
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
shuttle-shared-db = { version = "0.44.0", features = ["postgres", "sqlx"] }
sqlx = { version = "0.7.2", features = ["runtime-tokio-rustls", "macros", "chrono"] }
thiserror = "1.0.57"
time = "0.3.25"
Expand Down
6 changes: 3 additions & 3 deletions axum/postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
[dependencies]
axum = "0.7.3"
serde = { version = "1.0.188", features = ["derive"] }
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-shared-db = { version = "0.43.0", features = ["postgres", "sqlx"] }
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
shuttle-shared-db = { version = "0.44.0", features = ["postgres", "sqlx"] }
sqlx = "0.7.1"
tokio = "1.28.2"
6 changes: 3 additions & 3 deletions axum/qdrant/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
axum = "0.7.3"
qdrant-client = "1.7.0"
shuttle-axum = "0.43.0"
shuttle-qdrant = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-qdrant = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
4 changes: 2 additions & 2 deletions axum/static-files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false

[dependencies]
axum = "0.7.3"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
tower-http = { version = "0.5.0", features = ["fs"] }
6 changes: 3 additions & 3 deletions axum/turso/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
axum = "0.7.3"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-turso = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
shuttle-turso = "0.44.0"
libsql = "0.3.1"
tokio = "1.26.0"
serde = { version = "1.0.164", features = ["derive"] }
Expand Down
45 changes: 22 additions & 23 deletions axum/turso/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use std::sync::Arc;

use axum::{extract::State, response::IntoResponse, routing::get, Json, Router};
use libsql::Connection;
use libsql::Database;
use serde::{Deserialize, Serialize};

async fn get_posts(State(client): State<Arc<Connection>>) -> Json<Vec<User>> {
let mut rows = client
.query("select * from example_users", ())
.await
.unwrap();
async fn get_posts(State(client): State<Arc<Database>>) -> Json<Vec<User>> {
let conn = client.connect().unwrap();

let mut rows = conn.query("select * from example_users", ()).await.unwrap();
let mut users = vec![];
while let Some(row) = rows.next().await.unwrap() {
users.push(User {
Expand All @@ -26,34 +25,34 @@ struct User {
}

async fn create_users(
State(client): State<Arc<Connection>>,
State(client): State<Arc<Database>>,
Json(user): Json<User>,
) -> impl IntoResponse {
client
.execute(
"insert into example_users (uid, email) values (?1, ?2)",
[user.uid, user.email],
)
.await
.unwrap();
let conn = client.connect().unwrap();
conn.execute(
"insert into example_users (uid, email) values (?1, ?2)",
[user.uid, user.email],
)
.await
.unwrap();

Json(serde_json::json!({ "ok": true }))
}

#[shuttle_runtime::main]
async fn axum(
#[shuttle_turso::Turso(addr = "libsql://your-db.turso.io", token = "{secrets.TURSO_DB_TOKEN}")]
client: Connection,
client: Database,
) -> shuttle_axum::ShuttleAxum {
let client = Arc::new(client);

client
.execute(
"create table if not exists example_users ( uid text primary key, email text );",
(),
)
.await
.unwrap();
let conn = client.connect().unwrap();

conn.execute(
"create table if not exists example_users ( uid text primary key, email text );",
(),
)
.await
.unwrap();

let router = Router::new()
.route("/", get(get_posts).post(create_users))
Expand Down
4 changes: 2 additions & 2 deletions axum/websocket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ futures = "0.3.28"
reqwest = "0.11.23"
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.96"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
tower-http = { version = "0.5.0", features = ["fs"] }
4 changes: 2 additions & 2 deletions bevy/hello-world/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
axum = "0.7.4"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
tower-http = { version = "0.5.0", features = ["fs"] }
6 changes: 3 additions & 3 deletions custom-resource/pdo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
async-trait = "0.1.56"
axum = "0.7.3"
serde = { version = "1", features = ["derive"] }
shuttle-service = "0.43.0"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-service = "0.44.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
2 changes: 1 addition & 1 deletion custom-service/none/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ edition = "2021"
publish = false

[dependencies]
shuttle-runtime = "0.43.0"
shuttle-runtime = "0.44.0"
tokio = "1"
4 changes: 2 additions & 2 deletions custom-service/request-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ chrono = "0.4.24"
cron = "0.12.0"
reqwest = "0.11.17"
serde = "1.0.163"
shuttle-persist = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-persist = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.0"
tracing = "0.1.37"
6 changes: 3 additions & 3 deletions custom-service/request-scheduler/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use axum::{
use shuttle_persist::PersistError;

#[derive(Debug)]
pub(crate) struct CrontabServiceError(PersistError);
pub(crate) struct CrontabServiceError;

impl From<PersistError> for CrontabServiceError {
fn from(err: PersistError) -> Self {
Self(err)
fn from(_err: PersistError) -> Self {
Self
}
}

Expand Down
6 changes: 3 additions & 3 deletions fullstack-templates/saas/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ lettre = "0.11.4"
rand = "0.8.5"
reqwest = "0.11.16"
serde = { version = "1.0.160", features = ["derive"] }
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-shared-db = { version = "0.43.0", features = ["postgres", "sqlx"] }
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
shuttle-shared-db = { version = "0.44.0", features = ["postgres", "sqlx"] }
sqlx = { version = "0.7.1", features = ["time"] }
time = { version = "0.3.20", features = ["serde"] }
tokio = "1.27.0"
Expand Down
4 changes: 2 additions & 2 deletions loco/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ async-trait = "0.1.74"
axum = "0.7.1"
eyre = "*"
loco-rs = { version = "0.3.1", default-features = false, features = ["cli"] }
shuttle-axum = "0.43.0"
shuttle-runtime = { version = "0.43.0", default-features = false }
shuttle-axum = "0.44.0"
shuttle-runtime = { version = "0.44.0", default-features = false }
serde = "*"
serde_json = "*"
tokio = "1.33.0"
Expand Down
4 changes: 2 additions & 2 deletions other/standalone-binary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ path = "src/bin/standalone.rs"
[dependencies]
axum = "0.7.3"
dotenvy = "0.15.7"
shuttle-axum = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-axum = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.28.2"
6 changes: 3 additions & 3 deletions poem/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
poem = "2.0.0"
shuttle-poem = "0.43.0"
shuttle-runtime = "0.43.0"
poem = "3.0.0"
shuttle-poem = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
8 changes: 4 additions & 4 deletions poem/mongodb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ edition = "2021"

[dependencies]
mongodb = "2.4.0"
poem = "2.0.0"
shuttle-poem = "0.43.0"
shuttle-shared-db = { version = "0.43.0", features = ["mongodb"] }
shuttle-runtime = "0.43.0"
poem = "3.0.0"
shuttle-poem = "0.44.0"
shuttle-shared-db = { version = "0.44.0", features = ["mongodb"] }
shuttle-runtime = "0.44.0"
serde = { version = "1.0.148", features = ["derive"] }
serde_json = "1.0.89"
tokio = "1.26.0"
1 change: 0 additions & 1 deletion poem/mongodb/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use shuttle_poem::ShuttlePoem;

struct ObjectIdGuard(ObjectId);

#[poem::async_trait]
impl<'a> FromRequest<'a> for ObjectIdGuard {
async fn from_request(req: &'a Request, _body: &mut RequestBody) -> Result<Self> {
let id = req.path_params::<String>()?;
Expand Down
4 changes: 2 additions & 2 deletions poise/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ publish = false
[dependencies]
anyhow = "1.0.68"
poise = "0.6.1"
shuttle-runtime = "0.43.0"
shuttle-runtime = "0.44.0"
# Since poise is a serenity command framework, it can run on Shuttle with shuttle-serenity
shuttle-serenity = "0.43.0"
shuttle-serenity = "0.44.0"
tracing = "0.1.37"
tokio = "1.26.0"
4 changes: 2 additions & 2 deletions rocket/dyn-templates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
[dependencies]
rocket = "0.5.0"
rocket_dyn_templates = { version = "0.1.0", features = ["handlebars"] }
shuttle-rocket = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-rocket = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
4 changes: 2 additions & 2 deletions rocket/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ edition = "2021"

[dependencies]
rocket = "0.5.0"
shuttle-rocket = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-rocket = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
4 changes: 2 additions & 2 deletions rocket/jwt-authentication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jsonwebtoken = { version = "8.1.1", default-features = false }
lazy_static = "1.4.0"
rocket = { version = "0.5.0", features = ["json"] }
serde = { version = "1.0.148", features = ["derive"] }
shuttle-rocket = "0.43.0"
shuttle-runtime = "0.43.0"
shuttle-rocket = "0.44.0"
shuttle-runtime = "0.44.0"
tokio = "1.26.0"
Loading

0 comments on commit bf8b4aa

Please sign in to comment.