Refresh the catalog-currency cache from the official source documents
Source:R/catalog-currency.R
ms_catalog_currency_update.RdThe updater leg of the P5 instrument. It fetches (or, with `source`, injects) the two governed official documents – the release reference and the availability structure of the COSMIC signatures downloads page – extracts their JSON payloads canonically, writes the verbatim bytes into the GITIGNORED cache directory, and records the computed SHA-256 digests in the cache's own integrity record. The derivation is byte-idempotent: same sources, same bytes (no timestamps, no randomness), mirroring the refdb builder's discipline. A candidate sidecar is written next to the record for human review – the committed sidecar is only ever re-pinned deliberately via `data-raw/build_catalog_registry.R`, never by this call.
Arguments
- source
NULL (the official-site fetch) or a single existing path: a downloads-page capture file or a split document directory.
- cache
the cache directory (default as in [ms_catalog_currency()]).
- registry
NULL (the committed sidecar, whose canonical URLs and structure the candidate is derived against) or a sidecar path.
- offline
TRUE refuses every network leg; with `source = NULL` that is a structured refusal pointing at `source`.
Value
Invisibly, the [ms_catalog_currency()] report for the freshly derived cache, extended with `$update` (the written file paths and the candidate sidecar path).
Details
**Injected-source mode (offline by construction).** `source` is a downloads-page file or a split directory holding `reference_data.json`/`availability_data.json`; with a `source` given, no network leg is ever attempted. `offline = TRUE` additionally refuses the default official-site fetch. D3 law: only digests, URLs, version labels and shape counts are recorded; COSMIC numeric content is never read, kept or committed anywhere in this flow.