| Age | Commit message (Collapse) | Author |
|
|
|
|
|
- (send-webhook) does not need to validate URLs; (trigger) already does
that; replace validation logic with :pre conditional
- (make-request) does not need to fallback to empty string when
event-key is nil. it should never be nil.
|
|
- simplify (.mkdirs parent-dir) and with (io/make-parents file)
- should return false when HTTP request fails, not nil
- check if corrputed file exitsts before deleting it
- add tests
|
|
|
|
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
|
|
fix test cases
|
|
- 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
|
|
- storage-test: worker should handle other storage operations if some of
them throws Exception
- storage-test: microformats and proxied-photo should be stored as is
- microformats-test: use-prop shuold handle both string and keyword
typed keys
- comment unused http client functions
|
|
|
|
- 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
|
|
|
|
|
|
thread-safely
fix
|
|
|
|
|
|
- microformats type inferring is more accurate
- before: check if microformats h-entry has a type key (:like-of,
:in-reply-to...)
- now: check if such key's value equals to target URL, so it makes
sure this like/reply/repost/rsvp is sent to this target
- use ring.util.http-response to simplify response
- `?mftype=` filter no longer depends on microformats reduction
- retriever.clj is overall cleaner
|
|
also remove post-conditional assertion from edn-storage/use-store, since
tests have that covered
|
|
|
|
|
|
|
|
- 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
|
|
add recursive find-type tests
|
|
|
|
|
|
|
|
- some namespaces tests require did not get renamed
- url/extract might throw AssertionError if input contains non-HTTP(S)
urls. it should not check schemes.
- verifier doesn't need to filter non-HTTP(S) urls since they will
return false anyway, and plus it makes localhost urls in tests fail
|
|
|
|
utils: add url utilities for accurate comparison
- add url/normalize taht reconstructs URL, strips unnecessary
components, reorders query string and ensures determinism
- add url/url= that uses url/normalize
receiver: normalize URLs before checking and putting in queue
- use url= and normalize from utils.url
- rename verify-request to check-request to avoid confusion with
verifier.clj
verifier: check if source includes target URL more accurately
- implement url/extract with robinst/autolink-java, which extracts a
vector a URLs from string
- check if source includes target by
1. extracting all links from source body
2. normalizing all links before comparing with target link (with url=
func)
- refactor verify-headers -> match-content-types, with a higher order
function and clearer description
retriever, storage: use url= instead of = when comparing urls
|
|
- 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
|
|
- /api/likes removed
- /api/replies removed
- /api/reposts removed
|
|
- remove deprecated weepinbell.ui
- create a ClojureScript project named bellsprout
- use vanilla cljs and Pico CSS
- can find and send webmentions in/to weepinbell
- display webmentions in cards
- <noscript> reminder
- embed frontend in weepinbell
- opt-in, weepinbell can work without a frontend
- serve static files from disk for now; might support a simple reverse
proxy in the future
- test frontend route (OK when enabled; 404 when disabled)
fe: ?show param that shows webmentions when set to true
equivalent of clicking "Find" button manually
|
|
|
|
|
|
|
|
- remove reducer spec warninns, test spec before compiling instead.
- cover more forms of webhook.clj, webhook_presets.clj,
microformats/reducer.clj, microformats/searcher.clj, http/downloader.clj
- remove unused code from config.clj
- format all tests
|
|
- 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.
|
|
|
|
|
|
|
|
throws error
|
|
- 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
|
|
starting from now, every commit should be cljfmt-fixed
|
|
|
|
the old weepinbell.storage-test/edn-storage-conformity-test `spit` a
file for `edn-storage/use-store` to check if data file exists
this is unnecessary and annoying because it generates a confusing file
every time tests are run, also during building.
the solution is to use `with-redefs` to make `file-exists?` always
return `true`
|
|
|