monarch-code-graph 0.3.4 → 0.3.5
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/cli.d.ts +0 -2
- package/dist/cli.js +2632 -96
- package/dist/index.d.ts +33 -6
- package/dist/index.js +1552 -7
- package/package.json +7 -5
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/analyze.d.ts +0 -8
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js +0 -76
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/diff.d.ts +0 -8
- package/dist/commands/diff.d.ts.map +0 -1
- package/dist/commands/diff.js +0 -203
- package/dist/commands/diff.js.map +0 -1
- package/dist/commands/graph.d.ts +0 -12
- package/dist/commands/graph.d.ts.map +0 -1
- package/dist/commands/graph.js +0 -72
- package/dist/commands/graph.js.map +0 -1
- package/dist/commands/help.d.ts +0 -2
- package/dist/commands/help.d.ts.map +0 -1
- package/dist/commands/help.js +0 -234
- package/dist/commands/help.js.map +0 -1
- package/dist/commands/init.d.ts +0 -6
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -37
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts +0 -7
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js +0 -148
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/run.d.ts +0 -10
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -388
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/serve.d.ts +0 -8
- package/dist/commands/serve.d.ts.map +0 -1
- package/dist/commands/serve.js +0 -137
- package/dist/commands/serve.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/utils/ascii-graph.d.ts +0 -21
- package/dist/utils/ascii-graph.d.ts.map +0 -1
- package/dist/utils/ascii-graph.js +0 -431
- package/dist/utils/ascii-graph.js.map +0 -1
- package/dist/utils/output.d.ts +0 -12
- package/dist/utils/output.d.ts.map +0 -1
- package/dist/utils/output.js +0 -24
- package/dist/utils/output.js.map +0 -1
|
@@ -1,431 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
const BOX_CHARS = {
|
|
3
|
-
topLeft: '┌',
|
|
4
|
-
topRight: '┐',
|
|
5
|
-
bottomLeft: '└',
|
|
6
|
-
bottomRight: '┘',
|
|
7
|
-
horizontal: '─',
|
|
8
|
-
vertical: '│',
|
|
9
|
-
arrow: '→',
|
|
10
|
-
arrowDown: '↓',
|
|
11
|
-
junction: '├',
|
|
12
|
-
junctionRight: '┤',
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Render an ASCII graph from a CodeFlowArtifact
|
|
16
|
-
*/
|
|
17
|
-
export function renderAsciiGraph(artifact, level, options = {}) {
|
|
18
|
-
const { maxWidth = 80, showEdgeCounts = true, colorize = true } = options;
|
|
19
|
-
const { nodes, edges } = extractGraphData(artifact, level);
|
|
20
|
-
if (nodes.length === 0) {
|
|
21
|
-
return chalk.yellow('No nodes found at this level.');
|
|
22
|
-
}
|
|
23
|
-
const lines = [];
|
|
24
|
-
// Header
|
|
25
|
-
lines.push(formatHeader(level, nodes.length, edges.length, colorize));
|
|
26
|
-
lines.push('');
|
|
27
|
-
// Render nodes grouped by connections
|
|
28
|
-
const { roots, connected, isolated } = categorizeNodes(nodes, edges);
|
|
29
|
-
if (roots.length > 0 || connected.length > 0) {
|
|
30
|
-
lines.push(formatSectionHeader('Connected Graph', colorize));
|
|
31
|
-
lines.push(...renderConnectedGraph(nodes, edges, maxWidth, showEdgeCounts, colorize));
|
|
32
|
-
lines.push('');
|
|
33
|
-
}
|
|
34
|
-
if (isolated.length > 0) {
|
|
35
|
-
lines.push(formatSectionHeader(`Isolated Nodes (${isolated.length})`, colorize));
|
|
36
|
-
lines.push(...renderIsolatedNodes(isolated, nodes, maxWidth, colorize));
|
|
37
|
-
}
|
|
38
|
-
return lines.join('\n');
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Render a specific component or module expanded
|
|
42
|
-
*/
|
|
43
|
-
export function renderExpandedView(artifact, targetName, targetType, options = {}) {
|
|
44
|
-
const { maxWidth = 80, showEdgeCounts = true, colorize = true } = options;
|
|
45
|
-
const lines = [];
|
|
46
|
-
if (targetType === 'component') {
|
|
47
|
-
const component = artifact.nodes.components.find((c) => c.name === targetName || c.id === targetName);
|
|
48
|
-
if (!component) {
|
|
49
|
-
return chalk.red(`Component not found: ${targetName}`);
|
|
50
|
-
}
|
|
51
|
-
lines.push(formatHeader(`Component: ${component.name}`, 0, 0, colorize));
|
|
52
|
-
lines.push('');
|
|
53
|
-
// Get modules in this component
|
|
54
|
-
const moduleIds = new Set(component.moduleIds || []);
|
|
55
|
-
const modules = artifact.nodes.modules.filter((m) => moduleIds.has(m.id));
|
|
56
|
-
if (modules.length === 0) {
|
|
57
|
-
lines.push(chalk.yellow(' No modules in this component.'));
|
|
58
|
-
return lines.join('\n');
|
|
59
|
-
}
|
|
60
|
-
// Get edges between modules in this component
|
|
61
|
-
const moduleFunctionIds = new Map();
|
|
62
|
-
for (const mod of modules) {
|
|
63
|
-
moduleFunctionIds.set(mod.id, new Set(mod.functionIds || []));
|
|
64
|
-
}
|
|
65
|
-
const edges = aggregateEdgesBetweenContainers(artifact, modules.map((m) => m.id), moduleFunctionIds);
|
|
66
|
-
const nodes = modules.map((m) => ({
|
|
67
|
-
id: m.id,
|
|
68
|
-
label: formatModulePath(m.path),
|
|
69
|
-
type: 'module',
|
|
70
|
-
children: m.functionIds?.length || 0,
|
|
71
|
-
}));
|
|
72
|
-
lines.push(formatSectionHeader(`Modules (${modules.length})`, colorize));
|
|
73
|
-
// If there are edges, render connected graph, otherwise show all modules as isolated
|
|
74
|
-
if (edges.length > 0) {
|
|
75
|
-
lines.push(...renderConnectedGraph(nodes, edges, maxWidth, showEdgeCounts, colorize));
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// All nodes are isolated - render them as a simple list
|
|
79
|
-
for (const node of nodes) {
|
|
80
|
-
lines.push(formatNode(node, colorize));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
// Module view - show functions
|
|
86
|
-
const module = artifact.nodes.modules.find((m) => m.path === targetName || m.id === targetName || m.path.endsWith(targetName));
|
|
87
|
-
if (!module) {
|
|
88
|
-
return chalk.red(`Module not found: ${targetName}`);
|
|
89
|
-
}
|
|
90
|
-
lines.push(formatHeader(`Module: ${module.path}`, 0, 0, colorize));
|
|
91
|
-
lines.push('');
|
|
92
|
-
// Get functions in this module
|
|
93
|
-
const functionIds = new Set(module.functionIds || []);
|
|
94
|
-
const functions = artifact.nodes.functions.filter((f) => functionIds.has(f.id));
|
|
95
|
-
if (functions.length === 0) {
|
|
96
|
-
lines.push(chalk.yellow(' No functions in this module.'));
|
|
97
|
-
return lines.join('\n');
|
|
98
|
-
}
|
|
99
|
-
// Get edges between functions in this module
|
|
100
|
-
const edges = getEdgesBetweenFunctions(artifact, functionIds);
|
|
101
|
-
const nodes = functions.map((f) => ({
|
|
102
|
-
id: f.id,
|
|
103
|
-
label: formatFunctionName(f),
|
|
104
|
-
type: 'function',
|
|
105
|
-
}));
|
|
106
|
-
lines.push(formatSectionHeader(`Functions (${functions.length})`, colorize));
|
|
107
|
-
// If there are edges, render connected graph, otherwise show all functions as isolated
|
|
108
|
-
if (edges.length > 0) {
|
|
109
|
-
lines.push(...renderConnectedGraph(nodes, edges, maxWidth, showEdgeCounts, colorize));
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
// All nodes are isolated - render them as a simple list
|
|
113
|
-
for (const node of nodes) {
|
|
114
|
-
lines.push(formatNode(node, colorize));
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return lines.join('\n');
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* List available components and modules for expansion
|
|
122
|
-
*/
|
|
123
|
-
export function listExpandableItems(artifact) {
|
|
124
|
-
const lines = [];
|
|
125
|
-
lines.push(chalk.bold.cyan('\nExpandable Items\n'));
|
|
126
|
-
lines.push(chalk.bold('Components:'));
|
|
127
|
-
if (artifact.nodes.components.length === 0) {
|
|
128
|
-
lines.push(chalk.dim(' (none)'));
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
for (const comp of artifact.nodes.components) {
|
|
132
|
-
const modCount = comp.moduleIds?.length || 0;
|
|
133
|
-
lines.push(` ${chalk.cyan(comp.name)} ${chalk.dim(`(${modCount} modules)`)}`);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
lines.push('');
|
|
137
|
-
lines.push(chalk.bold('Modules:'));
|
|
138
|
-
if (artifact.nodes.modules.length === 0) {
|
|
139
|
-
lines.push(chalk.dim(' (none)'));
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
for (const mod of artifact.nodes.modules) {
|
|
143
|
-
const fnCount = mod.functionIds?.length || 0;
|
|
144
|
-
lines.push(` ${chalk.cyan(formatModulePath(mod.path))} ${chalk.dim(`(${fnCount} functions)`)}`);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return lines.join('\n');
|
|
148
|
-
}
|
|
149
|
-
// ============================================================================
|
|
150
|
-
// Helper Functions
|
|
151
|
-
// ============================================================================
|
|
152
|
-
function extractGraphData(artifact, level) {
|
|
153
|
-
switch (level) {
|
|
154
|
-
case 'components':
|
|
155
|
-
return extractComponentGraph(artifact);
|
|
156
|
-
case 'modules':
|
|
157
|
-
return extractModuleGraph(artifact);
|
|
158
|
-
case 'functions':
|
|
159
|
-
return extractFunctionGraph(artifact);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
function extractComponentGraph(artifact) {
|
|
163
|
-
const nodes = artifact.nodes.components.map((c) => ({
|
|
164
|
-
id: c.id,
|
|
165
|
-
label: c.name,
|
|
166
|
-
type: 'component',
|
|
167
|
-
children: c.moduleIds?.length || 0,
|
|
168
|
-
}));
|
|
169
|
-
// Build component membership map
|
|
170
|
-
const functionToComponent = new Map();
|
|
171
|
-
for (const comp of artifact.nodes.components) {
|
|
172
|
-
for (const modId of comp.moduleIds || []) {
|
|
173
|
-
const mod = artifact.nodes.modules.find((m) => m.id === modId);
|
|
174
|
-
if (mod) {
|
|
175
|
-
for (const fnId of mod.functionIds || []) {
|
|
176
|
-
functionToComponent.set(fnId, comp.id);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
// Aggregate edges between components
|
|
182
|
-
const edgeMap = new Map();
|
|
183
|
-
for (const edge of artifact.edges.calls) {
|
|
184
|
-
const fromComp = functionToComponent.get(edge.from);
|
|
185
|
-
const toComp = functionToComponent.get(edge.to);
|
|
186
|
-
if (fromComp && toComp && fromComp !== toComp) {
|
|
187
|
-
const key = `${fromComp}->${toComp}`;
|
|
188
|
-
edgeMap.set(key, (edgeMap.get(key) || 0) + 1);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
const edges = Array.from(edgeMap.entries()).map(([key, count]) => {
|
|
192
|
-
const [from, to] = key.split('->');
|
|
193
|
-
return { from, to, count };
|
|
194
|
-
});
|
|
195
|
-
return { nodes, edges };
|
|
196
|
-
}
|
|
197
|
-
function extractModuleGraph(artifact) {
|
|
198
|
-
const nodes = artifact.nodes.modules.map((m) => ({
|
|
199
|
-
id: m.id,
|
|
200
|
-
label: formatModulePath(m.path),
|
|
201
|
-
type: 'module',
|
|
202
|
-
children: m.functionIds?.length || 0,
|
|
203
|
-
}));
|
|
204
|
-
// Build function to module map
|
|
205
|
-
const functionToModule = new Map();
|
|
206
|
-
for (const mod of artifact.nodes.modules) {
|
|
207
|
-
for (const fnId of mod.functionIds || []) {
|
|
208
|
-
functionToModule.set(fnId, mod.id);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
// Aggregate edges between modules
|
|
212
|
-
const edgeMap = new Map();
|
|
213
|
-
for (const edge of artifact.edges.calls) {
|
|
214
|
-
const fromMod = functionToModule.get(edge.from);
|
|
215
|
-
const toMod = functionToModule.get(edge.to);
|
|
216
|
-
if (fromMod && toMod && fromMod !== toMod) {
|
|
217
|
-
const key = `${fromMod}->${toMod}`;
|
|
218
|
-
edgeMap.set(key, (edgeMap.get(key) || 0) + 1);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
const edges = Array.from(edgeMap.entries()).map(([key, count]) => {
|
|
222
|
-
const [from, to] = key.split('->');
|
|
223
|
-
return { from, to, count };
|
|
224
|
-
});
|
|
225
|
-
return { nodes, edges };
|
|
226
|
-
}
|
|
227
|
-
function extractFunctionGraph(artifact) {
|
|
228
|
-
const nodes = artifact.nodes.functions.map((f) => ({
|
|
229
|
-
id: f.id,
|
|
230
|
-
label: formatFunctionName(f),
|
|
231
|
-
type: 'function',
|
|
232
|
-
}));
|
|
233
|
-
const edges = artifact.edges.calls.map((e) => ({
|
|
234
|
-
from: e.from,
|
|
235
|
-
to: e.to,
|
|
236
|
-
count: e.callsites.length,
|
|
237
|
-
}));
|
|
238
|
-
return { nodes, edges };
|
|
239
|
-
}
|
|
240
|
-
function aggregateEdgesBetweenContainers(artifact, containerIds, containerFunctions) {
|
|
241
|
-
const containerSet = new Set(containerIds);
|
|
242
|
-
const functionToContainer = new Map();
|
|
243
|
-
for (const [containerId, fnIds] of containerFunctions) {
|
|
244
|
-
for (const fnId of fnIds) {
|
|
245
|
-
functionToContainer.set(fnId, containerId);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
const edgeMap = new Map();
|
|
249
|
-
for (const edge of artifact.edges.calls) {
|
|
250
|
-
const fromContainer = functionToContainer.get(edge.from);
|
|
251
|
-
const toContainer = functionToContainer.get(edge.to);
|
|
252
|
-
if (fromContainer &&
|
|
253
|
-
toContainer &&
|
|
254
|
-
containerSet.has(fromContainer) &&
|
|
255
|
-
containerSet.has(toContainer) &&
|
|
256
|
-
fromContainer !== toContainer) {
|
|
257
|
-
const key = `${fromContainer}->${toContainer}`;
|
|
258
|
-
edgeMap.set(key, (edgeMap.get(key) || 0) + 1);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
return Array.from(edgeMap.entries()).map(([key, count]) => {
|
|
262
|
-
const [from, to] = key.split('->');
|
|
263
|
-
return { from, to, count };
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
function getEdgesBetweenFunctions(artifact, functionIds) {
|
|
267
|
-
return artifact.edges.calls
|
|
268
|
-
.filter((e) => functionIds.has(e.from) && functionIds.has(e.to))
|
|
269
|
-
.map((e) => ({
|
|
270
|
-
from: e.from,
|
|
271
|
-
to: e.to,
|
|
272
|
-
count: e.callsites.length,
|
|
273
|
-
}));
|
|
274
|
-
}
|
|
275
|
-
function categorizeNodes(nodes, edges) {
|
|
276
|
-
const hasIncoming = new Set();
|
|
277
|
-
const hasOutgoing = new Set();
|
|
278
|
-
for (const edge of edges) {
|
|
279
|
-
hasOutgoing.add(edge.from);
|
|
280
|
-
hasIncoming.add(edge.to);
|
|
281
|
-
}
|
|
282
|
-
const roots = [];
|
|
283
|
-
const connected = [];
|
|
284
|
-
const isolated = [];
|
|
285
|
-
for (const node of nodes) {
|
|
286
|
-
const incoming = hasIncoming.has(node.id);
|
|
287
|
-
const outgoing = hasOutgoing.has(node.id);
|
|
288
|
-
if (!incoming && !outgoing) {
|
|
289
|
-
isolated.push(node.id);
|
|
290
|
-
}
|
|
291
|
-
else if (!incoming && outgoing) {
|
|
292
|
-
roots.push(node.id);
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
connected.push(node.id);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return { roots, connected, isolated };
|
|
299
|
-
}
|
|
300
|
-
function renderConnectedGraph(nodes, edges, _maxWidth, showEdgeCounts, colorize) {
|
|
301
|
-
const lines = [];
|
|
302
|
-
const nodeMap = new Map(nodes.map((n) => [n.id, n]));
|
|
303
|
-
// Build adjacency list
|
|
304
|
-
const outgoing = new Map();
|
|
305
|
-
const incoming = new Map();
|
|
306
|
-
for (const edge of edges) {
|
|
307
|
-
if (!outgoing.has(edge.from))
|
|
308
|
-
outgoing.set(edge.from, []);
|
|
309
|
-
if (!incoming.has(edge.to))
|
|
310
|
-
incoming.set(edge.to, []);
|
|
311
|
-
outgoing.get(edge.from).push(edge);
|
|
312
|
-
incoming.get(edge.to).push(edge);
|
|
313
|
-
}
|
|
314
|
-
// Find roots (nodes with no incoming edges)
|
|
315
|
-
const roots = nodes.filter((n) => !incoming.has(n.id) && outgoing.has(n.id));
|
|
316
|
-
const visited = new Set();
|
|
317
|
-
// Render from each root using DFS
|
|
318
|
-
for (const root of roots) {
|
|
319
|
-
lines.push(...renderNodeTree(root, nodeMap, outgoing, visited, 0, showEdgeCounts, colorize));
|
|
320
|
-
}
|
|
321
|
-
// Render any remaining connected nodes (cycles)
|
|
322
|
-
for (const node of nodes) {
|
|
323
|
-
if (!visited.has(node.id) && (outgoing.has(node.id) || incoming.has(node.id))) {
|
|
324
|
-
lines.push(...renderNodeTree(node, nodeMap, outgoing, visited, 0, showEdgeCounts, colorize));
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
return lines;
|
|
328
|
-
}
|
|
329
|
-
function renderNodeTree(node, nodeMap, outgoing, visited, depth, showEdgeCounts, colorize) {
|
|
330
|
-
if (visited.has(node.id)) {
|
|
331
|
-
return [`${' '.repeat(depth)}${BOX_CHARS.arrow} ${chalk.dim(`(${node.label} - cycle)`)}`];
|
|
332
|
-
}
|
|
333
|
-
visited.add(node.id);
|
|
334
|
-
const lines = [];
|
|
335
|
-
// Render current node
|
|
336
|
-
const indent = ' '.repeat(depth);
|
|
337
|
-
const nodeStr = formatNode(node, colorize);
|
|
338
|
-
lines.push(`${indent}${nodeStr}`);
|
|
339
|
-
// Render children
|
|
340
|
-
const children = outgoing.get(node.id) || [];
|
|
341
|
-
for (let i = 0; i < children.length; i++) {
|
|
342
|
-
const edge = children[i];
|
|
343
|
-
const targetNode = nodeMap.get(edge.to);
|
|
344
|
-
const isLast = i === children.length - 1;
|
|
345
|
-
const prefix = isLast ? BOX_CHARS.bottomLeft : BOX_CHARS.junction;
|
|
346
|
-
const countStr = showEdgeCounts && edge.count > 1 ? chalk.dim(` (${edge.count}x)`) : '';
|
|
347
|
-
if (targetNode) {
|
|
348
|
-
if (visited.has(targetNode.id)) {
|
|
349
|
-
lines.push(`${indent} ${prefix}${BOX_CHARS.horizontal}${BOX_CHARS.arrow} ${chalk.dim(`${targetNode.label} (cycle)`)}${countStr}`);
|
|
350
|
-
}
|
|
351
|
-
else {
|
|
352
|
-
lines.push(`${indent} ${prefix}${BOX_CHARS.horizontal}${BOX_CHARS.arrow}${countStr}`);
|
|
353
|
-
lines.push(...renderNodeTree(targetNode, nodeMap, outgoing, visited, depth + 2, showEdgeCounts, colorize));
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
return lines;
|
|
358
|
-
}
|
|
359
|
-
function renderIsolatedNodes(isolatedIds, nodes, maxWidth, colorize) {
|
|
360
|
-
const lines = [];
|
|
361
|
-
const isolatedNodes = nodes.filter((n) => isolatedIds.includes(n.id));
|
|
362
|
-
// Render in columns
|
|
363
|
-
const colWidth = 30;
|
|
364
|
-
const cols = Math.max(1, Math.floor(maxWidth / colWidth));
|
|
365
|
-
for (let i = 0; i < isolatedNodes.length; i += cols) {
|
|
366
|
-
const row = isolatedNodes.slice(i, i + cols);
|
|
367
|
-
const rowStr = row.map((n) => formatNode(n, colorize).padEnd(colWidth)).join('');
|
|
368
|
-
lines.push(` ${rowStr}`);
|
|
369
|
-
}
|
|
370
|
-
return lines;
|
|
371
|
-
}
|
|
372
|
-
function formatNode(node, colorize) {
|
|
373
|
-
const icon = getNodeIcon(node.type);
|
|
374
|
-
const label = node.label;
|
|
375
|
-
const childInfo = node.children !== undefined ? chalk.dim(` (${node.children})`) : '';
|
|
376
|
-
if (colorize) {
|
|
377
|
-
const color = getNodeColor(node.type);
|
|
378
|
-
return `${icon} ${color(label)}${childInfo}`;
|
|
379
|
-
}
|
|
380
|
-
return `${icon} ${label}${childInfo}`;
|
|
381
|
-
}
|
|
382
|
-
function getNodeIcon(type) {
|
|
383
|
-
switch (type) {
|
|
384
|
-
case 'component':
|
|
385
|
-
return '📦';
|
|
386
|
-
case 'module':
|
|
387
|
-
return '📄';
|
|
388
|
-
case 'function':
|
|
389
|
-
return '⚡';
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
function getNodeColor(type) {
|
|
393
|
-
switch (type) {
|
|
394
|
-
case 'component':
|
|
395
|
-
return chalk.cyan;
|
|
396
|
-
case 'module':
|
|
397
|
-
return chalk.yellow;
|
|
398
|
-
case 'function':
|
|
399
|
-
return chalk.green;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
function formatHeader(title, nodeCount, edgeCount, colorize) {
|
|
403
|
-
const levelTitles = {
|
|
404
|
-
components: 'Component Graph',
|
|
405
|
-
modules: 'Module Graph',
|
|
406
|
-
functions: 'Function Graph',
|
|
407
|
-
};
|
|
408
|
-
const displayTitle = levelTitles[title] || title;
|
|
409
|
-
if (nodeCount === 0 && edgeCount === 0) {
|
|
410
|
-
return colorize ? chalk.bold.cyan(`\n${displayTitle}\n`) : `\n${displayTitle}\n`;
|
|
411
|
-
}
|
|
412
|
-
const stats = `${nodeCount} nodes, ${edgeCount} edges`;
|
|
413
|
-
const header = `${displayTitle} (${stats})`;
|
|
414
|
-
return colorize ? chalk.bold.cyan(`\n${header}\n`) : `\n${header}\n`;
|
|
415
|
-
}
|
|
416
|
-
function formatSectionHeader(title, colorize) {
|
|
417
|
-
return colorize ? chalk.bold.underline(title) : title;
|
|
418
|
-
}
|
|
419
|
-
function formatModulePath(path) {
|
|
420
|
-
// Shorten long paths
|
|
421
|
-
const parts = path.split(/[/\\]/);
|
|
422
|
-
if (parts.length > 3) {
|
|
423
|
-
return `.../${parts.slice(-2).join('/')}`;
|
|
424
|
-
}
|
|
425
|
-
return path;
|
|
426
|
-
}
|
|
427
|
-
function formatFunctionName(fn) {
|
|
428
|
-
const kindIcon = fn.kind === 'method' ? '.' : fn.kind === 'arrow' ? '=>' : '';
|
|
429
|
-
return `${kindIcon}${fn.name}`;
|
|
430
|
-
}
|
|
431
|
-
//# sourceMappingURL=ascii-graph.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ascii-graph.js","sourceRoot":"","sources":["../../src/utils/ascii-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAwB1B,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;IACb,KAAK,EAAE,GAAG;IACV,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,GAAG;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAA0B,EAC1B,KAAgB,EAChB,UAA6B,EAAE;IAE/B,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,cAAc,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAE1E,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAE3D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,SAAS;IACT,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACtE,K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CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,kBAAkB,CAAC,EAAgB;IAC1C,MAAM,QAAQ,GAAG,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9E,OAAO,GAAG,QAAQ,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC"}
|
package/dist/utils/output.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const log: {
|
|
2
|
-
info: (message: string) => void;
|
|
3
|
-
success: (message: string) => void;
|
|
4
|
-
warning: (message: string) => void;
|
|
5
|
-
error: (message: string) => void;
|
|
6
|
-
title: (message: string) => void;
|
|
7
|
-
dim: (message: string) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare function formatNumber(n: number): string;
|
|
10
|
-
export declare function formatPath(p: string): string;
|
|
11
|
-
export declare function formatDiff(added: number, removed: number): string;
|
|
12
|
-
//# sourceMappingURL=output.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG;oBACE,MAAM;uBACH,MAAM;uBACN,MAAM;qBACR,MAAM;qBACN,MAAM;mBACR,MAAM;CACtB,CAAC;AAEF,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKjE"}
|
package/dist/utils/output.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
export const log = {
|
|
3
|
-
info: (message) => console.log(chalk.blue('ℹ'), message),
|
|
4
|
-
success: (message) => console.log(chalk.green('✓'), message),
|
|
5
|
-
warning: (message) => console.log(chalk.yellow('⚠'), message),
|
|
6
|
-
error: (message) => console.error(chalk.red('✗'), message),
|
|
7
|
-
title: (message) => console.log(chalk.bold.cyan(`\n${message}\n`)),
|
|
8
|
-
dim: (message) => console.log(chalk.dim(message)),
|
|
9
|
-
};
|
|
10
|
-
export function formatNumber(n) {
|
|
11
|
-
return n.toLocaleString();
|
|
12
|
-
}
|
|
13
|
-
export function formatPath(p) {
|
|
14
|
-
return chalk.underline(p);
|
|
15
|
-
}
|
|
16
|
-
export function formatDiff(added, removed) {
|
|
17
|
-
const parts = [];
|
|
18
|
-
if (added > 0)
|
|
19
|
-
parts.push(chalk.green(`+${added}`));
|
|
20
|
-
if (removed > 0)
|
|
21
|
-
parts.push(chalk.red(`-${removed}`));
|
|
22
|
-
return parts.join(' / ') || chalk.dim('no changes');
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=output.js.map
|
package/dist/utils/output.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAChE,OAAO,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE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