The single entry point every caller (app URL ?ver=, report endpoint, notebook)
should use. NULL/""/"latest" resolve to atlas_latest(); anything else must
name a version present in atlas_versions(). A pre-release is never returned
for "latest" — it is reachable only by asking for it by name.
Usage
atlas_resolve_ver(
ver = NULL,
base = atlas_base_url(),
allow = c("released", "prerelease", "retired"),
allow_access = c("public", "restricted"),
refresh = FALSE
)Arguments
- ver
requested version, or
NULL/"latest"- base
atlas base URL from
atlas_base_url()- allow
statuses that may be resolved when named explicitly
- allow_access
accessvalues that may be resolved when named explicitly; app instances passatlas_allow_access()- refresh
re-fetch the registry instead of using the session cache
Details
A restricted version (see atlas_allow_access()) is likewise resolvable
only when the caller allows it; the public app instance passes
allow_access = "public" and gets a classed error (msens_restricted) it can
turn into a "sign in at the preview host" message rather than "unknown
version". Library callers (notebooks, the docs CI, the registry writer) keep
the permissive default – restricting is an instance decision, not a
library one, and the docs CI must be able to render a restricted release for
the preview branch.