Library entry points
Library entry points
The scan, check and push entry points behind the sarracenia binary.
TOKEN_ENV_VAR
pub const TOKEN_ENV_VAR : & str = "SARRACENIA_TOKEN";
Env var the token is read from. Never accepted on the config file or the command line, so it never ends up committed or in a shell history dump.
scan
pub fn scan(config : & Config, strict : bool) -> Result <(), RunError >;
sarracenia scan: print the page tree built from the repo rooted at the
current directory, without making any network call.
push
pub async fn push(config : & Config, dry_run : bool, strict : bool, no_media : bool, allow_mass_prune : bool,) -> Result <(), RunError >;
sarracenia push [--dry-run] [--no-media] [--allow-mass-prune]: build the page-tree payload,
uploading every local file a page references and rewriting the
reference to its URL unless --no-media says to push without uploads,
and either send it with prune: true or print a summary of what would be
sent.
check
pub async fn check(config : & Config) -> Result <(), RunError >;
sarracenia check: validate config (already parsed by the caller), site
reachability (GET /api/health, unauthenticated) and the token (GET /api/auth/me, the lightest authenticated route Storefront exposes).