pub struct App {
pub root: PathBuf,
}Expand description
One located Frame application.
Fields§
§root: PathBufThe application root: the directory holding frame.toml.
Implementations§
Source§impl App
impl App
Sourcepub fn find(start: &Path) -> Result<Self, CliError>
pub fn find(start: &Path) -> Result<Self, CliError>
Locates the application whose tree contains start, walking parent
directories until a frame.toml is found.
§Errors
Returns CliError::NotAnApplication when no ancestor holds a
frame.toml.
Sourcepub fn find_from_current_dir() -> Result<Self, CliError>
pub fn find_from_current_dir() -> Result<Self, CliError>
Locates the application containing the current directory.
§Errors
Fails when the current directory is unreadable or no ancestor holds a
frame.toml.
Sourcepub fn config_path(&self) -> PathBuf
pub fn config_path(&self) -> PathBuf
The application’s frame.toml path.
Sourcepub fn component_dir(&self) -> PathBuf
pub fn component_dir(&self) -> PathBuf
The component directory.
Sourcepub fn load_config(&self) -> Result<FrameConfig, CliError>
pub fn load_config(&self) -> Result<FrameConfig, CliError>
Loads and validates the application’s stated config through the host’s own loader — the CLI never grows a second parser.
§Errors
Surfaces the host’s typed load failure, naming the file.
Sourcepub fn page_toolchain_installed(&self) -> bool
pub fn page_toolchain_installed(&self) -> bool
True when the page’s type/proof toolchain is installed
(page/node_modules exists).
Sourcepub fn stale_page_sources(&self) -> Result<Vec<PathBuf>, CliError>
pub fn stale_page_sources(&self) -> Result<Vec<PathBuf>, CliError>
Every page source whose compiled module is missing or older than the source — empty means the compiled page is current. A tsconfig newer than a compiled module also marks that module stale, since compiler options shape the output.
§Errors
Fails loudly on an unreadable page tree.