module

Hwaro::Utils::BuildOutput

Constants

DEFAULT_SOURCES = ["config.toml", "content", "templates", "static", "data", "themes", "sass", "assets"] of ::String

Source trees whose newest mtime a trustworthy build output must postdate. Callers pass their own resolved paths; this is the convention-named fallback.

MAX_SCANNED_ENTRIES = 20000

Upper bound on entries stat-ed while answering "is the output stale?". The walk exits early on the first newer entry, so this only bounds the FRESH case (a huge static/ tree of images). Running out of budget reports "not stale": a hint is advisory, and guessing on partial evidence would nag sites it cannot actually judge.

SERVE_OUTPUT_DIR = ".hwaro/serve"

Where hwaro serve builds (mirrors ServeOptions::DEV_OUTPUT_DIR). Named in hints so a serve-only workflow understands why its output_dir is empty. Duplicated rather than required so this util stays free of CLI dependencies.

Instance methods

oracle(dir : String, root : String = ".", sources : Array(String) = DEFAULT_SOURCES, tool : String = "doctor") : Oracle
Source

Nested types