Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .changeset/child-pipeline-visualization.md

This file was deleted.

46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# @noxify/gitlab-ci-builder

## 1.5.0

### Minor Changes

- b6d0966: Add child pipeline visualization and fluent API support

**New Features:**
- Added `childPipeline()` method to define child pipelines via callback API
- Added `writeYamlFiles()` method to automatically write parent and all child pipeline YAML files
- Child pipelines are now fully visualized in Mermaid diagrams, ASCII trees, and stage tables
- Child pipelines defined via callback are tracked and don't require filesystem access for visualization

**API Changes:**
- Added `ChildPipelineConfig` interface to track child pipeline configurations
- Extended `PipelineState` with `childPipelines` map and getter methods
- Added public getters to `ConfigBuilder`: `jobs`, `templates`, `stages`, `jobOptionsMap`
- Extended `VisualizationParams` with `trackedChildPipelines` parameter
- Enhanced `extractChildPipelines` to prioritize tracked configs over file system parsing

**Visualization Enhancements:**
- `generateMermaidDiagram` shows child pipelines as subgraphs with dotted trigger edges
- `generateAsciiTree` displays child pipelines with 🔀 indicator
- `generateStageTable` includes child pipeline jobs with separator rows and proper indentation
- Added `TriggerInfo` interface to track trigger configurations in `ExtendsGraphNode`
- Extended `buildExtendsGraph` to extract trigger information from job definitions

**Example:**

```typescript
config.childPipeline(
"trigger:deploy",
(child) => {
child.stages("deploy")
child.job("deploy:prod", { script: ["./deploy.sh"] })
return child
},
{
strategy: "depend",
outputPath: "ci/deploy-pipeline.yml",
},
)

await config.writeYamlFiles(".")
// Writes: .gitlab-ci.yml + ci/deploy-pipeline.yml
```

## 1.4.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@noxify/gitlab-ci-builder",
"version": "1.4.2",
"version": "1.5.0",
"description": "Build GitLab CI/CD pipelines programmatically with TypeScript. Fluent API for creating jobs, templates, and workflows. Import/export YAML, visualize with Mermaid diagrams, and resolve extends chains automatically.",
"keywords": [
"gitlab",
Expand Down
Loading