1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
pub const PATH_AI_HEALTH: &str = "/ai/health";
pub const PATH_AI_SNAPSHOT_V2: &str = "/ai/snapshot/v2";
pub const PATH_AI_SNAPSHOT: &str = "/ai/snapshot";
pub const PATH_AI_SCHEMA: &str = "/ai/schema";
pub const HTTP_SCHEME_PREFIX: &str = "http://";
pub const HTTP_HEADER_DELIM: & = b"\r\n\r\n";
pub const HTTP_CRLF_BYTES: & = b"\r\n";
pub const ERR_MALFORMED_HTTP_RESPONSE: &str = "malformed HTTP response";
pub const HTTP_STATUS_OK_TOKEN: &str = "200";
pub const HTTP_HDR_TRANSFER_ENCODING: &str = "transfer-encoding";
pub const HTTP_TOKEN_CHUNKED: &str = "chunked";
pub const JSON_KEY_STATUS: &str = "status";
pub const JSON_KEY_PROTOCOL: &str = "protocol";
pub const JSON_KEY_SCHEMA: &str = "schema";
pub const JSON_KEY_ROUTE: &str = "route";
pub const JSON_KEY_ACTIVE_ROUTE: &str = "active_route";
pub const JSON_KEY_NODES: &str = "nodes";
pub const JSON_KEY_NODE_COUNT: &str = "node_count";
pub const JSON_KEY_ANOMALIES: &str = "anomalies";
pub const JSON_KEY_LAYOUT_ANOMALIES: &str = "layout_anomalies";
pub const JSON_KEY_FORMAT: &str = "format";
pub const JSON_KEY_VERSION: &str = "version";
pub const JSON_KEY_FILES: &str = "files";
pub const JSON_KEY_PATH: &str = "path";
pub const JSON_KEY_SHA256: &str = "sha256";
pub const JSON_KEY_SIZE: &str = "size";
pub const JSON_KEY_MESSAGE: &str = "message";
pub const JSON_KEY_RULE: &str = "rule";
pub const JSON_KEY_KIND: &str = "kind";
pub const SUFFIX_MJS: &str = ".mjs";
pub const ERR_INVALID_INSPECT_URL: &str =
"inspect URL must start with http:// and contain a valid host[:port]";
pub const ERR_DIST_DIR_MISSING: &str = "artifact directory does not exist";
pub const INSPECT_HDR_FILE: &str = "FILE";
pub const INSPECT_HDR_SIZE: &str = "SIZE";
pub const INSPECT_UNKNOWN_ROUTE: &str = "unknown";
pub const INSPECT_UNREACHABLE_STATUS: &str = "unreachable";
pub const INSPECT_MAX_LARGEST_FILES: usize = 10;