Expand description
Single source of truth for cloud-side URLs.
Runtime cloud API calls and browser deep links route through this
module. DIFFLORE_CLOUD_URL overrides the production API base.
Display-only marketing labels stay outside this runtime URL table.
Constants§
- DEFAULT_
API_ BASE - Cloud API base used when cloud URL overrides are unset.
- ENV_
CLOUD_ URL - Canonical environment variable that overrides the default base. Honoured by every helper in this module.
- GITHUB_
REPO owner/nameslug for the project’s canonical GitHub repository.- LEGACY_
ENV_ CLOUD_ URL - Legacy spelling accepted as a compatibility fallback.
Functions§
- api_
base - Read the configured API base, falling back to
DEFAULT_API_BASE. Empty values are treated as unset so empty env vars do not silently break clients. - api_
origin - Scheme + authority (
scheme://host[:port]) used to bind saved auth tokens to the origin that issued them. - default_
api_ origin - Default origin assumed for saved credentials without a stored host.
- detect_
hostname - detect_
platform - github_
issues_ url …/issues— used in bug-report footers and the 5xx error help pointer.- github_
release_ tag_ url …/releases/tag/v{version}— emitted by the upgrade checker so users can read release notes before pulling.- github_
repo_ url https://github.com/<owner>/<name>.- origin_
of scheme://host[:port]from any URL, dropping the path. Keeps the scheme so credentials never crosshttp/httpsboundaries.- pricing_
url - Cloud pricing page on the configured web origin.
- register
- web_
host_ display - Bare host (and port, if non-default) for display strings.
- web_
link - Build a full URL to a web page on the cloud origin.
pathmay include a leading/; both forms produce the same result. - web_
link_ from - Pure variant exposed for testing.
- web_
origin - Browser origin derived from the API base. A trailing
/apiis stripped so deep links target public web routes. - web_
origin_ from - Pure variant exposed for testing — derive a web origin from any API-base string.