bundle.website.core.static

Static path helpers and guarded component static file serving.

Classes

ComponentStaticFiles

Serve only safe static asset types from component folders.

Functions

website_root(→ pathlib.Path)

Return the website package root directory.

default_static_path(→ pathlib.Path)

Return the default global static directory for the website app.

default_components_path(→ pathlib.Path)

Return the default components root directory for static mounting.

Module Contents

bundle.website.core.static.website_root() pathlib.Path

Return the website package root directory.

bundle.website.core.static.default_static_path() pathlib.Path

Return the default global static directory for the website app.

bundle.website.core.static.default_components_path() pathlib.Path

Return the default components root directory for static mounting.

class bundle.website.core.static.ComponentStaticFiles

Bases: fastapi.staticfiles.StaticFiles

Serve only safe static asset types from component folders.

The allowlist blocks Python/templates and only exposes frontend-oriented asset types. This supports the atomic component layout (component.ts / component.css at component root plus optional assets/).

async get_response(path: str, scope)