Ephemeral and mutable state during rendering that doesn't rely on external configuration

interface SSRMetadata {
    extraHead: string[];
    hasDirectives: Set<string>;
    hasHydrationScript: boolean;
    hasRenderedHead: boolean;
    headInTree: boolean;
    propagators: Set<AstroComponentInstance>;
    renderedScripts: Set<string>;
    rendererSpecificHydrationScripts: Set<string>;
}

Properties

extraHead: string[]
hasDirectives: Set<string>
hasHydrationScript: boolean
hasRenderedHead: boolean
headInTree: boolean
renderedScripts: Set<string>

Used by renderScript to track script ids that have been rendered, so we only render each once.

rendererSpecificHydrationScripts: Set<string>

Names of renderers that have injected their hydration scripts into the current page. For example, Solid SSR needs a hydration script in the page HTML before the first Solid component.