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

ThePalaceProject / web-patron / 25001739971
88%

Build:
DEFAULT BRANCH: main
Ran 27 Apr 2026 02:44PM UTC
Jobs 1
Files 15
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

27 Apr 2026 02:43PM UTC coverage: 85.0% (+3.9%) from 81.111%
25001739971

push

github

web-flow
Add runtime config module with ArkType validation (PP-4124) (#124)

## Description

**Note:** This is the first in a series of PRs to move fully to runtime
configuration. Other associated PRs will stack on this one.

Adds the server-side runtime config module and supporting pieces that
subsequent PRs will wire into the app. No existing code is changed;
nothing imports these new files yet.

Specifically, this PR adds:
- A server-side config loader that reads and parses `CONFIG_FILE` at
runtime on first request and caches the result for the process lifetime.
`ArkType` validates the raw YAML structure upfront so malformed configs
produce a clear error rather than a confusing downstream failure.
Per-slug library-entry errors are handled separately so their messages
can include the offending slug in the path.
- A React context and `useAppConfig()` hook for components to consume
config values, and a safe fallback config for use before `pageProps` is
available (e.g. during SSR).
- Support for the `staticLibraries` "shape" in `AppConfig` —
object-format `libraries` entries mapping slugs directly to auth
document URLs.
- A config file reference in the README (options table and media support
explanation), so the deprecation warning for the legacy string
`libraries` format has somewhere concrete to point.

## Motivation and Context

The long-term goal is to read configuration at server startup rather
than baking its contents into the build artifact, so that config changes
don't require a full rebuild and redeploy.

This PR adds the new module without activating it; a follow-on PR will
switch consumers over.

[JIRA PP-4124]

## How Has This Been Tested?

- Includes unit tests for the new functionality.
- All check pass locally.
- [CI
checks](https://github.com/ThePalaceProject/web-patron/actions/runs/24856257601)
pass.

## Checklist:

- [x] I have updated the documentation accordingly.
- [x] All new and existing tests passed.

227 of 267 branches covered (85.02%)

Branch coverage included in aggregate %.

68 of 68 new or added lines in 2 files covered. (100.0%)

351 of 413 relevant lines covered (84.99%)

14.47 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25001739971.1 27 Apr 2026 02:44PM UTC 15
85.0
GitHub Action Run
Source Files on build 25001739971
  • Tree
  • List 15
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 2bca4eed on github
  • Prev Build on main (#24793914592)
  • Next Build on main (#25003295306)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc