Phase 8b: Helm contract extraction + diagram support
- extractHelmContracts() in contracts.js: values, services, workloads, deps - Merged Helm contracts into main pipeline (124 contracts on Foxtrot) - diagrams.js: generateContractDiagram now handles Helm types - Sanitized Mermaid class names for Helm contracts - 1601-line contracts index with full classDiagram
This commit is contained in:
13
sysdoc.js
13
sysdoc.js
@@ -2,7 +2,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const GraphStore = require('./graph.js');
|
||||
const { buildSubsystems } = require('./subsystem.js');
|
||||
const { extractAllContracts, buildContractXref } = require('./contracts.js');
|
||||
const { extractAllContracts, buildContractXref, extractHelmContracts } = require('./contracts.js');
|
||||
const { buildFlowIndex, traceFlow } = require('./flow.js');
|
||||
const { generateDependencyDiagram, generateFlowDiagram, generateContractDiagram } = require('./diagrams.js');
|
||||
const { discoverCharts, chartsToGraph, generateHelmDiagram } = require('./extract-helm.js');
|
||||
@@ -54,8 +54,17 @@ async function generateDocs(graph, srcRoot, outDir, opts = {}) {
|
||||
crossCuttingThreshold: opts.crossCuttingThreshold || 0.6
|
||||
});
|
||||
|
||||
// 2. Extract Contracts (7B)
|
||||
// 2. Extract Contracts (7B) — TypeScript + Helm
|
||||
const contractsResult = extractAllContracts(subs, srcRoot);
|
||||
const helmContracts = extractHelmContracts(helmCharts);
|
||||
|
||||
// Merge Helm contracts into main result
|
||||
contractsResult.contracts.push(...helmContracts.contracts);
|
||||
for (const [sub, contracts] of Object.entries(helmContracts.bySubsystem)) {
|
||||
if (!contractsResult.bySubsystem[sub]) contractsResult.bySubsystem[sub] = [];
|
||||
contractsResult.bySubsystem[sub].push(...contracts);
|
||||
}
|
||||
|
||||
const xref = buildContractXref(contractsResult.contracts, graph, (p) => p.replace(/^\/?src\//, ''));
|
||||
|
||||
// 3. Trace Flows (7C)
|
||||
|
||||
Reference in New Issue
Block a user