• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microlinkhq / unavatar / 43082394890
98%

Build:
DEFAULT BRANCH: master
Ran 11 Nov 2026 06:57PM UTC
Jobs 1
Files 122
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Nov 2026 06:55PM UTC coverage: 98.067% (+0.1%) from 97.926%
43082394890

push

github

web-flow
feat: proxy fallback for JSON API providers (#718)

* feat: proxy fallback for JSON API providers

JSON API providers called a plain got from the server's IP, so when an
upstream blocked it (zhihu 40352, bilibili -352) the provider returned
nothing and nothing was logged. Only HTML providers went through the
onFetchHTML hook that retries via the proxy tiers.

createApiProvider gives JSON providers the same hook. Each response is
classified before the getter decides: 404 or a getter NOT_FOUND stops
with no proxy tier spent, 403/429, a non-JSON 200 or a provider isBlocked
code throws so the next tier is tried, any other status >= 400 is retried
as an upstream error. got never retries on its own.

The hook is renamed onFetchHTML -> onFetch, and receives `kind` ('html' or
'api') so the consumer can tell them apart. Both helpers now map NOT_FOUND
to undefined at the provider boundary: before, a NOT_FOUND returned through
the hook reached avatar/auto and threw a TypeError interpolating the Symbol.

zhihu, bilibili, deezer and opencollective move to createApiProvider.

BREAKING: the core option onFetchHTML is now onFetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: keep proxy fallback wired to onFetchHTML

The service still passes onFetchHTML, so renaming the option dropped every provider off the proxy hook. Lock the miss results that hook must not retry.

* test: lock an empty deezer picture that survives the artwork fallback

An empty picture_xl is discarded by the || chain, so the empty-string guard only sees an empty album cover.

* test: share the proxy-attempt capture and index stubs

The four provider suites and the two index loads repeated the same setup.

* docs: show that JSON getters receive NOT_FOUND from the factory

createApiProvider calls the getter with the response only, so passing getAvatar through directly would retry real misses.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

1351 of 1413 branches covered (95.61%)

Branch coverage included in aggregate %.

265 of 265 new or added lines in 7 files covered. (100.0%)

4434 of 4486 relevant lines covered (98.84%)

8.64 hits per line

Jobs
ID Job ID Ran Files Coverage
1 43082394890.1 11 Nov 2026 06:57PM UTC 122
98.07
GitHub Action Run
Source Files on build 43082394890
  • Tree
  • List 122
  • Changed 7
  • Source Changed 6
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43082394890
  • a6a39f12 on github
  • Prev Build on master (#42836318300)
  • Next Build on master (#43217879109)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc