Configuration

outputs

Configure the output formats and locations for your dependency graph.

outputs

The outputs option is an array that specifies the targets for the generated graph data. You can configure multiple output formats simultaneously.

outputs: [
  { type: 'viewer', origin: 'http://localhost:9999' },
  { type: 'markdown', path: 'src/graph-output.md' }
]

Markdown Output (type: 'markdown')

{ type: 'markdown', path: 'src/graph-output.md' }

Writes a .md markdown file containing:

  • A module list with all loaded modules
  • Import relationships between modules
  • Exported providers from each module
  • Providers with dependencies listed per module
  • Controllers with dependencies listed per module
  • Mermaid diagrams showing the dependency graph visually
Mermaid diagrams render natively on GitHub. For local viewing, use a Mermaid-compatible Markdown viewer or install a VSCode extension.

Web Viewer Output (type: 'viewer')

{ type: 'viewer', origin: 'http://localhost:9999' }

Makes the graph data accessible to the interactive web viewer application (via a JSON endpoint running on your module). It resolves against the origin where your frontend Viewer will receive it.

JSON Output (type: 'json')

{ type: 'json', path: 'reports/deps.json' }

Writes the raw module map as JSON. You get structured data suitable for programmatic analysis or custom tooling.

HTTP JSON Endpoint (type: 'http')

{ type: 'http', path: '/_api/graph' } // path is optional

Serves the module map as JSON directly from a route on your Nest application.

Examples

You can combine any of the available output types:

outputs: [
  // Development: interactive visualizer
  { type: 'viewer', origin: 'http://localhost:9999' },
  // Documentation: saved to your repo
  { type: 'markdown', path: 'docs/architecture.md' },
  // CI/CD: build artifacts
  { type: 'json', path: 'dist/deps.json' }
]