| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Since Kittybox router composition is entirely generic, we can move it
into the library.
I feel like I could also split database types into their own crates,
too.
|
| |
|
|
|
|
|
| |
This somehow allowed me to shrink the construction phase of Kittybox
by a huge amount of code.
|
|
|
|
|
| |
Now the database objects can be uniformly created from a URI. They can
also optionally do sanity checks and one-time initialization.
|
|
|
|
|
|
|
|
|
| |
Per clippy suggestion.
While they're behind a reference counter, and thus cloning is cheap,
we can avoid increasing the reference counter by borrowing here.
Also now the code is a bit prettier.
|
| |
|
|
|
|
| |
This makes the interface more consistent and resistant to misuse.
|
|
|
|
|
|
|
|
|
| |
Added fundamental AutoAuth types. This library can now be used to
augment existing authorization and token endpoints with AutoAuth
capabilities.
See https://github.com/sknebel/AutoAuth/blob/master/AutoAuth.md for
the latest spec draft.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Warning, untested. But hopefully works!
|
| |
|
|
|
|
| |
This reduces the worst-case complexity to O(n) from O(n^2).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Kittybox's source code is moved to a subfolder
- This improves build caching by Nix since it doesn't take changes
to other files into account
- Package and test definitions were spun into separate files
- This makes my flake.nix much easier to navigate
- This also makes it somewhat possible to use without flakes (but
it is still not easy, so use flakes!)
- Some attributes were moved in compliance with Nix 2.8's changes to
flake schema
|
|
|
|
| |
Now everyone will know where to get my software if they see it.
|
| |
|
|
|
|
|
|
|
| |
These features share some code since they both require fetching reply
contexts, so it makes sense to implement them together.
TODO cover webmention sending with integration tests
|
| |
|
| |
|
| |
|
|
|
|
| |
Now I will know if something breaks horribly again.
|
|
|
|
|
|
| |
Iterator::skip_while() returns the last item. Reimplement the
combinator that I need using a loop over Iterator::by_ref()
instead. This will terminate after the end is reached.
|
| |
|
|
|
|
| |
Closes #4.
|
|
|
|
|
|
|
|
| |
This will ease future extraction of the media endpoint to a separate
crate. This is highly desirable since it will allow Kittybox's media
endpoint to be used separately in instances where a standalone media
endpoint is desirable (e.g. custom solutions using my code to polyfill
for desired functionality that is undesirable to implement by oneself)
|
| |
|
|
|
|
|
| |
Match blocks and ifs are actually perfectly usable as expressions. I
forgot about that when writing that code.
|
|
|
|
|
|
|
|
|
| |
Templates and utility types are now separate crates to speed up
compilation, linting and potential reuse/replacement.
Potentially more crates could be split out/modularized, resulting in
speedups, smaller binaries (whenever features are excluded) and even
more reuse capabilities.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Reads don't lock anymore. At all.
- Writes create a temporary file and use `rename(2)` to atomically
replace it
- since OpenOptions::create_new(true) is used, tempfile creation is
atomic (and since tempfile names are per-post, a post can only be
edited by one request at a time)
- Since written files get atomically replaced, readers can't read a
corrupted file
Potential pitfalls:
1. This approach is not covered by unit tests (yet)
2. Stale tempfiles can prevent editing posts (can be solved by
throwing out tempfiles that are older than, say, a day)
3. Crashed edits can leave stale tempfiles (honestly that sounds
better than corrupting the whole database, doesn't sound like a bug to
me at all!)
|
| |
|
|
|
|
| |
It's an advanced HTTP client that can do more than vanilla Hyper does.
|
|
|
|
|
| |
Sometimes it's cumbersome to include them, and I plan to make them
embedded in the app anyway. This is my reminder to do it ASAP.
|
|
|
|
|
|
| |
Now Kittybox can gracefully shutdown on SIGTERM. Nice!
TODO: consider shutting down on multiple signals
|
| |
|
|
|
|
|
|
| |
This stubs the neccesary code with enough stuff that it will work and
be accepted by most compliant Micropub implementations. Later, this
can be extended when the neccesary amendments and refactors are done.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Warp is using hyperium/http instead of http-types, so I replaced all
of the http-types usage (mostly status codes) by Warp's
http::StatusCode.
Additionally some of the struct fields were made public to allow
initialization from public code.
|
| |
|