Skip to content

Interface: TopologyConfigBuilder<TPartition> ​

Defined in: builders/topology-config-builder.ts:15

Fluent builder for relational system topologies (P.topology(id)), extending TopologyBuilder<TPartition>.

Binds the backing TopologyStoreASTNode, statically validates the partition dependency DAG via .partitions(...), and configures signal-driven overlay commits.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
TPartition extends stringstringLiteral string union of partition identifiers in the topology DAG.

Methods ​

affectedBy() ​

ts
affectedBy(partitionId): readonly TPartition[];

Defined in: ast/topology-builder.ts:39

Returns [partitionId, ...dependentsOf(partitionId)], representing all partitions affected by a contract change in partitionId.

Places partitionId first followed by all strict transitive dependents in deterministic topological order so scoped rules and cross-verifiers can inspect the full impact cone.

Parameters ​

ParameterTypeDescription
partitionIdTPartitionSource partition identifier in the topology DAG.

Returns ​

readonly TPartition[]

partitionId followed by its strict transitive dependents.

Inherited from ​

TopologyBuilder.affectedBy


commitOverlayWhen() ​

ts
commitOverlayWhen<TOnSig, TDiscardSig>(config): TopologyConfigBuilder<TPartition>;

Defined in: builders/topology-config-builder.ts:61

Configures signal-correlated overlay commit and discard triggers for PR-based lanes.

Extracts any SignalBuilder instances inside config into passive SignalNode references.

Type Parameters ​

Type ParameterDefault typeDescription
TOnSigunknownCommit signal payload type.
TDiscardSigunknownDiscard signal payload type.

Parameters ​

ParameterTypeDescription
configTopologyCommitOverlayBuilderInput<TOnSig, TDiscardSig>Overlay commit/discard trigger configuration.

Returns ​

TopologyConfigBuilder<TPartition>

New immutable topology builder.


dependentsOf() ​

ts
dependentsOf(partitionId): readonly TPartition[];

Defined in: ast/topology-builder.ts:27

Returns all strict transitive dependent partitions that depend (directly or indirectly) on partitionId.

Traverses the reverse dependency edges of the topology DAG in deterministic topological order, excluding partitionId itself from the returned array.

Parameters ​

ParameterTypeDescription
partitionIdTPartitionSource partition identifier in the topology DAG.

Returns ​

readonly TPartition[]

Deterministically ordered list of strict transitive dependent partitions.

Inherited from ​

TopologyBuilder.dependentsOf


partitions() ​

ts
partitions<TNextPartition>(partitionMap): TopologyConfigBuilder<TNextPartition>;

Defined in: builders/topology-config-builder.ts:43

Declares and statically validates the directed acyclic graph (DAG) of partitions and their dependsOn edges.

Verifies at builder call time that partitionMap is non-empty, references only known keys, and is acyclic.

Type Parameters ​

Type ParameterDescription
TNextPartition extends stringLiteral string union of partition keys in partitionMap.

Parameters ​

ParameterTypeDescription
partitionMapReadonly<Record<TNextPartition, TopologyPartitionConstraint<NoInfer<TNextPartition>>>>Partition dependency map.

Returns ​

TopologyConfigBuilder<TNextPartition>

New immutable topology builder narrowed to TNextPartition.

Throws ​

If partitionMap is empty, references unknown partitions, or contains a dependency cycle.


store() ​

ts
store(topologyStore): TopologyConfigBuilder<TPartition>;

Defined in: builders/topology-config-builder.ts:26

Binds the backing TopologyStoreASTNode (sqlite.topologyStore or postgres.topologyStore).

Replaces any previously bound store while preserving declared partitions and overlay rules.

Parameters ​

ParameterTypeDescription
topologyStoreMaybeBuilder<TopologyStoreASTNode>Topology store AST node or builder.

Returns ​

TopologyConfigBuilder<TPartition>

New immutable topology builder.


toAST() ​

ts
toAST(): TopologyNode;

Defined in: ast/ast-builder.ts:20

Compiles the current builder configuration into a deeply frozen passive AST node.

Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.

Returns ​

TopologyNode

Deeply frozen passive AST node.

Inherited from ​

TopologyBuilder.toAST

Properties ​

PropertyModifierTypeDescriptionInherited fromDefined in
idreadonlystringUnique identifier of the relational topology.TopologyBuilder.idast/topology-builder.ts:15

Released under the MIT License.