@angular-modernizer/adapter-mcp 1.2.0 → 2.0.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/CHANGELOG.md +662 -0
- package/README.md +84 -445
- package/dist/cli.js +9 -1
- package/dist/core/project-analyzer.js +2 -2
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -0
- package/dist/scan-host/scan-host.d.ts +7 -0
- package/dist/scan-host/scan-host.js +73 -10
- package/dist/scan-host/scan-protocol.d.ts +2 -0
- package/dist/scan-host/scan-worker.js +14 -8
- package/dist/server/limited-stdio-transport.d.ts +6 -3
- package/dist/server/limited-stdio-transport.js +26 -9
- package/dist/server/mcp-server.js +1 -1
- package/dist/server/sdk-server.d.ts +14 -3
- package/dist/server/sdk-server.js +54 -6
- package/dist/server/tool-registry.d.ts +3 -1
- package/dist/server/tool-registry.js +8 -3
- package/dist/streaming/progress-store.d.ts +19 -7
- package/dist/streaming/progress-store.js +19 -8
- package/dist/tools/analyze-build-impact.d.ts +7 -4
- package/dist/tools/analyze-build-impact.js +8 -3
- package/dist/tools/analyze-core-to-shared.d.ts +10 -6
- package/dist/tools/analyze-core-to-shared.js +63 -60
- package/dist/tools/analyze-parser-performance.d.ts +57 -13
- package/dist/tools/analyze-parser-performance.js +67 -6
- package/dist/tools/analyze-project.d.ts +30 -4
- package/dist/tools/analyze-project.js +99 -15
- package/dist/tools/check-incremental-compatibility.d.ts +30 -41
- package/dist/tools/check-incremental-compatibility.js +32 -264
- package/dist/tools/collect-feedback.js +15 -2
- package/dist/tools/extract-libraries.js +42 -27
- package/dist/tools/find-angular-symbol.js +3 -2
- package/dist/tools/find-component-hosts.js +3 -2
- package/dist/tools/find-usages.js +21 -12
- package/dist/tools/get-call-graph.js +15 -2
- package/dist/tools/get-operation-progress-tool.d.ts +1 -1
- package/dist/tools/get-operation-progress-tool.js +2 -2
- package/dist/tools/get-operation-progress.d.ts +4 -1
- package/dist/tools/get-operation-progress.js +6 -2
- package/dist/tools/helpers/analysis-output.d.ts +32 -1
- package/dist/tools/helpers/analysis-output.js +22 -1
- package/dist/tools/helpers/build-cache.d.ts +27 -0
- package/dist/tools/helpers/build-cache.js +86 -0
- package/dist/tools/helpers/class-filter.d.ts +18 -0
- package/dist/tools/helpers/class-filter.js +30 -0
- package/dist/tools/helpers/cli-arguments.d.ts +23 -0
- package/dist/tools/helpers/cli-arguments.js +35 -0
- package/dist/tools/helpers/feedback-catalog.d.ts +38 -0
- package/dist/tools/helpers/feedback-catalog.js +196 -0
- package/dist/tools/helpers/feedback-sidecar.d.ts +201 -0
- package/dist/tools/helpers/feedback-sidecar.js +381 -0
- package/dist/tools/helpers/file-type-check.d.ts +34 -0
- package/dist/tools/helpers/file-type-check.js +56 -0
- package/dist/tools/helpers/output-contract.d.ts +42 -0
- package/dist/tools/helpers/output-contract.js +54 -0
- package/dist/tools/helpers/pattern-anonymizer.d.ts +27 -0
- package/dist/tools/helpers/pattern-anonymizer.js +159 -0
- package/dist/tools/helpers/project-cache.d.ts +5 -4
- package/dist/tools/helpers/project-cache.js +21 -16
- package/dist/tools/helpers/project-decorators.d.ts +11 -4
- package/dist/tools/helpers/project-decorators.js +13 -6
- package/dist/tools/helpers/refresh-apply.d.ts +94 -0
- package/dist/tools/helpers/refresh-apply.js +460 -0
- package/dist/tools/helpers/refresh-inventory.d.ts +106 -0
- package/dist/tools/helpers/refresh-inventory.js +610 -0
- package/dist/tools/helpers/rule-runner.js +3 -1
- package/dist/tools/helpers/scan-cache.d.ts +74 -5
- package/dist/tools/helpers/scan-cache.js +134 -6
- package/dist/tools/helpers/scan-engine.d.ts +30 -6
- package/dist/tools/helpers/scan-engine.js +131 -22
- package/dist/tools/helpers/scan-plan.js +16 -2
- package/dist/tools/helpers/source-map-loader.d.ts +55 -0
- package/dist/tools/helpers/source-map-loader.js +226 -0
- package/dist/tools/helpers/template-check.d.ts +76 -0
- package/dist/tools/helpers/template-check.js +158 -0
- package/dist/tools/helpers/tool-cache.d.ts +7 -2
- package/dist/tools/helpers/tool-cache.js +9 -3
- package/dist/tools/helpers/tool-context.d.ts +18 -0
- package/dist/tools/helpers/tool-context.js +29 -0
- package/dist/tools/helpers/transform-safety.d.ts +151 -1
- package/dist/tools/helpers/transform-safety.js +357 -4
- package/dist/tools/inspect-form-group.js +5 -0
- package/dist/tools/inspect-i18n.d.ts +1 -1
- package/dist/tools/inspect-template.js +8 -2
- package/dist/tools/learn-patterns.d.ts +43 -28
- package/dist/tools/learn-patterns.js +83 -161
- package/dist/tools/list-imports.d.ts +1 -1
- package/dist/tools/orchestrate-migration.d.ts +19 -1
- package/dist/tools/orchestrate-migration.js +52 -10
- package/dist/tools/parse-stack-trace.d.ts +48 -1
- package/dist/tools/parse-stack-trace.js +108 -9
- package/dist/tools/plan-migration.js +22 -10
- package/dist/tools/refresh-state.d.ts +378 -0
- package/dist/tools/refresh-state.js +370 -0
- package/dist/tools/resolve-type.js +10 -3
- package/dist/tools/review-feedback.d.ts +42 -7
- package/dist/tools/review-feedback.js +24 -17
- package/dist/tools/rollback-changes.d.ts +5 -0
- package/dist/tools/rollback-changes.js +7 -2
- package/dist/tools/run-angular-cli.js +36 -22
- package/dist/tools/run-build.d.ts +33 -28
- package/dist/tools/run-build.js +136 -438
- package/dist/tools/run-schematic.d.ts +8 -2
- package/dist/tools/run-schematic.js +80 -50
- package/dist/tools/scan-all.d.ts +31 -15
- package/dist/tools/scan-all.js +75 -109
- package/dist/tools/scan-angular.d.ts +27 -14
- package/dist/tools/scan-angular.js +70 -92
- package/dist/tools/scan-architecture.d.ts +29 -12
- package/dist/tools/scan-architecture.js +205 -135
- package/dist/tools/scan-solid.d.ts +27 -14
- package/dist/tools/scan-solid.js +73 -89
- package/dist/tools/search-codebase.d.ts +6 -1
- package/dist/tools/search-codebase.js +13 -7
- package/dist/tools/suggest-improvements.d.ts +34 -3
- package/dist/tools/suggest-improvements.js +34 -9
- package/dist/tools/trace-output-flow.js +3 -2
- package/dist/tools/transform-code-batch.d.ts +9 -9
- package/dist/tools/transform-code.d.ts +161 -12
- package/dist/tools/transform-code.js +715 -206
- package/dist/tools/validate-before-transform.js +2 -1
- package/dist/tools/validate-project-compatibility.d.ts +28 -55
- package/dist/tools/validate-project-compatibility.js +33 -225
- package/dist/tools/validate-transformation.d.ts +40 -26
- package/dist/tools/validate-transformation.js +115 -294
- package/dist/tools/verify-citations.js +8 -2
- package/dist/types.d.ts +9 -9
- package/dist/utils/format-tool-response.d.ts +3 -1
- package/dist/utils/format-tool-response.js +8 -3
- package/package.json +14 -13
|
@@ -130,7 +130,7 @@ export declare class RunSchematicTool implements MCPTool {
|
|
|
130
130
|
type: string;
|
|
131
131
|
description: string;
|
|
132
132
|
enum: string[];
|
|
133
|
-
|
|
133
|
+
deprecated: boolean;
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
136
|
};
|
|
@@ -207,12 +207,18 @@ export declare class RunSchematicTool implements MCPTool {
|
|
|
207
207
|
* Validate schematic name format.
|
|
208
208
|
*/
|
|
209
209
|
private validateSchematicName;
|
|
210
|
+
/**
|
|
211
|
+
* Validate the collection: an npm package name, scoped or not.
|
|
212
|
+
*/
|
|
213
|
+
private validateCollectionName;
|
|
210
214
|
/**
|
|
211
215
|
* Validate schematic options against whitelist.
|
|
212
216
|
*/
|
|
213
217
|
private validateSchematicOptions;
|
|
214
218
|
/**
|
|
215
|
-
* Validate that
|
|
219
|
+
* Validate that the collection is installed in the project: its package
|
|
220
|
+
* resolves from the project and declares `schematics` in its package.json.
|
|
221
|
+
* Before, this ran `ng generate --help`, which passes for any collection.
|
|
216
222
|
*/
|
|
217
223
|
private validateCollection;
|
|
218
224
|
/**
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
-
import { processGroupOptions, terminateOnAbort, terminateProcessTree, } from '@angular-modernizer/core';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
4
|
-
import {
|
|
2
|
+
import { noColorEnv, processGroupOptions, stripAnsi, terminateOnAbort, terminateProcessTree, } from '@angular-modernizer/core';
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
|
+
import { createRequire } from 'node:module';
|
|
5
|
+
import { resolve, dirname, join } from 'node:path';
|
|
6
|
+
import { assertShellSafeArguments, cliNeedsShell } from './helpers/cli-arguments.js';
|
|
5
7
|
import { STRING_ARRAY } from './helpers/investigation-schemas.js';
|
|
6
8
|
import { outputTail, seconds } from './helpers/process-output.js';
|
|
7
9
|
/** Generated files spelled out in the summary; the rest is in `filesGenerated`. */
|
|
@@ -36,6 +38,8 @@ function describeSchematic(result) {
|
|
|
36
38
|
function withSummary(result) {
|
|
37
39
|
return { ...result, summary: describeSchematic(result) };
|
|
38
40
|
}
|
|
41
|
+
/** Warning for the deprecated `conflictStrategy` option. */
|
|
42
|
+
const CONFLICT_STRATEGY_DEPRECATION = 'conflictStrategy is deprecated and has no effect: ng generate fails on a conflict; force passes --force';
|
|
39
43
|
/**
|
|
40
44
|
* Safe schematic options whitelist.
|
|
41
45
|
* Only these options are allowed to prevent security issues and ensure compatibility.
|
|
@@ -109,7 +113,7 @@ export class RunSchematicTool {
|
|
|
109
113
|
},
|
|
110
114
|
collection: {
|
|
111
115
|
type: 'string',
|
|
112
|
-
description: 'Schematic collection (default: @schematics/angular)',
|
|
116
|
+
description: 'Schematic collection, an npm package name installed in the project (default: @schematics/angular)',
|
|
113
117
|
default: '@schematics/angular',
|
|
114
118
|
},
|
|
115
119
|
options: {
|
|
@@ -140,14 +144,14 @@ export class RunSchematicTool {
|
|
|
140
144
|
},
|
|
141
145
|
force: {
|
|
142
146
|
type: 'boolean',
|
|
143
|
-
description: '
|
|
147
|
+
description: 'Pass --force to ng generate: files the schematic creates may replace existing ones. Schematics that update existing files can still fail with a merge conflict.',
|
|
144
148
|
default: false,
|
|
145
149
|
},
|
|
146
150
|
conflictStrategy: {
|
|
147
151
|
type: 'string',
|
|
148
|
-
description: '
|
|
152
|
+
description: 'Deprecated, no effect: ng generate fails on a conflict; use force to pass --force.',
|
|
149
153
|
enum: ['error', 'overwrite', 'skip', 'backup'],
|
|
150
|
-
|
|
154
|
+
deprecated: true,
|
|
151
155
|
},
|
|
152
156
|
},
|
|
153
157
|
},
|
|
@@ -214,6 +218,7 @@ export class RunSchematicTool {
|
|
|
214
218
|
const executionOptions = params.executionOptions ?? {};
|
|
215
219
|
// Validate schematic name format
|
|
216
220
|
this.validateSchematicName(schematic);
|
|
221
|
+
this.validateCollectionName(collection);
|
|
217
222
|
// Validate schematic options
|
|
218
223
|
this.validateSchematicOptions(options);
|
|
219
224
|
// Resolve working directory
|
|
@@ -227,9 +232,11 @@ export class RunSchematicTool {
|
|
|
227
232
|
throw new Error('Not an Angular project. angular.json not found in project root.');
|
|
228
233
|
}
|
|
229
234
|
// Validate collection exists
|
|
230
|
-
|
|
235
|
+
this.validateCollection(collection, projectRoot);
|
|
231
236
|
// Build command arguments
|
|
232
237
|
const commandArgs = this.buildCommandArgs(schematic, target, collection, options, executionOptions);
|
|
238
|
+
// Target and option values reach the process unchanged (argv, no shell on POSIX)
|
|
239
|
+
assertShellSafeArguments(commandArgs);
|
|
233
240
|
const fullCommand = `ng generate ${commandArgs.join(' ')}`;
|
|
234
241
|
try {
|
|
235
242
|
const startTime = Date.now();
|
|
@@ -243,7 +250,32 @@ export class RunSchematicTool {
|
|
|
243
250
|
// Parse output for generated files and conflicts
|
|
244
251
|
const filesGenerated = this.extractGeneratedFiles(result.stdout);
|
|
245
252
|
const conflicts = this.extractConflicts(result.stderr);
|
|
246
|
-
const warnings =
|
|
253
|
+
const warnings = [
|
|
254
|
+
...(executionOptions.conflictStrategy === undefined
|
|
255
|
+
? []
|
|
256
|
+
: [CONFLICT_STRATEGY_DEPRECATION]),
|
|
257
|
+
...this.extractWarnings(result.stdout, result.stderr),
|
|
258
|
+
];
|
|
259
|
+
if (result.timedOut) {
|
|
260
|
+
// What the schematic printed (and wrote) before the timeout stays in the result
|
|
261
|
+
const timeout = executionOptions.timeout ?? 300000;
|
|
262
|
+
return withSummary({
|
|
263
|
+
success: false,
|
|
264
|
+
schematic,
|
|
265
|
+
collection,
|
|
266
|
+
target,
|
|
267
|
+
fullCommand,
|
|
268
|
+
exitCode: -1,
|
|
269
|
+
stdout: result.stdout,
|
|
270
|
+
stderr: `${result.stderr}${result.stderr === '' || result.stderr.endsWith('\n') ? '' : '\n'}Schematic execution timed out after ${timeout}ms`,
|
|
271
|
+
filesGenerated,
|
|
272
|
+
conflicts,
|
|
273
|
+
executionTime,
|
|
274
|
+
timedOut: true,
|
|
275
|
+
cwd: projectRoot,
|
|
276
|
+
warnings,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
247
279
|
return withSummary({
|
|
248
280
|
success: result.exitCode === 0,
|
|
249
281
|
schematic,
|
|
@@ -261,24 +293,6 @@ export class RunSchematicTool {
|
|
|
261
293
|
});
|
|
262
294
|
}
|
|
263
295
|
catch (error) {
|
|
264
|
-
if (error instanceof Error && error.message.includes('timed out')) {
|
|
265
|
-
return withSummary({
|
|
266
|
-
success: false,
|
|
267
|
-
schematic,
|
|
268
|
-
collection,
|
|
269
|
-
target,
|
|
270
|
-
fullCommand,
|
|
271
|
-
exitCode: -1,
|
|
272
|
-
stdout: '',
|
|
273
|
-
stderr: 'Schematic execution timed out',
|
|
274
|
-
filesGenerated: [],
|
|
275
|
-
conflicts: [],
|
|
276
|
-
executionTime: executionOptions.timeout ?? 300000,
|
|
277
|
-
timedOut: true,
|
|
278
|
-
cwd: projectRoot,
|
|
279
|
-
warnings: [],
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
296
|
throw new Error(`Schematic execution failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
283
297
|
}
|
|
284
298
|
}
|
|
@@ -301,6 +315,14 @@ export class RunSchematicTool {
|
|
|
301
315
|
throw new Error('Invalid schematic name: must contain only alphanumeric characters, dashes, and underscores');
|
|
302
316
|
}
|
|
303
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* Validate the collection: an npm package name, scoped or not.
|
|
320
|
+
*/
|
|
321
|
+
validateCollectionName(collection) {
|
|
322
|
+
if (!/^(?:@[a-z0-9][\w.~-]*\/)?[a-z0-9][\w.~-]*$/i.test(collection)) {
|
|
323
|
+
throw new Error(`Invalid collection '${collection}': must be an npm package name such as @schematics/angular`);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
304
326
|
/**
|
|
305
327
|
* Validate schematic options against whitelist.
|
|
306
328
|
*/
|
|
@@ -312,26 +334,28 @@ export class RunSchematicTool {
|
|
|
312
334
|
}
|
|
313
335
|
}
|
|
314
336
|
/**
|
|
315
|
-
* Validate that
|
|
337
|
+
* Validate that the collection is installed in the project: its package
|
|
338
|
+
* resolves from the project and declares `schematics` in its package.json.
|
|
339
|
+
* Before, this ran `ng generate --help`, which passes for any collection.
|
|
316
340
|
*/
|
|
317
|
-
|
|
318
|
-
// Built-in Angular collections
|
|
341
|
+
validateCollection(collection, projectRoot) {
|
|
342
|
+
// Built-in Angular collections come with the CLI
|
|
319
343
|
if (collection === '@schematics/angular' || collection === '@angular/cli') {
|
|
320
344
|
return;
|
|
321
345
|
}
|
|
322
|
-
|
|
346
|
+
let manifestPath;
|
|
323
347
|
try {
|
|
324
|
-
|
|
325
|
-
cwd: projectRoot,
|
|
326
|
-
timeout: 10000, // 10 second timeout for validation
|
|
327
|
-
});
|
|
328
|
-
// If we can run ng generate --help, the CLI is working
|
|
329
|
-
if (result.exitCode !== 0) {
|
|
330
|
-
throw new Error(`Angular CLI validation failed: ${result.stderr}`);
|
|
331
|
-
}
|
|
348
|
+
manifestPath = createRequire(join(projectRoot, 'package.json')).resolve(`${collection}/package.json`);
|
|
332
349
|
}
|
|
333
|
-
catch
|
|
334
|
-
throw new Error(`
|
|
350
|
+
catch {
|
|
351
|
+
throw new Error(`Schematic collection '${collection}' is not installed in ${projectRoot}`);
|
|
352
|
+
}
|
|
353
|
+
const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));
|
|
354
|
+
const schematics = typeof manifest === 'object' && manifest !== null
|
|
355
|
+
? manifest['schematics']
|
|
356
|
+
: undefined;
|
|
357
|
+
if (typeof schematics !== 'string') {
|
|
358
|
+
throw new Error(`'${collection}' is no schematic collection: its package.json has no "schematics" entry`);
|
|
335
359
|
}
|
|
336
360
|
}
|
|
337
361
|
/**
|
|
@@ -411,19 +435,22 @@ export class RunSchematicTool {
|
|
|
411
435
|
*/
|
|
412
436
|
async executeSchematic(args, options) {
|
|
413
437
|
return new Promise((resolve, reject) => {
|
|
438
|
+
// argv without a shell: `;` or `$( )` in a target or value stays part of it
|
|
414
439
|
const ngProcess = spawn('npx', ['ng', 'generate', ...args], {
|
|
415
440
|
cwd: options.cwd,
|
|
416
|
-
|
|
441
|
+
// Color off: the output is parsed and returned as text
|
|
442
|
+
env: noColorEnv(),
|
|
417
443
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
418
|
-
shell:
|
|
444
|
+
shell: cliNeedsShell(),
|
|
419
445
|
...processGroupOptions(),
|
|
420
446
|
});
|
|
421
447
|
let stdout = '';
|
|
422
448
|
let stderr = '';
|
|
423
|
-
|
|
449
|
+
let timedOut = false;
|
|
450
|
+
// Timeout: end the process tree, resolve on close with the output so far
|
|
424
451
|
const timeoutId = setTimeout(() => {
|
|
452
|
+
timedOut = true;
|
|
425
453
|
terminateProcessTree(ngProcess);
|
|
426
|
-
reject(new Error(`Schematic execution timed out after ${options.timeout}ms`));
|
|
427
454
|
}, options.timeout);
|
|
428
455
|
const stopOnAbort = terminateOnAbort(ngProcess, options.signal);
|
|
429
456
|
const cleanup = () => {
|
|
@@ -443,9 +470,10 @@ export class RunSchematicTool {
|
|
|
443
470
|
return;
|
|
444
471
|
}
|
|
445
472
|
resolve({
|
|
446
|
-
exitCode: code ??
|
|
447
|
-
stdout,
|
|
448
|
-
stderr,
|
|
473
|
+
exitCode: code ?? -1,
|
|
474
|
+
stdout: stripAnsi(stdout),
|
|
475
|
+
stderr: stripAnsi(stderr),
|
|
476
|
+
timedOut,
|
|
449
477
|
});
|
|
450
478
|
});
|
|
451
479
|
ngProcess.on('error', (error) => {
|
|
@@ -479,7 +507,8 @@ export class RunSchematicTool {
|
|
|
479
507
|
*/
|
|
480
508
|
extractConflicts(stderr) {
|
|
481
509
|
const conflicts = [];
|
|
482
|
-
|
|
510
|
+
// No g flag: .test() with g keeps lastIndex and skipped every second line
|
|
511
|
+
const conflictRegex = /(?:already exists|conflict)/i;
|
|
483
512
|
const lines = stderr.split('\n');
|
|
484
513
|
for (const line of lines) {
|
|
485
514
|
if (conflictRegex.test(line)) {
|
|
@@ -493,7 +522,8 @@ export class RunSchematicTool {
|
|
|
493
522
|
*/
|
|
494
523
|
extractWarnings(stdout, stderr) {
|
|
495
524
|
const warnings = [];
|
|
496
|
-
|
|
525
|
+
// No g flag: .test() with g keeps lastIndex and skipped every second line
|
|
526
|
+
const warningRegex = /(?:warning|deprecated)/i;
|
|
497
527
|
const allOutput = stdout + '\n' + stderr;
|
|
498
528
|
const lines = allOutput.split('\n');
|
|
499
529
|
for (const line of lines) {
|
package/dist/tools/scan-all.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MCPTool, ToolAnnotations, ToolContext } from '../types.js';
|
|
2
2
|
import { type CancelledExecution } from './helpers/tool-context.js';
|
|
3
3
|
import { type ScanCounts } from './helpers/analysis-output.js';
|
|
4
|
+
import { type ScanCacheMode } from './helpers/scan-cache.js';
|
|
4
5
|
/** Result of the scan-all tool. */
|
|
5
6
|
export interface ScanAllResult {
|
|
6
7
|
/** The requested page of violations (`maxResults`, `resultOffset`). */
|
|
@@ -59,6 +60,8 @@ export interface ScanAllResult {
|
|
|
59
60
|
* (`.angular-modernizer-cache/all/`); `hitRate` and `hitsBySource` refer to it.
|
|
60
61
|
*/
|
|
61
62
|
cache?: {
|
|
63
|
+
/** Cache mode of the call: `refresh` read no entry and overwrote them. */
|
|
64
|
+
mode: ScanCacheMode;
|
|
62
65
|
/** Files selected for the scan. */
|
|
63
66
|
totalFilesChecked: number;
|
|
64
67
|
/** Files whose findings came from the cache. */
|
|
@@ -90,7 +93,12 @@ export interface ScanAllResult {
|
|
|
90
93
|
};
|
|
91
94
|
};
|
|
92
95
|
};
|
|
93
|
-
/**
|
|
96
|
+
/** Deprecation notices of the call (`orchestration` has no effect). */
|
|
97
|
+
warnings?: string[];
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated No longer set: the block claimed a parallel run that never
|
|
100
|
+
* happened. The scan always runs in the scan worker.
|
|
101
|
+
*/
|
|
94
102
|
orchestration?: {
|
|
95
103
|
/** Whether the scan ran in parallel. */
|
|
96
104
|
parallel: boolean;
|
|
@@ -120,13 +128,13 @@ export interface ScanAllResult {
|
|
|
120
128
|
};
|
|
121
129
|
}
|
|
122
130
|
/**
|
|
123
|
-
* MCP tool `scan-all`: one scan with all analysis plugins
|
|
131
|
+
* MCP tool `scan-all`: one scan with the rules of all analysis plugins.
|
|
124
132
|
*
|
|
125
133
|
* @remarks
|
|
126
134
|
* Plugins and rules:
|
|
127
|
-
* - SolidPlugin
|
|
128
|
-
* - AngularPlugin
|
|
129
|
-
* - ArchitecturePlugin
|
|
135
|
+
* - SolidPlugin: SOLID principles
|
|
136
|
+
* - AngularPlugin: Angular best practices
|
|
137
|
+
* - ArchitecturePlugin: architectural issues
|
|
130
138
|
*/
|
|
131
139
|
export declare class ScanAllTool implements MCPTool {
|
|
132
140
|
readonly name = "scan-all";
|
|
@@ -168,6 +176,12 @@ export declare class ScanAllTool implements MCPTool {
|
|
|
168
176
|
description: string;
|
|
169
177
|
default: string[];
|
|
170
178
|
};
|
|
179
|
+
cache: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
readonly enum: readonly ["use", "refresh"];
|
|
182
|
+
readonly default: "use";
|
|
183
|
+
readonly description: "use: serve unchanged files from the scan cache (default); refresh: ignore the existing entries, analyze every file and overwrite them. Read from the call only, never from the tools section of .angular-modernizer.json";
|
|
184
|
+
};
|
|
171
185
|
includeAutoFixes: {
|
|
172
186
|
type: string;
|
|
173
187
|
description: string;
|
|
@@ -189,17 +203,19 @@ export declare class ScanAllTool implements MCPTool {
|
|
|
189
203
|
default: number;
|
|
190
204
|
};
|
|
191
205
|
orchestration: {
|
|
192
|
-
type:
|
|
193
|
-
description:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
206
|
+
readonly type: "object";
|
|
207
|
+
readonly description: "Deprecated, no effect, kept in 2.x: the scan always runs in the scan worker and answers with a notice in warnings. Leave unset.";
|
|
208
|
+
readonly deprecated: true;
|
|
209
|
+
readonly properties: {
|
|
210
|
+
readonly parallel: {
|
|
211
|
+
readonly type: "boolean";
|
|
212
|
+
readonly description: "Deprecated, no effect.";
|
|
213
|
+
readonly deprecated: true;
|
|
199
214
|
};
|
|
200
|
-
maxWorkers: {
|
|
201
|
-
type:
|
|
202
|
-
description:
|
|
215
|
+
readonly maxWorkers: {
|
|
216
|
+
readonly type: "number";
|
|
217
|
+
readonly description: "Deprecated, no effect.";
|
|
218
|
+
readonly deprecated: true;
|
|
203
219
|
};
|
|
204
220
|
};
|
|
205
221
|
};
|