@abhinav2203/codeflow-analysis 0.1.1 → 0.1.2
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/cycles.d.ts +78 -8
- package/dist/cycles.d.ts.map +1 -1
- package/dist/handlers/cycles.d.ts +2 -2
- package/dist/handlers/smells.d.ts +1 -1
- package/dist/metrics.d.ts +41 -1
- package/dist/metrics.d.ts.map +1 -1
- package/dist/smells.d.ts +51 -13
- package/dist/smells.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cycles.d.ts
CHANGED
|
@@ -1,28 +1,98 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { BlueprintGraph } from "@abhinav2203/codeflow-core/schema";
|
|
3
3
|
export declare const cycleSchema: z.ZodObject<{
|
|
4
|
-
nodeIds: z.ZodArray<z.ZodString>;
|
|
4
|
+
nodeIds: z.ZodArray<z.ZodString, "many">;
|
|
5
5
|
edges: z.ZodArray<z.ZodObject<{
|
|
6
6
|
from: z.ZodString;
|
|
7
7
|
to: z.ZodString;
|
|
8
8
|
kind: z.ZodString;
|
|
9
|
-
}, z.
|
|
10
|
-
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
kind: string;
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
}, {
|
|
14
|
+
kind: string;
|
|
15
|
+
from: string;
|
|
16
|
+
to: string;
|
|
17
|
+
}>, "many">;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
edges: {
|
|
20
|
+
kind: string;
|
|
21
|
+
from: string;
|
|
22
|
+
to: string;
|
|
23
|
+
}[];
|
|
24
|
+
nodeIds: string[];
|
|
25
|
+
}, {
|
|
26
|
+
edges: {
|
|
27
|
+
kind: string;
|
|
28
|
+
from: string;
|
|
29
|
+
to: string;
|
|
30
|
+
}[];
|
|
31
|
+
nodeIds: string[];
|
|
32
|
+
}>;
|
|
11
33
|
export type Cycle = z.infer<typeof cycleSchema>;
|
|
12
34
|
export declare const cycleReportSchema: z.ZodObject<{
|
|
13
35
|
analyzedAt: z.ZodString;
|
|
14
36
|
totalCycles: z.ZodNumber;
|
|
15
37
|
maxCycleLength: z.ZodNumber;
|
|
16
38
|
cycles: z.ZodArray<z.ZodObject<{
|
|
17
|
-
nodeIds: z.ZodArray<z.ZodString>;
|
|
39
|
+
nodeIds: z.ZodArray<z.ZodString, "many">;
|
|
18
40
|
edges: z.ZodArray<z.ZodObject<{
|
|
19
41
|
from: z.ZodString;
|
|
20
42
|
to: z.ZodString;
|
|
21
43
|
kind: z.ZodString;
|
|
22
|
-
}, z.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
kind: string;
|
|
46
|
+
from: string;
|
|
47
|
+
to: string;
|
|
48
|
+
}, {
|
|
49
|
+
kind: string;
|
|
50
|
+
from: string;
|
|
51
|
+
to: string;
|
|
52
|
+
}>, "many">;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
edges: {
|
|
55
|
+
kind: string;
|
|
56
|
+
from: string;
|
|
57
|
+
to: string;
|
|
58
|
+
}[];
|
|
59
|
+
nodeIds: string[];
|
|
60
|
+
}, {
|
|
61
|
+
edges: {
|
|
62
|
+
kind: string;
|
|
63
|
+
from: string;
|
|
64
|
+
to: string;
|
|
65
|
+
}[];
|
|
66
|
+
nodeIds: string[];
|
|
67
|
+
}>, "many">;
|
|
68
|
+
affectedNodeIds: z.ZodArray<z.ZodString, "many">;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
analyzedAt: string;
|
|
71
|
+
totalCycles: number;
|
|
72
|
+
maxCycleLength: number;
|
|
73
|
+
cycles: {
|
|
74
|
+
edges: {
|
|
75
|
+
kind: string;
|
|
76
|
+
from: string;
|
|
77
|
+
to: string;
|
|
78
|
+
}[];
|
|
79
|
+
nodeIds: string[];
|
|
80
|
+
}[];
|
|
81
|
+
affectedNodeIds: string[];
|
|
82
|
+
}, {
|
|
83
|
+
analyzedAt: string;
|
|
84
|
+
totalCycles: number;
|
|
85
|
+
maxCycleLength: number;
|
|
86
|
+
cycles: {
|
|
87
|
+
edges: {
|
|
88
|
+
kind: string;
|
|
89
|
+
from: string;
|
|
90
|
+
to: string;
|
|
91
|
+
}[];
|
|
92
|
+
nodeIds: string[];
|
|
93
|
+
}[];
|
|
94
|
+
affectedNodeIds: string[];
|
|
95
|
+
}>;
|
|
26
96
|
export type CycleReport = z.infer<typeof cycleReportSchema>;
|
|
27
97
|
/**
|
|
28
98
|
* Detect all directed cycles in a blueprint graph using Tarjan's strongly-connected
|
package/dist/cycles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cycles.d.ts","sourceRoot":"","sources":["../src/cycles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"cycles.d.ts","sourceRoot":"","sources":["../src/cycles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAStB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAmE5D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,cAAc,KAAG,WA2CpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,KAAG,OAejD,CAAC"}
|
|
@@ -15,12 +15,12 @@ export declare function POST(request: Request): Promise<NextResponse<{
|
|
|
15
15
|
totalCycles: number;
|
|
16
16
|
maxCycleLength: number;
|
|
17
17
|
cycles: {
|
|
18
|
-
nodeIds: string[];
|
|
19
18
|
edges: {
|
|
19
|
+
kind: string;
|
|
20
20
|
from: string;
|
|
21
21
|
to: string;
|
|
22
|
-
kind: string;
|
|
23
22
|
}[];
|
|
23
|
+
nodeIds: string[];
|
|
24
24
|
}[];
|
|
25
25
|
affectedNodeIds: string[];
|
|
26
26
|
};
|
|
@@ -13,9 +13,9 @@ export declare function POST(request: Request): Promise<NextResponse<{
|
|
|
13
13
|
analyzedAt: string;
|
|
14
14
|
totalSmells: number;
|
|
15
15
|
smells: {
|
|
16
|
+
message: string;
|
|
16
17
|
code: string;
|
|
17
18
|
severity: "warning" | "info" | "critical";
|
|
18
|
-
message: string;
|
|
19
19
|
suggestion: string;
|
|
20
20
|
nodeId?: string | undefined;
|
|
21
21
|
}[];
|
package/dist/metrics.d.ts
CHANGED
|
@@ -20,7 +20,47 @@ export declare const graphMetricsSchema: z.ZodObject<{
|
|
|
20
20
|
connectedComponents: z.ZodNumber;
|
|
21
21
|
isolatedNodes: z.ZodNumber;
|
|
22
22
|
leafNodes: z.ZodNumber;
|
|
23
|
-
}, z.
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
analyzedAt: string;
|
|
25
|
+
nodeCount: number;
|
|
26
|
+
edgeCount: number;
|
|
27
|
+
nodesByKind: Record<string, number>;
|
|
28
|
+
edgesByKind: Record<string, number>;
|
|
29
|
+
nodesByStatus: Record<string, number>;
|
|
30
|
+
density: number;
|
|
31
|
+
avgDegree: number;
|
|
32
|
+
maxInDegree: number;
|
|
33
|
+
maxOutDegree: number;
|
|
34
|
+
avgMethodsPerNode: number;
|
|
35
|
+
avgResponsibilitiesPerNode: number;
|
|
36
|
+
totalMethods: number;
|
|
37
|
+
totalResponsibilities: number;
|
|
38
|
+
connectedComponents: number;
|
|
39
|
+
isolatedNodes: number;
|
|
40
|
+
leafNodes: number;
|
|
41
|
+
maxInDegreeNodeId?: string | undefined;
|
|
42
|
+
maxOutDegreeNodeId?: string | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
analyzedAt: string;
|
|
45
|
+
nodeCount: number;
|
|
46
|
+
edgeCount: number;
|
|
47
|
+
nodesByKind: Record<string, number>;
|
|
48
|
+
edgesByKind: Record<string, number>;
|
|
49
|
+
nodesByStatus: Record<string, number>;
|
|
50
|
+
density: number;
|
|
51
|
+
avgDegree: number;
|
|
52
|
+
maxInDegree: number;
|
|
53
|
+
maxOutDegree: number;
|
|
54
|
+
avgMethodsPerNode: number;
|
|
55
|
+
avgResponsibilitiesPerNode: number;
|
|
56
|
+
totalMethods: number;
|
|
57
|
+
totalResponsibilities: number;
|
|
58
|
+
connectedComponents: number;
|
|
59
|
+
isolatedNodes: number;
|
|
60
|
+
leafNodes: number;
|
|
61
|
+
maxInDegreeNodeId?: string | undefined;
|
|
62
|
+
maxOutDegreeNodeId?: string | undefined;
|
|
63
|
+
}>;
|
|
24
64
|
export type GraphMetrics = z.infer<typeof graphMetricsSchema>;
|
|
25
65
|
/**
|
|
26
66
|
* Compute structural metrics for a blueprint graph.
|
package/dist/metrics.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAgE9D;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,cAAc,KAAG,YAuF3D,CAAC"}
|
package/dist/smells.d.ts
CHANGED
|
@@ -2,32 +2,70 @@ import { z } from "zod";
|
|
|
2
2
|
import type { BlueprintGraph } from "@abhinav2203/codeflow-core/schema";
|
|
3
3
|
export declare const smellSchema: z.ZodObject<{
|
|
4
4
|
code: z.ZodString;
|
|
5
|
-
severity: z.ZodEnum<
|
|
6
|
-
warning: "warning";
|
|
7
|
-
info: "info";
|
|
8
|
-
critical: "critical";
|
|
9
|
-
}>;
|
|
5
|
+
severity: z.ZodEnum<["info", "warning", "critical"]>;
|
|
10
6
|
nodeId: z.ZodOptional<z.ZodString>;
|
|
11
7
|
message: z.ZodString;
|
|
12
8
|
suggestion: z.ZodString;
|
|
13
|
-
}, z.
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
message: string;
|
|
11
|
+
code: string;
|
|
12
|
+
severity: "warning" | "info" | "critical";
|
|
13
|
+
suggestion: string;
|
|
14
|
+
nodeId?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
message: string;
|
|
17
|
+
code: string;
|
|
18
|
+
severity: "warning" | "info" | "critical";
|
|
19
|
+
suggestion: string;
|
|
20
|
+
nodeId?: string | undefined;
|
|
21
|
+
}>;
|
|
14
22
|
export type Smell = z.infer<typeof smellSchema>;
|
|
15
23
|
export declare const smellReportSchema: z.ZodObject<{
|
|
16
24
|
analyzedAt: z.ZodString;
|
|
17
25
|
totalSmells: z.ZodNumber;
|
|
18
26
|
smells: z.ZodArray<z.ZodObject<{
|
|
19
27
|
code: z.ZodString;
|
|
20
|
-
severity: z.ZodEnum<
|
|
21
|
-
warning: "warning";
|
|
22
|
-
info: "info";
|
|
23
|
-
critical: "critical";
|
|
24
|
-
}>;
|
|
28
|
+
severity: z.ZodEnum<["info", "warning", "critical"]>;
|
|
25
29
|
nodeId: z.ZodOptional<z.ZodString>;
|
|
26
30
|
message: z.ZodString;
|
|
27
31
|
suggestion: z.ZodString;
|
|
28
|
-
}, z.
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
message: string;
|
|
34
|
+
code: string;
|
|
35
|
+
severity: "warning" | "info" | "critical";
|
|
36
|
+
suggestion: string;
|
|
37
|
+
nodeId?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
message: string;
|
|
40
|
+
code: string;
|
|
41
|
+
severity: "warning" | "info" | "critical";
|
|
42
|
+
suggestion: string;
|
|
43
|
+
nodeId?: string | undefined;
|
|
44
|
+
}>, "many">;
|
|
29
45
|
healthScore: z.ZodNumber;
|
|
30
|
-
}, z.
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
analyzedAt: string;
|
|
48
|
+
totalSmells: number;
|
|
49
|
+
smells: {
|
|
50
|
+
message: string;
|
|
51
|
+
code: string;
|
|
52
|
+
severity: "warning" | "info" | "critical";
|
|
53
|
+
suggestion: string;
|
|
54
|
+
nodeId?: string | undefined;
|
|
55
|
+
}[];
|
|
56
|
+
healthScore: number;
|
|
57
|
+
}, {
|
|
58
|
+
analyzedAt: string;
|
|
59
|
+
totalSmells: number;
|
|
60
|
+
smells: {
|
|
61
|
+
message: string;
|
|
62
|
+
code: string;
|
|
63
|
+
severity: "warning" | "info" | "critical";
|
|
64
|
+
suggestion: string;
|
|
65
|
+
nodeId?: string | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
healthScore: number;
|
|
68
|
+
}>;
|
|
31
69
|
export type SmellReport = z.infer<typeof smellReportSchema>;
|
|
32
70
|
/**
|
|
33
71
|
* Detect all architecture smells in a blueprint graph.
|
package/dist/smells.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smells.d.ts","sourceRoot":"","sources":["../src/smells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"smells.d.ts","sourceRoot":"","sources":["../src/smells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAmL5D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,cAAc,KAAG,WAgBpD,CAAC"}
|