Skip to main content

Module endpoints

Module endpoints 

Source
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/name slug 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 cross http/https boundaries.
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. path may 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 /api is 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.