@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
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- <p style="text-align: center;">
1
+ <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Repos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo-light.svg">
4
+ <img alt="Nx Logo" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.svg" width="140">
5
5
  </picture>
6
6
  </p>
7
7
 
@@ -60,6 +60,3 @@ npx nx@latest init
60
60
  - [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
61
61
  - [Blog Posts About Nx](https://nx.dev/blog)
62
62
 
63
- <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
64
- width="100%" alt="Nx - Smart Monorepos · Fast Builds"></a></p>
65
-
package/dist/bin/nx.js CHANGED
@@ -198,13 +198,13 @@ function resolveNx(workspace) {
198
198
  const installPath = (0, installation_directory_1.getNxInstallationPath)(root);
199
199
  if ((0, fs_1.existsSync)(installPath)) {
200
200
  const installRequire = (0, module_1.createRequire)((0, path_1.join)(installPath, 'package.json'));
201
- return installRequire.resolve('@ohos-ports/nx/bin/nx.js');
201
+ return installRequire.resolve('nx/bin/nx.js');
202
202
  }
203
203
  }
204
204
  catch { }
205
205
  // check for root install
206
206
  const rootRequire = (0, module_1.createRequire)((0, path_1.join)(root, 'package.json'));
207
- return rootRequire.resolve('@ohos-ports/nx/bin/nx.js');
207
+ return rootRequire.resolve('nx/bin/nx.js');
208
208
  }
209
209
  function isNxCloudCommand(command) {
210
210
  const nxCloudCommands = [
@@ -9,6 +9,8 @@ const get_cloud_options_1 = require("../src/nx-cloud/utilities/get-cloud-options
9
9
  const nx_cloud_utils_1 = require("../src/utils/nx-cloud-utils");
10
10
  const nx_json_1 = require("../src/config/nx-json");
11
11
  const logger_1 = require("../src/utils/logger");
12
+ const package_json_1 = require("../src/utils/package-json");
13
+ const installation_directory_1 = require("../src/utils/installation-directory");
12
14
  // The post install is not critical, to avoid any chance that it may hang
13
15
  // we will kill this process after 30 seconds.
14
16
  const postinstallTimeout = setTimeout(() => {
@@ -36,9 +38,9 @@ const postinstallTimeout = setTimeout(() => {
36
38
  }
37
39
  })();
38
40
  function isMainNxPackage() {
39
- const mainNxPath = require.resolve('nx', {
40
- paths: [workspace_root_1.workspaceRoot],
41
- });
41
+ // A plain `require.resolve('nx', { paths })` self-references this package,
42
+ // so every installed nx copy would pass.
43
+ const mainNxPath = (0, package_json_1.resolveWithoutCachePollution)('nx', (0, installation_directory_1.getNxRequirePaths)(workspace_root_1.workspaceRoot));
42
44
  const thisNxPath = require.resolve('nx');
43
45
  return mainNxPath === thisNxPath;
44
46
  }
@@ -1 +1,2 @@
1
1
  export { importUltracacheConfigurations, openUltracacheConfigurations, } from './src/ultracache/store';
2
+ export declare const TASK_GRAPH_FORMAT = 2;
@@ -3,7 +3,13 @@
3
3
  // a public API. The client probes these exports to tell what this nx supports,
4
4
  // so keep them stable.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.openUltracacheConfigurations = exports.importUltracacheConfigurations = void 0;
6
+ exports.TASK_GRAPH_FORMAT = exports.openUltracacheConfigurations = exports.importUltracacheConfigurations = void 0;
7
7
  var store_1 = require("./src/ultracache/store");
8
8
  Object.defineProperty(exports, "importUltracacheConfigurations", { enumerable: true, get: function () { return store_1.importUltracacheConfigurations; } });
9
9
  Object.defineProperty(exports, "openUltracacheConfigurations", { enumerable: true, get: function () { return store_1.openUltracacheConfigurations; } });
10
+ // Nx Cloud reads it to pick the task-graph shape it hands this nx. Bump it when
11
+ // the shape changes in a way Cloud must handle.
12
+ // 1: `dependencies` and `continuousDependencies` edges are task ids (implied
13
+ // when the export is absent)
14
+ // 2: edges are objects (`{ id, waitFor?, inputs? }`)
15
+ exports.TASK_GRAPH_FORMAT = 2;
@@ -253,8 +253,7 @@ async function createRecorder(host, record, logger) {
253
253
  else if (event.kind === 'rename') {
254
254
  record.loggingQueue.push(`${pc.blue('RENAME')} ${eventPath} => ${event.to}`);
255
255
  // Surface as DELETE source + CREATE destination so downstream consumers
256
- // (e.g. the agentic validation prompt's `<files_changed>` block) see
257
- // both endpoints.
256
+ // see both endpoints.
258
257
  const toPath = event.to.startsWith('/') ? event.to.slice(1) : event.to;
259
258
  record.changes?.push({ type: 'DELETE', path: eventPath, content: null });
260
259
  record.changes?.push(emptyFileChange('CREATE', toPath));
@@ -991,6 +990,7 @@ async function getWrappedWorkspaceNodeModulesArchitectHost(workspace, root, proj
991
990
  const batchImplementationFactory = executorConfig.batchImplementation
992
991
  ? this.getImplementationFactory(executorConfig.batchImplementation, executorsDir, nodeModule)
993
992
  : null;
993
+ // TODO(v25): remove custom hasher support.
994
994
  const hasherFactory = executorConfig.hasher
995
995
  ? this.getImplementationFactory(executorConfig.hasher, executorsDir, nodeModule)
996
996
  : null;
@@ -7,18 +7,59 @@ const os_1 = require("os");
7
7
  const path_1 = require("path");
8
8
  const REPO_URL = 'https://github.com/nrwl/nx-ai-agents-config';
9
9
  const CACHE_DIR = (0, path_1.join)((0, os_1.tmpdir)(), 'nx-ai-agents-config');
10
+ // `git rev-parse --local-env-vars`, plus GIT_NAMESPACE and the indexed
11
+ // GIT_CONFIG_KEY_<n> / GIT_CONFIG_VALUE_<n> pairs. Hooks export GIT_INDEX_FILE;
12
+ // inheriting it makes `git clone` rewrite the caller's index.
13
+ const GIT_LOCAL_REPO_ENV_VARS = new Set([
14
+ 'GIT_ALTERNATE_OBJECT_DIRECTORIES',
15
+ 'GIT_COMMON_DIR',
16
+ 'GIT_CONFIG',
17
+ 'GIT_CONFIG_COUNT',
18
+ 'GIT_CONFIG_PARAMETERS',
19
+ 'GIT_DIR',
20
+ 'GIT_GRAFT_FILE',
21
+ 'GIT_IMPLICIT_WORK_TREE',
22
+ 'GIT_INDEX_FILE',
23
+ 'GIT_NAMESPACE',
24
+ 'GIT_NO_REPLACE_OBJECTS',
25
+ 'GIT_OBJECT_DIRECTORY',
26
+ 'GIT_PREFIX',
27
+ 'GIT_REPLACE_REF_BASE',
28
+ 'GIT_SHALLOW_FILE',
29
+ 'GIT_WORK_TREE',
30
+ ]);
31
+ function isGitLocalRepoEnvVar(key) {
32
+ const upper = key.toUpperCase();
33
+ return (GIT_LOCAL_REPO_ENV_VARS.has(upper) ||
34
+ upper.startsWith('GIT_CONFIG_KEY_') ||
35
+ upper.startsWith('GIT_CONFIG_VALUE_'));
36
+ }
37
+ function environmentWithoutGitLocalRepoVars() {
38
+ const env = { ...process.env };
39
+ for (const key of Object.keys(env)) {
40
+ if (isGitLocalRepoEnvVar(key)) {
41
+ delete env[key];
42
+ }
43
+ }
44
+ return env;
45
+ }
46
+ function execGitWithoutLocalRepoEnv(command, timeout) {
47
+ return (0, child_process_1.execSync)(command, {
48
+ encoding: 'utf-8',
49
+ env: environmentWithoutGitLocalRepoVars(),
50
+ stdio: ['pipe', 'pipe', 'pipe'],
51
+ timeout,
52
+ windowsHide: true,
53
+ });
54
+ }
10
55
  /**
11
56
  * Get the latest commit hash from the remote repository.
12
57
  * Uses `git ls-remote` to fetch the HEAD commit hash without cloning.
13
58
  */
14
59
  function getLatestCommitHash() {
15
60
  try {
16
- const output = (0, child_process_1.execSync)(`git ls-remote ${REPO_URL} HEAD`, {
17
- encoding: 'utf-8',
18
- stdio: ['pipe', 'pipe', 'pipe'],
19
- timeout: 30000, // 30 second timeout
20
- windowsHide: true,
21
- });
61
+ const output = execGitWithoutLocalRepoEnv(`git ls-remote ${REPO_URL} HEAD`, 30000 // 30 second timeout
62
+ );
22
63
  const hash = output.split('\t')[0];
23
64
  if (!hash || hash.length < 10) {
24
65
  throw new Error('Invalid commit hash received');
@@ -43,12 +84,8 @@ function cloneRepo(targetPath) {
43
84
  if ((0, fs_1.existsSync)(tempPath)) {
44
85
  (0, fs_1.rmSync)(tempPath, { recursive: true, force: true });
45
86
  }
46
- (0, child_process_1.execSync)(`git clone --depth 1 ${REPO_URL} "${tempPath}"`, {
47
- encoding: 'utf-8',
48
- stdio: ['pipe', 'pipe', 'pipe'],
49
- timeout: 120000, // 2 minute timeout for clone
50
- windowsHide: true,
51
- });
87
+ execGitWithoutLocalRepoEnv(`git clone --depth 1 ${REPO_URL} "${tempPath}"`, 120000 // 2 minute timeout for clone
88
+ );
52
89
  // Remove .git directory after clone
53
90
  const gitDir = (0, path_1.join)(tempPath, '.git');
54
91
  if ((0, fs_1.existsSync)(gitDir)) {
@@ -1,3 +1,5 @@
1
+ import { type NxJsonConfiguration } from '../../config/nx-json';
1
2
  import type { AddOptions } from './command-object';
2
3
  export declare function addHandler(options: AddOptions): Promise<number>;
4
+ export declare function installPackage(pkgName: string, version: string, nxJson: NxJsonConfiguration): Promise<void>;
3
5
  export declare const coreNxPluginVersions: Map<string, string>;
@@ -2,14 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.coreNxPluginVersions = void 0;
4
4
  exports.addHandler = addHandler;
5
+ exports.installPackage = installPackage;
5
6
  const child_process_1 = require("child_process");
6
7
  const fs_1 = require("fs");
8
+ const path_1 = require("path");
7
9
  const nx_json_1 = require("../../config/nx-json");
8
10
  const child_process_2 = require("../../utils/child-process");
9
11
  const fileutils_1 = require("../../utils/fileutils");
10
12
  const logger_1 = require("../../utils/logger");
11
13
  const output_1 = require("../../utils/output");
12
14
  const package_manager_1 = require("../../utils/package-manager");
15
+ const acknowledge_build_scripts_1 = require("../../utils/acknowledge-build-scripts");
13
16
  const handle_errors_1 = require("../../utils/handle-errors");
14
17
  const versions_1 = require("../../utils/versions");
15
18
  const workspace_root_1 = require("../../utils/workspace-root");
@@ -48,13 +51,19 @@ async function installPackage(pkgName, version, nxJson) {
48
51
  : `${pmc.addDev} ${pkgName}@${version}`;
49
52
  // pnpm 11+ fails the install when the plugin's own dependency tree
50
53
  // carries unacknowledged build scripts, and the plugin's generators can
51
- // only record allowBuilds decisions after this install. Warn and skip
52
- // for this one install, like pnpm 10 did. pnpm 12 gave `--config` a
53
- // meaning of its own and takes the setting from the environment instead.
54
+ // only record allowBuilds decisions after this install. A plugin that
55
+ // declares them in its package.json keeps the install strict; otherwise
56
+ // warn and skip for this one install, like pnpm 10 did. pnpm 12 gave
57
+ // `--config` a meaning of its own and takes the setting from the
58
+ // environment instead.
54
59
  const env = { ...process.env };
60
+ let restorePnpmWorkspace;
55
61
  if (pm === 'pnpm' && (0, semver_1.gte)(pmv, '11.0.0')) {
56
- command += ' --config.strictDepBuilds=false';
57
- env.PNPM_CONFIG_STRICT_DEP_BUILDS = 'false';
62
+ restorePnpmWorkspace = snapshotFile((0, path_1.join)(workspace_root_1.workspaceRoot, 'pnpm-workspace.yaml'));
63
+ if (!(await (0, acknowledge_build_scripts_1.acknowledgeDeclaredBuildScripts)(workspace_root_1.workspaceRoot, pm, pkgName, version))) {
64
+ command += ' --config.strictDepBuilds=false';
65
+ env.PNPM_CONFIG_STRICT_DEP_BUILDS = 'false';
66
+ }
58
67
  }
59
68
  await new Promise((resolve) => (0, child_process_1.exec)(command, {
60
69
  windowsHide: true,
@@ -70,6 +79,9 @@ async function installPackage(pkgName, version, nxJson) {
70
79
  output_1.output.error({
71
80
  title: `Failed to install ${pkgName}. Please check the error above for more details.`,
72
81
  });
82
+ // The decisions the plugin declared were recorded for a plugin
83
+ // that never installed; put the file back.
84
+ restorePnpmWorkspace?.();
73
85
  process.exit(1);
74
86
  }
75
87
  return resolve();
@@ -97,6 +109,12 @@ async function installPackage(pkgName, version, nxJson) {
97
109
  }
98
110
  spinner.succeed();
99
111
  }
112
+ function snapshotFile(path) {
113
+ const before = (0, fs_1.existsSync)(path) ? (0, fs_1.readFileSync)(path, 'utf-8') : null;
114
+ return () => before === null
115
+ ? (0, fs_1.rmSync)(path, { force: true })
116
+ : (0, fs_1.writeFileSync)(path, before);
117
+ }
100
118
  async function initializePlugin(pkgName, options, nxJson) {
101
119
  let updatePackageScripts = false;
102
120
  if (exports.coreNxPluginVersions.has(pkgName) &&
@@ -30,12 +30,12 @@ async function affected(command, args, extraTargetDependencies = {}, extraOption
30
30
  await (0, connect_to_nx_cloud_1.connectToNxCloudIfExplicitlyAsked)(nxArgs);
31
31
  // Task selection needs a target to select against, so `nx graph --affected`
32
32
  // and the deprecated print-affected stay project-grained.
33
- const useTasks = (0, affected_tasks_1.selectsAffectedTasks)() &&
33
+ const useTasks = (0, affected_tasks_1.selectsAffectedTasks)(nxJson) &&
34
34
  command === 'affected' &&
35
35
  !!nxArgs.targets?.length;
36
36
  if ((0, affected_reasons_1.isExplaining)(nxArgs.explain) && !useTasks) {
37
37
  throw new Error((0, affected_reasons_1.explainUnavailable)([
38
- !(0, affected_tasks_1.selectsAffectedTasks)() && 'NX_LEGACY_AFFECTED=false',
38
+ !(0, affected_tasks_1.selectsAffectedTasks)(nxJson) && (0, affected_tasks_1.taskGranularityRequirement)(),
39
39
  !nxArgs.targets?.length && 'targets passed with --targets (-t)',
40
40
  ].filter(Boolean)));
41
41
  }
@@ -64,18 +64,6 @@ async function configureAiAgentsHandler(args, inner = false) {
64
64
  await resetDaemonAgentStatus();
65
65
  }
66
66
  async function configureAiAgentsHandlerImpl(options) {
67
- // Node 24's stricter readline throws ERR_USE_AFTER_CLOSE when a prompt
68
- // library operates on a closed interface. Added for enquirer, which nx no
69
- // longer uses; verify against Node 24 before removing.
70
- // TODO(v24): drop if @clack/prompts proves not to need it.
71
- process.on('uncaughtException', (error) => {
72
- if (error &&
73
- typeof error === 'object' &&
74
- 'code' in error &&
75
- error['code'] === 'ERR_USE_AFTER_CLOSE')
76
- return;
77
- throw error;
78
- });
79
67
  const normalizedOptions = normalizeOptions(options);
80
68
  const { nonConfiguredAgents, partiallyConfiguredAgents, fullyConfiguredAgents, disabledAgents, } = await (0, utils_1.getAgentConfigurations)(normalizedOptions.agents, workspace_root_1.workspaceRoot);
81
69
  if (disabledAgents.length > 0) {
@@ -39,6 +39,8 @@ const create_task_hasher_1 = require("../../hasher/create-task-hasher");
39
39
  const task_env_1 = require("../../tasks-runner/task-env");
40
40
  const error_types_1 = require("../../project-graph/error-types");
41
41
  const nx_cloud_utils_1 = require("../../utils/nx-cloud-utils");
42
+ const ci_status_1 = require("../../ultracache/ci-status");
43
+ const utils_2 = require("../show/show-target/utils");
42
44
  const split_target_1 = require("../../utils/split-target");
43
45
  // maps file extention to MIME types
44
46
  const mimeType = {
@@ -372,11 +374,9 @@ async function generateGraph(args, affectedProjects) {
372
374
  title: `Project graph started at ${url.toString()}`,
373
375
  });
374
376
  if (args.open) {
375
- new Function('return import("open")')()
376
- .then((m) => m.default(url.toString()))
377
- .catch(() => {
378
- // Ignore errors when opening browser (e.g. no browser available)
379
- });
377
+ // Best-effort: openUrl never throws, returning false if no opener could be
378
+ // spawned. The URL is printed above, so a failure is silent.
379
+ (0, native_1.openUrl)(url.toString());
380
380
  }
381
381
  return new Promise((res) => {
382
382
  app.once('close', res);
@@ -614,7 +614,7 @@ function createProjectGraphListener() {
614
614
  fileName: e.file ?? e.cause?.errors?.[0]?.location?.file,
615
615
  }));
616
616
  }
617
- const { projectGraphClientResponse, sourceMapResponse } = transformProjectGraphToClientResponse(projectGraph, sourceMaps, errors, currentProjectGraphClientResponse.affected, isFilteredGraph ? currentProjectGraphClientResponse.focus : null, isFilteredGraph ? currentProjectGraphClientResponse.exclude : []);
617
+ const { projectGraphClientResponse, sourceMapResponse } = transformProjectGraphToClientResponse(projectGraph, sourceMaps, errors, currentProjectGraphClientResponse.affected, isFilteredGraph ? currentProjectGraphClientResponse.focus : null, isFilteredGraph ? currentProjectGraphClientResponse.exclude : [], await (0, ci_status_1.isUltracacheOnInCI)((0, configuration_1.readNxJson)()));
618
618
  if (projectGraphClientResponse.hash !==
619
619
  currentProjectGraphClientResponse.hash &&
620
620
  sourceMapResponse) {
@@ -643,14 +643,41 @@ function createProjectGraphListener() {
643
643
  }
644
644
  }, 500));
645
645
  }
646
- function transformProjectGraphToClientResponse(projectGraph, sourceMaps, errors, affected = [], focus = null, exclude = []) {
646
+ /** The graph's nodes, with `ultracacheInCI` set to each target's Ultracache mode in CI. */
647
+ function markTargetsHashedFromUltracacheInCI(graph) {
648
+ return Object.values(graph.nodes).map((node) => {
649
+ const targets = Object.entries(node.data.targets ?? {});
650
+ const modes = new Map(targets.flatMap(([name, target]) => {
651
+ const mode = (0, ci_status_1.ultracacheModeInCI)(target, (0, utils_2.hasCustomHasher)(node.name, name, graph));
652
+ return mode ? [[name, mode]] : [];
653
+ }));
654
+ if (!modes.size) {
655
+ return node;
656
+ }
657
+ return {
658
+ ...node,
659
+ data: {
660
+ ...node.data,
661
+ targets: Object.fromEntries(targets.map(([name, target]) => [
662
+ name,
663
+ modes.has(name)
664
+ ? { ...target, ultracacheInCI: modes.get(name) }
665
+ : target,
666
+ ])),
667
+ },
668
+ };
669
+ });
670
+ }
671
+ function transformProjectGraphToClientResponse(projectGraph, sourceMaps, errors, affected = [], focus = null, exclude = [], ultracacheOnInCI = false) {
647
672
  node_perf_hooks_1.performance.mark('project graph transform:start');
648
673
  let graph = (0, operators_1.pruneExternalNodes)(projectGraph);
649
674
  // Apply focus and exclude filters
650
675
  graph = filterGraph(graph, focus, exclude);
651
676
  const fileMap = (0, nx_deps_cache_1.readFileMapCache)()?.fileMap.projectFileMap || {};
652
677
  const layout = (0, configuration_1.workspaceLayout)();
653
- const projects = Object.values(graph.nodes);
678
+ const projects = ultracacheOnInCI
679
+ ? markTargetsHashedFromUltracacheInCI(graph)
680
+ : Object.values(graph.nodes);
654
681
  const dependencies = graph.dependencies;
655
682
  const nxJson = (0, configuration_1.readNxJson)();
656
683
  const connectedToCloud = (0, nx_cloud_utils_1.isNxCloudUsed)(nxJson);
@@ -713,7 +740,7 @@ async function createProjectGraphAndSourceMapClientResponse(affected = [], focus
713
740
  }
714
741
  node_perf_hooks_1.performance.mark('project graph watch calculation:end');
715
742
  node_perf_hooks_1.performance.mark('project graph response generation:start');
716
- let { projectGraphClientResponse, sourceMapResponse } = transformProjectGraphToClientResponse(projectGraph, sourceMaps, errors, affected, focus, exclude);
743
+ let { projectGraphClientResponse, sourceMapResponse } = transformProjectGraphToClientResponse(projectGraph, sourceMaps, errors, affected, focus, exclude, await (0, ci_status_1.isUltracacheOnInCI)((0, configuration_1.readNxJson)()));
717
744
  node_perf_hooks_1.performance.mark('project graph response generation:end');
718
745
  node_perf_hooks_1.performance.measure('project graph watch calculation', 'project graph watch calculation:start', 'project graph watch calculation:end');
719
746
  node_perf_hooks_1.performance.measure('project graph response generation', 'project graph response generation:start', 'project graph response generation:end');
@@ -969,7 +996,8 @@ function expandInputs(inputs, project, allWorkspaceFiles, depGraphClientResponse
969
996
  }
970
997
  });
971
998
  const workspaceRootsExpanded = getExpandedWorkspaceRoots(workspaceRootInputs, allWorkspaceFiles);
972
- const filesExpanded = filesInputs.flatMap((globs) => (0, native_1.expandFilesInput)(workspace_root_1.workspaceRoot, globs));
999
+ const projectRoots = depGraphClientResponse.projects.map((p) => p.data.root);
1000
+ const filesExpanded = filesInputs.flatMap((globs) => (0, native_1.expandFilesInput)(workspace_root_1.workspaceRoot, globs, projectRoots));
973
1001
  const otherInputsExpanded = otherInputs.map((input) => {
974
1002
  if (input === 'TsConfig') {
975
1003
  return (0, node_path_1.relative)(workspace_root_1.workspaceRoot, (0, typescript_1.getRootTsConfigPath)());
@@ -17,18 +17,6 @@ exports.yargsInitCommand = {
17
17
  return withInitOptions(yargs);
18
18
  },
19
19
  handler: async (args) => {
20
- // Node 24's stricter readline throws ERR_USE_AFTER_CLOSE when a prompt
21
- // library operates on a closed interface. Added for enquirer, which nx no
22
- // longer uses; verify against Node 24 before removing.
23
- // TODO(v24): drop if @clack/prompts proves not to need it.
24
- process.on('uncaughtException', (error) => {
25
- if (error &&
26
- typeof error === 'object' &&
27
- 'code' in error &&
28
- error['code'] === 'ERR_USE_AFTER_CLOSE')
29
- return;
30
- throw error;
31
- });
32
20
  const useV2 = await isInitV2();
33
21
  if (useV2) {
34
22
  await require('./init-v2').initHandler(args);
@@ -120,61 +120,28 @@ function createProjectJson(repoRoot, packageJson, nestCLIOptions) {
120
120
  buildTarget: `${packageName}:build`,
121
121
  },
122
122
  };
123
- if (nestCLIOptions.webpackOptions) {
124
- json.targets['build'] = {
125
- executor: '@nx/webpack:webpack',
126
- outputs: ['{options.outputPath}'],
127
- options: {
128
- target: 'node',
129
- compiler: 'tsc',
130
- outputPath: `dist/${packageName}`,
131
- main: (0, path_1.join)(nestCLIOptions.sourceRoot, nestCLIOptions.entryFile),
132
- tsConfig: 'tsconfig.build.json',
133
- },
134
- configurations: {
135
- production: {
136
- optimization: true,
137
- extractLicenses: true,
138
- inspect: false,
139
- },
140
- },
141
- };
142
- json.targets['serve'] = {
143
- ...json.targets['serve'],
144
- configurations: {
145
- production: {
146
- buildTarget: `${packageName}:build:production`,
147
- },
148
- },
149
- };
150
- }
151
- else {
152
- json.targets['build'] = {
153
- executor: '@nx/js:tsc',
154
- outputs: ['{options.outputPath}'],
155
- options: {
156
- outputPath: `dist/${packageName}`,
157
- main: (0, path_1.join)(nestCLIOptions.sourceRoot, nestCLIOptions.entryFile),
158
- tsConfig: 'tsconfig.build.json',
159
- },
160
- };
161
- json.targets['serve'] = {
162
- ...json.targets['serve'],
163
- configurations: {
164
- debug: {
165
- inspect: 'inspect',
166
- },
123
+ json.targets['build'] = {
124
+ executor: '@nx/js:tsc',
125
+ outputs: ['{options.outputPath}'],
126
+ options: {
127
+ outputPath: `dist/${packageName}`,
128
+ main: (0, path_1.join)(nestCLIOptions.sourceRoot, nestCLIOptions.entryFile),
129
+ tsConfig: 'tsconfig.build.json',
130
+ },
131
+ };
132
+ json.targets['serve'] = {
133
+ ...json.targets['serve'],
134
+ configurations: {
135
+ debug: {
136
+ inspect: 'inspect',
167
137
  },
168
- };
169
- // if we're using nrwl/js, then we add nrwl/js analyzeSourceFiles to nx.json
170
- addNrwlJsPluginsConfig(repoRoot);
171
- }
138
+ },
139
+ };
140
+ // if we're using nrwl/js, then we add nrwl/js analyzeSourceFiles to nx.json
141
+ addNrwlJsPluginsConfig(repoRoot);
172
142
  // lint
173
143
  json.targets['lint'] = {
174
- executor: '@nx/eslint:lint',
175
- options: {
176
- lintFilePatterns: ['./src', './test'],
177
- },
144
+ command: 'eslint ./src ./test',
178
145
  };
179
146
  // test and e2e
180
147
  addJestTargets(repoRoot, packageName, json, packageJson);
@@ -236,19 +203,11 @@ function addJestTargets(repoRoot, packageName, projectJson, packageJson) {
236
203
  (0, node_fs_1.writeFileSync)(e2eTestConfigPath, `export default ${JSON.stringify(e2eTestOptions, null, 2)}`, 'utf8');
237
204
  (0, format_1.recordInitWrite)(e2eTestConfigPath);
238
205
  projectJson.targets['test'] = {
239
- executor: '@nx/jest:jest',
206
+ command: `jest --config ${unitTestConfigPath} --passWithNoTests`,
240
207
  outputs: [`{workspaceRoot}/coverage/${packageName}`],
241
- options: {
242
- passWithNoTests: true,
243
- jestConfig: unitTestConfigPath,
244
- },
245
208
  };
246
209
  projectJson.targets['e2e'] = {
247
- executor: '@nx/jest:jest',
248
- options: {
249
- passWithNoTests: true,
250
- jestConfig: e2eTestConfigPath,
251
- },
210
+ command: `jest --config ${e2eTestConfigPath} --passWithNoTests`,
252
211
  };
253
212
  // remove jest options from package.json
254
213
  delete packageJson['jest'];
@@ -442,7 +442,6 @@ function getPluginReason(plugin) {
442
442
  '@nx/next': 'next.js detected in dependencies',
443
443
  '@nx/nuxt': 'nuxt detected in dependencies',
444
444
  '@nx/react-native': 'react-native detected in dependencies',
445
- '@nx/remix': '@remix-run/dev detected in dependencies',
446
445
  '@nx/rsbuild': '@rsbuild/core detected in dependencies',
447
446
  '@nx/react': '@react-router/dev detected in dependencies',
448
447
  '@nx/gradle': 'gradlew detected in workspace',
@@ -493,7 +492,6 @@ const npmPackageToPluginMap = {
493
492
  next: '@nx/next',
494
493
  nuxt: '@nx/nuxt',
495
494
  'react-native': '@nx/react-native',
496
- '@remix-run/dev': '@nx/remix',
497
495
  '@rsbuild/core': '@nx/rsbuild',
498
496
  '@react-router/dev': '@nx/react',
499
497
  };
@@ -18,4 +18,4 @@ export declare function waitForExit(child: ChildProcess): Promise<ExitInfo>;
18
18
  * orphan the agent. `taskkill` failures are swallowed.
19
19
  */
20
20
  export declare function closeAgentSession(child: ChildProcess, exitPromise: Promise<ExitInfo>, gracefulExitMs: number, forceKillWaitMs: number): Promise<void>;
21
- export declare function raceWithTimeout(promise: Promise<unknown>, timeoutMs: number): Promise<void>;
21
+ export declare function raceWithTimeout(promise: Promise<unknown>, timeoutMs: number): Promise<boolean>;
@@ -109,13 +109,14 @@ async function forceKillWindowsTree(child, exitPromise, forceKillWaitMs) {
109
109
  }
110
110
  await raceWithTimeout(exitPromise, forceKillWaitMs);
111
111
  }
112
+ // True when `promise` resolves before the timeout.
112
113
  async function raceWithTimeout(promise, timeoutMs) {
113
114
  let timer;
114
115
  try {
115
- await Promise.race([
116
- promise,
116
+ return await Promise.race([
117
+ promise.then(() => true),
117
118
  new Promise((resolve) => {
118
- timer = setTimeout(resolve, timeoutMs);
119
+ timer = setTimeout(() => resolve(false), timeoutMs);
119
120
  }),
120
121
  ]);
121
122
  }
@@ -1,4 +1,4 @@
1
- import { AgentDefinition, AgentId } from './types';
1
+ import { AgentDefinition } from './types';
2
2
  /**
3
3
  * Pre-authorizes the handoff write. Claude Code's default permission mode
4
4
  * asks before a file write it has no allow rule for, so without this every
@@ -24,7 +24,5 @@ export declare const claudeCodeDefinition: AgentDefinition;
24
24
  * back before it reaches the command line.
25
25
  */
26
26
  export declare function encodeTomlString(value: string): string;
27
- export declare const codexDefinition: AgentDefinition;
28
27
  export declare const opencodeDefinition: AgentDefinition;
29
28
  export declare const AGENT_DEFINITIONS: readonly AgentDefinition[];
30
- export declare function getAgentDefinition(id: AgentId): AgentDefinition | undefined;