@ohos-ports/nx 23.3.0-beta.2 → 24.0.2-beta.0

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 (294) hide show
  1. package/README.md +3 -6
  2. package/dist/bin/nx.js +2 -2
  3. package/dist/bin/post-install.js +5 -3
  4. package/dist/nx-cloud-internals.d.ts +1 -0
  5. package/dist/nx-cloud-internals.js +7 -1
  6. package/dist/src/adapter/ngcli-adapter.js +2 -2
  7. package/dist/src/ai/clone-ai-config-repo.js +49 -12
  8. package/dist/src/command-line/add/add.d.ts +2 -0
  9. package/dist/src/command-line/add/add.js +23 -5
  10. package/dist/src/command-line/affected/affected.js +2 -2
  11. package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +0 -12
  12. package/dist/src/command-line/graph/graph.js +38 -10
  13. package/dist/src/command-line/init/command-object.js +0 -12
  14. package/dist/src/command-line/init/implementation/add-nx-to-nest.js +21 -62
  15. package/dist/src/command-line/init/init-v2.js +0 -2
  16. package/dist/src/command-line/migrate/agentic/close-agent-session.d.ts +1 -1
  17. package/dist/src/command-line/migrate/agentic/close-agent-session.js +4 -3
  18. package/dist/src/command-line/migrate/agentic/definitions.d.ts +1 -3
  19. package/dist/src/command-line/migrate/agentic/definitions.js +5 -97
  20. package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +7 -45
  21. package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +9 -51
  22. package/dist/src/command-line/migrate/agentic/handoff.d.ts +1 -43
  23. package/dist/src/command-line/migrate/agentic/handoff.js +3 -119
  24. package/dist/src/command-line/migrate/agentic/instruction-files.d.ts +0 -21
  25. package/dist/src/command-line/migrate/agentic/instruction-files.js +6 -27
  26. package/dist/src/command-line/migrate/agentic/master/run-master-session.d.ts +19 -1
  27. package/dist/src/command-line/migrate/agentic/master/run-master-session.js +88 -49
  28. package/dist/src/command-line/migrate/agentic/master/spawn-master.d.ts +1 -0
  29. package/dist/src/command-line/migrate/agentic/master/spawn-master.js +86 -24
  30. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +2 -2
  31. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +2 -2
  32. package/dist/src/command-line/migrate/agentic/prompts/fragments.d.ts +1 -12
  33. package/dist/src/command-line/migrate/agentic/prompts/fragments.js +8 -17
  34. package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +0 -15
  35. package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +3 -100
  36. package/dist/src/command-line/migrate/agentic/select.d.ts +12 -6
  37. package/dist/src/command-line/migrate/agentic/select.js +38 -8
  38. package/dist/src/command-line/migrate/agentic/types.d.ts +9 -68
  39. package/dist/src/command-line/migrate/agentic/types.js +6 -8
  40. package/dist/src/command-line/migrate/command-object.js +6 -10
  41. package/dist/src/command-line/migrate/execute-migration.d.ts +6 -6
  42. package/dist/src/command-line/migrate/execute-migration.js +25 -15
  43. package/dist/src/command-line/migrate/migrate-analytics.d.ts +18 -1
  44. package/dist/src/command-line/migrate/migrate-analytics.js +38 -0
  45. package/dist/src/command-line/migrate/migrate-commits.d.ts +29 -17
  46. package/dist/src/command-line/migrate/migrate-commits.js +86 -32
  47. package/dist/src/command-line/migrate/migrate-config.d.ts +6 -6
  48. package/dist/src/command-line/migrate/migrate-config.js +12 -6
  49. package/dist/src/command-line/migrate/migrate-output.d.ts +1 -6
  50. package/dist/src/command-line/migrate/migrate-output.js +1 -10
  51. package/dist/src/command-line/migrate/migrate.d.ts +6 -30
  52. package/dist/src/command-line/migrate/migrate.js +257 -255
  53. package/dist/src/command-line/migrate/resolve-package-version.d.ts +2 -4
  54. package/dist/src/command-line/migrate/resolve-package-version.js +2 -35
  55. package/dist/src/command-line/migrate/run/agent-output.d.ts +2 -0
  56. package/dist/src/command-line/migrate/run/agent-output.js +9 -0
  57. package/dist/src/command-line/migrate/run/broker.d.ts +14 -5
  58. package/dist/src/command-line/migrate/run/broker.js +69 -21
  59. package/dist/src/command-line/migrate/run/clean-retry.js +4 -2
  60. package/dist/src/command-line/migrate/run/existing-run-report.d.ts +1 -1
  61. package/dist/src/command-line/migrate/run/existing-run-report.js +7 -5
  62. package/dist/src/command-line/migrate/run/give-up.d.ts +4 -3
  63. package/dist/src/command-line/migrate/run/give-up.js +8 -5
  64. package/dist/src/command-line/migrate/run/index.d.ts +7 -5
  65. package/dist/src/command-line/migrate/run/index.js +16 -1
  66. package/dist/src/command-line/migrate/run/issues.js +7 -2
  67. package/dist/src/command-line/migrate/run/orchestrator.d.ts +61 -4
  68. package/dist/src/command-line/migrate/run/orchestrator.js +397 -133
  69. package/dist/src/command-line/migrate/run/run-state.d.ts +17 -1
  70. package/dist/src/command-line/migrate/run/run-state.js +41 -2
  71. package/dist/src/command-line/migrate/run/runbook.d.ts +1 -0
  72. package/dist/src/command-line/migrate/run/runbook.js +115 -18
  73. package/dist/src/command-line/migrate/run/state-lock.d.ts +29 -4
  74. package/dist/src/command-line/migrate/run/state-lock.js +102 -10
  75. package/dist/src/command-line/migrate/run/state-machine.js +4 -1
  76. package/dist/src/command-line/migrate/run/util.d.ts +7 -2
  77. package/dist/src/command-line/migrate/run/util.js +30 -3
  78. package/dist/src/command-line/migrate/run/worker.d.ts +1 -1
  79. package/dist/src/command-line/migrate/run/worker.js +252 -250
  80. package/dist/src/command-line/migrate/sort-migrations.d.ts +1 -7
  81. package/dist/src/command-line/migrate/sort-migrations.js +1 -12
  82. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +17 -12
  83. package/dist/src/command-line/release/changelog.js +9 -6
  84. package/dist/src/command-line/release/config/config.d.ts +1 -0
  85. package/dist/src/command-line/release/config/config.js +48 -9
  86. package/dist/src/command-line/release/release.js +2 -2
  87. package/dist/src/command-line/release/utils/git.js +8 -7
  88. package/dist/src/command-line/release/utils/interpolate-release-config.d.ts +6 -0
  89. package/dist/src/command-line/release/utils/interpolate-release-config.js +39 -0
  90. package/dist/src/command-line/release/utils/release-graph.d.ts +5 -0
  91. package/dist/src/command-line/release/utils/release-graph.js +1 -0
  92. package/dist/src/command-line/release/utils/remote-release-clients/github.js +5 -6
  93. package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +5 -6
  94. package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +2 -2
  95. package/dist/src/command-line/release/utils/shared.js +10 -10
  96. package/dist/src/command-line/release/utils/version-plan-utils.d.ts +3 -12
  97. package/dist/src/command-line/release/utils/version-plan-utils.js +33 -55
  98. package/dist/src/command-line/release/version/version-actions.js +2 -1
  99. package/dist/src/command-line/release/version.js +5 -2
  100. package/dist/src/command-line/reset/reset.js +58 -62
  101. package/dist/src/command-line/run/executor-utils.js +1 -0
  102. package/dist/src/command-line/run/run-one.d.ts +20 -1
  103. package/dist/src/command-line/run/run-one.js +153 -5
  104. package/dist/src/command-line/run/run.js +2 -1
  105. package/dist/src/command-line/show/projects.js +5 -3
  106. package/dist/src/command-line/show/show-target/info.d.ts +10 -1
  107. package/dist/src/command-line/show/show-target/info.js +100 -15
  108. package/dist/src/command-line/show/show-target/inputs.js +10 -2
  109. package/dist/src/command-line/show/show-target/utils.js +1 -0
  110. package/dist/src/command-line/watch/command-object.js +3 -22
  111. package/dist/src/command-line/watch/watch.d.ts +0 -7
  112. package/dist/src/command-line/watch/watch.js +1 -1
  113. package/dist/src/command-line/yargs-utils/shared-options.js +1 -1
  114. package/dist/src/config/misc-interfaces.d.ts +18 -0
  115. package/dist/src/config/nx-json.d.ts +22 -11
  116. package/dist/src/config/task-graph.d.ts +1 -1
  117. package/dist/src/config/workspace-json-project-json.d.ts +88 -0
  118. package/dist/src/core/graph/main.js +1 -1
  119. package/dist/src/core/graph/runtime.js +1 -1
  120. package/dist/src/core/graph/styles.css +1 -1
  121. package/dist/src/core/graph/styles.js +1 -1
  122. package/dist/src/daemon/client/client.d.ts +15 -0
  123. package/dist/src/daemon/client/client.js +181 -71
  124. package/dist/src/daemon/client/daemon-socket-messenger.d.ts +1 -1
  125. package/dist/src/daemon/client/daemon-socket-messenger.js +2 -2
  126. package/dist/src/daemon/server/client-socket-context.js +1 -1
  127. package/dist/src/daemon/server/handle-process-in-background.js +21 -9
  128. package/dist/src/daemon/server/handle-select-affected-tasks.d.ts +2 -1
  129. package/dist/src/daemon/server/handle-select-affected-tasks.js +21 -13
  130. package/dist/src/daemon/server/native-js-loader.d.ts +1 -0
  131. package/dist/src/daemon/server/native-js-loader.js +21 -0
  132. package/dist/src/daemon/server/project-graph-incremental-recomputation.js +4 -8
  133. package/dist/src/daemon/server/server.d.ts +2 -1
  134. package/dist/src/daemon/server/server.js +17 -4
  135. package/dist/src/daemon/server/shutdown-utils.js +0 -3
  136. package/dist/src/daemon/server/start.d.ts +1 -0
  137. package/dist/src/daemon/server/start.js +2 -0
  138. package/dist/src/daemon/socket-utils.d.ts +11 -9
  139. package/dist/src/daemon/socket-utils.js +31 -61
  140. package/dist/src/daemon/tmp-dir.d.ts +19 -14
  141. package/dist/src/daemon/tmp-dir.js +142 -354
  142. package/dist/src/devkit-exports.d.ts +9 -1
  143. package/dist/src/devkit-exports.js +12 -1
  144. package/dist/src/devkit-internals.d.ts +6 -5
  145. package/dist/src/devkit-internals.js +13 -4
  146. package/dist/src/executors/run-commands/run-commands.impl.d.ts +4 -2
  147. package/dist/src/executors/run-commands/run-commands.impl.js +53 -27
  148. package/dist/src/executors/run-commands/running-tasks.d.ts +13 -4
  149. package/dist/src/executors/run-commands/running-tasks.js +148 -95
  150. package/dist/src/executors/run-commands/schema.json +1 -1
  151. package/dist/src/hasher/check-task-files.js +5 -8
  152. package/dist/src/hasher/file-hasher.js +9 -7
  153. package/dist/src/hasher/hash-task.js +4 -0
  154. package/dist/src/hasher/native-task-hasher-impl.js +3 -1
  155. package/dist/src/hasher/task-hasher.d.ts +2 -0
  156. package/dist/src/hasher/task-hasher.js +4 -1
  157. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +1 -2
  158. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +6 -11
  159. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +2 -2
  160. package/dist/src/migrations/update-24-0-0/enable-legacy-affected.d.ts +4 -0
  161. package/dist/src/migrations/update-24-0-0/enable-legacy-affected.js +15 -0
  162. package/dist/src/migrations/update-24-0-0/enable-legacy-affected.md +30 -0
  163. package/dist/src/migrations/update-24-0-0/find-custom-hashers.d.ts +3 -0
  164. package/dist/src/migrations/update-24-0-0/find-custom-hashers.js +100 -0
  165. package/dist/src/migrations/update-24-0-0/find-custom-hashers.md +63 -0
  166. package/dist/src/migrations/update-24-0-0/move-custom-hashers-to-inputs.md +146 -0
  167. package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.d.ts +3 -0
  168. package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.js +130 -0
  169. package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.md +62 -0
  170. package/dist/src/native/assert-supported-platform.js +1 -1
  171. package/dist/src/native/index.d.ts +238 -18
  172. package/dist/src/native/index.js +6 -1
  173. package/dist/src/native/native-bindings.js +15 -6
  174. package/dist/src/native/nx.openharmony-arm64.node +0 -0
  175. package/dist/src/native/nx.wasi-browser.js +1 -0
  176. package/dist/src/native/nx.wasi.cjs +1 -0
  177. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  178. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  179. package/dist/src/nx-cloud/update-manager.d.ts +14 -0
  180. package/dist/src/nx-cloud/update-manager.js +237 -50
  181. package/dist/src/plugins/js/lock-file/pnpm-parser.js +3 -4
  182. package/dist/src/plugins/js/lock-file/pruned-output.d.ts +2 -2
  183. package/dist/src/plugins/js/lock-file/pruned-output.js +4 -4
  184. package/dist/src/plugins/js/utils/register.js +9 -4
  185. package/dist/src/project-graph/affected/affected-tasks.d.ts +9 -6
  186. package/dist/src/project-graph/affected/affected-tasks.js +31 -7
  187. package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +7 -0
  188. package/dist/src/project-graph/plugins/loaded-nx-plugin.js +49 -6
  189. package/dist/src/project-graph/utils/project-configuration/target-merging.js +1 -1
  190. package/dist/src/project-graph/utils/project-configuration/target-normalization.js +12 -133
  191. package/dist/src/project-graph/utils/project-configuration-utils.js +2 -2
  192. package/dist/src/project-graph/utils/retrieve-workspace-files.js +27 -6
  193. package/dist/src/tasks-runner/create-task-graph.d.ts +8 -7
  194. package/dist/src/tasks-runner/create-task-graph.js +50 -27
  195. package/dist/src/tasks-runner/default-tasks-runner.js +1 -1
  196. package/dist/src/tasks-runner/init-tasks-runner.js +116 -59
  197. package/dist/src/tasks-runner/life-cycle.d.ts +4 -1
  198. package/dist/src/tasks-runner/life-cycle.js +7 -0
  199. package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +5 -2
  200. package/dist/src/tasks-runner/life-cycles/performance-analysis.js +13 -7
  201. package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +4 -3
  202. package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +9 -2
  203. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +5 -2
  204. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +4 -1
  205. package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.js +5 -1
  206. package/dist/src/tasks-runner/pseudo-ipc.d.ts +1 -0
  207. package/dist/src/tasks-runner/pseudo-ipc.js +4 -0
  208. package/dist/src/tasks-runner/pseudo-terminal.d.ts +1 -1
  209. package/dist/src/tasks-runner/pseudo-terminal.js +2 -2
  210. package/dist/src/tasks-runner/readiness/executor-ready-signal.d.ts +7 -0
  211. package/dist/src/tasks-runner/readiness/executor-ready-signal.js +43 -0
  212. package/dist/src/tasks-runner/readiness/probes.d.ts +14 -0
  213. package/dist/src/tasks-runner/readiness/probes.js +101 -0
  214. package/dist/src/tasks-runner/readiness/ready-signal-server.d.ts +18 -0
  215. package/dist/src/tasks-runner/readiness/ready-signal-server.js +72 -0
  216. package/dist/src/tasks-runner/readiness/ready-signal.d.ts +33 -0
  217. package/dist/src/tasks-runner/readiness/ready-signal.js +92 -0
  218. package/dist/src/tasks-runner/readiness/ready-when.d.ts +84 -0
  219. package/dist/src/tasks-runner/readiness/ready-when.js +371 -0
  220. package/dist/src/tasks-runner/readiness/startup-host.d.ts +1 -0
  221. package/dist/src/tasks-runner/readiness/startup-host.js +32 -0
  222. package/dist/src/tasks-runner/run-command.d.ts +6 -2
  223. package/dist/src/tasks-runner/run-command.js +21 -31
  224. package/dist/src/tasks-runner/run-outcome.d.ts +16 -0
  225. package/dist/src/tasks-runner/run-outcome.js +39 -0
  226. package/dist/src/tasks-runner/running-tasks/batch-process.js +6 -0
  227. package/dist/src/tasks-runner/running-tasks/node-child-process.js +5 -4
  228. package/dist/src/tasks-runner/running-tasks/running-task.d.ts +1 -1
  229. package/dist/src/tasks-runner/task-env.d.ts +10 -0
  230. package/dist/src/tasks-runner/task-env.js +37 -5
  231. package/dist/src/tasks-runner/task-graph-utils.d.ts +9 -6
  232. package/dist/src/tasks-runner/task-graph-utils.js +17 -12
  233. package/dist/src/tasks-runner/task-orchestrator.d.ts +62 -18
  234. package/dist/src/tasks-runner/task-orchestrator.js +750 -150
  235. package/dist/src/tasks-runner/tasks-runner.d.ts +1 -1
  236. package/dist/src/tasks-runner/tasks-schedule.d.ts +18 -1
  237. package/dist/src/tasks-runner/tasks-schedule.js +63 -6
  238. package/dist/src/tasks-runner/tokens.d.ts +54 -0
  239. package/dist/src/tasks-runner/tokens.js +161 -0
  240. package/dist/src/tasks-runner/utils.d.ts +35 -6
  241. package/dist/src/tasks-runner/utils.js +149 -68
  242. package/dist/src/ultracache/ci-status.d.ts +24 -0
  243. package/dist/src/ultracache/ci-status.js +87 -0
  244. package/dist/src/ultracache/config.d.ts +3 -3
  245. package/dist/src/ultracache/config.js +4 -4
  246. package/dist/src/ultracache/fetch.d.ts +2 -0
  247. package/dist/src/ultracache/fetch.js +1 -0
  248. package/dist/src/ultracache/overrides.js +4 -0
  249. package/dist/src/utils/acknowledge-build-scripts.d.ts +34 -1
  250. package/dist/src/utils/acknowledge-build-scripts.js +171 -32
  251. package/dist/src/utils/child-process.js +2 -1
  252. package/dist/src/utils/find-matching-projects.js +9 -6
  253. package/dist/src/utils/git-utils.d.ts +12 -5
  254. package/dist/src/utils/git-utils.js +69 -11
  255. package/dist/src/utils/long-running-target.d.ts +1 -3
  256. package/dist/src/utils/long-running-target.js +1 -3
  257. package/dist/src/utils/output.d.ts +4 -3
  258. package/dist/src/utils/output.js +4 -3
  259. package/dist/src/utils/owned-private-dir.d.ts +1 -17
  260. package/dist/src/utils/owned-private-dir.js +10 -62
  261. package/dist/src/utils/package-manager.d.ts +8 -0
  262. package/dist/src/utils/package-manager.js +65 -8
  263. package/dist/src/utils/perf-hooks.d.ts +1 -0
  264. package/dist/src/utils/plugins/core-plugins.js +5 -1
  265. package/dist/src/utils/progress-topics.d.ts +1 -0
  266. package/dist/src/utils/progress-topics.js +1 -0
  267. package/dist/src/utils/safe-spawn.js +1 -5
  268. package/dist/src/utils/shell-quoting.d.ts +8 -1
  269. package/dist/src/utils/shell-quoting.js +12 -1
  270. package/dist/src/utils/spawn-without-terminal.d.ts +27 -0
  271. package/dist/src/utils/spawn-without-terminal.js +110 -0
  272. package/dist/src/utils/string-similarity.d.ts +38 -0
  273. package/dist/src/utils/string-similarity.js +108 -0
  274. package/migrations.json +20 -6
  275. package/package.json +15 -24
  276. package/schemas/migrations-schema.json +11 -0
  277. package/schemas/nx-schema.json +133 -11
  278. package/schemas/project-schema.json +114 -4
  279. package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +0 -56
  280. package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +0 -67
  281. package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +0 -49
  282. package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +0 -53
  283. package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +0 -26
  284. package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +0 -27
  285. package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +0 -70
  286. package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +0 -113
  287. package/dist/src/command-line/migrate/agentic/run-step.d.ts +0 -68
  288. package/dist/src/command-line/migrate/agentic/run-step.js +0 -148
  289. package/dist/src/command-line/migrate/agentic/runner.d.ts +0 -21
  290. package/dist/src/command-line/migrate/agentic/runner.js +0 -262
  291. package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +0 -9
  292. package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +0 -18
  293. package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +0 -18
  294. package/dist/src/tasks-runner/legacy-depends-on-warning.js +0 -109
@@ -4,11 +4,19 @@ exports.showTargetInfoHandler = showTargetInfoHandler;
4
4
  const task_hasher_1 = require("../../../hasher/task-hasher");
5
5
  const create_task_graph_1 = require("../../../tasks-runner/create-task-graph");
6
6
  const utils_1 = require("../../../tasks-runner/utils");
7
+ const ready_when_1 = require("../../../tasks-runner/readiness/ready-when");
8
+ const native_1 = require("../../../native");
9
+ const ci_status_1 = require("../../../ultracache/ci-status");
7
10
  const utils_2 = require("./utils");
8
11
  // ── Handler ─────────────────────────────────────────────────────────
9
12
  async function showTargetInfoHandler(args) {
10
13
  const t = await (0, utils_2.resolveTarget)(args, { withSourceMaps: true });
11
14
  const data = resolveTargetInfoData(t);
15
+ if (!args.json &&
16
+ data.ultracacheMode &&
17
+ (await (0, ci_status_1.isUltracacheOnInCI)(t.nxJson))) {
18
+ data.ultracacheInCI = data.ultracacheMode;
19
+ }
12
20
  renderTargetInfo(data, args);
13
21
  }
14
22
  function resolveTargetInfoData(t) {
@@ -43,10 +51,13 @@ function resolveTargetInfoData(t) {
43
51
  command = targetConfig.options.script;
44
52
  commandSourceKey = 'options.script';
45
53
  }
46
- const { dependsOn, depSourceIndices, transitiveTasks } = resolveTaskGraphDependencies(graph, {}, projectName, targetName, configuration, depConfigs);
54
+ const { dependsOn, depSourceIndices, transitiveTasks, continuousDeps } = resolveTaskGraphDependencies(graph, {}, projectName, targetName, configuration, depConfigs);
47
55
  const configurations = Object.keys(targetConfig.configurations ?? {});
48
56
  const targetSourceMap = extractTargetSourceMap(node.data.root, targetName, sourceMaps);
49
57
  const usesCustomHasher = (0, utils_2.hasCustomHasher)(projectName, targetName, graph);
58
+ const expandedInputs = targetConfig.inputs
59
+ ? expandInputsForDisplay(targetConfig.inputs, node, nxJson)
60
+ : undefined;
50
61
  return {
51
62
  project: projectName,
52
63
  target: targetName,
@@ -55,20 +66,24 @@ function resolveTargetInfoData(t) {
55
66
  ...(command ? { command, _commandSourceKey: commandSourceKey } : {}),
56
67
  ...(usesCustomHasher ? { customHasher: true } : {}),
57
68
  ...(dependsOn.length > 0
58
- ? { dependsOn, _depSources: depSourceIndices }
69
+ ? {
70
+ dependsOn,
71
+ _depSources: depSourceIndices,
72
+ _continuousDeps: continuousDeps,
73
+ }
59
74
  : {}),
60
75
  ...(transitiveTasks.length > 0 ? { transitiveTasks } : {}),
61
76
  parallelism: targetConfig.parallelism ?? true,
62
77
  continuous: targetConfig.continuous ?? false,
78
+ ...(targetConfig.readyWhen !== undefined
79
+ ? { readyWhen: withEffectiveTimeout(targetConfig.readyWhen) }
80
+ : {}),
63
81
  cache: targetConfig.cache ?? false,
64
- ...(targetConfig.inputs
65
- ? (() => {
66
- const expanded = expandInputsForDisplay(targetConfig.inputs, node, nxJson);
67
- return {
68
- inputs: expanded.map((e) => e.value),
69
- _inputSources: expanded.map((e) => e.originalIndex),
70
- };
71
- })()
82
+ ...(expandedInputs
83
+ ? {
84
+ inputs: expandedInputs.map((e) => e.value),
85
+ _inputSources: expandedInputs.map((e) => e.originalIndex),
86
+ }
72
87
  : {}),
73
88
  ...(targetConfig.outputs
74
89
  ? { outputs: targetConfig.outputs }
@@ -84,8 +99,16 @@ function resolveTargetInfoData(t) {
84
99
  ? { defaultConfiguration: targetConfig.defaultConfiguration }
85
100
  : {}),
86
101
  ...(targetSourceMap ? { sourceMap: targetSourceMap } : {}),
102
+ /** Set by the handler once Nx Cloud confirms the workspace is On. */
103
+ ultracacheInCI: undefined,
104
+ ultracacheMode: (0, ci_status_1.ultracacheModeInCI)(targetConfig, usesCustomHasher),
87
105
  };
88
106
  }
107
+ function withEffectiveTimeout(readyWhen) {
108
+ if (readyWhen === null || typeof readyWhen !== 'object')
109
+ return readyWhen;
110
+ return { ...readyWhen, timeout: readyWhen.timeout ?? ready_when_1.DEFAULT_READY_TIMEOUT };
111
+ }
89
112
  function resolveDependencyProjects(dep, projectName, graph) {
90
113
  if (dep.projects && dep.projects.length > 0)
91
114
  return dep.projects;
@@ -126,8 +149,15 @@ function resolveTaskGraphDependencies(graph, extraTargetDeps, projectName, targe
126
149
  const directDeps = [
127
150
  ...(taskGraph.dependencies[rootId] ?? []),
128
151
  ...(taskGraph.continuousDependencies[rootId] ?? []),
129
- ];
152
+ ].map((edge) => edge.id);
130
153
  const directDepSet = new Set(directDeps);
154
+ const continuousDeps = Object.fromEntries((taskGraph.continuousDependencies[rootId] ?? []).map((edge) => [
155
+ edge.id,
156
+ {
157
+ inputsHashed: edge.inputs !== false,
158
+ waitsForReady: edge.waitFor === 'ready',
159
+ },
160
+ ]));
131
161
  const depSourceIndices = directDeps.map((depTaskId) => {
132
162
  const task = taskGraph.tasks[depTaskId];
133
163
  if (!task)
@@ -138,7 +168,12 @@ function resolveTaskGraphDependencies(graph, extraTargetDeps, projectName, targe
138
168
  // in the graph — `filterDummyTasks` (called inside `createTaskGraph`)
139
169
  // removes dummy entries from `dependencies` but leaves them in `tasks`.
140
170
  const transitiveTasks = Object.keys(taskGraph.dependencies).filter((id) => id !== rootId && !directDepSet.has(id));
141
- return { dependsOn: directDeps, depSourceIndices, transitiveTasks };
171
+ return {
172
+ dependsOn: directDeps,
173
+ depSourceIndices,
174
+ transitiveTasks,
175
+ continuousDeps,
176
+ };
142
177
  }
143
178
  catch {
144
179
  return {
@@ -259,10 +294,39 @@ function extractTargetSourceMap(projectRoot, targetName, sourceMaps) {
259
294
  return Object.keys(result).length > 0 ? result : undefined;
260
295
  }
261
296
  // ── Render ──────────────────────────────────────────────────────────
297
+ function describeReadyWhen(readyWhen) {
298
+ if (readyWhen === null)
299
+ return 'off (null)';
300
+ if (typeof readyWhen !== 'object')
301
+ return JSON.stringify(readyWhen);
302
+ const timing = [`timeout ${(0, native_1.formatDuration)(readyWhen.timeout)}`];
303
+ if ('interval' in readyWhen && readyWhen.interval !== undefined) {
304
+ timing.push(`interval ${(0, native_1.formatDuration)(readyWhen.interval)}`);
305
+ }
306
+ return `${describeReadyCheck(readyWhen)} (${timing.join(', ')})`;
307
+ }
308
+ function describeReadyCheck(readyWhen) {
309
+ if ('url' in readyWhen)
310
+ return `url ${readyWhen.url}`;
311
+ if ('port' in readyWhen) {
312
+ return readyWhen.host
313
+ ? `port ${readyWhen.port} on ${readyWhen.host}`
314
+ : `port ${readyWhen.port}`;
315
+ }
316
+ if ('command' in readyWhen)
317
+ return `command "${readyWhen.command}"`;
318
+ if ('logMatches' in readyWhen) {
319
+ const matches = [readyWhen.logMatches].flat().map((m) => `"${m}"`);
320
+ return `logMatches ${matches.join(', ')}`;
321
+ }
322
+ if ('signal' in readyWhen)
323
+ return 'signal';
324
+ return JSON.stringify(readyWhen);
325
+ }
262
326
  function renderTargetInfo(data, args) {
263
327
  if (args.json) {
264
328
  // Strip internal renderer-only fields from JSON output
265
- const { _inputSources, _depSources, _commandSourceKey, ...jsonData } = data;
329
+ const { _inputSources, _depSources, _commandSourceKey, _continuousDeps, ultracacheMode, ultracacheInCI, ...jsonData } = data;
266
330
  console.log(JSON.stringify(jsonData, null, 2));
267
331
  return;
268
332
  }
@@ -306,7 +370,13 @@ function renderTargetInfo(data, args) {
306
370
  const hint = srcIdx !== undefined && srcIdx >= 0
307
371
  ? sourceHint(`dependsOn.${srcIdx}`, 'dependsOn')
308
372
  : sourceHint('dependsOn');
309
- console.log(` ${data.dependsOn[i]}${hint}`);
373
+ const continuousDep = data._continuousDeps?.[data.dependsOn[i]];
374
+ const note = continuousDep
375
+ ? ` ${c.dim(continuousDep.waitsForReady
376
+ ? '(continuous, waits for ready)'
377
+ : '(continuous)')}`
378
+ : '';
379
+ console.log(` ${data.dependsOn[i]}${note}${hint}`);
310
380
  }
311
381
  if (data.transitiveTasks && data.transitiveTasks.length > 0) {
312
382
  console.log(` ${c.dim(formatTransitiveSummary(data.transitiveTasks))}`);
@@ -314,9 +384,21 @@ function renderTargetInfo(data, args) {
314
384
  }
315
385
  console.log(`${c.bold('Parallelism')}: ${data.parallelism}${sourceHint('parallelism')}`);
316
386
  console.log(`${c.bold('Continuous')}: ${data.continuous}${sourceHint('continuous')}`);
387
+ if (data.readyWhen !== undefined) {
388
+ console.log(`${c.bold('Ready when')}: ${describeReadyWhen(data.readyWhen)}${sourceHint('readyWhen')}`);
389
+ }
317
390
  console.log(`${c.bold('Cache')}: ${data.cache}${sourceHint('cache')}`);
318
- if (data.inputs && data.inputs.length > 0) {
391
+ if (data.ultracacheInCI) {
392
+ const notice = (0, ci_status_1.ultracacheInCINotice)(data.ultracacheInCI, (0, ci_status_1.hasAlwaysInput)(data.inputs));
393
+ console.log(`${c.bold('Ultracache')}: ${notice} ${(0, ci_status_1.ultracacheDocsLink)()}`);
394
+ }
395
+ const hashedContinuousDeps = Object.entries(data._continuousDeps ?? {})
396
+ .filter(([, { inputsHashed }]) => inputsHashed)
397
+ .map(([depId]) => depId);
398
+ if (data.inputs?.length || hashedContinuousDeps.length) {
319
399
  console.log(`${c.bold('Inputs')}:`);
400
+ }
401
+ if (data.inputs && data.inputs.length > 0) {
320
402
  const inputSources = data._inputSources;
321
403
  // Build sortable entries with their source index
322
404
  const entries = data.inputs.map((input, i) => ({
@@ -351,6 +433,9 @@ function renderTargetInfo(data, args) {
351
433
  console.log(` - ${display}${hint}`);
352
434
  }
353
435
  }
436
+ for (const depId of hashedContinuousDeps) {
437
+ console.log(` - inputs of ${depId} ${c.dim('(continuous dependency)')}`);
438
+ }
354
439
  if (data.outputs && data.outputs.length > 0) {
355
440
  console.log(`${c.bold('Outputs')}:`);
356
441
  for (let i = 0; i < data.outputs.length; i++) {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.showTargetInputsHandler = showTargetInputsHandler;
4
4
  const check_task_files_1 = require("../../../hasher/check-task-files");
5
5
  const utils_1 = require("../../../tasks-runner/utils");
6
+ const ci_status_1 = require("../../../ultracache/ci-status");
6
7
  const utils_2 = require("./utils");
7
8
  // ── Handler ─────────────────────────────────────────────────────────
8
9
  async function showTargetInputsHandler(args) {
@@ -27,7 +28,10 @@ async function showTargetInputsHandler(args) {
27
28
  (0, utils_2.setCheckExitCode)(results);
28
29
  return;
29
30
  }
30
- renderInputs({ project: projectName, target: targetName, ...hashInputs }, t.node.data.targets[targetName].inputs, args);
31
+ const targetConfig = t.node.data.targets[targetName];
32
+ const mode = args.json ? undefined : (0, ci_status_1.ultracacheModeInCI)(targetConfig, false);
33
+ const ultracacheInCI = mode && (await (0, ci_status_1.isUltracacheOnInCI)(t.nxJson)) ? mode : undefined;
34
+ renderInputs({ project: projectName, target: targetName, ...hashInputs }, targetConfig.inputs, args, ultracacheInCI);
31
35
  }
32
36
  // ── Data resolution ─────────────────────────────────────────────────
33
37
  async function checkInputs(taskId, check, hashInputs) {
@@ -51,13 +55,17 @@ async function checkInputs(taskId, check, hashInputs) {
51
55
  });
52
56
  }
53
57
  // ── Render ──────────────────────────────────────────────────────────
54
- function renderInputs(data, configuredInputs, args) {
58
+ function renderInputs(data, configuredInputs, args, ultracacheInCI) {
55
59
  if (args.json) {
56
60
  (0, utils_2.printJson)(data);
57
61
  return;
58
62
  }
59
63
  const c = (0, utils_2.pc)();
60
64
  console.log(`${c.bold('Inputs for')} ${c.cyan(data.project)}:${c.green(data.target)}`);
65
+ if (ultracacheInCI) {
66
+ const notice = (0, ci_status_1.ultracacheInCINotice)(ultracacheInCI, (0, ci_status_1.hasAlwaysInput)(configuredInputs));
67
+ console.log(`${c.bold('Ultracache')}: ${notice} ${(0, ci_status_1.ultracacheDocsLink)()}`);
68
+ }
61
69
  if (configuredInputs?.length) {
62
70
  (0, utils_2.printList)('Configured inputs', configuredInputs.map((i) => typeof i === 'string' ? i : JSON.stringify(i)));
63
71
  }
@@ -142,6 +142,7 @@ function validateConfiguration(projectName, targetName, configuration, targetCon
142
142
  }
143
143
  }
144
144
  // ── Custom hasher detection ──────────────────────────────────────────
145
+ // TODO(v25): remove custom hasher support.
145
146
  /**
146
147
  * Checks whether a target's executor defines a custom hasher.
147
148
  * Returns true if the executor has a hasherFactory — meaning the
@@ -13,7 +13,7 @@ exports.yargsWatchCommand = {
13
13
  },
14
14
  };
15
15
  function withWatchOptions(yargs) {
16
- return ((0, shared_options_1.withVerbose)(yargs)
16
+ return (0, shared_options_1.withVerbose)(yargs)
17
17
  .parserConfiguration({
18
18
  'strip-dashed': true,
19
19
  'populate--': true,
@@ -32,12 +32,6 @@ function withWatchOptions(yargs) {
32
32
  type: 'boolean',
33
33
  description: 'When watching selected projects, also include the projects they depend on.',
34
34
  alias: 'd',
35
- })
36
- // TODO(v24): remove the deprecated --includeDependentProjects alias
37
- .option('includeDependentProjects', {
38
- type: 'boolean',
39
- hidden: true,
40
- describe: "Deprecated in favor of --includeDependencies; will be removed in Nx 24. The flag name was misleading since it includes the watched project's dependencies, not its dependents. The new flag is functionally identical.",
41
35
  })
42
36
  .option('includeGlobalWorkspaceFiles', {
43
37
  type: 'boolean',
@@ -59,6 +53,7 @@ function withWatchOptions(yargs) {
59
53
  .conflicts({
60
54
  all: 'projects',
61
55
  })
56
+ .strictOptions()
62
57
  .check((args) => {
63
58
  if (!args.all && !args.projects) {
64
59
  throw Error('Please specify either --all or --projects');
@@ -73,19 +68,5 @@ function withWatchOptions(yargs) {
73
68
  else {
74
69
  throw Error('No command specified for watch mode.');
75
70
  }
76
- // --includeDependentProjects was renamed to --includeDependencies in
77
- // Nx 23 because the original name was misleading: it includes the
78
- // watched project's *dependencies*, not its dependents. The new flag
79
- // is functionally identical — only the name changed. Map the legacy
80
- // name through so existing scripts keep working during the
81
- // deprecation window.
82
- // TODO(v24): remove the legacy includeDependentProjects pass-through
83
- const a = args;
84
- if (a.includeDependentProjects !== undefined &&
85
- a.includeDependencies === undefined) {
86
- a.includeDependencies = a.includeDependentProjects;
87
- // eslint-disable-next-line no-console
88
- console.warn("--includeDependentProjects is deprecated in favor of --includeDependencies and will be removed in Nx 24. The flag name was misleading since it includes the watched project's dependencies, not its dependents. The new flag is functionally identical.");
89
- }
90
- }, true));
71
+ }, true);
91
72
  }
@@ -3,13 +3,6 @@ export interface WatchArguments {
3
3
  projects?: string[];
4
4
  all?: boolean;
5
5
  includeDependencies?: boolean;
6
- /**
7
- * @deprecated Renamed to {@link WatchArguments.includeDependencies}; will be
8
- * removed in Nx 24. The original name was misleading: this flag includes
9
- * the watched project's dependencies, not its dependents. The new property
10
- * is functionally identical — only the name changed.
11
- */
12
- includeDependentProjects?: boolean;
13
6
  includeGlobalWorkspaceFiles?: boolean;
14
7
  verbose?: boolean;
15
8
  command?: string;
@@ -149,7 +149,7 @@ async function watch(args) {
149
149
  }
150
150
  await client_1.daemonClient.registerFileWatcher({
151
151
  watchProjects: whatToWatch,
152
- includeDependencies: args.includeDependencies ?? args.includeDependentProjects,
152
+ includeDependencies: args.includeDependencies,
153
153
  includeGlobalWorkspaceFiles: args.includeGlobalWorkspaceFiles,
154
154
  }, async (err, data) => {
155
155
  if (err === 'reconnecting') {
@@ -249,7 +249,7 @@ function withAffectedOptions(yargs) {
249
249
  function withExplainOption(yargs) {
250
250
  return yargs.option('explain', {
251
251
  type: 'string',
252
- describe: 'Print why each task was considered affected, instead of running anything. Needs task selection (NX_LEGACY_AFFECTED=false). Pass a file path to save the reasons as JSON instead. Pass "stdout" to print the JSON to the terminal.',
252
+ describe: 'Print why each task was considered affected, instead of running anything. Not available with affected.legacy in nx.json. Pass a file path to save the reasons as JSON instead. Pass "stdout" to print the JSON to the terminal.',
253
253
  // Same shape as `--graph`: the value is a destination, and a bare
254
254
  // `--explain` has to arrive as a boolean. `nx affected` leaves `--json`
255
255
  // undeclared so it still reaches the executor.
@@ -32,6 +32,9 @@ export interface ExecutorJsonEntryConfig {
32
32
  batchImplementation?: string;
33
33
  preferBatch?: boolean;
34
34
  description?: string;
35
+ /**
36
+ * @deprecated Use target inputs instead. This will be removed in Nx 25.
37
+ */
35
38
  hasher?: string;
36
39
  }
37
40
  export type ExecutorsJsonEntry = string | ExecutorJsonEntryConfig;
@@ -103,6 +106,12 @@ export interface MigrationsJsonEntry {
103
106
  * an outer agent or to the user.
104
107
  */
105
108
  documentation?: string;
109
+ /**
110
+ * Marks a migration that applies an optional dependency update.
111
+ * `nx migrate --include=required` skips it, and `--include=optional` runs it
112
+ * whenever `requires` is met, so it must set `requires`.
113
+ */
114
+ optionalUpdate?: boolean;
106
115
  }
107
116
  export type MigrationDetailsWithId = GeneratedMigrationDetails & {
108
117
  id: string;
@@ -143,6 +152,9 @@ export interface ExecutorConfig {
143
152
  outputCapture?: OutputCaptureMethod;
144
153
  continuous?: boolean;
145
154
  } & Schema;
155
+ /**
156
+ * @deprecated Use target inputs instead. This will be removed in Nx 25.
157
+ */
146
158
  hasherFactory?: () => CustomHasher;
147
159
  implementationFactory: () => Executor;
148
160
  batchImplementationFactory?: () => TaskGraphExecutor;
@@ -172,6 +184,9 @@ options: T, context: ExecutorContext) => AsyncIterableIterator<{
172
184
  * Implementation of a target of a project
173
185
  */
174
186
  export type Executor<T = any> = PromiseExecutor<T> | AsyncIteratorExecutor<T>;
187
+ /**
188
+ * @deprecated Use target inputs instead. This will be removed in Nx 25.
189
+ */
175
190
  export interface HasherContext {
176
191
  hasher: TaskHasher;
177
192
  projectGraph: ProjectGraph;
@@ -179,6 +194,9 @@ export interface HasherContext {
179
194
  projectsConfigurations: ProjectsConfigurations;
180
195
  nxJsonConfiguration: NxJsonConfiguration;
181
196
  }
197
+ /**
198
+ * @deprecated Use target inputs instead. This will be removed in Nx 25.
199
+ */
182
200
  export type CustomHasher = (task: Task, context: HasherContext) => Promise<Hash>;
183
201
  export type TaskResult = {
184
202
  success: boolean;
@@ -11,14 +11,17 @@ export type ImplicitDependencyEntry<T = '*' | string[]> = {
11
11
  export interface ImplicitJsonSubsetDependency<T = '*' | string[]> {
12
12
  [key: string]: T | ImplicitJsonSubsetDependency<T>;
13
13
  }
14
- /**
15
- * @deprecated Use {@link NxJsonConfiguration#defaultBase } instead
16
- */
17
14
  export interface NxAffectedConfig {
18
15
  /**
19
16
  * Default based branch used by affected commands.
17
+ * @deprecated Use {@link NxJsonConfiguration#defaultBase } instead. This will be removed in Nx 25.
20
18
  */
21
19
  defaultBase?: string;
20
+ /**
21
+ * Select every task of each affected project, instead of only the tasks
22
+ * whose inputs a change reaches. Defaults to `false`.
23
+ */
24
+ legacy?: boolean;
22
25
  }
23
26
  /**
24
27
  * A logical, flat view of a single target default — the shape devkit helpers
@@ -711,7 +714,9 @@ export interface NxSyncConfiguration {
711
714
  export interface NxMigrateConfiguration {
712
715
  /**
713
716
  * Whether to automatically create a git commit after each migration runs.
714
- * Equivalent to the `--create-commits` flag. Defaults to `false`.
717
+ * Equivalent to the `--create-commits` flag. Defaults to `true` when the
718
+ * agentic flow runs the migrations in a Git repository, and `false`
719
+ * otherwise.
715
720
  */
716
721
  createCommits?: boolean;
717
722
  /**
@@ -739,8 +744,7 @@ export interface NxMigrateConfiguration {
739
744
  /**
740
745
  * Whether `nx migrate` resolves package versions via the npm registry
741
746
  * (faster) instead of a package-manager install. The
742
- * `NX_MIGRATE_USE_REGISTRY_RESOLUTION` and legacy
743
- * `NX_MIGRATE_SKIP_REGISTRY_FETCH` env vars take precedence over this.
747
+ * `NX_MIGRATE_USE_REGISTRY_RESOLUTION` env var takes precedence over this.
744
748
  * Defaults to `true`.
745
749
  */
746
750
  useRegistryResolution?: boolean;
@@ -753,11 +757,18 @@ export interface NxMigrateConfiguration {
753
757
  */
754
758
  agentic?: boolean | AgentId;
755
759
  /**
756
- * Whether to run agent-driven validation after generator-only migrations when
757
- * the agentic flow is enabled. Equivalent to the `--validate` flag. Defaults
758
- * to `true` when the agentic flow is enabled.
760
+ * Whether the AI agent driving a migrate run reviews the changes of
761
+ * generator-only migrations. Equivalent to the `--validate` flag. Defaults to
762
+ * `true`.
759
763
  */
760
764
  validate?: boolean;
765
+ /**
766
+ * Whether a migrate run an AI agent drives ends with a final check, where the
767
+ * agent makes sure the projects the run touched still lint, build, and pass
768
+ * their unit tests. Equivalent to the `--final-validation` flag. Defaults to
769
+ * `true`.
770
+ */
771
+ finalValidation?: boolean;
761
772
  }
762
773
  /**
763
774
  * Nx.json configuration
@@ -789,7 +800,6 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
789
800
  targetDefaults?: TargetDefaults;
790
801
  /**
791
802
  * Default options for `nx affected`
792
- * @deprecated use {@link defaultBase} instead. For more information see https://nx.dev/docs/reference/nx-json#default-base
793
803
  */
794
804
  affected?: NxAffectedConfig;
795
805
  /**
@@ -903,7 +913,8 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
903
913
  */
904
914
  useDaemonProcess?: boolean;
905
915
  /**
906
- * Set this to false to disable adding inference plugins when generating new projects
916
+ * When false, `nx add` does not update package.json scripts by default and
917
+ * `nx init` uses its legacy setup. Generators always add their inference plugin.
907
918
  */
908
919
  useInferencePlugins?: boolean;
909
920
  /**
@@ -3,4 +3,4 @@
3
3
  * `packages/nx/src/native/tasks/types.rs` and exposed to TypeScript via NAPI.
4
4
  * This file re-exports them so existing imports keep working.
5
5
  */
6
- export type { Task, TaskGraph, TaskTarget, TaskHashDetails, TaskUltracacheSettings, } from '../native';
6
+ export type { Task, TaskGraph, TaskGraphEdge, TaskTarget, TaskHashDetails, TaskUltracacheSettings, } from '../native';
@@ -163,6 +163,64 @@ export type Spreadable<T> = T & {
163
163
  * permits `'...'`, which target merging resolves away.
164
164
  */
165
165
  export type TargetUltracacheSettings = Spreadable<TaskUltracacheSettings>;
166
+ export interface ReadyWhenOptions {
167
+ /**
168
+ * Milliseconds to wait for readiness before failing dependents that wait
169
+ * for it. Default is 600000 (10 minutes).
170
+ */
171
+ timeout?: number;
172
+ /**
173
+ * Milliseconds between probe attempts. Default is 250. Unused by
174
+ * `logMatches` and `signal`.
175
+ */
176
+ interval?: number;
177
+ }
178
+ /**
179
+ * Readiness probe of a continuous target. Exactly one of `url`, `port`,
180
+ * `command`, `logMatches` or `signal` must be set. Strings may use the `{workspaceRoot}`,
181
+ * `{projectRoot}`, `{projectName}`, `{options.*}` and `{env.*}` placeholders,
182
+ * resolved against the options and environment the task runs with. A
183
+ * placeholder can list fallbacks, as in `{options.port ?? env.PORT ?? 4200}`.
184
+ */
185
+ export type ReadyWhen = ({
186
+ /**
187
+ * Ready when an HTTP or HTTPS GET gets a status from 200 to 403. A
188
+ * redirect counts as ready and is not followed.
189
+ */
190
+ url: string;
191
+ } & ReadyWhenOptions) | ({
192
+ /**
193
+ * Ready when a TCP connection to the port succeeds. A string can be a
194
+ * port number, `"auto"`, or a placeholder such as `{options.port}`.
195
+ * With `0` or `"auto"` the server picks its port, so Nx runs no check
196
+ * and the target counts as ready once it starts.
197
+ */
198
+ port: number | string;
199
+ /**
200
+ * Host to connect to. By default 127.0.0.1 and ::1 are both tried.
201
+ */
202
+ host?: string;
203
+ } & ReadyWhenOptions) | ({
204
+ /**
205
+ * Ready when the command, run through the shell at the workspace root,
206
+ * exits with code 0. It runs with the env the task runs with, and the
207
+ * task's options as JSON in `NX_TASK_OPTIONS`.
208
+ */
209
+ command: string;
210
+ } & ReadyWhenOptions) | ({
211
+ /**
212
+ * Ready when every one of these substrings has appeared in the task's
213
+ * output.
214
+ */
215
+ logMatches: string | string[];
216
+ } & ReadyWhenOptions) | {
217
+ /**
218
+ * Ready when the task reports it with `emitReadySignal` from
219
+ * `@nx/devkit`.
220
+ */
221
+ signal: true;
222
+ timeout?: number;
223
+ };
166
224
  export interface TargetDependencyConfig {
167
225
  /**
168
226
  * A list of projects that have `target`.
@@ -187,22 +245,45 @@ export interface TargetDependencyConfig {
187
245
  * Whether to forward task options to the dependency target.
188
246
  */
189
247
  options?: 'ignore' | 'forward';
248
+ /**
249
+ * Set to `false` to keep a continuous dependency's inputs out of this
250
+ * target's hash. It still runs first. Has no effect on other dependencies.
251
+ */
252
+ inputs?: boolean;
253
+ /**
254
+ * When the dependency is a continuous task, whether this target waits for
255
+ * it to have started (default) or to be ready per its `readyWhen`.
256
+ * Ignored when the dependency is not continuous or declares no `readyWhen`.
257
+ */
258
+ waitFor?: 'started' | 'ready';
190
259
  }
260
+ /**
261
+ * `always`: the files the input resolves to stay in the hash even when the task
262
+ * is hashed from its ultracache recording.
263
+ * `dependencies` with `projects`: the selected projects' dependencies (as `^input`
264
+ * resolves for each), not the projects themselves.
265
+ */
191
266
  export type InputDefinition = {
192
267
  input: string;
193
268
  projects: string | string[];
269
+ dependencies?: boolean;
270
+ always?: boolean;
194
271
  } | {
195
272
  input: string;
196
273
  dependencies: true;
274
+ always?: boolean;
197
275
  } | {
198
276
  input: string;
277
+ always?: boolean;
199
278
  } | {
200
279
  fileset: string;
201
280
  includeIgnored?: boolean;
281
+ always?: boolean;
202
282
  } | {
203
283
  fileset: string;
204
284
  dependencies: true;
205
285
  includeIgnored?: boolean;
286
+ always?: boolean;
206
287
  } | {
207
288
  runtime: string;
208
289
  } | {
@@ -277,6 +358,13 @@ export interface TargetConfiguration<T = any> {
277
358
  * Whether this target runs continuously
278
359
  */
279
360
  continuous?: boolean;
361
+ /**
362
+ * How Nx detects that this continuous target is ready. Only honored when
363
+ * `continuous` is true; dependents opt in with `waitFor: 'ready'` on their
364
+ * `dependsOn` entry. `null` turns off a check inherited from a plugin or
365
+ * `targetDefaults`.
366
+ */
367
+ readyWhen?: ReadyWhen | null;
280
368
  /**
281
369
  * List of generators to run before the target to ensure the workspace
282
370
  * is up to date.