@angular/cli 22.2.1 → 22.3.0-next.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.
Files changed (377) hide show
  1. package/bin/ng.js +7 -10
  2. package/bin/version.js +98 -0
  3. package/index.d.ts +19 -0
  4. package/lib/chunk-5AASRQKS.js +85 -0
  5. package/lib/chunk-A2VIYA2E.js +165 -0
  6. package/lib/chunk-CAZUOCTC.js +225 -0
  7. package/lib/chunk-DHWVZMLH.js +206 -0
  8. package/lib/chunk-FZ5GFCWU.js +483 -0
  9. package/lib/chunk-G7TRU43D.js +42 -0
  10. package/lib/chunk-GHUUJYOY.js +40 -0
  11. package/lib/chunk-JBLF2TH3.js +267 -0
  12. package/lib/chunk-Q67GOPL7.js +380 -0
  13. package/lib/chunk-SN4KY4Z3.js +24 -0
  14. package/lib/chunk-XFL2J3CJ.js +24 -0
  15. package/lib/chunk-XG3HVNIL.js +59 -0
  16. package/lib/chunk-YM7ILCS5.js +2573 -0
  17. package/lib/cli/index.js +353 -105
  18. package/lib/cli-4CMZ6KMR.js +48 -0
  19. package/lib/cli-4Q7DGTBA.js +33 -0
  20. package/lib/cli-6AHY7ADW.js +96 -0
  21. package/lib/cli-A5UAJDO6.js +135 -0
  22. package/lib/cli-ACLGUIBI.js +2531 -0
  23. package/lib/cli-BQRFWIMG.js +35 -0
  24. package/lib/cli-CWICUPZW.js +42 -0
  25. package/lib/cli-DWQUM3M2.js +29 -0
  26. package/lib/cli-L4TM4JH3.js +88 -0
  27. package/lib/cli-LYBZEMDR.js +96 -0
  28. package/lib/cli-PDCEX7HQ.js +605 -0
  29. package/lib/cli-PJVTDBQM.js +51 -0
  30. package/lib/cli-PRIRL3WP.js +185 -0
  31. package/lib/cli-PU5VH7JB.js +189 -0
  32. package/lib/cli-QUH44NUB.js +68 -0
  33. package/lib/cli-VVITNTBC.js +50 -0
  34. package/lib/cli-XM4L4PP4.js +1651 -0
  35. package/lib/cli-Y2ECUR33.js +33 -0
  36. package/lib/cli-YDSMJOSO.js +182 -0
  37. package/lib/color-SJPGXZVA.js +8 -0
  38. package/lib/config/schema.json +204 -0
  39. package/lib/config-QXK7SSVG.js +22 -0
  40. package/lib/init.js +91 -180
  41. package/package.json +20 -15
  42. package/lib/cli/index.d.ts +0 -11
  43. package/lib/cli/index.js.map +0 -1
  44. package/lib/config/workspace-schema.d.ts +0 -1025
  45. package/lib/config/workspace-schema.js +0 -131
  46. package/lib/config/workspace-schema.js.map +0 -1
  47. package/lib/init.d.ts +0 -8
  48. package/lib/init.js.map +0 -1
  49. package/src/analytics/analytics-collector.d.ts +0 -35
  50. package/src/analytics/analytics-collector.js +0 -195
  51. package/src/analytics/analytics-collector.js.map +0 -1
  52. package/src/analytics/analytics-parameters.d.ts +0 -101
  53. package/src/analytics/analytics-parameters.js +0 -107
  54. package/src/analytics/analytics-parameters.js.map +0 -1
  55. package/src/analytics/analytics.d.ts +0 -27
  56. package/src/analytics/analytics.js +0 -183
  57. package/src/analytics/analytics.js.map +0 -1
  58. package/src/command-builder/architect-base-command-module.d.ts +0 -30
  59. package/src/command-builder/architect-base-command-module.js +0 -244
  60. package/src/command-builder/architect-base-command-module.js.map +0 -1
  61. package/src/command-builder/architect-command-module.d.ts +0 -28
  62. package/src/command-builder/architect-command-module.js +0 -218
  63. package/src/command-builder/architect-command-module.js.map +0 -1
  64. package/src/command-builder/command-module.d.ts +0 -73
  65. package/src/command-builder/command-module.js +0 -260
  66. package/src/command-builder/command-module.js.map +0 -1
  67. package/src/command-builder/command-runner.d.ts +0 -9
  68. package/src/command-builder/command-runner.js +0 -202
  69. package/src/command-builder/command-runner.js.map +0 -1
  70. package/src/command-builder/definitions.d.ts +0 -41
  71. package/src/command-builder/definitions.js +0 -20
  72. package/src/command-builder/definitions.js.map +0 -1
  73. package/src/command-builder/schematics-command-module.d.ts +0 -41
  74. package/src/command-builder/schematics-command-module.js +0 -408
  75. package/src/command-builder/schematics-command-module.js.map +0 -1
  76. package/src/command-builder/utilities/command.d.ts +0 -13
  77. package/src/command-builder/utilities/command.js +0 -39
  78. package/src/command-builder/utilities/command.js.map +0 -1
  79. package/src/command-builder/utilities/json-help.d.ts +0 -37
  80. package/src/command-builder/utilities/json-help.js +0 -92
  81. package/src/command-builder/utilities/json-help.js.map +0 -1
  82. package/src/command-builder/utilities/json-schema.d.ts +0 -64
  83. package/src/command-builder/utilities/json-schema.js +0 -349
  84. package/src/command-builder/utilities/json-schema.js.map +0 -1
  85. package/src/command-builder/utilities/normalize-options-middleware.d.ts +0 -18
  86. package/src/command-builder/utilities/normalize-options-middleware.js +0 -37
  87. package/src/command-builder/utilities/normalize-options-middleware.js.map +0 -1
  88. package/src/command-builder/utilities/schematic-engine-host.d.ts +0 -15
  89. package/src/command-builder/utilities/schematic-engine-host.js +0 -179
  90. package/src/command-builder/utilities/schematic-engine-host.js.map +0 -1
  91. package/src/command-builder/utilities/schematic-workflow.d.ts +0 -14
  92. package/src/command-builder/utilities/schematic-workflow.js +0 -70
  93. package/src/command-builder/utilities/schematic-workflow.js.map +0 -1
  94. package/src/commands/add/cli.d.ts +0 -41
  95. package/src/commands/add/cli.js +0 -705
  96. package/src/commands/add/cli.js.map +0 -1
  97. package/src/commands/add/long-description.md +0 -7
  98. package/src/commands/analytics/cli.d.ts +0 -16
  99. package/src/commands/analytics/cli.js +0 -34
  100. package/src/commands/analytics/cli.js.map +0 -1
  101. package/src/commands/analytics/info/cli.d.ts +0 -16
  102. package/src/commands/analytics/info/cli.js +0 -25
  103. package/src/commands/analytics/info/cli.js.map +0 -1
  104. package/src/commands/analytics/long-description.md +0 -20
  105. package/src/commands/analytics/settings/cli.d.ts +0 -35
  106. package/src/commands/analytics/settings/cli.js +0 -54
  107. package/src/commands/analytics/settings/cli.js.map +0 -1
  108. package/src/commands/build/cli.d.ts +0 -16
  109. package/src/commands/build/cli.js +0 -21
  110. package/src/commands/build/cli.js.map +0 -1
  111. package/src/commands/build/long-description.md +0 -18
  112. package/src/commands/cache/clean/cli.d.ts +0 -17
  113. package/src/commands/cache/clean/cli.js +0 -32
  114. package/src/commands/cache/clean/cli.js.map +0 -1
  115. package/src/commands/cache/cli.d.ts +0 -17
  116. package/src/commands/cache/cli.js +0 -36
  117. package/src/commands/cache/cli.js.map +0 -1
  118. package/src/commands/cache/info/cli.d.ts +0 -20
  119. package/src/commands/cache/info/cli.js +0 -139
  120. package/src/commands/cache/info/cli.js.map +0 -1
  121. package/src/commands/cache/long-description.md +0 -53
  122. package/src/commands/cache/settings/cli.d.ts +0 -27
  123. package/src/commands/cache/settings/cli.js +0 -41
  124. package/src/commands/cache/settings/cli.js.map +0 -1
  125. package/src/commands/cache/utilities.d.ts +0 -11
  126. package/src/commands/cache/utilities.js +0 -90
  127. package/src/commands/cache/utilities.js.map +0 -1
  128. package/src/commands/command-config.d.ts +0 -17
  129. package/src/commands/command-config.js +0 -116
  130. package/src/commands/command-config.js.map +0 -1
  131. package/src/commands/completion/cli.d.ts +0 -16
  132. package/src/commands/completion/cli.js +0 -61
  133. package/src/commands/completion/cli.js.map +0 -1
  134. package/src/commands/completion/long-description.md +0 -67
  135. package/src/commands/config/cli.d.ts +0 -24
  136. package/src/commands/config/cli.js +0 -150
  137. package/src/commands/config/cli.js.map +0 -1
  138. package/src/commands/config/long-description.md +0 -13
  139. package/src/commands/deploy/cli.d.ts +0 -17
  140. package/src/commands/deploy/cli.js +0 -38
  141. package/src/commands/deploy/cli.js.map +0 -1
  142. package/src/commands/deploy/long-description.md +0 -22
  143. package/src/commands/e2e/cli.d.ts +0 -18
  144. package/src/commands/e2e/cli.js +0 -42
  145. package/src/commands/e2e/cli.js.map +0 -1
  146. package/src/commands/extract-i18n/cli.d.ts +0 -17
  147. package/src/commands/extract-i18n/cli.js +0 -48
  148. package/src/commands/extract-i18n/cli.js.map +0 -1
  149. package/src/commands/generate/cli.d.ts +0 -47
  150. package/src/commands/generate/cli.js +0 -189
  151. package/src/commands/generate/cli.js.map +0 -1
  152. package/src/commands/lint/cli.d.ts +0 -17
  153. package/src/commands/lint/cli.js +0 -25
  154. package/src/commands/lint/cli.js.map +0 -1
  155. package/src/commands/lint/long-description.md +0 -20
  156. package/src/commands/make-this-awesome/cli.d.ts +0 -17
  157. package/src/commands/make-this-awesome/cli.js +0 -36
  158. package/src/commands/make-this-awesome/cli.js.map +0 -1
  159. package/src/commands/mcp/cli.d.ts +0 -21
  160. package/src/commands/mcp/cli.js +0 -74
  161. package/src/commands/mcp/cli.js.map +0 -1
  162. package/src/commands/mcp/constants.d.ts +0 -10
  163. package/src/commands/mcp/constants.js +0 -16
  164. package/src/commands/mcp/constants.js.map +0 -1
  165. package/src/commands/mcp/devserver.d.ts +0 -85
  166. package/src/commands/mcp/devserver.js +0 -109
  167. package/src/commands/mcp/devserver.js.map +0 -1
  168. package/src/commands/mcp/host.d.ts +0 -103
  169. package/src/commands/mcp/host.js +0 -270
  170. package/src/commands/mcp/host.js.map +0 -1
  171. package/src/commands/mcp/mcp-server.d.ts +0 -38
  172. package/src/commands/mcp/mcp-server.js +0 -176
  173. package/src/commands/mcp/mcp-server.js.map +0 -1
  174. package/src/commands/mcp/resources/ai-tutor.md +0 -822
  175. package/src/commands/mcp/resources/best-practices.md +0 -59
  176. package/src/commands/mcp/resources/instructions.d.ts +0 -9
  177. package/src/commands/mcp/resources/instructions.js +0 -26
  178. package/src/commands/mcp/resources/instructions.js.map +0 -1
  179. package/src/commands/mcp/shared-options.d.ts +0 -12
  180. package/src/commands/mcp/shared-options.js +0 -22
  181. package/src/commands/mcp/shared-options.js.map +0 -1
  182. package/src/commands/mcp/tools/ai-tutor.d.ts +0 -12
  183. package/src/commands/mcp/tools/ai-tutor.js +0 -59
  184. package/src/commands/mcp/tools/ai-tutor.js.map +0 -1
  185. package/src/commands/mcp/tools/best-practices.d.ts +0 -13
  186. package/src/commands/mcp/tools/best-practices.js +0 -196
  187. package/src/commands/mcp/tools/best-practices.js.map +0 -1
  188. package/src/commands/mcp/tools/devserver/devserver-start.d.ts +0 -32
  189. package/src/commands/mcp/tools/devserver/devserver-start.js +0 -110
  190. package/src/commands/mcp/tools/devserver/devserver-start.js.map +0 -1
  191. package/src/commands/mcp/tools/devserver/devserver-stop.d.ts +0 -31
  192. package/src/commands/mcp/tools/devserver/devserver-stop.js +0 -69
  193. package/src/commands/mcp/tools/devserver/devserver-stop.js.map +0 -1
  194. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.d.ts +0 -41
  195. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js +0 -105
  196. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js.map +0 -1
  197. package/src/commands/mcp/tools/doc-search.d.ts +0 -21
  198. package/src/commands/mcp/tools/doc-search.js +0 -307
  199. package/src/commands/mcp/tools/doc-search.js.map +0 -1
  200. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.d.ts +0 -17
  201. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js +0 -62
  202. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js.map +0 -1
  203. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.d.ts +0 -12
  204. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js +0 -70
  205. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js.map +0 -1
  206. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.d.ts +0 -12
  207. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js +0 -60
  208. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js.map +0 -1
  209. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.d.ts +0 -15
  210. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js +0 -238
  211. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js.map +0 -1
  212. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.d.ts +0 -9
  213. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js +0 -14
  214. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js.map +0 -1
  215. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.d.ts +0 -36
  216. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js +0 -135
  217. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js.map +0 -1
  218. package/src/commands/mcp/tools/onpush-zoneless-migration/types.d.ts +0 -13
  219. package/src/commands/mcp/tools/onpush-zoneless-migration/types.js +0 -10
  220. package/src/commands/mcp/tools/onpush-zoneless-migration/types.js.map +0 -1
  221. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.d.ts +0 -16
  222. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js +0 -215
  223. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js.map +0 -1
  224. package/src/commands/mcp/tools/projects.d.ts +0 -48
  225. package/src/commands/mcp/tools/projects.js +0 -541
  226. package/src/commands/mcp/tools/projects.js.map +0 -1
  227. package/src/commands/mcp/tools/run-target/build-target-strategy.d.ts +0 -14
  228. package/src/commands/mcp/tools/run-target/build-target-strategy.js +0 -53
  229. package/src/commands/mcp/tools/run-target/build-target-strategy.js.map +0 -1
  230. package/src/commands/mcp/tools/run-target/generic-target-strategy.d.ts +0 -14
  231. package/src/commands/mcp/tools/run-target/generic-target-strategy.js +0 -63
  232. package/src/commands/mcp/tools/run-target/generic-target-strategy.js.map +0 -1
  233. package/src/commands/mcp/tools/run-target/options-serializer.d.ts +0 -13
  234. package/src/commands/mcp/tools/run-target/options-serializer.js +0 -41
  235. package/src/commands/mcp/tools/run-target/options-serializer.js.map +0 -1
  236. package/src/commands/mcp/tools/run-target/run-target.d.ts +0 -34
  237. package/src/commands/mcp/tools/run-target/run-target.js +0 -69
  238. package/src/commands/mcp/tools/run-target/run-target.js.map +0 -1
  239. package/src/commands/mcp/tools/run-target/strategy.d.ts +0 -15
  240. package/src/commands/mcp/tools/run-target/strategy.js +0 -10
  241. package/src/commands/mcp/tools/run-target/strategy.js.map +0 -1
  242. package/src/commands/mcp/tools/run-target/types.d.ts +0 -39
  243. package/src/commands/mcp/tools/run-target/types.js +0 -41
  244. package/src/commands/mcp/tools/run-target/types.js.map +0 -1
  245. package/src/commands/mcp/tools/run-target/unit-test-strategy.d.ts +0 -14
  246. package/src/commands/mcp/tools/run-target/unit-test-strategy.js +0 -56
  247. package/src/commands/mcp/tools/run-target/unit-test-strategy.js.map +0 -1
  248. package/src/commands/mcp/tools/tool-registry.d.ts +0 -40
  249. package/src/commands/mcp/tools/tool-registry.js +0 -40
  250. package/src/commands/mcp/tools/tool-registry.js.map +0 -1
  251. package/src/commands/mcp/utils.d.ts +0 -25
  252. package/src/commands/mcp/utils.js +0 -44
  253. package/src/commands/mcp/utils.js.map +0 -1
  254. package/src/commands/mcp/workspace-utils.d.ts +0 -55
  255. package/src/commands/mcp/workspace-utils.js +0 -181
  256. package/src/commands/mcp/workspace-utils.js.map +0 -1
  257. package/src/commands/new/cli.d.ts +0 -27
  258. package/src/commands/new/cli.js +0 -76
  259. package/src/commands/new/cli.js.map +0 -1
  260. package/src/commands/new/long-description.md +0 -15
  261. package/src/commands/run/cli.d.ts +0 -25
  262. package/src/commands/run/cli.js +0 -89
  263. package/src/commands/run/cli.js.map +0 -1
  264. package/src/commands/run/long-description.md +0 -10
  265. package/src/commands/serve/cli.d.ts +0 -16
  266. package/src/commands/serve/cli.js +0 -20
  267. package/src/commands/serve/cli.js.map +0 -1
  268. package/src/commands/test/cli.d.ts +0 -16
  269. package/src/commands/test/cli.js +0 -21
  270. package/src/commands/test/cli.js.map +0 -1
  271. package/src/commands/test/long-description.md +0 -2
  272. package/src/commands/update/cli.d.ts +0 -50
  273. package/src/commands/update/cli.js +0 -586
  274. package/src/commands/update/cli.js.map +0 -1
  275. package/src/commands/update/long-description.md +0 -22
  276. package/src/commands/update/update-resolver.d.ts +0 -75
  277. package/src/commands/update/update-resolver.js +0 -918
  278. package/src/commands/update/update-resolver.js.map +0 -1
  279. package/src/commands/update/utilities/cli-version.d.ts +0 -48
  280. package/src/commands/update/utilities/cli-version.js +0 -196
  281. package/src/commands/update/utilities/cli-version.js.map +0 -1
  282. package/src/commands/update/utilities/constants.d.ts +0 -12
  283. package/src/commands/update/utilities/constants.js +0 -16
  284. package/src/commands/update/utilities/constants.js.map +0 -1
  285. package/src/commands/update/utilities/git.d.ts +0 -36
  286. package/src/commands/update/utilities/git.js +0 -148
  287. package/src/commands/update/utilities/git.js.map +0 -1
  288. package/src/commands/update/utilities/migration.d.ts +0 -32
  289. package/src/commands/update/utilities/migration.js +0 -271
  290. package/src/commands/update/utilities/migration.js.map +0 -1
  291. package/src/commands/version/cli.d.ts +0 -36
  292. package/src/commands/version/cli.js +0 -117
  293. package/src/commands/version/cli.js.map +0 -1
  294. package/src/commands/version/version-info.d.ts +0 -46
  295. package/src/commands/version/version-info.js +0 -101
  296. package/src/commands/version/version-info.js.map +0 -1
  297. package/src/package-managers/discovery.d.ts +0 -23
  298. package/src/package-managers/discovery.js +0 -104
  299. package/src/package-managers/discovery.js.map +0 -1
  300. package/src/package-managers/error.d.ts +0 -43
  301. package/src/package-managers/error.js +0 -41
  302. package/src/package-managers/error.js.map +0 -1
  303. package/src/package-managers/factory.d.ts +0 -30
  304. package/src/package-managers/factory.js +0 -137
  305. package/src/package-managers/factory.js.map +0 -1
  306. package/src/package-managers/host.d.ts +0 -86
  307. package/src/package-managers/host.js +0 -91
  308. package/src/package-managers/host.js.map +0 -1
  309. package/src/package-managers/index.d.ts +0 -13
  310. package/src/package-managers/index.js +0 -17
  311. package/src/package-managers/index.js.map +0 -1
  312. package/src/package-managers/logger.d.ts +0 -27
  313. package/src/package-managers/logger.js +0 -10
  314. package/src/package-managers/logger.js.map +0 -1
  315. package/src/package-managers/package-manager-descriptor.d.ts +0 -269
  316. package/src/package-managers/package-manager-descriptor.js +0 -210
  317. package/src/package-managers/package-manager-descriptor.js.map +0 -1
  318. package/src/package-managers/package-manager.d.ts +0 -200
  319. package/src/package-managers/package-manager.js +0 -720
  320. package/src/package-managers/package-manager.js.map +0 -1
  321. package/src/package-managers/package-metadata.d.ts +0 -91
  322. package/src/package-managers/package-metadata.js +0 -10
  323. package/src/package-managers/package-metadata.js.map +0 -1
  324. package/src/package-managers/package-tree.d.ts +0 -23
  325. package/src/package-managers/package-tree.js +0 -10
  326. package/src/package-managers/package-tree.js.map +0 -1
  327. package/src/package-managers/parsers.d.ts +0 -167
  328. package/src/package-managers/parsers.js +0 -674
  329. package/src/package-managers/parsers.js.map +0 -1
  330. package/src/utilities/color.d.ts +0 -23
  331. package/src/utilities/color.js +0 -41
  332. package/src/utilities/color.js.map +0 -1
  333. package/src/utilities/completion.d.ts +0 -30
  334. package/src/utilities/completion.js +0 -270
  335. package/src/utilities/completion.js.map +0 -1
  336. package/src/utilities/config.d.ts +0 -38
  337. package/src/utilities/config.js +0 -368
  338. package/src/utilities/config.js.map +0 -1
  339. package/src/utilities/environment-options.d.ts +0 -25
  340. package/src/utilities/environment-options.js +0 -60
  341. package/src/utilities/environment-options.js.map +0 -1
  342. package/src/utilities/eol.d.ts +0 -20
  343. package/src/utilities/eol.js +0 -35
  344. package/src/utilities/eol.js.map +0 -1
  345. package/src/utilities/error.d.ts +0 -18
  346. package/src/utilities/error.js +0 -41
  347. package/src/utilities/error.js.map +0 -1
  348. package/src/utilities/find-up.d.ts +0 -21
  349. package/src/utilities/find-up.js +0 -67
  350. package/src/utilities/find-up.js.map +0 -1
  351. package/src/utilities/json-file.d.ts +0 -24
  352. package/src/utilities/json-file.js +0 -179
  353. package/src/utilities/json-file.js.map +0 -1
  354. package/src/utilities/log-file.d.ts +0 -13
  355. package/src/utilities/log-file.js +0 -28
  356. package/src/utilities/log-file.js.map +0 -1
  357. package/src/utilities/memoize.d.ts +0 -15
  358. package/src/utilities/memoize.js +0 -64
  359. package/src/utilities/memoize.js.map +0 -1
  360. package/src/utilities/node-version.d.ts +0 -21
  361. package/src/utilities/node-version.js +0 -65
  362. package/src/utilities/node-version.js.map +0 -1
  363. package/src/utilities/prettier.d.ts +0 -19
  364. package/src/utilities/prettier.js +0 -105
  365. package/src/utilities/prettier.js.map +0 -1
  366. package/src/utilities/project.d.ts +0 -8
  367. package/src/utilities/project.js +0 -81
  368. package/src/utilities/project.js.map +0 -1
  369. package/src/utilities/prompt.d.ts +0 -17
  370. package/src/utilities/prompt.js +0 -90
  371. package/src/utilities/prompt.js.map +0 -1
  372. package/src/utilities/tty.d.ts +0 -16
  373. package/src/utilities/tty.js +0 -23
  374. package/src/utilities/tty.js.map +0 -1
  375. package/src/utilities/version.d.ts +0 -16
  376. package/src/utilities/version.js +0 -26
  377. package/src/utilities/version.js.map +0 -1
@@ -1,59 +0,0 @@
1
- You are an expert in TypeScript, Angular, and scalable web application development. You write functional, maintainable, performant, and accessible code following Angular and TypeScript best practices.
2
-
3
- ## TypeScript Best Practices
4
-
5
- - Use strict type checking
6
- - Prefer type inference when the type is obvious
7
- - Avoid the `any` type; use `unknown` when type is uncertain
8
-
9
- ## Angular Best Practices
10
-
11
- - Always use standalone components over NgModules
12
- - Must NOT set `standalone: true` inside Angular decorators. It's the default in Angular v20+.
13
- - Do NOT set `changeDetection: ChangeDetectionStrategy.OnPush` explicitly. `OnPush` is the default in Angular v22+.
14
- - Use signals for state management
15
- - Implement lazy loading for feature routes
16
- - Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
17
- - Use `NgOptimizedImage` for all static images.
18
- - `NgOptimizedImage` does not work for inline base64 images.
19
-
20
- ## Accessibility Requirements
21
-
22
- - It MUST pass all AXE checks.
23
- - It MUST follow all WCAG AA minimums, including focus management, color contrast, and ARIA attributes.
24
-
25
- ### Components
26
-
27
- - Keep components small and focused on a single responsibility
28
- - Use `input()` and `output()` functions instead of decorators
29
- - Use `model()` for two-way bound properties with `[(prop)]` syntax instead of pairing `input()` with `output()`
30
- - Use `computed()` for derived state
31
- - Use `linkedSignal()` for state derived from multiple reactive sources that must stay synchronized
32
- - Prefer inline templates for small components
33
- - Prefer Signal Forms (`@angular/forms/signals`) for new forms. They are stable in Angular v22+ and provide signal-based state, type-safe field access, and schema-based validation
34
- - When not using Signal Forms, prefer Reactive forms instead of Template-driven ones
35
- - Do NOT use `ngClass`, use `class` bindings instead
36
- - Do NOT use `ngStyle`, use `style` bindings instead
37
- - Do NOT import `CommonModule`, import only the directives and pipes the template uses, such as `AsyncPipe` or `DatePipe`
38
- - When using external templates/styles, use paths relative to the component TS file.
39
-
40
- ## State Management
41
-
42
- - Use signals for local component state
43
- - Use `computed()` for derived state
44
- - Keep state transformations pure and predictable
45
- - Do NOT use `mutate` on signals, use `update` or `set` instead
46
-
47
- ## Templates
48
-
49
- - Keep templates simple and avoid complex logic
50
- - Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
51
- - Use the async pipe to handle observables
52
- - Do not assume globals like (`new Date()`) are available.
53
-
54
- ## Services
55
-
56
- - Design services around a single responsibility
57
- - Use the `providedIn: 'root'` option for singleton services
58
- - Prefer the `@Service` decorator over `@Injectable({providedIn: 'root'})` for new singleton services (Angular v22+)
59
- - Use the `inject()` function instead of constructor injection
@@ -1,9 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import type { McpServer } from '@modelcontextprotocol/server';
9
- export declare function registerInstructionsResource(server: McpServer): void;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.registerInstructionsResource = registerInstructionsResource;
11
- const promises_1 = require("node:fs/promises");
12
- const node_path_1 = require("node:path");
13
- function registerInstructionsResource(server) {
14
- server.registerResource('instructions', 'instructions://best-practices', {
15
- title: 'Angular Best Practices and Code Generation Guide',
16
- description: "A comprehensive guide detailing Angular's best practices for code generation and development." +
17
- ' This guide should be used as a reference by an LLM to ensure any generated code' +
18
- ' adheres to modern Angular standards, including the use of standalone components,' +
19
- ' typed forms, modern control flow syntax, and other current conventions.',
20
- mimeType: 'text/markdown',
21
- }, async () => {
22
- const text = await (0, promises_1.readFile)((0, node_path_1.join)(__dirname, 'best-practices.md'), 'utf-8');
23
- return { contents: [{ uri: 'instructions://best-practices', text }] };
24
- });
25
- }
26
- //# sourceMappingURL=instructions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["instructions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAMH,oEAmBC;AAtBD,+CAA4C;AAC5C,yCAAiC;AAEjC,SAAgB,4BAA4B,CAAC,MAAiB;IAC5D,MAAM,CAAC,gBAAgB,CACrB,cAAc,EACd,+BAA+B,EAC/B;QACE,KAAK,EAAE,kDAAkD;QACzD,WAAW,EACT,+FAA+F;YAC/F,kFAAkF;YAClF,mFAAmF;YACnF,0EAA0E;QAC5E,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,mBAAmB,CAAC,EAAE,OAAO,CAAC,CAAC;QAE3E,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,+BAA+B,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACxE,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { z } from 'zod';
9
- export declare const workspaceAndProjectOptions: {
10
- workspace: z.ZodOptional<z.ZodString>;
11
- project: z.ZodOptional<z.ZodString>;
12
- };
@@ -1,22 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.workspaceAndProjectOptions = void 0;
11
- const zod_1 = require("zod");
12
- exports.workspaceAndProjectOptions = {
13
- workspace: zod_1.z
14
- .string()
15
- .optional()
16
- .describe('The path to the workspace directory (containing angular.json). If not provided, uses the current directory.'),
17
- project: zod_1.z
18
- .string()
19
- .optional()
20
- .describe('Which project to target in a monorepo context. If not provided, targets the default project.'),
21
- };
22
- //# sourceMappingURL=shared-options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-options.js","sourceRoot":"","sources":["shared-options.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,6BAAwB;AAEX,QAAA,0BAA0B,GAAG;IACxC,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,6GAA6G,CAC9G;IACH,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,8FAA8F,CAC/F;CACJ,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- export declare const AI_TUTOR_TOOL: import("./tool-registry").McpToolDeclaration<Readonly<{
9
- [k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
10
- }>, Readonly<{
11
- [k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
12
- }>>;
@@ -1,59 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AI_TUTOR_TOOL = void 0;
11
- const promises_1 = require("node:fs/promises");
12
- const node_path_1 = require("node:path");
13
- const tool_registry_1 = require("./tool-registry");
14
- exports.AI_TUTOR_TOOL = (0, tool_registry_1.declareTool)({
15
- name: 'ai_tutor',
16
- title: 'Start Angular AI Tutor',
17
- description: `
18
- <Purpose>
19
- Loads the core instructions, curriculum, and persona for the Angular AI Tutor.
20
- This tool acts as a RAG (Retrieval-Augmented Generation) source, effectively
21
- reprogramming the assistant to become a specialized Angular tutor by providing it
22
- with a new core identity and knowledge base.
23
- </Purpose>
24
- <Use Cases>
25
- * The user asks to start a guided, step-by-step tutorial for learning Angular (e.g., "teach me Angular," "start the tutorial").
26
- * The user asks to resume a previous tutoring session.
27
- </Use Cases>
28
- <Operational Notes>
29
- * The text returned by this tool is a new set of instructions and rules for you, the LLM. It is NOT meant to be displayed to the user.
30
- * After invoking this tool, you MUST adopt the persona of the Angular AI Tutor and follow the curriculum provided in the text.
31
- * Be aware that the tutor persona supports special user commands, such as "skip this section," "show the table of contents,"
32
- or "set my experience level to beginner." The curriculum text will provide the full details on how to handle these.
33
- * Your subsequent responses should be governed by these new instructions, leading the user through the "Smart Recipe Box"
34
- application tutorial.
35
- * As the tutor, you will use your other tools to access the user's project files to verify their solutions as instructed by the curriculum.
36
- </Operational Notes>
37
- `,
38
- isReadOnly: true,
39
- isLocalOnly: true,
40
- factory: () => {
41
- let aiTutorText;
42
- return async () => {
43
- aiTutorText ??= await (0, promises_1.readFile)((0, node_path_1.join)(__dirname, '../resources/ai-tutor.md'), 'utf-8');
44
- return {
45
- content: [
46
- {
47
- type: 'text',
48
- text: aiTutorText,
49
- annotations: {
50
- audience: ['assistant'],
51
- priority: 1.0,
52
- },
53
- },
54
- ],
55
- };
56
- };
57
- },
58
- });
59
- //# sourceMappingURL=ai-tutor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-tutor.js","sourceRoot":"","sources":["ai-tutor.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAA4C;AAC5C,yCAAiC;AACjC,mDAA8C;AAEjC,QAAA,aAAa,GAAG,IAAA,2BAAW,EAAC;IACvC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;CAoBd;IACC,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,GAAG,EAAE;QACZ,IAAI,WAAmB,CAAC;QAExB,OAAO,KAAK,IAAI,EAAE;YAChB,WAAW,KAAK,MAAM,IAAA,mBAAQ,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,0BAA0B,CAAC,EAAE,OAAO,CAAC,CAAC;YAErF,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,WAAW;wBACjB,WAAW,EAAE;4BACX,QAAQ,EAAE,CAAC,WAAW,CAAC;4BACvB,QAAQ,EAAE,GAAG;yBACd;qBACF;iBACF;aACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { z } from 'zod';
9
- export declare const BEST_PRACTICES_TOOL: import("./tool-registry").McpToolDeclaration<{
10
- workspacePath: z.ZodOptional<z.ZodString>;
11
- }, Readonly<{
12
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
13
- }>>;
@@ -1,196 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BEST_PRACTICES_TOOL = void 0;
11
- /**
12
- * @fileoverview
13
- * This file defines the `get_best_practices` MCP tool. The tool is designed to be version-aware,
14
- * dynamically resolving the best practices guide from the user's installed version of
15
- * `@angular/core`. It achieves this by reading a custom `angular` metadata block in the
16
- * framework's `package.json`. If this resolution fails, it gracefully falls back to a generic
17
- * guide bundled with the Angular CLI.
18
- */
19
- const promises_1 = require("node:fs/promises");
20
- const node_module_1 = require("node:module");
21
- const node_path_1 = require("node:path");
22
- const zod_1 = require("zod");
23
- const version_1 = require("../../../utilities/version");
24
- const workspace_utils_1 = require("../workspace-utils");
25
- const tool_registry_1 = require("./tool-registry");
26
- const bestPracticesInputSchema = zod_1.z.object({
27
- workspacePath: zod_1.z
28
- .string()
29
- .optional()
30
- .describe('Absolute path to the angular.json workspace directory (obtained via list_projects). ' +
31
- 'If omitted, returns the generic best practices guide.'),
32
- });
33
- exports.BEST_PRACTICES_TOOL = (0, tool_registry_1.declareTool)({
34
- name: 'get_best_practices',
35
- title: 'Get Angular Coding Best Practices Guide',
36
- description: `
37
- <Purpose>
38
- Retrieves the official Angular Best Practices Guide. This guide contains the essential rules and conventions
39
- that must be followed for any task involving the creation, analysis, or modification of Angular code.
40
- </Purpose>
41
- <Use Cases>
42
- * Mandatory first step before writing or modifying Angular code to ensure modern framework standards.
43
- * Learn about standalone components, typed forms, and modern control flow syntax (@if, @for, @switch).
44
- * Verify existing code aligns with current conventions before making edits.
45
- </Use Cases>
46
- <Operational Notes>
47
- * Provide the 'workspacePath' argument (obtained via 'list_projects') to load the version-specific
48
- guide matching the project's Angular framework.
49
- * Omit 'workspacePath' only for general learning queries or when no project context is available to load the latest generic guide.
50
- </Operational Notes>`,
51
- inputSchema: bestPracticesInputSchema.shape,
52
- isReadOnly: true,
53
- isLocalOnly: true,
54
- factory: createBestPracticesHandler,
55
- });
56
- /**
57
- * Retrieves the content of the generic best practices guide that is bundled with the CLI.
58
- * This serves as a fallback when a version-specific guide cannot be found.
59
- * @returns A promise that resolves to the string content of the bundled markdown file.
60
- */
61
- async function getBundledBestPractices() {
62
- return (0, promises_1.readFile)((0, node_path_1.join)(__dirname, '../resources/best-practices.md'), 'utf-8');
63
- }
64
- /**
65
- * Attempts to find and read a version-specific best practices guide from the user's installed
66
- * version of `@angular/core`. It looks for a custom `angular` metadata property in the
67
- * framework's `package.json` to locate the guide.
68
- *
69
- * @example A sample `package.json` `angular` field:
70
- * ```json
71
- * {
72
- * "angular": {
73
- * "bestPractices": {
74
- * "format": "markdown",
75
- * "path": "./resources/best-practices.md"
76
- * }
77
- * }
78
- * }
79
- * ```
80
- *
81
- * @param workspacePath The absolute path to the user's `angular.json` file.
82
- * @param logger The MCP tool context logger for reporting warnings.
83
- * @param server The MCP server context, used to enforce the client's declared roots.
84
- * @returns A promise that resolves to an object containing the guide's content and source,
85
- * or `undefined` if the guide could not be resolved.
86
- */
87
- async function getVersionSpecificBestPractices(workspacePath, logger, server) {
88
- if (server) {
89
- let isAllowed;
90
- try {
91
- isAllowed = await (0, workspace_utils_1.isAllowedWorkspacePath)(server, workspacePath);
92
- }
93
- catch (e) {
94
- logger.warn(`Failed to verify workspace path '${workspacePath}': ` +
95
- `${e instanceof Error ? e.message : e}. Falling back to the bundled guide.`);
96
- return undefined;
97
- }
98
- if (!isAllowed) {
99
- throw new Error(`Workspace path is outside the allowed MCP roots: ${workspacePath}. ` +
100
- "You can use 'list_projects' to find available workspaces.");
101
- }
102
- }
103
- // 1. Resolve the path to package.json
104
- let pkgJsonPath;
105
- try {
106
- const workspaceRequire = (0, node_module_1.createRequire)(workspacePath);
107
- pkgJsonPath = workspaceRequire.resolve('@angular/core/package.json');
108
- }
109
- catch (e) {
110
- logger.warn(`Could not resolve '@angular/core/package.json' from '${workspacePath}'. ` +
111
- 'Is Angular installed in this project? Falling back to the bundled guide.');
112
- return undefined;
113
- }
114
- // 2. Read and parse package.json, then find and read the guide.
115
- try {
116
- const pkgJsonContent = await (0, promises_1.readFile)(pkgJsonPath, 'utf-8');
117
- const pkgJson = JSON.parse(pkgJsonContent);
118
- const bestPracticesInfo = pkgJson['angular']?.bestPractices;
119
- if (bestPracticesInfo &&
120
- bestPracticesInfo.format === 'markdown' &&
121
- typeof bestPracticesInfo.path === 'string') {
122
- const packageDirectory = (0, node_path_1.dirname)(pkgJsonPath);
123
- const guidePath = (0, node_path_1.resolve)(packageDirectory, bestPracticesInfo.path);
124
- // Ensure the resolved guide path is within the package boundary.
125
- // Uses path.relative to create a cross-platform, case-insensitive check.
126
- // If the relative path starts with '..' or is absolute, it is a traversal attempt.
127
- const relativePath = (0, node_path_1.relative)(packageDirectory, guidePath);
128
- if (relativePath.startsWith('..') || (0, node_path_1.isAbsolute)(relativePath)) {
129
- logger.warn(`Detected a potential path traversal attempt in '${pkgJsonPath}'. ` +
130
- `The path '${bestPracticesInfo.path}' escapes the package boundary. ` +
131
- 'Falling back to the bundled guide.');
132
- return undefined;
133
- }
134
- // Check the file size to prevent reading a very large file.
135
- const stats = await (0, promises_1.stat)(guidePath);
136
- if (stats.size > 1024 * 1024) {
137
- // 1MB
138
- logger.warn(`The best practices guide at '${guidePath}' is larger than 1MB (${stats.size} bytes). ` +
139
- 'This is unexpected and the file will not be read. Falling back to the bundled guide.');
140
- return undefined;
141
- }
142
- const content = await (0, promises_1.readFile)(guidePath, 'utf-8');
143
- const source = `framework version ${pkgJson.version}`;
144
- return { content, source };
145
- }
146
- else {
147
- logger.warn(`Did not find valid 'angular.bestPractices' metadata in '${pkgJsonPath}'. ` +
148
- 'Falling back to the bundled guide.');
149
- }
150
- }
151
- catch (e) {
152
- logger.warn(`Failed to read or parse version-specific best practices referenced in '${pkgJsonPath}': ${e instanceof Error ? e.message : e}. Falling back to the bundled guide.`);
153
- }
154
- return undefined;
155
- }
156
- /**
157
- * Creates the handler function for the `get_best_practices` tool.
158
- * The handler orchestrates the process of first attempting to get a version-specific guide
159
- * and then falling back to the bundled guide if necessary.
160
- * @param context The MCP tool context, containing the logger.
161
- * @returns An async function that serves as the tool's executor.
162
- */
163
- function createBestPracticesHandler({ logger, server }) {
164
- let bundledBestPractices;
165
- return async (input) => {
166
- let content;
167
- let source;
168
- // First, try to get the version-specific guide.
169
- if (input.workspacePath) {
170
- const versionSpecific = await getVersionSpecificBestPractices(input.workspacePath, logger, server);
171
- if (versionSpecific) {
172
- content = versionSpecific.content;
173
- source = versionSpecific.source;
174
- }
175
- }
176
- // If the version-specific guide was not found for any reason, fall back to the bundled version.
177
- if (content === undefined) {
178
- content = await (bundledBestPractices ??= getBundledBestPractices());
179
- source = `bundled (CLI v${version_1.VERSION.full})`;
180
- }
181
- return {
182
- content: [
183
- {
184
- type: 'text',
185
- text: content,
186
- annotations: {
187
- audience: ['assistant'],
188
- priority: 0.9,
189
- source,
190
- },
191
- },
192
- ],
193
- };
194
- };
195
- }
196
- //# sourceMappingURL=best-practices.js.map
@@ -1 +0,0 @@
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,wDAA4D;AAC5D,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,CAC1D;CACJ,CAAC,CAAC;AAIU,QAAA,mBAAmB,GAAG,IAAA,2BAAW,EAAC;IAC7C,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,yCAAyC;IAChD,WAAW,EAAE;;;;;;;;;;;;;;qBAcM;IACnB,WAAW,EAAE,wBAAwB,CAAC,KAAK;I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oBACrB,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE;wBACX,QAAQ,EAAE,CAAC,WAAoB,CAAC;wBAChC,QAAQ,EAAE,GAAG;wBACb,MAAM;qBACP;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1,32 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { z } from 'zod';
9
- import { type McpToolContext, type McpToolDeclaration } from '../tool-registry';
10
- declare const devserverStartToolInputSchema: z.ZodObject<{
11
- port: z.ZodOptional<z.ZodNumber>;
12
- workspace: z.ZodOptional<z.ZodString>;
13
- project: z.ZodOptional<z.ZodString>;
14
- }, z.core.$strip>;
15
- export type DevserverStartToolInput = z.infer<typeof devserverStartToolInputSchema>;
16
- declare const devserverStartToolOutputSchema: z.ZodObject<{
17
- message: z.ZodString;
18
- address: z.ZodOptional<z.ZodString>;
19
- }, z.core.$strip>;
20
- export type DevserverStartToolOutput = z.infer<typeof devserverStartToolOutputSchema>;
21
- export declare function startDevserver(input: DevserverStartToolInput, context: McpToolContext): Promise<{
22
- content: {
23
- type: "text";
24
- text: string;
25
- }[];
26
- structuredContent: {
27
- message: string;
28
- address: string;
29
- };
30
- }>;
31
- export declare const DEVSERVER_START_TOOL: McpToolDeclaration<typeof devserverStartToolInputSchema.shape, typeof devserverStartToolOutputSchema.shape>;
32
- export {};
@@ -1,110 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.DEVSERVER_START_TOOL = void 0;
11
- exports.startDevserver = startDevserver;
12
- const zod_1 = require("zod");
13
- const devserver_1 = require("../../devserver");
14
- const shared_options_1 = require("../../shared-options");
15
- const utils_1 = require("../../utils");
16
- const workspace_utils_1 = require("../../workspace-utils");
17
- const tool_registry_1 = require("../tool-registry");
18
- const devserverStartToolInputSchema = zod_1.z.object({
19
- ...shared_options_1.workspaceAndProjectOptions,
20
- port: zod_1.z
21
- .number()
22
- .optional()
23
- .describe('The port number to run the server on. If not provided, a random available port will be chosen. ' +
24
- 'It is recommended to reuse port numbers across calls within the same workspace to maintain consistency.'),
25
- });
26
- const devserverStartToolOutputSchema = zod_1.z.object({
27
- message: zod_1.z.string().describe('A message indicating the result of the operation.'),
28
- address: zod_1.z
29
- .string()
30
- .optional()
31
- .describe('If the operation was successful, this is the HTTP address that the server can be found at.'),
32
- });
33
- function localhostAddress(port) {
34
- return `http://localhost:${port}/`;
35
- }
36
- async function startDevserver(input, context) {
37
- const { workspacePath, projectName } = await (0, workspace_utils_1.resolveWorkspaceAndProject)({
38
- host: context.host,
39
- server: context.server,
40
- workspacePathInput: input.workspace,
41
- projectNameInput: input.project,
42
- mcpWorkspace: context.workspace,
43
- });
44
- const key = (0, devserver_1.getDevserverKey)(workspacePath, projectName);
45
- let devserver = context.devservers.get(key);
46
- if (devserver) {
47
- return (0, utils_1.createStructuredContentOutput)({
48
- message: `Development server for project '${projectName}' is already running.`,
49
- address: localhostAddress(devserver.port),
50
- });
51
- }
52
- let port;
53
- if (input.port) {
54
- if (!(await context.host.isPortAvailable(input.port))) {
55
- throw new Error(`Port ${input.port} is unavailable. Try calling this tool again without the 'port' parameter to auto-assign a free port.`);
56
- }
57
- port = input.port;
58
- }
59
- else {
60
- port = await context.host.getAvailablePort();
61
- }
62
- devserver = new devserver_1.LocalDevserver({
63
- host: context.host,
64
- project: projectName,
65
- port,
66
- workspacePath,
67
- });
68
- devserver.start();
69
- context.devservers.set(key, devserver);
70
- return (0, utils_1.createStructuredContentOutput)({
71
- message: `Development server for project '${projectName}' started and watching for workspace changes.`,
72
- address: localhostAddress(port),
73
- });
74
- }
75
- exports.DEVSERVER_START_TOOL = (0, tool_registry_1.declareTool)({
76
- name: 'devserver_start',
77
- title: 'Start Development Server',
78
- description: `
79
- <Purpose>
80
- Starts the Angular development server ("ng serve") as a background process. Follow this up with "devserver_wait_for_build" to wait until
81
- the first build completes.
82
- </Purpose>
83
- <Use Cases>
84
- * **Starting the Server:** Use this tool to begin serving the application. The tool will return immediately while the server runs in the
85
- background.
86
- * **Get Initial Build Logs:** Once a dev server has started, use the "devserver_wait_for_build" tool to ensure it's alive. If there are any
87
- build errors, "devserver_wait_for_build" would provide them back and you can give them to the user or rely on them to propose a fix.
88
- * **Get Updated Build Logs:** Important: as long as a devserver is alive (i.e. "devserver_stop" wasn't called), after every time you
89
- make a change to the workspace, re-run "devserver_wait_for_build" to see whether the change was successfully built and wait for the
90
- devserver to be updated.
91
- </Use Cases>
92
- <Operational Notes>
93
- * This tool manages development servers by itself. It maintains at most a single dev server instance for each project in the monorepo.
94
- * This is an asynchronous operation. Subsequent commands can be ran while the server is active.
95
- * Use 'devserver_stop' to gracefully shut down the server and access the full log output.
96
- * **Keeping the Server Alive**: It is often better to keep the server alive between tool calls if you expect the user to request more
97
- changes or run more tests, as it saves time on restarts and maintains the file watcher state. You must still call
98
- 'devserver_wait_for_build' after every change to see whether the change was successfully built and be sure that the app was updated.
99
- * **Consistent Ports**: If making multiple calls, it is recommended to reuse the port you got from the first call for subsequent ones.
100
- </Operational Notes>
101
- `,
102
- isReadOnly: false,
103
- isLocalOnly: true,
104
- inputSchema: devserverStartToolInputSchema.shape,
105
- outputSchema: devserverStartToolOutputSchema.shape,
106
- factory: (context) => (input) => {
107
- return startDevserver(input, context);
108
- },
109
- });
110
- //# sourceMappingURL=devserver-start.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"devserver-start.js","sourceRoot":"","sources":["devserver-start.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAsCH,wCA6CC;AAjFD,6BAAwB;AACxB,+CAAkE;AAClE,yDAAkE;AAClE,uCAA4D;AAC5D,2DAAmE;AACnE,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- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { z } from 'zod';
9
- import { type McpToolContext, type McpToolDeclaration } from '../tool-registry';
10
- declare const devserverStopToolInputSchema: z.ZodObject<{
11
- workspace: z.ZodOptional<z.ZodString>;
12
- project: z.ZodOptional<z.ZodString>;
13
- }, z.core.$strip>;
14
- export type DevserverStopToolInput = z.infer<typeof devserverStopToolInputSchema>;
15
- declare const devserverStopToolOutputSchema: z.ZodObject<{
16
- message: z.ZodString;
17
- logs: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
- }, z.core.$strip>;
19
- export type DevserverStopToolOutput = z.infer<typeof devserverStopToolOutputSchema>;
20
- export declare function stopDevserver(input: DevserverStopToolInput, context: McpToolContext): Promise<{
21
- content: {
22
- type: "text";
23
- text: string;
24
- }[];
25
- structuredContent: {
26
- message: string;
27
- logs: string[];
28
- };
29
- }>;
30
- export declare const DEVSERVER_STOP_TOOL: McpToolDeclaration<typeof devserverStopToolInputSchema.shape, typeof devserverStopToolOutputSchema.shape>;
31
- export {};