paraglide-launch 0.1.2

Analyze a project and detect deployable services, languages, frameworks, commands, and env vars
Documentation
#![deny(unsafe_code)]

pub mod discovery;
pub mod error;
pub mod fs;
pub mod signal;
pub mod signals;
pub mod types;

pub use discovery::{discover, generate, walk_local};
pub use error::LaunchError;
pub use fs::{DirEntry, FileSystem, LocalFs, MemoryFs, RootedFs};
pub use signal::{Signal, SignalOutput};
pub use types::*;

use std::path::Path;

/// Discover services in a directory using the default signal set and local filesystem.
/// Uses gitignore-aware walking to skip files the project itself ignores.
pub fn discover_local(root: &Path) -> Result<Discovery, LaunchError> {
    let fs = RootedFs::new(root);
    let signals = signals::default_signals();
    discovery::discover_local_impl(root, signals, &fs)
}

/// Discover using a custom filesystem and signal set. For testing.
pub fn discover_with_fs(
    root: &Path,
    signals: Vec<Box<dyn Signal>>,
    fs: &dyn FileSystem,
) -> Result<Discovery, LaunchError> {
    discover(root, signals, fs)
}