Commit Graph

37 Commits

Author SHA1 Message Date
xphoniex c1ba45fcd8
httpd: Extract `issue` json response
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-04 13:46:26 +00:00
xphoniex 4552c1f296
httpd: Add routes for patch ops
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-04 13:22:09 +00:00
Alexis Sellier f1a6a86689
node: Check refs when getting local inventory
If we don't do this, we're going to be returning broken repos.
2023-01-30 11:38:00 +01:00
xphoniex a5811e43a7
Update `radicle-surf`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-28 20:19:23 +01:00
Sebastian Martinez f07a875ce1
Add web-based authentication
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-01-27 17:23:05 +01:00
Alexis Sellier 0a9bb23e4e
Replace `RAD_DEBUG` with `RAD_SEED`
The latter is strictly more powerful.
2023-01-25 17:09:16 +01:00
xphoniex a3f4c2ec67
httpd: Remove `lastCommit` in `/tree` for entries
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex 59ff46e49c
httpd: Clean up `json.rs`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex ccbcdd4998
httpd: Change `sha1` into `id`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex 57fbc1ed46
httpd: Use `commits`/`commit` instead of `headers`/`header`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex f065bce876
httpd: change `committerTime` into `committer.time`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex 7ec903d712
httpd: Update axum from 0.5.x to 0.6.x
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-18 14:09:48 +00:00
Han Xu 4ea67250ea
httpd: Dogfood the new radicle-surf API
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-01-18 14:22:01 +01:00
Alexis Sellier be9def8b11
Rename `profile::Paths` to `profile::Home`
This makes the intent clearer.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier d31968509d
Speed up node E2E tests
By allowing the node to run using a `MockSigner`, we speed up tests
significantly, since PBKDF2 doesn't need to run.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
xphoniex 7962ac0a8e
httpd: Add api tests
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-12 20:30:53 +01:00
Alexis Sellier 911c194fb3
cob: Create proper `OpId` type
To still access a comment's author, we add a new `author` field.
2022-12-31 09:58:51 +01:00
xphoniex bd1b4ac5c1
httpd: Use `TraceLayer` on uppermost router
This allows prefix of each route e.g. `/api/*` to be visible in logs.

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-12-26 15:56:21 +01:00
xphoniex 1f55d7a327
Update `radicle-git` to `79a94721366490053e2d8ac1c1afa14fb0c25f09`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-12-23 13:22:55 +01:00
Alexis Sellier e47d7ca2aa
cob: Implement comment edit action
This implementation intentionally preserves all edits such that
they may be displayed in an application as an edit history.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-16 12:32:20 +01:00
Alexis Sellier 98c1566109
Make `Doc` type payload generic 2022-12-09 22:05:38 +01:00
xphoniex 46951b1b42
httpd: Use `HashSet` instead of `BTreeSet`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-12-09 10:49:28 +01:00
xphoniex fb8020e582
httpd: Conform response from issue handlers to previous model
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-12-09 10:49:09 +01:00
Alexis Sellier 5d2be57cd9
Rename patch/issue "status"
This reverts to the previous naming, since after serialization
we would otherwise end up with `{ status: { status: closed } }`.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-09 10:44:59 +01:00
Alexis Sellier 207d2133f9
Remove delegate names from identity doc
We are working on other mechanisms to help identify keys, and this
is just redundant.

Also update some of the CLI examples to create a canonical example
for documentation.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-07 12:16:00 +01:00
Alexis Sellier 09a8b46f34
cob: Move clock out of `Issue`
The clock shouldn't be part of the issue state, but rather
the local "actor" state.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
xphoniex 1b00e8a413
httpd: implement `IntoResponse` for api error variants
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex b96f357c2e
Migrate `/v1/stats` route
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex e5e8a403fc
Migrate `/projects`: `issues`, `issue` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex b4902d3408
Migrate `/projects`: `remotes`, `remote`, `blob`, `readme` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex 84c3cf4cf1
Migrate `/projects`: `history` and `tree` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex dea7082a6f
Migrate `/projects`: `root`, `project`, `commit`, `activity` handlers
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex 77e0a176bd
Migrate `/v1/delegates` route
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex 6f8511c360
Migrate `/v1/sessions` route
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
xphoniex acd7aeb9c9
Migrate `/v1/`, `/v1/node` routes to heartwood
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2022-11-30 13:06:03 +00:00
Alexis Sellier 617e0c1877
Remove redundant `Options` type
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-19 11:47:29 +02:00
Alexis Sellier 2f6cf9c7a5
httpd: implement `git` fetch-only server
Introduces a new `radicle-httpd` crate which will serve as the basis
for heartwood's HTTP backend.

The first part of this is a git server which allows projects to be
fetched from storage using plain `git`.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-10-19 11:36:16 +02:00