@depup/angular__cli 21.2.1-depup.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 (364) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/bin/bootstrap.js +33 -0
  4. package/bin/ng.js +71 -0
  5. package/bin/package.json +3 -0
  6. package/changes.json +30 -0
  7. package/lib/cli/index.d.ts +11 -0
  8. package/lib/cli/index.js +109 -0
  9. package/lib/cli/index.js.map +1 -0
  10. package/lib/code-examples.db +0 -0
  11. package/lib/config/schema.json +6150 -0
  12. package/lib/config/workspace-schema.d.ts +1025 -0
  13. package/lib/config/workspace-schema.js +133 -0
  14. package/lib/config/workspace-schema.js.map +1 -0
  15. package/lib/init.d.ts +8 -0
  16. package/lib/init.js +162 -0
  17. package/lib/init.js.map +1 -0
  18. package/package.json +103 -0
  19. package/src/analytics/analytics-collector.d.ts +35 -0
  20. package/src/analytics/analytics-collector.js +195 -0
  21. package/src/analytics/analytics-collector.js.map +1 -0
  22. package/src/analytics/analytics-parameters.d.ts +101 -0
  23. package/src/analytics/analytics-parameters.js +107 -0
  24. package/src/analytics/analytics-parameters.js.map +1 -0
  25. package/src/analytics/analytics.d.ts +27 -0
  26. package/src/analytics/analytics.js +183 -0
  27. package/src/analytics/analytics.js.map +1 -0
  28. package/src/command-builder/architect-base-command-module.d.ts +30 -0
  29. package/src/command-builder/architect-base-command-module.js +244 -0
  30. package/src/command-builder/architect-base-command-module.js.map +1 -0
  31. package/src/command-builder/architect-command-module.d.ts +28 -0
  32. package/src/command-builder/architect-command-module.js +218 -0
  33. package/src/command-builder/architect-command-module.js.map +1 -0
  34. package/src/command-builder/command-module.d.ts +73 -0
  35. package/src/command-builder/command-module.js +245 -0
  36. package/src/command-builder/command-module.js.map +1 -0
  37. package/src/command-builder/command-runner.d.ts +9 -0
  38. package/src/command-builder/command-runner.js +195 -0
  39. package/src/command-builder/command-runner.js.map +1 -0
  40. package/src/command-builder/definitions.d.ts +41 -0
  41. package/src/command-builder/definitions.js +20 -0
  42. package/src/command-builder/definitions.js.map +1 -0
  43. package/src/command-builder/schematics-command-module.d.ts +41 -0
  44. package/src/command-builder/schematics-command-module.js +408 -0
  45. package/src/command-builder/schematics-command-module.js.map +1 -0
  46. package/src/command-builder/utilities/command.d.ts +13 -0
  47. package/src/command-builder/utilities/command.js +39 -0
  48. package/src/command-builder/utilities/command.js.map +1 -0
  49. package/src/command-builder/utilities/json-help.d.ts +37 -0
  50. package/src/command-builder/utilities/json-help.js +92 -0
  51. package/src/command-builder/utilities/json-help.js.map +1 -0
  52. package/src/command-builder/utilities/json-schema.d.ts +64 -0
  53. package/src/command-builder/utilities/json-schema.js +349 -0
  54. package/src/command-builder/utilities/json-schema.js.map +1 -0
  55. package/src/command-builder/utilities/normalize-options-middleware.d.ts +18 -0
  56. package/src/command-builder/utilities/normalize-options-middleware.js +37 -0
  57. package/src/command-builder/utilities/normalize-options-middleware.js.map +1 -0
  58. package/src/command-builder/utilities/schematic-engine-host.d.ts +15 -0
  59. package/src/command-builder/utilities/schematic-engine-host.js +179 -0
  60. package/src/command-builder/utilities/schematic-engine-host.js.map +1 -0
  61. package/src/command-builder/utilities/schematic-workflow.d.ts +14 -0
  62. package/src/command-builder/utilities/schematic-workflow.js +70 -0
  63. package/src/command-builder/utilities/schematic-workflow.js.map +1 -0
  64. package/src/commands/add/cli.d.ts +38 -0
  65. package/src/commands/add/cli.js +623 -0
  66. package/src/commands/add/cli.js.map +1 -0
  67. package/src/commands/add/long-description.md +7 -0
  68. package/src/commands/analytics/cli.d.ts +16 -0
  69. package/src/commands/analytics/cli.js +34 -0
  70. package/src/commands/analytics/cli.js.map +1 -0
  71. package/src/commands/analytics/info/cli.d.ts +16 -0
  72. package/src/commands/analytics/info/cli.js +25 -0
  73. package/src/commands/analytics/info/cli.js.map +1 -0
  74. package/src/commands/analytics/long-description.md +20 -0
  75. package/src/commands/analytics/settings/cli.d.ts +35 -0
  76. package/src/commands/analytics/settings/cli.js +54 -0
  77. package/src/commands/analytics/settings/cli.js.map +1 -0
  78. package/src/commands/build/cli.d.ts +16 -0
  79. package/src/commands/build/cli.js +21 -0
  80. package/src/commands/build/cli.js.map +1 -0
  81. package/src/commands/build/long-description.md +18 -0
  82. package/src/commands/cache/clean/cli.d.ts +17 -0
  83. package/src/commands/cache/clean/cli.js +32 -0
  84. package/src/commands/cache/clean/cli.js.map +1 -0
  85. package/src/commands/cache/cli.d.ts +17 -0
  86. package/src/commands/cache/cli.js +36 -0
  87. package/src/commands/cache/cli.js.map +1 -0
  88. package/src/commands/cache/info/cli.d.ts +20 -0
  89. package/src/commands/cache/info/cli.js +139 -0
  90. package/src/commands/cache/info/cli.js.map +1 -0
  91. package/src/commands/cache/long-description.md +53 -0
  92. package/src/commands/cache/settings/cli.d.ts +27 -0
  93. package/src/commands/cache/settings/cli.js +41 -0
  94. package/src/commands/cache/settings/cli.js.map +1 -0
  95. package/src/commands/cache/utilities.d.ts +11 -0
  96. package/src/commands/cache/utilities.js +47 -0
  97. package/src/commands/cache/utilities.js.map +1 -0
  98. package/src/commands/command-config.d.ts +17 -0
  99. package/src/commands/command-config.js +116 -0
  100. package/src/commands/command-config.js.map +1 -0
  101. package/src/commands/completion/cli.d.ts +16 -0
  102. package/src/commands/completion/cli.js +61 -0
  103. package/src/commands/completion/cli.js.map +1 -0
  104. package/src/commands/completion/long-description.md +67 -0
  105. package/src/commands/config/cli.d.ts +24 -0
  106. package/src/commands/config/cli.js +150 -0
  107. package/src/commands/config/cli.js.map +1 -0
  108. package/src/commands/config/long-description.md +13 -0
  109. package/src/commands/deploy/cli.d.ts +17 -0
  110. package/src/commands/deploy/cli.js +38 -0
  111. package/src/commands/deploy/cli.js.map +1 -0
  112. package/src/commands/deploy/long-description.md +22 -0
  113. package/src/commands/e2e/cli.d.ts +18 -0
  114. package/src/commands/e2e/cli.js +42 -0
  115. package/src/commands/e2e/cli.js.map +1 -0
  116. package/src/commands/extract-i18n/cli.d.ts +17 -0
  117. package/src/commands/extract-i18n/cli.js +48 -0
  118. package/src/commands/extract-i18n/cli.js.map +1 -0
  119. package/src/commands/generate/cli.d.ts +47 -0
  120. package/src/commands/generate/cli.js +189 -0
  121. package/src/commands/generate/cli.js.map +1 -0
  122. package/src/commands/lint/cli.d.ts +17 -0
  123. package/src/commands/lint/cli.js +25 -0
  124. package/src/commands/lint/cli.js.map +1 -0
  125. package/src/commands/lint/long-description.md +20 -0
  126. package/src/commands/make-this-awesome/cli.d.ts +17 -0
  127. package/src/commands/make-this-awesome/cli.js +36 -0
  128. package/src/commands/make-this-awesome/cli.js.map +1 -0
  129. package/src/commands/mcp/cli.d.ts +20 -0
  130. package/src/commands/mcp/cli.js +74 -0
  131. package/src/commands/mcp/cli.js.map +1 -0
  132. package/src/commands/mcp/constants.d.ts +10 -0
  133. package/src/commands/mcp/constants.js +16 -0
  134. package/src/commands/mcp/constants.js.map +1 -0
  135. package/src/commands/mcp/devserver.d.ts +85 -0
  136. package/src/commands/mcp/devserver.js +112 -0
  137. package/src/commands/mcp/devserver.js.map +1 -0
  138. package/src/commands/mcp/host.d.ts +97 -0
  139. package/src/commands/mcp/host.js +118 -0
  140. package/src/commands/mcp/host.js.map +1 -0
  141. package/src/commands/mcp/mcp-server.d.ts +192 -0
  142. package/src/commands/mcp/mcp-server.js +155 -0
  143. package/src/commands/mcp/mcp-server.js.map +1 -0
  144. package/src/commands/mcp/resources/ai-tutor.md +824 -0
  145. package/src/commands/mcp/resources/best-practices.md +54 -0
  146. package/src/commands/mcp/resources/instructions.d.ts +9 -0
  147. package/src/commands/mcp/resources/instructions.js +26 -0
  148. package/src/commands/mcp/resources/instructions.js.map +1 -0
  149. package/src/commands/mcp/shared-options.d.ts +12 -0
  150. package/src/commands/mcp/shared-options.js +22 -0
  151. package/src/commands/mcp/shared-options.js.map +1 -0
  152. package/src/commands/mcp/tools/ai-tutor.d.ts +12 -0
  153. package/src/commands/mcp/tools/ai-tutor.js +59 -0
  154. package/src/commands/mcp/tools/ai-tutor.js.map +1 -0
  155. package/src/commands/mcp/tools/best-practices.d.ts +13 -0
  156. package/src/commands/mcp/tools/best-practices.js +187 -0
  157. package/src/commands/mcp/tools/best-practices.js.map +1 -0
  158. package/src/commands/mcp/tools/build.d.ts +37 -0
  159. package/src/commands/mcp/tools/build.js +89 -0
  160. package/src/commands/mcp/tools/build.js.map +1 -0
  161. package/src/commands/mcp/tools/devserver/devserver-start.d.ts +31 -0
  162. package/src/commands/mcp/tools/devserver/devserver-start.js +91 -0
  163. package/src/commands/mcp/tools/devserver/devserver-start.js.map +1 -0
  164. package/src/commands/mcp/tools/devserver/devserver-stop.d.ts +31 -0
  165. package/src/commands/mcp/tools/devserver/devserver-stop.js +68 -0
  166. package/src/commands/mcp/tools/devserver/devserver-stop.js.map +1 -0
  167. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.d.ts +41 -0
  168. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js +104 -0
  169. package/src/commands/mcp/tools/devserver/devserver-wait-for-build.js.map +1 -0
  170. package/src/commands/mcp/tools/doc-search.d.ts +21 -0
  171. package/src/commands/mcp/tools/doc-search.js +324 -0
  172. package/src/commands/mcp/tools/doc-search.js.map +1 -0
  173. package/src/commands/mcp/tools/e2e.d.ts +44 -0
  174. package/src/commands/mcp/tools/e2e.js +87 -0
  175. package/src/commands/mcp/tools/e2e.js.map +1 -0
  176. package/src/commands/mcp/tools/examples/database-discovery.d.ts +34 -0
  177. package/src/commands/mcp/tools/examples/database-discovery.js +87 -0
  178. package/src/commands/mcp/tools/examples/database-discovery.js.map +1 -0
  179. package/src/commands/mcp/tools/examples/database.d.ts +35 -0
  180. package/src/commands/mcp/tools/examples/database.js +125 -0
  181. package/src/commands/mcp/tools/examples/database.js.map +1 -0
  182. package/src/commands/mcp/tools/examples/index.d.ts +26 -0
  183. package/src/commands/mcp/tools/examples/index.js +149 -0
  184. package/src/commands/mcp/tools/examples/index.js.map +1 -0
  185. package/src/commands/mcp/tools/examples/query-escaper.d.ts +20 -0
  186. package/src/commands/mcp/tools/examples/query-escaper.js +68 -0
  187. package/src/commands/mcp/tools/examples/query-escaper.js.map +1 -0
  188. package/src/commands/mcp/tools/examples/runtime-database.d.ts +10 -0
  189. package/src/commands/mcp/tools/examples/runtime-database.js +192 -0
  190. package/src/commands/mcp/tools/examples/runtime-database.js.map +1 -0
  191. package/src/commands/mcp/tools/examples/schemas.d.ts +29 -0
  192. package/src/commands/mcp/tools/examples/schemas.js +101 -0
  193. package/src/commands/mcp/tools/examples/schemas.js.map +1 -0
  194. package/src/commands/mcp/tools/examples/utils.d.ts +14 -0
  195. package/src/commands/mcp/tools/examples/utils.js +31 -0
  196. package/src/commands/mcp/tools/examples/utils.js.map +1 -0
  197. package/src/commands/mcp/tools/modernize.d.ts +43 -0
  198. package/src/commands/mcp/tools/modernize.js +165 -0
  199. package/src/commands/mcp/tools/modernize.js.map +1 -0
  200. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.d.ts +17 -0
  201. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js +62 -0
  202. package/src/commands/mcp/tools/onpush-zoneless-migration/analyze-for-unsupported-zone-uses.js.map +1 -0
  203. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.d.ts +12 -0
  204. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js +73 -0
  205. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-single-file.js.map +1 -0
  206. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.d.ts +11 -0
  207. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js +60 -0
  208. package/src/commands/mcp/tools/onpush-zoneless-migration/migrate-test-file.js.map +1 -0
  209. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.d.ts +15 -0
  210. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js +238 -0
  211. package/src/commands/mcp/tools/onpush-zoneless-migration/prompts.js.map +1 -0
  212. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.d.ts +10 -0
  213. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js +20 -0
  214. package/src/commands/mcp/tools/onpush-zoneless-migration/send-debug-message.js.map +1 -0
  215. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.d.ts +35 -0
  216. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js +136 -0
  217. package/src/commands/mcp/tools/onpush-zoneless-migration/ts-utils.js.map +1 -0
  218. package/src/commands/mcp/tools/onpush-zoneless-migration/types.d.ts +13 -0
  219. package/src/commands/mcp/tools/onpush-zoneless-migration/types.js +10 -0
  220. package/src/commands/mcp/tools/onpush-zoneless-migration/types.js.map +1 -0
  221. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.d.ts +16 -0
  222. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js +224 -0
  223. package/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.js.map +1 -0
  224. package/src/commands/mcp/tools/projects.d.ts +47 -0
  225. package/src/commands/mcp/tools/projects.js +523 -0
  226. package/src/commands/mcp/tools/projects.js.map +1 -0
  227. package/src/commands/mcp/tools/test.d.ts +35 -0
  228. package/src/commands/mcp/tools/test.js +79 -0
  229. package/src/commands/mcp/tools/test.js.map +1 -0
  230. package/src/commands/mcp/tools/tool-registry.d.ts +39 -0
  231. package/src/commands/mcp/tools/tool-registry.js +35 -0
  232. package/src/commands/mcp/tools/tool-registry.js.map +1 -0
  233. package/src/commands/mcp/utils.d.ts +25 -0
  234. package/src/commands/mcp/utils.js +44 -0
  235. package/src/commands/mcp/utils.js.map +1 -0
  236. package/src/commands/mcp/workspace-utils.d.ts +53 -0
  237. package/src/commands/mcp/workspace-utils.js +138 -0
  238. package/src/commands/mcp/workspace-utils.js.map +1 -0
  239. package/src/commands/new/cli.d.ts +27 -0
  240. package/src/commands/new/cli.js +76 -0
  241. package/src/commands/new/cli.js.map +1 -0
  242. package/src/commands/new/long-description.md +15 -0
  243. package/src/commands/run/cli.d.ts +25 -0
  244. package/src/commands/run/cli.js +89 -0
  245. package/src/commands/run/cli.js.map +1 -0
  246. package/src/commands/run/long-description.md +10 -0
  247. package/src/commands/serve/cli.d.ts +16 -0
  248. package/src/commands/serve/cli.js +20 -0
  249. package/src/commands/serve/cli.js.map +1 -0
  250. package/src/commands/test/cli.d.ts +16 -0
  251. package/src/commands/test/cli.js +21 -0
  252. package/src/commands/test/cli.js.map +1 -0
  253. package/src/commands/test/long-description.md +2 -0
  254. package/src/commands/update/cli.d.ts +34 -0
  255. package/src/commands/update/cli.js +531 -0
  256. package/src/commands/update/cli.js.map +1 -0
  257. package/src/commands/update/long-description.md +22 -0
  258. package/src/commands/update/schematic/collection.json +9 -0
  259. package/src/commands/update/schematic/index.d.ts +11 -0
  260. package/src/commands/update/schematic/index.js +715 -0
  261. package/src/commands/update/schematic/index.js.map +1 -0
  262. package/src/commands/update/schematic/schema.d.ts +51 -0
  263. package/src/commands/update/schematic/schema.js +16 -0
  264. package/src/commands/update/schematic/schema.js.map +1 -0
  265. package/src/commands/update/schematic/schema.json +64 -0
  266. package/src/commands/update/utilities/cli-version.d.ts +48 -0
  267. package/src/commands/update/utilities/cli-version.js +196 -0
  268. package/src/commands/update/utilities/cli-version.js.map +1 -0
  269. package/src/commands/update/utilities/constants.d.ts +12 -0
  270. package/src/commands/update/utilities/constants.js +16 -0
  271. package/src/commands/update/utilities/constants.js.map +1 -0
  272. package/src/commands/update/utilities/git.d.ts +36 -0
  273. package/src/commands/update/utilities/git.js +148 -0
  274. package/src/commands/update/utilities/git.js.map +1 -0
  275. package/src/commands/update/utilities/migration.d.ts +32 -0
  276. package/src/commands/update/utilities/migration.js +267 -0
  277. package/src/commands/update/utilities/migration.js.map +1 -0
  278. package/src/commands/version/cli.d.ts +36 -0
  279. package/src/commands/version/cli.js +117 -0
  280. package/src/commands/version/cli.js.map +1 -0
  281. package/src/commands/version/version-info.d.ts +46 -0
  282. package/src/commands/version/version-info.js +107 -0
  283. package/src/commands/version/version-info.js.map +1 -0
  284. package/src/package-managers/discovery.d.ts +23 -0
  285. package/src/package-managers/discovery.js +104 -0
  286. package/src/package-managers/discovery.js.map +1 -0
  287. package/src/package-managers/error.d.ts +43 -0
  288. package/src/package-managers/error.js +41 -0
  289. package/src/package-managers/error.js.map +1 -0
  290. package/src/package-managers/factory.d.ts +30 -0
  291. package/src/package-managers/factory.js +137 -0
  292. package/src/package-managers/factory.js.map +1 -0
  293. package/src/package-managers/host.d.ts +86 -0
  294. package/src/package-managers/host.js +80 -0
  295. package/src/package-managers/host.js.map +1 -0
  296. package/src/package-managers/index.d.ts +13 -0
  297. package/src/package-managers/index.js +17 -0
  298. package/src/package-managers/index.js.map +1 -0
  299. package/src/package-managers/logger.d.ts +27 -0
  300. package/src/package-managers/logger.js +10 -0
  301. package/src/package-managers/logger.js.map +1 -0
  302. package/src/package-managers/package-manager-descriptor.d.ts +245 -0
  303. package/src/package-managers/package-manager-descriptor.js +175 -0
  304. package/src/package-managers/package-manager-descriptor.js.map +1 -0
  305. package/src/package-managers/package-manager.d.ts +191 -0
  306. package/src/package-managers/package-manager.js +496 -0
  307. package/src/package-managers/package-manager.js.map +1 -0
  308. package/src/package-managers/package-metadata.d.ts +91 -0
  309. package/src/package-managers/package-metadata.js +10 -0
  310. package/src/package-managers/package-metadata.js.map +1 -0
  311. package/src/package-managers/package-tree.d.ts +23 -0
  312. package/src/package-managers/package-tree.js +10 -0
  313. package/src/package-managers/package-tree.js.map +1 -0
  314. package/src/package-managers/parsers.d.ts +170 -0
  315. package/src/package-managers/parsers.js +467 -0
  316. package/src/package-managers/parsers.js.map +1 -0
  317. package/src/utilities/color.d.ts +9 -0
  318. package/src/utilities/color.js +28 -0
  319. package/src/utilities/color.js.map +1 -0
  320. package/src/utilities/completion.d.ts +30 -0
  321. package/src/utilities/completion.js +270 -0
  322. package/src/utilities/completion.js.map +1 -0
  323. package/src/utilities/config.d.ts +38 -0
  324. package/src/utilities/config.js +369 -0
  325. package/src/utilities/config.js.map +1 -0
  326. package/src/utilities/environment-options.d.ts +25 -0
  327. package/src/utilities/environment-options.js +60 -0
  328. package/src/utilities/environment-options.js.map +1 -0
  329. package/src/utilities/eol.d.ts +20 -0
  330. package/src/utilities/eol.js +35 -0
  331. package/src/utilities/eol.js.map +1 -0
  332. package/src/utilities/error.d.ts +18 -0
  333. package/src/utilities/error.js +41 -0
  334. package/src/utilities/error.js.map +1 -0
  335. package/src/utilities/find-up.d.ts +21 -0
  336. package/src/utilities/find-up.js +67 -0
  337. package/src/utilities/find-up.js.map +1 -0
  338. package/src/utilities/json-file.d.ts +24 -0
  339. package/src/utilities/json-file.js +179 -0
  340. package/src/utilities/json-file.js.map +1 -0
  341. package/src/utilities/log-file.d.ts +13 -0
  342. package/src/utilities/log-file.js +28 -0
  343. package/src/utilities/log-file.js.map +1 -0
  344. package/src/utilities/memoize.d.ts +15 -0
  345. package/src/utilities/memoize.js +64 -0
  346. package/src/utilities/memoize.js.map +1 -0
  347. package/src/utilities/package-metadata.d.ts +58 -0
  348. package/src/utilities/package-metadata.js +265 -0
  349. package/src/utilities/package-metadata.js.map +1 -0
  350. package/src/utilities/prettier.d.ts +13 -0
  351. package/src/utilities/prettier.js +46 -0
  352. package/src/utilities/prettier.js.map +1 -0
  353. package/src/utilities/project.d.ts +8 -0
  354. package/src/utilities/project.js +81 -0
  355. package/src/utilities/project.js.map +1 -0
  356. package/src/utilities/prompt.d.ts +17 -0
  357. package/src/utilities/prompt.js +90 -0
  358. package/src/utilities/prompt.js.map +1 -0
  359. package/src/utilities/tty.d.ts +16 -0
  360. package/src/utilities/tty.js +23 -0
  361. package/src/utilities/tty.js.map +1 -0
  362. package/src/utilities/version.d.ts +16 -0
  363. package/src/utilities/version.js +26 -0
  364. package/src/utilities/version.js.map +1 -0
@@ -0,0 +1,16 @@
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 { Argv } from 'yargs';
9
+ import { CommandModule, CommandModuleImplementation, Options } from '../../command-builder/command-module';
10
+ export default class AnalyticsCommandModule extends CommandModule implements CommandModuleImplementation {
11
+ command: string;
12
+ describe: string;
13
+ longDescriptionPath: string;
14
+ builder(localYargs: Argv): Argv;
15
+ run(_options: Options<{}>): void;
16
+ }
@@ -0,0 +1,34 @@
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 node_path_1 = require("node:path");
11
+ const command_module_1 = require("../../command-builder/command-module");
12
+ const command_1 = require("../../command-builder/utilities/command");
13
+ const cli_1 = require("./info/cli");
14
+ const cli_2 = require("./settings/cli");
15
+ class AnalyticsCommandModule extends command_module_1.CommandModule {
16
+ command = 'analytics';
17
+ describe = 'Configures the gathering of Angular CLI usage metrics.';
18
+ longDescriptionPath = (0, node_path_1.join)(__dirname, 'long-description.md');
19
+ builder(localYargs) {
20
+ const subcommands = [
21
+ cli_1.AnalyticsInfoCommandModule,
22
+ cli_2.AnalyticsDisableModule,
23
+ cli_2.AnalyticsEnableModule,
24
+ cli_2.AnalyticsPromptModule,
25
+ ].sort(); // sort by class name.
26
+ for (const module of subcommands) {
27
+ (0, command_1.addCommandModuleToYargs)(module, this.context);
28
+ }
29
+ return localYargs.demandCommand(1, command_1.demandCommandFailureMessage).strict();
30
+ }
31
+ run(_options) { }
32
+ }
33
+ exports.default = AnalyticsCommandModule;
34
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,yCAAiC;AAEjC,yEAI8C;AAC9C,qEAGiD;AACjD,oCAAwD;AACxD,wCAIwB;AAExB,MAAqB,sBACnB,SAAQ,8BAAa;IAGrB,OAAO,GAAG,WAAW,CAAC;IACtB,QAAQ,GAAG,wDAAwD,CAAC;IACpE,mBAAmB,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAE7D,OAAO,CAAC,UAAgB;QACtB,MAAM,WAAW,GAAG;YAClB,gCAA0B;YAC1B,4BAAsB;YACtB,2BAAqB;YACrB,2BAAqB;SACtB,CAAC,IAAI,EAAE,CAAC,CAAC,sBAAsB;QAEhC,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;YACjC,IAAA,iCAAuB,EAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,qCAA2B,CAAC,CAAC,MAAM,EAAE,CAAC;IAC3E,CAAC;IAED,GAAG,CAAC,QAAqB,IAAS,CAAC;CACpC;AAxBD,yCAwBC"}
@@ -0,0 +1,16 @@
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 { Argv } from 'yargs';
9
+ import { CommandModule, CommandModuleImplementation, Options } from '../../../command-builder/command-module';
10
+ export declare class AnalyticsInfoCommandModule extends CommandModule implements CommandModuleImplementation {
11
+ command: string;
12
+ describe: string;
13
+ longDescriptionPath?: string;
14
+ builder(localYargs: Argv): Argv;
15
+ run(_options: Options<{}>): Promise<void>;
16
+ }
@@ -0,0 +1,25 @@
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.AnalyticsInfoCommandModule = void 0;
11
+ const analytics_1 = require("../../../analytics/analytics");
12
+ const command_module_1 = require("../../../command-builder/command-module");
13
+ class AnalyticsInfoCommandModule extends command_module_1.CommandModule {
14
+ command = 'info';
15
+ describe = 'Prints analytics gathering and reporting configuration in the console.';
16
+ longDescriptionPath;
17
+ builder(localYargs) {
18
+ return localYargs.strict();
19
+ }
20
+ async run(_options) {
21
+ this.context.logger.info(await (0, analytics_1.getAnalyticsInfoString)(this.context));
22
+ }
23
+ }
24
+ exports.AnalyticsInfoCommandModule = AnalyticsInfoCommandModule;
25
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,4DAAsE;AACtE,4EAIiD;AAEjD,MAAa,0BACX,SAAQ,8BAAa;IAGrB,OAAO,GAAG,MAAM,CAAC;IACjB,QAAQ,GAAG,wEAAwE,CAAC;IACpF,mBAAmB,CAAU;IAE7B,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAqB;QAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,IAAA,kCAAsB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvE,CAAC;CACF;AAfD,gEAeC"}
@@ -0,0 +1,20 @@
1
+ You can help the Angular Team to prioritize features and improvements by permitting the Angular team to send command-line command usage statistics to Google.
2
+ The Angular Team does not collect usage statistics unless you explicitly opt in. When installing the Angular CLI you are prompted to allow global collection of usage statistics.
3
+ If you say no or skip the prompt, no data is collected.
4
+
5
+ ### What is collected?
6
+
7
+ Usage analytics include the commands and selected flags for each execution.
8
+ Usage analytics may include the following information:
9
+
10
+ - Your operating system \(macOS, Linux distribution, Windows\) and its version.
11
+ - Package manager name and version \(local version only\).
12
+ - Node.js version \(local version only\).
13
+ - Angular CLI version \(local version only\).
14
+ - Command name that was run.
15
+ - Workspace information, the number of application and library projects.
16
+ - For schematics commands \(add, generate and new\), the schematic collection and name and a list of selected flags.
17
+ - For build commands \(build, serve\), the builder name, the number and size of bundles \(initial and lazy\), compilation units, the time it took to build and rebuild, and basic Angular-specific API usage.
18
+
19
+ Only Angular owned and developed schematics and builders are reported.
20
+ Third-party schematics and builders do not send data to the Angular Team.
@@ -0,0 +1,35 @@
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 { Argv } from 'yargs';
9
+ import { CommandModule, CommandModuleImplementation, Options } from '../../../command-builder/command-module';
10
+ interface AnalyticsCommandArgs {
11
+ global: boolean;
12
+ }
13
+ declare abstract class AnalyticsSettingModule extends CommandModule<AnalyticsCommandArgs> implements CommandModuleImplementation<AnalyticsCommandArgs> {
14
+ longDescriptionPath?: string;
15
+ builder(localYargs: Argv): Argv<AnalyticsCommandArgs>;
16
+ abstract run({ global }: Options<AnalyticsCommandArgs>): Promise<void>;
17
+ }
18
+ export declare class AnalyticsDisableModule extends AnalyticsSettingModule implements CommandModuleImplementation<AnalyticsCommandArgs> {
19
+ command: string;
20
+ aliases: string;
21
+ describe: string;
22
+ run({ global }: Options<AnalyticsCommandArgs>): Promise<void>;
23
+ }
24
+ export declare class AnalyticsEnableModule extends AnalyticsSettingModule implements CommandModuleImplementation<AnalyticsCommandArgs> {
25
+ command: string;
26
+ aliases: string;
27
+ describe: string;
28
+ run({ global }: Options<AnalyticsCommandArgs>): Promise<void>;
29
+ }
30
+ export declare class AnalyticsPromptModule extends AnalyticsSettingModule implements CommandModuleImplementation<AnalyticsCommandArgs> {
31
+ command: string;
32
+ describe: string;
33
+ run({ global }: Options<AnalyticsCommandArgs>): Promise<void>;
34
+ }
35
+ export {};
@@ -0,0 +1,54 @@
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.AnalyticsPromptModule = exports.AnalyticsEnableModule = exports.AnalyticsDisableModule = void 0;
11
+ const analytics_1 = require("../../../analytics/analytics");
12
+ const command_module_1 = require("../../../command-builder/command-module");
13
+ class AnalyticsSettingModule extends command_module_1.CommandModule {
14
+ longDescriptionPath;
15
+ builder(localYargs) {
16
+ return localYargs
17
+ .option('global', {
18
+ description: `Configure analytics gathering and reporting globally in the caller's home directory.`,
19
+ alias: ['g'],
20
+ type: 'boolean',
21
+ default: false,
22
+ })
23
+ .strict();
24
+ }
25
+ }
26
+ class AnalyticsDisableModule extends AnalyticsSettingModule {
27
+ command = 'disable';
28
+ aliases = 'off';
29
+ describe = 'Disables analytics gathering and reporting for the user.';
30
+ async run({ global }) {
31
+ await (0, analytics_1.setAnalyticsConfig)(global, false);
32
+ process.stderr.write(await (0, analytics_1.getAnalyticsInfoString)(this.context));
33
+ }
34
+ }
35
+ exports.AnalyticsDisableModule = AnalyticsDisableModule;
36
+ class AnalyticsEnableModule extends AnalyticsSettingModule {
37
+ command = 'enable';
38
+ aliases = 'on';
39
+ describe = 'Enables analytics gathering and reporting for the user.';
40
+ async run({ global }) {
41
+ await (0, analytics_1.setAnalyticsConfig)(global, true);
42
+ process.stderr.write(await (0, analytics_1.getAnalyticsInfoString)(this.context));
43
+ }
44
+ }
45
+ exports.AnalyticsEnableModule = AnalyticsEnableModule;
46
+ class AnalyticsPromptModule extends AnalyticsSettingModule {
47
+ command = 'prompt';
48
+ describe = 'Prompts the user to set the analytics gathering status interactively.';
49
+ async run({ global }) {
50
+ await (0, analytics_1.promptAnalytics)(this.context, global, true);
51
+ }
52
+ }
53
+ exports.AnalyticsPromptModule = AnalyticsPromptModule;
54
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1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,uEAAuE,CAAC;IAEnF,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,EAAiC;QACjD,MAAM,IAAA,2BAAe,EAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC;CACF;AAVD,sDAUC"}
@@ -0,0 +1,16 @@
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 { ArchitectCommandModule } from '../../command-builder/architect-command-module';
9
+ import { CommandModuleImplementation } from '../../command-builder/command-module';
10
+ export default class BuildCommandModule extends ArchitectCommandModule implements CommandModuleImplementation {
11
+ multiTarget: boolean;
12
+ command: string;
13
+ aliases: string[] | undefined;
14
+ describe: string;
15
+ longDescriptionPath: string;
16
+ }
@@ -0,0 +1,21 @@
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 node_path_1 = require("node:path");
11
+ const architect_command_module_1 = require("../../command-builder/architect-command-module");
12
+ const command_config_1 = require("../command-config");
13
+ class BuildCommandModule extends architect_command_module_1.ArchitectCommandModule {
14
+ multiTarget = false;
15
+ command = 'build [project]';
16
+ aliases = command_config_1.RootCommands['build'].aliases;
17
+ describe = 'Compiles an Angular application or library into an output directory named dist/ at the given output path.';
18
+ longDescriptionPath = (0, node_path_1.join)(__dirname, 'long-description.md');
19
+ }
20
+ exports.default = BuildCommandModule;
21
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,yCAAiC;AACjC,6FAAwF;AAExF,sDAAiD;AAEjD,MAAqB,kBACnB,SAAQ,iDAAsB;IAG9B,WAAW,GAAG,KAAK,CAAC;IACpB,OAAO,GAAG,iBAAiB,CAAC;IAC5B,OAAO,GAAG,6BAAY,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IACxC,QAAQ,GACN,2GAA2G,CAAC;IAC9G,mBAAmB,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;CAC9D;AAVD,qCAUC"}
@@ -0,0 +1,18 @@
1
+ The command can be used to build a project of type "application" or "library".
2
+ When used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, `poll` and `watch` options are applied.
3
+ All other options apply only to building applications.
4
+
5
+ The application builder uses the [esbuild](https://esbuild.github.io/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.
6
+ A "development" configuration is created by default when you use the CLI to create the project, and you can use that configuration by specifying the `--configuration development`.
7
+
8
+ The configuration options generally correspond to the command options.
9
+ You can override individual configuration defaults by specifying the corresponding options on the command line.
10
+ The command can accept option names given in dash-case.
11
+ Note that in the configuration file, you must specify names in camelCase.
12
+
13
+ Some additional options can only be set through the configuration file,
14
+ either by direct editing or with the `ng config` command.
15
+ These include `assets`, `styles`, and `scripts` objects that provide runtime-global resources to include in the project.
16
+ Resources in CSS, such as images and fonts, are automatically written and fingerprinted at the root of the output folder.
17
+
18
+ For further details, see [Workspace Configuration](reference/configs/workspace-config).
@@ -0,0 +1,17 @@
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 { Argv } from 'yargs';
9
+ import { CommandModule, CommandModuleImplementation, CommandScope } from '../../../command-builder/command-module';
10
+ export declare class CacheCleanModule extends CommandModule implements CommandModuleImplementation {
11
+ command: string;
12
+ describe: string;
13
+ longDescriptionPath: string | undefined;
14
+ scope: CommandScope;
15
+ builder(localYargs: Argv): Argv;
16
+ run(): Promise<void>;
17
+ }
@@ -0,0 +1,32 @@
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.CacheCleanModule = void 0;
11
+ const promises_1 = require("node:fs/promises");
12
+ const command_module_1 = require("../../../command-builder/command-module");
13
+ const utilities_1 = require("../utilities");
14
+ class CacheCleanModule extends command_module_1.CommandModule {
15
+ command = 'clean';
16
+ describe = 'Deletes persistent disk cache from disk.';
17
+ longDescriptionPath;
18
+ scope = command_module_1.CommandScope.In;
19
+ builder(localYargs) {
20
+ return localYargs.strict();
21
+ }
22
+ run() {
23
+ const { path } = (0, utilities_1.getCacheConfig)(this.context.workspace);
24
+ return (0, promises_1.rm)(path, {
25
+ force: true,
26
+ recursive: true,
27
+ maxRetries: 3,
28
+ });
29
+ }
30
+ }
31
+ exports.CacheCleanModule = CacheCleanModule;
32
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAAsC;AAEtC,4EAIiD;AACjD,4CAA8C;AAE9C,MAAa,gBAAiB,SAAQ,8BAAa;IACjD,OAAO,GAAG,OAAO,CAAC;IAClB,QAAQ,GAAG,0CAA0C,CAAC;IACtD,mBAAmB,CAAqB;IAC/B,KAAK,GAAG,6BAAY,CAAC,EAAE,CAAC;IAEjC,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC;IAED,GAAG;QACD,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,0BAAc,EAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAExD,OAAO,IAAA,aAAE,EAAC,IAAI,EAAE;YACd,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,CAAC;SACd,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,4CAmBC"}
@@ -0,0 +1,17 @@
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 { Argv } from 'yargs';
9
+ import { CommandModule, CommandModuleImplementation, CommandScope, Options } from '../../command-builder/command-module';
10
+ export default class CacheCommandModule extends CommandModule implements CommandModuleImplementation {
11
+ command: string;
12
+ describe: string;
13
+ longDescriptionPath: string;
14
+ scope: CommandScope;
15
+ builder(localYargs: Argv): Argv;
16
+ run(_options: Options<{}>): void;
17
+ }
@@ -0,0 +1,36 @@
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 node_path_1 = require("node:path");
11
+ const command_module_1 = require("../../command-builder/command-module");
12
+ const command_1 = require("../../command-builder/utilities/command");
13
+ const cli_1 = require("./clean/cli");
14
+ const cli_2 = require("./info/cli");
15
+ const cli_3 = require("./settings/cli");
16
+ class CacheCommandModule extends command_module_1.CommandModule {
17
+ command = 'cache';
18
+ describe = 'Configure persistent disk cache and retrieve cache statistics.';
19
+ longDescriptionPath = (0, node_path_1.join)(__dirname, 'long-description.md');
20
+ scope = command_module_1.CommandScope.In;
21
+ builder(localYargs) {
22
+ const subcommands = [
23
+ cli_3.CacheEnableModule,
24
+ cli_3.CacheDisableModule,
25
+ cli_1.CacheCleanModule,
26
+ cli_2.CacheInfoCommandModule,
27
+ ].sort();
28
+ for (const module of subcommands) {
29
+ (0, command_1.addCommandModuleToYargs)(module, this.context);
30
+ }
31
+ return localYargs.demandCommand(1, command_1.demandCommandFailureMessage).strict();
32
+ }
33
+ run(_options) { }
34
+ }
35
+ exports.default = CacheCommandModule;
36
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,yCAAiC;AAEjC,yEAK8C;AAC9C,qEAGiD;AACjD,qCAA+C;AAC/C,oCAAoD;AACpD,wCAAuE;AAEvE,MAAqB,kBACnB,SAAQ,8BAAa;IAGrB,OAAO,GAAG,OAAO,CAAC;IAClB,QAAQ,GAAG,gEAAgE,CAAC;IAC5E,mBAAmB,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IACpD,KAAK,GAAG,6BAAY,CAAC,EAAE,CAAC;IAEjC,OAAO,CAAC,UAAgB;QACtB,MAAM,WAAW,GAAG;YAClB,uBAAiB;YACjB,wBAAkB;YAClB,sBAAgB;YAChB,4BAAsB;SACvB,CAAC,IAAI,EAAE,CAAC;QAET,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;YACjC,IAAA,iCAAuB,EAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,qCAA2B,CAAC,CAAC,MAAM,EAAE,CAAC;IAC3E,CAAC;IAED,GAAG,CAAC,QAAqB,IAAS,CAAC;CACpC;AAzBD,qCAyBC"}
@@ -0,0 +1,20 @@
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 { Argv } from 'yargs';
9
+ import { CommandModule, CommandModuleImplementation, CommandScope } from '../../../command-builder/command-module';
10
+ export declare class CacheInfoCommandModule extends CommandModule implements CommandModuleImplementation {
11
+ command: string;
12
+ describe: string;
13
+ longDescriptionPath?: string | undefined;
14
+ scope: CommandScope;
15
+ builder(localYargs: Argv): Argv;
16
+ run(): Promise<void>;
17
+ private getSizeOfDirectory;
18
+ private formatSize;
19
+ private effectiveEnabledStatus;
20
+ }
@@ -0,0 +1,139 @@
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.CacheInfoCommandModule = void 0;
44
+ const fs = __importStar(require("node:fs/promises"));
45
+ const node_path_1 = require("node:path");
46
+ const command_module_1 = require("../../../command-builder/command-module");
47
+ const color_1 = require("../../../utilities/color");
48
+ const environment_options_1 = require("../../../utilities/environment-options");
49
+ const utilities_1 = require("../utilities");
50
+ class CacheInfoCommandModule extends command_module_1.CommandModule {
51
+ command = 'info';
52
+ describe = 'Prints persistent disk cache configuration and statistics in the console.';
53
+ longDescriptionPath;
54
+ scope = command_module_1.CommandScope.In;
55
+ builder(localYargs) {
56
+ return localYargs.strict();
57
+ }
58
+ async run() {
59
+ const cacheConfig = (0, utilities_1.getCacheConfig)(this.context.workspace);
60
+ const { path, environment, enabled } = cacheConfig;
61
+ const effectiveStatus = this.effectiveEnabledStatus(cacheConfig);
62
+ const sizeOnDisk = await this.getSizeOfDirectory(path);
63
+ const info = [
64
+ {
65
+ label: 'Enabled',
66
+ value: enabled ? color_1.colors.green('Yes') : color_1.colors.red('No'),
67
+ },
68
+ {
69
+ label: 'Environment',
70
+ value: color_1.colors.cyan(environment),
71
+ },
72
+ {
73
+ label: 'Path',
74
+ value: color_1.colors.cyan(path),
75
+ },
76
+ {
77
+ label: 'Size on disk',
78
+ value: color_1.colors.cyan(sizeOnDisk),
79
+ },
80
+ {
81
+ label: 'Effective Status',
82
+ value: (effectiveStatus ? color_1.colors.green('Enabled') : color_1.colors.red('Disabled')) +
83
+ ' (current machine)',
84
+ },
85
+ ];
86
+ const maxLabelLength = Math.max(...info.map((l) => l.label.length));
87
+ const output = info
88
+ .map(({ label, value }) => color_1.colors.bold(label.padEnd(maxLabelLength + 2)) + `: ${value}`)
89
+ .join('\n');
90
+ this.context.logger.info(`\n${color_1.colors.bold('Cache Information')}\n\n${output}\n`);
91
+ }
92
+ async getSizeOfDirectory(path) {
93
+ const directoriesStack = [path];
94
+ let size = 0;
95
+ while (directoriesStack.length) {
96
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
97
+ const dirPath = directoriesStack.pop();
98
+ let entries = [];
99
+ try {
100
+ entries = await fs.readdir(dirPath);
101
+ }
102
+ catch { }
103
+ for (const entry of entries) {
104
+ const entryPath = (0, node_path_1.join)(dirPath, entry);
105
+ const stats = await fs.stat(entryPath);
106
+ if (stats.isDirectory()) {
107
+ directoriesStack.push(entryPath);
108
+ }
109
+ size += stats.size;
110
+ }
111
+ }
112
+ return this.formatSize(size);
113
+ }
114
+ formatSize(size) {
115
+ if (size <= 0) {
116
+ return '0 bytes';
117
+ }
118
+ const abbreviations = ['bytes', 'kB', 'MB', 'GB'];
119
+ const index = Math.floor(Math.log(size) / Math.log(1024));
120
+ const roundedSize = size / Math.pow(1024, index);
121
+ // bytes don't have a fraction
122
+ const fractionDigits = index === 0 ? 0 : 2;
123
+ return `${roundedSize.toFixed(fractionDigits)} ${abbreviations[index]}`;
124
+ }
125
+ effectiveEnabledStatus(cacheConfig) {
126
+ const { enabled, environment } = cacheConfig;
127
+ if (enabled) {
128
+ switch (environment) {
129
+ case 'ci':
130
+ return environment_options_1.isCI;
131
+ case 'local':
132
+ return !environment_options_1.isCI;
133
+ }
134
+ }
135
+ return enabled;
136
+ }
137
+ }
138
+ exports.CacheInfoCommandModule = CacheInfoCommandModule;
139
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["cli.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qDAAuC;AACvC,yCAAiC;AAEjC,4EAIiD;AACjD,oDAAkD;AAClD,gFAA8D;AAC9D,4CAA8C;AAE9C,MAAa,sBAAuB,SAAQ,8BAAa;IACvD,OAAO,GAAG,MAAM,CAAC;IACjB,QAAQ,GAAG,2EAA2E,CAAC;IACvF,mBAAmB,CAAsB;IAChC,KAAK,GAAG,6BAAY,CAAC,EAAE,CAAC;IAEjC,OAAO,CAAC,UAAgB;QACtB,OAAO,UAAU,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,GAAG;QACP,MAAM,WAAW,GAAG,IAAA,0BAAc,EAAC,IAAI,CAAC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IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACjD,8BAA8B;QAC9B,MAAM,cAAc,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE3C,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1E,CAAC;IAEO,sBAAsB,CAAC,WAAsD;QACnF,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;QAE7C,IAAI,OAAO,EAAE,CAAC;YACZ,QAAQ,WAAW,EAAE,CAAC;gBACpB,KAAK,IAAI;oBACP,OAAO,0BAAI,CAAC;gBACd,KAAK,OAAO;oBACV,OAAO,CAAC,0BAAI,CAAC;YACjB,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA3GD,wDA2GC"}
@@ -0,0 +1,53 @@
1
+ Angular CLI saves a number of cachable operations on disk by default.
2
+
3
+ When you re-run the same build, the build system restores the state of the previous build and re-uses previously performed operations, which decreases the time taken to build and test your applications and libraries.
4
+
5
+ To amend the default cache settings, add the `cli.cache` object to your [Workspace Configuration](reference/configs/workspace-config).
6
+ The object goes under `cli.cache` at the top level of the file, outside the `projects` sections.
7
+
8
+ ```jsonc
9
+ {
10
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
11
+ "version": 1,
12
+ "cli": {
13
+ "cache": {
14
+ // ...
15
+ },
16
+ },
17
+ "projects": {},
18
+ }
19
+ ```
20
+
21
+ For more information, see [cache options](reference/configs/workspace-config#cache-options).
22
+
23
+ ### Cache environments
24
+
25
+ By default, disk cache is only enabled for local environments. The value of environment can be one of the following:
26
+
27
+ - `all` - allows disk cache on all machines.
28
+ - `local` - allows disk cache only on development machines.
29
+ - `ci` - allows disk cache only on continuous integration (CI) systems.
30
+
31
+ To change the environment setting to `all`, run the following command:
32
+
33
+ ```bash
34
+ ng config cli.cache.environment all
35
+ ```
36
+
37
+ For more information, see `environment` in [cache options](reference/configs/workspace-config#cache-options).
38
+
39
+ <div class="alert is-helpful">
40
+
41
+ The Angular CLI checks for the presence and value of the `CI` environment variable to determine in which environment it is running.
42
+
43
+ </div>
44
+
45
+ ### Cache path
46
+
47
+ By default, `.angular/cache` is used as a base directory to store cache results.
48
+
49
+ To change this path to `.cache/ng`, run the following command:
50
+
51
+ ```bash
52
+ ng config cli.cache.path ".cache/ng"
53
+ ```
@@ -0,0 +1,27 @@
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 { Argv } from 'yargs';
9
+ import { CommandModule, CommandModuleImplementation, CommandScope } from '../../../command-builder/command-module';
10
+ export declare class CacheDisableModule extends CommandModule implements CommandModuleImplementation {
11
+ command: string;
12
+ aliases: string;
13
+ describe: string;
14
+ longDescriptionPath: string | undefined;
15
+ scope: CommandScope;
16
+ builder(localYargs: Argv): Argv;
17
+ run(): Promise<void>;
18
+ }
19
+ export declare class CacheEnableModule extends CommandModule implements CommandModuleImplementation {
20
+ command: string;
21
+ aliases: string;
22
+ describe: string;
23
+ longDescriptionPath: string | undefined;
24
+ scope: CommandScope;
25
+ builder(localYargs: Argv): Argv;
26
+ run(): Promise<void>;
27
+ }