graph_validation.ts

Declarations
#

Shared dependency graph validation logic used across multiple workflows.

Consolidates graph building, cycle detection, and publishing order computation that was duplicated in three places: multi_repo_publisher.ts, publishing_plan.ts, and gitops_analyze.task.ts.

Options pattern supports different behaviors: analyze can tolerate cycles for reporting, while publish must throw on production cycles.

See also: dependency_graph.ts for core graph data structure and algorithms.

2 declarations

view source

GraphValidationResult
#

validate_dependency_graph
#

graph_validation.ts view source

(repos: LocalRepo[], options?: { log?: Logger | undefined; throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }): GraphValidationResult

Shared utility for building dependency graph, detecting cycles, and computing publishing order. This centralizes logic that was duplicated across multi_repo_publisher, publishing_plan, and gitops_analyze.

repos

type LocalRepo[]

options

type { log?: Logger | undefined; throw_on_prod_cycles?: boolean | undefined; log_cycles?: boolean | undefined; log_order?: boolean | undefined; }
default {}

returns

GraphValidationResult

graph validation result with graph, publishing order, and detected cycles

throws

  • if - production cycles detected and throw_on_prod_cycles is true

Depends on
#

Imported by
#