@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
package/bin/ng.js CHANGED
@@ -12,7 +12,7 @@
12
12
  'use strict';
13
13
 
14
14
  const path = require('path');
15
- const nodeUtils = require('../src/utilities/node-version');
15
+ const nodeUtils = require('./version');
16
16
 
17
17
  // Error if the external CLI appears to be used inside a google3 context.
18
18
  if (process.cwd().split(path.sep).includes('google3')) {
@@ -43,20 +43,19 @@ if (rawCommandName === '--get-yargs-completions' || rawCommandName === 'completi
43
43
  // This node version check ensures that extremely old versions of node are not used.
44
44
  // These may not support ES2015 features such as const/let/async/await/etc.
45
45
  // These would then crash with a hard to diagnose error message.
46
- const [major] = process.versions.node.split('.', 1).map((part) => Number(part));
47
-
48
- if (major === 23 || major === 25) {
49
- // Allow new odd numbered releases with a warning.
46
+ if (nodeUtils.isNodeVersionSupported()) {
47
+ require('./bootstrap');
48
+ } else if (nodeUtils.isNodeVersionRunnable()) {
50
49
  console.warn(
51
50
  'Node.js version ' +
52
51
  process.version +
53
52
  ' detected.\n' +
54
- 'Prior to version 27, odd numbered Node.js versions will not enter LTS status and should not be used for production.' +
55
- ' For more information, please see https://nodejs.org/en/about/previous-releases/.',
53
+ 'The Angular CLI has not been officially tested on this Node.js version and it is not supported for production use.\n' +
54
+ 'For more information, please see https://nodejs.org/en/about/previous-releases/.',
56
55
  );
57
56
 
58
57
  require('./bootstrap');
59
- } else if (!nodeUtils.isNodeVersionSupported()) {
58
+ } else {
60
59
  // Error and exit if less than the supported versions.
61
60
  console.error(
62
61
  'Node.js version ' +
@@ -69,6 +68,4 @@ if (major === 23 || major === 25) {
69
68
  );
70
69
 
71
70
  process.exitCode = 3;
72
- } else {
73
- require('./bootstrap');
74
71
  }
package/bin/version.js ADDED
@@ -0,0 +1,98 @@
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
+
10
+ /**
11
+ * The supported Node.js version for the Angular CLI.
12
+ */
13
+ var SUPPORTED_NODE_VERSIONS = '^22.22.3 || ^24.15.0 || >=26.0.0';
14
+
15
+ /**
16
+ * The version of the Angular CLI.
17
+ */
18
+ var VERSION = '22.3.0-next.0';
19
+
20
+ /**
21
+ * The supported Node.js versions.
22
+ */
23
+ var supportedNodeVersions = SUPPORTED_NODE_VERSIONS.replace(/[\^~<>=]/g, '')
24
+ .split('||')
25
+ .map(function (v) {
26
+ return v.trim();
27
+ });
28
+
29
+ /**
30
+ * Checks if the current Node.js version is officially supported.
31
+ * @param {string} [currentVersion] Optional Node.js version string to check. Defaults to `process.versions.node`.
32
+ * @param {string[]} [supportedVersions] Optional supported versions array. Defaults to `supportedNodeVersions`.
33
+ * @returns {boolean} `true` if the current Node.js version is officially supported, `false` otherwise.
34
+ */
35
+ function isNodeVersionSupported(currentVersion, supportedVersions) {
36
+ if (SUPPORTED_NODE_VERSIONS.charAt(0) === '0' && !supportedVersions && !currentVersion) {
37
+ return true;
38
+ }
39
+
40
+ var parts = (currentVersion || process.versions.node).split('.', 3).map(Number);
41
+ var processMajor = parts[0];
42
+ var processMinor = parts[1];
43
+ var processPatch = parts[2];
44
+
45
+ var versions = supportedVersions || supportedNodeVersions;
46
+ for (var i = 0; i < versions.length; i++) {
47
+ var vParts = versions[i].split('.', 3).map(Number);
48
+ var major = vParts[0];
49
+ var minor = vParts[1];
50
+ var patch = vParts[2];
51
+ if (
52
+ (major === processMajor && processMinor === minor && processPatch >= patch) ||
53
+ (major === processMajor && processMinor > minor)
54
+ ) {
55
+ return true;
56
+ }
57
+ }
58
+
59
+ return false;
60
+ }
61
+
62
+ /**
63
+ * Checks if the current Node.js version is runnable (newer than supported LTS or an interim odd release).
64
+ * @param {string} [currentVersion] Optional Node.js version string to check. Defaults to `process.versions.node`.
65
+ * @param {string[]} [supportedVersions] Optional supported versions array. Defaults to `supportedNodeVersions`.
66
+ * @returns {boolean} `true` if the current Node.js version is runnable, `false` otherwise.
67
+ */
68
+ function isNodeVersionRunnable(currentVersion, supportedVersions) {
69
+ if (SUPPORTED_NODE_VERSIONS.charAt(0) === '0' && !supportedVersions && !currentVersion) {
70
+ return false;
71
+ }
72
+
73
+ var processMajor = Number((currentVersion || process.versions.node).split('.', 1)[0]);
74
+ var versions = supportedVersions || supportedNodeVersions;
75
+
76
+ var minMajor = Number(versions[0].split('.', 1)[0]);
77
+ var maxMajor = Number(versions[versions.length - 1].split('.', 1)[0]);
78
+
79
+ // Versions newer than the maximum supported major (e.g. Node 27, 28+)
80
+ if (processMajor > maxMajor) {
81
+ return true;
82
+ }
83
+
84
+ // Odd-numbered interim releases between min and max (e.g. Node 23, 25)
85
+ if (processMajor > minMajor && processMajor % 2 === 1) {
86
+ return true;
87
+ }
88
+
89
+ return false;
90
+ }
91
+
92
+ module.exports = {
93
+ VERSION: VERSION,
94
+ SUPPORTED_NODE_VERSIONS: SUPPORTED_NODE_VERSIONS,
95
+ supportedNodeVersions: supportedNodeVersions,
96
+ isNodeVersionSupported: isNodeVersionSupported,
97
+ isNodeVersionRunnable: isNodeVersionRunnable,
98
+ };
package/index.d.ts ADDED
@@ -0,0 +1,19 @@
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
+
9
+ export declare class Version {
10
+ readonly full: string;
11
+ readonly major: string;
12
+ readonly minor: string;
13
+ readonly patch: string;
14
+ constructor(full: string);
15
+ }
16
+
17
+ export declare const VERSION: Version;
18
+
19
+ export default function execute(options: { cliArgs: string[] }): Promise<number>;
@@ -0,0 +1,85 @@
1
+ // packages/angular/cli/src/commands/command-config.js
2
+ var RootCommands = {
3
+ "add": {
4
+ factory: () => import("./cli-PDCEX7HQ.js")
5
+ },
6
+ "analytics": {
7
+ factory: () => import("./cli-LYBZEMDR.js")
8
+ },
9
+ "build": {
10
+ factory: () => import("./cli-Y2ECUR33.js"),
11
+ aliases: ["b"]
12
+ },
13
+ "cache": {
14
+ factory: () => import("./cli-PU5VH7JB.js")
15
+ },
16
+ "completion": {
17
+ factory: () => import("./cli-QUH44NUB.js")
18
+ },
19
+ "config": {
20
+ factory: () => import("./cli-A5UAJDO6.js")
21
+ },
22
+ "deploy": {
23
+ factory: () => import("./cli-4CMZ6KMR.js")
24
+ },
25
+ "e2e": {
26
+ factory: () => import("./cli-PJVTDBQM.js"),
27
+ aliases: ["e"]
28
+ },
29
+ "extract-i18n": {
30
+ factory: () => import("./cli-VVITNTBC.js")
31
+ },
32
+ "generate": {
33
+ factory: () => import("./cli-YDSMJOSO.js"),
34
+ aliases: ["g"]
35
+ },
36
+ "lint": {
37
+ factory: () => import("./cli-BQRFWIMG.js")
38
+ },
39
+ "make-this-awesome": {
40
+ factory: () => import("./cli-CWICUPZW.js")
41
+ },
42
+ "mcp": {
43
+ factory: () => import("./cli-ACLGUIBI.js")
44
+ },
45
+ "new": {
46
+ factory: () => import("./cli-L4TM4JH3.js"),
47
+ aliases: ["n"]
48
+ },
49
+ "run": {
50
+ factory: () => import("./cli-6AHY7ADW.js")
51
+ },
52
+ "serve": {
53
+ factory: () => import("./cli-DWQUM3M2.js"),
54
+ aliases: ["dev", "s"]
55
+ },
56
+ "test": {
57
+ factory: () => import("./cli-4Q7DGTBA.js"),
58
+ aliases: ["t"]
59
+ },
60
+ "update": {
61
+ factory: () => import("./cli-XM4L4PP4.js")
62
+ },
63
+ "version": {
64
+ factory: () => import("./cli-PRIRL3WP.js"),
65
+ aliases: ["v"]
66
+ }
67
+ };
68
+ var RootCommandsAliases = Object.values(RootCommands).reduce((prev, current) => {
69
+ current.aliases?.forEach((alias) => {
70
+ prev[alias] = current;
71
+ });
72
+ return prev;
73
+ }, {});
74
+
75
+ export {
76
+ RootCommands,
77
+ RootCommandsAliases
78
+ };
79
+ /**
80
+ * @license
81
+ * Copyright Google LLC All Rights Reserved.
82
+ *
83
+ * Use of this source code is governed by an MIT-style license that can be
84
+ * found in the LICENSE file at https://angular.dev/license
85
+ */
@@ -0,0 +1,165 @@
1
+ // packages/angular/cli/src/commands/cache/utilities.js
2
+ import { isJsonObject } from "@angular-devkit/core";
3
+ import { existsSync, readFileSync, statSync } from "node:fs";
4
+ import { dirname, isAbsolute, join, relative, resolve } from "node:path";
5
+
6
+ // packages/angular/cli/lib/config/workspace-schema.js
7
+ var Environment;
8
+ (function(Environment2) {
9
+ Environment2["All"] = "all";
10
+ Environment2["Ci"] = "ci";
11
+ Environment2["Local"] = "local";
12
+ })(Environment || (Environment = {}));
13
+ var PackageManager;
14
+ (function(PackageManager2) {
15
+ PackageManager2["Bun"] = "bun";
16
+ PackageManager2["Npm"] = "npm";
17
+ PackageManager2["Pnpm"] = "pnpm";
18
+ PackageManager2["Yarn"] = "yarn";
19
+ })(PackageManager || (PackageManager = {}));
20
+ var FileNameStyleGuide;
21
+ (function(FileNameStyleGuide2) {
22
+ FileNameStyleGuide2["The2016"] = "2016";
23
+ FileNameStyleGuide2["The2025"] = "2025";
24
+ })(FileNameStyleGuide || (FileNameStyleGuide = {}));
25
+ var SchematicsAngularApplicationStyle;
26
+ (function(SchematicsAngularApplicationStyle2) {
27
+ SchematicsAngularApplicationStyle2["Css"] = "css";
28
+ SchematicsAngularApplicationStyle2["Less"] = "less";
29
+ SchematicsAngularApplicationStyle2["Sass"] = "sass";
30
+ SchematicsAngularApplicationStyle2["Scss"] = "scss";
31
+ SchematicsAngularApplicationStyle2["Tailwind"] = "tailwind";
32
+ })(SchematicsAngularApplicationStyle || (SchematicsAngularApplicationStyle = {}));
33
+ var TestRunner;
34
+ (function(TestRunner2) {
35
+ TestRunner2["Karma"] = "karma";
36
+ TestRunner2["Vitest"] = "vitest";
37
+ })(TestRunner || (TestRunner = {}));
38
+ var ViewEncapsulation;
39
+ (function(ViewEncapsulation2) {
40
+ ViewEncapsulation2["Emulated"] = "Emulated";
41
+ ViewEncapsulation2["None"] = "None";
42
+ ViewEncapsulation2["ShadowDom"] = "ShadowDom";
43
+ })(ViewEncapsulation || (ViewEncapsulation = {}));
44
+ var ChangeDetection;
45
+ (function(ChangeDetection2) {
46
+ ChangeDetection2["Eager"] = "Eager";
47
+ ChangeDetection2["OnPush"] = "OnPush";
48
+ })(ChangeDetection || (ChangeDetection = {}));
49
+ var SchematicsAngularComponentStyle;
50
+ (function(SchematicsAngularComponentStyle2) {
51
+ SchematicsAngularComponentStyle2["Css"] = "css";
52
+ SchematicsAngularComponentStyle2["Less"] = "less";
53
+ SchematicsAngularComponentStyle2["None"] = "none";
54
+ SchematicsAngularComponentStyle2["Sass"] = "sass";
55
+ SchematicsAngularComponentStyle2["Scss"] = "scss";
56
+ })(SchematicsAngularComponentStyle || (SchematicsAngularComponentStyle = {}));
57
+ var Implement;
58
+ (function(Implement2) {
59
+ Implement2["CanActivate"] = "CanActivate";
60
+ Implement2["CanActivateChild"] = "CanActivateChild";
61
+ Implement2["CanDeactivate"] = "CanDeactivate";
62
+ Implement2["CanMatch"] = "CanMatch";
63
+ })(Implement || (Implement = {}));
64
+ var TypeSeparator;
65
+ (function(TypeSeparator2) {
66
+ TypeSeparator2["Empty"] = "-";
67
+ TypeSeparator2["TypeSeparator"] = ".";
68
+ })(TypeSeparator || (TypeSeparator = {}));
69
+ var AiConfig;
70
+ (function(AiConfig2) {
71
+ AiConfig2["ClaudeCode"] = "claude-code";
72
+ AiConfig2["Cursor"] = "cursor";
73
+ AiConfig2["GeminiCli"] = "gemini-cli";
74
+ AiConfig2["None"] = "none";
75
+ AiConfig2["OpenAiCodex"] = "open-ai-codex";
76
+ AiConfig2["Vscode"] = "vscode";
77
+ })(AiConfig || (AiConfig = {}));
78
+
79
+ // packages/angular/cli/src/commands/cache/utilities.js
80
+ function updateCacheConfig(workspace, key, value) {
81
+ const cli = workspace.extensions["cli"] ??= {};
82
+ const cache = cli["cache"] ??= {};
83
+ cache[key] = value;
84
+ return workspace.save();
85
+ }
86
+ function getCacheBasePath(workspaceRoot, cachePathSetting) {
87
+ if (isAbsolute(cachePathSetting)) {
88
+ return cachePathSetting;
89
+ }
90
+ try {
91
+ let currentDir = workspaceRoot;
92
+ while (true) {
93
+ const gitPath = join(currentDir, ".git");
94
+ if (existsSync(gitPath)) {
95
+ const stat = statSync(gitPath);
96
+ if (stat.isFile()) {
97
+ const content = readFileSync(gitPath, "utf8");
98
+ const match = /^gitdir:\s*(.+)$/m.exec(content);
99
+ if (match) {
100
+ const gitdir = resolve(currentDir, match[1].trim());
101
+ const commondirPath = join(gitdir, "commondir");
102
+ if (existsSync(commondirPath)) {
103
+ const commondir = readFileSync(commondirPath, "utf8").trim();
104
+ const commonGitDir = resolve(gitdir, commondir);
105
+ const relativeWorkspacePath = relative(currentDir, workspaceRoot);
106
+ const mainWorkspaceRoot = resolve(dirname(commonGitDir), relativeWorkspacePath);
107
+ if (existsSync(mainWorkspaceRoot)) {
108
+ return resolve(mainWorkspaceRoot, cachePathSetting);
109
+ }
110
+ }
111
+ }
112
+ }
113
+ break;
114
+ }
115
+ const parentDir = dirname(currentDir);
116
+ if (parentDir === currentDir) {
117
+ break;
118
+ }
119
+ currentDir = parentDir;
120
+ }
121
+ } catch {
122
+ }
123
+ return resolve(workspaceRoot, cachePathSetting);
124
+ }
125
+ function getCacheConfig(workspace) {
126
+ if (!workspace) {
127
+ throw new Error(`Cannot retrieve cache configuration as workspace is not defined.`);
128
+ }
129
+ const defaultSettings = {
130
+ path: getCacheBasePath(workspace.basePath, ".angular/cache"),
131
+ environment: Environment.Local,
132
+ enabled: true
133
+ };
134
+ const cliSetting = workspace.extensions["cli"];
135
+ if (!cliSetting || !isJsonObject(cliSetting)) {
136
+ return defaultSettings;
137
+ }
138
+ const cacheSettings = cliSetting["cache"];
139
+ if (!isJsonObject(cacheSettings)) {
140
+ return defaultSettings;
141
+ }
142
+ const {
143
+ path = ".angular/cache",
144
+ environment = defaultSettings.environment,
145
+ enabled = defaultSettings.enabled
146
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
147
+ } = cacheSettings;
148
+ return {
149
+ path: getCacheBasePath(workspace.basePath, path),
150
+ environment,
151
+ enabled
152
+ };
153
+ }
154
+
155
+ export {
156
+ updateCacheConfig,
157
+ getCacheConfig
158
+ };
159
+ /**
160
+ * @license
161
+ * Copyright Google LLC All Rights Reserved.
162
+ *
163
+ * Use of this source code is governed by an MIT-style license that can be
164
+ * found in the LICENSE file at https://angular.dev/license
165
+ */
@@ -0,0 +1,225 @@
1
+ import {
2
+ ArchitectBaseCommandModule
3
+ } from "./chunk-DHWVZMLH.js";
4
+ import {
5
+ CommandModuleError,
6
+ memoize
7
+ } from "./chunk-YM7ILCS5.js";
8
+ import {
9
+ getProjectByCwd
10
+ } from "./chunk-FZ5GFCWU.js";
11
+
12
+ // packages/angular/cli/src/command-builder/architect-command-module.js
13
+ var __runInitializers = function(thisArg, initializers, value) {
14
+ var useValue = arguments.length > 2;
15
+ for (var i = 0; i < initializers.length; i++) {
16
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
17
+ }
18
+ return useValue ? value : void 0;
19
+ };
20
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
21
+ function accept(f) {
22
+ if (f !== void 0 && typeof f !== "function")
23
+ throw new TypeError("Function expected");
24
+ return f;
25
+ }
26
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
27
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
28
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
29
+ var _, done = false;
30
+ for (var i = decorators.length - 1; i >= 0; i--) {
31
+ var context = {};
32
+ for (var p in contextIn)
33
+ context[p] = p === "access" ? {} : contextIn[p];
34
+ for (var p in contextIn.access)
35
+ context.access[p] = contextIn.access[p];
36
+ context.addInitializer = function(f) {
37
+ if (done)
38
+ throw new TypeError("Cannot add initializers after decoration has completed");
39
+ extraInitializers.push(accept(f || null));
40
+ };
41
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
42
+ if (kind === "accessor") {
43
+ if (result === void 0)
44
+ continue;
45
+ if (result === null || typeof result !== "object")
46
+ throw new TypeError("Object expected");
47
+ if (_ = accept(result.get))
48
+ descriptor.get = _;
49
+ if (_ = accept(result.set))
50
+ descriptor.set = _;
51
+ if (_ = accept(result.init))
52
+ initializers.unshift(_);
53
+ } else if (_ = accept(result)) {
54
+ if (kind === "field")
55
+ initializers.unshift(_);
56
+ else
57
+ descriptor[key] = _;
58
+ }
59
+ }
60
+ if (target)
61
+ Object.defineProperty(target, contextIn.name, descriptor);
62
+ done = true;
63
+ };
64
+ var ArchitectCommandModule = (() => {
65
+ let _classSuper = ArchitectBaseCommandModule;
66
+ let _instanceExtraInitializers = [];
67
+ let _getProjectNamesByTarget_decorators;
68
+ return class ArchitectCommandModule extends _classSuper {
69
+ static {
70
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
71
+ _getProjectNamesByTarget_decorators = [memoize];
72
+ __esDecorate(this, null, _getProjectNamesByTarget_decorators, { kind: "method", name: "getProjectNamesByTarget", static: false, private: false, access: { has: (obj) => "getProjectNamesByTarget" in obj, get: (obj) => obj.getProjectNamesByTarget }, metadata: _metadata }, null, _instanceExtraInitializers);
73
+ if (_metadata)
74
+ Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
75
+ }
76
+ async builder(argv) {
77
+ const target = this.getArchitectTarget();
78
+ if (this.findDefaultBuilderName && this.context.workspace) {
79
+ for (const [project2, projectDefinition] of this.context.workspace.projects) {
80
+ const targetDefinition = projectDefinition.targets.get(target);
81
+ if (targetDefinition?.builder) {
82
+ continue;
83
+ }
84
+ const defaultBuilder = await this.findDefaultBuilderName(projectDefinition, {
85
+ project: project2,
86
+ target
87
+ });
88
+ if (!defaultBuilder) {
89
+ continue;
90
+ }
91
+ if (targetDefinition) {
92
+ targetDefinition.builder = defaultBuilder;
93
+ } else {
94
+ projectDefinition.targets.set(target, {
95
+ builder: defaultBuilder
96
+ });
97
+ }
98
+ }
99
+ }
100
+ const project = this.getArchitectProject();
101
+ const { jsonHelp, getYargsCompletions, help } = this.context.args.options;
102
+ const localYargs = argv.positional("project", {
103
+ describe: "The name of the project to build. Can be an application or a library.",
104
+ type: "string",
105
+ // Hide choices from JSON help so that we don't display them in AIO.
106
+ choices: jsonHelp ? void 0 : this.getProjectChoices()
107
+ }).option("configuration", {
108
+ describe: `One or more named builder configurations as a comma-separated list as specified in the "configurations" section in angular.json.
109
+ The builder uses the named configurations to run the given target.
110
+ For more information, see https://angular.dev/reference/configs/workspace-config#alternate-build-configurations.`,
111
+ alias: "c",
112
+ type: "string",
113
+ // Show only in when using --help and auto completion because otherwise comma seperated configuration values will be invalid.
114
+ // Also, hide choices from JSON help so that we don't display them in AIO.
115
+ choices: (getYargsCompletions || help) && !jsonHelp && project ? this.getConfigurationChoices(project) : void 0
116
+ }).strict();
117
+ if (!project) {
118
+ return localYargs;
119
+ }
120
+ const schemaOptions = await this.getArchitectTargetOptions({
121
+ project,
122
+ target
123
+ });
124
+ return this.addSchemaOptionsToCommand(localYargs, schemaOptions);
125
+ }
126
+ async run(options) {
127
+ const originalProcessTitle = process.title;
128
+ try {
129
+ const target = this.getArchitectTarget();
130
+ const { configuration = "", project, ...architectOptions } = options;
131
+ if (project) {
132
+ process.title = `${originalProcessTitle} (${project})`;
133
+ return await this.runSingleTarget({ configuration, target, project }, architectOptions);
134
+ }
135
+ let result = 0;
136
+ const projectNames = this.getProjectNamesByTarget(target);
137
+ if (!projectNames) {
138
+ return this.onMissingTarget("Cannot determine project or target for command.");
139
+ }
140
+ for (const project2 of projectNames) {
141
+ process.title = `${originalProcessTitle} (${project2})`;
142
+ result |= await this.runSingleTarget({ configuration, target, project: project2 }, architectOptions);
143
+ }
144
+ return result;
145
+ } finally {
146
+ process.title = originalProcessTitle;
147
+ }
148
+ }
149
+ getArchitectProject() {
150
+ const { options, positional } = this.context.args;
151
+ const [, projectName] = positional;
152
+ if (projectName) {
153
+ return projectName;
154
+ }
155
+ if (typeof options["project"] === "string") {
156
+ return options["project"];
157
+ }
158
+ const target = this.getArchitectTarget();
159
+ const projectFromTarget = this.getProjectNamesByTarget(target);
160
+ return projectFromTarget?.length ? projectFromTarget[0] : void 0;
161
+ }
162
+ getProjectNamesByTarget(target) {
163
+ const workspace = this.getWorkspaceOrThrow();
164
+ const allProjectsForTargetName = [];
165
+ for (const [name, project] of workspace.projects) {
166
+ if (project.targets.has(target)) {
167
+ allProjectsForTargetName.push(name);
168
+ }
169
+ }
170
+ if (allProjectsForTargetName.length === 0) {
171
+ return void 0;
172
+ }
173
+ if (this.multiTarget) {
174
+ return allProjectsForTargetName;
175
+ } else {
176
+ if (allProjectsForTargetName.length === 1) {
177
+ return allProjectsForTargetName;
178
+ }
179
+ const maybeProject = getProjectByCwd(workspace);
180
+ if (maybeProject) {
181
+ return allProjectsForTargetName.includes(maybeProject) ? [maybeProject] : void 0;
182
+ }
183
+ const { getYargsCompletions, help } = this.context.args.options;
184
+ if (!getYargsCompletions && !help) {
185
+ throw new CommandModuleError(`Cannot determine project for command.
186
+ This is a multi-project workspace and more than one project supports this command. Run "ng ${this.command}" to execute the command for a specific project or change the current working directory to a project directory.
187
+
188
+ Available projects are:
189
+ ${allProjectsForTargetName.sort().map((p) => `- ${p}`).join("\n")}`);
190
+ }
191
+ }
192
+ return void 0;
193
+ }
194
+ /** @returns a sorted list of project names to be used for auto completion. */
195
+ getProjectChoices() {
196
+ const { workspace } = this.context;
197
+ return workspace ? [...workspace.projects.keys()].sort() : void 0;
198
+ }
199
+ /** @returns a sorted list of configuration names to be used for auto completion. */
200
+ getConfigurationChoices(project) {
201
+ const projectDefinition = this.context.workspace?.projects.get(project);
202
+ if (!projectDefinition) {
203
+ return void 0;
204
+ }
205
+ const target = this.getArchitectTarget();
206
+ const configurations = projectDefinition.targets.get(target)?.configurations;
207
+ return configurations ? Object.keys(configurations).sort() : void 0;
208
+ }
209
+ constructor() {
210
+ super(...arguments);
211
+ __runInitializers(this, _instanceExtraInitializers);
212
+ }
213
+ };
214
+ })();
215
+
216
+ export {
217
+ ArchitectCommandModule
218
+ };
219
+ /**
220
+ * @license
221
+ * Copyright Google LLC All Rights Reserved.
222
+ *
223
+ * Use of this source code is governed by an MIT-style license that can be
224
+ * found in the LICENSE file at https://angular.dev/license
225
+ */