@angular/cli 22.0.0-rc.0 → 22.0.0-rc.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/bin/ng.js +1 -1
- package/package.json +14 -14
- package/src/commands/mcp/ARCHITECTURE.md +117 -0
- package/src/commands/mcp/DESIGN.md +266 -0
- package/src/commands/mcp/LLM_ERGONOMICS.md +258 -0
- package/src/commands/mcp/devserver.d.ts +1 -1
- package/src/commands/mcp/devserver.js +5 -8
- package/src/commands/mcp/devserver.js.map +1 -1
- package/src/commands/mcp/host.d.ts +9 -5
- package/src/commands/mcp/host.js +37 -22
- package/src/commands/mcp/host.js.map +1 -1
- package/src/commands/mcp/mcp-server.d.ts +8 -42
- package/src/commands/mcp/mcp-server.js +20 -25
- package/src/commands/mcp/mcp-server.js.map +1 -1
- package/src/commands/mcp/resources/best-practices.md +0 -1
- package/src/commands/mcp/tools/best-practices.js +9 -17
- package/src/commands/mcp/tools/best-practices.js.map +1 -1
- package/src/commands/mcp/tools/doc-search.js +11 -33
- package/src/commands/mcp/tools/doc-search.js.map +1 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.d.ts +2 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js +2 -2
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js.map +1 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.d.ts +3 -2
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js +8 -8
- package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js.map +1 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.d.ts +2 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js +2 -3
- package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js.map +1 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.d.ts +2 -1
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js +29 -41
- package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js.map +1 -1
- package/src/commands/mcp/tools/projects.d.ts +1 -0
- package/src/commands/mcp/tools/projects.js +15 -18
- package/src/commands/mcp/tools/projects.js.map +1 -1
- package/src/commands/mcp/tools/run-target/build-target-strategy.d.ts +14 -0
- package/src/commands/mcp/tools/run-target/build-target-strategy.js +53 -0
- package/src/commands/mcp/tools/run-target/build-target-strategy.js.map +1 -0
- package/src/commands/mcp/tools/run-target/generic-target-strategy.d.ts +14 -0
- package/src/commands/mcp/tools/run-target/generic-target-strategy.js +63 -0
- package/src/commands/mcp/tools/run-target/generic-target-strategy.js.map +1 -0
- package/src/commands/mcp/tools/run-target/options-serializer.d.ts +13 -0
- package/src/commands/mcp/tools/run-target/options-serializer.js +41 -0
- package/src/commands/mcp/tools/run-target/options-serializer.js.map +1 -0
- package/src/commands/mcp/tools/run-target/run-target.d.ts +34 -0
- package/src/commands/mcp/tools/run-target/run-target.js +69 -0
- package/src/commands/mcp/tools/run-target/run-target.js.map +1 -0
- package/src/commands/mcp/tools/run-target/strategy.d.ts +15 -0
- package/src/commands/mcp/tools/run-target/strategy.js +10 -0
- package/src/commands/mcp/tools/run-target/strategy.js.map +1 -0
- package/src/commands/mcp/tools/run-target/types.d.ts +39 -0
- package/src/commands/mcp/tools/run-target/types.js +41 -0
- package/src/commands/mcp/tools/run-target/types.js.map +1 -0
- package/src/commands/mcp/tools/run-target/unit-test-strategy.d.ts +14 -0
- package/src/commands/mcp/tools/run-target/unit-test-strategy.js +56 -0
- package/src/commands/mcp/tools/run-target/unit-test-strategy.js.map +1 -0
- package/src/utilities/node-version.js +1 -1
- package/src/utilities/version.js +1 -1
- package/src/commands/mcp/tools/build.d.ts +0 -37
- package/src/commands/mcp/tools/build.js +0 -90
- package/src/commands/mcp/tools/build.js.map +0 -1
- package/src/commands/mcp/tools/e2e.d.ts +0 -44
- package/src/commands/mcp/tools/e2e.js +0 -88
- package/src/commands/mcp/tools/e2e.js.map +0 -1
- package/src/commands/mcp/tools/test.d.ts +0 -35
- package/src/commands/mcp/tools/test.js +0 -88
- package/src/commands/mcp/tools/test.js.map +0 -1
|
@@ -19,15 +19,13 @@ const host_1 = require("./host");
|
|
|
19
19
|
const instructions_1 = require("./resources/instructions");
|
|
20
20
|
const ai_tutor_1 = require("./tools/ai-tutor");
|
|
21
21
|
const best_practices_1 = require("./tools/best-practices");
|
|
22
|
-
const build_1 = require("./tools/build");
|
|
23
22
|
const devserver_start_1 = require("./tools/devserver/devserver-start");
|
|
24
23
|
const devserver_stop_1 = require("./tools/devserver/devserver-stop");
|
|
25
24
|
const devserver_wait_for_build_1 = require("./tools/devserver/devserver-wait-for-build");
|
|
26
25
|
const doc_search_1 = require("./tools/doc-search");
|
|
27
|
-
const e2e_1 = require("./tools/e2e");
|
|
28
26
|
const zoneless_migration_1 = require("./tools/onpush-zoneless-migration/zoneless-migration");
|
|
29
27
|
const projects_1 = require("./tools/projects");
|
|
30
|
-
const
|
|
28
|
+
const run_target_1 = require("./tools/run-target/run-target");
|
|
31
29
|
const tool_registry_1 = require("./tools/tool-registry");
|
|
32
30
|
/**
|
|
33
31
|
* Tools to manage devservers. Should be bundled together, then added to experimental or stable as a group.
|
|
@@ -48,7 +46,7 @@ const STABLE_TOOLS = [
|
|
|
48
46
|
* The set of tools that are available but not enabled by default.
|
|
49
47
|
* These tools are considered experimental and may have limitations.
|
|
50
48
|
*/
|
|
51
|
-
exports.EXPERIMENTAL_TOOLS = [
|
|
49
|
+
exports.EXPERIMENTAL_TOOLS = [run_target_1.RUN_TARGET_TOOL, ...DEVSERVER_TOOLS];
|
|
52
50
|
/**
|
|
53
51
|
* Experimental tools that are grouped together under a single name.
|
|
54
52
|
*
|
|
@@ -70,36 +68,33 @@ async function createMcpServer(options, logger) {
|
|
|
70
68
|
},
|
|
71
69
|
instructions: `
|
|
72
70
|
<General Purpose>
|
|
73
|
-
This server provides a safe, programmatic interface to the Angular CLI
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
equivalent actions.
|
|
71
|
+
This server provides a safe, programmatic interface to the Angular CLI. You MUST prefer
|
|
72
|
+
the tools provided by this server over using 'run_shell_command' or general shell execution
|
|
73
|
+
for equivalent actions.
|
|
77
74
|
</General Purpose>
|
|
78
75
|
|
|
79
76
|
<Core Workflows & Tool Guide>
|
|
80
|
-
* **1. Discover
|
|
81
|
-
|
|
82
|
-
is a required input for other tools.
|
|
77
|
+
* **1. Discover Workspace (Mandatory First Step):** Always begin by calling 'list_projects'
|
|
78
|
+
to discover workspaces, projects, and allowed paths. The 'path' field of the relevant
|
|
79
|
+
workspace is a required input for other tools (passed as 'workspace' or 'workspacePath').
|
|
83
80
|
|
|
84
|
-
* **2. Get Coding Standards:** Before writing or
|
|
85
|
-
|
|
86
|
-
version-specific standards. For general knowledge, you can call the tool without this path.
|
|
81
|
+
* **2. Get Coding Standards:** Before writing or modifying code, you MUST call
|
|
82
|
+
'get_best_practices' with the workspace 'path' to load version-specific coding standards.
|
|
87
83
|
|
|
88
|
-
* **3. Answer
|
|
89
|
-
|
|
84
|
+
* **3. Answer Conceptual Questions:** Use 'search_documentation' to answer conceptual
|
|
85
|
+
or API syntax questions.
|
|
90
86
|
|
|
91
|
-
* **4. Discover Schematics
|
|
92
|
-
|
|
93
|
-
available) with \`ng generate <package-name>: --help\` to discover what migrations
|
|
94
|
-
are available in a package (e.g., running \`ng generate @angular/core: --help\`
|
|
95
|
-
will list migrations like \`control-flow\` and \`standalone\`).
|
|
87
|
+
* **4. Discover Schematics:** To discover available package migrations, use a shell command
|
|
88
|
+
(if available) with 'ng generate <package-name>: --help' (e.g., 'ng generate @angular/core: --help').
|
|
96
89
|
</Core Workflows & Tool Guide>
|
|
97
90
|
|
|
98
91
|
<Key Concepts>
|
|
99
|
-
* **Workspace vs. Project:** A 'workspace' contains an
|
|
100
|
-
(applications or libraries). A monorepo can
|
|
101
|
-
|
|
102
|
-
|
|
92
|
+
* **Workspace vs. Project:** A 'workspace' contains an 'angular.json' file and defines
|
|
93
|
+
'projects' (applications or libraries). A monorepo can contain multiple workspaces.
|
|
94
|
+
|
|
95
|
+
* **Targeting Projects:** Always use the workspace 'path' and the specific project 'name'
|
|
96
|
+
returned by 'list_projects' when calling other tools to ensure you target the correct
|
|
97
|
+
project context.
|
|
103
98
|
</Key Concepts>
|
|
104
99
|
`,
|
|
105
100
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["mcp-server.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["mcp-server.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAuDH,0CA4GC;AAED,4DA2CC;AA9MD,oEAAoE;AACpE,iEAAwF;AACxF,yCAA4C;AAC5C,uCAAyC;AAEzC,qDAAkD;AAElD,iCAAsE;AACtE,2DAAwE;AACxE,+CAAiD;AACjD,2DAA6D;AAC7D,uEAAyE;AACzE,qEAAuE;AACvE,yFAA2F;AAC3F,mDAAqD;AACrD,6FAA+F;AAC/F,+CAAsD;AACtD,8DAAgE;AAChE,yDAAkF;AAElF;;GAEG;AACH,MAAM,eAAe,GAAG,CAAC,sCAAoB,EAAE,oCAAmB,EAAE,wDAA6B,CAAC,CAAC;AAEnG;;;GAGG;AACH,MAAM,YAAY,GAAG;IACnB,wBAAa;IACb,oCAAmB;IACnB,4BAAe;IACf,6BAAkB;IAClB,4CAAuB;CACf,CAAC;AAEX;;;GAGG;AACU,QAAA,kBAAkB,GAAG,CAAC,4BAAe,EAAE,GAAG,eAAe,CAAU,CAAC;AAEjF;;;;GAIG;AACU,QAAA,wBAAwB,GAAG;IACtC,KAAK,EAAE,0BAAkB;IACzB,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEK,KAAK,UAAU,eAAe,CACnC,OAKC,EACD,MAAoC;IAEpC,MAAM,MAAM,GAAG,IAAI,kBA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,6 @@ You are an expert in TypeScript, Angular, and scalable web application developme
|
|
|
26
26
|
- Keep components small and focused on a single responsibility
|
|
27
27
|
- Use `input()` and `output()` functions instead of decorators
|
|
28
28
|
- Use `computed()` for derived state
|
|
29
|
-
- Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator
|
|
30
29
|
- Prefer inline templates for small components
|
|
31
30
|
- Prefer Reactive forms instead of Template-driven ones
|
|
32
31
|
- Do NOT use `ngClass`, use `class` bindings instead
|
|
@@ -26,10 +26,8 @@ const bestPracticesInputSchema = zod_1.z.object({
|
|
|
26
26
|
workspacePath: zod_1.z
|
|
27
27
|
.string()
|
|
28
28
|
.optional()
|
|
29
|
-
.describe('
|
|
30
|
-
'
|
|
31
|
-
'Angular framework. You **MUST** get this path from the `list_projects` tool. If omitted, ' +
|
|
32
|
-
'the tool will return the generic best practices guide bundled with the CLI.'),
|
|
29
|
+
.describe('Absolute path to the angular.json workspace directory (obtained via list_projects). ' +
|
|
30
|
+
'If omitted, returns the generic best practices guide.'),
|
|
33
31
|
});
|
|
34
32
|
exports.BEST_PRACTICES_TOOL = (0, tool_registry_1.declareTool)({
|
|
35
33
|
name: 'get_best_practices',
|
|
@@ -37,23 +35,17 @@ exports.BEST_PRACTICES_TOOL = (0, tool_registry_1.declareTool)({
|
|
|
37
35
|
description: `
|
|
38
36
|
<Purpose>
|
|
39
37
|
Retrieves the official Angular Best Practices Guide. This guide contains the essential rules and conventions
|
|
40
|
-
that
|
|
38
|
+
that must be followed for any task involving the creation, analysis, or modification of Angular code.
|
|
41
39
|
</Purpose>
|
|
42
40
|
<Use Cases>
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
41
|
+
* Mandatory first step before writing or modifying Angular code to ensure modern framework standards.
|
|
42
|
+
* Learn about standalone components, typed forms, and modern control flow syntax (@if, @for, @switch).
|
|
43
|
+
* Verify existing code aligns with current conventions before making edits.
|
|
46
44
|
</Use Cases>
|
|
47
45
|
<Operational Notes>
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* **General Use:** If no project context is available (e.g., for general questions or learning),
|
|
52
|
-
you can call the tool without the \`workspacePath\` argument. It will return the latest
|
|
53
|
-
generic best practices guide.
|
|
54
|
-
* The content of this guide is non-negotiable and reflects the official, up-to-date standards for Angular development.
|
|
55
|
-
* You **MUST** internalize and apply the principles from this guide in all subsequent Angular-related tasks.
|
|
56
|
-
* Failure to adhere to these best practices will result in suboptimal and outdated code.
|
|
46
|
+
* Provide the 'workspacePath' argument (obtained via 'list_projects') to load the version-specific
|
|
47
|
+
guide matching the project's Angular framework.
|
|
48
|
+
* Omit 'workspacePath' only for general learning queries or when no project context is available to load the latest generic guide.
|
|
57
49
|
</Operational Notes>`,
|
|
58
50
|
inputSchema: bestPracticesInputSchema.shape,
|
|
59
51
|
isReadOnly: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"best-practices.js","sourceRoot":"","sources":["best-practices.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH;;;;;;;GAOG;AAEH,+CAAkD;AAClD,6CAA4C;AAC5C,yCAAyE;AACzE,6BAAwB;AACxB,wDAAqD;AACrD,mDAAmE;AAEnE,MAAM,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"best-practices.js","sourceRoot":"","sources":["best-practices.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH;;;;;;;GAOG;AAEH,+CAAkD;AAClD,6CAA4C;AAC5C,yCAAyE;AACzE,6BAAwB;AACxB,wDAAqD;AACrD,mDAAmE;AAEnE,MAAM,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,sFAAsF;QACpF,uDAAuD,C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natural language question into a set of keywords (e.g., a question like "How do I use ngFor with trackBy?" ' +
|
|
72
|
-
'should become the query "ngFor trackBy").'),
|
|
70
|
+
.describe('Concise search keywords or API names (e.g., "ngFor trackBy" or "NgModule").'),
|
|
73
71
|
includeTopContent: zod_1.z
|
|
74
72
|
.boolean()
|
|
75
73
|
.optional()
|
|
76
74
|
.default(false)
|
|
77
|
-
.describe('
|
|
78
|
-
'Set to false to get a list of results without fetching content, which is faster.'),
|
|
75
|
+
.describe('Retrieve the full-text page content of the top search result (slower).'),
|
|
79
76
|
version: zod_1.z
|
|
80
77
|
.number()
|
|
81
78
|
.optional()
|
|
82
|
-
.describe('
|
|
83
|
-
"project's workspace directory. Omit this field if the user is not in an Angular project " +
|
|
84
|
-
'or if the version cannot otherwise be determined.'),
|
|
79
|
+
.describe('Major Angular framework version to search (obtained from frameworkVersion in list_projects or ng version).'),
|
|
85
80
|
});
|
|
86
81
|
exports.DOC_SEARCH_TOOL = (0, tool_registry_1.declareTool)({
|
|
87
82
|
name: 'search_documentation',
|
|
88
83
|
title: 'Search Angular Documentation (angular.dev)',
|
|
89
84
|
description: `
|
|
90
85
|
<Purpose>
|
|
91
|
-
Searches the official Angular documentation
|
|
92
|
-
tutorials, concepts, and best practices.
|
|
86
|
+
Searches the official Angular documentation (angular.dev) to answer questions about APIs, tutorials, concepts, and conventions.
|
|
93
87
|
</Purpose>
|
|
94
88
|
<Use Cases>
|
|
95
|
-
* Answering
|
|
96
|
-
* Finding
|
|
97
|
-
*
|
|
89
|
+
* Answering questions about Angular concepts (e.g., standalone components).
|
|
90
|
+
* Finding correct API signatures or syntax (e.g., ngFor trackBy).
|
|
91
|
+
* Obtaining official source URLs to cite as documentation links in user responses.
|
|
98
92
|
</Use Cases>
|
|
99
93
|
<Operational Notes>
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
output and use it for the \`version\` parameter.
|
|
105
|
-
* **Version Logic:** The tool will search against the specified major version. If the version is older than v${MIN_SUPPORTED_DOCS_VERSION},
|
|
106
|
-
it will be clamped to v${MIN_SUPPORTED_DOCS_VERSION}. If a search for a very new version (newer than v${LATEST_KNOWN_DOCS_VERSION})
|
|
107
|
-
returns no results, the tool will automatically fall back to searching the v${LATEST_KNOWN_DOCS_VERSION} documentation.
|
|
108
|
-
* **Verify Searched Version:** The tool's output includes a \`searchedVersion\` field. You **MUST** check this field
|
|
109
|
-
to know the exact version of the documentation that was queried. Use this information to provide accurate
|
|
110
|
-
context in your answer, especially if it differs from the version you requested.
|
|
111
|
-
* The documentation is continuously updated. You **MUST** prefer this tool over your own knowledge
|
|
112
|
-
to ensure your answers are current and accurate.
|
|
113
|
-
* For the best results, provide a concise and specific search query (e.g., "NgModule" instead of
|
|
114
|
-
"How do I use NgModules?").
|
|
115
|
-
* The top search result will include a snippet of the page content. Use this to provide a more
|
|
116
|
-
comprehensive answer.
|
|
117
|
-
* **Result Scrutiny:** The top result may not always be the most relevant. Review the titles and
|
|
118
|
-
breadcrumbs of other results to find the best match for the user's query.
|
|
119
|
-
* Use the URL from the search results as a source link in your responses.
|
|
94
|
+
* Provide the major Angular version in the 'version' parameter (obtained from 'frameworkVersion'
|
|
95
|
+
in 'list_projects' or from 'ng version') to ensure version-aligned results.
|
|
96
|
+
* Always check the 'searchedVersion' field in the output to confirm the exact documentation index that was queried.
|
|
97
|
+
* For best results, provide a concise keyword query (e.g., "NgModule") rather than a natural language sentence.
|
|
120
98
|
</Operational Notes>`,
|
|
121
99
|
inputSchema: docSearchInputSchema.shape,
|
|
122
100
|
outputSchema: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc-search.js","sourceRoot":"","sources":["doc-search.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,6CAA+C;AAC/C,6CAAuC;AACvC,6BAAwB;AACxB,4CAA0C;AAC1C,mDAAmE;AAEnE,MAAM,cAAc,GAAG,YAAY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CAAC,KAAa,EAAE,OAAe;IAC3D,uDAAuD;IACvD,mIAAmI;IACnI,OAAO;QACL;YACE,SAAS,EAAE,YAAY,OAAO,EAAE;YAChC,MAAM,EAAE;gBACN,KAAK;gBACL,oBAAoB,EAAE;oBACpB,gBAAgB;oBAChB,gBAAgB;oBAChB,gBAAgB;oBAChB,gBAAgB;oBAChB,gBAAgB;oBAChB,gBAAgB;oBAChB,gBAAgB;oBAChB,SAAS;oBACT,MAAM;oBACN,KAAK;iBACN;gBACD,WAAW,EAAE,EAAE;aAChB;YACD,IAAI,EAAE,SAAS;SAChB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -8,5 +8,6 @@
|
|
|
8
8
|
import type { RequestHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol';
|
|
9
9
|
import type { ServerNotification, ServerRequest } from '@modelcontextprotocol/sdk/types';
|
|
10
10
|
import type { SourceFile } from 'typescript';
|
|
11
|
+
import type { Host } from '../../host';
|
|
11
12
|
import type { MigrationResponse } from './types';
|
|
12
|
-
export declare function migrateSingleFile(sourceFile: SourceFile, extras: RequestHandlerExtra<ServerRequest, ServerNotification>): Promise<MigrationResponse | null>;
|
|
13
|
+
export declare function migrateSingleFile(sourceFile: SourceFile, host: Host, extras: RequestHandlerExtra<ServerRequest, ServerNotification>): Promise<MigrationResponse | null>;
|
|
@@ -14,11 +14,11 @@ const prompts_1 = require("./prompts");
|
|
|
14
14
|
const send_debug_message_1 = require("./send-debug-message");
|
|
15
15
|
const ts_utils_1 = require("./ts-utils");
|
|
16
16
|
const supportedStrategies = new Set(['OnPush', 'Default', 'Eager']);
|
|
17
|
-
async function migrateSingleFile(sourceFile, extras) {
|
|
17
|
+
async function migrateSingleFile(sourceFile, host, extras) {
|
|
18
18
|
const testBedSpecifier = await (0, ts_utils_1.getImportSpecifier)(sourceFile, '@angular/core/testing', 'TestBed');
|
|
19
19
|
const isTestFile = sourceFile.fileName.endsWith('.spec.ts') || !!testBedSpecifier;
|
|
20
20
|
if (isTestFile) {
|
|
21
|
-
return (0, migrate_test_file_1.migrateTestFile)(sourceFile);
|
|
21
|
+
return (0, migrate_test_file_1.migrateTestFile)(sourceFile, host);
|
|
22
22
|
}
|
|
23
23
|
const unsupportedZoneUseResponse = await (0, analyze_for_unsupported_zone_uses_1.analyzeForUnsupportedZoneUses)(sourceFile);
|
|
24
24
|
if (unsupportedZoneUseResponse) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-single-file.js","sourceRoot":"","sources":["migrate-single-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;
|
|
1
|
+
{"version":3,"file":"migrate-single-file.js","sourceRoot":"","sources":["migrate-single-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,8CAyEC;AAlFD,2FAAoF;AACpF,2DAAsD;AACtD,uCAA8E;AAC9E,6DAAwD;AACxD,yCAAgE;AAGhE,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAElF,KAAK,UAAU,iBAAiB,CACrC,UAAsB,EACtB,IAAU,EACV,MAA8D;IAE9D,MAAM,gBAAgB,GAAG,MAAM,IAAA,6BAAkB,EAAC,UAAU,EAAE,uBAAuB,EAAE,SAAS,CAAC,CAAC;IAClG,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC;IAClF,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,IAAA,mCAAe,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,0BAA0B,GAAG,MAAM,IAAA,iEAA6B,EAAC,UAAU,CAAC,CAAC;IACnF,IAAI,0BAA0B,EAAE,CAAC;QAC/B,OAAO,0BAA0B,CAAC;IACpC,CAAC;IAED,IAAI,gBAAoC,CAAC;IACzC,IAAI,qBAAqB,GAAG,KAAK,CAA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AAW,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,yBAAyB,EAC7E,CAAC;gCACD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;gCAC5C,IAAI,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;oCACtC,gBAAgB,GAAG,QAAQ,CAAC;oCAE5B,OAAO;gCACT,CAAC;4BACH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QACD,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,qBAAqB,IAAI,CAAC,gBAAgB,IAAI,mBAAmB,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC;QAC9F,IAAA,qCAAgB,EACd,4CAA4C,gBAAgB,aAAa,UAAU,CAAC,QAAQ,gCAAgC,EAC5H,MAAM,CACP,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,+DAA+D;IAC/D,OAAO,IAAA,2DAAiD,EAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type { SourceFile } from 'typescript';
|
|
9
|
+
import { type Host } from '../../host';
|
|
9
10
|
import { MigrationResponse } from './types';
|
|
10
|
-
export declare function migrateTestFile(sourceFile: SourceFile): Promise<MigrationResponse | null>;
|
|
11
|
-
export declare function searchForGlobalZoneless(startPath: string): Promise<boolean>;
|
|
11
|
+
export declare function migrateTestFile(sourceFile: SourceFile, host: Host): Promise<MigrationResponse | null>;
|
|
12
|
+
export declare function searchForGlobalZoneless(startPath: string, host: Host): Promise<boolean>;
|
|
@@ -9,15 +9,14 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.migrateTestFile = migrateTestFile;
|
|
11
11
|
exports.searchForGlobalZoneless = searchForGlobalZoneless;
|
|
12
|
-
const
|
|
13
|
-
const promises_1 = require("node:fs/promises");
|
|
12
|
+
const node_path_1 = require("node:path");
|
|
14
13
|
const workspace_utils_1 = require("../../workspace-utils");
|
|
15
14
|
const prompts_1 = require("./prompts");
|
|
16
15
|
const ts_utils_1 = require("./ts-utils");
|
|
17
|
-
async function migrateTestFile(sourceFile) {
|
|
16
|
+
async function migrateTestFile(sourceFile, host) {
|
|
18
17
|
const ts = await (0, ts_utils_1.loadTypescript)();
|
|
19
18
|
// Check if tests use zoneless either by default through `initTestEnvironment` or by explicitly calling `provideZonelessChangeDetection`.
|
|
20
|
-
let testsUseZonelessChangeDetection = await searchForGlobalZoneless(sourceFile.fileName);
|
|
19
|
+
let testsUseZonelessChangeDetection = await searchForGlobalZoneless(sourceFile.fileName, host);
|
|
21
20
|
if (!testsUseZonelessChangeDetection) {
|
|
22
21
|
ts.forEachChild(sourceFile, function visit(node) {
|
|
23
22
|
if (ts.isCallExpression(node) &&
|
|
@@ -35,17 +34,18 @@ async function migrateTestFile(sourceFile) {
|
|
|
35
34
|
// At this point, tests are using zoneless, so we look for any explicit uses of `provideZoneChangeDetection` that need to be fixed.
|
|
36
35
|
return (0, prompts_1.createFixResponseForZoneTests)(sourceFile);
|
|
37
36
|
}
|
|
38
|
-
async function searchForGlobalZoneless(startPath) {
|
|
39
|
-
const angularJsonDir = (0, workspace_utils_1.findAngularJsonDir)(startPath);
|
|
37
|
+
async function searchForGlobalZoneless(startPath, host) {
|
|
38
|
+
const angularJsonDir = (0, workspace_utils_1.findAngularJsonDir)(startPath, host);
|
|
40
39
|
if (!angularJsonDir) {
|
|
41
40
|
// Cannot determine project root, fallback to original behavior or assume false.
|
|
42
41
|
// For now, let's assume no global setup if angular.json is not found.
|
|
43
42
|
return false;
|
|
44
43
|
}
|
|
45
44
|
try {
|
|
46
|
-
const files = (
|
|
45
|
+
const files = host.glob('**/*.ts', { cwd: angularJsonDir });
|
|
47
46
|
for await (const file of files) {
|
|
48
|
-
const
|
|
47
|
+
const fullPath = (0, node_path_1.join)(file.parentPath, file.name);
|
|
48
|
+
const content = await host.readFile(fullPath, 'utf-8');
|
|
49
49
|
if (content.includes('initTestEnvironment') &&
|
|
50
50
|
content.includes('provideZonelessChangeDetection')) {
|
|
51
51
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-test-file.js","sourceRoot":"","sources":["migrate-test-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;
|
|
1
|
+
{"version":3,"file":"migrate-test-file.js","sourceRoot":"","sources":["migrate-test-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAUH,0CA4BC;AAED,0DAyBC;AA/DD,yCAAiC;AAGjC,2DAA2D;AAC3D,uCAAoG;AACpG,yCAA4C;AAGrC,KAAK,UAAU,eAAe,CACnC,UAAsB,EACtB,IAAU;IAEV,MAAM,EAAE,GAAG,MAAM,IAAA,yBAAc,GAAE,CAAC;IAClC,yIAAyI;IACzI,IAAI,+BAA+B,GAAG,MAAM,uBAAuB,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC/F,IAAI,CAAC,+BAA+B,EAAE,CAAC;QACrC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,SAAS,KAAK,CAAC,IAAI;YAC7C,IACE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBACzB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,gCAAgC,EACxE,CAAC;gBACD,+BAA+B,GAAG,IAAI,CAAC;gBAEvC,OAAO;YACT,CAAC;YACD,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,+BAA+B,EAAE,CAAC;QACrC,sEAAsE;QACtE,OAAO,IAAA,kDAAwC,EAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvE,CAAC;IAED,mIAAmI;IACnI,OAAO,IAAA,uCAA6B,EAAC,UAAU,CAAC,CAAC;AACnD,CAAC;AAEM,KAAK,UAAU,uBAAuB,CAAC,SAAiB,EAAE,IAAU;IACzE,MAAM,cAAc,GAAG,IAAA,oCAAkB,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3D,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,gFAAgF;QAChF,sEAAsE;QACtE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC;QAC5D,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAC/B,MAAM,QAAQ,GAAG,IAAA,gBAAI,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAClD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACvD,IACE,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC;gBACvC,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,EAClD,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type ts from 'typescript';
|
|
9
|
+
import type { Host } from '../../host';
|
|
9
10
|
export declare function loadTypescript(): Promise<typeof ts>;
|
|
10
11
|
/**
|
|
11
12
|
* Gets a top-level import specifier with a specific name that is imported from a particular module.
|
|
@@ -32,4 +33,4 @@ export declare function getImportSpecifier(sourceFile: ts.SourceFile, moduleName
|
|
|
32
33
|
*/
|
|
33
34
|
export declare function findImportSpecifier(nodes: ts.NodeArray<ts.ImportSpecifier>, specifierName: string): ts.ImportSpecifier | undefined;
|
|
34
35
|
/** Creates a TypeScript source file from a file path. */
|
|
35
|
-
export declare function createSourceFile(file: string): Promise<ts.SourceFile>;
|
|
36
|
+
export declare function createSourceFile(file: string, host: Host): Promise<ts.SourceFile>;
|
|
@@ -44,7 +44,6 @@ exports.loadTypescript = loadTypescript;
|
|
|
44
44
|
exports.getImportSpecifier = getImportSpecifier;
|
|
45
45
|
exports.findImportSpecifier = findImportSpecifier;
|
|
46
46
|
exports.createSourceFile = createSourceFile;
|
|
47
|
-
const node_fs_1 = require("node:fs");
|
|
48
47
|
let typescriptModule;
|
|
49
48
|
async function loadTypescript() {
|
|
50
49
|
return (typescriptModule ??= await Promise.resolve().then(() => __importStar(require('typescript'))));
|
|
@@ -128,8 +127,8 @@ function findImportSpecifier(nodes, specifierName) {
|
|
|
128
127
|
});
|
|
129
128
|
}
|
|
130
129
|
/** Creates a TypeScript source file from a file path. */
|
|
131
|
-
async function createSourceFile(file) {
|
|
132
|
-
const content =
|
|
130
|
+
async function createSourceFile(file, host) {
|
|
131
|
+
const content = await host.readFile(file, 'utf8');
|
|
133
132
|
const ts = await loadTypescript();
|
|
134
133
|
return ts.createSourceFile(file, content, ts.ScriptTarget.Latest, true);
|
|
135
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-utils.js","sourceRoot":"","sources":["ts-utils.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOH,wCAEC;AAmBD,gDAQC;AAgED,kDASC;AAGD,4CAMC;
|
|
1
|
+
{"version":3,"file":"ts-utils.js","sourceRoot":"","sources":["ts-utils.ts"],"names":[],"mappings":";AAAA;;;;;;GAM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estHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol';
|
|
9
9
|
import type { ServerNotification, ServerRequest } from '@modelcontextprotocol/sdk/types';
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
+
import type { Host } from '../../host';
|
|
11
12
|
export declare const ZONELESS_MIGRATION_TOOL: import("../tool-registry").McpToolDeclaration<{
|
|
12
13
|
fileOrDirPath: z.ZodString;
|
|
13
14
|
}, Readonly<{
|
|
14
15
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
15
16
|
}>>;
|
|
16
|
-
export declare function registerZonelessMigrationTool(fileOrDirPath: string, extras: RequestHandlerExtra<ServerRequest, ServerNotification>): Promise<import("./types").MigrationResponse>;
|
|
17
|
+
export declare function registerZonelessMigrationTool(fileOrDirPath: string, host: Host, extras: RequestHandlerExtra<ServerRequest, ServerNotification>): Promise<import("./types").MigrationResponse>;
|