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

ThePalaceProject / web-patron / 29953578263
82%

Build:
DEFAULT BRANCH: main
Ran 22 Jul 2026 08:05PM UTC
Jobs 1
Files 21
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

22 Jul 2026 08:03PM UTC coverage: 81.781% (+0.5%) from 81.303%
29953578263

push

github

web-flow
OPDS 2 support MVP (PP-2718) (#166)

## Description

Adds OPDS 2 (JSON) support as a format-agnostic alternative to the
existing OPDS 1.x (Atom/XML) catalog client, gated behind a feature
flag.
- New format-agnostic fetch layer (`dataflow/catalog.ts`) negotiates
OPDS 2 via an `Accept` header and dispatches to an OPDS 2 or OPDS 1.x
parser based on the response's `Content-Type`. Servers that don't serve
OPDS 2 (or ignore the header) fall back to the existing (and unchanged)
Atom parser. All call sites that previously imported
`fetchCollection`/`fetchBook` from `dataflow/opds1/fetch` now import
them from here instead.
- New OPDS 2 catalog parser and lenient runtime validation
(`dataflow/opds2/`, `validation/opds2Catalog.ts`) map Palace
Manager-produced OPDS 2 JSON into the same internal
`Book`/`CollectionData` model the OPDS 1 parser produces, including
borrow/hold/loan status, fulfillment and open-access links (with
indirection chains, e.g. bearer-token-wrapped or streaming formats),
series, and facets/groups/navigation. Schema mismatches are reported as
telemetry only and never block rendering.
- Feature flag env var `PALACE_CPW_FEATURE_OPDS2` controls whether OPDS
2 negotiation is attempted; off by default.

**Supporting changes**: 
- OPDS-entry indirection types are normalized between the two spec's
differing media-type spellings.
- `getMedium` now recognizes OPDS 2's `@type` metadata.

**Note for review**: 
- `jest.config.js` now sets `restoreMocks: true` so spies auto-restore
after each test, fixing a latent footgun that I noticed after forgetting
to manually `mockRestore()`. It could leak a mock into later tests. It
is unrelated to OPDS 2 but was needed to keep the new OPDS 2 test suites
isolated from each other, and it required moving a handful of
pre-existing module-scope spies into `beforeEach` in files that I
wouldn't have otherwise touched: `
- test-utils/mockToDateString.ts`, 
- `test-utils/index.tsx`, 
- `UserContext.test.tsx`, 
- `ContextP... (continued)

296 of 393 branches covered (75.32%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 5 files covered. (100.0%)

503 of 584 relevant lines covered (86.13%)

29.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 29953578263.1 22 Jul 2026 08:05PM UTC 21
81.78
GitHub Action Run
Source Files on build 29953578263
  • Tree
  • List 21
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 854eb281 on github
  • Prev Build on main (#29876734992)
  • 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