@fintan:
The API of the DraftStore needs some improvement and it can be easy to
do the wrong thing when trying to publish the changes to the published
cob reference
Based on this PSA we should apply any changes to the patch revisions
directly, instead of using the `DraftStore`
By restricting `img-src` in our CSP, we weren't allowing images from
e.g. https://github.com like CI badges to display.
With this change we allow users to add images from any `https`, `data`
or `blob` source, which is more user friendly.
`Show::All` which is the default value should return all values obtained
from `storage.repositories()`.
This commit adds a `Show::Contributor` enum variant to only get repos
that the user has forked, initialized or contributed in some way.
To start making the backend codebase more future proof, I started
introducing the hexagonal architecture concept, of having `Service`
traits that is the public API and inner traits like `Storage`,
`Metrics`, etc. that can be implemented by different adapters like
`Sqlite`.
This is a first development in this direction.
So far we only supported issue operations on the `activity_by_id`
command.
With this commit we separate the commands into a `activity_by_issue` and
`activity_by_patch` command that calls a generic `activity_by_id` trait
implementation.
`Operation` now takes as a generic either `cob/issue/Action.ts` or
`cob/patch/Action.ts`.
Also `Operation` now stores the array of all `Action` that happened on
said operation. I'm not entirely sure if this will help us in the
future, but it represents more closely the state of the relation between
an `Operation` and the cob `Actions`.
Also in the edge case that the front-end didn't update and the node just
stopped in between we fallback gracefully instead of returning an error
on the back-end.
Returns all commits for a specific repo.
Takes a `parent` argument as starting point for the git history.
Uses the `head` field of the project payload if not provided.
Instead of since and until timestamps uses cursor and take params to
paginate the commit history.
- Add `migrate::ignore` callback to `cob::cache` calls
- Remove the `Verified` trait from the `Doc` struct
- Update `Doc` fields with read-only methods
Instead of only returning seeded repos, this repo adds 3 new filter
options to the `list_repos` command, under the `show` field
- *all* - All repos that a user has initialized or forked (own
namespace)
- *seeded* - Repos that are beeing seeded by the user
- *delegate* - Repos that the current user is a delegate of.
Great explanation by @LarsWirzenius on the why
> Async code in Rust runs in one or more threads. Usually there's a
small number of threads that are multiplexed between different async
functions. The async executor chooses what threads to use and which
thread runs which async code. If the async code takes a long time, such
as by calling std::thread::sleep, the whole thread stops doing anything
else, and then no other async code runs in that thread, either.
- Improves the hierarchy of types into separate folders
- Improve the types generation making more structs and less serde_json
- Adding more optional values to the tauri commands