arcvision 0.1.24 → 0.1.26
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/dist/index.js +13 -12
- package/output1.json +281 -0
- package/output2.json +281 -0
- package/package.json +1 -1
- package/src/engine/context_builder.js +16 -15
package/dist/index.js
CHANGED
|
@@ -56615,27 +56615,28 @@ var require_context_builder = __commonJS({
|
|
|
56615
56615
|
language = "javascript"
|
|
56616
56616
|
} = options;
|
|
56617
56617
|
const nodes = files.map((file) => {
|
|
56618
|
-
const
|
|
56619
|
-
const normalizedPath = relativePath.replace(/\\/g, "/");
|
|
56618
|
+
const normalizedPath = file.id;
|
|
56620
56619
|
return {
|
|
56621
56620
|
id: stableId(normalizedPath),
|
|
56622
56621
|
type: "file",
|
|
56623
56622
|
path: normalizedPath,
|
|
56624
56623
|
role: file.metadata.functions.length > 0 ? "Implementation" : "Structure",
|
|
56625
|
-
dependencies: file.metadata.imports.map((imp) => imp.source)
|
|
56624
|
+
dependencies: file.metadata.imports.map((imp) => imp.source),
|
|
56625
|
+
blast_radius: file.metadata.blast_radius || 0
|
|
56626
56626
|
};
|
|
56627
56627
|
});
|
|
56628
|
-
const schemaEdges =
|
|
56628
|
+
const schemaEdges = [];
|
|
56629
|
+
for (const edge of edges) {
|
|
56629
56630
|
const sourceNode = nodes.find((n) => n.path === edge.source);
|
|
56630
56631
|
const targetNode = nodes.find((n) => n.path === edge.target);
|
|
56631
|
-
|
|
56632
|
-
|
|
56633
|
-
|
|
56634
|
-
|
|
56635
|
-
|
|
56636
|
-
|
|
56637
|
-
}
|
|
56638
|
-
}
|
|
56632
|
+
if (sourceNode && targetNode) {
|
|
56633
|
+
schemaEdges.push({
|
|
56634
|
+
from: sourceNode.id,
|
|
56635
|
+
to: targetNode.id,
|
|
56636
|
+
relation: "imports"
|
|
56637
|
+
});
|
|
56638
|
+
}
|
|
56639
|
+
}
|
|
56639
56640
|
const metrics = {
|
|
56640
56641
|
total_files: nodes.length,
|
|
56641
56642
|
total_nodes: nodes.length,
|
package/output1.json
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.0.0",
|
|
3
|
+
"generated_at": "2026-01-05T08:46:47.402Z",
|
|
4
|
+
"system": {
|
|
5
|
+
"name": "cli",
|
|
6
|
+
"root_path": "C:\\Users\\AHMAD RAZA\\Downloads\\ArcVision\\cli",
|
|
7
|
+
"language": "javascript"
|
|
8
|
+
},
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "0f08282f2659a43f",
|
|
12
|
+
"type": "file",
|
|
13
|
+
"path": "test/determinism-test.js",
|
|
14
|
+
"role": "Implementation",
|
|
15
|
+
"dependencies": [
|
|
16
|
+
"fs",
|
|
17
|
+
"path",
|
|
18
|
+
"../src/core/scanner"
|
|
19
|
+
],
|
|
20
|
+
"blast_radius": 0
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "21f1909c480ac805",
|
|
24
|
+
"type": "file",
|
|
25
|
+
"path": "src/engine/id-generator.js",
|
|
26
|
+
"role": "Implementation",
|
|
27
|
+
"dependencies": [
|
|
28
|
+
"crypto"
|
|
29
|
+
],
|
|
30
|
+
"blast_radius": 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "28ca1805674b8343",
|
|
34
|
+
"type": "file",
|
|
35
|
+
"path": "src/core/tsconfig-utils.js",
|
|
36
|
+
"role": "Implementation",
|
|
37
|
+
"dependencies": [
|
|
38
|
+
"fs",
|
|
39
|
+
"path"
|
|
40
|
+
],
|
|
41
|
+
"blast_radius": 1
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "3aa346846f0a84b0",
|
|
45
|
+
"type": "file",
|
|
46
|
+
"path": "src/core/watcher.js",
|
|
47
|
+
"role": "Implementation",
|
|
48
|
+
"dependencies": [
|
|
49
|
+
"chokidar"
|
|
50
|
+
],
|
|
51
|
+
"blast_radius": 0
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "3fcbbe7cb70124b7",
|
|
55
|
+
"type": "file",
|
|
56
|
+
"path": "src/engine/context_validator.js",
|
|
57
|
+
"role": "Implementation",
|
|
58
|
+
"dependencies": [
|
|
59
|
+
"fs",
|
|
60
|
+
"path",
|
|
61
|
+
"jsonschema"
|
|
62
|
+
],
|
|
63
|
+
"blast_radius": 1
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "4fc924ed165bd841",
|
|
67
|
+
"type": "file",
|
|
68
|
+
"path": "src/core/parser.js",
|
|
69
|
+
"role": "Implementation",
|
|
70
|
+
"dependencies": [
|
|
71
|
+
"@babel/parser",
|
|
72
|
+
"@babel/traverse",
|
|
73
|
+
"fs",
|
|
74
|
+
"path"
|
|
75
|
+
],
|
|
76
|
+
"blast_radius": 1
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "54ee84f03c335898",
|
|
80
|
+
"type": "file",
|
|
81
|
+
"path": "src/engine/context_builder.js",
|
|
82
|
+
"role": "Implementation",
|
|
83
|
+
"dependencies": [
|
|
84
|
+
"path",
|
|
85
|
+
"./id-generator"
|
|
86
|
+
],
|
|
87
|
+
"blast_radius": 1
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "5630c1d10d0cfa0e",
|
|
91
|
+
"type": "file",
|
|
92
|
+
"path": "src/plugins/plugin-manager.js",
|
|
93
|
+
"role": "Structure",
|
|
94
|
+
"dependencies": [
|
|
95
|
+
"fs",
|
|
96
|
+
"path"
|
|
97
|
+
],
|
|
98
|
+
"blast_radius": 1
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "5b1e77d935dc26c0",
|
|
102
|
+
"type": "file",
|
|
103
|
+
"path": "src/core/blastRadius.js",
|
|
104
|
+
"role": "Implementation",
|
|
105
|
+
"dependencies": [],
|
|
106
|
+
"blast_radius": 2
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "a5c440def525edb4",
|
|
110
|
+
"type": "file",
|
|
111
|
+
"path": "src/engine/context_sorter.js",
|
|
112
|
+
"role": "Implementation",
|
|
113
|
+
"dependencies": [],
|
|
114
|
+
"blast_radius": 1
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "a81ccb8745389ff3",
|
|
118
|
+
"type": "file",
|
|
119
|
+
"path": "src/plugins/react-plugin.js",
|
|
120
|
+
"role": "Structure",
|
|
121
|
+
"dependencies": [
|
|
122
|
+
"@babel/parser",
|
|
123
|
+
"@babel/traverse",
|
|
124
|
+
"fs"
|
|
125
|
+
],
|
|
126
|
+
"blast_radius": 0
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "b59c6389c609c58f",
|
|
130
|
+
"type": "file",
|
|
131
|
+
"path": "src/core/path-resolver.js",
|
|
132
|
+
"role": "Implementation",
|
|
133
|
+
"dependencies": [
|
|
134
|
+
"fs",
|
|
135
|
+
"path"
|
|
136
|
+
],
|
|
137
|
+
"blast_radius": 1
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "bfe9874d23901496",
|
|
141
|
+
"type": "file",
|
|
142
|
+
"path": "src/index.js",
|
|
143
|
+
"role": "Implementation",
|
|
144
|
+
"dependencies": [
|
|
145
|
+
"commander",
|
|
146
|
+
"chalk",
|
|
147
|
+
"path",
|
|
148
|
+
"fs",
|
|
149
|
+
"os",
|
|
150
|
+
"./core/scanner",
|
|
151
|
+
"./core/blastRadius"
|
|
152
|
+
],
|
|
153
|
+
"blast_radius": 0
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "ea3da8d7bc223798",
|
|
157
|
+
"type": "file",
|
|
158
|
+
"path": "src/core/scanner.js",
|
|
159
|
+
"role": "Implementation",
|
|
160
|
+
"dependencies": [
|
|
161
|
+
"glob",
|
|
162
|
+
"path",
|
|
163
|
+
"./parser",
|
|
164
|
+
"../plugins/plugin-manager",
|
|
165
|
+
"./tsconfig-utils",
|
|
166
|
+
"./path-resolver",
|
|
167
|
+
"./blastRadius",
|
|
168
|
+
"../engine/context_builder",
|
|
169
|
+
"../engine/context_validator",
|
|
170
|
+
"../engine/context_sorter",
|
|
171
|
+
"./blastRadius"
|
|
172
|
+
],
|
|
173
|
+
"blast_radius": 2
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "ea48fa9f1523f614",
|
|
177
|
+
"type": "file",
|
|
178
|
+
"path": "src/plugins/express-plugin.js",
|
|
179
|
+
"role": "Structure",
|
|
180
|
+
"dependencies": [
|
|
181
|
+
"@babel/parser",
|
|
182
|
+
"@babel/traverse",
|
|
183
|
+
"fs"
|
|
184
|
+
],
|
|
185
|
+
"blast_radius": 0
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"edges": [
|
|
189
|
+
{
|
|
190
|
+
"from": "0f08282f2659a43f",
|
|
191
|
+
"to": "ea3da8d7bc223798",
|
|
192
|
+
"relation": "imports"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"from": "54ee84f03c335898",
|
|
196
|
+
"to": "21f1909c480ac805",
|
|
197
|
+
"relation": "imports"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"from": "bfe9874d23901496",
|
|
201
|
+
"to": "5b1e77d935dc26c0",
|
|
202
|
+
"relation": "imports"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"from": "bfe9874d23901496",
|
|
206
|
+
"to": "ea3da8d7bc223798",
|
|
207
|
+
"relation": "imports"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"from": "ea3da8d7bc223798",
|
|
211
|
+
"to": "28ca1805674b8343",
|
|
212
|
+
"relation": "imports"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"from": "ea3da8d7bc223798",
|
|
216
|
+
"to": "3fcbbe7cb70124b7",
|
|
217
|
+
"relation": "imports"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"from": "ea3da8d7bc223798",
|
|
221
|
+
"to": "4fc924ed165bd841",
|
|
222
|
+
"relation": "imports"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"from": "ea3da8d7bc223798",
|
|
226
|
+
"to": "54ee84f03c335898",
|
|
227
|
+
"relation": "imports"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"from": "ea3da8d7bc223798",
|
|
231
|
+
"to": "5630c1d10d0cfa0e",
|
|
232
|
+
"relation": "imports"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"from": "ea3da8d7bc223798",
|
|
236
|
+
"to": "5b1e77d935dc26c0",
|
|
237
|
+
"relation": "imports"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"from": "ea3da8d7bc223798",
|
|
241
|
+
"to": "5b1e77d935dc26c0",
|
|
242
|
+
"relation": "imports"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"from": "ea3da8d7bc223798",
|
|
246
|
+
"to": "a5c440def525edb4",
|
|
247
|
+
"relation": "imports"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"from": "ea3da8d7bc223798",
|
|
251
|
+
"to": "b59c6389c609c58f",
|
|
252
|
+
"relation": "imports"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"metrics": {
|
|
256
|
+
"files_with_functions": 12,
|
|
257
|
+
"total_edges": 13,
|
|
258
|
+
"total_files": 15,
|
|
259
|
+
"total_imports": 13,
|
|
260
|
+
"total_nodes": 15
|
|
261
|
+
},
|
|
262
|
+
"contextSurface": {
|
|
263
|
+
"topBlastRadiusFiles": [
|
|
264
|
+
{
|
|
265
|
+
"file": "src/core/scanner.js",
|
|
266
|
+
"blastRadius": 2,
|
|
267
|
+
"percentOfGraph": 13.33
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"file": "src/core/blastRadius.js",
|
|
271
|
+
"blastRadius": 2,
|
|
272
|
+
"percentOfGraph": 13.33
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"file": "src/plugins/plugin-manager.js",
|
|
276
|
+
"blastRadius": 1,
|
|
277
|
+
"percentOfGraph": 6.67
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
}
|
package/output2.json
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.0.0",
|
|
3
|
+
"generated_at": "2026-01-05T08:46:47.799Z",
|
|
4
|
+
"system": {
|
|
5
|
+
"name": "cli",
|
|
6
|
+
"root_path": "C:\\Users\\AHMAD RAZA\\Downloads\\ArcVision\\cli",
|
|
7
|
+
"language": "javascript"
|
|
8
|
+
},
|
|
9
|
+
"nodes": [
|
|
10
|
+
{
|
|
11
|
+
"id": "0f08282f2659a43f",
|
|
12
|
+
"type": "file",
|
|
13
|
+
"path": "test/determinism-test.js",
|
|
14
|
+
"role": "Implementation",
|
|
15
|
+
"dependencies": [
|
|
16
|
+
"fs",
|
|
17
|
+
"path",
|
|
18
|
+
"../src/core/scanner"
|
|
19
|
+
],
|
|
20
|
+
"blast_radius": 0
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "21f1909c480ac805",
|
|
24
|
+
"type": "file",
|
|
25
|
+
"path": "src/engine/id-generator.js",
|
|
26
|
+
"role": "Implementation",
|
|
27
|
+
"dependencies": [
|
|
28
|
+
"crypto"
|
|
29
|
+
],
|
|
30
|
+
"blast_radius": 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "28ca1805674b8343",
|
|
34
|
+
"type": "file",
|
|
35
|
+
"path": "src/core/tsconfig-utils.js",
|
|
36
|
+
"role": "Implementation",
|
|
37
|
+
"dependencies": [
|
|
38
|
+
"fs",
|
|
39
|
+
"path"
|
|
40
|
+
],
|
|
41
|
+
"blast_radius": 1
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "3aa346846f0a84b0",
|
|
45
|
+
"type": "file",
|
|
46
|
+
"path": "src/core/watcher.js",
|
|
47
|
+
"role": "Implementation",
|
|
48
|
+
"dependencies": [
|
|
49
|
+
"chokidar"
|
|
50
|
+
],
|
|
51
|
+
"blast_radius": 0
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "3fcbbe7cb70124b7",
|
|
55
|
+
"type": "file",
|
|
56
|
+
"path": "src/engine/context_validator.js",
|
|
57
|
+
"role": "Implementation",
|
|
58
|
+
"dependencies": [
|
|
59
|
+
"fs",
|
|
60
|
+
"path",
|
|
61
|
+
"jsonschema"
|
|
62
|
+
],
|
|
63
|
+
"blast_radius": 1
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "4fc924ed165bd841",
|
|
67
|
+
"type": "file",
|
|
68
|
+
"path": "src/core/parser.js",
|
|
69
|
+
"role": "Implementation",
|
|
70
|
+
"dependencies": [
|
|
71
|
+
"@babel/parser",
|
|
72
|
+
"@babel/traverse",
|
|
73
|
+
"fs",
|
|
74
|
+
"path"
|
|
75
|
+
],
|
|
76
|
+
"blast_radius": 1
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "54ee84f03c335898",
|
|
80
|
+
"type": "file",
|
|
81
|
+
"path": "src/engine/context_builder.js",
|
|
82
|
+
"role": "Implementation",
|
|
83
|
+
"dependencies": [
|
|
84
|
+
"path",
|
|
85
|
+
"./id-generator"
|
|
86
|
+
],
|
|
87
|
+
"blast_radius": 1
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "5630c1d10d0cfa0e",
|
|
91
|
+
"type": "file",
|
|
92
|
+
"path": "src/plugins/plugin-manager.js",
|
|
93
|
+
"role": "Structure",
|
|
94
|
+
"dependencies": [
|
|
95
|
+
"fs",
|
|
96
|
+
"path"
|
|
97
|
+
],
|
|
98
|
+
"blast_radius": 1
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "5b1e77d935dc26c0",
|
|
102
|
+
"type": "file",
|
|
103
|
+
"path": "src/core/blastRadius.js",
|
|
104
|
+
"role": "Implementation",
|
|
105
|
+
"dependencies": [],
|
|
106
|
+
"blast_radius": 2
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "a5c440def525edb4",
|
|
110
|
+
"type": "file",
|
|
111
|
+
"path": "src/engine/context_sorter.js",
|
|
112
|
+
"role": "Implementation",
|
|
113
|
+
"dependencies": [],
|
|
114
|
+
"blast_radius": 1
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "a81ccb8745389ff3",
|
|
118
|
+
"type": "file",
|
|
119
|
+
"path": "src/plugins/react-plugin.js",
|
|
120
|
+
"role": "Structure",
|
|
121
|
+
"dependencies": [
|
|
122
|
+
"@babel/parser",
|
|
123
|
+
"@babel/traverse",
|
|
124
|
+
"fs"
|
|
125
|
+
],
|
|
126
|
+
"blast_radius": 0
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "b59c6389c609c58f",
|
|
130
|
+
"type": "file",
|
|
131
|
+
"path": "src/core/path-resolver.js",
|
|
132
|
+
"role": "Implementation",
|
|
133
|
+
"dependencies": [
|
|
134
|
+
"fs",
|
|
135
|
+
"path"
|
|
136
|
+
],
|
|
137
|
+
"blast_radius": 1
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "bfe9874d23901496",
|
|
141
|
+
"type": "file",
|
|
142
|
+
"path": "src/index.js",
|
|
143
|
+
"role": "Implementation",
|
|
144
|
+
"dependencies": [
|
|
145
|
+
"commander",
|
|
146
|
+
"chalk",
|
|
147
|
+
"path",
|
|
148
|
+
"fs",
|
|
149
|
+
"os",
|
|
150
|
+
"./core/scanner",
|
|
151
|
+
"./core/blastRadius"
|
|
152
|
+
],
|
|
153
|
+
"blast_radius": 0
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "ea3da8d7bc223798",
|
|
157
|
+
"type": "file",
|
|
158
|
+
"path": "src/core/scanner.js",
|
|
159
|
+
"role": "Implementation",
|
|
160
|
+
"dependencies": [
|
|
161
|
+
"glob",
|
|
162
|
+
"path",
|
|
163
|
+
"./parser",
|
|
164
|
+
"../plugins/plugin-manager",
|
|
165
|
+
"./tsconfig-utils",
|
|
166
|
+
"./path-resolver",
|
|
167
|
+
"./blastRadius",
|
|
168
|
+
"../engine/context_builder",
|
|
169
|
+
"../engine/context_validator",
|
|
170
|
+
"../engine/context_sorter",
|
|
171
|
+
"./blastRadius"
|
|
172
|
+
],
|
|
173
|
+
"blast_radius": 2
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "ea48fa9f1523f614",
|
|
177
|
+
"type": "file",
|
|
178
|
+
"path": "src/plugins/express-plugin.js",
|
|
179
|
+
"role": "Structure",
|
|
180
|
+
"dependencies": [
|
|
181
|
+
"@babel/parser",
|
|
182
|
+
"@babel/traverse",
|
|
183
|
+
"fs"
|
|
184
|
+
],
|
|
185
|
+
"blast_radius": 0
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"edges": [
|
|
189
|
+
{
|
|
190
|
+
"from": "0f08282f2659a43f",
|
|
191
|
+
"to": "ea3da8d7bc223798",
|
|
192
|
+
"relation": "imports"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"from": "54ee84f03c335898",
|
|
196
|
+
"to": "21f1909c480ac805",
|
|
197
|
+
"relation": "imports"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"from": "bfe9874d23901496",
|
|
201
|
+
"to": "5b1e77d935dc26c0",
|
|
202
|
+
"relation": "imports"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"from": "bfe9874d23901496",
|
|
206
|
+
"to": "ea3da8d7bc223798",
|
|
207
|
+
"relation": "imports"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"from": "ea3da8d7bc223798",
|
|
211
|
+
"to": "28ca1805674b8343",
|
|
212
|
+
"relation": "imports"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"from": "ea3da8d7bc223798",
|
|
216
|
+
"to": "3fcbbe7cb70124b7",
|
|
217
|
+
"relation": "imports"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"from": "ea3da8d7bc223798",
|
|
221
|
+
"to": "4fc924ed165bd841",
|
|
222
|
+
"relation": "imports"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"from": "ea3da8d7bc223798",
|
|
226
|
+
"to": "54ee84f03c335898",
|
|
227
|
+
"relation": "imports"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"from": "ea3da8d7bc223798",
|
|
231
|
+
"to": "5630c1d10d0cfa0e",
|
|
232
|
+
"relation": "imports"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"from": "ea3da8d7bc223798",
|
|
236
|
+
"to": "5b1e77d935dc26c0",
|
|
237
|
+
"relation": "imports"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"from": "ea3da8d7bc223798",
|
|
241
|
+
"to": "5b1e77d935dc26c0",
|
|
242
|
+
"relation": "imports"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"from": "ea3da8d7bc223798",
|
|
246
|
+
"to": "a5c440def525edb4",
|
|
247
|
+
"relation": "imports"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"from": "ea3da8d7bc223798",
|
|
251
|
+
"to": "b59c6389c609c58f",
|
|
252
|
+
"relation": "imports"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"metrics": {
|
|
256
|
+
"files_with_functions": 12,
|
|
257
|
+
"total_edges": 13,
|
|
258
|
+
"total_files": 15,
|
|
259
|
+
"total_imports": 13,
|
|
260
|
+
"total_nodes": 15
|
|
261
|
+
},
|
|
262
|
+
"contextSurface": {
|
|
263
|
+
"topBlastRadiusFiles": [
|
|
264
|
+
{
|
|
265
|
+
"file": "src/core/scanner.js",
|
|
266
|
+
"blastRadius": 2,
|
|
267
|
+
"percentOfGraph": 13.33
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"file": "src/core/blastRadius.js",
|
|
271
|
+
"blastRadius": 2,
|
|
272
|
+
"percentOfGraph": 13.33
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"file": "src/engine/id-generator.js",
|
|
276
|
+
"blastRadius": 1,
|
|
277
|
+
"percentOfGraph": 6.67
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
}
|
package/package.json
CHANGED
|
@@ -17,34 +17,35 @@ function buildContext(files, edges, options = {}) {
|
|
|
17
17
|
|
|
18
18
|
// Build nodes from files
|
|
19
19
|
const nodes = files.map(file => {
|
|
20
|
-
|
|
21
|
-
const normalizedPath =
|
|
20
|
+
// Use the node's id field which is already the normalized relative path
|
|
21
|
+
const normalizedPath = file.id;
|
|
22
22
|
|
|
23
23
|
return {
|
|
24
24
|
id: stableId(normalizedPath),
|
|
25
25
|
type: 'file',
|
|
26
26
|
path: normalizedPath,
|
|
27
27
|
role: file.metadata.functions.length > 0 ? 'Implementation' : 'Structure',
|
|
28
|
-
dependencies: file.metadata.imports.map(imp => imp.source)
|
|
28
|
+
dependencies: file.metadata.imports.map(imp => imp.source),
|
|
29
|
+
blast_radius: file.metadata.blast_radius || 0
|
|
29
30
|
};
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
// Build edges from dependencies
|
|
33
|
-
const schemaEdges =
|
|
34
|
+
const schemaEdges = [];
|
|
35
|
+
for (const edge of edges) {
|
|
34
36
|
// Find source and target nodes to get their stable IDs
|
|
35
37
|
const sourceNode = nodes.find(n => n.path === edge.source);
|
|
36
38
|
const targetNode = nodes.find(n => n.path === edge.target);
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
});
|
|
39
|
+
|
|
40
|
+
// Only include edges where both source and target nodes exist
|
|
41
|
+
if (sourceNode && targetNode) {
|
|
42
|
+
schemaEdges.push({
|
|
43
|
+
from: sourceNode.id,
|
|
44
|
+
to: targetNode.id,
|
|
45
|
+
relation: 'imports'
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
48
49
|
|
|
49
50
|
// Calculate metrics
|
|
50
51
|
const metrics = {
|