about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* configuration.nix: use NixOS option for ListenStreamVika2023-07-221-5/+4
|
* media: fix improper path joiningVika2023-07-221-3/+3
|
* Fix a few bugsVika2023-07-226-9/+25
|
* Add a NixOS test for receiving webmentionsVika2023-07-229-0/+236
|
* Move NixOS tests to a separate folder to prevent clutterVika2023-07-225-3/+3
|
* dev.sh: small modificationsVika2023-07-221-1/+10
|
* Log with tracing-tree AND json in debug buildsVika2023-07-222-7/+38
|
* configuration.nix: bind on IPv6 localhost by defaultVika2023-07-221-1/+1
| | | | This is so the Kittybox socket can actually listen on both IPv4 and IPv6.
* Mount webmention handling routes and tasksVika2023-07-225-35/+76
|
* database: more documentationVika2023-07-221-6/+23
|
* webmentions: check webmentions and save them to the databaseVika2023-07-222-6/+183
|
* database: add "add_or_update_webmention" operationVika2023-07-224-0/+168
| | | | | | | This is an operation that atomically adds or updates a webmention cite attached to a post. This is used so a database backend can optimize for it (for example, using a transaction or shifting the JSON modification operation to the database)
* postgres: optimize fetching of non-feeds by forgoing a second queryVika2023-07-221-0/+9
|
* Allow socket-activation for KittyboxVika2023-07-212-6/+23
| | | | | This complements passing sockets as FDs and graceful shutdown to allow for zero-downtime restarts.
* Allow loading TLS root certificates from fileVika2023-07-211-7/+33
| | | | | Untested, but will be useful when testing Webmentions in the end-to-end test.
* Split Postgres schemas into twoVika2023-07-213-15/+21
| | | | | Now the postgres schemas are completely independent of each other. This took a while to figure out!
* Move MentionType into util and fix bugs in -check-webmention appVika2023-07-212-12/+28
|
* Put Micropub background processing tasks in a JoinSetVika2023-07-173-28/+71
| | | | | | | This allows using tree-structured concurrency to keep background tasks in check and allow them to finish running before shutting down — a necessary prerequisite for shutdown-on-idle. (A background task may take a bit too long to complete, and we may need to wait for it.)
* database/file: tokio::fs::create_dir_all is idempotentVika2023-07-171-6/+3
|
* FileStorage: properly fsync() files and directoriesVika2023-07-171-9/+21
| | | | | | Total crash-safety. Yank the power cord all you want, your data is going to be safe and sound. (Unless your drive controller lies to you about flushing its caches)
* WIP: bind to UNIX socketsVika2023-07-171-13/+36
| | | | | | Apparently this requires a helper crate to make Hyper aware of UNIX sockets. That's fine. That's not a priority for now — but the code is practically there.
* Allow listening on several TCP socketsVika2023-07-171-46/+117
| | | | | | | | I would also love to be able to listen on Unix stream sockets, but that would require some additional support that can thankfully be just introduced later. (It also requires a second loop over the file descriptor array)
* shell.nix: add opensslVika2023-07-171-4/+5
|
* cargo update, part 2: AxumVika2023-07-1710-111/+158
| | | | | | | | | Axum got some breaking changes and gained some nice features — however, features come later, breaking changes come first. Perhaps it would be nice to actually construct a State with all of my stuff, and then make functions generic over that. Could reduce the amount of generic stuff I am producing... maybe.
* cargo update, part 1Vika2023-07-177-500/+799
|
* webmentions/queue: move JobQueue trait into kittybox-utilVika2023-07-095-47/+200
| | | | | | | The trait itself seems basic enough that it could be reused elsewhere. Better to keep it in a separate crate. `-util` is a dumping ground for various things anyway.
* webmentions/supervisor: ability to cancel a background taskVika2023-07-091-13/+54
| | | | | | | | This requires the background task to be cancellation-safe, as it is dropped after receiving a cancellation event. Perhaps in the future there will be a supervisor version that may forward the cancellation to the task itself.
* webmentions/queue: give up on an item after 5 attemptsVika2023-07-093-20/+69
| | | | | | This also involves a crude "async drop" implementation that fires a future incrementing an attempt if a Job has been dropped without marking it as done.
* New debug utilities to test checking webmentions and parsing mf2Vika2023-07-093-0/+211
|
* WIP: incoming webmention supportVika2023-07-091-0/+75
|
* Create a job queue based on PostgresVika2023-07-094-0/+191
| | | | | It's generic enough to be used for anything, but for now it's only gonna be used for webmentions.
* micropub: a little bit more loggingVika2023-07-091-0/+2
|
* password-hasher: print prompts to stderrVika2023-07-091-3/+3
|
* kittybox-indieauth-helper: move client_id to a real pageVika2023-07-091-1/+1
| | | | | This allows to use the helper on production websites that do security checks on redirect URIs, as the URI is now properly declared.
* Implement Postgres backendVika2023-07-099-4/+577
| | | | | | | A single giga-commit that took me weeks to produce. I know, this is not exactly the best thing ever — but I wanted to experiment first before "committing" to the implementation, so that I would produce the best solution.
* Passthru NixOS VM testsVika2023-07-092-2/+9
|
* main: use tracing_tree in debug buildsVika2023-07-093-1/+11
| | | | | | This gives me much more readable traces. JSON logging is still superior in production, where logs are stored in systemd-journald and preferably need to be self-contained lines.
* indieauth/backend/fs: debug tracingVika2023-07-091-1/+6
|
* templates: fix cursor usage in feed templateVika2023-07-091-8/+6
|
* database/memory: cleaner update_post implementationVika2023-07-091-1/+70
| | | | | | | | | | | | This one manages to avoid extraneous allocations as much as possible, by deconstructing the update into pieces and using a mutable reference taken directly from the hashmap in which the posts are stored. Now if only this hashmap were to be serialized on Drop, we could even have persistence in the database and therefore gain another backend that requires no dependencies to run, just like FileStorage, but avoids extraneous file access (or maybe shunts it into the background?)
* frontend: filter out privacy-sensitive information from postsVika2023-07-091-2/+124
| | | | | This was the job of the database before. Now the frontend should do it before passing the post to the templates.
* database{,/file}: clean up code, add documentation and loggingVika2023-07-092-206/+215
| | | | | | | | | | | | `filter_post` is now out of here and moved into the frontend. This kind of non-intrusive filtering can be done on the frontend, and the database need not concern itself with this. It can still be done as an optimisation... probably? but the frontend is going to sanitize things like location in the post by itself now, so it is not required anymore (and might be harmful, if frontend starts indicating that there are some hidden fields by replacing them with placeholders that ask one to log in to view information).
* fixup! database: add add_to_feed and remove_from_feedVika2023-07-081-2/+2
|
* onboarding: fix improper usage of the put_post APIVika2023-07-081-1/+5
|
* flake.lock: UpdateVika2023-07-081-9/+9
| | | | | | | | | | | | | | Flake lock file updates: • Updated input 'flake-utils': 'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31) → 'github:numtide/flake-utils/dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7' (2023-06-25) • Updated input 'naersk': 'github:nix-community/naersk/88cd22380154a2c36799fe8098888f0f59861a15' (2023-03-23) → 'github:nix-community/naersk/abca1fb7a6cfdd355231fc220c3d0302dbb4369a' (2023-07-05) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/a64b73e07d4aa65cfcbda29ecf78eaf9e72e44bd' (2023-06-08) → 'github:nixos/nixpkgs/0fbe93c5a7cac99f90b60bdf5f149383daaa615f' (2023-07-02)
* micropub: use the new, better typed updates internallyVika2023-07-014-172/+53
|
* microformats: 0.2.5 -> 0.3.0Vika2023-07-013-4/+4
|
* Better Micropub update object typingVika2023-06-221-4/+13
|
* database: more realistic pagination testVika2023-06-221-1/+7
| | | | | | We insert published time into all objects anyway, and expect feeds to be ordered by publishing time. We should let databases rely on that assumption when returning feeds.
* database: add add_to_feed and remove_from_feedVika2023-06-222-2/+9
| | | | | Some database backends may have optimized ways of tracking feed contents. Others might just use the "children" property directly.