previa-engine-0.0.3 has been yanked.
previa-engine
Rustdoc-style crate documentation.
Crate Purpose
previa-engine is the core pipeline execution crate. It resolves templates, executes HTTP steps, evaluates assertions, and returns structured execution results.
Public API
Exported functions:
execute_pipelineexecute_pipeline_with_clientexecute_pipeline_with_hooksexecute_pipeline_with_specs_hooksexecute_pipeline_with_client_hooksrender_template_valuerender_template_value_simple
Core Types
RuntimeSpecPipelinePipelineStepStepAssertionStepExecutionResultStepRequestStepResponseAssertionResult
Execution Model
For each step:
- Resolve templated
url,headers, andbody. - Apply
delay(if configured). - Perform request.
- Evaluate assertions.
- Retry (if allowed by
retryand assertion behavior).
step.url must always be an absolute URL (http:// or https://).
Template System
Supported expressions:
{{steps.<step_id>.<field>}}{{specs.<slug>.url.<name>}}- legacy:
{{url.<slug>.<name>}}(normalized)
Helpers:
{{helpers.uuid}}{{helpers.email}}{{helpers.name}}{{helpers.username}}{{helpers.number 10 99}}{{helpers.date}}{{helpers.boolean}}{{helpers.cpf}}
Assertion Operators
Currently implemented operators:
equalsnot_equalscontainsexistsnot_existsgtlt
Important Behavior Notes
GETandHEADdo not send request body.maxAttempts = retry + 1.should_cancelcallback can interrupt execution.- Unknown templates may remain unchanged.
Rust Example
use execute_pipeline_with_specs_hooks;
# async
Module Relationship
main -> runner -> engine
Common Pitfalls
- Empty
pipeline.stepsin upstream callers. - Invalid assertion fields (for example missing
body.*). - Assuming unsupported operators such as
gte,lte,ne,not_contains.