euv-cli 0.48.1

Cross-platform CLI tool for the euv native UI framework supporting run, build, check, fmt, doctor, new, and Hyperlane SSE dynamic updates across all supported platforms.
Documentation
/// Hyperlane route template serving protocol/ABI-negotiated signed release manifests.
pub const UPDATE_ROUTE_MANIFEST: &str = "/v1/projects/{project}/channels/{channel}/manifest";

/// Hyperlane route template serving immutable content-addressed SHA-256 blobs with Range support.
pub const UPDATE_ROUTE_BLOB: &str = "/v1/blobs/{sha256}";

/// Hyperlane route template streaming minimal `release.activated` SSE notifications with `Last-Event-ID` replay.
pub const UPDATE_ROUTE_EVENTS: &str = "/v1/projects/{project}/channels/{channel}/events";

/// Default bind host for `euv update serve`.
pub const DEFAULT_UPDATE_SERVER_HOST: &str = "127.0.0.1";

/// Default bind port for `euv update serve`.
pub const DEFAULT_UPDATE_SERVER_PORT: u16 = 8787;

/// Default SSE heartbeat interval in milliseconds for `euv update serve`.
pub const DEFAULT_UPDATE_HEARTBEAT_MS: u64 = 15_000;

/// Default background filesystem pointer watcher poll interval in milliseconds.
pub const DEFAULT_UPDATE_WATCH_POLL_MS: u64 = 100;

/// Default maximum retained events in each bounded channel event log (`state/events/`).
pub const DEFAULT_UPDATE_EVENT_LOG_CAP: usize = 256;

/// Subdirectory holding staged artifacts prior to atomic publish.
pub const STORE_DIR_STAGING: &str = "staging";

/// Subdirectory holding immutable SHA-256 content-addressed blobs (`blobs/sha256/`).
pub const STORE_DIR_BLOBS: &str = "blobs";

/// Hash algorithm subdirectory beneath `blobs/`.
pub const STORE_DIR_SHA256: &str = "sha256";

/// Subdirectory holding immutable signed release manifests (`releases/`).
pub const STORE_DIR_RELEASES: &str = "releases";

/// Subdirectory holding atomically swapped channel active pointers (`channels/`).
pub const STORE_DIR_CHANNELS: &str = "channels";

/// Subdirectory holding per-track active pointers under a channel directory.
pub const STORE_DIR_TRACKS: &str = "tracks";

/// Subdirectory holding writer lock and bounded event history (`state/`).
pub const STORE_DIR_STATE: &str = "state";

/// Subdirectory holding bounded per-channel JSONL event logs under `state/`.
pub const STORE_DIR_EVENTS: &str = "events";

/// Local writer lock filename inside `state/`.
pub(crate) const STORE_WRITER_LOCK_FILE: &str = "writer.lock";

/// Active channel pointer filename inside `channels/<project>/<channel>/`.
pub(crate) const STORE_ACTIVE_POINTER_FILE: &str = "active.json";

/// Staged manifest filename inside `staging/<stage_id>/`.
pub(crate) const STORE_STAGED_MANIFEST_FILE: &str = "manifest.json";

/// Query parameter key carrying client protocol version.
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_PROTOCOL: &str = "protocol";

/// Query parameter key carrying client host ABI version.
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_ABI: &str = "abi";

/// Query parameter key carrying client delivery mode (`wasm_component` or `declarative_data`).
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_MODE: &str = "mode";

/// Query parameter key carrying preferred compatibility track.
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_TRACK: &str = "track";

/// Query parameter key carrying fallback `Last-Event-ID` cursor.
#[cfg(feature = "update-server")]
pub(crate) const QUERY_KEY_LAST_EVENT_ID: &str = "last_event_id";

/// Route parameter key for project name.
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_PROJECT: &str = "project";

/// Route parameter key for channel name.
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_CHANNEL: &str = "channel";

/// Route parameter key for SHA-256 blob digest.
#[cfg(feature = "update-server")]
pub(crate) const ROUTE_PARAM_SHA256: &str = "sha256";

/// Delivery mode wire token for Declarative Data delivery.
#[cfg(feature = "update-server")]
pub(crate) const MODE_TOKEN_DATA: &str = "declarative_data";

/// HTTP header name for `ETag`.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_ETAG: &str = "etag";

/// HTTP header name for `Accept-Ranges`.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_ACCEPT_RANGES: &str = "accept-ranges";

/// HTTP header value indicating byte range support.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_BYTES: &str = "bytes";

/// HTTP header name for `Content-Range`.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_CONTENT_RANGE: &str = "content-range";

/// HTTP header name for incoming `Range` requests.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_RANGE_LOWER: &str = "range";

/// HTTP header name for `Last-Event-ID`.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_HDR_LAST_EVENT_ID_LOWER: &str = "last-event-id";

/// Immutable cache control directive for content-addressed SHA-256 blobs.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_CACHE_IMMUTABLE: &str = "public, max-age=31536000, immutable";

/// No-cache directive for dynamic channel manifests.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_CACHE_NO_CACHE: &str = "no-cache";

/// MIME type for JSON responses.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_MIME_JSON: &str = "application/json; charset=utf-8";

/// MIME type for immutable binary blobs.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_MIME_OCTET: &str = "application/octet-stream";

/// Prefix expected on HTTP `Range` byte headers.
pub(crate) const RANGE_BYTES_PREFIX: &str = "bytes=";

/// File extension for JSON manifest and pointer files.
pub(crate) const EXT_JSON_DOT: &str = ".json";

/// File extension for JSONL event history files.
pub(crate) const EXT_JSONL_DOT: &str = ".jsonl";

/// Allowed ASCII hyphen byte in store identifiers.
pub(crate) const ASCII_HYPHEN: u8 = b'-';

/// Allowed ASCII underscore byte in store identifiers.
pub(crate) const ASCII_UNDERSCORE: u8 = b'_';

/// Allowed ASCII period byte in store identifiers.
pub(crate) const ASCII_DOT: u8 = b'.';

/// Error string when an identifier contains unsafe path characters.
pub(crate) const ERR_INVALID_STORE_IDENT: &str =
    "store identifier must contain only ASCII alphanumerics, '-', '_', or '.' without traversal";

/// Error string when a writer lock cannot be acquired within the bounded wait budget.
pub(crate) const ERR_WRITER_LOCK_TIMEOUT: &str = "timed out acquiring update store writer lock";

/// Error string when a signing key is empty during publish or rollback.
pub(crate) const ERR_EMPTY_SIGNING_KEY: &str =
    "signing key cannot be empty for publish or rollback";

/// Error string when a staged release directory does not exist.
pub(crate) const ERR_STAGE_NOT_FOUND: &str = "staged release directory not found";

/// Error string when a target rollback release does not exist.
pub(crate) const ERR_ROLLBACK_TARGET_MISSING: &str = "rollback target release manifest not found";

/// Error string when a blob referenced by a manifest is missing or corrupted.
pub(crate) const ERR_BLOB_INTEGRITY: &str = "blob missing or SHA-256 digest mismatch";

/// Error string when no compatible release exists for the client's protocol, ABI, or delivery mode.
pub(crate) const ERR_NO_COMPATIBLE_RELEASE: &str =
    "no compatible release available for client protocol, ABI, or delivery mode";

/// Error string when `euv update serve` is invoked without the `update-server` Cargo feature.
#[cfg(not(feature = "update-server"))]
pub(crate) const ERR_UPDATE_SERVER_FEATURE_DISABLED: &str =
    "euv-cli was built without the `update-server` Cargo feature";

/// Error response payload returned for HTTP 404.
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_NOT_FOUND: &str = "{\"error\":\"not_found\"}";

/// Error response payload returned for HTTP 405.
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_METHOD_NOT_ALLOWED: &str = "{\"error\":\"method_not_allowed\"}";

/// Error response payload returned for HTTP 400.
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_BAD_REQUEST: &str = "{\"error\":\"bad_request\"}";

/// Error response payload returned for HTTP 416.
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_RANGE_INVALID: &str = "{\"error\":\"range_not_satisfiable\"}";

/// Error response payload returned when update server state is not registered.
#[cfg(feature = "update-server")]
pub(crate) const ERR_BODY_UNCONFIGURED: &str = "{\"error\":\"update_server_unconfigured\"}";

/// SSE initial connection comment line payload.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_SSE_CONNECTED_COMMENT: &str = "connected";

/// SSE periodic keep-alive heartbeat comment payload.
#[cfg(feature = "update-server")]
pub(crate) const UPDATE_SSE_HEARTBEAT_COMMENT: &str = "keep-alive";