hen 0.18.1

Run protocol-aware API request collections from the command line or through MCP.
Documentation
/// Parses the contents of a collection file into a Collection struct.
use std::path::Path;

use pest_derive::Parser;

mod collection;
pub mod context;
mod declarations;
mod legacy_header;
mod oauth;
mod preprocessor;
mod protocol;
mod redaction;
mod request;
mod spans;
mod syntax;
mod variables;

pub use collection::parse_collection;
pub use collection::parse_collection_with_environment;
pub use syntax::{
    SyntaxRequestSummary, SyntaxSummary, inspect_collection_syntax,
};
pub(crate) use variables::{SecretValueCache, resolve_runtime_scalar};
pub use variables::eval_shell_script;

#[derive(Parser)]
#[grammar = "src/parser/grammar.pest"]
struct CollectionParser;

pub fn preprocess_only(input: &str, working_dir: &Path) -> Result<String, String> {
    preprocessor::preprocess(input, working_dir).map_err(|err| err.to_string())
}

#[cfg(test)]
mod tests;