dev module graph
Query the typed module dependency graph of declared and detected edges
- Command version
0.0.0- Command configuration
dev-tool:dev.module.graph@0.0.0
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
--from | string | No | Scope the graph to edges reachable from this module (its dependencies) | |
--to | string | No | Scope the graph to edges that reach this module (its dependents); with --from, report the shortest path between the two modules | |
--edge-type | list[string] | No | [] | Restrict edges to these dependency types (runtime, build, dev, test); repeat the flag or separate values with commasRepeatable |
--provenance | string one of declared, detected, declared-only, detected-only | No | Restrict edges by provenance (default: no restriction) | |
--transitive, --no-transitive | boolean | No | false | Follow --from/--to reachability transitively instead of only direct edges |
It also takes the global arguments.
Output
It answers with a graph.moduleGraphResult.
Types
graph.moduleGraphResult
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
moduleCount | integer | Yes | How many modules the manifest declares, whatever the query narrowed | |
edgeCount | integer | Yes | How many edges edges holds | |
nodes | list[graph.graphNode] | No | [] | The modules of the answer, sorted by name: every module of the manifest where nothing narrowed the query, and otherwise the ones an edge of the answer touches, with the modules --from and --to named |
edges | list[graph.graphEdge] | No | [] | The edges that match the query, sorted by source, then target, then kind |
path | list[string] | No | [] | The shortest path from the --from module to the --to module, as the module names along it; empty where either was not given or no path joins them |
pathFound | boolean | No | false | Whether --from and --to were both given and a path joins them |
skippedModules | list[graph.graphSkippedModule] | No | [] | Each module whose dependencies could not be detected, and why |
isComplete | boolean | Yes | Whether every module's dependencies were detected; false where skippedModules names any, and the detected edges of those modules are then missing | |
sourceModule | string | No | "" | The module --from named; empty where it was not given |
targetModule | string | No | "" | The module --to named; empty where it was not given |
edgeTypes | list[string] | No | [] | The kinds of edge --edge-type restricted the query to; empty for no restriction |
provenance | string | No | "" | The restriction --provenance gave: declared or detected keeps the edges that are so, declared-only or detected-only the edges that are one and not the other; empty for no restriction |
transitive | boolean | No | false | Whether --transitive was given, so that --from or --to follows edges past the direct ones |
graph.graphNode
graph.graphEdge
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
source | string | Yes | The module that depends | |
target | string | Yes | The module it depends on | |
kind | string | Yes | The kind of dependency: runtime, build, dev or test | |
declared | boolean | No | false | Whether the manifest declares the edge |
detected | boolean | No | false | Whether the edge was found in the depending module's source or schema documents |