@angular-modernizer/adapter-mcp 0.2.0 → 0.3.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/README.md +103 -35
- package/dist/cli.js +64 -14
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-watcher.d.ts.map +1 -1
- package/dist/mcp-watcher.js +3 -0
- package/dist/mcp-watcher.js.map +1 -1
- package/dist/server/json-rpc-handler.d.ts +41 -0
- package/dist/server/json-rpc-handler.d.ts.map +1 -1
- package/dist/server/json-rpc-handler.js +85 -6
- package/dist/server/json-rpc-handler.js.map +1 -1
- package/dist/server/mcp-server.d.ts +31 -0
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +76 -23
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/stdio-guard.d.ts +20 -0
- package/dist/server/stdio-guard.d.ts.map +1 -0
- package/dist/server/stdio-guard.js +48 -0
- package/dist/server/stdio-guard.js.map +1 -0
- package/dist/tools/analyze-build-impact.d.ts +126 -13
- package/dist/tools/analyze-build-impact.d.ts.map +1 -1
- package/dist/tools/analyze-build-impact.js +172 -30
- package/dist/tools/analyze-build-impact.js.map +1 -1
- package/dist/tools/find-angular-symbol.d.ts +29 -6
- package/dist/tools/find-angular-symbol.d.ts.map +1 -1
- package/dist/tools/find-angular-symbol.js +51 -6
- package/dist/tools/find-angular-symbol.js.map +1 -1
- package/dist/tools/find-component-hosts.d.ts +114 -0
- package/dist/tools/find-component-hosts.d.ts.map +1 -0
- package/dist/tools/find-component-hosts.js +240 -0
- package/dist/tools/find-component-hosts.js.map +1 -0
- package/dist/tools/find-usages.d.ts +20 -3
- package/dist/tools/find-usages.d.ts.map +1 -1
- package/dist/tools/find-usages.js +71 -8
- package/dist/tools/find-usages.js.map +1 -1
- package/dist/tools/get-bootstrap-execution.d.ts +108 -0
- package/dist/tools/get-bootstrap-execution.d.ts.map +1 -0
- package/dist/tools/get-bootstrap-execution.js +243 -0
- package/dist/tools/get-bootstrap-execution.js.map +1 -0
- package/dist/tools/get-call-graph.d.ts +28 -3
- package/dist/tools/get-call-graph.d.ts.map +1 -1
- package/dist/tools/get-call-graph.js +55 -7
- package/dist/tools/get-call-graph.js.map +1 -1
- package/dist/tools/helpers/compact-output.d.ts +61 -0
- package/dist/tools/helpers/compact-output.d.ts.map +1 -0
- package/dist/tools/helpers/compact-output.js +83 -0
- package/dist/tools/helpers/compact-output.js.map +1 -0
- package/dist/tools/helpers/project-cache.d.ts +177 -0
- package/dist/tools/helpers/project-cache.d.ts.map +1 -0
- package/dist/tools/helpers/project-cache.js +313 -0
- package/dist/tools/helpers/project-cache.js.map +1 -0
- package/dist/tools/helpers/rule-runner.d.ts +67 -0
- package/dist/tools/helpers/rule-runner.d.ts.map +1 -0
- package/dist/tools/helpers/rule-runner.js +117 -0
- package/dist/tools/helpers/rule-runner.js.map +1 -0
- package/dist/tools/helpers/scan-plan.d.ts +45 -0
- package/dist/tools/helpers/scan-plan.d.ts.map +1 -0
- package/dist/tools/helpers/scan-plan.js +151 -0
- package/dist/tools/helpers/scan-plan.js.map +1 -0
- package/dist/tools/helpers/stack-frame-file-index.d.ts +10 -0
- package/dist/tools/helpers/stack-frame-file-index.d.ts.map +1 -0
- package/dist/tools/helpers/stack-frame-file-index.js +71 -0
- package/dist/tools/helpers/stack-frame-file-index.js.map +1 -0
- package/dist/tools/inspect-form-group.d.ts +93 -0
- package/dist/tools/inspect-form-group.d.ts.map +1 -0
- package/dist/tools/inspect-form-group.js +161 -0
- package/dist/tools/inspect-form-group.js.map +1 -0
- package/dist/tools/inspect-i18n.d.ts +85 -0
- package/dist/tools/inspect-i18n.d.ts.map +1 -0
- package/dist/tools/inspect-i18n.js +203 -0
- package/dist/tools/inspect-i18n.js.map +1 -0
- package/dist/tools/inspect-template.d.ts +89 -0
- package/dist/tools/inspect-template.d.ts.map +1 -0
- package/dist/tools/inspect-template.js +166 -0
- package/dist/tools/inspect-template.js.map +1 -0
- package/dist/tools/list-imports.d.ts +17 -1
- package/dist/tools/list-imports.d.ts.map +1 -1
- package/dist/tools/list-imports.js +22 -5
- package/dist/tools/list-imports.js.map +1 -1
- package/dist/tools/orchestrate-migration.d.ts +1 -0
- package/dist/tools/orchestrate-migration.d.ts.map +1 -1
- package/dist/tools/orchestrate-migration.js +33 -1
- package/dist/tools/orchestrate-migration.js.map +1 -1
- package/dist/tools/parse-stack-trace.d.ts +3 -1
- package/dist/tools/parse-stack-trace.d.ts.map +1 -1
- package/dist/tools/parse-stack-trace.js +18 -4
- package/dist/tools/parse-stack-trace.js.map +1 -1
- package/dist/tools/plan-migration.d.ts +89 -1
- package/dist/tools/plan-migration.d.ts.map +1 -1
- package/dist/tools/plan-migration.js +203 -7
- package/dist/tools/plan-migration.js.map +1 -1
- package/dist/tools/resolve-type.d.ts +3 -0
- package/dist/tools/resolve-type.d.ts.map +1 -1
- package/dist/tools/resolve-type.js +6 -2
- package/dist/tools/resolve-type.js.map +1 -1
- package/dist/tools/scan-all.d.ts +6 -6
- package/dist/tools/scan-all.d.ts.map +1 -1
- package/dist/tools/scan-all.js +7 -7
- package/dist/tools/scan-all.js.map +1 -1
- package/dist/tools/scan-angular.d.ts +1 -1
- package/dist/tools/scan-angular.js +1 -1
- package/dist/tools/scan-architecture.d.ts +25 -4
- package/dist/tools/scan-architecture.d.ts.map +1 -1
- package/dist/tools/scan-architecture.js +115 -134
- package/dist/tools/scan-architecture.js.map +1 -1
- package/dist/tools/scan-solid.d.ts +1 -1
- package/dist/tools/scan-solid.js +1 -1
- package/dist/tools/search-codebase.d.ts +3 -0
- package/dist/tools/search-codebase.d.ts.map +1 -1
- package/dist/tools/search-codebase.js +6 -2
- package/dist/tools/search-codebase.js.map +1 -1
- package/dist/tools/server-status.d.ts +96 -0
- package/dist/tools/server-status.d.ts.map +1 -0
- package/dist/tools/server-status.js +195 -0
- package/dist/tools/server-status.js.map +1 -0
- package/dist/tools/trace-output-flow.d.ts +111 -0
- package/dist/tools/trace-output-flow.d.ts.map +1 -0
- package/dist/tools/trace-output-flow.js +308 -0
- package/dist/tools/trace-output-flow.js.map +1 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @angular-modernizer/adapter-mcp - Scan-based migration plan
|
|
3
|
+
*
|
|
4
|
+
* Wiring for plan-migration when violations carry file paths: reads a saved
|
|
5
|
+
* scan-architecture result, builds the project import graph (plus template
|
|
6
|
+
* edges: a host depends on the components, directives and pipes its template
|
|
7
|
+
* uses by selector or pipe name) and the layer lookup, and hands both to core
|
|
8
|
+
* `buildViolationPlan`.
|
|
9
|
+
*/
|
|
10
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
11
|
+
import { isAbsolute, relative, resolve } from 'node:path';
|
|
12
|
+
import { Project } from 'ts-morph';
|
|
13
|
+
import { ConfigLoader, DependencyGraphBuilder, buildViolationPlan, } from '@angular-modernizer/core';
|
|
14
|
+
import { LayerPathMatcher, loadLayersFromSource, } from '@angular-modernizer/plugin-architecture';
|
|
15
|
+
import { findTsConfig } from './find-ts-config.js';
|
|
16
|
+
function isRecord(value) {
|
|
17
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Read violations from a saved scan-architecture result. Accepts the tool
|
|
21
|
+
* result object (`{ violations: [...] }`), a bare violation array, or an MCP
|
|
22
|
+
* content array (`[{ type: 'text', text: '<json>' }]`) as clients persist it.
|
|
23
|
+
*/
|
|
24
|
+
export function readScanResultFile(filePath) {
|
|
25
|
+
if (!existsSync(filePath)) {
|
|
26
|
+
throw new Error(`scanResultFile does not exist: ${filePath}`);
|
|
27
|
+
}
|
|
28
|
+
let parsed;
|
|
29
|
+
try {
|
|
30
|
+
parsed = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
throw new Error(`scanResultFile is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
34
|
+
}
|
|
35
|
+
const violations = extractViolations(parsed);
|
|
36
|
+
if (!violations) {
|
|
37
|
+
throw new Error('scanResultFile must contain a scan-architecture result ({ violations: [...] }) or a violation array');
|
|
38
|
+
}
|
|
39
|
+
return violations;
|
|
40
|
+
}
|
|
41
|
+
function extractViolations(value) {
|
|
42
|
+
if (Array.isArray(value)) {
|
|
43
|
+
const first = value[0];
|
|
44
|
+
if (isRecord(first) && first['type'] === 'text' && typeof first['text'] === 'string') {
|
|
45
|
+
return extractViolations(JSON.parse(first['text']));
|
|
46
|
+
}
|
|
47
|
+
return value.filter(isScanViolation);
|
|
48
|
+
}
|
|
49
|
+
if (isRecord(value) && Array.isArray(value['violations'])) {
|
|
50
|
+
return value['violations'].filter(isScanViolation);
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
function isScanViolation(value) {
|
|
55
|
+
return (isRecord(value) &&
|
|
56
|
+
typeof value['ruleId'] === 'string' &&
|
|
57
|
+
typeof value['severity'] === 'string');
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Build the file-level plan for violations that carry a file path.
|
|
61
|
+
*/
|
|
62
|
+
export async function buildScanPlan(options) {
|
|
63
|
+
const { projectRoot } = options;
|
|
64
|
+
const warnings = [];
|
|
65
|
+
const tsConfigPath = findTsConfig(projectRoot);
|
|
66
|
+
if (!tsConfigPath) {
|
|
67
|
+
throw new Error(`tsconfig.json not found in project: ${projectRoot}`);
|
|
68
|
+
}
|
|
69
|
+
const project = options.loadProject?.(tsConfigPath) ?? new Project({ tsConfigFilePath: tsConfigPath });
|
|
70
|
+
const graph = new DependencyGraphBuilder(project, { templateEdges: true });
|
|
71
|
+
await graph.buildGraph();
|
|
72
|
+
const { layers, source } = await loadLayers(projectRoot, warnings);
|
|
73
|
+
const matcher = layers.length > 0
|
|
74
|
+
? new LayerPathMatcher(layers, project.getCompilerOptions(), projectRoot)
|
|
75
|
+
: undefined;
|
|
76
|
+
const planViolations = [];
|
|
77
|
+
for (const violation of options.violations) {
|
|
78
|
+
if (!violation.filePath) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const filePath = isAbsolute(violation.filePath)
|
|
82
|
+
? violation.filePath
|
|
83
|
+
: resolve(projectRoot, violation.filePath);
|
|
84
|
+
planViolations.push({
|
|
85
|
+
filePath,
|
|
86
|
+
ruleId: violation.ruleId,
|
|
87
|
+
severity: violation.severity,
|
|
88
|
+
category: violation.category,
|
|
89
|
+
...(violation.line !== undefined ? { line: violation.line } : {}),
|
|
90
|
+
...(violation.message !== undefined ? { message: violation.message } : {}),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const graphNodes = graph.getGraph();
|
|
94
|
+
const outsideProgram = new Set(planViolations.map((v) => v.filePath).filter((file) => !graphNodes.has(file)));
|
|
95
|
+
if (outsideProgram.size > 0) {
|
|
96
|
+
warnings.push(`${outsideProgram.size} file(s) are not part of the TypeScript program (${tsConfigPath}); they are ordered without dependencies.`);
|
|
97
|
+
}
|
|
98
|
+
const plan = buildViolationPlan(planViolations, {
|
|
99
|
+
// Template edges order a child before the hosts that use it by selector
|
|
100
|
+
dependenciesOf: (file) => [
|
|
101
|
+
...graph.getDirectDependencies(file),
|
|
102
|
+
...graph.getTemplateDependencies(file),
|
|
103
|
+
],
|
|
104
|
+
layerOf: (file) => {
|
|
105
|
+
const layer = matcher?.match(file);
|
|
106
|
+
return layer ? layer.alias || layer.name : undefined;
|
|
107
|
+
},
|
|
108
|
+
...(options.maxPhases !== undefined ? { maxPhases: options.maxPhases } : {}),
|
|
109
|
+
});
|
|
110
|
+
return {
|
|
111
|
+
plan: relativizePlan(plan, projectRoot),
|
|
112
|
+
layerSource: source,
|
|
113
|
+
graphFiles: project.getSourceFiles().length,
|
|
114
|
+
warnings,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
async function loadLayers(projectRoot, warnings) {
|
|
118
|
+
try {
|
|
119
|
+
const config = new ConfigLoader().load(projectRoot);
|
|
120
|
+
if (config.layersSource) {
|
|
121
|
+
return {
|
|
122
|
+
layers: await loadLayersFromSource(projectRoot, config.layersSource),
|
|
123
|
+
source: 'layersSource',
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (config.layers && config.layers.length > 0) {
|
|
127
|
+
return { layers: config.layers, source: 'layers' };
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
warnings.push(`Layers unavailable, files are not grouped by layer: ${error instanceof Error ? error.message : String(error)}`);
|
|
132
|
+
}
|
|
133
|
+
return { layers: [], source: 'none' };
|
|
134
|
+
}
|
|
135
|
+
/** Project-relative paths keep the plan readable and portable. */
|
|
136
|
+
function relativizePlan(plan, projectRoot) {
|
|
137
|
+
const rel = (file) => relative(projectRoot, file);
|
|
138
|
+
return {
|
|
139
|
+
...plan,
|
|
140
|
+
cycles: plan.cycles.map((cycle) => ({ ...cycle, files: cycle.files.map(rel) })),
|
|
141
|
+
phases: plan.phases.map((phase) => ({
|
|
142
|
+
...phase,
|
|
143
|
+
files: phase.files.map((file) => ({
|
|
144
|
+
...file,
|
|
145
|
+
filePath: rel(file.filePath),
|
|
146
|
+
dependsOn: file.dependsOn.map(rel),
|
|
147
|
+
})),
|
|
148
|
+
})),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=scan-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-plan.js","sourceRoot":"","sources":["../../../src/tools/helpers/scan-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,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AC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAClC,GAAG,KAAK;YACR,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBAChC,GAAG,IAAI;gBACP,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC5B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;aACnC,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node file system implementation of the api `StackFrameFileIndex`.
|
|
3
|
+
*
|
|
4
|
+
* `exists` stats a single path. The basename index walks `projectRoot` once, on
|
|
5
|
+
* the first basename lookup, so stacks with absolute or URL frames never pay
|
|
6
|
+
* for the walk. Build output, caches and `node_modules` are skipped.
|
|
7
|
+
*/
|
|
8
|
+
import { type StackFrameFileIndex } from '@angular-modernizer/api';
|
|
9
|
+
export declare function createNodeStackFrameFileIndex(projectRoot: string): StackFrameFileIndex;
|
|
10
|
+
//# sourceMappingURL=stack-frame-file-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-frame-file-index.d.ts","sourceRoot":"","sources":["../../../src/tools/helpers/stack-frame-file-index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAgBnE,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,GAClB,mBAAmB,CAgBrB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node file system implementation of the api `StackFrameFileIndex`.
|
|
3
|
+
*
|
|
4
|
+
* `exists` stats a single path. The basename index walks `projectRoot` once, on
|
|
5
|
+
* the first basename lookup, so stacks with absolute or URL frames never pay
|
|
6
|
+
* for the walk. Build output, caches and `node_modules` are skipped.
|
|
7
|
+
*/
|
|
8
|
+
import { readdirSync, statSync } from 'node:fs';
|
|
9
|
+
import { join } from 'node:path';
|
|
10
|
+
const SKIPPED_DIRECTORIES = new Set([
|
|
11
|
+
'node_modules',
|
|
12
|
+
'.git',
|
|
13
|
+
'.angular',
|
|
14
|
+
'.nx',
|
|
15
|
+
'.cache',
|
|
16
|
+
'dist',
|
|
17
|
+
'coverage',
|
|
18
|
+
'out-tsc',
|
|
19
|
+
]);
|
|
20
|
+
/** Stops the walk on a mistaken root such as `/`. */
|
|
21
|
+
const MAX_WALKED_FILES = 200_000;
|
|
22
|
+
export function createNodeStackFrameFileIndex(projectRoot) {
|
|
23
|
+
let byBasename;
|
|
24
|
+
const index = () => (byBasename ??= walk(projectRoot));
|
|
25
|
+
return {
|
|
26
|
+
exists: (path) => {
|
|
27
|
+
try {
|
|
28
|
+
return statSync(path).isFile();
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
findByBasename: (name) => index().get(name) ?? [],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function walk(root) {
|
|
38
|
+
const byBasename = new Map();
|
|
39
|
+
const stack = [root];
|
|
40
|
+
let seen = 0;
|
|
41
|
+
while (stack.length > 0 && seen < MAX_WALKED_FILES) {
|
|
42
|
+
const current = stack.pop();
|
|
43
|
+
if (current === undefined) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
let entries;
|
|
47
|
+
try {
|
|
48
|
+
entries = readdirSync(current, { withFileTypes: true });
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
for (const entry of entries) {
|
|
54
|
+
if (entry.isDirectory()) {
|
|
55
|
+
if (!SKIPPED_DIRECTORIES.has(entry.name)) {
|
|
56
|
+
stack.push(join(current, entry.name));
|
|
57
|
+
}
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (!entry.isFile()) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
seen++;
|
|
64
|
+
const list = byBasename.get(entry.name) ?? [];
|
|
65
|
+
list.push(join(current, entry.name));
|
|
66
|
+
byBasename.set(entry.name, list);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return byBasename;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=stack-frame-file-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-frame-file-index.js","sourceRoot":"","sources":["../../../src/tools/helpers/stack-frame-file-index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,cAAc;IACd,MAAM;IACN,UAAU;IACV,KAAK;IACL,QAAQ;IACR,MAAM;IACN,UAAU;IACV,SAAS;CACV,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAEjC,MAAM,UAAU,6BAA6B,CAC3C,WAAmB;IAEnB,IAAI,UAA6C,CAAC;IAElD,MAAM,KAAK,GAAG,GAA0B,EAAE,CACxC,CAAC,UAAU,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAErC,OAAO;QACL,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACf,IAAI,CAAC;gBACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;YACjC,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE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AAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @angular-modernizer/adapter-mcp - Inspect Form Group Tool
|
|
3
|
+
*
|
|
4
|
+
* MCP tool that returns the Reactive Forms of a component or service file
|
|
5
|
+
* as structure: controls with validators and initial state, and every
|
|
6
|
+
* enable/disable/validator change per control, including what an ancestor
|
|
7
|
+
* group's enable()/disable() switches with it.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Logic lives in `FormGroupInspector` (`@angular-modernizer/api`); this tool
|
|
11
|
+
* resolves the project, validates arguments and applies the compact output
|
|
12
|
+
* contract (`maxResults` caps the control list per form).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // Via MCP:
|
|
17
|
+
* // tool: inspect-form-group
|
|
18
|
+
* // args: { file: 'src/app/edit/edit.component.ts', projectRoot: '/project' }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
import { type MCPTool } from '../types.js';
|
|
22
|
+
import { type InspectedForm, type InspectedFormControl } from '@angular-modernizer/api';
|
|
23
|
+
import { ProjectCache } from './helpers/project-cache.js';
|
|
24
|
+
/** A control with the cascade optionally dropped. */
|
|
25
|
+
type ControlOutput = Omit<InspectedFormControl, 'cascade'> & Partial<Pick<InspectedFormControl, 'cascade'>>;
|
|
26
|
+
/** A form shaped by the compact options. */
|
|
27
|
+
type FormOutput = Omit<InspectedForm, 'controls'> & {
|
|
28
|
+
controls?: ControlOutput[];
|
|
29
|
+
truncated: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Output of the inspect-form-group tool.
|
|
33
|
+
*/
|
|
34
|
+
interface InspectFormGroupOutput {
|
|
35
|
+
forms: FormOutput[];
|
|
36
|
+
summary: string;
|
|
37
|
+
tsConfigPath: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* MCP tool that inspects Reactive Forms in a file.
|
|
41
|
+
*/
|
|
42
|
+
export declare class InspectFormGroupTool implements MCPTool {
|
|
43
|
+
private readonly projects;
|
|
44
|
+
readonly name = "inspect-form-group";
|
|
45
|
+
constructor(projects?: ProjectCache);
|
|
46
|
+
readonly description: string;
|
|
47
|
+
readonly inputSchema: {
|
|
48
|
+
type: string;
|
|
49
|
+
properties: {
|
|
50
|
+
summaryOnly: {
|
|
51
|
+
readonly type: "boolean";
|
|
52
|
+
readonly description: "Return counts and the text summary only, without the result list. Default: false.";
|
|
53
|
+
readonly default: false;
|
|
54
|
+
};
|
|
55
|
+
maxResults: {
|
|
56
|
+
readonly type: "number";
|
|
57
|
+
readonly description: string;
|
|
58
|
+
};
|
|
59
|
+
file: {
|
|
60
|
+
type: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
projectRoot: {
|
|
64
|
+
type: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
className: {
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
form: {
|
|
72
|
+
type: string;
|
|
73
|
+
description: string;
|
|
74
|
+
};
|
|
75
|
+
includeValueOperations: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
|
+
includeCascade: {
|
|
81
|
+
type: string;
|
|
82
|
+
description: string;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
required: string[];
|
|
87
|
+
};
|
|
88
|
+
execute(args: Record<string, unknown>): Promise<InspectFormGroupOutput>;
|
|
89
|
+
private shape;
|
|
90
|
+
private buildSummary;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
93
|
+
//# sourceMappingURL=inspect-form-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect-form-group.d.ts","sourceRoot":"","sources":["../../src/tools/inspect-form-group.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P tool that returns the Reactive Forms of a component or service file
|
|
5
|
+
* as structure: controls with validators and initial state, and every
|
|
6
|
+
* enable/disable/validator change per control, including what an ancestor
|
|
7
|
+
* group's enable()/disable() switches with it.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Logic lives in `FormGroupInspector` (`@angular-modernizer/api`); this tool
|
|
11
|
+
* resolves the project, validates arguments and applies the compact output
|
|
12
|
+
* contract (`maxResults` caps the control list per form).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // Via MCP:
|
|
17
|
+
* // tool: inspect-form-group
|
|
18
|
+
* // args: { file: 'src/app/edit/edit.component.ts', projectRoot: '/project' }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
import { FormGroupInspector, } from '@angular-modernizer/api';
|
|
22
|
+
import { existsSync } from 'node:fs';
|
|
23
|
+
import { isAbsolute, resolve } from 'node:path';
|
|
24
|
+
import { findTsConfig } from './helpers/find-ts-config.js';
|
|
25
|
+
import { ProjectCache } from './helpers/project-cache.js';
|
|
26
|
+
import { COMPACT_OUTPUT_SCHEMA, limitList, parseCompactOptions, } from './helpers/compact-output.js';
|
|
27
|
+
/**
|
|
28
|
+
* MCP tool that inspects Reactive Forms in a file.
|
|
29
|
+
*/
|
|
30
|
+
export class InspectFormGroupTool {
|
|
31
|
+
projects;
|
|
32
|
+
name = 'inspect-form-group';
|
|
33
|
+
constructor(projects = new ProjectCache()) {
|
|
34
|
+
this.projects = projects;
|
|
35
|
+
}
|
|
36
|
+
description = 'Inspect the Reactive Forms of a component or service file. Per form property: the control tree ' +
|
|
37
|
+
'(dotted paths, FormArray items as "[]", kind, validators, async validators, created disabled, added via ' +
|
|
38
|
+
'addControl) and every call in the file that changes a control: enable, disable, set/add/remove/clear ' +
|
|
39
|
+
'validators, setErrors, updateValueAndValidity, add/remove/setControl (value changes with ' +
|
|
40
|
+
'includeValueOperations), resolved through controls.x, controls["x"], get("a.b"), get([...]), at(i), local ' +
|
|
41
|
+
'variables and getters. cascade lists enable()/disable() on ancestor groups that also switch the control; ' +
|
|
42
|
+
'reEnabledBy flags controls disabled on purpose that an ancestor enable() switches back on. unknownPaths ' +
|
|
43
|
+
'lists paths that do not exist in the form (typos, stale names: a runtime error when called); ' +
|
|
44
|
+
'dynamicOperations lists computed keys (controls[key] in a loop). Only this file is searched. summaryOnly ' +
|
|
45
|
+
'drops the control lists, maxResults caps them.';
|
|
46
|
+
inputSchema = {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
file: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'The .ts file declaring the form (absolute, or relative to projectRoot).',
|
|
52
|
+
},
|
|
53
|
+
projectRoot: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'Absolute path to the project root. Must contain a tsconfig.json.',
|
|
56
|
+
},
|
|
57
|
+
className: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'Only this class of the file. Optional.',
|
|
60
|
+
},
|
|
61
|
+
form: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Only this form property, e.g. "formGroup". Optional.',
|
|
64
|
+
},
|
|
65
|
+
includeValueOperations: {
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
description: 'Also report setValue, patchValue, reset, valueChanges, statusChanges. Default: false.',
|
|
68
|
+
default: false,
|
|
69
|
+
},
|
|
70
|
+
includeCascade: {
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
description: 'Include the ancestor enable()/disable() list per control. Default: true.',
|
|
73
|
+
default: true,
|
|
74
|
+
},
|
|
75
|
+
...COMPACT_OUTPUT_SCHEMA,
|
|
76
|
+
},
|
|
77
|
+
required: ['file', 'projectRoot'],
|
|
78
|
+
};
|
|
79
|
+
async execute(args) {
|
|
80
|
+
const params = args;
|
|
81
|
+
if (!params.file || typeof params.file !== 'string') {
|
|
82
|
+
throw new Error('file is required');
|
|
83
|
+
}
|
|
84
|
+
if (!params.projectRoot) {
|
|
85
|
+
throw new Error('projectRoot is required');
|
|
86
|
+
}
|
|
87
|
+
const compact = parseCompactOptions(args);
|
|
88
|
+
if (!existsSync(params.projectRoot)) {
|
|
89
|
+
throw new Error(`projectRoot does not exist: ${params.projectRoot}`);
|
|
90
|
+
}
|
|
91
|
+
const filePath = isAbsolute(params.file) ? params.file : resolve(params.projectRoot, params.file);
|
|
92
|
+
if (!existsSync(filePath)) {
|
|
93
|
+
throw new Error(`file does not exist: ${filePath}`);
|
|
94
|
+
}
|
|
95
|
+
const tsConfigPath = findTsConfig(params.projectRoot);
|
|
96
|
+
if (!tsConfigPath) {
|
|
97
|
+
throw new Error(`tsconfig.json not found in projectRoot: ${params.projectRoot}`);
|
|
98
|
+
}
|
|
99
|
+
const project = this.projects.get(tsConfigPath);
|
|
100
|
+
if (!project.getSourceFile(filePath)) {
|
|
101
|
+
throw new Error(`file is not part of the tsconfig program: ${filePath}`);
|
|
102
|
+
}
|
|
103
|
+
const forms = new FormGroupInspector(project).inspect(filePath, {
|
|
104
|
+
...(params.className === undefined ? {} : { className: params.className }),
|
|
105
|
+
...(params.form === undefined ? {} : { property: params.form }),
|
|
106
|
+
includeValueOperations: params.includeValueOperations === true,
|
|
107
|
+
});
|
|
108
|
+
const includeCascade = params.includeCascade !== false;
|
|
109
|
+
return {
|
|
110
|
+
forms: forms.map((f) => this.shape(f, compact.summaryOnly, compact.maxResults, includeCascade)),
|
|
111
|
+
summary: this.buildSummary(filePath, forms),
|
|
112
|
+
tsConfigPath,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
shape(form, summaryOnly, maxResults, includeCascade) {
|
|
116
|
+
const { controls, ...rest } = form;
|
|
117
|
+
if (summaryOnly) {
|
|
118
|
+
return { ...rest, truncated: false };
|
|
119
|
+
}
|
|
120
|
+
const shown = limitList(controls, maxResults);
|
|
121
|
+
return {
|
|
122
|
+
...rest,
|
|
123
|
+
controls: shown.items.map((c) => {
|
|
124
|
+
if (includeCascade) {
|
|
125
|
+
return c;
|
|
126
|
+
}
|
|
127
|
+
const { cascade: _cascade, ...control } = c;
|
|
128
|
+
return control;
|
|
129
|
+
}),
|
|
130
|
+
truncated: shown.truncated,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
buildSummary(filePath, forms) {
|
|
134
|
+
if (forms.length === 0) {
|
|
135
|
+
return (`No Reactive Forms found in ${filePath}. Recognised are FormBuilder group/control/array/record calls ` +
|
|
136
|
+
'and new FormGroup/FormControl/FormArray/FormRecord assigned to a class property.');
|
|
137
|
+
}
|
|
138
|
+
const lines = [];
|
|
139
|
+
for (const f of forms) {
|
|
140
|
+
const c = f.counts;
|
|
141
|
+
lines.push(`${f.className}.${f.property} (${f.kind}, defined at line ${f.definedAt.join(', ')}): ${c.controls} controls, ` +
|
|
142
|
+
`${c.validated} with validators, ${c.disabledInitially} created disabled, ${c.operations} state operations.`);
|
|
143
|
+
for (const control of f.controls.filter((x) => x.reEnabledBy !== undefined)) {
|
|
144
|
+
const own = control.operations.filter((o) => o.op === 'disable').map((o) => o.line);
|
|
145
|
+
const why = control.disabledInitially ? 'created disabled' : `disable() at ${own.join(', ')}`;
|
|
146
|
+
const by = (control.reEnabledBy ?? [])
|
|
147
|
+
.map((r) => `${r.from === '' ? f.property : r.from}.enable() at ${r.line}`)
|
|
148
|
+
.join(', ');
|
|
149
|
+
lines.push(` ${control.path}: ${why}, switched back on by ${by}.`);
|
|
150
|
+
}
|
|
151
|
+
for (const u of f.unknownPaths) {
|
|
152
|
+
lines.push(` Unknown path '${u.path}' (${u.op}() at line ${u.line}) does not exist in the form.`);
|
|
153
|
+
}
|
|
154
|
+
if (c.dynamicOperations > 0) {
|
|
155
|
+
lines.push(` ${c.dynamicOperations} operation(s) through computed keys (controls[key]); see dynamicOperations.`);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return lines.join('\n');
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=inspect-form-group.js.map
|
|
@@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 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @angular-modernizer/adapter-mcp - Inspect i18n Tool
|
|
3
|
+
*
|
|
4
|
+
* MCP tool over `I18nInspector`: where translation keys are defined (per
|
|
5
|
+
* language, with file, line and value), where they are used in templates and
|
|
6
|
+
* code, in which language they are missing, which used keys are defined
|
|
7
|
+
* nowhere and which defined keys have no static usage. Sources are found
|
|
8
|
+
* without configuration (setTranslation, TranslateHttpLoader, TranslocoLoader,
|
|
9
|
+
* assets/i18n convention).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* await tool.execute({ projectRoot: '/app', key: 'ERRORS.NO_ACCESS' });
|
|
14
|
+
* // { keys: [{ key: 'ERRORS.NO_ACCESS', status: 'used', definitions: [...], usages: [...] }], summary: '...' }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import { type MCPTool } from '../types.js';
|
|
18
|
+
import { type I18nReport, type I18nSourceSummary } from '@angular-modernizer/api';
|
|
19
|
+
import { ProjectCache } from './helpers/project-cache.js';
|
|
20
|
+
type ListField = 'keys' | 'undefinedKeys' | 'missingTranslations' | 'unused' | 'dynamicPrefixes' | 'unresolvedUsages';
|
|
21
|
+
/** Source fields only the full output carries. */
|
|
22
|
+
type DetailField = 'registeredAt' | 'discoveredBy' | 'kind' | 'conditionReason';
|
|
23
|
+
/** A source; `summaryOnly` keeps file, lang, app, conditional, group and keyCount. */
|
|
24
|
+
type SourceOutput = Omit<I18nSourceSummary, DetailField> & Partial<Pick<I18nSourceSummary, DetailField>>;
|
|
25
|
+
/**
|
|
26
|
+
* Output of the inspect-i18n tool.
|
|
27
|
+
*/
|
|
28
|
+
type InspectI18nOutput = Omit<I18nReport, ListField | 'sources'> & Partial<Pick<I18nReport, ListField>> & {
|
|
29
|
+
sources: SourceOutput[];
|
|
30
|
+
/** `true` when `maxResults` cut a list. */
|
|
31
|
+
truncated: boolean;
|
|
32
|
+
summary: string;
|
|
33
|
+
tsConfigPath: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* MCP tool that reports translation key definitions and usages.
|
|
37
|
+
*/
|
|
38
|
+
export declare class InspectI18nTool implements MCPTool {
|
|
39
|
+
private readonly projects;
|
|
40
|
+
readonly name = "inspect-i18n";
|
|
41
|
+
constructor(projects?: ProjectCache);
|
|
42
|
+
readonly description: string;
|
|
43
|
+
readonly inputSchema: {
|
|
44
|
+
type: string;
|
|
45
|
+
properties: {
|
|
46
|
+
summaryOnly: {
|
|
47
|
+
readonly type: "boolean";
|
|
48
|
+
readonly description: "Return counts and the text summary only, without the result list. Default: false.";
|
|
49
|
+
readonly default: false;
|
|
50
|
+
};
|
|
51
|
+
maxResults: {
|
|
52
|
+
readonly type: "number";
|
|
53
|
+
readonly description: string;
|
|
54
|
+
};
|
|
55
|
+
projectRoot: {
|
|
56
|
+
type: string;
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
59
|
+
key: {
|
|
60
|
+
type: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
prefix: {
|
|
64
|
+
type: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
i18nNames: {
|
|
68
|
+
type: string;
|
|
69
|
+
items: {
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
required: string[];
|
|
76
|
+
};
|
|
77
|
+
execute(args: Record<string, unknown>): Promise<InspectI18nOutput>;
|
|
78
|
+
private parseText;
|
|
79
|
+
private parseI18nNames;
|
|
80
|
+
private shape;
|
|
81
|
+
private buildSummary;
|
|
82
|
+
private keyLines;
|
|
83
|
+
}
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=inspect-i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect-i18n.d.ts","sourceRoot":"","sources":["../../src/tools/inspect-i18n.ts"],"names":[],"mapp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