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,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmptyTerminalOutputLifeCycle = void 0;
4
+ const output_1 = require("../../utils/output");
5
+ const utils_1 = require("../utils");
6
+ class EmptyTerminalOutputLifeCycle {
7
+ printTaskTerminalOutput(task, cacheStatus, terminalOutput) {
8
+ if (cacheStatus === 'success' ||
9
+ cacheStatus === 'failure' ||
10
+ cacheStatus === 'skipped') {
11
+ const args = (0, utils_1.getPrintableCommandArgsForTask)(task);
12
+ output_1.output.logCommand(args.join(' '), cacheStatus);
13
+ output_1.output.addNewline();
14
+ process.stdout.write(terminalOutput);
15
+ }
16
+ }
17
+ }
18
+ exports.EmptyTerminalOutputLifeCycle = EmptyTerminalOutputLifeCycle;
19
+ //# sourceMappingURL=empty-terminal-output-life-cycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-terminal-output-life-cycle.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,oCAA0D;AAI1D,MAAa,4BAA4B;IACvC,uBAAuB,CACrB,IAAS,EACT,WAAuB,EACvB,cAAsB;QAEtB,IACE,WAAW,KAAK,SAAS;YACzB,WAAW,KAAK,SAAS;YACzB,WAAW,KAAK,SAAS,EACzB;YACA,MAAM,IAAI,GAAG,IAAA,sCAA8B,EAAC,IAAI,CAAC,CAAC;YAClD,eAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;YAC/C,eAAM,CAAC,UAAU,EAAE,CAAC;YACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;SACtC;IACH,CAAC;CACF;AAjBD,oEAiBC"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * All credit to https://github.com/jonschlinkert/pretty-time
3
+ */
4
+ export declare function prettyTime(time: any, smallest?: any, digits?: any): string;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /**
3
+ * All credit to https://github.com/jonschlinkert/pretty-time
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.prettyTime = void 0;
7
+ const nano = (time) => +time[0] * 1e9 + +time[1];
8
+ const scale = {
9
+ w: 6048e11,
10
+ d: 864e11,
11
+ h: 36e11,
12
+ m: 6e10,
13
+ s: 1e9,
14
+ ms: 1e6,
15
+ μs: 1e3,
16
+ ns: 1,
17
+ };
18
+ const regex = {
19
+ w: /^(w((ee)?k)?s?)$/,
20
+ d: /^(d(ay)?s?)$/,
21
+ h: /^(h((ou)?r)?s?)$/,
22
+ m: /^(min(ute)?s?|m)$/,
23
+ s: /^((sec(ond)?)s?|s)$/,
24
+ ms: /^(milli(second)?s?|ms)$/,
25
+ μs: /^(micro(second)?s?|μs)$/,
26
+ ns: /^(nano(second)?s?|ns?)$/,
27
+ };
28
+ const isSmallest = function (uom, unit) {
29
+ return regex[uom].test(unit);
30
+ };
31
+ const round = function (num, digits) {
32
+ const n = Math.abs(num);
33
+ return /[0-9]/.test(digits) ? Number(n.toFixed(digits)) : Math.round(n);
34
+ };
35
+ function prettyTime(time, smallest, digits) {
36
+ const isNumber = /^[0-9]+$/.test(time);
37
+ if (!isNumber && !Array.isArray(time)) {
38
+ throw new TypeError('expected an array or number in nanoseconds');
39
+ }
40
+ if (Array.isArray(time) && time.length !== 2) {
41
+ throw new TypeError('expected an array from process.hrtime()');
42
+ }
43
+ if (/^[0-9]+$/.test(smallest)) {
44
+ digits = smallest;
45
+ smallest = null;
46
+ }
47
+ let num = isNumber ? time : nano(time);
48
+ let res = '';
49
+ let prev;
50
+ for (const uom of Object.keys(scale)) {
51
+ const step = scale[uom];
52
+ let inc = num / step;
53
+ if (smallest && isSmallest(uom, smallest)) {
54
+ inc = round(inc, digits);
55
+ if (prev && inc === prev / step)
56
+ --inc;
57
+ res += inc + uom;
58
+ return res.trim();
59
+ }
60
+ if (inc < 1)
61
+ continue;
62
+ if (!smallest) {
63
+ inc = round(inc, digits);
64
+ res += inc + uom;
65
+ return res;
66
+ }
67
+ prev = step;
68
+ inc = Math.floor(inc);
69
+ num -= inc * step;
70
+ res += inc + uom + ' ';
71
+ }
72
+ return res.trim();
73
+ }
74
+ exports.prettyTime = prettyTime;
75
+ //# sourceMappingURL=pretty-time.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pretty-time.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/pretty-time.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEjD,MAAM,KAAK,GAAG;IACZ,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,KAAK;IACR,CA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 @@
1
+ import { TaskStatus } from '../tasks-runner';
2
+ import type { LifeCycle } from '../life-cycle';
3
+ import { Task } from 'nx/src/shared/tasks';
4
+ /**
5
+ * The following life cycle's outputs are static, meaning no previous content
6
+ * is rewritten or modified as new outputs are added. It is therefore intended
7
+ * for use in CI environments.
8
+ *
9
+ * For the common case of a user executing a command on their local machine,
10
+ * the dynamic equivalent of this life cycle is usually preferable.
11
+ */
12
+ export declare class StaticRunManyTerminalOutputLifeCycle implements LifeCycle {
13
+ private readonly projectNames;
14
+ private readonly tasks;
15
+ private readonly args;
16
+ private readonly taskOverrides;
17
+ failedTasks: Task[];
18
+ cachedTasks: Task[];
19
+ allCompletedTasks: Set<Task>;
20
+ constructor(projectNames: string[], tasks: Task[], args: {
21
+ target?: string;
22
+ configuration?: string;
23
+ }, taskOverrides: any);
24
+ startCommand(): void;
25
+ endCommand(): void;
26
+ private skippedTasks;
27
+ endTasks(taskResults: {
28
+ task: Task;
29
+ status: TaskStatus;
30
+ code: number;
31
+ }[]): void;
32
+ printTaskTerminalOutput(task: Task, cacheStatus: TaskStatus, terminalOutput: string): void;
33
+ }
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StaticRunManyTerminalOutputLifeCycle = void 0;
4
+ const output_1 = require("../../utils/output");
5
+ const utils_1 = require("../utils");
6
+ /**
7
+ * The following life cycle's outputs are static, meaning no previous content
8
+ * is rewritten or modified as new outputs are added. It is therefore intended
9
+ * for use in CI environments.
10
+ *
11
+ * For the common case of a user executing a command on their local machine,
12
+ * the dynamic equivalent of this life cycle is usually preferable.
13
+ */
14
+ class StaticRunManyTerminalOutputLifeCycle {
15
+ constructor(projectNames, tasks, args, taskOverrides) {
16
+ this.projectNames = projectNames;
17
+ this.tasks = tasks;
18
+ this.args = args;
19
+ this.taskOverrides = taskOverrides;
20
+ this.failedTasks = [];
21
+ this.cachedTasks = [];
22
+ this.allCompletedTasks = new Set();
23
+ }
24
+ startCommand() {
25
+ if (this.projectNames.length <= 0) {
26
+ let description = `with "${this.args.target}"`;
27
+ if (this.args.configuration) {
28
+ description += ` that are configured for "${this.args.configuration}"`;
29
+ }
30
+ output_1.output.logSingleLine(`No projects ${description} were run`);
31
+ return;
32
+ }
33
+ const bodyLines = this.projectNames.map((affectedProject) => ` ${output_1.output.dim('-')} ${affectedProject}`);
34
+ if (Object.keys(this.taskOverrides).length > 0) {
35
+ bodyLines.push('');
36
+ bodyLines.push(`${output_1.output.dim('With flags:')}`);
37
+ Object.entries(this.taskOverrides)
38
+ .map(([flag, value]) => ` --${flag}=${value}`)
39
+ .forEach((arg) => bodyLines.push(arg));
40
+ }
41
+ let title = `Running target ${output_1.output.bold(this.args.target)} for ${output_1.output.bold(this.projectNames.length)} project(s)`;
42
+ const dependentTasksCount = this.tasks.length - this.projectNames.length;
43
+ if (dependentTasksCount > 0) {
44
+ title += ` and ${output_1.output.bold(dependentTasksCount)} task(s) they depend on`;
45
+ }
46
+ title += ':';
47
+ output_1.output.log({
48
+ color: 'cyan',
49
+ title,
50
+ bodyLines,
51
+ });
52
+ output_1.output.addVerticalSeparatorWithoutNewLines('cyan');
53
+ }
54
+ endCommand() {
55
+ output_1.output.addNewline();
56
+ if (this.failedTasks.length === 0) {
57
+ output_1.output.addVerticalSeparatorWithoutNewLines('green');
58
+ const bodyLines = this.cachedTasks.length > 0
59
+ ? [
60
+ output_1.output.dim(`Nx read the output from the cache instead of running the command for ${this.cachedTasks.length} out of ${this.tasks.length} tasks.`),
61
+ ]
62
+ : [];
63
+ output_1.output.success({
64
+ title: `Successfully ran target ${output_1.output.bold(this.args.target)} for ${output_1.output.bold(this.projectNames.length)} projects`,
65
+ bodyLines,
66
+ });
67
+ }
68
+ else {
69
+ output_1.output.addVerticalSeparatorWithoutNewLines('red');
70
+ const bodyLines = [];
71
+ const skippedTasks = this.skippedTasks();
72
+ if (skippedTasks.length > 0) {
73
+ bodyLines.push(output_1.output.dim('Tasks not run because their dependencies failed:'), '', ...skippedTasks.map((task) => `${output_1.output.dim('-')} ${task.id}`), '');
74
+ }
75
+ bodyLines.push(output_1.output.dim('Failed tasks:'), '', ...[...this.failedTasks.values()].map((task) => `${output_1.output.dim('-')} ${task.id}`));
76
+ output_1.output.error({
77
+ title: `Running target "${this.args.target}" failed`,
78
+ bodyLines,
79
+ });
80
+ }
81
+ }
82
+ skippedTasks() {
83
+ return this.tasks.filter((t) => !this.allCompletedTasks.has(t));
84
+ }
85
+ endTasks(taskResults) {
86
+ for (let t of taskResults) {
87
+ this.allCompletedTasks.add(t.task);
88
+ if (t.status === 'failure') {
89
+ this.failedTasks.push(t.task);
90
+ }
91
+ else if (t.status === 'local-cache') {
92
+ this.cachedTasks.push(t.task);
93
+ }
94
+ else if (t.status === 'local-cache-kept-existing') {
95
+ this.cachedTasks.push(t.task);
96
+ }
97
+ else if (t.status === 'remote-cache') {
98
+ this.cachedTasks.push(t.task);
99
+ }
100
+ }
101
+ }
102
+ printTaskTerminalOutput(task, cacheStatus, terminalOutput) {
103
+ const args = (0, utils_1.getPrintableCommandArgsForTask)(task);
104
+ output_1.output.logCommand(args.join(' '), cacheStatus);
105
+ output_1.output.addNewline();
106
+ process.stdout.write(terminalOutput);
107
+ }
108
+ }
109
+ exports.StaticRunManyTerminalOutputLifeCycle = StaticRunManyTerminalOutputLifeCycle;
110
+ //# sourceMappingURL=static-run-many-terminal-output-life-cycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-run-many-terminal-output-life-cycle.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAE5C,oCAA0D;AAI1D;;;;;;;GAOG;AACH,MAAa,oCAAoC;IAK/C,YACmB,YAAsB,EACtB,KAAa,EACb,IAGhB,EACgB,aAAkB;QANlB,iBAAY,GAAZ,YAAY,CAAU;QACtB,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,I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AM,IAAI,CAAC,CAAC,MAAM,KAAK,aAAa,EAAE;gBACrC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC/B;iBAAM,IAAI,CAAC,CAAC,MAAM,KAAK,2BAA2B,EAAE;gBACnD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC/B;iBAAM,IAAI,CAAC,CAAC,MAAM,KAAK,cAAc,EAAE;gBACtC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC/B;SACF;IACH,CAAC;IAED,uBAAuB,CACrB,IAAU,EACV,WAAuB,EACvB,cAAsB;QAEtB,MAAM,IAAI,GAAG,IAAA,sCAA8B,EAAC,IAAI,CAAC,CAAC;QAClD,eAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;QAC/C,eAAM,CAAC,UAAU,EAAE,CAAC;QACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC;CACF;AAvID,oFAuIC"}
@@ -0,0 +1,31 @@
1
+ import { TaskStatus } from '../tasks-runner';
2
+ import type { LifeCycle } from '../life-cycle';
3
+ import { Task } from 'nx/src/shared/tasks';
4
+ /**
5
+ * The following life cycle's outputs are static, meaning no previous content
6
+ * is rewritten or modified as new outputs are added. It is therefore intended
7
+ * for use in CI environments.
8
+ *
9
+ * For the common case of a user executing a command on their local machine,
10
+ * the dynamic equivalent of this life cycle is usually preferable.
11
+ */
12
+ export declare class StaticRunOneTerminalOutputLifeCycle implements LifeCycle {
13
+ private readonly initiatingProject;
14
+ private readonly projectNames;
15
+ private readonly tasks;
16
+ private readonly args;
17
+ failedTasks: Task[];
18
+ cachedTasks: Task[];
19
+ constructor(initiatingProject: string, projectNames: string[], tasks: Task[], args: {
20
+ target?: string;
21
+ configuration?: string;
22
+ });
23
+ startCommand(): void;
24
+ endCommand(): void;
25
+ endTasks(taskResults: {
26
+ task: Task;
27
+ status: TaskStatus;
28
+ code: number;
29
+ }[]): void;
30
+ printTaskTerminalOutput(task: Task, status: TaskStatus, terminalOutput: string): void;
31
+ }
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StaticRunOneTerminalOutputLifeCycle = void 0;
4
+ const output_1 = require("../../utils/output");
5
+ const utils_1 = require("../utils");
6
+ /**
7
+ * The following life cycle's outputs are static, meaning no previous content
8
+ * is rewritten or modified as new outputs are added. It is therefore intended
9
+ * for use in CI environments.
10
+ *
11
+ * For the common case of a user executing a command on their local machine,
12
+ * the dynamic equivalent of this life cycle is usually preferable.
13
+ */
14
+ class StaticRunOneTerminalOutputLifeCycle {
15
+ constructor(initiatingProject, projectNames, tasks, args) {
16
+ this.initiatingProject = initiatingProject;
17
+ this.projectNames = projectNames;
18
+ this.tasks = tasks;
19
+ this.args = args;
20
+ this.failedTasks = [];
21
+ this.cachedTasks = [];
22
+ }
23
+ startCommand() {
24
+ if (process.env.NX_INVOKED_BY_RUNNER) {
25
+ return;
26
+ }
27
+ const numberOfDeps = this.tasks.length - 1;
28
+ if (numberOfDeps > 0) {
29
+ output_1.output.log({
30
+ color: 'cyan',
31
+ title: `Running target ${output_1.output.bold(this.args.target)} for project ${output_1.output.bold(this.initiatingProject)} and ${output_1.output.bold(numberOfDeps)} task(s) it depends on`,
32
+ });
33
+ output_1.output.addVerticalSeparatorWithoutNewLines('cyan');
34
+ }
35
+ }
36
+ endCommand() {
37
+ // Silent for a single task
38
+ if (process.env.NX_INVOKED_BY_RUNNER) {
39
+ return;
40
+ }
41
+ output_1.output.addNewline();
42
+ if (this.failedTasks.length === 0) {
43
+ output_1.output.addVerticalSeparatorWithoutNewLines('green');
44
+ const bodyLines = this.cachedTasks.length > 0
45
+ ? [
46
+ output_1.output.dim(`Nx read the output from the cache instead of running the command for ${this.cachedTasks.length} out of ${this.tasks.length} tasks.`),
47
+ ]
48
+ : [];
49
+ output_1.output.success({
50
+ title: `Successfully ran target ${output_1.output.bold(this.args.target)} for project ${output_1.output.bold(this.initiatingProject)}`,
51
+ bodyLines,
52
+ });
53
+ }
54
+ else {
55
+ output_1.output.addVerticalSeparatorWithoutNewLines('red');
56
+ const bodyLines = [
57
+ output_1.output.dim('Failed tasks:'),
58
+ '',
59
+ ...this.failedTasks.map((task) => `${output_1.output.dim('-')} ${task.id}`),
60
+ '',
61
+ `${output_1.output.dim('Hint: run the command with')} --verbose ${output_1.output.dim('for more details.')}`,
62
+ ];
63
+ output_1.output.error({
64
+ title: `Running target "${this.initiatingProject}:${this.args.target}" failed`,
65
+ bodyLines,
66
+ });
67
+ }
68
+ }
69
+ endTasks(taskResults) {
70
+ for (let t of taskResults) {
71
+ if (t.status === 'failure') {
72
+ this.failedTasks.push(t.task);
73
+ }
74
+ else if (t.status === 'local-cache') {
75
+ this.cachedTasks.push(t.task);
76
+ }
77
+ else if (t.status === 'local-cache-kept-existing') {
78
+ this.cachedTasks.push(t.task);
79
+ }
80
+ else if (t.status === 'remote-cache') {
81
+ this.cachedTasks.push(t.task);
82
+ }
83
+ }
84
+ }
85
+ printTaskTerminalOutput(task, status, terminalOutput) {
86
+ if (status === 'success' ||
87
+ status === 'failure' ||
88
+ task.target.project === this.initiatingProject) {
89
+ const args = (0, utils_1.getPrintableCommandArgsForTask)(task);
90
+ output_1.output.logCommand(args.join(' '), status);
91
+ output_1.output.addNewline();
92
+ process.stdout.write(terminalOutput);
93
+ }
94
+ }
95
+ }
96
+ exports.StaticRunOneTerminalOutputLifeCycle = StaticRunOneTerminalOutputLifeCycle;
97
+ //# sourceMappingURL=static-run-one-terminal-output-life-cycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-run-one-terminal-output-life-cycle.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.ts"],"names":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AC,CAAC;aAC/B;iBAAM,IAAI,CAAC,CAAC,MAAM,KAAK,2BAA2B,EAAE;gBACnD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC/B;iBAAM,IAAI,CAAC,CAAC,MAAM,KAAK,cAAc,EAAE;gBACtC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC/B;SACF;IACH,CAAC;IAED,uBAAuB,CACrB,IAAU,EACV,MAAkB,EAClB,cAAsB;QAEtB,IACE,MAAM,KAAK,SAAS;YACpB,MAAM,KAAK,SAAS;YACpB,IAAI,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,iBAAiB,EAC9C;YACA,MAAM,IAAI,GAAG,IAAA,sCAA8B,EAAC,IAAI,CAAC,CAAC;YAClD,eAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;YAC1C,eAAM,CAAC,UAAU,EAAE,CAAC;YACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;SACtC;IACH,CAAC;CACF;AA7GD,kFA6GC"}
@@ -0,0 +1,19 @@
1
+ import { LifeCycle, TaskMetadata } from '../life-cycle';
2
+ import { TaskStatus } from '../tasks-runner';
3
+ import { Task } from 'nx/src/shared/tasks';
4
+ export declare class TaskProfilingLifeCycle implements LifeCycle {
5
+ private timings;
6
+ private profile;
7
+ private readonly profileFile;
8
+ private registeredGroups;
9
+ constructor(_profileFile: string);
10
+ startTasks(tasks: Task[], { groupId }: TaskMetadata): void;
11
+ endTasks(taskResults: Array<{
12
+ task: Task;
13
+ status: TaskStatus;
14
+ code: number;
15
+ }>, metadata: TaskMetadata): void;
16
+ endCommand(): void;
17
+ private recordTaskCompletions;
18
+ private registerGroup;
19
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskProfilingLifeCycle = void 0;
4
+ const perf_hooks_1 = require("perf_hooks");
5
+ const path_1 = require("path");
6
+ const fileutils_1 = require("nx/src/utils/fileutils");
7
+ class TaskProfilingLifeCycle {
8
+ constructor(_profileFile) {
9
+ this.timings = {};
10
+ this.profile = [];
11
+ this.registeredGroups = new Set();
12
+ this.profileFile = (0, path_1.join)(process.cwd(), _profileFile);
13
+ }
14
+ startTasks(tasks, { groupId }) {
15
+ if (this.profileFile && !this.registeredGroups.has(groupId)) {
16
+ this.registerGroup(groupId);
17
+ }
18
+ for (let t of tasks) {
19
+ this.timings[`${t.target.project}:${t.target.target}`] = {
20
+ perfStart: perf_hooks_1.performance.now(),
21
+ };
22
+ }
23
+ }
24
+ endTasks(taskResults, metadata) {
25
+ for (let tr of taskResults) {
26
+ this.timings[`${tr.task.target.project}:${tr.task.target.target}`].perfEnd = perf_hooks_1.performance.now();
27
+ }
28
+ this.recordTaskCompletions(taskResults, metadata);
29
+ }
30
+ endCommand() {
31
+ (0, fileutils_1.writeJsonFile)(this.profileFile, this.profile);
32
+ console.log(`Performance Profile: ${this.profileFile}`);
33
+ }
34
+ recordTaskCompletions(tasks, { groupId }) {
35
+ for (const { task, status } of tasks) {
36
+ const { perfStart, perfEnd } = this.timings[`${task.target.project}:${task.target.target}`];
37
+ this.profile.push({
38
+ name: task.id,
39
+ cat: Object.values(task.target).join(','),
40
+ ph: 'X',
41
+ ts: perfStart * 1000,
42
+ dur: (perfEnd - perfStart) * 1000,
43
+ pid: process.pid,
44
+ tid: groupId,
45
+ args: {
46
+ target: task.target,
47
+ status,
48
+ },
49
+ });
50
+ }
51
+ }
52
+ registerGroup(groupId) {
53
+ this.profile.push({
54
+ name: 'thread_name',
55
+ ph: 'M',
56
+ pid: process.pid,
57
+ tid: groupId,
58
+ ts: 0,
59
+ args: {
60
+ name: 'Group #' + (groupId + 1),
61
+ },
62
+ });
63
+ this.registeredGroups.add(groupId);
64
+ }
65
+ }
66
+ exports.TaskProfilingLifeCycle = TaskProfilingLifeCycle;
67
+ //# sourceMappingURL=task-profiling-life-cycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-profiling-life-cycle.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/task-profiling-life-cycle.ts"],"names":[],"mappings":";;;AAGA,2CAAyC;AACzC,+BAA4B;AAE5B,sDAAuD;AAEvD,MAAa,sBAAsB;IAWjC,YAAY,YAAoB;QAVxB,YAAO,GAKX,EAAE,CAAC;QACC,YAAO,GAAG,EAAE,CAAC;QAEb,qBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;QAGnC,IAAI,CAAC,WAAW,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;IACvD,CAAC;IAED,UAAU,CAAC,KAAa,EAAE,EAAE,OAAO,EAAgB;QACjD,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YAC3D,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;SAC7B;QACD,KAAK,IAAI,CAAC,IAAI,KAAK,EAAE;YACnB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG;gBACvD,SAAS,EAAE,wBAAW,CAAC,GAAG,EAAE;aAC7B,CAAC;SACH;IACH,CAAC;IAED,QAAQ,CACN,WAAoE,EACpE,QAAsB;QAEtB,KAAK,IAAI,EAAE,IAAI,WAAW,EAAE;YAC1B,IAAI,CAAC,OAAO,CACV,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CACrD,CAAC,OAAO,GAAG,wBAAW,CAAC,GAAG,EAAE,CAAC;SAC/B;QACD,IAAI,CA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AS,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC;aAChC;SACF,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF;AA/ED,wDA+EC"}
@@ -0,0 +1,13 @@
1
+ import { Task } from 'nx/src/shared/tasks';
2
+ import { LifeCycle } from '../life-cycle';
3
+ import { TaskStatus } from '../tasks-runner';
4
+ export declare class TaskTimingsLifeCycle implements LifeCycle {
5
+ private timings;
6
+ startTasks(tasks: Task[]): void;
7
+ endTasks(taskResults: Array<{
8
+ task: Task;
9
+ status: TaskStatus;
10
+ code: number;
11
+ }>): void;
12
+ endCommand(): void;
13
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskTimingsLifeCycle = void 0;
4
+ class TaskTimingsLifeCycle {
5
+ constructor() {
6
+ this.timings = {};
7
+ }
8
+ startTasks(tasks) {
9
+ for (let t of tasks) {
10
+ this.timings[`${t.target.project}:${t.target.target}`] = {
11
+ start: new Date().getTime(),
12
+ end: undefined,
13
+ };
14
+ }
15
+ }
16
+ endTasks(taskResults) {
17
+ for (let tr of taskResults) {
18
+ this.timings[`${tr.task.target.project}:${tr.task.target.target}`].end =
19
+ new Date().getTime();
20
+ }
21
+ }
22
+ endCommand() {
23
+ console.log('Task Execution Timings:');
24
+ const timings = {};
25
+ Object.keys(this.timings).forEach((p) => {
26
+ const t = this.timings[p];
27
+ timings[p] = t.end ? t.end - t.start : null;
28
+ });
29
+ console.log(JSON.stringify(timings, null, 2));
30
+ }
31
+ }
32
+ exports.TaskTimingsLifeCycle = TaskTimingsLifeCycle;
33
+ //# sourceMappingURL=task-timings-life-cycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-timings-life-cycle.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/task-timings-life-cycle.ts"],"names":[],"mappings":";;;AAIA,MAAa,o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 -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs_1 = require("fs");
4
+ const fs_extra_1 = require("fs-extra");
5
+ const path_1 = require("path");
6
+ const WEEK_IN_MS = 1000 * 60 * 60 * 24 * 7;
7
+ const folder = process.argv[2];
8
+ removeOld(terminalOutputs());
9
+ removeOld(cachedFiles());
10
+ function terminalOutputs() {
11
+ try {
12
+ return (0, fs_1.readdirSync)((0, path_1.join)(folder, 'terminalOutputs')).map((f) => (0, path_1.join)(folder, 'terminalOutputs', f));
13
+ }
14
+ catch (e) {
15
+ return [];
16
+ }
17
+ }
18
+ function cachedFiles() {
19
+ try {
20
+ return (0, fs_1.readdirSync)(folder)
21
+ .filter((f) => !f.endsWith('terminalOutputs'))
22
+ .map((f) => (0, path_1.join)(folder, f));
23
+ }
24
+ catch (e) {
25
+ return [];
26
+ }
27
+ }
28
+ function removeOld(records) {
29
+ try {
30
+ const time = mostRecentMTime(records);
31
+ records.forEach((r) => {
32
+ try {
33
+ const s = (0, fs_1.statSync)(r);
34
+ if (time - s.mtimeMs > WEEK_IN_MS) {
35
+ if (s.isDirectory()) {
36
+ try {
37
+ (0, fs_extra_1.removeSync)(`${r}.commit`);
38
+ }
39
+ catch (e) { }
40
+ }
41
+ (0, fs_extra_1.removeSync)(r);
42
+ }
43
+ }
44
+ catch (e) { }
45
+ });
46
+ }
47
+ catch (e) { }
48
+ }
49
+ function mostRecentMTime(records) {
50
+ let mostRecentTime = 0;
51
+ records.forEach((r) => {
52
+ try {
53
+ const s = (0, fs_1.statSync)(r);
54
+ if (s.mtimeMs > mostRecentTime) {
55
+ mostRecentTime = s.mtimeMs;
56
+ }
57
+ }
58
+ catch (e) { }
59
+ });
60
+ return mostRecentTime;
61
+ }
62
+ //# sourceMappingURL=remove-old-cache-records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-old-cache-records.js","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/remove-old-cache-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BACjC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE;wBACnB,IAAI;4BACF,IAAA,qBAAU,EAAC,GAAG,CAAC,SAAS,CAAC,CAAC;yBAC3B;wBAAC,OAAO,CAAC,EAAE,GAAE;qBACf;oBACD,IAAA,qBAAU,EAAC,CAAC,CAAC,CAAC;iBACf;aACF;YAAC,OAAO,CAAC,EAAE,GAAE;QAChB,CAAC,CAAC,CAAC;KACJ;IAAC,OAAO,CAAC,EAAE,GAAE;AAChB,CAAC;AAED,SAAS,eAAe,CAAC,OAAiB;IACxC,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACpB,IAAI;YACF,MAAM,CAAC,GAAG,IAAA,aAAQ,EAAC,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,CAAC,OAAO,GAAG,cAAc,EAAE;gBAC9B,cAAc,GAAG,CAAC,CAAC,OAAO,CAAC;aAC5B;SACF;QAAC,OAAO,CAAC,EAAE,GAAE;IAChB,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC;AACxB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Task } from '../shared/tasks';
2
+ export interface ReporterArgs {
3
+ target?: string;
4
+ configuration?: string;
5
+ onlyFailed?: boolean;
6
+ }
7
+ /**
8
+ * @deprecated the reporter API is no longer supported.
9
+ * The class will be removed after Nx 14 is released.
10
+ */
11
+ export declare abstract class Reporter {
12
+ abstract beforeRun(projectNames: string[], tasks: Task[], args: ReporterArgs, taskOverrides: any): void;
13
+ abstract printResults(nxArgs: ReporterArgs, startedWithFailedProjects: boolean, tasks: Task[], failedTasks: Task[], tasksWithFailedDependencies: Task[], cachedTasks: Task[]): void;
14
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Reporter = void 0;
4
+ /**
5
+ * @deprecated the reporter API is no longer supported.
6
+ * The class will be removed after Nx 14 is released.
7
+ */
8
+ class Reporter {
9
+ }
10
+ exports.Reporter = Reporter;
11
+ //# sourceMappingURL=reporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/reporter.ts"],"names":[],"mappings":";;;AAQA;;;GAGG;AACH,MAAsB,QAAQ;CAgB7B;AAhBD,4BAgBC"}