nx 13.9.3 → 13.10.0-beta.2

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 (438) hide show
  1. package/bin/init-local.d.ts +2 -0
  2. package/bin/init-local.js +123 -0
  3. package/bin/init-local.js.map +1 -0
  4. package/{src/cli/run-cli.d.ts → bin/init.d.ts} +0 -0
  5. package/bin/init.js +13 -0
  6. package/bin/init.js.map +1 -0
  7. package/bin/nx.js +8 -8
  8. package/bin/nx.js.map +1 -1
  9. package/{src/compat/compat.d.ts → bin/run-executor.d.ts} +0 -0
  10. package/{src/cli/run-cli.js → bin/run-executor.js} +11 -3
  11. package/bin/run-executor.js.map +1 -0
  12. package/package.json +26 -11
  13. package/src/adapter/compat.d.ts +1 -0
  14. package/src/{compat → adapter}/compat.js +1 -1
  15. package/src/adapter/compat.js.map +1 -0
  16. package/src/{cli → adapter}/decorate-cli.d.ts +0 -0
  17. package/src/{cli → adapter}/decorate-cli.js +0 -0
  18. package/src/adapter/decorate-cli.js.map +1 -0
  19. package/src/{commands → adapter}/ngcli-adapter.d.ts +4 -11
  20. package/src/{commands → adapter}/ngcli-adapter.js +13 -37
  21. package/src/adapter/ngcli-adapter.js.map +1 -0
  22. package/src/cli/index.d.ts +0 -3
  23. package/src/cli/index.js +0 -74
  24. package/src/cli/index.js.map +1 -1
  25. package/src/command-line/affected.d.ts +3 -0
  26. package/src/command-line/affected.js +117 -0
  27. package/src/command-line/affected.js.map +1 -0
  28. package/src/command-line/connect-to-nx-cloud.d.ts +2 -0
  29. package/src/command-line/connect-to-nx-cloud.js +79 -0
  30. package/src/command-line/connect-to-nx-cloud.js.map +1 -0
  31. package/src/command-line/daemon.d.ts +2 -0
  32. package/src/command-line/daemon.js +23 -0
  33. package/src/command-line/daemon.js.map +1 -0
  34. package/src/command-line/dep-graph.d.ts +24 -0
  35. package/src/command-line/dep-graph.js +371 -0
  36. package/src/command-line/dep-graph.js.map +1 -0
  37. package/src/command-line/examples.d.ts +5 -0
  38. package/src/command-line/examples.js +283 -0
  39. package/src/command-line/examples.js.map +1 -0
  40. package/src/command-line/format.d.ts +7 -0
  41. package/src/command-line/format.js +205 -0
  42. package/src/command-line/format.js.map +1 -0
  43. package/src/command-line/generate.d.ts +17 -0
  44. package/src/{commands → command-line}/generate.js +42 -63
  45. package/src/command-line/generate.js.map +1 -0
  46. package/src/command-line/lint.d.ts +1 -0
  47. package/src/command-line/lint.js +33 -0
  48. package/src/command-line/lint.js.map +1 -0
  49. package/src/command-line/list.d.ts +13 -0
  50. package/src/command-line/list.js +41 -0
  51. package/src/command-line/list.js.map +1 -0
  52. package/src/{commands → command-line}/migrate.d.ts +6 -2
  53. package/src/{commands → command-line}/migrate.js +21 -58
  54. package/src/command-line/migrate.js.map +1 -0
  55. package/src/command-line/nx-commands.d.ts +9 -0
  56. package/src/command-line/nx-commands.js +607 -0
  57. package/src/command-line/nx-commands.js.map +1 -0
  58. package/src/command-line/print-affected.d.ts +6 -0
  59. package/src/command-line/print-affected.js +82 -0
  60. package/src/command-line/print-affected.js.map +1 -0
  61. package/src/command-line/report.d.ts +17 -0
  62. package/src/command-line/report.js +125 -0
  63. package/src/command-line/report.js.map +1 -0
  64. package/src/command-line/reset.d.ts +1 -0
  65. package/src/command-line/reset.js +20 -0
  66. package/src/command-line/reset.js.map +1 -0
  67. package/src/command-line/run-many.d.ts +3 -0
  68. package/src/command-line/run-many.js +61 -0
  69. package/src/command-line/run-many.js.map +1 -0
  70. package/src/command-line/run-one.d.ts +3 -0
  71. package/src/command-line/run-one.js +111 -0
  72. package/src/command-line/run-one.js.map +1 -0
  73. package/src/{commands → command-line}/run.d.ts +12 -7
  74. package/src/{commands → command-line}/run.js +15 -63
  75. package/src/command-line/run.js.map +1 -0
  76. package/src/command-line/utils.d.ts +51 -0
  77. package/src/command-line/utils.js +272 -0
  78. package/src/command-line/utils.js.map +1 -0
  79. package/src/command-line/workspace-generators.d.ts +1 -0
  80. package/src/command-line/workspace-generators.js +151 -0
  81. package/src/command-line/workspace-generators.js.map +1 -0
  82. package/src/command-line/workspace-integrity-checks.d.ts +11 -0
  83. package/src/command-line/workspace-integrity-checks.js +60 -0
  84. package/src/command-line/workspace-integrity-checks.js.map +1 -0
  85. package/src/core/affected-project-graph/affected-project-graph-models.d.ts +11 -0
  86. package/src/core/affected-project-graph/affected-project-graph-models.js +3 -0
  87. package/src/core/affected-project-graph/affected-project-graph-models.js.map +1 -0
  88. package/src/core/affected-project-graph/affected-project-graph.d.ts +5 -0
  89. package/src/core/affected-project-graph/affected-project-graph.js +88 -0
  90. package/src/core/affected-project-graph/affected-project-graph.js.map +1 -0
  91. package/src/core/affected-project-graph/index.d.ts +2 -0
  92. package/src/core/affected-project-graph/index.js +6 -0
  93. package/src/core/affected-project-graph/index.js.map +1 -0
  94. package/src/core/affected-project-graph/locators/implicit-json-changes.d.ts +4 -0
  95. package/src/core/affected-project-graph/locators/implicit-json-changes.js +54 -0
  96. package/src/core/affected-project-graph/locators/implicit-json-changes.js.map +1 -0
  97. package/src/core/affected-project-graph/locators/npm-packages.d.ts +4 -0
  98. package/src/core/affected-project-graph/locators/npm-packages.js +35 -0
  99. package/src/core/affected-project-graph/locators/npm-packages.js.map +1 -0
  100. package/src/core/affected-project-graph/locators/tsconfig-json-changes.d.ts +4 -0
  101. package/src/core/affected-project-graph/locators/tsconfig-json-changes.js +64 -0
  102. package/src/core/affected-project-graph/locators/tsconfig-json-changes.js.map +1 -0
  103. package/src/core/affected-project-graph/locators/workspace-json-changes.d.ts +4 -0
  104. package/src/core/affected-project-graph/locators/workspace-json-changes.js +48 -0
  105. package/src/core/affected-project-graph/locators/workspace-json-changes.js.map +1 -0
  106. package/src/core/affected-project-graph/locators/workspace-projects.d.ts +3 -0
  107. package/src/core/affected-project-graph/locators/workspace-projects.js +40 -0
  108. package/src/core/affected-project-graph/locators/workspace-projects.js.map +1 -0
  109. package/src/core/assert-workspace-validity.d.ts +2 -0
  110. package/src/core/assert-workspace-validity.js +72 -0
  111. package/src/core/assert-workspace-validity.js.map +1 -0
  112. package/src/core/dep-graph/3rdpartylicenses.txt +732 -0
  113. package/src/core/dep-graph/index.html +16 -0
  114. package/src/core/dep-graph/main.esm.js +2 -0
  115. package/src/core/dep-graph/main.esm.js.LICENSE.txt +39 -0
  116. package/src/core/dep-graph/polyfills.esm.js +1 -0
  117. package/src/core/dep-graph/runtime.esm.js +1 -0
  118. package/src/core/dep-graph/styles.css +3 -0
  119. package/src/core/file-map-utils.d.ts +9 -0
  120. package/src/core/file-map-utils.js +80 -0
  121. package/src/core/file-map-utils.js.map +1 -0
  122. package/src/core/file-utils.d.ts +41 -0
  123. package/src/core/file-utils.js +168 -0
  124. package/src/core/file-utils.js.map +1 -0
  125. package/src/core/hasher/file-hasher-base.d.ts +12 -0
  126. package/src/core/hasher/file-hasher-base.js +68 -0
  127. package/src/core/hasher/file-hasher-base.js.map +1 -0
  128. package/src/core/hasher/file-hasher.d.ts +2 -0
  129. package/src/core/hasher/file-hasher.js +22 -0
  130. package/src/core/hasher/file-hasher.js.map +1 -0
  131. package/src/core/hasher/git-based-file-hasher.d.ts +10 -0
  132. package/src/core/hasher/git-based-file-hasher.js +50 -0
  133. package/src/core/hasher/git-based-file-hasher.js.map +1 -0
  134. package/src/core/hasher/git-hasher.d.ts +7 -0
  135. package/src/core/hasher/git-hasher.js +134 -0
  136. package/src/core/hasher/git-hasher.js.map +1 -0
  137. package/src/core/hasher/hasher.d.ts +60 -0
  138. package/src/core/hasher/hasher.js +362 -0
  139. package/src/core/hasher/hasher.js.map +1 -0
  140. package/src/core/hasher/hashing-impl.d.ts +5 -0
  141. package/src/core/hasher/hashing-impl.js +23 -0
  142. package/src/core/hasher/hashing-impl.js.map +1 -0
  143. package/src/core/hasher/node-based-file-hasher.d.ts +7 -0
  144. package/src/core/hasher/node-based-file-hasher.js +78 -0
  145. package/src/core/hasher/node-based-file-hasher.js.map +1 -0
  146. package/src/core/normalize-nx-json.d.ts +8 -0
  147. package/src/core/normalize-nx-json.js +32 -0
  148. package/src/core/normalize-nx-json.js.map +1 -0
  149. package/src/core/nx-deps/nx-deps-cache.d.ts +41 -0
  150. package/src/core/nx-deps/nx-deps-cache.js +164 -0
  151. package/src/core/nx-deps/nx-deps-cache.js.map +1 -0
  152. package/src/core/project-graph/build-dependencies/build-explicit-typescript-and-package-json-dependencies.d.ts +6 -0
  153. package/src/core/project-graph/build-dependencies/build-explicit-typescript-and-package-json-dependencies.js +19 -0
  154. package/src/core/project-graph/build-dependencies/build-explicit-typescript-and-package-json-dependencies.js.map +1 -0
  155. package/src/core/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +3 -0
  156. package/src/core/project-graph/build-dependencies/explicit-package-json-dependencies.js +76 -0
  157. package/src/core/project-graph/build-dependencies/explicit-package-json-dependencies.js.map +1 -0
  158. package/src/core/project-graph/build-dependencies/explicit-project-dependencies.d.ts +3 -0
  159. package/src/core/project-graph/build-dependencies/explicit-project-dependencies.js +27 -0
  160. package/src/core/project-graph/build-dependencies/explicit-project-dependencies.js.map +1 -0
  161. package/src/core/project-graph/build-dependencies/implicit-project-dependencies.d.ts +3 -0
  162. package/src/core/project-graph/build-dependencies/implicit-project-dependencies.js +20 -0
  163. package/src/core/project-graph/build-dependencies/implicit-project-dependencies.js.map +1 -0
  164. package/src/core/project-graph/build-dependencies/index.d.ts +3 -0
  165. package/src/core/project-graph/build-dependencies/index.js +7 -0
  166. package/src/core/project-graph/build-dependencies/index.js.map +1 -0
  167. package/src/core/project-graph/build-dependencies/typescript-import-locator.d.ts +11 -0
  168. package/src/core/project-graph/build-dependencies/typescript-import-locator.js +114 -0
  169. package/src/core/project-graph/build-dependencies/typescript-import-locator.js.map +1 -0
  170. package/src/core/project-graph/build-nodes/index.d.ts +2 -0
  171. package/src/core/project-graph/build-nodes/index.js +6 -0
  172. package/src/core/project-graph/build-nodes/index.js.map +1 -0
  173. package/src/core/project-graph/build-nodes/npm-packages.d.ts +2 -0
  174. package/src/core/project-graph/build-nodes/npm-packages.js +22 -0
  175. package/src/core/project-graph/build-nodes/npm-packages.js.map +1 -0
  176. package/src/core/project-graph/build-nodes/workspace-projects.d.ts +3 -0
  177. package/src/core/project-graph/build-nodes/workspace-projects.js +49 -0
  178. package/src/core/project-graph/build-nodes/workspace-projects.js.map +1 -0
  179. package/src/core/project-graph/build-project-graph.d.ts +9 -0
  180. package/src/core/project-graph/build-project-graph.js +233 -0
  181. package/src/core/project-graph/build-project-graph.js.map +1 -0
  182. package/src/core/project-graph/daemon/cache.d.ts +6 -0
  183. package/src/core/project-graph/daemon/cache.js +56 -0
  184. package/src/core/project-graph/daemon/cache.js.map +1 -0
  185. package/src/core/project-graph/daemon/client/client.d.ts +26 -0
  186. package/src/core/project-graph/daemon/client/client.js +200 -0
  187. package/src/core/project-graph/daemon/client/client.js.map +1 -0
  188. package/src/core/project-graph/daemon/client/exec-is-server-available.d.ts +1 -0
  189. package/src/core/project-graph/daemon/client/exec-is-server-available.js +13 -0
  190. package/src/core/project-graph/daemon/client/exec-is-server-available.js.map +1 -0
  191. package/src/core/project-graph/daemon/client/generate-help-output.d.ts +1 -0
  192. package/src/core/project-graph/daemon/client/generate-help-output.js +31 -0
  193. package/src/core/project-graph/daemon/client/generate-help-output.js.map +1 -0
  194. package/src/core/project-graph/daemon/server/logger.d.ts +18 -0
  195. package/src/core/project-graph/daemon/server/logger.js +38 -0
  196. package/src/core/project-graph/daemon/server/logger.js.map +1 -0
  197. package/src/core/project-graph/daemon/server/project-graph-incremental-recomputation.d.ts +8 -0
  198. package/src/core/project-graph/daemon/server/project-graph-incremental-recomputation.js +191 -0
  199. package/src/core/project-graph/daemon/server/project-graph-incremental-recomputation.js.map +1 -0
  200. package/src/core/project-graph/daemon/server/server.d.ts +4 -0
  201. package/src/core/project-graph/daemon/server/server.js +236 -0
  202. package/src/core/project-graph/daemon/server/server.js.map +1 -0
  203. package/src/core/project-graph/daemon/server/shutdown-utils.d.ts +12 -0
  204. package/src/core/project-graph/daemon/server/shutdown-utils.js +32 -0
  205. package/src/core/project-graph/daemon/server/shutdown-utils.js.map +1 -0
  206. package/src/core/project-graph/daemon/server/start.d.ts +1 -0
  207. package/src/core/project-graph/daemon/server/start.js +19 -0
  208. package/src/core/project-graph/daemon/server/start.js.map +1 -0
  209. package/src/core/project-graph/daemon/server/stop.d.ts +1 -0
  210. package/src/core/project-graph/daemon/server/stop.js +19 -0
  211. package/src/core/project-graph/daemon/server/stop.js.map +1 -0
  212. package/src/core/project-graph/daemon/server/watcher.d.ts +12 -0
  213. package/src/core/project-graph/daemon/server/watcher.js +158 -0
  214. package/src/core/project-graph/daemon/server/watcher.js.map +1 -0
  215. package/src/core/project-graph/daemon/socket-utils.d.ts +15 -0
  216. package/src/core/project-graph/daemon/socket-utils.js +38 -0
  217. package/src/core/project-graph/daemon/socket-utils.js.map +1 -0
  218. package/src/core/project-graph/daemon/tmp-dir.d.ts +6 -0
  219. package/src/core/project-graph/daemon/tmp-dir.js +37 -0
  220. package/src/core/project-graph/daemon/tmp-dir.js.map +1 -0
  221. package/src/core/project-graph/operators.d.ts +20 -0
  222. package/src/core/project-graph/operators.js +125 -0
  223. package/src/core/project-graph/operators.js.map +1 -0
  224. package/src/core/project-graph/project-graph-builder.d.ts +38 -0
  225. package/src/core/project-graph/project-graph-builder.js +164 -0
  226. package/src/core/project-graph/project-graph-builder.js.map +1 -0
  227. package/src/core/project-graph/project-graph-worker.d.ts +1 -0
  228. package/src/core/project-graph/project-graph-worker.js +19 -0
  229. package/src/core/project-graph/project-graph-worker.js.map +1 -0
  230. package/src/core/project-graph/project-graph.d.ts +37 -0
  231. package/src/core/project-graph/project-graph.js +188 -0
  232. package/src/core/project-graph/project-graph.js.map +1 -0
  233. package/src/core/shared-interfaces.d.ts +11 -0
  234. package/src/core/shared-interfaces.js +3 -0
  235. package/src/core/shared-interfaces.js.map +1 -0
  236. package/src/core/target-project-locator.d.ts +36 -0
  237. package/src/core/target-project-locator.js +164 -0
  238. package/src/core/target-project-locator.js.map +1 -0
  239. package/src/shared/nx.d.ts +2 -1
  240. package/src/shared/tree.js +1 -1
  241. package/src/shared/tree.js.map +1 -1
  242. package/src/shared/workspace.d.ts +8 -6
  243. package/src/shared/workspace.js +21 -20
  244. package/src/shared/workspace.js.map +1 -1
  245. package/src/tasks-runner/batch/batch-messages.d.ts +24 -0
  246. package/src/tasks-runner/batch/batch-messages.js +9 -0
  247. package/src/tasks-runner/batch/batch-messages.js.map +1 -0
  248. package/src/tasks-runner/batch/run-batch.d.ts +1 -0
  249. package/src/tasks-runner/batch/run-batch.js +57 -0
  250. package/src/tasks-runner/batch/run-batch.js.map +1 -0
  251. package/src/tasks-runner/cache.d.ts +40 -0
  252. package/src/tasks-runner/cache.js +284 -0
  253. package/src/tasks-runner/cache.js.map +1 -0
  254. package/src/tasks-runner/default-tasks-runner.d.ts +19 -0
  255. package/src/tasks-runner/default-tasks-runner.js +48 -0
  256. package/src/tasks-runner/default-tasks-runner.js.map +1 -0
  257. package/src/tasks-runner/forked-process-task-runner.d.ts +36 -0
  258. package/src/tasks-runner/forked-process-task-runner.js +259 -0
  259. package/src/tasks-runner/forked-process-task-runner.js.map +1 -0
  260. package/src/tasks-runner/life-cycle.d.ts +43 -0
  261. package/src/tasks-runner/life-cycle.js +72 -0
  262. package/src/tasks-runner/life-cycle.js.map +1 -0
  263. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +25 -0
  264. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +349 -0
  265. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js.map +1 -0
  266. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +25 -0
  267. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +231 -0
  268. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js.map +1 -0
  269. package/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +5 -0
  270. package/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +19 -0
  271. package/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js.map +1 -0
  272. package/src/tasks-runner/life-cycles/pretty-time.d.ts +4 -0
  273. package/src/tasks-runner/life-cycles/pretty-time.js +75 -0
  274. package/src/tasks-runner/life-cycles/pretty-time.js.map +1 -0
  275. package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +33 -0
  276. package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +110 -0
  277. package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js.map +1 -0
  278. package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +31 -0
  279. package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +97 -0
  280. package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js.map +1 -0
  281. package/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +19 -0
  282. package/src/tasks-runner/life-cycles/task-profiling-life-cycle.js +67 -0
  283. package/src/tasks-runner/life-cycles/task-profiling-life-cycle.js.map +1 -0
  284. package/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +13 -0
  285. package/src/tasks-runner/life-cycles/task-timings-life-cycle.js +33 -0
  286. package/src/tasks-runner/life-cycles/task-timings-life-cycle.js.map +1 -0
  287. package/src/tasks-runner/remove-old-cache-records.d.ts +1 -0
  288. package/src/tasks-runner/remove-old-cache-records.js +62 -0
  289. package/src/tasks-runner/remove-old-cache-records.js.map +1 -0
  290. package/src/tasks-runner/reporter.d.ts +14 -0
  291. package/src/tasks-runner/reporter.js +11 -0
  292. package/src/tasks-runner/reporter.js.map +1 -0
  293. package/src/tasks-runner/run-command.d.ts +22 -0
  294. package/src/tasks-runner/run-command.js +352 -0
  295. package/src/tasks-runner/run-command.js.map +1 -0
  296. package/src/tasks-runner/task-graph-creator.d.ts +13 -0
  297. package/src/tasks-runner/task-graph-creator.js +71 -0
  298. package/src/tasks-runner/task-graph-creator.js.map +1 -0
  299. package/src/tasks-runner/task-orchestrator.d.ts +38 -0
  300. package/src/tasks-runner/task-orchestrator.js +299 -0
  301. package/src/tasks-runner/task-orchestrator.js.map +1 -0
  302. package/src/tasks-runner/tasks-runner-v2.d.ts +19 -0
  303. package/src/tasks-runner/tasks-runner-v2.js +42 -0
  304. package/src/tasks-runner/tasks-runner-v2.js.map +1 -0
  305. package/src/tasks-runner/tasks-runner.d.ts +45 -0
  306. package/src/tasks-runner/tasks-runner.js +15 -0
  307. package/src/tasks-runner/tasks-runner.js.map +1 -0
  308. package/src/tasks-runner/tasks-schedule.d.ts +33 -0
  309. package/src/tasks-runner/tasks-schedule.js +130 -0
  310. package/src/tasks-runner/tasks-schedule.js.map +1 -0
  311. package/src/tasks-runner/utils.d.ts +32 -0
  312. package/src/tasks-runner/utils.js +234 -0
  313. package/src/tasks-runner/utils.js.map +1 -0
  314. package/src/utils/app-root.d.ts +9 -0
  315. package/src/utils/app-root.js +10 -1
  316. package/src/utils/app-root.js.map +1 -1
  317. package/src/utils/cache-directory.d.ts +4 -0
  318. package/src/utils/cache-directory.js +37 -0
  319. package/src/utils/cache-directory.js.map +1 -0
  320. package/src/utils/default-base.d.ts +1 -0
  321. package/src/utils/default-base.js +16 -0
  322. package/src/utils/default-base.js.map +1 -0
  323. package/src/utils/fileutils.d.ts +4 -0
  324. package/src/utils/fileutils.js +38 -1
  325. package/src/utils/fileutils.js.map +1 -1
  326. package/src/{cli → utils}/find-workspace-root.d.ts +5 -2
  327. package/src/{cli → utils}/find-workspace-root.js +0 -0
  328. package/src/utils/find-workspace-root.js.map +1 -0
  329. package/src/{cli/is_ci.d.ts → utils/is-ci.d.ts} +0 -0
  330. package/src/{cli/is_ci.js → utils/is-ci.js} +2 -1
  331. package/src/utils/is-ci.js.map +1 -0
  332. package/src/utils/json-diff.d.ts +17 -0
  333. package/src/utils/json-diff.js +112 -0
  334. package/src/utils/json-diff.js.map +1 -0
  335. package/src/{shared → utils}/logger.d.ts +0 -0
  336. package/src/{shared → utils}/logger.js +0 -0
  337. package/src/utils/logger.js.map +1 -0
  338. package/src/{shared → utils}/nx-plugin.d.ts +12 -3
  339. package/src/utils/nx-plugin.js +162 -0
  340. package/src/utils/nx-plugin.js.map +1 -0
  341. package/src/{cli → utils}/output.d.ts +17 -14
  342. package/src/utils/output.js +170 -0
  343. package/src/utils/output.js.map +1 -0
  344. package/src/{shared → utils}/package-json.d.ts +2 -2
  345. package/src/{shared → utils}/package-json.js +0 -0
  346. package/src/utils/package-json.js.map +1 -0
  347. package/src/{shared → utils}/package-manager.d.ts +0 -0
  348. package/src/{shared → utils}/package-manager.js +0 -0
  349. package/src/utils/package-manager.js.map +1 -0
  350. package/src/{shared → utils}/params.d.ts +5 -4
  351. package/src/{shared → utils}/params.js +0 -0
  352. package/src/utils/params.js.map +1 -0
  353. package/src/utils/path.d.ts +8 -0
  354. package/src/utils/path.js +22 -0
  355. package/src/utils/path.js.map +1 -0
  356. package/src/utils/perf-logging.d.ts +1 -0
  357. package/src/utils/perf-logging.js +12 -0
  358. package/src/utils/perf-logging.js.map +1 -0
  359. package/src/utils/plugins/community-plugins.d.ts +3 -0
  360. package/src/utils/plugins/community-plugins.js +47 -0
  361. package/src/utils/plugins/community-plugins.js.map +1 -0
  362. package/src/utils/plugins/core-plugins.d.ts +3 -0
  363. package/src/utils/plugins/core-plugins.js +80 -0
  364. package/src/utils/plugins/core-plugins.js.map +1 -0
  365. package/src/utils/plugins/index.d.ts +4 -0
  366. package/src/utils/plugins/index.js +16 -0
  367. package/src/utils/plugins/index.js.map +1 -0
  368. package/src/utils/plugins/installed-plugins.d.ts +3 -0
  369. package/src/utils/plugins/installed-plugins.js +55 -0
  370. package/src/utils/plugins/installed-plugins.js.map +1 -0
  371. package/src/utils/plugins/models.d.ts +31 -0
  372. package/src/{cli/workspace.js → utils/plugins/models.js} +1 -1
  373. package/src/utils/plugins/models.js.map +1 -0
  374. package/src/utils/plugins/plugin-capabilities.d.ts +3 -0
  375. package/src/utils/plugins/plugin-capabilities.js +81 -0
  376. package/src/utils/plugins/plugin-capabilities.js.map +1 -0
  377. package/src/utils/plugins/shared.d.ts +1 -0
  378. package/src/utils/plugins/shared.js +9 -0
  379. package/src/utils/plugins/shared.js.map +1 -0
  380. package/src/utils/print-help.d.ts +10 -0
  381. package/src/utils/print-help.js +46 -0
  382. package/src/utils/print-help.js.map +1 -0
  383. package/src/utils/project-graph-utils.d.ts +12 -0
  384. package/src/utils/project-graph-utils.js +96 -0
  385. package/src/utils/project-graph-utils.js.map +1 -0
  386. package/src/utils/register.d.ts +1 -1
  387. package/src/utils/register.js +14 -9
  388. package/src/utils/register.js.map +1 -1
  389. package/src/utils/strip-indents.d.ts +14 -0
  390. package/src/utils/strip-indents.js +25 -0
  391. package/src/utils/strip-indents.js.map +1 -0
  392. package/src/utils/strip-source-code.d.ts +2 -0
  393. package/src/utils/strip-source-code.js +85 -0
  394. package/src/utils/strip-source-code.js.map +1 -0
  395. package/src/utils/typescript.d.ts +11 -0
  396. package/src/utils/typescript.js +70 -0
  397. package/src/utils/typescript.js.map +1 -0
  398. package/src/utils/version-utils.d.ts +1 -0
  399. package/src/utils/version-utils.js +19 -0
  400. package/src/utils/version-utils.js.map +1 -0
  401. package/src/utils/versions.d.ts +8 -0
  402. package/src/utils/versions.js +12 -0
  403. package/src/utils/versions.js.map +1 -0
  404. package/tasks-runners/default.d.ts +1 -0
  405. package/tasks-runners/default.js +6 -0
  406. package/tasks-runners/default.js.map +1 -0
  407. package/src/cli/decorate-cli.js.map +0 -1
  408. package/src/cli/find-workspace-root.js.map +0 -1
  409. package/src/cli/init-local.d.ts +0 -2
  410. package/src/cli/init-local.js +0 -109
  411. package/src/cli/init-local.js.map +0 -1
  412. package/src/cli/is_ci.js.map +0 -1
  413. package/src/cli/output.js +0 -129
  414. package/src/cli/output.js.map +0 -1
  415. package/src/cli/parse-run-one-options.d.ts +0 -6
  416. package/src/cli/parse-run-one-options.js +0 -139
  417. package/src/cli/parse-run-one-options.js.map +0 -1
  418. package/src/cli/run-cli.js.map +0 -1
  419. package/src/cli/workspace.d.ts +0 -4
  420. package/src/cli/workspace.js.map +0 -1
  421. package/src/commands/generate.d.ts +0 -15
  422. package/src/commands/generate.js.map +0 -1
  423. package/src/commands/help.d.ts +0 -1
  424. package/src/commands/help.js +0 -34
  425. package/src/commands/help.js.map +0 -1
  426. package/src/commands/migrate.js.map +0 -1
  427. package/src/commands/ngcli-adapter.js.map +0 -1
  428. package/src/commands/run.js.map +0 -1
  429. package/src/compat/compat.js.map +0 -1
  430. package/src/shared/logger.js.map +0 -1
  431. package/src/shared/nx-plugin.js +0 -53
  432. package/src/shared/nx-plugin.js.map +0 -1
  433. package/src/shared/package-json.js.map +0 -1
  434. package/src/shared/package-manager.js.map +0 -1
  435. package/src/shared/params.js.map +0 -1
  436. package/src/shared/print-help.d.ts +0 -2
  437. package/src/shared/print-help.js +0 -32
  438. package/src/shared/print-help.js.map +0 -1
@@ -0,0 +1,283 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.examples = void 0;
4
+ exports.examples = {
5
+ 'print-affected': [
6
+ {
7
+ command: 'print-affected',
8
+ description: 'Print information about affected projects and the project graph',
9
+ },
10
+ {
11
+ command: 'print-affected --base=main --head=HEAD',
12
+ description: 'Print information about the projects affected by the changes between main and HEAD (e.g,. PR)',
13
+ },
14
+ {
15
+ command: 'print-affected --target=test',
16
+ description: 'Prints information about the affected projects and a list of tasks to test them',
17
+ },
18
+ {
19
+ command: 'print-affected --target=build --select=projects',
20
+ description: 'Prints the projects property from the print-affected output',
21
+ },
22
+ {
23
+ command: 'print-affected --target=build --select=tasks.target.project',
24
+ description: 'Prints the tasks.target.project property from the print-affected output',
25
+ },
26
+ ],
27
+ affected: [
28
+ {
29
+ command: 'affected --target=custom-target',
30
+ description: 'Run custom target for all affected projects',
31
+ },
32
+ {
33
+ command: 'affected --target=test --parallel=5',
34
+ description: 'Run tests in parallel',
35
+ },
36
+ {
37
+ command: 'affected --target=test --all',
38
+ description: 'Run the test target for all projects',
39
+ },
40
+ {
41
+ command: 'affected --target=test --files=libs/mylib/src/index.ts',
42
+ description: 'Run tests for all the projects affected by changing the index.ts file',
43
+ },
44
+ {
45
+ command: 'affected --target=test --base=main --head=HEAD',
46
+ description: 'Run tests for all the projects affected by the changes between main and HEAD (e.g., PR)',
47
+ },
48
+ {
49
+ command: 'affected --target=test --base=main~1 --head=main',
50
+ description: 'Run tests for all the projects affected by the last commit on main',
51
+ },
52
+ ],
53
+ 'affected:test': [
54
+ {
55
+ command: 'affected:test --parallel=5',
56
+ description: 'Run tests in parallel',
57
+ },
58
+ {
59
+ command: 'affected:test --all',
60
+ description: 'Run the test target for all projects',
61
+ },
62
+ {
63
+ command: 'affected:test --files=libs/mylib/src/index.ts',
64
+ description: 'Run tests for all the projects affected by changing the index.ts file',
65
+ },
66
+ {
67
+ command: 'affected:test --base=main --head=HEAD',
68
+ description: 'Run tests for all the projects affected by the changes between main and HEAD (e.g., PR)',
69
+ },
70
+ {
71
+ command: 'affected:test --base=main~1 --head=main',
72
+ description: 'Run tests for all the projects affected by the last commit on main',
73
+ },
74
+ ],
75
+ 'affected:build': [
76
+ {
77
+ command: 'affected:build --parallel=5',
78
+ description: 'Run build in parallel',
79
+ },
80
+ {
81
+ command: 'affected:build --all',
82
+ description: 'Run the build target for all projects',
83
+ },
84
+ {
85
+ command: 'affected:build --files=libs/mylib/src/index.ts',
86
+ description: 'Run build for all the projects affected by changing the index.ts file',
87
+ },
88
+ {
89
+ command: 'affected:build --base=main --head=HEAD',
90
+ description: 'Run build for all the projects affected by the changes between main and HEAD (e.g., PR)',
91
+ },
92
+ {
93
+ command: 'affected:build --base=main~1 --head=main',
94
+ description: 'Run build for all the projects affected by the last commit on main',
95
+ },
96
+ ],
97
+ 'affected:e2e': [
98
+ {
99
+ command: 'affected:e2e --parallel=5',
100
+ description: 'Run tests in parallel',
101
+ },
102
+ {
103
+ command: 'affected:e2e --all',
104
+ description: 'Run the test target for all projects',
105
+ },
106
+ {
107
+ command: 'affected:e2e --files=libs/mylib/src/index.ts',
108
+ description: 'Run tests for all the projects affected by changing the index.ts file',
109
+ },
110
+ {
111
+ command: 'affected:e2e --base=main --head=HEAD',
112
+ description: 'Run tests for all the projects affected by the changes between main and HEAD (e.g., PR)',
113
+ },
114
+ {
115
+ command: 'affected:e2e --base=main~1 --head=main',
116
+ description: 'Run tests for all the projects affected by the last commit on main',
117
+ },
118
+ ],
119
+ 'affected:lint': [
120
+ {
121
+ command: 'affected:lint --parallel=5',
122
+ description: 'Run lint in parallel',
123
+ },
124
+ {
125
+ command: 'affected:lint --all',
126
+ description: 'Run the lint target for all projects',
127
+ },
128
+ {
129
+ command: 'affected:lint --files=libs/mylib/src/index.ts',
130
+ description: 'Run lint for all the projects affected by changing the index.ts file',
131
+ },
132
+ {
133
+ command: 'affected:lint --base=main --head=HEAD',
134
+ description: 'Run lint for all the projects affected by the changes between main and HEAD (e.g., PR)',
135
+ },
136
+ {
137
+ command: 'affected:lint --base=main~1 --head=main',
138
+ description: 'Run lint for all the projects affected by the last commit on main',
139
+ },
140
+ ],
141
+ 'affected:apps': [
142
+ {
143
+ command: 'affected:apps --files=libs/mylib/src/index.ts',
144
+ description: 'Print the names of all the apps affected by changing the index.ts file',
145
+ },
146
+ {
147
+ command: 'affected:apps --base=main --head=HEAD',
148
+ description: 'Print the names of all the apps affected by the changes between main and HEAD (e.g., PR)',
149
+ },
150
+ {
151
+ command: 'affected:apps --base=main~1 --head=main',
152
+ description: 'Print the names of all the apps affected by the last commit on main',
153
+ },
154
+ ],
155
+ 'affected:libs': [
156
+ {
157
+ command: 'affected:libs --files=libs/mylib/src/index.ts',
158
+ description: 'Print the names of all the libs affected by changing the index.ts file',
159
+ },
160
+ {
161
+ command: 'affected:libs --base=main --head=HEAD',
162
+ description: 'Print the names of all the libs affected by the changes between main and HEAD (e.g., PR)',
163
+ },
164
+ {
165
+ command: 'affected:libs --base=main~1 --head=main',
166
+ description: 'Print the names of all the libs affected by the last commit on main',
167
+ },
168
+ ],
169
+ 'format:write': [],
170
+ 'format:check': [],
171
+ graph: [
172
+ {
173
+ command: 'graph',
174
+ description: 'Open the project graph of the workspace in the browser',
175
+ },
176
+ {
177
+ command: 'graph --file=output.json',
178
+ description: 'Save the project graph into a json file',
179
+ },
180
+ {
181
+ command: 'graph --file=output.html',
182
+ description: 'Generate a static website with project graph into an html file, accompanied by an asset folder called static',
183
+ },
184
+ {
185
+ command: 'graph --focus=todos-feature-main',
186
+ description: 'Show the graph where every node is either an ancestor or a descendant of todos-feature-main',
187
+ },
188
+ {
189
+ command: 'graph --include=project-one,project-two',
190
+ description: 'Include project-one and project-two in the project graph',
191
+ },
192
+ {
193
+ command: 'graph --exclude=project-one,project-two',
194
+ description: 'Exclude project-one and project-two from the project graph',
195
+ },
196
+ {
197
+ command: 'graph --focus=todos-feature-main --exclude=project-one,project-two',
198
+ description: 'Show the graph where every node is either an ancestor or a descendant of todos-feature-main, but exclude project-one and project-two',
199
+ },
200
+ {
201
+ command: 'graph --watch',
202
+ description: 'Watch for changes to project graph and update in-browser',
203
+ },
204
+ ],
205
+ 'affected:graph': [
206
+ {
207
+ command: 'affected:graph --files=libs/mylib/src/index.ts',
208
+ description: 'Open the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file',
209
+ },
210
+ {
211
+ command: 'affected:graph --base=main --head=HEAD',
212
+ description: 'Open the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR)',
213
+ },
214
+ {
215
+ command: 'affected:graph --base=main --head=HEAD --file=output.json',
216
+ description: 'Save the project graph of the workspace in a json file, and highlight the projects affected by the changes between main and HEAD (e.g., PR)',
217
+ },
218
+ {
219
+ command: 'affected:graph --base=main --head=HEAD --file=output.html',
220
+ description: 'Generate a static website with project graph data in an html file, highlighting the projects affected by the changes between main and HEAD (e.g., PR)',
221
+ },
222
+ {
223
+ command: 'affected:graph --base=main~1 --head=main',
224
+ description: 'Open the project graph of the workspace in the browser, and highlight the projects affected by the last commit on main',
225
+ },
226
+ {
227
+ command: 'affected:graph --exclude=project-one,project-two',
228
+ description: 'Open the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two',
229
+ },
230
+ ],
231
+ 'workspace-generator': [],
232
+ list: [
233
+ {
234
+ command: 'list',
235
+ description: 'List the plugins installed in the current workspace',
236
+ },
237
+ {
238
+ command: 'list @nrwl/web',
239
+ description: 'List the generators and executors available in the `@nrwl/web` plugin if it is installed (If the plugin is not installed `nx` will show advice on how to add it to your workspace)',
240
+ },
241
+ ],
242
+ 'run-many': [
243
+ {
244
+ command: 'run-many --target=test --all',
245
+ description: 'Test all projects',
246
+ },
247
+ {
248
+ command: 'run-many --target=test --projects=proj1,proj2',
249
+ description: 'Test proj1 and proj2',
250
+ },
251
+ {
252
+ command: 'run-many --target=test --projects=proj1,proj2 --parallel=2',
253
+ description: 'Test proj1 and proj2 in parallel',
254
+ },
255
+ ],
256
+ migrate: [
257
+ {
258
+ command: 'migrate next',
259
+ description: 'Update @nrwl/workspace to "next". This will update other packages and will generate migrations.json',
260
+ },
261
+ {
262
+ command: 'migrate 9.0.0',
263
+ description: 'Update @nrwl/workspace to "9.0.0". This will update other packages and will generate migrations.json',
264
+ },
265
+ {
266
+ command: 'migrate @nrwl/workspace@9.0.0 --from="@nrwl/workspace@8.0.0,@nrwl/node@8.0.0"',
267
+ description: 'Update @nrwl/workspace and generate the list of migrations starting with version 8.0.0 of @nrwl/workspace and @nrwl/node, regardless of what installed locally',
268
+ },
269
+ {
270
+ command: 'migrate @nrwl/workspace@9.0.0 --to="@nrwl/react@9.0.1,@nrwl/angular@9.0.1"',
271
+ description: 'Update @nrwl/workspace to "9.0.0". If it tries to update @nrwl/react or @nrwl/angular, use version "9.0.1"',
272
+ },
273
+ {
274
+ command: 'migrate another-package@12.0.0',
275
+ description: 'Update another-package to "12.0.0". This will update other packages and will generate migrations.json file',
276
+ },
277
+ {
278
+ command: 'migrate --run-migrations=migrations.json',
279
+ description: 'Run migrations from the migrations.json file. You can modify migrations.json and run this command many times',
280
+ },
281
+ ],
282
+ };
283
+ //# sourceMappingURL=examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"examples.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/examples.ts"],"names":[],"mappings":";;;AAKa,QAAA,QAAQ,GAA8B;IACjD,gBAAgB,EAAE;QAChB;YACE,OAAO,EAAE,gBAAgB;YACzB,WAAW,EACT,iEAAiE;SACpE;QACD;YACE,OAAO,EAAE,wCAAwC;YACjD,WAAW,EACT,+FAA+F;SAClG;QACD;YACE,OAAO,EAAE,8BAA8B;YACvC,WAAW,EACT,iFAAiF;SACpF;QACD;YACE,OAAO,EAAE,iDAAiD;YAC1D,WAAW,EACT,6DAA6D;SAChE;QACD;YACE,OAAO,EAAE,6DAA6D;YACtE,WAAW,EACT,yEAAyE;SAC5E;KACF;IACD,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,iCAAiC;YAC1C,WAAW,EAAE,6CAA6C;SAC3D;QACD;YACE,OAAO,EAAE,qCAAqC;YAC9C,WAAW,EAAE,uBAAuB;SACrC;QACD;YACE,OAAO,EAAE,8BAA8B;YACvC,WAAW,EAAE,sCAAsC;SACpD;QACD;YACE,OAAO,EAAE,wDAAwD;YACjE,WAAW,EACT,uEAAuE;SAC1E;QACD;YACE,OAAO,EAAE,gDAAgD;YACzD,WAAW,EACT,yFAAyF;SAC5F;QACD;YACE,OAAO,EAAE,kDAAkD;YAC3D,WAAW,EACT,oEAAoE;SACvE;KACF;IACD,eAAe,EAAE;QACf;YACE,OAAO,EAAE,4BAA4B;YACrC,WAAW,EAAE,uBAAuB;SACrC;QACD;YACE,OAAO,EAAE,qBAAqB;YAC9B,WAAW,EAAE,sCAAsC;SACpD;QACD;YACE,OAAO,EAAE,+CAA+C;YACxD,WAAW,EACT,uEAAuE;SAC1E;QACD;YACE,OAAO,EAAE,uCAAuC;YAChD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IAAkI;SACrI;KACF;IACD,qBAAqB,EAAE,EAAE;IACzB,IAAI,EAAE;QACJ;YACE,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,qDAAqD;SACnE;QACD;YACE,OAAO,EAAE,gBAAgB;YACzB,WAAW,EACT,oLAAoL;SACvL;KACF;IACD,UAAU,EAAE;QACV;YACE,OAAO,EAAE,8BAA8B;YACvC,WAAW,EAAE,mBAAmB;SACjC;QACD;YACE,OAAO,EAAE,+CAA+C;YACxD,WAAW,EAAE,sBAAsB;SACpC;QACD;YACE,OAAO,EAAE,4DAA4D;YACrE,WAAW,EAAE,kCAAkC;SAChD;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,cAAc;YACvB,WAAW,EACT,qGAAqG;SACxG;QACD;YACE,OAAO,EAAE,eAAe;YACxB,WAAW,EACT,sGAAsG;SACzG;QACD;YACE,OAAO,EACL,+EAA+E;YACjF,WAAW,EACT,gKAAgK;SACnK;QACD;YACE,OAAO,EACL,4EAA4E;YAC9E,WAAW,EACT,4GAA4G;SAC/G;QACD;YACE,OAAO,EAAE,gCAAgC;YACzC,WAAW,EACT,4GAA4G;SAC/G;QACD;YACE,OAAO,EAAE,0CAA0C;YACnD,WAAW,EACT,8GAA8G;SACjH;KACF;CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as yargs from 'yargs';
2
+ import { ProjectConfiguration, WorkspaceJsonConfiguration } from 'nx/src/shared/workspace';
3
+ import { NxJsonConfiguration } from 'nx/src/shared/nx';
4
+ export declare function format(command: 'check' | 'write', args: yargs.Arguments): Promise<void>;
5
+ export declare function moveTagsAndImplicitDepsFromNxJsonToWorkspaceJson(workspaceJson: WorkspaceJsonConfiguration, nxJson: NxJsonConfiguration & {
6
+ projects: Record<string, Pick<ProjectConfiguration, 'tags' | 'implicitDependencies'>>;
7
+ }): void;
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.moveTagsAndImplicitDepsFromNxJsonToWorkspaceJson = exports.format = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const child_process_1 = require("child_process");
6
+ const path = require("path");
7
+ const utils_1 = require("./utils");
8
+ const fileutils_1 = require("../utils/fileutils");
9
+ const affected_project_graph_1 = require("../core/affected-project-graph");
10
+ const file_utils_1 = require("../core/file-utils");
11
+ const workspace_1 = require("nx/src/shared/workspace");
12
+ const app_root_1 = require("nx/src/utils/app-root");
13
+ const prettier = require("prettier");
14
+ const object_sort_1 = require("nx/src/utils/object-sort");
15
+ const typescript_1 = require("../utils/typescript");
16
+ const fileutils_2 = require("nx/src/utils/fileutils");
17
+ const project_graph_1 = require("../core/project-graph/project-graph");
18
+ const PRETTIER_PATH = require.resolve('prettier/bin-prettier');
19
+ function format(command, args) {
20
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
21
+ const { nxArgs } = (0, utils_1.splitArgsIntoNxArgsAndOverrides)(args, 'affected');
22
+ const patterns = (yield getPatterns(Object.assign(Object.assign({}, args), nxArgs))).map((p) => `"${p}"`);
23
+ // Chunkify the patterns array to prevent crashing the windows terminal
24
+ const chunkList = chunkify(patterns, 50);
25
+ switch (command) {
26
+ case 'write':
27
+ const workspaceJsonPath = (0, workspace_1.workspaceConfigName)(app_root_1.appRootPath);
28
+ if (workspaceJsonPath) {
29
+ updateWorkspaceJsonToMatchFormatVersion(workspaceJsonPath);
30
+ sortWorkspaceJson(workspaceJsonPath);
31
+ movePropertiesToNewLocations(workspaceJsonPath);
32
+ }
33
+ sortTsConfig();
34
+ addRootConfigFiles(chunkList, nxArgs, workspaceJsonPath);
35
+ chunkList.forEach((chunk) => write(chunk));
36
+ break;
37
+ case 'check':
38
+ const pass = chunkList.reduce((pass, chunk) => check(chunk) && pass, true);
39
+ if (!pass) {
40
+ process.exit(1);
41
+ }
42
+ break;
43
+ }
44
+ });
45
+ }
46
+ exports.format = format;
47
+ function getPatterns(args) {
48
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
49
+ const graph = yield (0, project_graph_1.createProjectGraphAsync)();
50
+ const allFilesPattern = ['.'];
51
+ if (args.all) {
52
+ return allFilesPattern;
53
+ }
54
+ try {
55
+ if (args.projects && args.projects.length > 0) {
56
+ return getPatternsFromProjects(args.projects);
57
+ }
58
+ const p = (0, utils_1.parseFiles)(args);
59
+ const supportedExtensions = prettier
60
+ .getSupportInfo()
61
+ .languages.flatMap((language) => language.extensions)
62
+ .filter((extension) => !!extension);
63
+ const patterns = p.files.filter((f) => (0, fileutils_1.fileExists)(f) && supportedExtensions.includes(path.extname(f)));
64
+ return args.libsAndApps
65
+ ? yield getPatternsFromApps(patterns, graph.allWorkspaceFiles)
66
+ : patterns;
67
+ }
68
+ catch (_a) {
69
+ return allFilesPattern;
70
+ }
71
+ });
72
+ }
73
+ function getPatternsFromApps(affectedFiles, allWorkspaceFiles) {
74
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
75
+ const graph = yield (0, project_graph_1.createProjectGraphAsync)();
76
+ const affectedGraph = (0, affected_project_graph_1.filterAffected)(graph, (0, file_utils_1.calculateFileChanges)(affectedFiles, allWorkspaceFiles));
77
+ return getPatternsFromProjects(Object.keys(affectedGraph.nodes));
78
+ });
79
+ }
80
+ function addRootConfigFiles(chunkList, nxArgs, workspaceJsonPath) {
81
+ if (nxArgs.all) {
82
+ return;
83
+ }
84
+ const chunk = [];
85
+ const addToChunkIfNeeded = (file) => {
86
+ if (chunkList.every((c) => !c.includes(`"${file}"`))) {
87
+ chunk.push(file);
88
+ }
89
+ };
90
+ if (workspaceJsonPath) {
91
+ addToChunkIfNeeded(workspaceJsonPath);
92
+ }
93
+ ['nx.json', (0, typescript_1.getRootTsConfigFileName)()]
94
+ .filter(Boolean)
95
+ .forEach(addToChunkIfNeeded);
96
+ if (chunk.length > 0) {
97
+ chunkList.push(chunk);
98
+ }
99
+ }
100
+ function getPatternsFromProjects(projects) {
101
+ return (0, utils_1.getProjectRoots)(projects);
102
+ }
103
+ function chunkify(target, size) {
104
+ return target.reduce((current, value, index) => {
105
+ if (index % size === 0)
106
+ current.push([]);
107
+ current[current.length - 1].push(value);
108
+ return current;
109
+ }, []);
110
+ }
111
+ function write(patterns) {
112
+ if (patterns.length > 0) {
113
+ (0, child_process_1.execSync)(`node "${PRETTIER_PATH}" --write ${patterns.join(' ')}`, {
114
+ stdio: [0, 1, 2],
115
+ });
116
+ }
117
+ }
118
+ function check(patterns) {
119
+ if (patterns.length === 0) {
120
+ return true;
121
+ }
122
+ try {
123
+ (0, child_process_1.execSync)(`node "${PRETTIER_PATH}" --list-different ${patterns.join(' ')}`, {
124
+ stdio: [0, 1, 2],
125
+ });
126
+ return true;
127
+ }
128
+ catch (_a) {
129
+ return false;
130
+ }
131
+ }
132
+ function updateWorkspaceJsonToMatchFormatVersion(workspaceJsonPath) {
133
+ try {
134
+ const workspaceJson = (0, fileutils_2.readJsonFile)(workspaceJsonPath);
135
+ const reformatted = (0, workspace_1.reformattedWorkspaceJsonOrNull)(workspaceJson);
136
+ if (reformatted) {
137
+ (0, fileutils_2.writeJsonFile)(workspaceJsonPath, reformatted);
138
+ }
139
+ }
140
+ catch (e) {
141
+ console.error(`Failed to format workspace config: ${workspaceJsonPath}`);
142
+ console.error(e);
143
+ }
144
+ }
145
+ function sortWorkspaceJson(workspaceJsonPath) {
146
+ try {
147
+ const workspaceJson = (0, fileutils_2.readJsonFile)(workspaceJsonPath);
148
+ if (Object.entries(workspaceJson.projects).length !== 0) {
149
+ const sortedProjects = (0, object_sort_1.sortObjectByKeys)(workspaceJson.projects);
150
+ workspaceJson.projects = sortedProjects;
151
+ (0, fileutils_2.writeJsonFile)(workspaceJsonPath, workspaceJson);
152
+ }
153
+ }
154
+ catch (e) {
155
+ // catch noop
156
+ }
157
+ }
158
+ function sortTsConfig() {
159
+ try {
160
+ const tsconfigPath = (0, typescript_1.getRootTsConfigPath)();
161
+ const tsconfig = (0, fileutils_2.readJsonFile)(tsconfigPath);
162
+ const sortedPaths = (0, object_sort_1.sortObjectByKeys)(tsconfig.compilerOptions.paths);
163
+ tsconfig.compilerOptions.paths = sortedPaths;
164
+ (0, fileutils_2.writeJsonFile)(tsconfigPath, tsconfig);
165
+ }
166
+ catch (e) {
167
+ // catch noop
168
+ }
169
+ }
170
+ function movePropertiesToNewLocations(workspaceJsonPath) {
171
+ var _a, _b, _c, _d;
172
+ try {
173
+ const workspaceJson = (0, fileutils_2.readJsonFile)(workspaceJsonPath);
174
+ const nxJson = (0, fileutils_2.readJsonFile)('nx.json');
175
+ if (workspaceJson.cli ||
176
+ workspaceJson.generators ||
177
+ nxJson.projects ||
178
+ nxJson.defaultProject) {
179
+ (_a = nxJson.cli) !== null && _a !== void 0 ? _a : (nxJson.cli = workspaceJson.cli);
180
+ (_b = nxJson.generators) !== null && _b !== void 0 ? _b : (nxJson.generators = (_c = workspaceJson.generators) !== null && _c !== void 0 ? _c : workspaceJson.schematics);
181
+ (_d = nxJson.defaultProject) !== null && _d !== void 0 ? _d : (nxJson.defaultProject = workspaceJson.defaultProject);
182
+ delete workspaceJson['cli'];
183
+ delete workspaceJson['generators'];
184
+ delete workspaceJson['defaultProject'];
185
+ moveTagsAndImplicitDepsFromNxJsonToWorkspaceJson(workspaceJson, nxJson);
186
+ (0, fileutils_2.writeJsonFile)(workspaceJsonPath, workspaceJson);
187
+ (0, fileutils_2.writeJsonFile)('nx.json', nxJson);
188
+ }
189
+ }
190
+ catch (e) {
191
+ console.error(`Error moving properties between Nx.Json + ${workspaceJsonPath}`);
192
+ console.error(e);
193
+ }
194
+ }
195
+ function moveTagsAndImplicitDepsFromNxJsonToWorkspaceJson(workspaceJson, nxJson) {
196
+ if (!nxJson.projects) {
197
+ return;
198
+ }
199
+ Object.entries(nxJson.projects).forEach(([project, config]) => {
200
+ workspaceJson.projects[project] = Object.assign(Object.assign({}, workspaceJson.projects[project]), config);
201
+ });
202
+ delete nxJson.projects;
203
+ }
204
+ exports.moveTagsAndImplicitDepsFromNxJsonToWorkspaceJson = moveTagsAndImplicitDepsFromNxJsonToWorkspaceJson;
205
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/format.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,mCAKiB;AACjB,kDAAgD;AAChD,2EAAgE;AAChE,mDAAoE;AAEpE,uDAKiC;AACjC,oDAAoD;AACpD,qCAAqC;AACrC,0DAA4D;AAC5D,oDAG6B;AAC7B,sDAAqE;AAErE,uEAA8E;AAE9E,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAE/D,SAAsB,MAAM,CAC1B,OAA0B,EAC1B,IAAqB;;QAErB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,uCAA+B,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACrE,MAAM,QAAQ,GAAG,CAAC,MAAM,WAAW,CAAC,gCAAK,IAAI,GAAK,MAAM,CAAS,CAAC,CAAC,CAAC,GAAG,CACrE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAChB,CAAC;QAEF,uEAAuE;QACvE,MAAM,SAAS,GAAe,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAErD,QAAQ,OAAO,EAAE;YACf,KAAK,OAAO;gBACV,MAAM,iBAAiB,GAAG,IAAA,+BAAmB,EAAC,sBAAW,CAAC,CAAC;gBAC3D,IAAI,iBAAiB,EAAE;oBACrB,uCAAuC,CAAC,iBAAiB,CAAC,CAAC;oBAC3D,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;oBACrC,4BAA4B,CAAC,iBAAiB,CAAC,CAAC;iBACjD;gBACD,YAAY,EAAE,CAAC;gBACf,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;gBACzD,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,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B,MAAM,CACV,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAnBD,4GAmBC"}
@@ -0,0 +1,17 @@
1
+ import { Options, Schema } from '../utils/params';
2
+ export interface GenerateOptions {
3
+ collectionName: string;
4
+ generatorName: string;
5
+ generatorOptions: Options;
6
+ help: boolean;
7
+ dryRun: boolean;
8
+ interactive: boolean;
9
+ defaults: boolean;
10
+ }
11
+ export declare function printGenHelp(opts: GenerateOptions, schema: Schema): void;
12
+ export declare function newWorkspace(cwd: string, args: {
13
+ [k: string]: any;
14
+ }): Promise<any>;
15
+ export declare function generate(cwd: string, args: {
16
+ [k: string]: any;
17
+ }): Promise<any>;