Expand description
Archive-level checks over raw zip bytes.
Single pass: walks every entry once, enforces safety + caps + the
file-type whitelist, yields entries to downstream modules. Returns
the config-file bytes separately from the markdown entries because
downstream dispatch differs — config goes to validator::config,
markdown goes to validator::strict + parse_markdown.
Structs§
- Archive
Entries - Markdown
Entry - One markdown file extracted from the archive.
contentis the raw UTF-8 body; BOM stripping is deferred to the strict checker so the raw bytes for offset reporting stay truthful. - Schema
File - One schema-source file extracted from the archive’s
.memstead/schema/tree.
Functions§
- extract_
entries - Walk the archive, enforce archive-level rules, return entries in
sorted path order. Fails with a typed
ValidationErroron any violation. Performs no I/O; reads from the provided byte slice. - to_
package_ files - Re-key an archive’s schema tree to the package-relative shape every
sealed schema surface speaks (
schema.yaml,types/<t>.yaml,schema-format.json) — the formmemstead_schema::load_sealed_packagereads and the form the local schema source is written in. Files outside the.memstead/schema/tree cannot appear here (the extractor filters them), so the strip is total in practice; anything unprefixed is passed through unchanged rather than silently dropped.