@vyuhlabs/dxkit 2.5.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +218 -13
- package/README.md +220 -369
- package/dist/allowlist/categories.d.ts +120 -0
- package/dist/allowlist/categories.d.ts.map +1 -0
- package/dist/allowlist/categories.js +194 -0
- package/dist/allowlist/categories.js.map +1 -0
- package/dist/allowlist/cli.d.ts +95 -0
- package/dist/allowlist/cli.d.ts.map +1 -0
- package/dist/allowlist/cli.js +454 -0
- package/dist/allowlist/cli.js.map +1 -0
- package/dist/allowlist/diff.d.ts +67 -0
- package/dist/allowlist/diff.d.ts.map +1 -0
- package/dist/allowlist/diff.js +147 -0
- package/dist/allowlist/diff.js.map +1 -0
- package/dist/allowlist/file.d.ts +249 -0
- package/dist/allowlist/file.d.ts.map +1 -0
- package/dist/allowlist/file.js +497 -0
- package/dist/allowlist/file.js.map +1 -0
- package/dist/allowlist/gather.d.ts +61 -0
- package/dist/allowlist/gather.d.ts.map +1 -0
- package/dist/allowlist/gather.js +143 -0
- package/dist/allowlist/gather.js.map +1 -0
- package/dist/allowlist/hint.d.ts +80 -0
- package/dist/allowlist/hint.d.ts.map +1 -0
- package/dist/allowlist/hint.js +271 -0
- package/dist/allowlist/hint.js.map +1 -0
- package/dist/allowlist/inline.d.ts +149 -0
- package/dist/allowlist/inline.d.ts.map +1 -0
- package/dist/allowlist/inline.js +306 -0
- package/dist/allowlist/inline.js.map +1 -0
- package/dist/analyzers/bom/discovery.d.ts +3 -4
- package/dist/analyzers/bom/discovery.d.ts.map +1 -1
- package/dist/analyzers/bom/discovery.js +3 -4
- package/dist/analyzers/bom/discovery.js.map +1 -1
- package/dist/analyzers/bom/types.d.ts +1 -1
- package/dist/analyzers/dashboard/index.d.ts.map +1 -1
- package/dist/analyzers/dashboard/index.js +42 -5
- package/dist/analyzers/dashboard/index.js.map +1 -1
- package/dist/analyzers/quality/detailed.d.ts +8 -1
- package/dist/analyzers/quality/detailed.d.ts.map +1 -1
- package/dist/analyzers/quality/detailed.js +43 -10
- package/dist/analyzers/quality/detailed.js.map +1 -1
- package/dist/analyzers/security/detailed.d.ts +8 -1
- package/dist/analyzers/security/detailed.d.ts.map +1 -1
- package/dist/analyzers/security/detailed.js +14 -1
- package/dist/analyzers/security/detailed.js.map +1 -1
- package/dist/analyzers/tests/detailed.d.ts +8 -1
- package/dist/analyzers/tests/detailed.d.ts.map +1 -1
- package/dist/analyzers/tests/detailed.js +26 -7
- package/dist/analyzers/tests/detailed.js.map +1 -1
- package/dist/analyzers/tools/cloc.js +3 -3
- package/dist/analyzers/tools/cloc.js.map +1 -1
- package/dist/analyzers/tools/exclusions.d.ts +12 -12
- package/dist/analyzers/tools/exclusions.d.ts.map +1 -1
- package/dist/analyzers/tools/exclusions.js +27 -13
- package/dist/analyzers/tools/exclusions.js.map +1 -1
- package/dist/analyzers/tools/graphify.d.ts +39 -5
- package/dist/analyzers/tools/graphify.d.ts.map +1 -1
- package/dist/analyzers/tools/graphify.js +609 -45
- package/dist/analyzers/tools/graphify.js.map +1 -1
- package/dist/analyzers/tools/nuget-package-reference.d.ts +4 -4
- package/dist/analyzers/tools/nuget-package-reference.js +4 -4
- package/dist/analyzers/tools/osv-scanner-fix.d.ts +4 -5
- package/dist/analyzers/tools/osv-scanner-fix.d.ts.map +1 -1
- package/dist/analyzers/tools/osv-scanner-fix.js +4 -5
- package/dist/analyzers/tools/osv-scanner-fix.js.map +1 -1
- package/dist/analyzers/tools/parallel.d.ts.map +1 -1
- package/dist/analyzers/tools/parallel.js +7 -0
- package/dist/analyzers/tools/parallel.js.map +1 -1
- package/dist/analyzers/tools/vendored-advisor.d.ts.map +1 -1
- package/dist/analyzers/tools/vendored-advisor.js +3 -4
- package/dist/analyzers/tools/vendored-advisor.js.map +1 -1
- package/dist/analyzers/xlsx/licenses.d.ts +7 -7
- package/dist/analyzers/xlsx/licenses.js +7 -7
- package/dist/baseline/baseline-file.d.ts +7 -0
- package/dist/baseline/baseline-file.d.ts.map +1 -1
- package/dist/baseline/baseline-file.js +22 -1
- package/dist/baseline/baseline-file.js.map +1 -1
- package/dist/baseline/check-renderers.d.ts +13 -1
- package/dist/baseline/check-renderers.d.ts.map +1 -1
- package/dist/baseline/check-renderers.js +67 -1
- package/dist/baseline/check-renderers.js.map +1 -1
- package/dist/baseline/check.d.ts +33 -7
- package/dist/baseline/check.d.ts.map +1 -1
- package/dist/baseline/check.js +90 -64
- package/dist/baseline/check.js.map +1 -1
- package/dist/baseline/create.d.ts +35 -7
- package/dist/baseline/create.d.ts.map +1 -1
- package/dist/baseline/create.js +43 -5
- package/dist/baseline/create.js.map +1 -1
- package/dist/baseline/entry-to-located.d.ts +6 -1
- package/dist/baseline/entry-to-located.d.ts.map +1 -1
- package/dist/baseline/entry-to-located.js +20 -2
- package/dist/baseline/entry-to-located.js.map +1 -1
- package/dist/baseline/finding-identity.d.ts.map +1 -1
- package/dist/baseline/finding-identity.js +15 -13
- package/dist/baseline/finding-identity.js.map +1 -1
- package/dist/baseline/modes.d.ts +140 -0
- package/dist/baseline/modes.d.ts.map +1 -0
- package/dist/baseline/modes.js +179 -0
- package/dist/baseline/modes.js.map +1 -0
- package/dist/baseline/policy.d.ts +64 -0
- package/dist/baseline/policy.d.ts.map +1 -1
- package/dist/baseline/policy.js +102 -1
- package/dist/baseline/policy.js.map +1 -1
- package/dist/baseline/producers/health.d.ts +2 -2
- package/dist/baseline/producers/health.d.ts.map +1 -1
- package/dist/baseline/producers/health.js.map +1 -1
- package/dist/baseline/producers/index.d.ts +11 -5
- package/dist/baseline/producers/index.d.ts.map +1 -1
- package/dist/baseline/producers/index.js +12 -9
- package/dist/baseline/producers/index.js.map +1 -1
- package/dist/baseline/producers/quality.d.ts +3 -3
- package/dist/baseline/producers/quality.d.ts.map +1 -1
- package/dist/baseline/producers/quality.js.map +1 -1
- package/dist/baseline/producers/secret-hmac.d.ts +2 -2
- package/dist/baseline/producers/secret-hmac.d.ts.map +1 -1
- package/dist/baseline/producers/secret-hmac.js.map +1 -1
- package/dist/baseline/producers/security.d.ts +2 -2
- package/dist/baseline/producers/security.d.ts.map +1 -1
- package/dist/baseline/producers/security.js.map +1 -1
- package/dist/baseline/producers/stale-allow.d.ts +70 -0
- package/dist/baseline/producers/stale-allow.d.ts.map +1 -0
- package/dist/baseline/producers/stale-allow.js +111 -0
- package/dist/baseline/producers/stale-allow.js.map +1 -0
- package/dist/baseline/producers/tests.d.ts +2 -2
- package/dist/baseline/producers/tests.d.ts.map +1 -1
- package/dist/baseline/producers/tests.js.map +1 -1
- package/dist/baseline/ref-baseline.d.ts +114 -0
- package/dist/baseline/ref-baseline.d.ts.map +1 -0
- package/dist/baseline/ref-baseline.js +260 -0
- package/dist/baseline/ref-baseline.js.map +1 -0
- package/dist/baseline/sanitize.d.ts +80 -0
- package/dist/baseline/sanitize.d.ts.map +1 -0
- package/dist/baseline/sanitize.js +91 -0
- package/dist/baseline/sanitize.js.map +1 -0
- package/dist/baseline/show.d.ts.map +1 -1
- package/dist/baseline/show.js +9 -3
- package/dist/baseline/show.js.map +1 -1
- package/dist/baseline/types.d.ts +73 -26
- package/dist/baseline/types.d.ts.map +1 -1
- package/dist/baseline/types.js +7 -1
- package/dist/baseline/types.js.map +1 -1
- package/dist/baseline/visibility.d.ts +61 -0
- package/dist/baseline/visibility.d.ts.map +1 -0
- package/dist/baseline/visibility.js +121 -0
- package/dist/baseline/visibility.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +168 -6
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/graph-adapter.d.ts +151 -0
- package/dist/dashboard/graph-adapter.d.ts.map +1 -0
- package/dist/dashboard/graph-adapter.js +415 -0
- package/dist/dashboard/graph-adapter.js.map +1 -0
- package/dist/dashboard/graph-tab.d.ts +109 -0
- package/dist/dashboard/graph-tab.d.ts.map +1 -0
- package/dist/dashboard/graph-tab.js +297 -0
- package/dist/dashboard/graph-tab.js.map +1 -0
- package/dist/dashboard/vendor/vis-network.min.js +34 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +106 -16
- package/dist/doctor.js.map +1 -1
- package/dist/explore/cli/api-surface.d.ts +12 -0
- package/dist/explore/cli/api-surface.d.ts.map +1 -0
- package/dist/explore/cli/api-surface.js +57 -0
- package/dist/explore/cli/api-surface.js.map +1 -0
- package/dist/explore/cli/communities.d.ts +10 -0
- package/dist/explore/cli/communities.d.ts.map +1 -0
- package/dist/explore/cli/communities.js +47 -0
- package/dist/explore/cli/communities.js.map +1 -0
- package/dist/explore/cli/context.d.ts +16 -0
- package/dist/explore/cli/context.d.ts.map +1 -0
- package/dist/explore/cli/context.js +118 -0
- package/dist/explore/cli/context.js.map +1 -0
- package/dist/explore/cli/entry-points.d.ts +12 -0
- package/dist/explore/cli/entry-points.d.ts.map +1 -0
- package/dist/explore/cli/entry-points.js +85 -0
- package/dist/explore/cli/entry-points.js.map +1 -0
- package/dist/explore/cli/feature.d.ts +16 -0
- package/dist/explore/cli/feature.d.ts.map +1 -0
- package/dist/explore/cli/feature.js +89 -0
- package/dist/explore/cli/feature.js.map +1 -0
- package/dist/explore/cli/file.d.ts +12 -0
- package/dist/explore/cli/file.d.ts.map +1 -0
- package/dist/explore/cli/file.js +139 -0
- package/dist/explore/cli/file.js.map +1 -0
- package/dist/explore/cli/hot-files.d.ts +11 -0
- package/dist/explore/cli/hot-files.d.ts.map +1 -0
- package/dist/explore/cli/hot-files.js +63 -0
- package/dist/explore/cli/hot-files.js.map +1 -0
- package/dist/explore/context-hook.d.ts +42 -0
- package/dist/explore/context-hook.d.ts.map +1 -0
- package/dist/explore/context-hook.js +131 -0
- package/dist/explore/context-hook.js.map +1 -0
- package/dist/explore/finding-context.d.ts +69 -0
- package/dist/explore/finding-context.d.ts.map +1 -0
- package/dist/explore/finding-context.js +102 -0
- package/dist/explore/finding-context.js.map +1 -0
- package/dist/explore/format.d.ts +64 -0
- package/dist/explore/format.d.ts.map +1 -0
- package/dist/explore/format.js +99 -0
- package/dist/explore/format.js.map +1 -0
- package/dist/explore/load.d.ts +50 -0
- package/dist/explore/load.d.ts.map +1 -0
- package/dist/explore/load.js +197 -0
- package/dist/explore/load.js.map +1 -0
- package/dist/explore/queries.d.ts +413 -0
- package/dist/explore/queries.d.ts.map +1 -0
- package/dist/explore/queries.js +855 -0
- package/dist/explore/queries.js.map +1 -0
- package/dist/explore/types.d.ts +130 -0
- package/dist/explore/types.d.ts.map +1 -0
- package/dist/explore/types.js +28 -0
- package/dist/explore/types.js.map +1 -0
- package/dist/explore-cli.d.ts +45 -0
- package/dist/explore-cli.d.ts.map +1 -0
- package/dist/explore-cli.js +213 -0
- package/dist/explore-cli.js.map +1 -0
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +19 -0
- package/dist/generator.js.map +1 -1
- package/dist/issue-cli.d.ts +62 -0
- package/dist/issue-cli.d.ts.map +1 -0
- package/dist/issue-cli.js +252 -0
- package/dist/issue-cli.js.map +1 -0
- package/dist/languages/csharp.d.ts.map +1 -1
- package/dist/languages/csharp.js +32 -11
- package/dist/languages/csharp.js.map +1 -1
- package/dist/languages/go.d.ts.map +1 -1
- package/dist/languages/go.js +5 -0
- package/dist/languages/go.js.map +1 -1
- package/dist/languages/index.d.ts +27 -0
- package/dist/languages/index.d.ts.map +1 -1
- package/dist/languages/index.js +35 -0
- package/dist/languages/index.js.map +1 -1
- package/dist/languages/java.d.ts.map +1 -1
- package/dist/languages/java.js +5 -0
- package/dist/languages/java.js.map +1 -1
- package/dist/languages/kotlin.d.ts.map +1 -1
- package/dist/languages/kotlin.js +5 -0
- package/dist/languages/kotlin.js.map +1 -1
- package/dist/languages/python.d.ts.map +1 -1
- package/dist/languages/python.js +5 -0
- package/dist/languages/python.js.map +1 -1
- package/dist/languages/ruby.d.ts.map +1 -1
- package/dist/languages/ruby.js +5 -0
- package/dist/languages/ruby.js.map +1 -1
- package/dist/languages/rust.d.ts.map +1 -1
- package/dist/languages/rust.js +5 -0
- package/dist/languages/rust.js.map +1 -1
- package/dist/languages/types.d.ts +79 -0
- package/dist/languages/types.d.ts.map +1 -1
- package/dist/languages/typescript.d.ts.map +1 -1
- package/dist/languages/typescript.js +6 -1
- package/dist/languages/typescript.js.map +1 -1
- package/package.json +2 -1
- package/templates/.claude/skills/dxkit-action/SKILL.md +126 -12
- package/templates/.claude/skills/dxkit-onboard/SKILL.md +31 -3
- package/templates/.claude/skills/dxkit-reports/SKILL.md +3 -1
- package/templates/AGENTS.md.template +8 -1
- package/dist/baseline/producers/licenses.d.ts +0 -23
- package/dist/baseline/producers/licenses.d.ts.map +0 -1
- package/dist/baseline/producers/licenses.js +0 -46
- package/dist/baseline/producers/licenses.js.map +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure-function adapter — converts the in-memory `Graph` into the
|
|
3
|
+
* shape cytoscape.js consumes (`ElementsDefinition` equivalent).
|
|
4
|
+
*
|
|
5
|
+
* Three tiers, matching the dashboard's three-level drill-down:
|
|
6
|
+
*
|
|
7
|
+
* Tier 1 — community view (default tab landing)
|
|
8
|
+
* N community bubbles + inter-community edges, sized by
|
|
9
|
+
* member-count (sqrt scale) and labeled by dominantSourceDir.
|
|
10
|
+
*
|
|
11
|
+
* Tier 2 — file view (within one community)
|
|
12
|
+
* File nodes for every file in the community, sized by call
|
|
13
|
+
* in-degree, edges = imports_from between member files plus
|
|
14
|
+
* the strongest cross-community import edges.
|
|
15
|
+
*
|
|
16
|
+
* Tier 3 — symbol view (within one file)
|
|
17
|
+
* Symbol nodes for every function / class / method in the file,
|
|
18
|
+
* sized by call in-degree, edges = calls within the file plus
|
|
19
|
+
* thin external-call indicators that the renderer can wire as
|
|
20
|
+
* "click → jump to the target file."
|
|
21
|
+
*
|
|
22
|
+
* Pure: no DOM access, no cytoscape import, no I/O. Tested with
|
|
23
|
+
* synthetic `Graph` fixtures (see test/dashboard/graph-adapter.test.ts).
|
|
24
|
+
* The DOM-bound mounter (Part B's `graph-tab.ts`) consumes these
|
|
25
|
+
* elements and hands them to cytoscape.
|
|
26
|
+
*
|
|
27
|
+
* Per CLAUDE.md Rule 12: every graph traversal here goes through
|
|
28
|
+
* `src/explore/queries.ts` — no callers / callees / community lookup
|
|
29
|
+
* code is reimplemented in this module. The arch gate enforces.
|
|
30
|
+
*/
|
|
31
|
+
import type { Graph } from '../explore/types';
|
|
32
|
+
/** A cytoscape node element — `data.id` is required. */
|
|
33
|
+
export interface CytoscapeNode {
|
|
34
|
+
group: 'nodes';
|
|
35
|
+
data: {
|
|
36
|
+
id: string;
|
|
37
|
+
/** Display label rendered by cytoscape. */
|
|
38
|
+
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* Numeric size hint in [0, 1]. The renderer maps this to a pixel
|
|
41
|
+
* radius via the cytoscape stylesheet (e.g., 8px + 24px * size).
|
|
42
|
+
* Sqrt-scaled at the adapter so 2× nodes don't dominate visually.
|
|
43
|
+
*/
|
|
44
|
+
size: number;
|
|
45
|
+
/**
|
|
46
|
+
* Color group key — typically a pack id ('typescript', 'python',
|
|
47
|
+
* ...) for Tier 1/2 and a symbol kind ('function', 'class', ...)
|
|
48
|
+
* for Tier 3. The stylesheet binds this to the actual hex.
|
|
49
|
+
*/
|
|
50
|
+
colorGroup: string;
|
|
51
|
+
/**
|
|
52
|
+
* Tier-specific payload. Renderer uses these for hover tooltips
|
|
53
|
+
* + click-to-expand wiring. Optional fields are absent (not
|
|
54
|
+
* `null`) when the underlying data didn't supply them.
|
|
55
|
+
*/
|
|
56
|
+
tier: 1 | 2 | 3;
|
|
57
|
+
/** Tier 1 only — present so the renderer can drill in. */
|
|
58
|
+
communityId?: number;
|
|
59
|
+
/** Tier 1 + Tier 2 — present so the renderer can drill in. */
|
|
60
|
+
sourceFile?: string;
|
|
61
|
+
/** Tier 3 only — present so the renderer can deep-link by line. */
|
|
62
|
+
line?: number;
|
|
63
|
+
/** Free-form metadata for the hover tooltip. Renderer formats. */
|
|
64
|
+
meta?: Record<string, string | number | boolean>;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** A cytoscape edge element — `data.source` + `data.target` required. */
|
|
68
|
+
export interface CytoscapeEdge {
|
|
69
|
+
group: 'edges';
|
|
70
|
+
data: {
|
|
71
|
+
id: string;
|
|
72
|
+
source: string;
|
|
73
|
+
target: string;
|
|
74
|
+
/**
|
|
75
|
+
* Edge category, drives stylesheet variant. `'calls'` = solid
|
|
76
|
+
* gray, `'imports_from'` = dashed gray, `'method'` = thin gray
|
|
77
|
+
* (Tier 3 only), `'community'` = thicker connector between
|
|
78
|
+
* community bubbles in Tier 1.
|
|
79
|
+
*/
|
|
80
|
+
relation: 'calls' | 'imports_from' | 'method' | 'community';
|
|
81
|
+
/**
|
|
82
|
+
* Visual weight hint in [0, 1]. The renderer maps to edge
|
|
83
|
+
* thickness (e.g., 1px + 4px * weight). Sqrt-scaled.
|
|
84
|
+
*/
|
|
85
|
+
weight: number;
|
|
86
|
+
/** Renderer surfaces this on hover. Always >= 1 when present. */
|
|
87
|
+
occurrences?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Tier 3 only — set when the call's target is in a DIFFERENT
|
|
90
|
+
* file. Renderer styles these as dim "leaving" indicators
|
|
91
|
+
* pointing to a virtual external node, then makes them clickable
|
|
92
|
+
* to navigate to the target file's Tier 3.
|
|
93
|
+
*/
|
|
94
|
+
externalTargetFile?: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The complete set of cytoscape elements for one tier. Returned by
|
|
99
|
+
* each adapter; consumed by `cytoscape({ elements: [...] })`. Empty
|
|
100
|
+
* arrays are valid (e.g., a single-node community has no inter-file
|
|
101
|
+
* edges); the renderer handles the empty cases.
|
|
102
|
+
*/
|
|
103
|
+
export interface CytoscapeElements {
|
|
104
|
+
nodes: CytoscapeNode[];
|
|
105
|
+
edges: CytoscapeEdge[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Build the cytoscape elements for the community-view (Tier 1) of a
|
|
109
|
+
* graph. Each community becomes one node; inter-community edges are
|
|
110
|
+
* synthesized by counting cross-community `calls` + `imports_from`
|
|
111
|
+
* edges.
|
|
112
|
+
*
|
|
113
|
+
* Limit defaults to the top-20 communities by node-count — beyond
|
|
114
|
+
* that the layout gets dense without adding information. The CLI's
|
|
115
|
+
* `explore communities` default is 8; the viz needs more breadth to
|
|
116
|
+
* communicate "this repo has lots of natural modules" so we lift
|
|
117
|
+
* the cap.
|
|
118
|
+
*/
|
|
119
|
+
export declare function adaptToTier1(graph: Graph, opts?: {
|
|
120
|
+
limit?: number;
|
|
121
|
+
}): CytoscapeElements;
|
|
122
|
+
/**
|
|
123
|
+
* Build the cytoscape elements for the file-view (Tier 2) of one
|
|
124
|
+
* community. File nodes are the union of `sourceFile` across all
|
|
125
|
+
* nodes whose community is the target.
|
|
126
|
+
*
|
|
127
|
+
* Edges are intra-community `imports_from` + `calls` aggregated to
|
|
128
|
+
* the file level (a 12-call cluster from src/foo.ts → src/bar.ts
|
|
129
|
+
* becomes one edge with `occurrences: 12`).
|
|
130
|
+
*
|
|
131
|
+
* Empty result when the community id is unknown — the renderer
|
|
132
|
+
* surfaces a "community not found" error in that case.
|
|
133
|
+
*/
|
|
134
|
+
export declare function adaptToTier2(graph: Graph, communityId: number): CytoscapeElements;
|
|
135
|
+
/**
|
|
136
|
+
* Build the cytoscape elements for the symbol-view (Tier 3) of one
|
|
137
|
+
* file. Symbol nodes are the function / class / method declarations
|
|
138
|
+
* (module nodes are excluded — they're file-as-a-whole markers, not
|
|
139
|
+
* navigable symbols).
|
|
140
|
+
*
|
|
141
|
+
* Edges are `calls` edges between symbols within the file. Calls
|
|
142
|
+
* that LEAVE the file become "external" indicators carrying the
|
|
143
|
+
* target file path — the renderer styles them as dim arrows and
|
|
144
|
+
* makes them clickable for navigation.
|
|
145
|
+
*
|
|
146
|
+
* Empty result when no symbols are declared in the file (the file
|
|
147
|
+
* isn't in the graph) — the renderer surfaces a "no symbols
|
|
148
|
+
* extracted" message.
|
|
149
|
+
*/
|
|
150
|
+
export declare function adaptToTier3(graph: Graph, sourceFile: string): CytoscapeElements;
|
|
151
|
+
//# sourceMappingURL=graph-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-adapter.d.ts","sourceRoot":"","sources":["../../src/dashboard/graph-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,kBAAkB,CAAC;AASzD,wDAAwD;AACxD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,2CAA2C;QAC3C,KAAK,EAAE,MAAM,CAAC;QACd;;;;WAIG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;;;WAIG;QACH,UAAU,EAAE,MAAM,CAAC;QACnB;;;;WAIG;QACH,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,0DAA0D;QAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,8DAA8D;QAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,mEAAmE;QACnE,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,kEAAkE;QAClE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;KAClD,CAAC;CACH;AAED,yEAAyE;AACzE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf;;;;;WAKG;QACH,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,QAAQ,GAAG,WAAW,CAAC;QAC5D;;;WAGG;QACH,MAAM,EAAE,MAAM,CAAC;QACf,iEAAiE;QACjE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;;;;WAKG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,iBAAiB,CAmE3F;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,iBAAiB,CAgHjF;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,GAAG,iBAAiB,CA6HhF"}
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure-function adapter — converts the in-memory `Graph` into the
|
|
4
|
+
* shape cytoscape.js consumes (`ElementsDefinition` equivalent).
|
|
5
|
+
*
|
|
6
|
+
* Three tiers, matching the dashboard's three-level drill-down:
|
|
7
|
+
*
|
|
8
|
+
* Tier 1 — community view (default tab landing)
|
|
9
|
+
* N community bubbles + inter-community edges, sized by
|
|
10
|
+
* member-count (sqrt scale) and labeled by dominantSourceDir.
|
|
11
|
+
*
|
|
12
|
+
* Tier 2 — file view (within one community)
|
|
13
|
+
* File nodes for every file in the community, sized by call
|
|
14
|
+
* in-degree, edges = imports_from between member files plus
|
|
15
|
+
* the strongest cross-community import edges.
|
|
16
|
+
*
|
|
17
|
+
* Tier 3 — symbol view (within one file)
|
|
18
|
+
* Symbol nodes for every function / class / method in the file,
|
|
19
|
+
* sized by call in-degree, edges = calls within the file plus
|
|
20
|
+
* thin external-call indicators that the renderer can wire as
|
|
21
|
+
* "click → jump to the target file."
|
|
22
|
+
*
|
|
23
|
+
* Pure: no DOM access, no cytoscape import, no I/O. Tested with
|
|
24
|
+
* synthetic `Graph` fixtures (see test/dashboard/graph-adapter.test.ts).
|
|
25
|
+
* The DOM-bound mounter (Part B's `graph-tab.ts`) consumes these
|
|
26
|
+
* elements and hands them to cytoscape.
|
|
27
|
+
*
|
|
28
|
+
* Per CLAUDE.md Rule 12: every graph traversal here goes through
|
|
29
|
+
* `src/explore/queries.ts` — no callers / callees / community lookup
|
|
30
|
+
* code is reimplemented in this module. The arch gate enforces.
|
|
31
|
+
*/
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.adaptToTier1 = adaptToTier1;
|
|
34
|
+
exports.adaptToTier2 = adaptToTier2;
|
|
35
|
+
exports.adaptToTier3 = adaptToTier3;
|
|
36
|
+
const queries_1 = require("../explore/queries");
|
|
37
|
+
// ─── Tier 1 — community bubbles ──────────────────────────────────────────────
|
|
38
|
+
/**
|
|
39
|
+
* Build the cytoscape elements for the community-view (Tier 1) of a
|
|
40
|
+
* graph. Each community becomes one node; inter-community edges are
|
|
41
|
+
* synthesized by counting cross-community `calls` + `imports_from`
|
|
42
|
+
* edges.
|
|
43
|
+
*
|
|
44
|
+
* Limit defaults to the top-20 communities by node-count — beyond
|
|
45
|
+
* that the layout gets dense without adding information. The CLI's
|
|
46
|
+
* `explore communities` default is 8; the viz needs more breadth to
|
|
47
|
+
* communicate "this repo has lots of natural modules" so we lift
|
|
48
|
+
* the cap.
|
|
49
|
+
*/
|
|
50
|
+
function adaptToTier1(graph, opts = {}) {
|
|
51
|
+
const limit = opts.limit ?? 20;
|
|
52
|
+
// Use the canonical query for the per-community summary (Rule 12).
|
|
53
|
+
// Rank-by-node-count is identical to communitiesQuery's behavior;
|
|
54
|
+
// we just want the top-N rendered.
|
|
55
|
+
const summaries = (0, queries_1.communitiesQuery)(graph, limit);
|
|
56
|
+
const communityIds = new Set(summaries.map((s) => s.id));
|
|
57
|
+
// Largest community → size 1.0; sqrt scale ensures a 4× node-count
|
|
58
|
+
// community renders ~2× the radius (visual area still proportional).
|
|
59
|
+
const maxNodeCount = summaries.reduce((m, s) => Math.max(m, s.nodeCount), 0);
|
|
60
|
+
const nodes = summaries.map((s) => ({
|
|
61
|
+
group: 'nodes',
|
|
62
|
+
data: {
|
|
63
|
+
id: communityId(s.id),
|
|
64
|
+
label: s.dominantSourceDir || `community-${s.id}`,
|
|
65
|
+
size: maxNodeCount > 0 ? Math.sqrt(s.nodeCount / maxNodeCount) : 0,
|
|
66
|
+
colorGroup: s.dominantPack || 'multi',
|
|
67
|
+
tier: 1,
|
|
68
|
+
communityId: s.id,
|
|
69
|
+
meta: {
|
|
70
|
+
nodeCount: s.nodeCount,
|
|
71
|
+
cohesion: round2(s.cohesion),
|
|
72
|
+
dominantPack: s.dominantPack || 'mixed',
|
|
73
|
+
topHotFiles: s.topHotFiles.slice(0, 3).join(', '),
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
}));
|
|
77
|
+
// Inter-community edges — count cross-community calls + imports.
|
|
78
|
+
// Bidirectional pairs collapse to one undirected edge for visual
|
|
79
|
+
// clarity (cytoscape can still treat the underlying edge as
|
|
80
|
+
// directed if a layout cares).
|
|
81
|
+
const pairCounts = new Map();
|
|
82
|
+
for (const edge of graph.edges) {
|
|
83
|
+
if (edge.relation === 'method')
|
|
84
|
+
continue; // method ownership is intra-file noise
|
|
85
|
+
const fromComm = graph.communityByNode.get(edge.from);
|
|
86
|
+
const toComm = graph.communityByNode.get(edge.to);
|
|
87
|
+
if (!fromComm || !toComm)
|
|
88
|
+
continue;
|
|
89
|
+
if (fromComm.id === toComm.id)
|
|
90
|
+
continue; // intra-community
|
|
91
|
+
if (!communityIds.has(fromComm.id) || !communityIds.has(toComm.id))
|
|
92
|
+
continue;
|
|
93
|
+
const [a, b] = fromComm.id < toComm.id ? [fromComm.id, toComm.id] : [toComm.id, fromComm.id];
|
|
94
|
+
const key = `${a}->${b}`;
|
|
95
|
+
const existing = pairCounts.get(key);
|
|
96
|
+
if (existing) {
|
|
97
|
+
existing.count++;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
pairCounts.set(key, { from: a, to: b, count: 1 });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const maxPairCount = Math.max(0, ...[...pairCounts.values()].map((p) => p.count));
|
|
104
|
+
const edges = [...pairCounts.entries()].map(([key, p]) => ({
|
|
105
|
+
group: 'edges',
|
|
106
|
+
data: {
|
|
107
|
+
id: `e1:${key}`,
|
|
108
|
+
source: communityId(p.from),
|
|
109
|
+
target: communityId(p.to),
|
|
110
|
+
relation: 'community',
|
|
111
|
+
weight: maxPairCount > 0 ? Math.sqrt(p.count / maxPairCount) : 0,
|
|
112
|
+
occurrences: p.count,
|
|
113
|
+
},
|
|
114
|
+
}));
|
|
115
|
+
return { nodes, edges };
|
|
116
|
+
}
|
|
117
|
+
// ─── Tier 2 — files within a community ───────────────────────────────────────
|
|
118
|
+
/**
|
|
119
|
+
* Build the cytoscape elements for the file-view (Tier 2) of one
|
|
120
|
+
* community. File nodes are the union of `sourceFile` across all
|
|
121
|
+
* nodes whose community is the target.
|
|
122
|
+
*
|
|
123
|
+
* Edges are intra-community `imports_from` + `calls` aggregated to
|
|
124
|
+
* the file level (a 12-call cluster from src/foo.ts → src/bar.ts
|
|
125
|
+
* becomes one edge with `occurrences: 12`).
|
|
126
|
+
*
|
|
127
|
+
* Empty result when the community id is unknown — the renderer
|
|
128
|
+
* surfaces a "community not found" error in that case.
|
|
129
|
+
*/
|
|
130
|
+
function adaptToTier2(graph, communityId) {
|
|
131
|
+
const community = graph.communityById.get(communityId);
|
|
132
|
+
if (!community) {
|
|
133
|
+
return { nodes: [], edges: [] };
|
|
134
|
+
}
|
|
135
|
+
// Files in the community: union of nodes[].sourceFile.
|
|
136
|
+
const filesInCommunity = new Set();
|
|
137
|
+
for (const nodeId of community.nodeIds) {
|
|
138
|
+
const node = graph.nodeById.get(nodeId);
|
|
139
|
+
if (node?.sourceFile)
|
|
140
|
+
filesInCommunity.add(node.sourceFile);
|
|
141
|
+
}
|
|
142
|
+
// Per-file call in-degree, computed via callersOf for Rule 12 compliance.
|
|
143
|
+
const callsInByFile = new Map();
|
|
144
|
+
for (const nodeId of community.nodeIds) {
|
|
145
|
+
const node = graph.nodeById.get(nodeId);
|
|
146
|
+
if (!node?.sourceFile)
|
|
147
|
+
continue;
|
|
148
|
+
const callers = (0, queries_1.callersOf)(graph, nodeId);
|
|
149
|
+
callsInByFile.set(node.sourceFile, (callsInByFile.get(node.sourceFile) ?? 0) + callers.length);
|
|
150
|
+
}
|
|
151
|
+
// Per-file pack id (derived from the most common extension in the file's nodes).
|
|
152
|
+
const packByFile = new Map();
|
|
153
|
+
for (const sourceFile of filesInCommunity) {
|
|
154
|
+
packByFile.set(sourceFile, packFromExt(sourceFile));
|
|
155
|
+
}
|
|
156
|
+
// Per-file line-of-code aggregation surfaces on hover.
|
|
157
|
+
const symbolCountByFile = new Map();
|
|
158
|
+
for (const sourceFile of filesInCommunity) {
|
|
159
|
+
symbolCountByFile.set(sourceFile, (0, queries_1.nodesInFile)(graph, sourceFile).length);
|
|
160
|
+
}
|
|
161
|
+
const maxCallsIn = Math.max(0, ...callsInByFile.values());
|
|
162
|
+
const fileToNodeId = (sourceFile) => `f2:${sourceFile}`;
|
|
163
|
+
const nodes = [...filesInCommunity].sort().map((sourceFile) => {
|
|
164
|
+
const callsIn = callsInByFile.get(sourceFile) ?? 0;
|
|
165
|
+
return {
|
|
166
|
+
group: 'nodes',
|
|
167
|
+
data: {
|
|
168
|
+
id: fileToNodeId(sourceFile),
|
|
169
|
+
label: basename(sourceFile),
|
|
170
|
+
size: maxCallsIn > 0 ? Math.sqrt(callsIn / maxCallsIn) : 0,
|
|
171
|
+
colorGroup: packByFile.get(sourceFile) || 'multi',
|
|
172
|
+
tier: 2,
|
|
173
|
+
communityId: community.id,
|
|
174
|
+
sourceFile,
|
|
175
|
+
meta: {
|
|
176
|
+
callsIn,
|
|
177
|
+
symbolCount: symbolCountByFile.get(sourceFile) ?? 0,
|
|
178
|
+
path: sourceFile,
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
// Aggregate edges to the file level. Walk every node in the
|
|
184
|
+
// community + every outbound edge; bucket by (sourceFile,
|
|
185
|
+
// targetFile, relation).
|
|
186
|
+
const edgeKey = (from, to, rel) => `${from}\x00${to}\x00${rel}`;
|
|
187
|
+
const edgeBuckets = new Map();
|
|
188
|
+
for (const nodeId of community.nodeIds) {
|
|
189
|
+
const fromNode = graph.nodeById.get(nodeId);
|
|
190
|
+
if (!fromNode?.sourceFile)
|
|
191
|
+
continue;
|
|
192
|
+
const fromFile = fromNode.sourceFile;
|
|
193
|
+
for (const e of graph.edgesFromNode.get(nodeId) ?? []) {
|
|
194
|
+
if (e.relation === 'method')
|
|
195
|
+
continue;
|
|
196
|
+
const toNode = graph.nodeById.get(e.to);
|
|
197
|
+
if (!toNode?.sourceFile)
|
|
198
|
+
continue;
|
|
199
|
+
const toFile = toNode.sourceFile;
|
|
200
|
+
if (fromFile === toFile)
|
|
201
|
+
continue;
|
|
202
|
+
if (!filesInCommunity.has(toFile))
|
|
203
|
+
continue; // intra-community only at Tier 2
|
|
204
|
+
const k = edgeKey(fromFile, toFile, e.relation);
|
|
205
|
+
const existing = edgeBuckets.get(k);
|
|
206
|
+
if (existing) {
|
|
207
|
+
existing.occurrences += e.occurrences ?? 1;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
edgeBuckets.set(k, {
|
|
211
|
+
from: fromFile,
|
|
212
|
+
to: toFile,
|
|
213
|
+
relation: e.relation,
|
|
214
|
+
occurrences: e.occurrences ?? 1,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const maxOcc = Math.max(0, ...[...edgeBuckets.values()].map((b) => b.occurrences));
|
|
220
|
+
const edges = [...edgeBuckets.values()].map((b, i) => ({
|
|
221
|
+
group: 'edges',
|
|
222
|
+
data: {
|
|
223
|
+
id: `e2:${i}`,
|
|
224
|
+
source: fileToNodeId(b.from),
|
|
225
|
+
target: fileToNodeId(b.to),
|
|
226
|
+
relation: b.relation,
|
|
227
|
+
weight: maxOcc > 0 ? Math.sqrt(b.occurrences / maxOcc) : 0,
|
|
228
|
+
occurrences: b.occurrences,
|
|
229
|
+
},
|
|
230
|
+
}));
|
|
231
|
+
return { nodes, edges };
|
|
232
|
+
}
|
|
233
|
+
// ─── Tier 3 — symbols within a file ──────────────────────────────────────────
|
|
234
|
+
/**
|
|
235
|
+
* Build the cytoscape elements for the symbol-view (Tier 3) of one
|
|
236
|
+
* file. Symbol nodes are the function / class / method declarations
|
|
237
|
+
* (module nodes are excluded — they're file-as-a-whole markers, not
|
|
238
|
+
* navigable symbols).
|
|
239
|
+
*
|
|
240
|
+
* Edges are `calls` edges between symbols within the file. Calls
|
|
241
|
+
* that LEAVE the file become "external" indicators carrying the
|
|
242
|
+
* target file path — the renderer styles them as dim arrows and
|
|
243
|
+
* makes them clickable for navigation.
|
|
244
|
+
*
|
|
245
|
+
* Empty result when no symbols are declared in the file (the file
|
|
246
|
+
* isn't in the graph) — the renderer surfaces a "no symbols
|
|
247
|
+
* extracted" message.
|
|
248
|
+
*/
|
|
249
|
+
function adaptToTier3(graph, sourceFile) {
|
|
250
|
+
const fileNodes = (0, queries_1.nodesInFile)(graph, sourceFile);
|
|
251
|
+
if (fileNodes.length === 0) {
|
|
252
|
+
return { nodes: [], edges: [] };
|
|
253
|
+
}
|
|
254
|
+
const symbolNodes = fileNodes.filter((n) => n.kind !== 'module');
|
|
255
|
+
const symbolIds = new Set(symbolNodes.map((n) => n.id));
|
|
256
|
+
// Per-symbol call in-degree drives size.
|
|
257
|
+
const callsInBySymbol = new Map();
|
|
258
|
+
for (const n of symbolNodes) {
|
|
259
|
+
callsInBySymbol.set(n.id, (0, queries_1.callersOf)(graph, n.id).length);
|
|
260
|
+
}
|
|
261
|
+
const maxCallsIn = Math.max(0, ...callsInBySymbol.values());
|
|
262
|
+
const nodes = symbolNodes.map((n) => ({
|
|
263
|
+
group: 'nodes',
|
|
264
|
+
data: {
|
|
265
|
+
id: `s3:${n.id}`,
|
|
266
|
+
label: stripParens(n.label),
|
|
267
|
+
size: maxCallsIn > 0 ? Math.sqrt((callsInBySymbol.get(n.id) ?? 0) / maxCallsIn) : 0,
|
|
268
|
+
colorGroup: n.kind, // 'function' | 'class' | 'method'
|
|
269
|
+
tier: 3,
|
|
270
|
+
sourceFile,
|
|
271
|
+
line: n.line,
|
|
272
|
+
meta: {
|
|
273
|
+
kind: n.kind,
|
|
274
|
+
callsIn: callsInBySymbol.get(n.id) ?? 0,
|
|
275
|
+
callsOut: (0, queries_1.calleesOf)(graph, n.id).length,
|
|
276
|
+
exported: n.exported === undefined ? 'unknown' : n.exported,
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
}));
|
|
280
|
+
const intraEdges = [];
|
|
281
|
+
const externalBuckets = new Map();
|
|
282
|
+
for (const n of symbolNodes) {
|
|
283
|
+
for (const e of graph.edgesFromNode.get(n.id) ?? []) {
|
|
284
|
+
if (e.relation !== 'calls')
|
|
285
|
+
continue;
|
|
286
|
+
if (symbolIds.has(e.to)) {
|
|
287
|
+
// Intra-file call — render as a real edge between two Tier 3 nodes.
|
|
288
|
+
intraEdges.push({
|
|
289
|
+
group: 'edges',
|
|
290
|
+
data: {
|
|
291
|
+
id: `i3:${e.from}->${e.to}`,
|
|
292
|
+
source: `s3:${e.from}`,
|
|
293
|
+
target: `s3:${e.to}`,
|
|
294
|
+
relation: 'calls',
|
|
295
|
+
weight: 0, // weight assigned below once max is known
|
|
296
|
+
occurrences: e.occurrences ?? 1,
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
// Out-of-file call — bucket by (source symbol, target file).
|
|
302
|
+
const target = graph.nodeById.get(e.to);
|
|
303
|
+
const targetFile = target?.sourceFile;
|
|
304
|
+
if (!targetFile || targetFile === sourceFile)
|
|
305
|
+
continue;
|
|
306
|
+
const key = `${n.id}\x00${targetFile}`;
|
|
307
|
+
const existing = externalBuckets.get(key);
|
|
308
|
+
if (existing) {
|
|
309
|
+
existing.occurrences += e.occurrences ?? 1;
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
externalBuckets.set(key, {
|
|
313
|
+
sourceSymbol: n.id,
|
|
314
|
+
targetFile,
|
|
315
|
+
occurrences: e.occurrences ?? 1,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// Weight scaling — share the same denominator across intra + external
|
|
322
|
+
// for visual consistency.
|
|
323
|
+
const allOcc = [
|
|
324
|
+
...intraEdges.map((e) => e.data.occurrences ?? 1),
|
|
325
|
+
...[...externalBuckets.values()].map((b) => b.occurrences),
|
|
326
|
+
];
|
|
327
|
+
const maxOcc = Math.max(0, ...allOcc);
|
|
328
|
+
for (const edge of intraEdges) {
|
|
329
|
+
edge.data.weight = maxOcc > 0 ? Math.sqrt((edge.data.occurrences ?? 1) / maxOcc) : 0;
|
|
330
|
+
}
|
|
331
|
+
const externalEdges = [...externalBuckets.values()].map((b, i) => ({
|
|
332
|
+
group: 'edges',
|
|
333
|
+
data: {
|
|
334
|
+
id: `x3:${i}`,
|
|
335
|
+
source: `s3:${b.sourceSymbol}`,
|
|
336
|
+
target: `ext3:${b.targetFile}`,
|
|
337
|
+
relation: 'calls',
|
|
338
|
+
weight: maxOcc > 0 ? Math.sqrt(b.occurrences / maxOcc) : 0,
|
|
339
|
+
occurrences: b.occurrences,
|
|
340
|
+
externalTargetFile: b.targetFile,
|
|
341
|
+
},
|
|
342
|
+
}));
|
|
343
|
+
// Virtual "external file" nodes — one per distinct target file —
|
|
344
|
+
// sized small + neutral-colored. Renderer wires them as clickable
|
|
345
|
+
// "leaves this file" affordances.
|
|
346
|
+
const externalFiles = new Set([...externalBuckets.values()].map((b) => b.targetFile));
|
|
347
|
+
const externalNodes = [...externalFiles].sort().map((f) => ({
|
|
348
|
+
group: 'nodes',
|
|
349
|
+
data: {
|
|
350
|
+
id: `ext3:${f}`,
|
|
351
|
+
label: basename(f),
|
|
352
|
+
size: 0.1,
|
|
353
|
+
colorGroup: 'external',
|
|
354
|
+
tier: 3,
|
|
355
|
+
sourceFile: f,
|
|
356
|
+
meta: {
|
|
357
|
+
external: true,
|
|
358
|
+
path: f,
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
}));
|
|
362
|
+
return {
|
|
363
|
+
nodes: [...nodes, ...externalNodes],
|
|
364
|
+
edges: [...intraEdges, ...externalEdges],
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
368
|
+
function communityId(id) {
|
|
369
|
+
return `c1:${id}`;
|
|
370
|
+
}
|
|
371
|
+
function basename(p) {
|
|
372
|
+
if (!p)
|
|
373
|
+
return '';
|
|
374
|
+
const i = Math.max(p.lastIndexOf('/'), p.lastIndexOf('\\'));
|
|
375
|
+
return i >= 0 ? p.slice(i + 1) : p;
|
|
376
|
+
}
|
|
377
|
+
function stripParens(label) {
|
|
378
|
+
if (!label)
|
|
379
|
+
return '';
|
|
380
|
+
let s = label.replace(/\(\)$/, '');
|
|
381
|
+
if (s.includes('.'))
|
|
382
|
+
s = s.split('.').pop() ?? s;
|
|
383
|
+
return s;
|
|
384
|
+
}
|
|
385
|
+
function round2(n) {
|
|
386
|
+
return Math.round(n * 100) / 100;
|
|
387
|
+
}
|
|
388
|
+
// Tier 2's pack derivation mirrors `queries.ts:packFromExt` — kept
|
|
389
|
+
// inline rather than re-exported from queries.ts because the public
|
|
390
|
+
// queries.ts surface should remain the documented "graph queries"
|
|
391
|
+
// API (per Rule 12) and not leak a per-extension lookup table.
|
|
392
|
+
function packFromExt(sourceFile) {
|
|
393
|
+
const i = sourceFile.lastIndexOf('.');
|
|
394
|
+
if (i < 0)
|
|
395
|
+
return '';
|
|
396
|
+
const ext = sourceFile.slice(i).toLowerCase();
|
|
397
|
+
const map = {
|
|
398
|
+
'.ts': 'typescript',
|
|
399
|
+
'.tsx': 'typescript',
|
|
400
|
+
'.js': 'typescript',
|
|
401
|
+
'.jsx': 'typescript',
|
|
402
|
+
'.mjs': 'typescript',
|
|
403
|
+
'.cjs': 'typescript',
|
|
404
|
+
'.py': 'python',
|
|
405
|
+
'.go': 'go',
|
|
406
|
+
'.rs': 'rust',
|
|
407
|
+
'.cs': 'csharp',
|
|
408
|
+
'.kt': 'kotlin',
|
|
409
|
+
'.kts': 'kotlin',
|
|
410
|
+
'.java': 'java',
|
|
411
|
+
'.rb': 'ruby',
|
|
412
|
+
};
|
|
413
|
+
return map[ext] ?? '';
|
|
414
|
+
}
|
|
415
|
+
//# sourceMappingURL=graph-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-adapter.js","sourceRoot":"","sources":["../../src/dashboard/graph-adapter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;AAwGH,oCAmEC;AAgBD,oCAgHC;AAmBD,oCA6HC;AAzbD,gDAAyF;AAwFzF,gFAAgF;AAEhF;;;;;;;;;;;GAWG;AACH,SAAgB,YAAY,CAAC,KAAY,EAAE,OAA2B,EAAE;IACtE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IAE/B,mEAAmE;IACnE,kEAAkE;IAClE,mCAAmC;IACnC,MAAM,SAAS,GAAG,IAAA,0BAAgB,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAA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