Fix build 22.0.x - #33238
Conversation
… CLI executable Update the Host abstraction inside the Model Context Protocol (MCP) layer to tighten the system shell surface and improve semantics. The generic spawn and execute methods are replaced with specialized counterparts that default to the Angular CLI, enabling stronger path security containment for developers while also clarifying the distinct control flows needed for buffered discrete commands and long-running background services.
Migrate the zoneless migration tool to use the Host abstraction for file system operations including reading files, checking stats, and globbing. This ensures that the tool adheres to the allowed roots configured in the MCP server. By removing direct dependencies on native Node.js fs modules, the tool now benefits from the centralized injection and restriction model provided by the Host implementation.
There was a problem hiding this comment.
Code Review
This pull request refactors the Host interface and its implementations to use more specific methods for executing Angular CLI commands, replacing generic runCommand and spawn calls with executeNgCommand and startNgProcess. It also migrates several tools and tests to use the Host abstraction for file system operations instead of direct node:fs calls. Feedback is provided regarding the host.glob implementation, which currently ignores the cwd option and lacks exclusion for node_modules, potentially leading to performance issues and incorrect file discovery during migrations.
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.