mapra 0.1.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/LICENSE +21 -0
- package/README.md +144 -0
- package/dist/analyzer/blast-radius.d.ts +27 -0
- package/dist/analyzer/blast-radius.d.ts.map +1 -0
- package/dist/analyzer/blast-radius.js +58 -0
- package/dist/analyzer/blast-radius.js.map +1 -0
- package/dist/analyzer/churn.d.ts +26 -0
- package/dist/analyzer/churn.d.ts.map +1 -0
- package/dist/analyzer/churn.js +96 -0
- package/dist/analyzer/churn.js.map +1 -0
- package/dist/analyzer/co-change.d.ts +60 -0
- package/dist/analyzer/co-change.d.ts.map +1 -0
- package/dist/analyzer/co-change.js +153 -0
- package/dist/analyzer/co-change.js.map +1 -0
- package/dist/analyzer/conventions.d.ts +22 -0
- package/dist/analyzer/conventions.d.ts.map +1 -0
- package/dist/analyzer/conventions.js +81 -0
- package/dist/analyzer/conventions.js.map +1 -0
- package/dist/analyzer/git-hash.d.ts +11 -0
- package/dist/analyzer/git-hash.d.ts.map +1 -0
- package/dist/analyzer/git-hash.js +25 -0
- package/dist/analyzer/git-hash.js.map +1 -0
- package/dist/analyzer/graph-utils.d.ts +46 -0
- package/dist/analyzer/graph-utils.d.ts.map +1 -0
- package/dist/analyzer/graph-utils.js +145 -0
- package/dist/analyzer/graph-utils.js.map +1 -0
- package/dist/analyzer/index.d.ts +34 -0
- package/dist/analyzer/index.d.ts.map +1 -0
- package/dist/analyzer/index.js +63 -0
- package/dist/analyzer/index.js.map +1 -0
- package/dist/cli/hooks.d.ts +24 -0
- package/dist/cli/hooks.d.ts.map +1 -0
- package/dist/cli/hooks.js +126 -0
- package/dist/cli/hooks.js.map +1 -0
- package/dist/cli/index.d.ts +18 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +818 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/plan-parser.d.ts +20 -0
- package/dist/cli/plan-parser.d.ts.map +1 -0
- package/dist/cli/plan-parser.js +104 -0
- package/dist/cli/plan-parser.js.map +1 -0
- package/dist/cli/shim.d.ts +3 -0
- package/dist/cli/shim.d.ts.map +1 -0
- package/dist/cli/shim.js +33 -0
- package/dist/cli/shim.js.map +1 -0
- package/dist/cli/templates.d.ts +28 -0
- package/dist/cli/templates.d.ts.map +1 -0
- package/dist/cli/templates.js +91 -0
- package/dist/cli/templates.js.map +1 -0
- package/dist/encoder/encode.d.ts +17 -0
- package/dist/encoder/encode.d.ts.map +1 -0
- package/dist/encoder/encode.js +270 -0
- package/dist/encoder/encode.js.map +1 -0
- package/dist/encoder/layer-infrastructure.d.ts +17 -0
- package/dist/encoder/layer-infrastructure.d.ts.map +1 -0
- package/dist/encoder/layer-infrastructure.js +232 -0
- package/dist/encoder/layer-infrastructure.js.map +1 -0
- package/dist/encoder/layer-labels.d.ts +18 -0
- package/dist/encoder/layer-labels.d.ts.map +1 -0
- package/dist/encoder/layer-labels.js +172 -0
- package/dist/encoder/layer-labels.js.map +1 -0
- package/dist/encoder/layer-terrain.d.ts +18 -0
- package/dist/encoder/layer-terrain.d.ts.map +1 -0
- package/dist/encoder/layer-terrain.js +135 -0
- package/dist/encoder/layer-terrain.js.map +1 -0
- package/dist/encoder/layout.d.ts +53 -0
- package/dist/encoder/layout.d.ts.map +1 -0
- package/dist/encoder/layout.js +178 -0
- package/dist/encoder/layout.js.map +1 -0
- package/dist/encoder/parse-strand-header.d.ts +29 -0
- package/dist/encoder/parse-strand-header.d.ts.map +1 -0
- package/dist/encoder/parse-strand-header.js +59 -0
- package/dist/encoder/parse-strand-header.js.map +1 -0
- package/dist/encoder/spatial-text-encode.d.ts +22 -0
- package/dist/encoder/spatial-text-encode.d.ts.map +1 -0
- package/dist/encoder/spatial-text-encode.js +199 -0
- package/dist/encoder/spatial-text-encode.js.map +1 -0
- package/dist/encoder/strand-format-encode-v1.d.ts +16 -0
- package/dist/encoder/strand-format-encode-v1.d.ts.map +1 -0
- package/dist/encoder/strand-format-encode-v1.js +296 -0
- package/dist/encoder/strand-format-encode-v1.js.map +1 -0
- package/dist/encoder/strand-format-encode.d.ts +21 -0
- package/dist/encoder/strand-format-encode.d.ts.map +1 -0
- package/dist/encoder/strand-format-encode.js +562 -0
- package/dist/encoder/strand-format-encode.js.map +1 -0
- package/dist/encoder/text-encode.d.ts +13 -0
- package/dist/encoder/text-encode.d.ts.map +1 -0
- package/dist/encoder/text-encode.js +123 -0
- package/dist/encoder/text-encode.js.map +1 -0
- package/dist/query/blast-radius.d.ts +14 -0
- package/dist/query/blast-radius.d.ts.map +1 -0
- package/dist/query/blast-radius.js +81 -0
- package/dist/query/blast-radius.js.map +1 -0
- package/dist/query/cache.d.ts +29 -0
- package/dist/query/cache.d.ts.map +1 -0
- package/dist/query/cache.js +138 -0
- package/dist/query/cache.js.map +1 -0
- package/dist/query/index.d.ts +2 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +46 -0
- package/dist/query/index.js.map +1 -0
- package/dist/query/resolve.d.ts +7 -0
- package/dist/query/resolve.d.ts.map +1 -0
- package/dist/query/resolve.js +24 -0
- package/dist/query/resolve.js.map +1 -0
- package/dist/query/risk-profile.d.ts +30 -0
- package/dist/query/risk-profile.d.ts.map +1 -0
- package/dist/query/risk-profile.js +94 -0
- package/dist/query/risk-profile.js.map +1 -0
- package/dist/query/test-map.d.ts +13 -0
- package/dist/query/test-map.d.ts.map +1 -0
- package/dist/query/test-map.js +43 -0
- package/dist/query/test-map.js.map +1 -0
- package/dist/scanner/index.d.ts +51 -0
- package/dist/scanner/index.d.ts.map +1 -0
- package/dist/scanner/index.js +480 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/scanner/workspace.d.ts +11 -0
- package/dist/scanner/workspace.d.ts.map +1 -0
- package/dist/scanner/workspace.js +243 -0
- package/dist/scanner/workspace.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .mapra Header Parser — extracts metadata from the MAPRA header line.
|
|
3
|
+
*
|
|
4
|
+
* Parses headers like:
|
|
5
|
+
* MAPRA v3 | project | Typescript | 76 files | 12,629 lines | generated 2026-03-07T05:21:49 | git:f9e429a
|
|
6
|
+
* MAPRA v3 | project | Typescript | 76 files | 12,629 lines | generated 2026-03-07T05:21:49
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Parse a .mapra file's header line and extract structured metadata.
|
|
10
|
+
* Returns null if the content doesn't contain a valid MAPRA header.
|
|
11
|
+
*/
|
|
12
|
+
export function parseStrandHeader(content) {
|
|
13
|
+
// Take only the first line
|
|
14
|
+
const firstLine = content.split("\n")[0];
|
|
15
|
+
if (!firstLine || !firstLine.startsWith("MAPRA "))
|
|
16
|
+
return null;
|
|
17
|
+
// Split on " | " to get segments
|
|
18
|
+
const segments = firstLine.split(" | ");
|
|
19
|
+
if (segments.length < 6)
|
|
20
|
+
return null;
|
|
21
|
+
// Segment 0: "MAPRA v3"
|
|
22
|
+
const versionMatch = segments[0]?.match(/^MAPRA\s+(v\d+)$/);
|
|
23
|
+
if (!versionMatch)
|
|
24
|
+
return null;
|
|
25
|
+
const version = versionMatch[1];
|
|
26
|
+
// Segment 1: project name
|
|
27
|
+
const projectName = segments[1]?.trim() ?? "";
|
|
28
|
+
// Segment 2: framework/language
|
|
29
|
+
const framework = segments[2]?.trim() ?? "";
|
|
30
|
+
// Segment 3: "76 files"
|
|
31
|
+
const fileMatch = segments[3]?.match(/^([\d,]+)\s+files?$/);
|
|
32
|
+
const fileCount = fileMatch ? parseInt(fileMatch[1].replace(/,/g, ""), 10) : 0;
|
|
33
|
+
// Segment 4: "12,629 lines"
|
|
34
|
+
const lineMatch = segments[4]?.match(/^([\d,]+)\s+lines?$/);
|
|
35
|
+
const lineCount = lineMatch ? parseInt(lineMatch[1].replace(/,/g, ""), 10) : 0;
|
|
36
|
+
// Segment 5: "generated 2026-03-07T05:21:49"
|
|
37
|
+
const tsMatch = segments[5]?.match(/^generated\s+(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})$/);
|
|
38
|
+
if (!tsMatch)
|
|
39
|
+
return null;
|
|
40
|
+
const timestamp = tsMatch[1];
|
|
41
|
+
// Segment 6 (optional): "git:f9e429a"
|
|
42
|
+
let gitHash = null;
|
|
43
|
+
if (segments.length >= 7) {
|
|
44
|
+
const gitMatch = segments[6]?.match(/^git:([a-f0-9]+)$/);
|
|
45
|
+
if (gitMatch) {
|
|
46
|
+
gitHash = gitMatch[1];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
version,
|
|
51
|
+
projectName,
|
|
52
|
+
framework,
|
|
53
|
+
fileCount,
|
|
54
|
+
lineCount,
|
|
55
|
+
timestamp,
|
|
56
|
+
gitHash,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=parse-strand-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-strand-header.js","sourceRoot":"","sources":["../../src/encoder/parse-strand-header.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmBH;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,2BAA2B;IAC3B,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/D,iCAAiC;IACjC,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAErC,wBAAwB;IACxB,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC5D,IAAI,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;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,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO;QACP,WAAW;QACX,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spatial Text Encoder — structured text with @(x,y) coordinate annotations
|
|
3
|
+
*
|
|
4
|
+
* Hypothesis: LLMs can reason about 2D proximity from coordinate numbers
|
|
5
|
+
* ("these two nodes at (280,180) and (290,195) are close together")
|
|
6
|
+
* without needing an actual image.
|
|
7
|
+
*
|
|
8
|
+
* Uses the same layout engine as the PNG layers — identical coordinates.
|
|
9
|
+
* Same section structure as text-encode.ts, enhanced with position tags.
|
|
10
|
+
*/
|
|
11
|
+
import type { StrandGraph } from "../scanner/index.js";
|
|
12
|
+
import { type CanvasLayout } from "./layout.js";
|
|
13
|
+
/**
|
|
14
|
+
* Generate spatial text encoding with @(x,y) annotations.
|
|
15
|
+
* Accepts a pre-computed layout for consistency with other encoders.
|
|
16
|
+
*/
|
|
17
|
+
export declare function encodeSpatialTextFromLayout(layout: CanvasLayout, graph: StrandGraph): string;
|
|
18
|
+
/**
|
|
19
|
+
* Generate spatial text encoding, computing layout internally.
|
|
20
|
+
*/
|
|
21
|
+
export declare function encodeSpatialText(graph: StrandGraph): string;
|
|
22
|
+
//# sourceMappingURL=spatial-text-encode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-text-encode.d.ts","sourceRoot":"","sources":["../../src/encoder/spatial-text-encode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,WAAW,GACjB,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAG5D"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spatial Text Encoder — structured text with @(x,y) coordinate annotations
|
|
3
|
+
*
|
|
4
|
+
* Hypothesis: LLMs can reason about 2D proximity from coordinate numbers
|
|
5
|
+
* ("these two nodes at (280,180) and (290,195) are close together")
|
|
6
|
+
* without needing an actual image.
|
|
7
|
+
*
|
|
8
|
+
* Uses the same layout engine as the PNG layers — identical coordinates.
|
|
9
|
+
* Same section structure as text-encode.ts, enhanced with position tags.
|
|
10
|
+
*/
|
|
11
|
+
import { computeLayout, } from "./layout.js";
|
|
12
|
+
/**
|
|
13
|
+
* Generate spatial text encoding with @(x,y) annotations.
|
|
14
|
+
* Accepts a pre-computed layout for consistency with other encoders.
|
|
15
|
+
*/
|
|
16
|
+
export function encodeSpatialTextFromLayout(layout, graph) {
|
|
17
|
+
return renderSpatialText(layout, graph);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Generate spatial text encoding, computing layout internally.
|
|
21
|
+
*/
|
|
22
|
+
export function encodeSpatialText(graph) {
|
|
23
|
+
const layout = computeLayout(graph);
|
|
24
|
+
return renderSpatialText(layout, graph);
|
|
25
|
+
}
|
|
26
|
+
function renderSpatialText(layout, graph) {
|
|
27
|
+
let text = "";
|
|
28
|
+
// Header with canvas dimensions
|
|
29
|
+
text += `# ${graph.projectName} — Spatial Encoding\n`;
|
|
30
|
+
text += `# Canvas: ${layout.width}×${layout.height} | ${graph.totalFiles} files | ${graph.totalLines.toLocaleString()} lines | ${graph.modules.length} modules\n`;
|
|
31
|
+
text += `# Positions encode spatial layout — nearby coordinates = related code\n\n`;
|
|
32
|
+
// Modules with @(x,y) and dimensions
|
|
33
|
+
text += `## Modules\n`;
|
|
34
|
+
for (const mod of layout.modules.sort((a, b) => b.totalLines - a.totalLines)) {
|
|
35
|
+
const entryCount = graph.modules.find((m) => m.id === mod.id)?.entryPoints.length ?? 0;
|
|
36
|
+
const modBoundary = graph.modules.find((m) => m.id === mod.id);
|
|
37
|
+
const modPath = modBoundary?.path ?? mod.id;
|
|
38
|
+
text += `- ${mod.name} (${modPath}) @(${Math.round(mod.x)},${Math.round(mod.y)}) ${Math.round(mod.width)}×${Math.round(mod.height)}: ${mod.nodes.length} files, ${mod.totalLines.toLocaleString()} lines [complexity: ${mod.avgComplexity.toFixed(2)}]`;
|
|
39
|
+
if (entryCount > 0)
|
|
40
|
+
text += ` [${entryCount} entry points]`;
|
|
41
|
+
text += `\n`;
|
|
42
|
+
}
|
|
43
|
+
// API Routes with @(x,y)
|
|
44
|
+
const apiRoutes = graph.nodes
|
|
45
|
+
.filter((n) => n.type === "api-route")
|
|
46
|
+
.sort((a, b) => b.complexity - a.complexity);
|
|
47
|
+
if (apiRoutes.length > 0) {
|
|
48
|
+
text += `\n## API Routes (${apiRoutes.length})\n`;
|
|
49
|
+
for (const route of apiRoutes) {
|
|
50
|
+
const methods = route.framework?.metadata?.methods?.join(", ") || "?";
|
|
51
|
+
const routePath = route.framework?.metadata?.routePath ||
|
|
52
|
+
route.path;
|
|
53
|
+
const layoutNode = layout.nodes.get(route.id);
|
|
54
|
+
const pos = layoutNode
|
|
55
|
+
? ` @(${Math.round(layoutNode.x)},${Math.round(layoutNode.y)})`
|
|
56
|
+
: "";
|
|
57
|
+
text += `- ${methods} ${routePath}${pos} ${route.lines}L complexity:${route.complexity.toFixed(2)}`;
|
|
58
|
+
if (route.imports.length > 8)
|
|
59
|
+
text += ` — ${route.imports.length} imports`;
|
|
60
|
+
text += `\n`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Pages with @(x,y)
|
|
64
|
+
const pages = graph.nodes
|
|
65
|
+
.filter((n) => n.type === "route")
|
|
66
|
+
.sort((a, b) => b.complexity - a.complexity);
|
|
67
|
+
if (pages.length > 0) {
|
|
68
|
+
text += `\n## Pages (${pages.length})\n`;
|
|
69
|
+
for (const page of pages) {
|
|
70
|
+
const routePath = page.framework?.metadata?.routePath ||
|
|
71
|
+
page.path;
|
|
72
|
+
const client = page.framework?.metadata?.isClientComponent
|
|
73
|
+
? " [client]"
|
|
74
|
+
: "";
|
|
75
|
+
const layoutNode = layout.nodes.get(page.id);
|
|
76
|
+
const pos = layoutNode
|
|
77
|
+
? ` @(${Math.round(layoutNode.x)},${Math.round(layoutNode.y)})`
|
|
78
|
+
: "";
|
|
79
|
+
text += `- ${routePath}${client}${pos} ${page.lines}L complexity:${page.complexity.toFixed(2)}\n`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Components (top 20) with @(x,y)
|
|
83
|
+
const components = graph.nodes.filter((n) => n.type === "component");
|
|
84
|
+
if (components.length > 0) {
|
|
85
|
+
text += `\n## Components (${components.length})\n`;
|
|
86
|
+
for (const comp of components
|
|
87
|
+
.sort((a, b) => b.complexity - a.complexity)
|
|
88
|
+
.slice(0, 20)) {
|
|
89
|
+
const layoutNode = layout.nodes.get(comp.id);
|
|
90
|
+
const pos = layoutNode
|
|
91
|
+
? ` @(${Math.round(layoutNode.x)},${Math.round(layoutNode.y)})`
|
|
92
|
+
: "";
|
|
93
|
+
text += `- ${comp.name}${pos} ${comp.lines}L complexity:${comp.complexity.toFixed(2)}\n`;
|
|
94
|
+
}
|
|
95
|
+
if (components.length > 20) {
|
|
96
|
+
text += ` ... and ${components.length - 20} more\n`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Inter-module flows with from/to coordinates
|
|
100
|
+
text += `\n## Flows (inter-module edges)\n`;
|
|
101
|
+
const moduleEdges = aggregateModuleEdges(layout, graph);
|
|
102
|
+
for (const edge of moduleEdges) {
|
|
103
|
+
const lineStyle = edge.count >= 10 ? "═══" : edge.count >= 5 ? "───" : "···";
|
|
104
|
+
const categories = Object.entries(edge.categories)
|
|
105
|
+
.sort((a, b) => b[1] - a[1])
|
|
106
|
+
.map(([cat, count]) => `${cat}:${count}`)
|
|
107
|
+
.join(" ");
|
|
108
|
+
text += `- ${edge.fromName} @(${edge.fromX},${edge.fromY}) ${lineStyle}> ${edge.toName} @(${edge.toX},${edge.toY}): ${edge.count} edges [${categories}]\n`;
|
|
109
|
+
}
|
|
110
|
+
// Complexity hotspots with @(x,y)
|
|
111
|
+
const complex = graph.nodes
|
|
112
|
+
.filter((n) => n.type !== "test" && n.type !== "config")
|
|
113
|
+
.sort((a, b) => b.complexity - a.complexity)
|
|
114
|
+
.slice(0, 10);
|
|
115
|
+
text += `\n## Complexity Hotspots\n`;
|
|
116
|
+
for (const node of complex) {
|
|
117
|
+
const layoutNode = layout.nodes.get(node.id);
|
|
118
|
+
const pos = layoutNode
|
|
119
|
+
? `@(${Math.round(layoutNode.x)},${Math.round(layoutNode.y)}) `
|
|
120
|
+
: "";
|
|
121
|
+
text += `- ${pos}${node.path} — ${node.lines}L, ${node.imports.length} imports\n`;
|
|
122
|
+
}
|
|
123
|
+
// Most depended-on files with @(x,y)
|
|
124
|
+
const edgeCounts = new Map();
|
|
125
|
+
for (const edge of graph.edges) {
|
|
126
|
+
edgeCounts.set(edge.to, (edgeCounts.get(edge.to) || 0) + 1);
|
|
127
|
+
}
|
|
128
|
+
const mostImported = [...edgeCounts.entries()]
|
|
129
|
+
.sort((a, b) => b[1] - a[1])
|
|
130
|
+
.slice(0, 10);
|
|
131
|
+
if (mostImported.length > 0) {
|
|
132
|
+
text += `\n## Most Depended-On\n`;
|
|
133
|
+
for (const [fileId, count] of mostImported) {
|
|
134
|
+
const layoutNode = layout.nodes.get(fileId);
|
|
135
|
+
const pos = layoutNode
|
|
136
|
+
? ` @(${Math.round(layoutNode.x)},${Math.round(layoutNode.y)})`
|
|
137
|
+
: "";
|
|
138
|
+
text += `- ${fileId}${pos} — imported by ${count}\n`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// Test coverage
|
|
142
|
+
const testEdges = graph.edges.filter((e) => e.type === "tests");
|
|
143
|
+
const testedFiles = new Set(testEdges.map((e) => e.to));
|
|
144
|
+
const testableFiles = graph.nodes.filter((n) => n.type !== "test" && n.type !== "config");
|
|
145
|
+
const coveragePercent = testableFiles.length > 0
|
|
146
|
+
? ((testedFiles.size / testableFiles.length) * 100).toFixed(1)
|
|
147
|
+
: "0";
|
|
148
|
+
text += `\n## Test Coverage\n`;
|
|
149
|
+
text += `${testEdges.length} test files | ${testedFiles.size}/${testableFiles.length} testable files with direct test edges (${coveragePercent}%)\n`;
|
|
150
|
+
return text;
|
|
151
|
+
}
|
|
152
|
+
function aggregateModuleEdges(layout, graph) {
|
|
153
|
+
const modMap = new Map(layout.modules.map((m) => [m.id, m]));
|
|
154
|
+
const edgeMap = new Map();
|
|
155
|
+
for (const edge of graph.edges) {
|
|
156
|
+
const fromNode = layout.nodes.get(edge.from);
|
|
157
|
+
const toNode = layout.nodes.get(edge.to);
|
|
158
|
+
if (!fromNode || !toNode)
|
|
159
|
+
continue;
|
|
160
|
+
if (fromNode.moduleId === toNode.moduleId)
|
|
161
|
+
continue;
|
|
162
|
+
const key = `${fromNode.moduleId}->${toNode.moduleId}`;
|
|
163
|
+
if (!edgeMap.has(key)) {
|
|
164
|
+
const fromMod = modMap.get(fromNode.moduleId);
|
|
165
|
+
const toMod = modMap.get(toNode.moduleId);
|
|
166
|
+
if (!fromMod || !toMod)
|
|
167
|
+
continue;
|
|
168
|
+
edgeMap.set(key, {
|
|
169
|
+
fromName: fromMod.name,
|
|
170
|
+
fromX: Math.round(fromMod.x),
|
|
171
|
+
fromY: Math.round(fromMod.y),
|
|
172
|
+
toName: toMod.name,
|
|
173
|
+
toX: Math.round(toMod.x),
|
|
174
|
+
toY: Math.round(toMod.y),
|
|
175
|
+
count: 0,
|
|
176
|
+
categories: {},
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
const agg = edgeMap.get(key);
|
|
180
|
+
agg.count++;
|
|
181
|
+
// Classify the edge
|
|
182
|
+
const category = classifyEdge(edge.from, edge.to);
|
|
183
|
+
agg.categories[category] = (agg.categories[category] || 0) + 1;
|
|
184
|
+
}
|
|
185
|
+
return [...edgeMap.values()].sort((a, b) => b.count - a.count);
|
|
186
|
+
}
|
|
187
|
+
function classifyEdge(fromPath, toPath) {
|
|
188
|
+
const combined = fromPath + " " + toPath;
|
|
189
|
+
if (/auth|session|login|magic-link|trusted-device|verify/.test(combined))
|
|
190
|
+
return "auth";
|
|
191
|
+
if (/payment|authorize|order|cart|price|tip/.test(combined))
|
|
192
|
+
return "payment";
|
|
193
|
+
if (/test|spec|__tests__/.test(combined))
|
|
194
|
+
return "test";
|
|
195
|
+
if (/component|page|layout|\.tsx$/.test(combined))
|
|
196
|
+
return "rendering";
|
|
197
|
+
return "data";
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=spatial-text-encode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-text-encode.js","sourceRoot":"","sources":["../../src/encoder/spatial-text-encode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,aAAa,GAGd,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,MAAoB,EACpB,KAAkB;IAElB,OAAO,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAkB;IAClD,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAoB,EAAE,KAAkB;IACjE,IAAI,IAAI,GAAG,EAAE,CAAC;IAEd,gCAAgC;IAChC,IAAI,IAAI,KAAK,KAAK,CAAC,WAAW,uBAAuB,CAAC;IACtD,IAAI,IA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,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;QAC9B,GAAG,CAAC,KAAK,EAAE,CAAC;QAEZ,oBAAoB;QACpB,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAClD,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,YAAY,CAAC,QAAgB,EAAE,MAAc;IACpD,MAAM,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,MAAM,CAAC;IACzC,IAAI,qDAAqD,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtE,OAAO,MAAM,CAAC;IAChB,IAAI,wCAAwC,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAC;IAC9E,IAAI,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,MAAM,CAAC;IACxD,IAAI,8BAA8B,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,WAAW,CAAC;IACtE,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .strand Format Encoder — ASCII art + structured data
|
|
3
|
+
*
|
|
4
|
+
* A custom format using Unicode block chars for visual heatmaps
|
|
5
|
+
* and box-drawing chars for dependency flows. No coordinates —
|
|
6
|
+
* spatial relationships conveyed through grouping and visual density.
|
|
7
|
+
*
|
|
8
|
+
* Target: < 3KB total output.
|
|
9
|
+
*/
|
|
10
|
+
import type { StrandGraph } from "../scanner/index.js";
|
|
11
|
+
/**
|
|
12
|
+
* Generate a .strand format encoding of the codebase.
|
|
13
|
+
* Does NOT use the layout engine — no coordinates needed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function encodeToStrandFormatV1(graph: StrandGraph): string;
|
|
16
|
+
//# sourceMappingURL=strand-format-encode-v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strand-format-encode-v1.d.ts","sourceRoot":"","sources":["../../src/encoder/strand-format-encode-v1.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,qBAAqB,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CA4BjE"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .strand Format Encoder — ASCII art + structured data
|
|
3
|
+
*
|
|
4
|
+
* A custom format using Unicode block chars for visual heatmaps
|
|
5
|
+
* and box-drawing chars for dependency flows. No coordinates —
|
|
6
|
+
* spatial relationships conveyed through grouping and visual density.
|
|
7
|
+
*
|
|
8
|
+
* Target: < 3KB total output.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Generate a .strand format encoding of the codebase.
|
|
12
|
+
* Does NOT use the layout engine — no coordinates needed.
|
|
13
|
+
*/
|
|
14
|
+
export function encodeToStrandFormatV1(graph) {
|
|
15
|
+
let out = "";
|
|
16
|
+
// Header
|
|
17
|
+
out += `STRAND v1 | ${graph.projectName} | ${capitalize(graph.framework)} | ${graph.totalFiles} files | ${graph.totalLines.toLocaleString()} lines\n\n`;
|
|
18
|
+
// TERRAIN section — complexity heatmap
|
|
19
|
+
out += renderTerrain(graph);
|
|
20
|
+
// INFRASTRUCTURE section — inter-module dependency roads
|
|
21
|
+
out += renderInfrastructure(graph);
|
|
22
|
+
// API ROUTES section
|
|
23
|
+
out += renderApiRoutes(graph);
|
|
24
|
+
// PAGES section
|
|
25
|
+
out += renderPages(graph);
|
|
26
|
+
// HOTSPOTS section
|
|
27
|
+
out += renderHotspots(graph);
|
|
28
|
+
// MOST IMPORTED section
|
|
29
|
+
out += renderMostImported(graph);
|
|
30
|
+
// TEST COVERAGE section
|
|
31
|
+
out += renderTestCoverage(graph);
|
|
32
|
+
return out;
|
|
33
|
+
}
|
|
34
|
+
function renderTerrain(graph) {
|
|
35
|
+
let out = `─── TERRAIN ─────────────────────────────────────────────\n`;
|
|
36
|
+
out += `Module complexity heatmap (█=high ▓=mid ░=low ·=minimal)\n\n`;
|
|
37
|
+
// Sort modules by total lines (most significant first)
|
|
38
|
+
const modules = graph.modules
|
|
39
|
+
.filter((m) => m.nodeCount > 0)
|
|
40
|
+
.sort((a, b) => b.totalLines - a.totalLines);
|
|
41
|
+
// Calculate avg complexity per module
|
|
42
|
+
const moduleComplexities = new Map();
|
|
43
|
+
for (const mod of modules) {
|
|
44
|
+
const modNodes = graph.nodes.filter((n) => {
|
|
45
|
+
const parts = n.path.split("/");
|
|
46
|
+
const key = parts.length > 2 ? parts.slice(0, 2).join("/") : parts[0];
|
|
47
|
+
return key === mod.id;
|
|
48
|
+
});
|
|
49
|
+
const avg = modNodes.length > 0
|
|
50
|
+
? modNodes.reduce((sum, n) => sum + n.complexity, 0) / modNodes.length
|
|
51
|
+
: 0;
|
|
52
|
+
moduleComplexities.set(mod.id, avg);
|
|
53
|
+
}
|
|
54
|
+
const BAR_WIDTH = 10;
|
|
55
|
+
for (const mod of modules) {
|
|
56
|
+
const complexity = moduleComplexities.get(mod.id) ?? 0;
|
|
57
|
+
const bar = complexityBar(complexity, BAR_WIDTH);
|
|
58
|
+
const name = mod.name.padEnd(14);
|
|
59
|
+
const cStr = complexity.toFixed(2);
|
|
60
|
+
const files = `${mod.nodeCount} files`.padStart(9);
|
|
61
|
+
const lines = `${mod.totalLines.toLocaleString()}L`.padStart(8);
|
|
62
|
+
// Brief description based on path
|
|
63
|
+
const desc = moduleDescription(mod.path, graph);
|
|
64
|
+
out += `${bar} ${name} ${cStr} ${files} ${lines} ${desc}\n`;
|
|
65
|
+
}
|
|
66
|
+
out += `\n`;
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
function renderInfrastructure(graph) {
|
|
70
|
+
let out = `─── INFRASTRUCTURE ──────────────────────────────────────\n`;
|
|
71
|
+
out += `Inter-module dependency roads\n\n`;
|
|
72
|
+
// Aggregate edges between modules
|
|
73
|
+
const moduleEdges = new Map();
|
|
74
|
+
for (const edge of graph.edges) {
|
|
75
|
+
const fromMod = getModuleId(edge.from);
|
|
76
|
+
const toMod = getModuleId(edge.to);
|
|
77
|
+
if (fromMod === toMod)
|
|
78
|
+
continue;
|
|
79
|
+
const key = `${fromMod}->${toMod}`;
|
|
80
|
+
if (!moduleEdges.has(key)) {
|
|
81
|
+
moduleEdges.set(key, { count: 0, categories: {} });
|
|
82
|
+
}
|
|
83
|
+
const agg = moduleEdges.get(key);
|
|
84
|
+
agg.count++;
|
|
85
|
+
const cat = classifyEdge(edge.from, edge.to);
|
|
86
|
+
agg.categories[cat] = (agg.categories[cat] || 0) + 1;
|
|
87
|
+
}
|
|
88
|
+
// Sort by count, show top edges
|
|
89
|
+
const sorted = [...moduleEdges.entries()]
|
|
90
|
+
.sort((a, b) => b[1].count - a[1].count)
|
|
91
|
+
.slice(0, 10);
|
|
92
|
+
for (const [key, data] of sorted) {
|
|
93
|
+
const [from, to] = key.split("->");
|
|
94
|
+
const fromName = from.split("/").pop() ?? from;
|
|
95
|
+
const toName = to.split("/").pop() ?? to;
|
|
96
|
+
// Visual line style based on coupling strength
|
|
97
|
+
const line = data.count >= 10 ? "═══════" : data.count >= 5 ? "───────" : "·······";
|
|
98
|
+
const connector = "╢";
|
|
99
|
+
const categories = Object.entries(data.categories)
|
|
100
|
+
.sort((a, b) => b[1] - a[1])
|
|
101
|
+
.map(([cat, count]) => `${cat}:${count}`)
|
|
102
|
+
.join(" ");
|
|
103
|
+
out += `${fromName.padEnd(12)} ${line}${connector} ${toName.padEnd(14)} ×${data.count.toString().padStart(2)} ${categories}\n`;
|
|
104
|
+
}
|
|
105
|
+
out += `\n`;
|
|
106
|
+
return out;
|
|
107
|
+
}
|
|
108
|
+
function renderApiRoutes(graph) {
|
|
109
|
+
const apiRoutes = graph.nodes
|
|
110
|
+
.filter((n) => n.type === "api-route")
|
|
111
|
+
.sort((a, b) => b.complexity - a.complexity);
|
|
112
|
+
if (apiRoutes.length === 0)
|
|
113
|
+
return "";
|
|
114
|
+
let out = `─── API ROUTES (${apiRoutes.length}) ─────────────────────────────────\n`;
|
|
115
|
+
const showCount = Math.min(apiRoutes.length, 12);
|
|
116
|
+
for (let i = 0; i < showCount; i++) {
|
|
117
|
+
const route = apiRoutes[i];
|
|
118
|
+
const methods = route.framework?.metadata?.methods?.join(",") || "?";
|
|
119
|
+
const routePath = route.framework?.metadata?.routePath ||
|
|
120
|
+
route.path;
|
|
121
|
+
const lines = `${route.lines}L`.padStart(5);
|
|
122
|
+
const complexity = route.complexity.toFixed(2);
|
|
123
|
+
// Annotation for key routes
|
|
124
|
+
let annotation = "";
|
|
125
|
+
if (route.complexity > 0.8)
|
|
126
|
+
annotation = " ← payment+POS hub";
|
|
127
|
+
else if (routePath.includes("cancel"))
|
|
128
|
+
annotation = " ← void flow";
|
|
129
|
+
else if (routePath.includes("register"))
|
|
130
|
+
annotation = "";
|
|
131
|
+
else if (routePath.includes("magic-link"))
|
|
132
|
+
annotation = "";
|
|
133
|
+
out += `${methods.padEnd(18)} ${routePath.padEnd(44)} ${lines} ${complexity}${annotation}\n`;
|
|
134
|
+
}
|
|
135
|
+
if (apiRoutes.length > showCount) {
|
|
136
|
+
out += ` ... +${apiRoutes.length - showCount} more routes\n`;
|
|
137
|
+
}
|
|
138
|
+
out += `\n`;
|
|
139
|
+
return out;
|
|
140
|
+
}
|
|
141
|
+
function renderPages(graph) {
|
|
142
|
+
const pages = graph.nodes
|
|
143
|
+
.filter((n) => n.type === "route")
|
|
144
|
+
.sort((a, b) => b.complexity - a.complexity);
|
|
145
|
+
if (pages.length === 0)
|
|
146
|
+
return "";
|
|
147
|
+
let out = `─── PAGES (${pages.length}) ──────────────────────────────────────────\n`;
|
|
148
|
+
const showCount = Math.min(pages.length, 10);
|
|
149
|
+
for (let i = 0; i < showCount; i++) {
|
|
150
|
+
const page = pages[i];
|
|
151
|
+
const routePath = page.framework?.metadata?.routePath ||
|
|
152
|
+
page.path;
|
|
153
|
+
const client = page.framework?.metadata
|
|
154
|
+
?.isClientComponent
|
|
155
|
+
? " [client]"
|
|
156
|
+
: "";
|
|
157
|
+
const lines = `${page.lines}L`.padStart(5);
|
|
158
|
+
const complexity = page.complexity.toFixed(2);
|
|
159
|
+
let annotation = "";
|
|
160
|
+
if (routePath === "/")
|
|
161
|
+
annotation = " homepage";
|
|
162
|
+
else if (routePath.includes("order/review"))
|
|
163
|
+
annotation = " ← payment UI";
|
|
164
|
+
out += `${(routePath + client).padEnd(40)} ${lines} ${complexity}${annotation}\n`;
|
|
165
|
+
}
|
|
166
|
+
if (pages.length > showCount) {
|
|
167
|
+
out += ` ... +${pages.length - showCount} more pages\n`;
|
|
168
|
+
}
|
|
169
|
+
out += `\n`;
|
|
170
|
+
return out;
|
|
171
|
+
}
|
|
172
|
+
function renderHotspots(graph) {
|
|
173
|
+
const complex = graph.nodes
|
|
174
|
+
.filter((n) => n.type !== "test" && n.type !== "config" && n.complexity > 0.3)
|
|
175
|
+
.sort((a, b) => b.complexity - a.complexity)
|
|
176
|
+
.slice(0, 10);
|
|
177
|
+
if (complex.length === 0)
|
|
178
|
+
return "";
|
|
179
|
+
let out = `─── HOTSPOTS (complexity > 0.3) ─────────────────────────\n`;
|
|
180
|
+
for (const node of complex) {
|
|
181
|
+
const methods = node.type === "api-route"
|
|
182
|
+
? (node.framework?.metadata?.methods?.join(",") ?? "")
|
|
183
|
+
: "";
|
|
184
|
+
const client = node.type === "route" &&
|
|
185
|
+
node.framework?.metadata
|
|
186
|
+
?.isClientComponent
|
|
187
|
+
? "[client]"
|
|
188
|
+
: "";
|
|
189
|
+
const suffix = [methods, client].filter(Boolean).join(" ");
|
|
190
|
+
out += `${node.complexity.toFixed(2)} ${node.path.padEnd(52)} ${String(node.lines).padStart(4)}L ${String(node.imports.length).padStart(2)}imp ${suffix}\n`;
|
|
191
|
+
}
|
|
192
|
+
out += `\n`;
|
|
193
|
+
return out;
|
|
194
|
+
}
|
|
195
|
+
function renderMostImported(graph) {
|
|
196
|
+
const edgeCounts = new Map();
|
|
197
|
+
for (const edge of graph.edges) {
|
|
198
|
+
edgeCounts.set(edge.to, (edgeCounts.get(edge.to) || 0) + 1);
|
|
199
|
+
}
|
|
200
|
+
const mostImported = [...edgeCounts.entries()]
|
|
201
|
+
.sort((a, b) => b[1] - a[1])
|
|
202
|
+
.slice(0, 8);
|
|
203
|
+
if (mostImported.length === 0)
|
|
204
|
+
return "";
|
|
205
|
+
let out = `─── MOST IMPORTED ───────────────────────────────────────\n`;
|
|
206
|
+
for (const [fileId, count] of mostImported) {
|
|
207
|
+
out += `×${count} ${fileId}\n`;
|
|
208
|
+
}
|
|
209
|
+
out += `\n`;
|
|
210
|
+
return out;
|
|
211
|
+
}
|
|
212
|
+
function renderTestCoverage(graph) {
|
|
213
|
+
const testNodes = graph.nodes.filter((n) => n.type === "test");
|
|
214
|
+
const testEdges = graph.edges.filter((e) => e.type === "tests");
|
|
215
|
+
const testedFiles = new Set(testEdges.map((e) => e.to));
|
|
216
|
+
const testableFiles = graph.nodes.filter((n) => n.type !== "test" && n.type !== "config");
|
|
217
|
+
const coveragePercent = testableFiles.length > 0
|
|
218
|
+
? ((testedFiles.size / testableFiles.length) * 100).toFixed(1)
|
|
219
|
+
: "0";
|
|
220
|
+
let out = `─── TEST COVERAGE ───────────────────────────────────────\n`;
|
|
221
|
+
out += `${testNodes.length} test files | ${testedFiles.size}/${testableFiles.length} testable files with direct test edges (${coveragePercent}%)\n`;
|
|
222
|
+
return out;
|
|
223
|
+
}
|
|
224
|
+
// ─── Helpers ────────────────────────────────────────────
|
|
225
|
+
/**
|
|
226
|
+
* Generate a 10-char complexity bar using Unicode block chars.
|
|
227
|
+
* █ = high (0.7-1.0), ▓ = mid (0.4-0.7), ░ = low (0.15-0.4), · = minimal (0-0.15)
|
|
228
|
+
*/
|
|
229
|
+
function complexityBar(complexity, width) {
|
|
230
|
+
const filled = Math.round(complexity * width);
|
|
231
|
+
let bar = "";
|
|
232
|
+
for (let i = 0; i < width; i++) {
|
|
233
|
+
if (i < filled) {
|
|
234
|
+
// Determine char based on position relative to complexity
|
|
235
|
+
const posRatio = (i + 1) / width;
|
|
236
|
+
if (posRatio <= complexity * 0.5)
|
|
237
|
+
bar += "█";
|
|
238
|
+
else if (posRatio <= complexity * 0.75)
|
|
239
|
+
bar += "▓";
|
|
240
|
+
else
|
|
241
|
+
bar += "░";
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
bar += "·";
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
// Ensure at least the first char reflects the minimum complexity
|
|
248
|
+
if (complexity > 0.01 && filled === 0) {
|
|
249
|
+
bar = "·" + bar.slice(1);
|
|
250
|
+
}
|
|
251
|
+
return bar;
|
|
252
|
+
}
|
|
253
|
+
function getModuleId(nodePath) {
|
|
254
|
+
const parts = nodePath.split("/");
|
|
255
|
+
return parts.length > 2
|
|
256
|
+
? parts.slice(0, 2).join("/")
|
|
257
|
+
: (parts[0] ?? nodePath);
|
|
258
|
+
}
|
|
259
|
+
function classifyEdge(fromPath, toPath) {
|
|
260
|
+
const combined = fromPath + " " + toPath;
|
|
261
|
+
if (/auth|session|login|magic-link|trusted-device|verify/.test(combined))
|
|
262
|
+
return "auth";
|
|
263
|
+
if (/payment|authorize|order|cart|price|tip/.test(combined))
|
|
264
|
+
return "payment";
|
|
265
|
+
if (/test|spec|__tests__/.test(combined))
|
|
266
|
+
return "test";
|
|
267
|
+
if (/component|page|layout|\.tsx$/.test(combined))
|
|
268
|
+
return "rendering";
|
|
269
|
+
return "data";
|
|
270
|
+
}
|
|
271
|
+
function capitalize(s) {
|
|
272
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
273
|
+
}
|
|
274
|
+
function moduleDescription(modPath, graph) {
|
|
275
|
+
const lower = modPath.toLowerCase();
|
|
276
|
+
if (lower.includes("app"))
|
|
277
|
+
return "routes, pages, admin, TLC";
|
|
278
|
+
if (lower.includes("test"))
|
|
279
|
+
return "unit, api, integration";
|
|
280
|
+
if (lower.includes("lib"))
|
|
281
|
+
return "auth, payment, POS, email";
|
|
282
|
+
if (lower.includes("component"))
|
|
283
|
+
return "TLC, admin, kitchen, shared";
|
|
284
|
+
if (lower.includes("script"))
|
|
285
|
+
return "deploy, sync, broadcast";
|
|
286
|
+
if (lower.includes("cluster"))
|
|
287
|
+
return "POS API client";
|
|
288
|
+
if (lower.includes("prisma"))
|
|
289
|
+
return "schema, migrations";
|
|
290
|
+
if (lower.includes("data"))
|
|
291
|
+
return "menu-pricing";
|
|
292
|
+
if (lower.includes("e2e"))
|
|
293
|
+
return "end-to-end tests";
|
|
294
|
+
return "";
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=strand-format-encode-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strand-format-encode-v1.js","sourceRoot":"","sources":["../../src/encoder/strand-format-encode-v1.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAkB;IACvD,IAAI,GAAG,GAAG,EAAE,CAAC;IAEb,SAAS;IACT,GAAG,IAAI,eAAe,KAAK,CAAC,WAAW,MAAM,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,UAAU,YAAY,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,YAAY,CAAC;IAExJ,uCAAuC;IACvC,GAAG,IAAI,aAAa,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