mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-06 02:48:25 +00:00
refactor(workflows): hide internal modules from public API
Make 7 modules pub(crate) (condition, graph, lifecycle, node_handler, run_dir) and 4 modules #[doc(hidden)] (artifact, test_support, transforms, stylesheet) to reduce the public surface of fabro-workflows. Internal crate::transform alias replaced with crate::transforms. External consumers still access what they need via narrowed re-exports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e9cf3c374d
commit
4522762cba
6 changed files with 22 additions and 12 deletions
|
|
@ -2,7 +2,6 @@
|
|||
///
|
||||
/// The parser lives in `fabro_graphviz::condition`; this module re-exports
|
||||
/// `parse_condition` and provides runtime evaluation against `Outcome`/`Context`.
|
||||
pub use fabro_graphviz::condition::parse_condition;
|
||||
use fabro_graphviz::condition::{Clause, ConditionExpr, Op};
|
||||
|
||||
use crate::context::keys;
|
||||
|
|
|
|||
|
|
@ -88,35 +88,46 @@ pub fn build_completed_stages(
|
|||
stages
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod artifact;
|
||||
pub mod asset_snapshot;
|
||||
pub mod assets;
|
||||
pub mod condition;
|
||||
pub(crate) mod condition;
|
||||
pub mod context;
|
||||
pub mod devcontainer_bridge;
|
||||
pub mod error;
|
||||
pub mod event;
|
||||
pub mod git;
|
||||
pub mod graph;
|
||||
pub(crate) mod graph;
|
||||
pub mod handler;
|
||||
mod hook_context;
|
||||
pub mod lifecycle;
|
||||
pub mod node_handler;
|
||||
#[allow(dead_code)]
|
||||
pub(crate) mod lifecycle;
|
||||
pub(crate) mod node_handler;
|
||||
pub mod operations;
|
||||
pub mod outcome;
|
||||
pub mod pipeline;
|
||||
pub mod pull_request;
|
||||
pub mod records;
|
||||
mod retry;
|
||||
pub mod run_dir;
|
||||
pub(crate) mod run_dir;
|
||||
pub mod run_lookup;
|
||||
pub mod run_settings;
|
||||
pub mod run_status;
|
||||
pub mod sandbox_git;
|
||||
#[doc(hidden)]
|
||||
pub mod test_support;
|
||||
#[doc(hidden)]
|
||||
pub mod transforms;
|
||||
|
||||
pub use transforms as transform;
|
||||
// Re-export aliases (back-compat with `fabro_workflows::transform::*` imports)
|
||||
#[doc(hidden)]
|
||||
pub mod transform {
|
||||
pub use crate::transforms::*;
|
||||
}
|
||||
#[doc(hidden)]
|
||||
pub mod vars {
|
||||
pub use crate::transforms::variable_expansion::*;
|
||||
}
|
||||
#[doc(hidden)]
|
||||
pub use transforms::stylesheet;
|
||||
pub use transforms::variable_expansion as vars;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use fabro_graphviz::graph::Graph;
|
|||
|
||||
use crate::error::FabroError;
|
||||
use crate::pipeline::{self, TransformOptions, Validated};
|
||||
use crate::transform::Transform;
|
||||
use crate::transforms::Transform;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct CreateOptions {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::transform::{
|
||||
use crate::transforms::{
|
||||
FileInliningTransform, ModelResolutionTransform, StylesheetApplicationTransform, Transform,
|
||||
VariableExpansionTransform,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ pub struct Finalized {
|
|||
/// Options for the TRANSFORM phase.
|
||||
pub struct TransformOptions {
|
||||
pub base_dir: Option<PathBuf>,
|
||||
pub custom_transforms: Vec<Box<dyn crate::transform::Transform>>,
|
||||
pub custom_transforms: Vec<Box<dyn crate::transforms::Transform>>,
|
||||
}
|
||||
|
||||
/// Options for the RETRO phase.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fabro_graphviz::graph::{AttrValue, Graph};
|
||||
pub use fabro_graphviz::stylesheet::{parse_stylesheet, Declaration, Rule, Selector, Stylesheet};
|
||||
pub use fabro_graphviz::stylesheet::{parse_stylesheet, Rule, Selector, Stylesheet};
|
||||
|
||||
/// Recognized stylesheet properties.
|
||||
const STYLESHEET_PROPERTIES: &[&str] =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue