pub const UPDATE_ROUTE_MANIFEST: &str = "/v1/projects/{project}/channels/{channel}/manifest";
pub const UPDATE_ROUTE_BLOB: &str = "/v1/blobs/{sha256}";
pub const UPDATE_ROUTE_EVENTS: &str = "/v1/projects/{project}/channels/{channel}/events";
pub const DEFAULT_UPDATE_SERVER_HOST: &str = "127.0.0.1";
pub const DEFAULT_UPDATE_SERVER_PORT: u16 = 8787;
pub const DEFAULT_UPDATE_HEARTBEAT_MS: u64 = 15_000;
pub const DEFAULT_UPDATE_WATCH_POLL_MS: u64 = 100;
pub const DEFAULT_UPDATE_EVENT_LOG_CAP: usize = 256;
pub const STORE_DIR_STAGING: &str = "staging";
pub const STORE_DIR_BLOBS: &str = "blobs";
pub const STORE_DIR_SHA256: &str = "sha256";
pub const STORE_DIR_RELEASES: &str = "releases";
pub const STORE_DIR_CHANNELS: &str = "channels";
pub const STORE_DIR_TRACKS: &str = "tracks";
pub const STORE_DIR_STATE: &str = "state";
pub const STORE_DIR_EVENTS: &str = "events";
pub(crate) const STORE_WRITER_LOCK_FILE: &str = "writer.lock";
pub(crate) const STORE_ACTIVE_POINTER_FILE: &str = "active.json";
pub(crate) const STORE_STAGED_MANIFEST_FILE: &str = "manifest.json";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_PROTOCOL: &str = "protocol";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_ABI: &str = "abi";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_MODE: &str = "mode";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_TRACK: &str = "track";
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_LAST_EVENT_ID: &str = "last_event_id";
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_PROJECT: &str = "project";
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_CHANNEL: &str = "channel";
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_SHA256: &str = "sha256";
#[cfg(feature = "update-server")]
pub(crate) const MODE_TOKEN_DATA: &str = "declarative_data";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_ETAG: &str = "etag";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_ACCEPT_RANGES: &str = "accept-ranges";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_BYTES: &str = "bytes";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_CONTENT_RANGE: &str = "content-range";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_RANGE_LOWER: &str = "range";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_LAST_EVENT_ID_LOWER: &str = "last-event-id";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_CACHE_IMMUTABLE: &str = "public, max-age=31536000, immutable";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_CACHE_NO_CACHE: &str = "no-cache";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_MIME_JSON: &str = "application/json; charset=utf-8";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_MIME_OCTET: &str = "application/octet-stream";
pub(crate) const RANGE_BYTES_PREFIX: &str = "bytes=";
pub(crate) const EXT_JSON_DOT: &str = ".json";
pub(crate) const EXT_JSONL_DOT: &str = ".jsonl";
pub(crate) const ASCII_HYPHEN: u8 = b'-';
pub(crate) const ASCII_UNDERSCORE: u8 = b'_';
pub(crate) const ASCII_DOT: u8 = b'.';
pub(crate) const ERR_INVALID_STORE_IDENT: &str =
"store identifier must contain only ASCII alphanumerics, '-', '_', or '.' without traversal";
pub(crate) const ERR_WRITER_LOCK_TIMEOUT: &str = "timed out acquiring update store writer lock";
pub(crate) const ERR_EMPTY_SIGNING_KEY: &str =
"signing key cannot be empty for publish or rollback";
pub(crate) const ERR_STAGE_NOT_FOUND: &str = "staged release directory not found";
pub(crate) const ERR_ROLLBACK_TARGET_MISSING: &str = "rollback target release manifest not found";
pub(crate) const ERR_BLOB_INTEGRITY: &str = "blob missing or SHA-256 digest mismatch";
pub(crate) const ERR_NO_COMPATIBLE_RELEASE: &str =
"no compatible release available for client protocol, ABI, or delivery mode";
#[cfg(not(feature = "update-server"))]
pub(crate) const ERR_UPDATE_SERVER_FEATURE_DISABLED: &str =
"euv-cli was built without the `update-server` Cargo feature";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_NOT_FOUND: &str = "{\"error\":\"not_found\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_METHOD_NOT_ALLOWED: &str = "{\"error\":\"method_not_allowed\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_BAD_REQUEST: &str = "{\"error\":\"bad_request\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_RANGE_INVALID: &str = "{\"error\":\"range_not_satisfiable\"}";
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_UNCONFIGURED: &str = "{\"error\":\"update_server_unconfigured\"}";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_SSE_CONNECTED_COMMENT: &str = "connected";
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_SSE_HEARTBEAT_COMMENT: &str = "keep-alive";