Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
with:
tool: cargo-hack@0.6.6
- uses: Swatinem/rust-cache@v2
- run: cargo hack --verbose check --feature-powerset --depth=3 --at-least-one-of=postgresql-index-backend,filesystem-index-backend --at-least-one-of=postgresql-auth-backend,filesystem-auth-backend --no-dev-deps --workspace
- run: cargo hack --verbose check --feature-powerset --depth=3 --at-least-one-of=postgresql-index-backend,filesystem-index-backend -F filesystem-auth-backend --ignore-unknown-features --no-dev-deps --workspace

clippy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
with:
tool: cargo-hack@0.6.6
- uses: Swatinem/rust-cache@v2
- run: cargo hack --verbose test --features=postgresql-index-backend,postgresql-auth-backend --ignore-unknown-features --each-feature --exclude-features test_e2e --workspace
- run: cargo hack --verbose test --features=postgresql-index-backend --ignore-unknown-features --each-feature --exclude-features test_e2e --workspace

minimal-versions:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ If you want to contribute a user interface for Freighter, PRs are welcome!

To try out Freighter **locally**, start a `postgres:14` server:
```
docker run -it -e POSTGRES_USER=freighter -e POSTGRES_PASSWORD=crates-crates-crates -p 5432:5432 -v /data:/var/lib/postgresql/data postgres:14
docker run -it -e POSTGRES_USER=freighter -e POSTGRES_PASSWORD=crates-crates-crates -p 5432:5432 -v /var/tmp/data:/var/lib/postgresql/data postgres:14
```

Run the migrations, e.g. with a locally installed `psql`:
```
PGPASSWORD=crates-crates-crates psql -U freighter -h localhost -f sql/init-index-db.sql
PGPASSWORD=crates-crates-crates psql -U freighter -h localhost -f sql/init-auth-db.sql
```

Next, we need an S3-compatible server. You can use an S3 emulator for testing purposes:
Expand All @@ -60,8 +59,8 @@ service:
download_endpoint: "http://127.0.0.1:3000/downloads/{crate}/{version}"
api_endpoint: "http://127.0.0.1:3000"

# for postgres backend
index_db: &db
# for postgres index backend
index_db:
dbname: "freighter"
user: "freighter"
password: "crates-crates-crates"
Expand All @@ -71,8 +70,6 @@ index_db: &db
# for filesystem backend
index_path: "/var/lib/freighter/index"

auth_db: *db

store:
name: "crates"
endpoint_url: "http://127.0.0.1:9090"
Expand Down
3 changes: 0 additions & 3 deletions crates/freighter-auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = ["pg-backend"]
yes-backend = []
pg-backend = ["dep:deadpool-postgres", "dep:tokio"]
fs-backend = ["dep:base64", "dep:serde_json", "dep:parking_lot", "dep:tempfile", "dep:hmac"]
cf-backend = ["dep:jsonwebtoken", "dep:reqwest", "dep:serde_json", "dep:tokio", "dep:cookie"]

Expand All @@ -29,7 +27,6 @@ anyhow = { workspace = true }
async-trait = { workspace = true }
axum = { workspace = true }
cookie = { version = "0.18.1", optional = true }
deadpool-postgres = { workspace = true, optional = true }
http = "1.1.0"
jsonwebtoken = { version = "9.3.0", optional = true }
rand = { workspace = true }
Expand Down
3 changes: 0 additions & 3 deletions crates/freighter-auth/sql/add-owner.sql

This file was deleted.

5 changes: 0 additions & 5 deletions crates/freighter-auth/sql/auth-crate-action.sql

This file was deleted.

4 changes: 0 additions & 4 deletions crates/freighter-auth/sql/get-user-for-token.sql

This file was deleted.

3 changes: 0 additions & 3 deletions crates/freighter-auth/sql/get-user-id.sql

This file was deleted.

4 changes: 0 additions & 4 deletions crates/freighter-auth/sql/list-owners.sql

This file was deleted.

5 changes: 0 additions & 5 deletions crates/freighter-auth/sql/login.sql

This file was deleted.

3 changes: 0 additions & 3 deletions crates/freighter-auth/sql/register.sql

This file was deleted.

5 changes: 0 additions & 5 deletions crates/freighter-auth/sql/remove-owner.sql

This file was deleted.

4 changes: 0 additions & 4 deletions crates/freighter-auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ pub mod yes_backend;

pub mod no_backend;

#[cfg(feature = "pg-backend")]
#[cfg_attr(docsrs, doc(cfg(feature = "pg-backend")))]
pub mod pg_backend;

#[cfg(feature = "fs-backend")]
#[cfg_attr(docsrs, doc(cfg(feature = "fs-backend")))]
pub mod fs_backend;
Expand Down
Loading
Loading