| Age | Commit message (Collapse) | Author |
|
microformats/JSON-LD/<meta> to JF2 (#80)
closes #75
This is a large squash commit. For details, see https://codeberg.org/eltrac/weepinbell/pulls/80
|
|
add ADR-0002 about migrating to H2
|
|
|
|
|
|
- new config `:storage-type` (default `:edn`, also support `:sqlite`)
- `LICENSE` change: add exceptions to `next.jdbc` (which uses EPL)
Reviewed-on: https://codeberg.org/eltrac/weepinbell/pulls/73
|
|
- refactored weepinbell.core/start-system. moved config loading outside
start-system, loaded in -main function.
- use :log-level in config and set timbre :min-level in -main
|
|
worker
|
|
thread-safely
fix
|
|
|
|
- test loading and merging config
- test start-system and graceful shutdown
- test /endpoint and /api/send
- test receiver handling nil input
- test webserver startup and graceful shutdown
|
|
- config/load-config now accepts one arg, which is the config file path
- core uses WEEPINBELL_CONFIG env, fallback to "config.edn"
|
|
- handler and core no longer care if storage is a valid vtable
- use-store assert storage is valid before it was returned
- AssertionError should be spotted while testing
|
|
add docstrings
format code
|
|
- implement a functional rewrite of core.clj, no more `def`, no more
states. callable from an REPL
- handle SIGINT/SIGTERM and perform graceful shutdown
- print clear logs when starting up and shutting down
|
|
- replace mf2j with mf2clj
- remove utils.clj completely
- refactored processor, use Chain of Responsibilities pattern and pass
around maps to reuse data (so we don't have to make a separate HTTP
request just to parse microformats, etc.)
- test: add more test cases to verifier test
- test: add basic test cases to all processing steps
- add more logging to each processing steps. good for debugging.
|
|
- processor will call hook functions with webmention data
- refactor webhook.clj massively
- add dynamic parameter substitution for urls, e.g. {source} {target}
{event}......
- add config option :webhook-request, a function with parameters [hook,
data] that returns a map (resembling {:headers ... :body ...}).
webhook.clj uses this function to generate payload.
- allow map besids URL string in config option :webhook. if it's a URL,
sends webhook request to it with payload generated by :webhook-request;
if it's a map, it should be like {:url ... :request-fn ...}, which
specifies a payload generator.
- add request-fn preset :ntfy
|
|
|
|
|
|
wrapper: use spec to check webmention data before writing to storage
warn when data does not meet spec (corrupted). for now we're not dealing
with corruption, just collect logs and analyze.
microformats: use spec to validate data and warn if it's in bad form
microformats: move parsers/wrappers to one sub-directory
storage: move weepinbell.spec to weepinbell.storage.spec
|
|
processor: tidy up log msg and level; improve code style
- all messages start with a lower-case letter
- all webmention-related logging contains first 8-digit of its id
- use WARN level when something is deleted, not INFO
- use WARN level when exceptional cases happen, not ERROR
- get rid of emojis in log messages
utils: digest-short function for logging
verifier: tidy up log messages; improve code style
- use `cond` instead of nested `if`s
- same message format as processor's logs
webhook: tidy up log messages; send webhooks robustly
- use same logging formats as processor and verifier
- handle error, 4xx, 5xx status and log them
- move logging inside webhook module, away from core.clj
|
|
|
|
and test case #7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
process-webmention used to start a go-loop directly.
this commit separates go-loop from processing logic,
core.clj now calls to processor/start, the wrapper
function.
|
|
|
|
a new component 'channel.clj' is created to manage `wmc` (Webmention
channel). It's a dirty technical detail that should only be called in
core.clj and handler.clj, business rules should not interact with it
directly.
|
|
|
|
|
|
|
|
|
|
|
|
|