@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,369 @@
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.AngularWorkspace = exports.workspaceSchemaPath = void 0;
44
+ exports.getWorkspace = getWorkspace;
45
+ exports.getWorkspaceRaw = getWorkspaceRaw;
46
+ exports.validateWorkspace = validateWorkspace;
47
+ exports.getProjectByCwd = getProjectByCwd;
48
+ exports.getConfiguredPackageManager = getConfiguredPackageManager;
49
+ exports.getSchematicDefaults = getSchematicDefaults;
50
+ exports.isWarningEnabled = isWarningEnabled;
51
+ const core_1 = require("@angular-devkit/core");
52
+ const node_fs_1 = require("node:fs");
53
+ const os = __importStar(require("node:os"));
54
+ const path = __importStar(require("node:path"));
55
+ const find_up_1 = require("./find-up");
56
+ const json_file_1 = require("./json-file");
57
+ function isJsonObject(value) {
58
+ return value !== undefined && core_1.json.isJsonObject(value);
59
+ }
60
+ function createWorkspaceHost() {
61
+ return {
62
+ readFile(path) {
63
+ return node_fs_1.promises.readFile(path, 'utf-8');
64
+ },
65
+ async writeFile(path, data) {
66
+ await node_fs_1.promises.writeFile(path, data);
67
+ },
68
+ async isDirectory(path) {
69
+ try {
70
+ const stats = await node_fs_1.promises.stat(path);
71
+ return stats.isDirectory();
72
+ }
73
+ catch {
74
+ return false;
75
+ }
76
+ },
77
+ async isFile(path) {
78
+ try {
79
+ const stats = await node_fs_1.promises.stat(path);
80
+ return stats.isFile();
81
+ }
82
+ catch {
83
+ return false;
84
+ }
85
+ },
86
+ };
87
+ }
88
+ exports.workspaceSchemaPath = path.join(__dirname, '../../lib/config/schema.json');
89
+ const configNames = ['angular.json', '.angular.json'];
90
+ const globalFileName = '.angular-config.json';
91
+ const defaultGlobalFilePath = path.join(os.homedir(), globalFileName);
92
+ function xdgConfigHome(home, configFile) {
93
+ // https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
94
+ const xdgConfigHome = process.env['XDG_CONFIG_HOME'] || path.join(home, '.config');
95
+ const xdgAngularHome = path.join(xdgConfigHome, 'angular');
96
+ return configFile ? path.join(xdgAngularHome, configFile) : xdgAngularHome;
97
+ }
98
+ function xdgConfigHomeOld(home) {
99
+ // Check the configuration files in the old location that should be:
100
+ // - $XDG_CONFIG_HOME/.angular-config.json (if XDG_CONFIG_HOME is set)
101
+ // - $HOME/.config/angular/.angular-config.json (otherwise)
102
+ const p = process.env['XDG_CONFIG_HOME'] || path.join(home, '.config', 'angular');
103
+ return path.join(p, '.angular-config.json');
104
+ }
105
+ async function projectFilePath(projectPath) {
106
+ // Find the configuration, either where specified, in the Angular CLI project
107
+ // (if it's in node_modules) or from the current process.
108
+ return ((projectPath && (await (0, find_up_1.findUp)(configNames, projectPath))) ||
109
+ (await (0, find_up_1.findUp)(configNames, process.cwd())) ||
110
+ (await (0, find_up_1.findUp)(configNames, __dirname)));
111
+ }
112
+ function globalFilePath() {
113
+ const home = os.homedir();
114
+ if (!home) {
115
+ return null;
116
+ }
117
+ // follow XDG Base Directory spec
118
+ // note that createGlobalSettings() will continue creating
119
+ // global file in home directory, with this user will have
120
+ // choice to move change its location to meet XDG convention
121
+ const xdgConfig = xdgConfigHome(home, 'config.json');
122
+ if ((0, node_fs_1.existsSync)(xdgConfig)) {
123
+ return xdgConfig;
124
+ }
125
+ // NOTE: This check is for the old configuration location, for more
126
+ // information see https://github.com/angular/angular-cli/pull/20556
127
+ const xdgConfigOld = xdgConfigHomeOld(home);
128
+ if ((0, node_fs_1.existsSync)(xdgConfigOld)) {
129
+ /* eslint-disable no-console */
130
+ console.warn(`Old configuration location detected: ${xdgConfigOld}\n` +
131
+ `Please move the file to the new location ~/.config/angular/config.json`);
132
+ return xdgConfigOld;
133
+ }
134
+ if ((0, node_fs_1.existsSync)(defaultGlobalFilePath)) {
135
+ return defaultGlobalFilePath;
136
+ }
137
+ return null;
138
+ }
139
+ class AngularWorkspace {
140
+ workspace;
141
+ filePath;
142
+ basePath;
143
+ constructor(workspace, filePath) {
144
+ this.workspace = workspace;
145
+ this.filePath = filePath;
146
+ this.basePath = path.dirname(filePath);
147
+ }
148
+ get extensions() {
149
+ return this.workspace.extensions;
150
+ }
151
+ get projects() {
152
+ return this.workspace.projects;
153
+ }
154
+ // Temporary helper functions to support refactoring
155
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
156
+ getCli() {
157
+ return this.workspace.extensions['cli'];
158
+ }
159
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
160
+ getProjectCli(projectName) {
161
+ const project = this.workspace.projects.get(projectName);
162
+ return project?.extensions['cli'];
163
+ }
164
+ save() {
165
+ return core_1.workspaces.writeWorkspace(this.workspace, createWorkspaceHost(), this.filePath, core_1.workspaces.WorkspaceFormat.JSON);
166
+ }
167
+ static async load(workspaceFilePath) {
168
+ const result = await core_1.workspaces.readWorkspace(workspaceFilePath, createWorkspaceHost(), core_1.workspaces.WorkspaceFormat.JSON);
169
+ return new AngularWorkspace(result.workspace, workspaceFilePath);
170
+ }
171
+ }
172
+ exports.AngularWorkspace = AngularWorkspace;
173
+ const cachedWorkspaces = new Map();
174
+ async function getWorkspace(level) {
175
+ if (cachedWorkspaces.has(level)) {
176
+ return cachedWorkspaces.get(level);
177
+ }
178
+ const configPath = level === 'local' ? await projectFilePath() : globalFilePath();
179
+ if (!configPath) {
180
+ if (level === 'global') {
181
+ // Unlike a local config, a global config is not mandatory.
182
+ // So we create an empty one in memory and keep it as such until it has been modified and saved.
183
+ const globalWorkspace = new AngularWorkspace({ extensions: {}, projects: new core_1.workspaces.ProjectDefinitionCollection() }, defaultGlobalFilePath);
184
+ cachedWorkspaces.set(level, globalWorkspace);
185
+ return globalWorkspace;
186
+ }
187
+ cachedWorkspaces.set(level, undefined);
188
+ return undefined;
189
+ }
190
+ try {
191
+ const workspace = await AngularWorkspace.load(configPath);
192
+ cachedWorkspaces.set(level, workspace);
193
+ return workspace;
194
+ }
195
+ catch (error) {
196
+ throw new Error(`Workspace config file cannot be loaded: ${configPath}` +
197
+ `\n${error instanceof Error ? error.message : error}`);
198
+ }
199
+ }
200
+ /**
201
+ * This method will load the workspace configuration in raw JSON format.
202
+ * When `level` is `global` and file doesn't exists, it will be created.
203
+ *
204
+ * NB: This method is intended to be used only for `ng config`.
205
+ */
206
+ async function getWorkspaceRaw(level = 'local') {
207
+ let configPath = level === 'local' ? await projectFilePath() : globalFilePath();
208
+ if (!configPath) {
209
+ if (level === 'global') {
210
+ configPath = defaultGlobalFilePath;
211
+ // Config doesn't exist, force create it.
212
+ const globalWorkspace = await getWorkspace('global');
213
+ await globalWorkspace.save();
214
+ }
215
+ else {
216
+ return [null, null];
217
+ }
218
+ }
219
+ return [new json_file_1.JSONFile(configPath), configPath];
220
+ }
221
+ async function validateWorkspace(data, isGlobal) {
222
+ const schema = (0, json_file_1.readAndParseJson)(exports.workspaceSchemaPath);
223
+ if (!isJsonObject(schema)) {
224
+ throw new Error('Workspace schema is not a JSON object.');
225
+ }
226
+ // We should eventually have a dedicated global config schema and use that to validate.
227
+ const schemaToValidate = isGlobal
228
+ ? {
229
+ '$ref': '#/definitions/global',
230
+ definitions: schema['definitions'],
231
+ }
232
+ : schema;
233
+ const { formats } = await Promise.resolve().then(() => __importStar(require('@angular-devkit/schematics')));
234
+ const registry = new core_1.json.schema.CoreSchemaRegistry(formats.standardFormats);
235
+ const validator = await registry.compile(schemaToValidate);
236
+ const { success, errors } = await validator(data);
237
+ if (!success) {
238
+ throw new core_1.json.schema.SchemaValidationException(errors);
239
+ }
240
+ }
241
+ function findProjectByPath(workspace, location) {
242
+ const isInside = (base, potential) => {
243
+ const absoluteBase = path.resolve(workspace.basePath, base);
244
+ const absolutePotential = path.resolve(workspace.basePath, potential);
245
+ const relativePotential = path.relative(absoluteBase, absolutePotential);
246
+ if (!relativePotential.startsWith('..') && !path.isAbsolute(relativePotential)) {
247
+ return true;
248
+ }
249
+ return false;
250
+ };
251
+ const projects = Array.from(workspace.projects)
252
+ .map(([name, project]) => [project.root, name])
253
+ .filter((tuple) => isInside(tuple[0], location))
254
+ // Sort tuples by depth, with the deeper ones first. Since the first member is a path and
255
+ // we filtered all invalid paths, the longest will be the deepest (and in case of equality
256
+ // the sort is stable and the first declared project will win).
257
+ .sort((a, b) => b[0].length - a[0].length);
258
+ if (projects.length === 0) {
259
+ return null;
260
+ }
261
+ else if (projects.length > 1) {
262
+ const found = new Set();
263
+ const sameRoots = projects.filter((v) => {
264
+ if (!found.has(v[0])) {
265
+ found.add(v[0]);
266
+ return false;
267
+ }
268
+ return true;
269
+ });
270
+ if (sameRoots.length > 0) {
271
+ // Ambiguous location - cannot determine a project
272
+ return null;
273
+ }
274
+ }
275
+ return projects[0][1];
276
+ }
277
+ function getProjectByCwd(workspace) {
278
+ if (workspace.projects.size === 1) {
279
+ // If there is only one project, return that one.
280
+ return Array.from(workspace.projects.keys())[0];
281
+ }
282
+ const project = findProjectByPath(workspace, process.cwd());
283
+ if (project) {
284
+ return project;
285
+ }
286
+ return null;
287
+ }
288
+ async function getConfiguredPackageManager() {
289
+ const getPackageManager = (source) => {
290
+ if (isJsonObject(source)) {
291
+ const value = source['packageManager'];
292
+ if (value && typeof value === 'string') {
293
+ return value;
294
+ }
295
+ }
296
+ return null;
297
+ };
298
+ let result = null;
299
+ const workspace = await getWorkspace('local');
300
+ if (workspace) {
301
+ const project = getProjectByCwd(workspace);
302
+ if (project) {
303
+ result = getPackageManager(workspace.projects.get(project)?.extensions['cli']);
304
+ }
305
+ result ??= getPackageManager(workspace.extensions['cli']);
306
+ }
307
+ if (!result) {
308
+ const globalOptions = await getWorkspace('global');
309
+ result = getPackageManager(globalOptions?.extensions['cli']);
310
+ }
311
+ return result;
312
+ }
313
+ async function getSchematicDefaults(collection, schematic, project) {
314
+ const result = {};
315
+ const mergeOptions = (source) => {
316
+ if (isJsonObject(source)) {
317
+ // Merge options from the qualified name
318
+ Object.assign(result, source[`${collection}:${schematic}`]);
319
+ // Merge options from nested collection schematics
320
+ const collectionOptions = source[collection];
321
+ if (isJsonObject(collectionOptions)) {
322
+ Object.assign(result, collectionOptions[schematic]);
323
+ }
324
+ }
325
+ };
326
+ // Global level schematic options
327
+ const globalOptions = await getWorkspace('global');
328
+ mergeOptions(globalOptions?.extensions['schematics']);
329
+ const workspace = await getWorkspace('local');
330
+ if (workspace) {
331
+ // Workspace level schematic options
332
+ mergeOptions(workspace.extensions['schematics']);
333
+ project = project || getProjectByCwd(workspace);
334
+ if (project) {
335
+ // Project level schematic options
336
+ mergeOptions(workspace.projects.get(project)?.extensions['schematics']);
337
+ }
338
+ }
339
+ return result;
340
+ }
341
+ async function isWarningEnabled(warning) {
342
+ const getWarning = (source) => {
343
+ if (isJsonObject(source)) {
344
+ const warnings = source['warnings'];
345
+ if (isJsonObject(warnings)) {
346
+ const value = warnings[warning];
347
+ if (typeof value == 'boolean') {
348
+ return value;
349
+ }
350
+ }
351
+ }
352
+ };
353
+ let result;
354
+ const workspace = await getWorkspace('local');
355
+ if (workspace) {
356
+ const project = getProjectByCwd(workspace);
357
+ if (project) {
358
+ result = getWarning(workspace.projects.get(project)?.extensions['cli']);
359
+ }
360
+ result = result ?? getWarning(workspace.extensions['cli']);
361
+ }
362
+ if (result === undefined) {
363
+ const globalOptions = await getWorkspace('global');
364
+ result = getWarning(globalOptions?.extensions['cli']);
365
+ }
366
+ // All warnings are enabled by default
367
+ return result ?? true;
368
+ }
369
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["config.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0KH,oCAsCC;AAQD,0CAkBC;AAED,8CAqBC;AA4CD,0CAYC;AAED,kEA6BC;AAED,oDAoCC;AAED,4CAgCC;AA9ZD,+CAAwD;AACxD,qCAAqD;AACrD,4CAA8B;AAC9B,gDAAkC;AAElC,uCAA+C;AAC/C,2CAAyD;AAEzD,SAAS,YAAY,CAAC,KAAiC;IACrD,OAAO,KAAK,KAAK,SAAS,IAAI,WAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO;QACL,QAAQ,CAAC,IAAI;YACX,OAAO,kBAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpC,CAAC;QACD,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI;YACxB,MAAM,kBAAE,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,IAAI;YACpB,IAAI,CAAC;gBACH,MAAM,KAA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;QACH,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,MAA2B,CAAC;IAEhC,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,OAAO,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;QAC3C,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1E,CAAC;QAED,MAAM,GAAG,MAAM,IAAI,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;QACnD,MAAM,GAAG,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,sCAAsC;IACtC,OAAO,MAAM,IAAI,IAAI,CAAC;AACxB,CAAC"}
@@ -0,0 +1,25 @@
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
+ /** Disables all analytics reporting when the `NG_CLI_ANALYTICS` environment variable is set to '0' or 'false'. */
9
+ export declare const analyticsDisabled: boolean;
10
+ /** Identifies when the CLI is running in a Continuous Integration environment. */
11
+ export declare const isCI: boolean;
12
+ /** Disables the automatic version check when the `NG_DISABLE_VERSION_CHECK` environment variable is enabled. */
13
+ export declare const disableVersionCheck: boolean;
14
+ /** Enables debugging messages when the `NG_DEBUG` environment variable is enabled. */
15
+ export declare const ngDebug: boolean;
16
+ /**
17
+ * Forces the autocomplete script to be generated.
18
+ * The `NG_FORCE_AUTOCOMPLETE` environment variable can be 'true', 'false', or undefined (for default behavior).
19
+ */
20
+ export declare const forceAutocomplete: boolean | undefined;
21
+ /**
22
+ * When enabled, forces TTY mode.
23
+ * The `NG_FORCE_TTY` environment variable can be 'true', 'false', or undefined (for default behavior).
24
+ */
25
+ export declare const forceTty: boolean | undefined;
@@ -0,0 +1,60 @@
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.forceTty = exports.forceAutocomplete = exports.ngDebug = exports.disableVersionCheck = exports.isCI = exports.analyticsDisabled = void 0;
11
+ /** A set of strings that are considered "truthy" when parsing environment variables. */
12
+ const TRUTHY_VALUES = new Set(['1', 'true']);
13
+ /** A set of strings that are considered "falsy" when parsing environment variables. */
14
+ const FALSY_VALUES = new Set(['0', 'false']);
15
+ /**
16
+ * Checks if an environment variable is present and has a non-empty value.
17
+ * @param variable The environment variable to check.
18
+ * @returns `true` if the variable is a non-empty string.
19
+ */
20
+ function isPresent(variable) {
21
+ return typeof variable === 'string' && variable !== '';
22
+ }
23
+ /**
24
+ * Parses an environment variable into a boolean or undefined.
25
+ * @returns `true` if the variable is truthy ('1', 'true').
26
+ * @returns `false` if the variable is falsy ('0', 'false').
27
+ * @returns `undefined` if the variable is not present or has an unknown value.
28
+ */
29
+ function parseTristate(variable) {
30
+ if (!isPresent(variable)) {
31
+ return undefined;
32
+ }
33
+ const value = variable.toLowerCase();
34
+ if (TRUTHY_VALUES.has(value)) {
35
+ return true;
36
+ }
37
+ if (FALSY_VALUES.has(value)) {
38
+ return false;
39
+ }
40
+ return undefined;
41
+ }
42
+ /** Disables all analytics reporting when the `NG_CLI_ANALYTICS` environment variable is set to '0' or 'false'. */
43
+ exports.analyticsDisabled = parseTristate(process.env['NG_CLI_ANALYTICS']) === false;
44
+ /** Identifies when the CLI is running in a Continuous Integration environment. */
45
+ exports.isCI = parseTristate(process.env['CI']) === true;
46
+ /** Disables the automatic version check when the `NG_DISABLE_VERSION_CHECK` environment variable is enabled. */
47
+ exports.disableVersionCheck = parseTristate(process.env['NG_DISABLE_VERSION_CHECK']) === true;
48
+ /** Enables debugging messages when the `NG_DEBUG` environment variable is enabled. */
49
+ exports.ngDebug = parseTristate(process.env['NG_DEBUG']) === true;
50
+ /**
51
+ * Forces the autocomplete script to be generated.
52
+ * The `NG_FORCE_AUTOCOMPLETE` environment variable can be 'true', 'false', or undefined (for default behavior).
53
+ */
54
+ exports.forceAutocomplete = parseTristate(process.env['NG_FORCE_AUTOCOMPLETE']);
55
+ /**
56
+ * When enabled, forces TTY mode.
57
+ * The `NG_FORCE_TTY` environment variable can be 'true', 'false', or undefined (for default behavior).
58
+ */
59
+ exports.forceTty = parseTristate(process.env['NG_FORCE_TTY']);
60
+ //# sourceMappingURL=environment-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-options.js","sourceRoot":"","sources":["environment-options.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,wFAAwF;AACxF,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7C,uFAAuF;AACvF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AAE7C;;;;GAIG;AACH,SAAS,SAAS,CAAC,QAA4B;IAC7C,OAAO,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,EAAE,CAAC;AACzD,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,QAA4B;IACjD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACrC,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,kHAAkH;AACrG,QAAA,iBAAiB,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,KAAK,KAAK,CAAC;AAE1F,kFAAkF;AACrE,QAAA,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC;AAE9D,gHAAgH;AACnG,QAAA,mBAAmB,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,KAAK,IAAI,CAAC;AAEnG,sFAAsF;AACzE,QAAA,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,IAAI,CAAC;AAEvE;;;GAGG;AACU,QAAA,iBAAiB,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAErF;;;GAGG;AACU,QAAA,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC"}
@@ -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
+ /**
9
+ * Gets the end-of-line sequence from a string.
10
+ *
11
+ * This function analyzes the given string to determine the most frequent end-of-line (EOL)
12
+ * sequence. It counts the occurrences of carriage return line feed (`\r\n`) and
13
+ * line feed (`\n`).
14
+ *
15
+ * @param content The string to process.
16
+ * @returns The most frequent EOL sequence. If `\r\n` is more frequent, it returns `\r\n`.
17
+ * Otherwise (including ties), it returns `\n`. If no newlines are found, it falls back
18
+ * to the operating system's default EOL sequence.
19
+ */
20
+ export declare function getEOL(content: string): string;
@@ -0,0 +1,35 @@
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.getEOL = getEOL;
11
+ const node_os_1 = require("node:os");
12
+ const CRLF = '\r\n';
13
+ const LF = '\n';
14
+ /**
15
+ * Gets the end-of-line sequence from a string.
16
+ *
17
+ * This function analyzes the given string to determine the most frequent end-of-line (EOL)
18
+ * sequence. It counts the occurrences of carriage return line feed (`\r\n`) and
19
+ * line feed (`\n`).
20
+ *
21
+ * @param content The string to process.
22
+ * @returns The most frequent EOL sequence. If `\r\n` is more frequent, it returns `\r\n`.
23
+ * Otherwise (including ties), it returns `\n`. If no newlines are found, it falls back
24
+ * to the operating system's default EOL sequence.
25
+ */
26
+ function getEOL(content) {
27
+ const newlines = content.match(/(?:\r?\n)/g);
28
+ if (newlines?.length) {
29
+ const crlf = newlines.filter((l) => l === CRLF).length;
30
+ const lf = newlines.length - crlf;
31
+ return crlf > lf ? CRLF : LF;
32
+ }
33
+ return node_os_1.EOL;
34
+ }
35
+ //# sourceMappingURL=eol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eol.js","sourceRoot":"","sources":["eol.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAmBH,wBAWC;AA5BD,qCAA8B;AAE9B,MAAM,IAAI,GAAG,MAAM,CAAC;AACpB,MAAM,EAAE,GAAG,IAAI,CAAC;AAEhB;;;;;;;;;;;GAWG;AACH,SAAgB,MAAM,CAAC,OAAe;IACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAE7C,IAAI,QAAQ,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC;QACvD,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;QAElC,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,CAAC;IAED,OAAO,aAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ /**
9
+ * Asserts that a given value is an Error-like object.
10
+ *
11
+ * If the value is not an `Error` or an object with `name` and `message` properties,
12
+ * this function will throw an `AssertionError` with a descriptive message.
13
+ *
14
+ * @param value The value to check.
15
+ */
16
+ export declare function assertIsError(value: unknown): asserts value is Error & {
17
+ code?: string;
18
+ };
@@ -0,0 +1,41 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
10
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.assertIsError = assertIsError;
14
+ const node_assert_1 = __importDefault(require("node:assert"));
15
+ const node_util_1 = require("node:util");
16
+ /**
17
+ * Checks if a given value is an Error-like object.
18
+ *
19
+ * This type guard checks if the value is an instance of `Error` or if it's an object
20
+ * with `name` and `message` properties. This is useful for identifying error-like
21
+ * objects that may not be direct instances of `Error` (e.g., from RxJs).
22
+ *
23
+ * @param value The value to check.
24
+ * @returns `true` if the value is an Error-like object, `false` otherwise.
25
+ */
26
+ function isError(value) {
27
+ return (value instanceof Error ||
28
+ (typeof value === 'object' && value !== null && 'name' in value && 'message' in value));
29
+ }
30
+ /**
31
+ * Asserts that a given value is an Error-like object.
32
+ *
33
+ * If the value is not an `Error` or an object with `name` and `message` properties,
34
+ * this function will throw an `AssertionError` with a descriptive message.
35
+ *
36
+ * @param value The value to check.
37
+ */
38
+ function assertIsError(value) {
39
+ (0, node_assert_1.default)(isError(value), `Expected a value to be an Error-like object, but received: ${(0, node_util_1.inspect)(value)}`);
40
+ }
41
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["error.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AA8BH,sCAKC;AAjCD,8DAAiC;AACjC,yCAAoC;AAEpC;;;;;;;;;GASG;AACH,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,CAAC,CACvF,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,KAAc;IAC1C,IAAA,qBAAM,EACJ,OAAO,CAAC,KAAK,CAAC,EACd,8DAA8D,IAAA,mBAAO,EAAC,KAAK,CAAC,EAAE,CAC/E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ /**
9
+ * Find a file or directory by walking up the directory tree.
10
+ * @param names The name or names of the files or directories to find.
11
+ * @param from The directory to start the search from.
12
+ * @returns The path to the first match found, or `null` if no match was found.
13
+ */
14
+ export declare function findUp(names: string | string[], from: string): Promise<string | null>;
15
+ /**
16
+ * Synchronously find a file or directory by walking up the directory tree.
17
+ * @param names The name or names of the files or directories to find.
18
+ * @param from The directory to start the search from.
19
+ * @returns The path to the first match found, or `null` if no match was found.
20
+ */
21
+ export declare function findUpSync(names: string | string[], from: string): string | null;