Skip to main content

Module archive

Module archive 

Source
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§

ArchiveEntries
MarkdownEntry
One markdown file extracted from the archive. content is the raw UTF-8 body; BOM stripping is deferred to the strict checker so the raw bytes for offset reporting stay truthful.
SchemaFile
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 ValidationError on any violation. Performs no I/O; reads from the provided byte slice.