Commit Graph
66 Commits
Author SHA1 Message Date
Sebastian Martinez 11bf9d7200 Bump heartwood crates to latest versions 2025-06-04 10:32:50 +02:00
Sebastian Martinez 9561049789 Update used rust toolchain to 1.87 2025-06-04 09:59:59 +02:00
Sebastian Martinez 978b3de61f httpd: Infer mime type of file blob in remaining raw handlers 2025-06-04 09:59:16 +02:00
lorenz 5f22e1bb77 httpd/git: Set uploadpack.allowAnySHA1InWant 2025-06-04 09:57:50 +02:00
Sebastian Martinez fbb9dd64db Update authors and bump crate version to 0.18.2 2025-05-27 10:29:36 +02:00
lorenz af334bb0e4 archive: Various Fixes
1. When `git archive` errors, do not require an exit code, but just use
    the `ExitStatus` we already have. This requires less unwrapping.
    Also, the previous default of 0 was misleading, since 0 is returned
    upon successful termination.
 2. Use "refname" instead of "refspec" as these are different concepts.
    Refer to <https://git-scm.com/docs/git-check-ref-format> and in
    particular
    <https://git-scm.com/docs/git-check-ref-format#Documentation/git-check-ref-format.txt---refspec-pattern>.
 3. Only allow appending ".tar.gz" to commit IDs, not to refnames,
    because refnames may contain the suffix ".tar.gz". It might look
    weird, but it is not forbidden to do `git branch foo.tar.gz`.
 4. `char::is_ascii` does not help sanitize refnames to file names. In
    particular we have `'/'.is_ascii() == true`. Replace forward slashes
    with two underscores.
2025-04-23 16:29:58 +02:00
Sebastian Martinez 2fe3566848 httpd: Add archive endpoint for tarballs 2025-04-23 11:00:59 +02:00
Sebastian Martinez c132855d16 Update build Dockerfile 2025-03-19 11:12:04 -06:00
Sebastian Martinez f2c7bb71c7 Handle json! panick trying to serialize non utf8 lines
Instead of panicking when trying to handle non utf8 lines we should
return `null` as line output.

This way we can on the frontend detect if a file has any lines the api
wasn't able to parse and fallback to show a file as a `Binary File`
2025-03-19 11:12:04 -06:00
Sebastian Martinez 0d7a96e3b0 httpd: Bump version numbers 2025-02-04 11:32:28 -06:00
Sebastian Martinez ef46915d77 httpd: Infer mime type of file blob in file_by_oid handler
Instead of relying on the mime_type query string the endpoint should try
to infer the file type.
2025-02-04 11:32:28 -06:00
Sebastian Martinez 061aaa18a1 httpd: Increase MAX_BLOB_SIZE to 10 MB 2025-02-04 11:32:28 -06:00
Sebastian Martinez 2e8b817d53 httpd: Copy RADICLE_VERSION to /
Also deprecates it on `api/v1/`
2024-12-05 14:21:07 +01:00
Sebastian Martinez 2fef0f5c9c httpd: Move CorsLayer to / 2024-12-05 14:13:56 +01:00
Sebastian Martinez f456731f42 Fix radicle-httpd tests for radicle 1.1.0 2024-12-05 14:13:56 +01:00
Sebastian Martinez be0ecd7347 Bump httpd version numbers to 0.18.0 2024-12-05 14:13:56 +01:00
Sebastian Martinez cb7e01105b Update radicle-httpd to latest radicle crate 2024-12-05 09:21:19 +01:00
Rūdolfs Ošiņš f815b2dbca Bump httpd version numbers
Bump httpd version numbers
2024-11-11 18:30:39 +01:00
Rūdolfs Ošiņš 9d981f9210 http: Fix encoding issue in raw file handler
Turns out "content-type: text; charset=utf-8" wasn't valid, it had to be
"content-type: text/plain; charset=utf-8" for browsers to recognise it
properly.
2024-11-08 12:08:31 +01:00
Sebastian Martinez 5657a6ff47 http: Filter by delegate before fetching repo info 2024-10-02 12:05:07 +02:00
Sebastian Martinez 248ae1a231 http: Add MIT and APACHE license files 2024-09-30 11:33:31 +02:00
Sebastian Martinez 9dd61d3bf3 http: Apply warnings from clippy 2024-09-04 07:24:34 +02:00
Sebastian Martinez 1ded8b4462 http: Update dependencies
Also removes some dependencies that wheren't used anymore.
2024-09-04 07:24:34 +02:00
Sebastian Martinez fc83829ef6 http: Decouple api responses from heartwood crates 2024-09-03 15:22:22 +02:00
Sebastian Martinez 3d4d76cf53 http: Move querystring structs into own module 2024-09-03 15:22:22 +02:00
Sebastian Martinez 859d22319f http: Run cargo fmt 2024-09-03 15:22:22 +02:00
Sebastian Martinez 82ca7c3eae Missing build argument in build script 2024-08-29 11:02:05 +02:00
Sebastian Martinez 30647fbb26 Update heartwood and radicle-httpd releases 2024-08-29 11:02:04 +02:00
Sebastian Martinez 139bab5809 http: Update radicle crate to v0.13.0 2024-08-29 11:02:04 +02:00
Sebastian Martinez 995e23936b http: Update naming for delegate dids
The usage of the term `delegate` when handling a DID isn't explicit
enough, so this commit changes the places where the word `delegate` is
used when actually it's a DID.
2024-08-23 08:58:06 +02:00
Sebastian Martinez 02234eac1d Update apiVersion to 5.0.0 2024-08-22 15:50:42 +02:00
Sebastian Martinez 52e1cf3f97 http: Update radicle-httpd to 0.16.0 2024-08-22 15:45:28 +02:00
Sebastian Martinez c798e5d4e9 http: Modify payloads fields
Don't require a repo to have a `xyz.radicle.project` payload.
If there are issues with obtaining the repo `head`, issue count or patch
count, filter that repo from the list.
2024-08-22 09:44:51 +02:00
Sebastian Martinez 4fda686bad http: Rename files from projects to repos 2024-08-21 23:37:37 +02:00
Sebastian Martinez 5d7eb71eab http: Rename LoC with projects ocurrences to repos 2024-08-21 23:37:37 +02:00
Dawid Ciężarkiewicz 5444875e71 http: Display simple info page on / 2024-08-08 11:50:51 +02:00
Sebastian Martinez a23c704c24 http: Use pinned repo length for per_page unwrap instead of fixed number
This allows us to avoid querying the repo stats and relying on maybe bad
routing tables and take the hardcoded pinned repo array in case of
querying for pinned repos.
2024-07-29 07:55:54 -03:00
Rūdolfs Ošiņš c0049f83ba Redesign node view and use it as the landing-page 2024-07-26 10:20:01 +02:00
Sebastian Martinez 9a50ae0354 http: Rename compressed and extracted files from radicle to radicle-httpd 2024-07-22 13:06:01 -03:00
Rūdolfs Ošiņš c60b6451d3 http: Remove all authentication related code
We also remove the `/api/v1/profile` endpoint because that was only
supposed to be used with a local node and not publicly accessible. All
fields that are still used in the UI were moved to `/api/v1/node`.

We bump the API and crate versions since this is a breaking change.

squash or drop!: Small suggestion for improvement
2024-07-19 08:11:47 -03:00
Rūdolfs Ošiņš b105d06fae http: Only count publicly seeded repositories
Previously the /api/v1/stats endpoint would count any repository that is
in the storage regardless of whether the repository is publicly seeded or not.
2024-07-19 05:32:42 -03:00
Sebastian Martinez c4aa4f04f2 http: Update crate to 0.14.0 and api version to 3.0.0 2024-07-12 10:44:32 +02:00
Sebastian Martinez 3d652d54d2 Check arch for podman build
Usually going with Darwin -> aarch64 and the rest fallback to amd64
isn't a bad choice, but I think we can do better by checking `arch` so a
device like a Raspberry which has an ARM CPU is able to run the build
script.
2024-07-10 10:42:51 +02:00
Sebastian Martinez 7347d031e7 http: Rename IssueState and PatchState to IssueStatus and PatchState 2024-07-04 15:21:10 +02:00
Sebastian Martinez 49a299f9e3 http: Rename state query param to status
This allows us to match the query param with the output that is
`{ "status": "open" | "merged" | ... }`
2024-07-04 15:18:38 +02:00
Sebastian Martinez 25a16869d7 http: Add All as state query option for cobs 2024-07-04 15:18:38 +02:00
Sebastian Martinez 76fb2e2dc6 http: Add missing issue and patch endpoint tests 2024-07-04 15:17:52 +02:00
Sebastian Martinez 6fd6375005 http: Add ssh keys and full did to nodes handler 2024-07-04 15:12:20 +02:00
Sebastian Martinez 41b1bcafd5 Update API version to 2.0.0 2024-07-04 11:48:41 +02:00
Sebastian Martinez ec671872fe http: Update crate to v0.13.0 2024-07-04 11:48:41 +02:00