bau/metadata

Builds structured metadata, graph, and dependency query output.

Procs

proc buildStatusJson(cfg: BauConfig; projectDir: string; profile: string): JsonNode {.
    ...raises: [ValueError, OSError, IOError, JsonParsingError],
    tags: [ReadDirEffect, ReadIOEffect, WriteIOEffect], forbids: [].}
Build JSON describing the saved fingerprint status for the default target.
proc configMetadataJson(cfg: BauConfig; projectDir: string;
                        formatVersion: int = 1): JsonNode {....raises: [Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Build structured metadata for the effective Bau configuration.
proc dependencyStatusJson(cfg: BauConfig; projectDir: string): JsonNode {.
    ...raises: [Exception, KeyError], tags: [ReadDirEffect, ReadIOEffect,
    RootEffect, WriteIOEffect, ExecIOEffect, ReadEnvEffect, TimeEffect],
    forbids: [].}
Build JSON describing dependency lock health and materialization status.
proc dependencyStatusText(cfg: BauConfig; projectDir: string): string {.
    ...raises: [Exception, KeyError], tags: [ReadDirEffect, ReadIOEffect,
    RootEffect, WriteIOEffect, ExecIOEffect, ReadEnvEffect, TimeEffect],
    forbids: [].}
Format dependency lock health and materialization status as text.
proc dependencyTreeJson(cfg: BauConfig; projectDir: string): JsonNode {.
    ...raises: [KeyError, Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Build JSON describing configured and locked dependency trees.
proc dependencyTreeText(cfg: BauConfig; projectDir: string): string {.
    ...raises: [KeyError, Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Format the dependency tree as human-readable text.
proc graphDot(cfg: BauConfig; projectDir: string = ""): string {.
    ...raises: [KeyError, Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Render Bau's project graph as Graphviz DOT.
proc graphJson(cfg: BauConfig; projectDir: string = ""): JsonNode {.
    ...raises: [KeyError, Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}

Build a graph of targets, tasks, build scripts, features, and dependencies.

When projectDir is supplied, resolved lockfile dependency nodes are included as well.

proc queryDeps(cfg: BauConfig; name: string): seq[string] {....raises: [],
    tags: [], forbids: [].}
Return configured direct dependencies for a task, script, target, or package.
proc queryResolvedDeps(projectDir: string; name: string): seq[string] {.
    ...raises: [IOError, OSError, TomlError, ValueError, KeyError, Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Return dependencies recorded in bau.lock for a locked package.
proc queryResolvedWhy(projectDir, depName: string): string {.
    ...raises: [IOError, OSError, TomlError, ValueError, KeyError, Exception],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Explain why a dependency appears in the resolved lockfile.
proc queryWhy(cfg: BauConfig; depName: string): string {....raises: [KeyError],
    tags: [], forbids: [].}
Explain why a direct dependency or feature appears in configuration.