diff --git a/backend/Cargo.lock b/backend/Cargo.lock index ef153d1..63a3c44 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -632,58 +632,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "backend" -version = "0.1.0" -dependencies = [ - "anyhow", - "argon2", - "async-trait", - "aws-config", - "aws-credential-types", - "aws-sdk-s3", - "axum", - "axum-extra", - "base64 0.21.7", - "bytes", - "chrono", - "diesel", - "diesel_migrations", - "dotenv", - "envy", - "futures-util", - "hex", - "http-body-util", - "hyper 1.7.0", - "image", - "jsonwebtoken", - "mime_guess", - "once_cell", - "pdfium-render", - "percent-encoding", - "quick-xml", - "rand 0.8.5", - "reqwest", - "serde", - "serde-aux", - "serde_bytes", - "serde_cbor_2", - "serde_json", - "sha2", - "tempfile", - "thiserror 1.0.69", - "tokio", - "tower 0.4.13", - "tower-http", - "tracing", - "tracing-subscriber", - "url", - "utoipa", - "uuid", - "webauthn-rs", - "webauthn-rs-core", -] - [[package]] name = "backtrace" version = "0.3.76" @@ -2350,6 +2298,58 @@ dependencies = [ "sha2", ] +[[package]] +name = "papercrate" +version = "0.1.0" +dependencies = [ + "anyhow", + "argon2", + "async-trait", + "aws-config", + "aws-credential-types", + "aws-sdk-s3", + "axum", + "axum-extra", + "base64 0.21.7", + "bytes", + "chrono", + "diesel", + "diesel_migrations", + "dotenv", + "envy", + "futures-util", + "hex", + "http-body-util", + "hyper 1.7.0", + "image", + "jsonwebtoken", + "mime_guess", + "once_cell", + "pdfium-render", + "percent-encoding", + "quick-xml", + "rand 0.8.5", + "reqwest", + "serde", + "serde-aux", + "serde_bytes", + "serde_cbor_2", + "serde_json", + "sha2", + "tempfile", + "thiserror 1.0.69", + "tokio", + "tower 0.4.13", + "tower-http", + "tracing", + "tracing-subscriber", + "url", + "utoipa", + "uuid", + "webauthn-rs", + "webauthn-rs-core", +] + [[package]] name = "parking_lot" version = "0.12.5" diff --git a/backend/Cargo.toml b/backend/Cargo.toml index b65b5be..c8c454b 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "backend" +name = "papercrate" version = "0.1.0" edition = "2021" @@ -68,3 +68,22 @@ once_cell = "1.19" hyper = "1.2" http-body-util = "0.1" webauthn-rs-core = "0.5" + +[[bin]] +name = "backend" +path = "src/main.rs" +[[bin]] +name = "worker" +path = "src/bin/worker.rs" + +[[bin]] +name = "webdav" +path = "src/bin/webdav.rs" + +[[bin]] +name = "admin" +path = "src/bin/admin.rs" + +[[bin]] +name = "openapi-dump" +path = "src/bin/openapi_dump.rs" diff --git a/backend/src/bin/admin.rs b/backend/src/bin/admin.rs index df3109b..1100521 100644 --- a/backend/src/bin/admin.rs +++ b/backend/src/bin/admin.rs @@ -6,7 +6,7 @@ use diesel::{dsl::exists, prelude::*, select}; use reqwest::{Client, Method, StatusCode}; use uuid::Uuid; -use backend::{ +use papercrate::{ config::AppConfig, db::{self, PgPool}, documents::search::ensure_quickwit_index, diff --git a/backend/src/bin/openapi_dump.rs b/backend/src/bin/openapi_dump.rs index dfc49da..0ad06a4 100644 --- a/backend/src/bin/openapi_dump.rs +++ b/backend/src/bin/openapi_dump.rs @@ -1,4 +1,4 @@ -use backend::openapi::ApiDoc; +use papercrate::openapi::ApiDoc; use utoipa::OpenApi; fn main() { diff --git a/backend/src/bin/webdav.rs b/backend/src/bin/webdav.rs index 7ea88e0..8d5a85c 100644 --- a/backend/src/bin/webdav.rs +++ b/backend/src/bin/webdav.rs @@ -3,7 +3,7 @@ use std::net::SocketAddr; use tokio::net::TcpListener; use tower::make::Shared; -use backend::{routes::webdav, utils::bootstrap::init_component}; +use papercrate::{routes::webdav, utils::bootstrap::init_component}; #[tokio::main] async fn main() -> anyhow::Result<()> { diff --git a/backend/src/bin/worker.rs b/backend/src/bin/worker.rs index 66ab151..decc3c1 100644 --- a/backend/src/bin/worker.rs +++ b/backend/src/bin/worker.rs @@ -2,7 +2,7 @@ use std::time::Duration; use tokio::signal; -use backend::{default_handlers, utils::bootstrap::init_component, Worker}; +use papercrate::{default_handlers, utils::bootstrap::init_component, Worker}; #[tokio::main] async fn main() -> anyhow::Result<()> { diff --git a/backend/src/main.rs b/backend/src/main.rs index 7c52b98..212c59e 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -3,7 +3,7 @@ use std::net::SocketAddr; use tokio::net::TcpListener; use tower::make::Shared; -use backend::{routes, utils::bootstrap::init_component}; +use papercrate::{routes, utils::bootstrap::init_component}; #[tokio::main] async fn main() -> anyhow::Result<()> {