Expand description
Front-matter parser for Shape scripts
Parses optional TOML front-matter delimited by --- at the top of a script.
Also skips shebang lines (#!/...).
Frontmatter is for standalone script metadata/dependencies/extensions.
It supports [dependencies], [dev-dependencies], and [[extensions]].
Packaging/build sections like [project] and [build] still belong in shape.toml.
Structs§
- Frontmatter
Config - Script-level frontmatter configuration.
- Frontmatter
Diagnostic - A diagnostic produced during frontmatter validation.
- Frontmatter
Diagnostic Location - Source location for a frontmatter diagnostic.
Enums§
- Frontmatter
Diagnostic Severity - Severity level for frontmatter diagnostics.
Constants§
- FRONTMATTER_
EXTENSION_ KEYS - Keys allowed inside
[[extensions]]entries. - FRONTMATTER_
MODULE_ KEYS - Keys allowed inside
[modules]. - FRONTMATTER_
SECTION_ KEYS - Known table sections allowed in frontmatter.
- FRONTMATTER_
TOP_ LEVEL_ KEYS - Known top-level keys allowed in frontmatter.
Functions§
- parse_
frontmatter - Parse optional front-matter from a Shape source string.
- parse_
frontmatter_ validated - Parse optional front-matter from a Shape source string, with validation.