From 5e6bf60acf9d43f9838bd2e451031de9dce8be29 Mon Sep 17 00:00:00 2001 From: Emmanuel Gautier Date: Fri, 29 Mar 2024 00:34:28 +0100 Subject: [PATCH] chore: prepare for crate publishing --- .github/workflows/release.yml | 2 +- .vscode/launch.json | 6 +++--- Cargo.lock | 6 +++--- Cargo.toml | 2 +- baffao-proxy/Cargo.toml | 12 ++++++++---- {baffao-core => baffao}/Cargo.toml | 2 +- {baffao-core => baffao}/src/cookies.rs | 0 {baffao-core => baffao}/src/error.rs | 0 {baffao-core => baffao}/src/handlers/authorize.rs | 0 {baffao-core => baffao}/src/handlers/callback.rs | 0 {baffao-core => baffao}/src/handlers/get_session.rs | 0 {baffao-core => baffao}/src/handlers/mod.rs | 0 {baffao-core => baffao}/src/handlers/proxy.rs | 0 {baffao-core => baffao}/src/lib.rs | 0 {baffao-core => baffao}/src/oauth/client.rs | 0 {baffao-core => baffao}/src/oauth/http.rs | 0 {baffao-core => baffao}/src/oauth/mod.rs | 0 .../src/session/extract_session.rs | 0 {baffao-core => baffao}/src/session/mod.rs | 0 .../src/session/update_session.rs | 0 {baffao-core => baffao}/src/settings.rs | 0 21 files changed, 17 insertions(+), 13 deletions(-) rename {baffao-core => baffao}/Cargo.toml (95%) rename {baffao-core => baffao}/src/cookies.rs (100%) rename {baffao-core => baffao}/src/error.rs (100%) rename {baffao-core => baffao}/src/handlers/authorize.rs (100%) rename {baffao-core => baffao}/src/handlers/callback.rs (100%) rename {baffao-core => baffao}/src/handlers/get_session.rs (100%) rename {baffao-core => baffao}/src/handlers/mod.rs (100%) rename {baffao-core => baffao}/src/handlers/proxy.rs (100%) rename {baffao-core => baffao}/src/lib.rs (100%) rename {baffao-core => baffao}/src/oauth/client.rs (100%) rename {baffao-core => baffao}/src/oauth/http.rs (100%) rename {baffao-core => baffao}/src/oauth/mod.rs (100%) rename {baffao-core => baffao}/src/session/extract_session.rs (100%) rename {baffao-core => baffao}/src/session/mod.rs (100%) rename {baffao-core => baffao}/src/session/update_session.rs (100%) rename {baffao-core => baffao}/src/settings.rs (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75450c2..b4bb4b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,6 +89,6 @@ jobs: - name: Install stable toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo publish -p baffao-core + - run: cargo publish -p baffao env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.vscode/launch.json b/.vscode/launch.json index 3afe821..45e0082 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,16 +7,16 @@ { "type": "lldb", "request": "launch", - "name": "Debug unit tests in library 'baffao-core'", + "name": "Debug unit tests in library 'baffao'", "cargo": { "args": [ "test", "--no-run", "--lib", - "--package=baffao-core" + "--package=baffao" ], "filter": { - "name": "baffao-core", + "name": "baffao", "kind": "lib" } }, diff --git a/Cargo.lock b/Cargo.lock index 2b0bd76..ec0a686 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,7 +158,7 @@ dependencies = [ ] [[package]] -name = "baffao-core" +name = "baffao" version = "0.1.0" dependencies = [ "anyhow", @@ -179,11 +179,11 @@ dependencies = [ [[package]] name = "baffao-proxy" -version = "0.1.0" +version = "0.0.1" dependencies = [ "axum", "axum-extra", - "baffao-core", + "baffao", "config", "hyper 1.2.0", "hyper-util", diff --git a/Cargo.toml b/Cargo.toml index 81ca844..eb82da2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,6 @@ resolver = "2" members = [ - "baffao-core", + "baffao", "baffao-proxy", ] diff --git a/baffao-proxy/Cargo.toml b/baffao-proxy/Cargo.toml index a5a2456..26132eb 100644 --- a/baffao-proxy/Cargo.toml +++ b/baffao-proxy/Cargo.toml @@ -1,14 +1,18 @@ [package] name = "baffao-proxy" -version = "0.1.0" +version = "0.0.1" +authors = ["CerberAuth "] +repository = "https://github.com/cerberauth/baffao" +keywords = ["proxy", "oauth2", "authentication", "authorization", "auth"] +license = "MIT" +description = "BAckend For Frontend for your SPA authentication and authorization." edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +readme = "./README.md" [dependencies] axum = "0.7.4" axum-extra = { version = "0.9.2", features = ["typed-header", "cookie"] } -baffao-core = { path = "../baffao-core" } +baffao = { path = "../baffao" } config = "0.14.0" hyper = { version = "1.2.0", features = ["full"] } hyper-util = { version = "0.1.3", features = ["client-legacy"] } diff --git a/baffao-core/Cargo.toml b/baffao/Cargo.toml similarity index 95% rename from baffao-core/Cargo.toml rename to baffao/Cargo.toml index 1705fe7..d6527cb 100644 --- a/baffao-core/Cargo.toml +++ b/baffao/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "baffao-core" +name = "baffao" version = "0.1.0" edition = "2021" diff --git a/baffao-core/src/cookies.rs b/baffao/src/cookies.rs similarity index 100% rename from baffao-core/src/cookies.rs rename to baffao/src/cookies.rs diff --git a/baffao-core/src/error.rs b/baffao/src/error.rs similarity index 100% rename from baffao-core/src/error.rs rename to baffao/src/error.rs diff --git a/baffao-core/src/handlers/authorize.rs b/baffao/src/handlers/authorize.rs similarity index 100% rename from baffao-core/src/handlers/authorize.rs rename to baffao/src/handlers/authorize.rs diff --git a/baffao-core/src/handlers/callback.rs b/baffao/src/handlers/callback.rs similarity index 100% rename from baffao-core/src/handlers/callback.rs rename to baffao/src/handlers/callback.rs diff --git a/baffao-core/src/handlers/get_session.rs b/baffao/src/handlers/get_session.rs similarity index 100% rename from baffao-core/src/handlers/get_session.rs rename to baffao/src/handlers/get_session.rs diff --git a/baffao-core/src/handlers/mod.rs b/baffao/src/handlers/mod.rs similarity index 100% rename from baffao-core/src/handlers/mod.rs rename to baffao/src/handlers/mod.rs diff --git a/baffao-core/src/handlers/proxy.rs b/baffao/src/handlers/proxy.rs similarity index 100% rename from baffao-core/src/handlers/proxy.rs rename to baffao/src/handlers/proxy.rs diff --git a/baffao-core/src/lib.rs b/baffao/src/lib.rs similarity index 100% rename from baffao-core/src/lib.rs rename to baffao/src/lib.rs diff --git a/baffao-core/src/oauth/client.rs b/baffao/src/oauth/client.rs similarity index 100% rename from baffao-core/src/oauth/client.rs rename to baffao/src/oauth/client.rs diff --git a/baffao-core/src/oauth/http.rs b/baffao/src/oauth/http.rs similarity index 100% rename from baffao-core/src/oauth/http.rs rename to baffao/src/oauth/http.rs diff --git a/baffao-core/src/oauth/mod.rs b/baffao/src/oauth/mod.rs similarity index 100% rename from baffao-core/src/oauth/mod.rs rename to baffao/src/oauth/mod.rs diff --git a/baffao-core/src/session/extract_session.rs b/baffao/src/session/extract_session.rs similarity index 100% rename from baffao-core/src/session/extract_session.rs rename to baffao/src/session/extract_session.rs diff --git a/baffao-core/src/session/mod.rs b/baffao/src/session/mod.rs similarity index 100% rename from baffao-core/src/session/mod.rs rename to baffao/src/session/mod.rs diff --git a/baffao-core/src/session/update_session.rs b/baffao/src/session/update_session.rs similarity index 100% rename from baffao-core/src/session/update_session.rs rename to baffao/src/session/update_session.rs diff --git a/baffao-core/src/settings.rs b/baffao/src/settings.rs similarity index 100% rename from baffao-core/src/settings.rs rename to baffao/src/settings.rs