File tree Expand file tree Collapse file tree
packages/angular/cli/src/commands/mcp/tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ const TRANSFORMATIONS = [
9595 } ,
9696] as const ;
9797
98+ const ALL_TRANSFORMATIONS = TRANSFORMATIONS . map ( ( t ) => t . name ) ;
99+
98100export function registerModernizeTool ( server : McpServer ) : void {
99101 server . registerTool (
100102 'modernize' ,
@@ -132,7 +134,7 @@ export function registerModernizeTool(server: McpServer): void {
132134 // infers `ALL_TRANSFORMATIONS` as `string[]`. The `as` cast is a
133135 // workaround to satisfy Zod's type checker.
134136 transformations : z
135- . array ( z . enum ( TRANSFORMATIONS . map ( ( t ) => t . name ) as [ string , ...string [ ] ] ) )
137+ . array ( z . enum ( ALL_TRANSFORMATIONS as [ string , ...string [ ] ] ) )
136138 . optional ( ) ,
137139 mode : z
138140 . enum ( [ 'convert-to-standalone' , 'prune-ng-modules' , 'standalone-bootstrap' ] )
You can’t perform that action at this time.
0 commit comments