@angular/cli 22.2.2 → 22.3.0-next.1

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,271 +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
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.executeSchematic = executeSchematic;
44
- exports.executeMigration = executeMigration;
45
- exports.executeMigrations = executeMigrations;
46
- exports.commitChanges = commitChanges;
47
- const schematics_1 = require("@angular-devkit/schematics");
48
- const listr2_1 = require("listr2");
49
- const semver = __importStar(require("semver"));
50
- const schematic_workflow_1 = require("../../../command-builder/utilities/schematic-workflow");
51
- const color_1 = require("../../../utilities/color");
52
- const error_1 = require("../../../utilities/error");
53
- const log_file_1 = require("../../../utilities/log-file");
54
- const prettier_1 = require("../../../utilities/prettier");
55
- const prompt_1 = require("../../../utilities/prompt");
56
- const tty_1 = require("../../../utilities/tty");
57
- const cli_version_1 = require("./cli-version");
58
- const git_1 = require("./git");
59
- async function executeSchematic(workflow, logger, collection, schematic, options = {}) {
60
- const workflowSubscription = (0, schematic_workflow_1.subscribeToWorkflow)(workflow, logger);
61
- // TODO: Allow passing a schematic instance directly
62
- try {
63
- await workflow
64
- .execute({
65
- collection,
66
- schematic,
67
- options,
68
- logger,
69
- })
70
- .toPromise();
71
- return { success: !workflowSubscription.error, files: workflowSubscription.files };
72
- }
73
- catch (e) {
74
- if (e instanceof schematics_1.UnsuccessfulWorkflowExecution) {
75
- logger.error(`${listr2_1.figures.cross} Migration failed. See above for further details.\n`);
76
- }
77
- else {
78
- (0, error_1.assertIsError)(e);
79
- const logPath = (0, log_file_1.writeErrorToLogFile)(e);
80
- logger.fatal(`${listr2_1.figures.cross} Migration failed: ${e.message}\n` +
81
- ` See "${logPath}" for further details.\n`);
82
- }
83
- return { success: false, files: workflowSubscription.files };
84
- }
85
- finally {
86
- workflowSubscription.unsubscribe();
87
- }
88
- }
89
- /**
90
- * @return Whether or not the migration was performed successfully.
91
- */
92
- async function executeMigration(workflow, logger, packageName, collectionPath, migrationName, commit = false) {
93
- const collection = workflow.engine.createCollection(collectionPath);
94
- const name = collection.listSchematicNames().find((name) => name === migrationName);
95
- if (!name) {
96
- logger.error(`Cannot find migration '${migrationName}' in '${packageName}'.`);
97
- return 1;
98
- }
99
- logger.info(color_1.colors.cyan(`** Executing '${migrationName}' of package '${packageName}' **\n`));
100
- const schematic = workflow.engine.createSchematic(name, collection);
101
- return executePackageMigrations(workflow, logger, [schematic.description], packageName, commit);
102
- }
103
- /**
104
- * @return Whether or not the migrations were performed successfully.
105
- */
106
- async function executeMigrations(workflow, logger, packageName, collectionPath, from, to, commit = false) {
107
- const collection = workflow.engine.createCollection(collectionPath);
108
- const migrationRange = new semver.Range('>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to.split('-')[0]);
109
- const requiredMigrations = [];
110
- const optionalMigrations = [];
111
- for (const name of collection.listSchematicNames()) {
112
- const schematic = workflow.engine.createSchematic(name, collection);
113
- const description = schematic.description;
114
- description.version = (0, cli_version_1.coerceVersionNumber)(description.version);
115
- if (!description.version) {
116
- continue;
117
- }
118
- if (semver.satisfies(description.version, migrationRange, { includePrerelease: true })) {
119
- (description.optional ? optionalMigrations : requiredMigrations).push(description);
120
- }
121
- }
122
- if (requiredMigrations.length === 0 && optionalMigrations.length === 0) {
123
- return 0;
124
- }
125
- // Required migrations
126
- if (requiredMigrations.length) {
127
- logger.info(color_1.colors.cyan(`** Executing migrations of package '${packageName}' **\n`));
128
- requiredMigrations.sort(compareMigrations);
129
- const result = await executePackageMigrations(workflow, logger, requiredMigrations, packageName, commit);
130
- if (result === 1) {
131
- return 1;
132
- }
133
- }
134
- // Optional migrations
135
- if (optionalMigrations.length) {
136
- logger.info(color_1.colors.magenta(`** Optional migrations of package '${packageName}' **\n`));
137
- optionalMigrations.sort(compareMigrations);
138
- const migrationsToRun = await getOptionalMigrationsToRun(logger, optionalMigrations, packageName);
139
- if (migrationsToRun?.length) {
140
- return executePackageMigrations(workflow, logger, migrationsToRun, packageName, commit);
141
- }
142
- }
143
- return 0;
144
- }
145
- async function executePackageMigrations(workflow, logger, migrations, packageName, commit = false) {
146
- for (const migration of migrations) {
147
- const { title, description } = getMigrationTitleAndDescription(migration);
148
- logger.info(color_1.colors.cyan(listr2_1.figures.pointer) + ' ' + color_1.colors.bold(title));
149
- if (description) {
150
- logger.info(' ' + description);
151
- }
152
- const { success, files } = await executeSchematic(workflow, logger, migration.collection.name, migration.name);
153
- if (!success) {
154
- return 1;
155
- }
156
- let modifiedFilesText;
157
- switch (files.size) {
158
- case 0:
159
- modifiedFilesText = 'No changes made';
160
- break;
161
- case 1:
162
- modifiedFilesText = '1 file modified';
163
- break;
164
- default:
165
- modifiedFilesText = `${files.size} files modified`;
166
- break;
167
- }
168
- if (files.size) {
169
- try {
170
- await (0, prettier_1.formatFiles)(process.cwd(), files);
171
- }
172
- catch (error) {
173
- (0, error_1.assertIsError)(error);
174
- logger.warn(`WARNING: Formatting of files failed with the following error: ${error.message}`);
175
- }
176
- }
177
- logger.info(` Migration completed (${modifiedFilesText}).`);
178
- // Commit migration
179
- if (commit) {
180
- const commitPrefix = `${packageName} migration - ${migration.name}`;
181
- const commitMessage = migration.description
182
- ? `${commitPrefix}\n\n${migration.description}`
183
- : commitPrefix;
184
- const committed = commitChanges(logger, commitMessage);
185
- if (!committed) {
186
- // Failed to commit, something went wrong. Abort the update.
187
- return 1;
188
- }
189
- }
190
- logger.info(''); // Extra trailing newline.
191
- }
192
- return 0;
193
- }
194
- /**
195
- * @return Whether or not the commit was successful.
196
- */
197
- function commitChanges(logger, message) {
198
- // Check if a commit is needed.
199
- let commitNeeded;
200
- try {
201
- commitNeeded = (0, git_1.hasChangesToCommit)();
202
- }
203
- catch (err) {
204
- logger.error(` Failed to read Git tree:\n${err.stderr}`);
205
- return false;
206
- }
207
- if (!commitNeeded) {
208
- logger.info(' No changes to commit after migration.');
209
- return true;
210
- }
211
- // Commit changes and abort on error.
212
- try {
213
- (0, git_1.createCommit)(message);
214
- }
215
- catch (err) {
216
- logger.error(`Failed to commit update (${message}):\n${err.stderr}`);
217
- return false;
218
- }
219
- // Notify user of the commit.
220
- const hash = (0, git_1.findCurrentGitSha)();
221
- const shortMessage = message.split('\n')[0];
222
- if (hash) {
223
- logger.info(` Committed migration step (${(0, git_1.getShortHash)(hash)}): ${shortMessage}.`);
224
- }
225
- else {
226
- // Commit was successful, but reading the hash was not. Something weird happened,
227
- // but nothing that would stop the update. Just log the weirdness and continue.
228
- logger.info(` Committed migration step: ${shortMessage}.`);
229
- logger.warn(' Failed to look up hash of most recent commit, continuing anyways.');
230
- }
231
- return true;
232
- }
233
- async function getOptionalMigrationsToRun(logger, optionalMigrations, packageName) {
234
- const numberOfMigrations = optionalMigrations.length;
235
- logger.info(`This package has ${numberOfMigrations} optional migration${numberOfMigrations > 1 ? 's' : ''} that can be executed.`);
236
- if (!(0, tty_1.isTTY)()) {
237
- for (const migration of optionalMigrations) {
238
- const { title } = getMigrationTitleAndDescription(migration);
239
- logger.info(color_1.colors.cyan(listr2_1.figures.pointer) + ' ' + color_1.colors.bold(title));
240
- logger.info(color_1.colors.gray(` ng update ${packageName} --name ${migration.name}`));
241
- logger.info(''); // Extra trailing newline.
242
- }
243
- return undefined;
244
- }
245
- logger.info('Optional migrations may be skipped and executed after the update process, if preferred.');
246
- logger.info(''); // Extra trailing newline.
247
- const answer = await (0, prompt_1.askChoices)(`Select the migrations that you'd like to run`, optionalMigrations.map((migration) => {
248
- const { title, documentation } = getMigrationTitleAndDescription(migration);
249
- return {
250
- name: `[${color_1.colors.white(migration.name)}] ${title}${documentation ? ` (${documentation})` : ''}`,
251
- value: migration.name,
252
- checked: migration.recommended,
253
- };
254
- }), null);
255
- logger.info(''); // Extra trailing newline.
256
- return optionalMigrations.filter(({ name }) => answer?.includes(name));
257
- }
258
- function getMigrationTitleAndDescription(migration) {
259
- const [title, ...description] = migration.description.split('. ');
260
- return {
261
- title: title.endsWith('.') ? title : title + '.',
262
- description: description.join('.\n '),
263
- documentation: migration.documentation
264
- ? new URL(migration.documentation, 'https://angular.dev').href
265
- : undefined,
266
- };
267
- }
268
- function compareMigrations(a, b) {
269
- return semver.compare(a.version, b.version);
270
- }
271
- //# sourceMappingURL=migration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migration.js","sourceRoot":"","sources":["migration.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCH,4CAqCC;AAKD,4CA0BC;AAKD,8CA0EC;AA6ED,sCAyCC;AA1SD,2DAAiG;AAMjG,mCAAiC;AAEjC,+CAAiC;AACjC,8FAA4F;AAC5F,oDAAkD;AAClD,oDAAyD;AACzD,0DAAkE;AAClE,0DAA0D;AAC1D,sDAAuD;AACvD,gDAA+C;AAC/C,+CAAoD;AACpD,+BAA0F;AAgBnF,KAAK,UAAU,gBAAgB,CACpC,QAAsB,EACtB,MAAsB,EACtB,UAAkB,EAClB,SAAiB,EACjB,UAAmC,EAAE;IAErC,MAAM,oBAAoB,GAAG,IAAA,wCAAmB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEnE,oDAAoD;IACpD,IAAI,CAAC;QACH,MAAM,QAAQ;aACX,OAAO,CAAC;YACP,UAAU;YACV,SAAS;YACT,OAAO;YACP,MAAM;SACP,CAAC;aACD,SAAS,EAAE,CAAC;QAEf,OAAO,EAAE,OAAO,EAAE,CAAC,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;IACrF,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,0CAA6B,EAAE,CAAC;YAC/C,MAAM,CAAC,KAAK,CAAC,GAAG,gBAAO,CAAC,KAAK,qDAAqD,CAAC,CAAC;QACtF,CAAC;aAAM,CAAC;YACN,IAAA,qBAAa,EAAC,CAAC,CAAC,CAAC;YACjB,MAAM,OAAO,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AAiB,CACxB,CAA2C,EAC3C,CAA2C;IAE3C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC"}
@@ -1,36 +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 { Argv } from 'yargs';
9
- import { CommandModule, CommandModuleImplementation } from '../../command-builder/command-module';
10
- /**
11
- * The command-line module for the `ng version` command.
12
- */
13
- export default class VersionCommandModule extends CommandModule implements CommandModuleImplementation {
14
- command: string;
15
- aliases: string[] | undefined;
16
- describe: string;
17
- longDescriptionPath?: string | undefined;
18
- /**
19
- * Builds the command-line options for the `ng version` command.
20
- * @param localYargs The `yargs` instance to configure.
21
- * @returns The configured `yargs` instance.
22
- */
23
- builder(localYargs: Argv): Argv;
24
- /**
25
- * The main execution logic for the `ng version` command.
26
- */
27
- run(options: {
28
- json?: boolean;
29
- }): Promise<void>;
30
- /**
31
- * Formats the package table section of the version output.
32
- * @param versions A map of package names to their versions.
33
- * @returns A string containing the formatted package table.
34
- */
35
- private formatPackageTable;
36
- }
@@ -1,117 +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
- const command_module_1 = require("../../command-builder/command-module");
11
- const color_1 = require("../../utilities/color");
12
- const command_config_1 = require("../command-config");
13
- const version_info_1 = require("./version-info");
14
- /**
15
- * The Angular CLI logo, displayed as ASCII art.
16
- */
17
- const ASCII_ART = `
18
- _ _ ____ _ ___
19
- / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
20
- / △ \\ | '_ \\ / _\` | | | | |/ _\` | '__| | | | | | |
21
- / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |
22
- /_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|
23
- |___/
24
- `
25
- .split('\n')
26
- .map((x) => color_1.colors.red(x))
27
- .join('\n');
28
- /**
29
- * The command-line module for the `ng version` command.
30
- */
31
- class VersionCommandModule extends command_module_1.CommandModule {
32
- command = 'version';
33
- aliases = command_config_1.RootCommands['version'].aliases;
34
- describe = 'Outputs Angular CLI version.';
35
- longDescriptionPath;
36
- /**
37
- * Builds the command-line options for the `ng version` command.
38
- * @param localYargs The `yargs` instance to configure.
39
- * @returns The configured `yargs` instance.
40
- */
41
- builder(localYargs) {
42
- return localYargs.option('json', {
43
- describe: 'Outputs version information in JSON format.',
44
- type: 'boolean',
45
- });
46
- }
47
- /**
48
- * The main execution logic for the `ng version` command.
49
- */
50
- async run(options) {
51
- const { logger } = this.context;
52
- const versionInfo = await (0, version_info_1.gatherVersionInfo)(this.context);
53
- if (options.json) {
54
- // eslint-disable-next-line no-console
55
- console.log(JSON.stringify(versionInfo, null, 2));
56
- return;
57
- }
58
- const { cli: { version: ngCliVersion }, framework, system: { node: { version: nodeVersion, unsupported: unsupportedNodeVersion }, os: { platform: os, architecture: arch }, packageManager: { name: packageManagerName, version: packageManagerVersion }, }, packages, } = versionInfo;
59
- const headerInfo = [{ label: 'Angular CLI', value: ngCliVersion }];
60
- if (framework.version) {
61
- headerInfo.push({ label: 'Angular', value: framework.version });
62
- }
63
- headerInfo.push({
64
- label: 'Node.js',
65
- value: `${nodeVersion}${unsupportedNodeVersion ? color_1.colors.yellow(' (Unsupported)') : ''}`,
66
- }, {
67
- label: 'Package Manager',
68
- value: `${packageManagerName} ${packageManagerVersion ?? '<error>'}`,
69
- }, { label: 'Operating System', value: `${os} ${arch}` });
70
- const maxHeaderLabelLength = Math.max(...headerInfo.map((l) => l.label.length));
71
- const header = headerInfo
72
- .map(({ label, value }) => color_1.colors.bold(label.padEnd(maxHeaderLabelLength + 2)) + `: ${color_1.colors.cyan(value)}`)
73
- .join('\n');
74
- const packageTable = this.formatPackageTable(packages);
75
- logger.info([ASCII_ART, header, packageTable].join('\n\n'));
76
- if (unsupportedNodeVersion) {
77
- logger.warn(`Warning: The current version of Node (${nodeVersion}) is not supported by Angular.`);
78
- }
79
- }
80
- /**
81
- * Formats the package table section of the version output.
82
- * @param versions A map of package names to their versions.
83
- * @returns A string containing the formatted package table.
84
- */
85
- formatPackageTable(versions) {
86
- const versionKeys = Object.keys(versions);
87
- if (versionKeys.length === 0) {
88
- return '';
89
- }
90
- const headers = {
91
- name: 'Package',
92
- installed: 'Installed Version',
93
- requested: 'Requested Version',
94
- };
95
- const maxNameLength = Math.max(headers.name.length, ...versionKeys.map((key) => key.length));
96
- const maxInstalledLength = Math.max(headers.installed.length, ...versionKeys.map((key) => versions[key].installed.length));
97
- const maxRequestedLength = Math.max(headers.requested.length, ...versionKeys.map((key) => versions[key].requested.length));
98
- const tableRows = versionKeys
99
- .map((module) => {
100
- const { requested, installed } = versions[module];
101
- const name = module.padEnd(maxNameLength);
102
- const coloredInstalled = installed === '<error>' ? color_1.colors.red(installed) : color_1.colors.cyan(installed);
103
- const installedPadding = ' '.repeat(maxInstalledLength - installed.length);
104
- return `│ ${name} │ ${coloredInstalled}${installedPadding} │ ${requested.padEnd(maxRequestedLength)} │`;
105
- })
106
- .sort();
107
- const top = `┌─${'─'.repeat(maxNameLength)}─┬─${'─'.repeat(maxInstalledLength)}─┬─${'─'.repeat(maxRequestedLength)}─┐`;
108
- const header = `│ ${headers.name.padEnd(maxNameLength)} │ ` +
109
- `${headers.installed.padEnd(maxInstalledLength)} │ ` +
110
- `${headers.requested.padEnd(maxRequestedLength)} │`;
111
- const separator = `├─${'─'.repeat(maxNameLength)}─┼─${'─'.repeat(maxInstalledLength)}─┼─${'─'.repeat(maxRequestedLength)}─┤`;
112
- const bottom = `└─${'─'.repeat(maxNameLength)}─┴─${'─'.repeat(maxInstalledLength)}─┴─${'─'.repeat(maxRequestedLength)}─┘`;
113
- return [top, header, separator, ...tableRows, bottom].join('\n');
114
- }
115
- }
116
- exports.default = VersionCommandModule;
117
- //# sourceMappingURL=cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,yEAAkG;AAClG,iDAA+C;AAC/C,sDAAiD;AACjD,iDAAuE;AAEvE;;GAEG;AACH,MAAM,SAAS,GAAG;;;;;;;KAOb;KACF,KAAK,CAAC,IAAI,CAAC;KACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACzB,IAAI,CAAC,IAAI,CAAC,CAAC;AAEd;;GAEG;AACH,MAAqB,oBACnB,SAAQ,8BAAa;IAGrB,OAAO,GAAG,SAAS,CAAC;IACpB,OAAO,GAAG,6BAAY,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;IAC1C,QAAQ,GAAG,8BAA8B,CAAC;IAC1C,mBAAmB,CAAsB;IAEzC;;;;OAIG;IACH,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE;YAC/B,QAAQ,EAAE,6CAA6C;YACvD,IAAI,EAAE,SAAS;SAChB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CAAC,OAA2B;QACnC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAChC,MAAM,WAAW,GAAG,MAAM,IAAA,gCAAiB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE1D,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAElD,OAAO;QACT,CAAC;QAED,MAAM,EACJ,GAAG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AK,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,MAAM,CAC9D,kBAAkB,CACnB,MAAM,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC;QAC1C,MAAM,MAAM,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,MAAM,CAC3D,kBAAkB,CACnB,MAAM,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC;QAE1C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AA9ID,uCA8IC"}
@@ -1,46 +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 { CommandContext } from '../../command-builder/definitions';
9
- /**
10
- * An object containing version information for a single package.
11
- */
12
- export interface PackageVersionInfo {
13
- requested: string;
14
- installed: string;
15
- }
16
- /**
17
- * An object containing all the version information that will be displayed by the command.
18
- */
19
- export interface VersionInfo {
20
- cli: {
21
- version: string;
22
- };
23
- framework: {
24
- version: string | undefined;
25
- };
26
- system: {
27
- node: {
28
- version: string;
29
- unsupported: boolean;
30
- };
31
- os: {
32
- platform: string;
33
- architecture: string;
34
- };
35
- packageManager: {
36
- name: string;
37
- version: string | undefined;
38
- };
39
- };
40
- packages: Record<string, PackageVersionInfo>;
41
- }
42
- /**
43
- * Gathers all the version information from the environment and workspace.
44
- * @returns An object containing all the version information.
45
- */
46
- export declare function gatherVersionInfo(context: CommandContext): Promise<VersionInfo>;
@@ -1,101 +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.gatherVersionInfo = gatherVersionInfo;
11
- const node_module_1 = require("node:module");
12
- const node_version_1 = require("../../utilities/node-version");
13
- const version_1 = require("../../utilities/version");
14
- /**
15
- * A list of regular expression patterns that match package names that should be included in the
16
- * version output.
17
- */
18
- const PACKAGE_PATTERNS = [
19
- /^@angular\/.*/,
20
- /^@angular-devkit\/.*/,
21
- /^@ngtools\/.*/,
22
- /^@schematics\/.*/,
23
- /^rxjs$/,
24
- /^typescript$/,
25
- /^ng-packagr$/,
26
- /^vitest$/,
27
- /^webpack$/,
28
- /^zone\.js$/,
29
- ];
30
- /**
31
- * Gathers all the version information from the environment and workspace.
32
- * @returns An object containing all the version information.
33
- */
34
- async function gatherVersionInfo(context) {
35
- // Trailing slash is used to allow the path to be treated as a directory
36
- const workspaceRequire = (0, node_module_1.createRequire)(context.root + '/');
37
- let workspacePackage;
38
- try {
39
- workspacePackage = workspaceRequire('./package.json');
40
- }
41
- catch { }
42
- const allDependencies = {
43
- ...workspacePackage?.dependencies,
44
- ...workspacePackage?.devDependencies,
45
- };
46
- const packageNames = new Set(Object.keys(allDependencies));
47
- const packages = {};
48
- for (const name of packageNames) {
49
- if (PACKAGE_PATTERNS.some((p) => p.test(name))) {
50
- packages[name] = {
51
- requested: allDependencies[name] ?? 'error',
52
- installed: getVersion(name, workspaceRequire),
53
- };
54
- }
55
- }
56
- const angularCoreVersion = packages['@angular/core'];
57
- return {
58
- cli: {
59
- version: version_1.VERSION.full,
60
- },
61
- framework: {
62
- version: angularCoreVersion?.installed,
63
- },
64
- system: {
65
- node: {
66
- version: process.versions.node,
67
- unsupported: !(0, node_version_1.isNodeVersionSupported)(),
68
- },
69
- os: {
70
- platform: process.platform,
71
- architecture: process.arch,
72
- },
73
- packageManager: {
74
- name: context.packageManager.name,
75
- version: await context.packageManager.getVersion(),
76
- },
77
- },
78
- packages,
79
- };
80
- }
81
- /**
82
- * Gets the version of a package.
83
- * @param moduleName The name of the package.
84
- * @param workspaceRequire A `require` function for the workspace.
85
- * @param localRequire A `require` function for the CLI.
86
- * @returns The version of the package, or `<error>` if it could not be found.
87
- */
88
- function getVersion(moduleName, workspaceRequire) {
89
- let packageInfo;
90
- // Try to find the package in the workspace
91
- try {
92
- packageInfo = workspaceRequire(`${moduleName}/package.json`);
93
- }
94
- catch { }
95
- // If found, attempt to get the version
96
- if (packageInfo) {
97
- return packageInfo.version;
98
- }
99
- return '<error>';
100
- }
101
- //# sourceMappingURL=version-info.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"version-info.js","sourceRoot":"","sources":["version-info.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAyEH,8CAkDC;AAzHD,6CAA4C;AAE5C,+DAAsE;AACtE,qDAAkD;AA+ClD;;;GAGG;AACH,MAAM,gBAAgB,GAAG;IACvB,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,cAAc;IACd,UAAU;IACV,WAAW;IACX,YAAY;CACb,CAAC;AAEF;;;GAGG;AACI,KAAK,UAAU,iBAAiB,CAAC,OAAuB;IAC7D,wEAAwE;IACxE,MAAM,gBAAgB,GAAG,IAAA,2BAAa,EAAC,OAAO,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;IAE3D,IAAI,gBAAgD,CAAC;IACrD,IAAI,CAAC;QACH,gBAAgB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,MAAM,eAAe,GAAG;QACtB,GAAG,gBAAgB,EAAE,YAAY;QACjC,GAAG,gBAAgB,EAAE,eAAe;KACrC,CAAC;IACF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAE3D,MAAM,QAAQ,GAAuC,EAAE,CAAC;IACxD,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,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C;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,23 +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 { Host } from './host';
9
- import { Logger } from './logger';
10
- import { PackageManagerName } from './package-manager-descriptor';
11
- /**
12
- * Discovers the package manager used in a project by searching for lockfiles.
13
- *
14
- * This function searches for lockfiles in the given directory and its ancestors.
15
- * If multiple lockfiles are found, it uses the precedence array to determine
16
- * which package manager to use. The search is bounded by the git repository root.
17
- *
18
- * @param host A `Host` instance for interacting with the file system.
19
- * @param startDir The directory to start the search from.
20
- * @param logger An optional logger instance.
21
- * @returns A promise that resolves to the name of the discovered package manager, or null if none is found.
22
- */
23
- export declare function discover(host: Host, startDir: string, logger?: Logger): Promise<PackageManagerName | null>;