use serde::{Deserialize, Serialize};
mod archive;
mod cache_entry;
mod client;
mod docs_sites;
mod fetch;
mod git_refs;
mod github_files;
mod package_docs;
mod repository;
pub use cache_entry::{cached, dir, needs_refresh, stale};
pub use fetch::{fetch, fetch_automatic, fetch_private};
pub use git_refs::tag_candidates;
pub use repository::{parse_github, repo_of, repo_of_with};
const MAX_FILES: usize = 2500;
const MAX_BYTES: u64 = 40 * 1024 * 1024;
const MAX_FILE: u64 = 2 * 1024 * 1024;
#[derive(Debug, Clone, PartialEq)]
pub struct Repo {
pub owner: String,
pub name: String,
pub subdir: Option<String>,
pub host: Option<crate::private::Origin>,
}
pub const FORMAT: u32 = 7;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Manifest {
#[serde(default)]
pub format: u32,
pub repo: String,
pub tag: Option<String>,
#[serde(default)]
pub commit: Option<String>,
#[serde(default)]
pub docs_sites_checked: bool,
pub files: usize,
pub bytes: u64,
pub note: Option<String>,
#[serde(default)]
pub site: Option<String>,
#[serde(default)]
pub pages: Vec<String>,
#[serde(default)]
pub via: Option<String>,
}
#[cfg(test)]
mod tests;