Skip to main content

Module frontmatter

Module frontmatter 

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

FrontmatterConfig
Script-level frontmatter configuration.
FrontmatterDiagnostic
A diagnostic produced during frontmatter validation.
FrontmatterDiagnosticLocation
Source location for a frontmatter diagnostic.

Enums§

FrontmatterDiagnosticSeverity
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.