@ohos-ports/nx 23.2.1-beta.0 → 23.3.0-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 (1428) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +60 -13
  3. package/dist/bin/init-local.d.ts +8 -0
  4. package/dist/bin/init-local.js +192 -0
  5. package/dist/bin/nx-cloud.d.ts +3 -0
  6. package/dist/bin/nx-cloud.js +47 -0
  7. package/dist/bin/nx.d.ts +3 -0
  8. package/dist/bin/nx.js +341 -0
  9. package/dist/bin/post-install.d.ts +1 -0
  10. package/dist/bin/post-install.js +52 -0
  11. package/dist/bin/run-executor.d.ts +1 -0
  12. package/dist/bin/run-executor.js +66 -0
  13. package/dist/nx-cloud-internals.d.ts +1 -0
  14. package/dist/nx-cloud-internals.js +9 -0
  15. package/dist/plugins/package-json.d.ts +4 -0
  16. package/dist/plugins/package-json.js +40 -0
  17. package/dist/presets/core.json +1 -0
  18. package/dist/presets/npm.json +7 -0
  19. package/dist/release/changelog-renderer/index.d.ts +114 -0
  20. package/dist/release/changelog-renderer/index.js +397 -0
  21. package/dist/release/index.d.ts +4 -0
  22. package/dist/release/index.js +13 -0
  23. package/dist/src/adapter/angular-json.d.ts +10 -0
  24. package/dist/src/adapter/angular-json.js +129 -0
  25. package/dist/src/adapter/compat.d.ts +2 -0
  26. package/dist/src/adapter/compat.js +154 -0
  27. package/dist/src/adapter/ngcli-adapter.d.ts +105 -0
  28. package/dist/src/adapter/ngcli-adapter.js +1083 -0
  29. package/dist/src/adapter/rxjs-for-await.d.ts +109 -0
  30. package/dist/src/adapter/rxjs-for-await.js +362 -0
  31. package/dist/src/ai/clone-ai-config-repo.d.ts +11 -0
  32. package/dist/src/ai/clone-ai-config-repo.js +155 -0
  33. package/dist/src/ai/configure-ai-agents-disclaimer.d.ts +5 -0
  34. package/dist/src/ai/configure-ai-agents-disclaimer.js +31 -0
  35. package/dist/src/ai/constants.d.ts +46 -0
  36. package/dist/src/ai/constants.js +92 -0
  37. package/dist/src/ai/detect-ai-agent.d.ts +2 -0
  38. package/dist/src/ai/detect-ai-agent.js +12 -0
  39. package/dist/src/ai/set-up-ai-agents/get-agent-rules.d.ts +5 -0
  40. package/dist/src/ai/set-up-ai-agents/get-agent-rules.js +26 -0
  41. package/dist/src/ai/set-up-ai-agents/schema.d.ts +11 -0
  42. package/dist/src/ai/set-up-ai-agents/schema.json +34 -0
  43. package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts +10 -0
  44. package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +578 -0
  45. package/dist/src/ai/utils.d.ts +33 -0
  46. package/dist/src/ai/utils.js +246 -0
  47. package/dist/src/analytics/analytics.d.ts +16 -0
  48. package/dist/src/analytics/analytics.js +246 -0
  49. package/dist/src/analytics/index.d.ts +1 -0
  50. package/dist/src/analytics/index.js +12 -0
  51. package/dist/src/command-line/add/add.d.ts +3 -0
  52. package/dist/src/command-line/add/add.js +142 -0
  53. package/dist/src/command-line/add/command-object.d.ts +8 -0
  54. package/dist/src/command-line/add/command-object.js +28 -0
  55. package/dist/src/command-line/add/completion.d.ts +1 -0
  56. package/dist/src/command-line/add/completion.js +15 -0
  57. package/dist/src/command-line/affected/affected.d.ts +10 -0
  58. package/dist/src/command-line/affected/affected.js +151 -0
  59. package/dist/src/command-line/affected/command-object.d.ts +6 -0
  60. package/dist/src/command-line/affected/command-object.js +83 -0
  61. package/dist/src/command-line/affected/completion.d.ts +1 -0
  62. package/dist/src/command-line/affected/completion.js +15 -0
  63. package/dist/src/command-line/ai/ai-output.d.ts +46 -0
  64. package/dist/src/command-line/ai/ai-output.js +86 -0
  65. package/dist/src/command-line/completion/argv-layout.d.ts +6 -0
  66. package/dist/src/command-line/completion/argv-layout.js +19 -0
  67. package/dist/src/command-line/completion/command-completions.d.ts +19 -0
  68. package/dist/src/command-line/completion/command-completions.js +120 -0
  69. package/dist/src/command-line/completion/command-handlers.d.ts +30 -0
  70. package/dist/src/command-line/completion/command-handlers.js +69 -0
  71. package/dist/src/command-line/completion/command-object.d.ts +10 -0
  72. package/dist/src/command-line/completion/command-object.js +102 -0
  73. package/dist/src/command-line/completion/completion-providers.d.ts +21 -0
  74. package/dist/src/command-line/completion/completion-providers.js +194 -0
  75. package/dist/src/command-line/completion/infix-targets.d.ts +1 -0
  76. package/dist/src/command-line/completion/infix-targets.js +48 -0
  77. package/dist/src/command-line/completion/metadata.d.ts +22 -0
  78. package/dist/src/command-line/completion/metadata.js +71 -0
  79. package/dist/src/command-line/completion/registrations.d.ts +9 -0
  80. package/dist/src/command-line/completion/registrations.js +16 -0
  81. package/dist/src/command-line/completion/scripts/bash.sh +51 -0
  82. package/dist/src/command-line/completion/scripts/fish.fish +47 -0
  83. package/dist/src/command-line/completion/scripts/powershell.ps1 +52 -0
  84. package/dist/src/command-line/completion/scripts/zsh.zsh +69 -0
  85. package/dist/src/command-line/completion/scripts.d.ts +18 -0
  86. package/dist/src/command-line/completion/scripts.js +140 -0
  87. package/dist/src/command-line/completion/trigger.d.ts +3 -0
  88. package/dist/src/command-line/completion/trigger.js +21 -0
  89. package/dist/src/command-line/completion/value-completions.d.ts +3 -0
  90. package/dist/src/command-line/completion/value-completions.js +21 -0
  91. package/dist/src/command-line/configure-ai-agents/command-object.d.ts +8 -0
  92. package/dist/src/command-line/configure-ai-agents/command-object.js +59 -0
  93. package/dist/src/command-line/configure-ai-agents/configure-ai-agents.d.ts +3 -0
  94. package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +436 -0
  95. package/dist/src/command-line/daemon/command-object.d.ts +3 -0
  96. package/dist/src/command-line/daemon/command-object.js +29 -0
  97. package/dist/src/command-line/daemon/daemon.d.ts +2 -0
  98. package/dist/src/command-line/daemon/daemon.js +31 -0
  99. package/dist/src/command-line/deprecated/command-objects.d.ts +9 -0
  100. package/dist/src/command-line/deprecated/command-objects.js +48 -0
  101. package/dist/src/command-line/examples.d.ts +12 -0
  102. package/dist/src/command-line/examples.js +403 -0
  103. package/dist/src/command-line/exec/command-object.d.ts +2 -0
  104. package/dist/src/command-line/exec/command-object.js +20 -0
  105. package/dist/src/command-line/exec/exec.d.ts +1 -0
  106. package/dist/src/command-line/exec/exec.js +143 -0
  107. package/dist/src/command-line/format/command-object.d.ts +3 -0
  108. package/dist/src/command-line/format/command-object.js +58 -0
  109. package/dist/src/command-line/format/format.d.ts +2 -0
  110. package/dist/src/command-line/format/format.js +200 -0
  111. package/dist/src/command-line/generate/command-object.d.ts +2 -0
  112. package/dist/src/command-line/generate/command-object.js +67 -0
  113. package/dist/src/command-line/generate/completion.d.ts +1 -0
  114. package/dist/src/command-line/generate/completion.js +9 -0
  115. package/dist/src/command-line/generate/generate.d.ts +21 -0
  116. package/dist/src/command-line/generate/generate.js +281 -0
  117. package/dist/src/command-line/generate/generator-utils.d.ts +18 -0
  118. package/dist/src/command-line/generate/generator-utils.js +91 -0
  119. package/dist/src/command-line/graph/command-object.d.ts +25 -0
  120. package/dist/src/command-line/graph/command-object.js +76 -0
  121. package/dist/src/command-line/graph/completion.d.ts +1 -0
  122. package/dist/src/command-line/graph/completion.js +13 -0
  123. package/dist/src/command-line/graph/graph.d.ts +101 -0
  124. package/dist/src/command-line/graph/graph.js +1080 -0
  125. package/dist/src/command-line/import/command-object.d.ts +2 -0
  126. package/dist/src/command-line/import/command-object.js +63 -0
  127. package/dist/src/command-line/import/import.d.ts +26 -0
  128. package/dist/src/command-line/import/import.js +590 -0
  129. package/dist/src/command-line/import/utils/ai-output.d.ts +93 -0
  130. package/dist/src/command-line/import/utils/ai-output.js +209 -0
  131. package/dist/src/command-line/import/utils/merge-remote-source.d.ts +2 -0
  132. package/dist/src/command-line/import/utils/merge-remote-source.js +14 -0
  133. package/dist/src/command-line/import/utils/prepare-source-repo.d.ts +2 -0
  134. package/dist/src/command-line/import/utils/prepare-source-repo.js +27 -0
  135. package/dist/src/command-line/index.d.ts +22 -0
  136. package/dist/src/command-line/index.js +26 -0
  137. package/dist/src/command-line/init/ai-agent-prompts.d.ts +2 -0
  138. package/dist/src/command-line/init/ai-agent-prompts.js +30 -0
  139. package/dist/src/command-line/init/command-object.d.ts +2 -0
  140. package/dist/src/command-line/init/command-object.js +118 -0
  141. package/dist/src/command-line/init/configure-plugins.d.ts +34 -0
  142. package/dist/src/command-line/init/configure-plugins.js +214 -0
  143. package/dist/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +6 -0
  144. package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +119 -0
  145. package/dist/src/command-line/init/implementation/add-nx-to-nest.d.ts +5 -0
  146. package/dist/src/command-line/init/implementation/add-nx-to-nest.js +350 -0
  147. package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +6 -0
  148. package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +67 -0
  149. package/dist/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
  150. package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +37 -0
  151. package/dist/src/command-line/init/implementation/angular/index.d.ts +2 -0
  152. package/dist/src/command-line/init/implementation/angular/index.js +127 -0
  153. package/dist/src/command-line/init/implementation/angular/integrated-workspace.d.ts +1 -0
  154. package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +9 -0
  155. package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts +2 -0
  156. package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +152 -0
  157. package/dist/src/command-line/init/implementation/angular/standalone-workspace.d.ts +1 -0
  158. package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +204 -0
  159. package/dist/src/command-line/init/implementation/angular/types.d.ts +20 -0
  160. package/dist/src/command-line/init/implementation/angular/types.js +2 -0
  161. package/dist/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +15 -0
  162. package/dist/src/command-line/init/implementation/check-compatible-with-plugins.js +136 -0
  163. package/dist/src/command-line/init/implementation/deduce-default-base.d.ts +1 -0
  164. package/dist/src/command-line/init/implementation/deduce-default-base.js +53 -0
  165. package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +11 -0
  166. package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +151 -0
  167. package/dist/src/command-line/init/implementation/dot-nx/nxw.d.ts +1 -0
  168. package/dist/src/command-line/init/implementation/dot-nx/nxw.js +123 -0
  169. package/dist/src/command-line/init/implementation/format.d.ts +18 -0
  170. package/dist/src/command-line/init/implementation/format.js +113 -0
  171. package/dist/src/command-line/init/implementation/utils.d.ts +34 -0
  172. package/dist/src/command-line/init/implementation/utils.js +419 -0
  173. package/dist/src/command-line/init/init-v1.d.ts +8 -0
  174. package/dist/src/command-line/init/init-v1.js +101 -0
  175. package/dist/src/command-line/init/init-v2.d.ts +23 -0
  176. package/dist/src/command-line/init/init-v2.js +619 -0
  177. package/dist/src/command-line/init/utils/ai-output.d.ts +72 -0
  178. package/dist/src/command-line/init/utils/ai-output.js +180 -0
  179. package/dist/src/command-line/list/command-object.d.ts +2 -0
  180. package/dist/src/command-line/list/command-object.js +21 -0
  181. package/dist/src/command-line/list/list.d.ts +15 -0
  182. package/dist/src/command-line/list/list.js +48 -0
  183. package/dist/src/command-line/mcp/command-object.d.ts +2 -0
  184. package/dist/src/command-line/mcp/command-object.js +29 -0
  185. package/dist/src/command-line/mcp/mcp.d.ts +2 -0
  186. package/dist/src/command-line/mcp/mcp.js +60 -0
  187. package/dist/src/command-line/migrate/agentic/capture-generator-output.d.ts +47 -0
  188. package/dist/src/command-line/migrate/agentic/capture-generator-output.js +216 -0
  189. package/dist/src/command-line/migrate/agentic/cli-args.d.ts +12 -0
  190. package/dist/src/command-line/migrate/agentic/cli-args.js +38 -0
  191. package/dist/src/command-line/migrate/agentic/close-agent-session.d.ts +21 -0
  192. package/dist/src/command-line/migrate/agentic/close-agent-session.js +126 -0
  193. package/dist/src/command-line/migrate/agentic/definitions.d.ts +30 -0
  194. package/dist/src/command-line/migrate/agentic/definitions.js +207 -0
  195. package/dist/src/command-line/migrate/agentic/detect-installed.d.ts +10 -0
  196. package/dist/src/command-line/migrate/agentic/detect-installed.js +68 -0
  197. package/dist/src/command-line/migrate/agentic/format-command.d.ts +14 -0
  198. package/dist/src/command-line/migrate/agentic/format-command.js +44 -0
  199. package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +61 -0
  200. package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +78 -0
  201. package/dist/src/command-line/migrate/agentic/handoff.d.ts +102 -0
  202. package/dist/src/command-line/migrate/agentic/handoff.js +335 -0
  203. package/dist/src/command-line/migrate/agentic/inception.d.ts +9 -0
  204. package/dist/src/command-line/migrate/agentic/inception.js +15 -0
  205. package/dist/src/command-line/migrate/agentic/instruction-files.d.ts +23 -0
  206. package/dist/src/command-line/migrate/agentic/instruction-files.js +41 -0
  207. package/dist/src/command-line/migrate/agentic/master/invocations.d.ts +12 -0
  208. package/dist/src/command-line/migrate/agentic/master/invocations.js +54 -0
  209. package/dist/src/command-line/migrate/agentic/master/run-master-session.d.ts +16 -0
  210. package/dist/src/command-line/migrate/agentic/master/run-master-session.js +175 -0
  211. package/dist/src/command-line/migrate/agentic/master/spawn-master.d.ts +31 -0
  212. package/dist/src/command-line/migrate/agentic/master/spawn-master.js +222 -0
  213. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +17 -0
  214. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +57 -0
  215. package/dist/src/command-line/migrate/agentic/prompts/final-validation.d.ts +13 -0
  216. package/dist/src/command-line/migrate/agentic/prompts/final-validation.js +41 -0
  217. package/dist/src/command-line/migrate/agentic/prompts/fragments.d.ts +17 -0
  218. package/dist/src/command-line/migrate/agentic/prompts/fragments.js +90 -0
  219. package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +56 -0
  220. package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +67 -0
  221. package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +49 -0
  222. package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +53 -0
  223. package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +26 -0
  224. package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +27 -0
  225. package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +19 -0
  226. package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +145 -0
  227. package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +70 -0
  228. package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +113 -0
  229. package/dist/src/command-line/migrate/agentic/run-step.d.ts +68 -0
  230. package/dist/src/command-line/migrate/agentic/run-step.js +148 -0
  231. package/dist/src/command-line/migrate/agentic/runner.d.ts +21 -0
  232. package/dist/src/command-line/migrate/agentic/runner.js +262 -0
  233. package/dist/src/command-line/migrate/agentic/select.d.ts +24 -0
  234. package/dist/src/command-line/migrate/agentic/select.js +251 -0
  235. package/dist/src/command-line/migrate/agentic/terminal-repair.d.ts +1 -0
  236. package/dist/src/command-line/migrate/agentic/terminal-repair.js +27 -0
  237. package/dist/src/command-line/migrate/agentic/types.d.ts +147 -0
  238. package/dist/src/command-line/migrate/agentic/types.js +40 -0
  239. package/dist/src/command-line/migrate/agentic/windows-cmd.d.ts +33 -0
  240. package/dist/src/command-line/migrate/agentic/windows-cmd.js +88 -0
  241. package/dist/src/command-line/migrate/command-object.d.ts +55 -0
  242. package/dist/src/command-line/migrate/command-object.js +162 -0
  243. package/dist/src/command-line/migrate/deferred-output.d.ts +44 -0
  244. package/dist/src/command-line/migrate/deferred-output.js +92 -0
  245. package/dist/src/command-line/migrate/execute-migration.d.ts +97 -0
  246. package/dist/src/command-line/migrate/execute-migration.js +511 -0
  247. package/dist/src/command-line/migrate/migrate-analytics.d.ts +131 -0
  248. package/dist/src/command-line/migrate/migrate-analytics.js +378 -0
  249. package/dist/src/command-line/migrate/migrate-commits.d.ts +81 -0
  250. package/dist/src/command-line/migrate/migrate-commits.js +227 -0
  251. package/dist/src/command-line/migrate/migrate-config.d.ts +32 -0
  252. package/dist/src/command-line/migrate/migrate-config.js +120 -0
  253. package/dist/src/command-line/migrate/migrate-output.d.ts +214 -0
  254. package/dist/src/command-line/migrate/migrate-output.js +298 -0
  255. package/dist/src/command-line/migrate/migrate-ui-api.d.ts +89 -0
  256. package/dist/src/command-line/migrate/migrate-ui-api.js +437 -0
  257. package/dist/src/command-line/migrate/migrate.d.ts +245 -0
  258. package/dist/src/command-line/migrate/migrate.js +2944 -0
  259. package/dist/src/command-line/migrate/migration-shape.d.ts +16 -0
  260. package/dist/src/command-line/migrate/migration-shape.js +13 -0
  261. package/dist/src/command-line/migrate/multi-major.d.ts +37 -0
  262. package/dist/src/command-line/migrate/multi-major.js +215 -0
  263. package/dist/src/command-line/migrate/prompt-files.d.ts +31 -0
  264. package/dist/src/command-line/migrate/prompt-files.js +134 -0
  265. package/dist/src/command-line/migrate/resolve-package-version.d.ts +24 -0
  266. package/dist/src/command-line/migrate/resolve-package-version.js +228 -0
  267. package/dist/src/command-line/migrate/run/agent-output.d.ts +31 -0
  268. package/dist/src/command-line/migrate/run/agent-output.js +84 -0
  269. package/dist/src/command-line/migrate/run/agent-work-payload.d.ts +37 -0
  270. package/dist/src/command-line/migrate/run/agent-work-payload.js +156 -0
  271. package/dist/src/command-line/migrate/run/atomic-write.d.ts +8 -0
  272. package/dist/src/command-line/migrate/run/atomic-write.js +17 -0
  273. package/dist/src/command-line/migrate/run/broker.d.ts +150 -0
  274. package/dist/src/command-line/migrate/run/broker.js +568 -0
  275. package/dist/src/command-line/migrate/run/clean-retry.d.ts +12 -0
  276. package/dist/src/command-line/migrate/run/clean-retry.js +99 -0
  277. package/dist/src/command-line/migrate/run/existing-run-report.d.ts +55 -0
  278. package/dist/src/command-line/migrate/run/existing-run-report.js +227 -0
  279. package/dist/src/command-line/migrate/run/give-up.d.ts +41 -0
  280. package/dist/src/command-line/migrate/run/give-up.js +148 -0
  281. package/dist/src/command-line/migrate/run/index.d.ts +12 -0
  282. package/dist/src/command-line/migrate/run/index.js +42 -0
  283. package/dist/src/command-line/migrate/run/issues.d.ts +127 -0
  284. package/dist/src/command-line/migrate/run/issues.js +1121 -0
  285. package/dist/src/command-line/migrate/run/orchestrator.d.ts +78 -0
  286. package/dist/src/command-line/migrate/run/orchestrator.js +2272 -0
  287. package/dist/src/command-line/migrate/run/run-id.d.ts +8 -0
  288. package/dist/src/command-line/migrate/run/run-id.js +26 -0
  289. package/dist/src/command-line/migrate/run/run-state.d.ts +217 -0
  290. package/dist/src/command-line/migrate/run/run-state.js +669 -0
  291. package/dist/src/command-line/migrate/run/runbook.d.ts +18 -0
  292. package/dist/src/command-line/migrate/run/runbook.js +118 -0
  293. package/dist/src/command-line/migrate/run/state-lock.d.ts +56 -0
  294. package/dist/src/command-line/migrate/run/state-lock.js +202 -0
  295. package/dist/src/command-line/migrate/run/state-machine.d.ts +133 -0
  296. package/dist/src/command-line/migrate/run/state-machine.js +628 -0
  297. package/dist/src/command-line/migrate/run/util.d.ts +61 -0
  298. package/dist/src/command-line/migrate/run/util.js +169 -0
  299. package/dist/src/command-line/migrate/run/worker.d.ts +16 -0
  300. package/dist/src/command-line/migrate/run/worker.js +843 -0
  301. package/dist/src/command-line/migrate/run-migration-process.js +110 -0
  302. package/dist/src/command-line/migrate/safe-prompt.d.ts +21 -0
  303. package/dist/src/command-line/migrate/safe-prompt.js +47 -0
  304. package/dist/src/command-line/migrate/sort-migrations.d.ts +16 -0
  305. package/dist/src/command-line/migrate/sort-migrations.js +32 -0
  306. package/dist/src/command-line/migrate/step-actions.d.ts +5 -0
  307. package/dist/src/command-line/migrate/step-actions.js +18 -0
  308. package/dist/src/command-line/migrate/text.d.ts +24 -0
  309. package/dist/src/command-line/migrate/text.js +51 -0
  310. package/dist/src/command-line/migrate/update-filters.d.ts +11 -0
  311. package/dist/src/command-line/migrate/update-filters.js +45 -0
  312. package/dist/src/command-line/migrate/version-skew-guard.d.ts +60 -0
  313. package/dist/src/command-line/migrate/version-skew-guard.js +177 -0
  314. package/dist/src/command-line/migrate/version-utils.d.ts +5 -0
  315. package/dist/src/command-line/migrate/version-utils.js +52 -0
  316. package/dist/src/command-line/new/command-object.d.ts +2 -0
  317. package/dist/src/command-line/new/command-object.js +26 -0
  318. package/dist/src/command-line/new/new.d.ts +3 -0
  319. package/dist/src/command-line/new/new.js +30 -0
  320. package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts +4 -0
  321. package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.js +13 -0
  322. package/dist/src/command-line/nx-cloud/apply-locally/command-object.d.ts +2 -0
  323. package/dist/src/command-line/nx-cloud/apply-locally/command-object.js +16 -0
  324. package/dist/src/command-line/nx-cloud/complete-run/command-object.d.ts +2 -0
  325. package/dist/src/command-line/nx-cloud/complete-run/command-object.js +17 -0
  326. package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts +4 -0
  327. package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.js +13 -0
  328. package/dist/src/command-line/nx-cloud/connect/command-object.d.ts +3 -0
  329. package/dist/src/command-line/nx-cloud/connect/command-object.js +28 -0
  330. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +13 -0
  331. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +260 -0
  332. package/dist/src/command-line/nx-cloud/connect/view-logs.d.ts +1 -0
  333. package/dist/src/command-line/nx-cloud/connect/view-logs.js +55 -0
  334. package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts +2 -0
  335. package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.js +13 -0
  336. package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts +4 -0
  337. package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.js +32 -0
  338. package/dist/src/command-line/nx-cloud/fix-ci/command-object.d.ts +2 -0
  339. package/dist/src/command-line/nx-cloud/fix-ci/command-object.js +16 -0
  340. package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +4 -0
  341. package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.js +13 -0
  342. package/dist/src/command-line/nx-cloud/login/command-object.d.ts +2 -0
  343. package/dist/src/command-line/nx-cloud/login/command-object.js +20 -0
  344. package/dist/src/command-line/nx-cloud/login/login.d.ts +5 -0
  345. package/dist/src/command-line/nx-cloud/login/login.js +10 -0
  346. package/dist/src/command-line/nx-cloud/logout/command-object.d.ts +2 -0
  347. package/dist/src/command-line/nx-cloud/logout/command-object.js +16 -0
  348. package/dist/src/command-line/nx-cloud/logout/logout.d.ts +4 -0
  349. package/dist/src/command-line/nx-cloud/logout/logout.js +7 -0
  350. package/dist/src/command-line/nx-cloud/record/command-object.d.ts +2 -0
  351. package/dist/src/command-line/nx-cloud/record/command-object.js +19 -0
  352. package/dist/src/command-line/nx-cloud/record/record.d.ts +5 -0
  353. package/dist/src/command-line/nx-cloud/record/record.js +33 -0
  354. package/dist/src/command-line/nx-cloud/start-agent/command-object.d.ts +2 -0
  355. package/dist/src/command-line/nx-cloud/start-agent/command-object.js +16 -0
  356. package/dist/src/command-line/nx-cloud/start-agent/start-agent.d.ts +4 -0
  357. package/dist/src/command-line/nx-cloud/start-agent/start-agent.js +13 -0
  358. package/dist/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +2 -0
  359. package/dist/src/command-line/nx-cloud/start-ci-run/command-object.js +16 -0
  360. package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +4 -0
  361. package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.js +13 -0
  362. package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.d.ts +2 -0
  363. package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +16 -0
  364. package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.d.ts +4 -0
  365. package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.js +13 -0
  366. package/dist/src/command-line/nx-cloud/utils.d.ts +2 -0
  367. package/dist/src/command-line/nx-cloud/utils.js +34 -0
  368. package/dist/src/command-line/nx-commands.d.ts +10 -0
  369. package/dist/src/command-line/nx-commands.js +183 -0
  370. package/dist/src/command-line/register/command-object.d.ts +6 -0
  371. package/dist/src/command-line/register/command-object.js +27 -0
  372. package/dist/src/command-line/register/register.d.ts +2 -0
  373. package/dist/src/command-line/register/register.js +9 -0
  374. package/dist/src/command-line/release/changelog/commit-utils.d.ts +13 -0
  375. package/dist/src/command-line/release/changelog/commit-utils.js +63 -0
  376. package/dist/src/command-line/release/changelog/version-plan-filtering.d.ts +43 -0
  377. package/dist/src/command-line/release/changelog/version-plan-filtering.js +156 -0
  378. package/dist/src/command-line/release/changelog/version-plan-utils.d.ts +31 -0
  379. package/dist/src/command-line/release/changelog/version-plan-utils.js +92 -0
  380. package/dist/src/command-line/release/changelog.d.ts +28 -0
  381. package/dist/src/command-line/release/changelog.js +907 -0
  382. package/dist/src/command-line/release/command-object.d.ts +96 -0
  383. package/dist/src/command-line/release/command-object.js +342 -0
  384. package/dist/src/command-line/release/config/config.d.ts +70 -0
  385. package/dist/src/command-line/release/config/config.js +1204 -0
  386. package/dist/src/command-line/release/config/conventional-commits.d.ts +2 -0
  387. package/dist/src/command-line/release/config/conventional-commits.js +106 -0
  388. package/dist/src/command-line/release/config/deep-merge-json.d.ts +1 -0
  389. package/dist/src/command-line/release/config/deep-merge-json.js +28 -0
  390. package/dist/src/command-line/release/config/filter-release-groups.d.ts +23 -0
  391. package/dist/src/command-line/release/config/filter-release-groups.js +157 -0
  392. package/dist/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
  393. package/dist/src/command-line/release/config/use-legacy-versioning.js +8 -0
  394. package/dist/src/command-line/release/config/version-plans.d.ts +42 -0
  395. package/dist/src/command-line/release/config/version-plans.js +278 -0
  396. package/dist/src/command-line/release/index.d.ts +49 -0
  397. package/dist/src/command-line/release/index.js +49 -0
  398. package/dist/src/command-line/release/plan-check.d.ts +4 -0
  399. package/dist/src/command-line/release/plan-check.js +170 -0
  400. package/dist/src/command-line/release/plan.d.ts +4 -0
  401. package/dist/src/command-line/release/plan.js +248 -0
  402. package/dist/src/command-line/release/publish.d.ts +9 -0
  403. package/dist/src/command-line/release/publish.js +298 -0
  404. package/dist/src/command-line/release/release.d.ts +5 -0
  405. package/dist/src/command-line/release/release.js +299 -0
  406. package/dist/src/command-line/release/utils/diff.d.ts +21 -0
  407. package/dist/src/command-line/release/utils/diff.js +168 -0
  408. package/dist/src/command-line/release/utils/exec-command.d.ts +1 -0
  409. package/dist/src/command-line/release/utils/exec-command.js +34 -0
  410. package/dist/src/command-line/release/utils/generate-version-plan-content.d.ts +1 -0
  411. package/dist/src/command-line/release/utils/generate-version-plan-content.js +20 -0
  412. package/dist/src/command-line/release/utils/get-touched-projects-for-group.d.ts +7 -0
  413. package/dist/src/command-line/release/utils/get-touched-projects-for-group.js +78 -0
  414. package/dist/src/command-line/release/utils/git.d.ts +126 -0
  415. package/dist/src/command-line/release/utils/git.js +597 -0
  416. package/dist/src/command-line/release/utils/launch-editor.d.ts +1 -0
  417. package/dist/src/command-line/release/utils/launch-editor.js +46 -0
  418. package/dist/src/command-line/release/utils/markdown.d.ts +6 -0
  419. package/dist/src/command-line/release/utils/markdown.js +28 -0
  420. package/dist/src/command-line/release/utils/print-changes.d.ts +6 -0
  421. package/dist/src/command-line/release/utils/print-changes.js +63 -0
  422. package/dist/src/command-line/release/utils/print-config.d.ts +7 -0
  423. package/dist/src/command-line/release/utils/print-config.js +36 -0
  424. package/dist/src/command-line/release/utils/release-graph.d.ts +248 -0
  425. package/dist/src/command-line/release/utils/release-graph.js +769 -0
  426. package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +9 -0
  427. package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.js +61 -0
  428. package/dist/src/command-line/release/utils/remote-release-clients/github.d.ts +58 -0
  429. package/dist/src/command-line/release/utils/remote-release-clients/github.js +333 -0
  430. package/dist/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +62 -0
  431. package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +259 -0
  432. package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +113 -0
  433. package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +172 -0
  434. package/dist/src/command-line/release/utils/repository-git-tags.d.ts +25 -0
  435. package/dist/src/command-line/release/utils/repository-git-tags.js +125 -0
  436. package/dist/src/command-line/release/utils/resolve-changelog-renderer.d.ts +2 -0
  437. package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +22 -0
  438. package/dist/src/command-line/release/utils/resolve-nx-json-error-message.d.ts +1 -0
  439. package/dist/src/command-line/release/utils/resolve-nx-json-error-message.js +53 -0
  440. package/dist/src/command-line/release/utils/resolve-semver-specifier.d.ts +7 -0
  441. package/dist/src/command-line/release/utils/resolve-semver-specifier.js +41 -0
  442. package/dist/src/command-line/release/utils/semver.d.ts +26 -0
  443. package/dist/src/command-line/release/utils/semver.js +111 -0
  444. package/dist/src/command-line/release/utils/shared-legacy.d.ts +25 -0
  445. package/dist/src/command-line/release/utils/shared-legacy.js +2 -0
  446. package/dist/src/command-line/release/utils/shared.d.ts +64 -0
  447. package/dist/src/command-line/release/utils/shared.js +379 -0
  448. package/dist/src/command-line/release/utils/version-plan-utils.d.ts +40 -0
  449. package/dist/src/command-line/release/utils/version-plan-utils.js +111 -0
  450. package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +8 -0
  451. package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.js +61 -0
  452. package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
  453. package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
  454. package/dist/src/command-line/release/version/project-logger.d.ts +8 -0
  455. package/dist/src/command-line/release/version/project-logger.js +47 -0
  456. package/dist/src/command-line/release/version/release-group-processor.d.ts +139 -0
  457. package/dist/src/command-line/release/version/release-group-processor.js +706 -0
  458. package/dist/src/command-line/release/version/resolve-current-version.d.ts +32 -0
  459. package/dist/src/command-line/release/version/resolve-current-version.js +240 -0
  460. package/dist/src/command-line/release/version/topological-sort.d.ts +9 -0
  461. package/dist/src/command-line/release/version/topological-sort.js +41 -0
  462. package/dist/src/command-line/release/version/version-actions.d.ts +227 -0
  463. package/dist/src/command-line/release/version/version-actions.js +255 -0
  464. package/dist/src/command-line/release/version.d.ts +28 -0
  465. package/dist/src/command-line/release/version.js +382 -0
  466. package/dist/src/command-line/repair/command-object.d.ts +2 -0
  467. package/dist/src/command-line/repair/command-object.js +21 -0
  468. package/dist/src/command-line/repair/repair.d.ts +3 -0
  469. package/dist/src/command-line/repair/repair.js +41 -0
  470. package/dist/src/command-line/report/command-object.d.ts +2 -0
  471. package/dist/src/command-line/report/command-object.js +12 -0
  472. package/dist/src/command-line/report/report.d.ts +73 -0
  473. package/dist/src/command-line/report/report.js +432 -0
  474. package/dist/src/command-line/reset/command-object.d.ts +8 -0
  475. package/dist/src/command-line/reset/command-object.js +27 -0
  476. package/dist/src/command-line/reset/reset.d.ts +2 -0
  477. package/dist/src/command-line/reset/reset.js +189 -0
  478. package/dist/src/command-line/run/command-object.d.ts +6 -0
  479. package/dist/src/command-line/run/command-object.js +43 -0
  480. package/dist/src/command-line/run/completion.d.ts +1 -0
  481. package/dist/src/command-line/run/completion.js +7 -0
  482. package/dist/src/command-line/run/executor-utils.d.ts +12 -0
  483. package/dist/src/command-line/run/executor-utils.js +96 -0
  484. package/dist/src/command-line/run/run-one.d.ts +17 -0
  485. package/dist/src/command-line/run/run-one.js +159 -0
  486. package/dist/src/command-line/run/run.d.ts +51 -0
  487. package/dist/src/command-line/run/run.js +179 -0
  488. package/dist/src/command-line/run-many/command-object.d.ts +2 -0
  489. package/dist/src/command-line/run-many/command-object.js +18 -0
  490. package/dist/src/command-line/run-many/completion.d.ts +1 -0
  491. package/dist/src/command-line/run-many/completion.js +13 -0
  492. package/dist/src/command-line/run-many/run-many.d.ts +10 -0
  493. package/dist/src/command-line/run-many/run-many.js +84 -0
  494. package/dist/src/command-line/show/command-object.d.ts +40 -0
  495. package/dist/src/command-line/show/command-object.js +237 -0
  496. package/dist/src/command-line/show/completion.d.ts +1 -0
  497. package/dist/src/command-line/show/completion.js +27 -0
  498. package/dist/src/command-line/show/project.d.ts +2 -0
  499. package/dist/src/command-line/show/project.js +103 -0
  500. package/dist/src/command-line/show/projects.d.ts +2 -0
  501. package/dist/src/command-line/show/projects.js +131 -0
  502. package/dist/src/command-line/show/show-target/index.d.ts +3 -0
  503. package/dist/src/command-line/show/show-target/index.js +9 -0
  504. package/dist/src/command-line/show/show-target/info.d.ts +28 -0
  505. package/dist/src/command-line/show/show-target/info.js +389 -0
  506. package/dist/src/command-line/show/show-target/inputs.d.ts +2 -0
  507. package/dist/src/command-line/show/show-target/inputs.js +83 -0
  508. package/dist/src/command-line/show/show-target/outputs.d.ts +2 -0
  509. package/dist/src/command-line/show/show-target/outputs.js +70 -0
  510. package/dist/src/command-line/show/show-target/utils.d.ts +54 -0
  511. package/dist/src/command-line/show/show-target/utils.js +265 -0
  512. package/dist/src/command-line/sync/command-object.d.ts +6 -0
  513. package/dist/src/command-line/sync/command-object.js +21 -0
  514. package/dist/src/command-line/sync/sync.d.ts +6 -0
  515. package/dist/src/command-line/sync/sync.js +120 -0
  516. package/dist/src/command-line/watch/command-object.d.ts +2 -0
  517. package/dist/src/command-line/watch/command-object.js +91 -0
  518. package/dist/src/command-line/watch/completion.d.ts +1 -0
  519. package/dist/src/command-line/watch/completion.js +10 -0
  520. package/dist/src/command-line/watch/watch.d.ts +31 -0
  521. package/dist/src/command-line/watch/watch.js +211 -0
  522. package/dist/src/command-line/yargs-utils/arguments-of.d.ts +11 -0
  523. package/dist/src/command-line/yargs-utils/arguments-of.js +9 -0
  524. package/dist/src/command-line/yargs-utils/documentation.d.ts +2 -0
  525. package/dist/src/command-line/yargs-utils/documentation.js +12 -0
  526. package/dist/src/command-line/yargs-utils/shared-options.d.ts +95 -0
  527. package/dist/src/command-line/yargs-utils/shared-options.js +431 -0
  528. package/dist/src/commands-runner/command-graph.d.ts +13 -0
  529. package/dist/src/commands-runner/command-graph.js +2 -0
  530. package/dist/src/commands-runner/create-command-graph.d.ts +4 -0
  531. package/dist/src/commands-runner/create-command-graph.js +72 -0
  532. package/dist/src/commands-runner/get-command-projects.d.ts +3 -0
  533. package/dist/src/commands-runner/get-command-projects.js +33 -0
  534. package/dist/src/config/calculate-default-project-name.d.ts +4 -0
  535. package/dist/src/config/calculate-default-project-name.js +41 -0
  536. package/dist/src/config/configuration.d.ts +8 -0
  537. package/dist/src/config/configuration.js +17 -0
  538. package/dist/src/config/misc-interfaces.d.ts +266 -0
  539. package/dist/src/config/misc-interfaces.js +2 -0
  540. package/dist/src/config/nx-json.d.ts +963 -0
  541. package/dist/src/config/nx-json.js +40 -0
  542. package/dist/src/config/project-graph.d.ts +137 -0
  543. package/dist/src/config/project-graph.js +45 -0
  544. package/dist/src/config/schema-utils.d.ts +37 -0
  545. package/dist/src/config/schema-utils.js +199 -0
  546. package/dist/src/config/task-graph.d.ts +6 -0
  547. package/dist/src/config/task-graph.js +2 -0
  548. package/dist/src/config/to-project-name.d.ts +5 -0
  549. package/dist/src/config/to-project-name.js +12 -0
  550. package/dist/src/config/workspace-json-project-json.d.ts +295 -0
  551. package/dist/src/config/workspace-json-project-json.js +2 -0
  552. package/dist/src/core/graph/environment.js +1 -0
  553. package/dist/src/core/graph/favicon.ico +0 -0
  554. package/dist/src/core/graph/index.html +32 -0
  555. package/dist/src/core/graph/main.js +1 -0
  556. package/dist/src/core/graph/runtime.js +1 -0
  557. package/dist/src/core/graph/styles.css +2 -0
  558. package/dist/src/core/graph/styles.js +1 -0
  559. package/dist/src/daemon/cache.d.ts +10 -0
  560. package/dist/src/daemon/cache.js +58 -0
  561. package/dist/src/daemon/client/client.d.ts +167 -0
  562. package/dist/src/daemon/client/client.js +1284 -0
  563. package/dist/src/daemon/client/daemon-environment.d.ts +74 -0
  564. package/dist/src/daemon/client/daemon-environment.js +422 -0
  565. package/dist/src/daemon/client/daemon-socket-messenger.d.ts +12 -0
  566. package/dist/src/daemon/client/daemon-socket-messenger.js +63 -0
  567. package/dist/src/daemon/is-nx-version-mismatch.d.ts +1 -0
  568. package/dist/src/daemon/is-nx-version-mismatch.js +8 -0
  569. package/dist/src/daemon/is-on-daemon.d.ts +1 -0
  570. package/dist/src/daemon/is-on-daemon.js +6 -0
  571. package/dist/src/daemon/is-v8-serializer-enabled.d.ts +5 -0
  572. package/dist/src/daemon/is-v8-serializer-enabled.js +10 -0
  573. package/dist/src/daemon/logger.d.ts +39 -0
  574. package/dist/src/daemon/logger.js +80 -0
  575. package/dist/src/daemon/message-types/configure-ai-agents.d.ts +20 -0
  576. package/dist/src/daemon/message-types/configure-ai-agents.js +19 -0
  577. package/dist/src/daemon/message-types/daemon-message.d.ts +39 -0
  578. package/dist/src/daemon/message-types/daemon-message.js +54 -0
  579. package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +6 -0
  580. package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.js +11 -0
  581. package/dist/src/daemon/message-types/force-shutdown.d.ts +5 -0
  582. package/dist/src/daemon/message-types/force-shutdown.js +11 -0
  583. package/dist/src/daemon/message-types/get-context-file-data.d.ts +5 -0
  584. package/dist/src/daemon/message-types/get-context-file-data.js +11 -0
  585. package/dist/src/daemon/message-types/get-files-in-directory.d.ts +6 -0
  586. package/dist/src/daemon/message-types/get-files-in-directory.js +11 -0
  587. package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +6 -0
  588. package/dist/src/daemon/message-types/get-nx-workspace-files.js +11 -0
  589. package/dist/src/daemon/message-types/get-plugin-capabilities.d.ts +5 -0
  590. package/dist/src/daemon/message-types/get-plugin-capabilities.js +11 -0
  591. package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +5 -0
  592. package/dist/src/daemon/message-types/get-registered-sync-generators.js +11 -0
  593. package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +6 -0
  594. package/dist/src/daemon/message-types/get-sync-generator-changes.js +11 -0
  595. package/dist/src/daemon/message-types/glob.d.ts +14 -0
  596. package/dist/src/daemon/message-types/glob.js +19 -0
  597. package/dist/src/daemon/message-types/hash-glob.d.ts +13 -0
  598. package/dist/src/daemon/message-types/hash-glob.js +19 -0
  599. package/dist/src/daemon/message-types/nx-console.d.ts +17 -0
  600. package/dist/src/daemon/message-types/nx-console.js +19 -0
  601. package/dist/src/daemon/message-types/register-project-graph-listener.d.ts +5 -0
  602. package/dist/src/daemon/message-types/register-project-graph-listener.js +11 -0
  603. package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +14 -0
  604. package/dist/src/daemon/message-types/run-tasks-execution-hooks.js +19 -0
  605. package/dist/src/daemon/message-types/select-affected-tasks.d.ts +21 -0
  606. package/dist/src/daemon/message-types/select-affected-tasks.js +11 -0
  607. package/dist/src/daemon/message-types/streaming-messages.d.ts +14 -0
  608. package/dist/src/daemon/message-types/streaming-messages.js +19 -0
  609. package/dist/src/daemon/message-types/task-history.d.ts +19 -0
  610. package/dist/src/daemon/message-types/task-history.js +27 -0
  611. package/dist/src/daemon/message-types/ultracache-configuration-version.d.ts +8 -0
  612. package/dist/src/daemon/message-types/ultracache-configuration-version.js +2 -0
  613. package/dist/src/daemon/message-types/update-workspace-context.d.ts +8 -0
  614. package/dist/src/daemon/message-types/update-workspace-context.js +11 -0
  615. package/dist/src/daemon/sandbox-socket-hint.d.ts +27 -0
  616. package/dist/src/daemon/sandbox-socket-hint.js +136 -0
  617. package/dist/src/daemon/server/client-socket-context.d.ts +23 -0
  618. package/dist/src/daemon/server/client-socket-context.js +88 -0
  619. package/dist/src/daemon/server/dotenv-graph-changes.d.ts +97 -0
  620. package/dist/src/daemon/server/dotenv-graph-changes.js +284 -0
  621. package/dist/src/daemon/server/file-watching/changed-projects.d.ts +10 -0
  622. package/dist/src/daemon/server/file-watching/changed-projects.js +53 -0
  623. package/dist/src/daemon/server/file-watching/file-change-events.d.ts +7 -0
  624. package/dist/src/daemon/server/file-watching/file-change-events.js +19 -0
  625. package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +17 -0
  626. package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +82 -0
  627. package/dist/src/daemon/server/handle-client-env.d.ts +8 -0
  628. package/dist/src/daemon/server/handle-client-env.js +113 -0
  629. package/dist/src/daemon/server/handle-configure-ai-agents.d.ts +3 -0
  630. package/dist/src/daemon/server/handle-configure-ai-agents.js +101 -0
  631. package/dist/src/daemon/server/handle-context-file-data.d.ts +2 -0
  632. package/dist/src/daemon/server/handle-context-file-data.js +12 -0
  633. package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +2 -0
  634. package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +11 -0
  635. package/dist/src/daemon/server/handle-force-shutdown.d.ts +5 -0
  636. package/dist/src/daemon/server/handle-force-shutdown.js +18 -0
  637. package/dist/src/daemon/server/handle-get-files-in-directory.d.ts +2 -0
  638. package/dist/src/daemon/server/handle-get-files-in-directory.js +12 -0
  639. package/dist/src/daemon/server/handle-get-plugin-capabilities.d.ts +2 -0
  640. package/dist/src/daemon/server/handle-get-plugin-capabilities.js +13 -0
  641. package/dist/src/daemon/server/handle-get-registered-sync-generators.d.ts +2 -0
  642. package/dist/src/daemon/server/handle-get-registered-sync-generators.js +11 -0
  643. package/dist/src/daemon/server/handle-get-sync-generator-changes.d.ts +2 -0
  644. package/dist/src/daemon/server/handle-get-sync-generator-changes.js +20 -0
  645. package/dist/src/daemon/server/handle-glob.d.ts +3 -0
  646. package/dist/src/daemon/server/handle-glob.js +20 -0
  647. package/dist/src/daemon/server/handle-hash-glob.d.ts +3 -0
  648. package/dist/src/daemon/server/handle-hash-glob.js +20 -0
  649. package/dist/src/daemon/server/handle-hash-tasks.d.ts +20 -0
  650. package/dist/src/daemon/server/handle-hash-tasks.js +43 -0
  651. package/dist/src/daemon/server/handle-nx-console.d.ts +3 -0
  652. package/dist/src/daemon/server/handle-nx-console.js +54 -0
  653. package/dist/src/daemon/server/handle-nx-workspace-files.d.ts +2 -0
  654. package/dist/src/daemon/server/handle-nx-workspace-files.js +12 -0
  655. package/dist/src/daemon/server/handle-outputs-tracking.d.ts +15 -0
  656. package/dist/src/daemon/server/handle-outputs-tracking.js +35 -0
  657. package/dist/src/daemon/server/handle-process-in-background.d.ts +6 -0
  658. package/dist/src/daemon/server/handle-process-in-background.js +32 -0
  659. package/dist/src/daemon/server/handle-request-project-graph.d.ts +3 -0
  660. package/dist/src/daemon/server/handle-request-project-graph.js +36 -0
  661. package/dist/src/daemon/server/handle-request-shutdown.d.ts +5 -0
  662. package/dist/src/daemon/server/handle-request-shutdown.js +27 -0
  663. package/dist/src/daemon/server/handle-select-affected-tasks.d.ts +3 -0
  664. package/dist/src/daemon/server/handle-select-affected-tasks.js +26 -0
  665. package/dist/src/daemon/server/handle-task-history.d.ts +13 -0
  666. package/dist/src/daemon/server/handle-task-history.js +30 -0
  667. package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +20 -0
  668. package/dist/src/daemon/server/handle-tasks-execution-hooks.js +35 -0
  669. package/dist/src/daemon/server/handle-update-workspace-context.d.ts +2 -0
  670. package/dist/src/daemon/server/handle-update-workspace-context.js +11 -0
  671. package/dist/src/daemon/server/handle-watch-events.d.ts +10 -0
  672. package/dist/src/daemon/server/handle-watch-events.js +85 -0
  673. package/dist/src/daemon/server/latest-nx.d.ts +10 -0
  674. package/dist/src/daemon/server/latest-nx.js +56 -0
  675. package/dist/src/daemon/server/nx-console-operations.d.ts +26 -0
  676. package/dist/src/daemon/server/nx-console-operations.js +97 -0
  677. package/dist/src/daemon/server/outputs-tracking.d.ts +11 -0
  678. package/dist/src/daemon/server/outputs-tracking.js +20 -0
  679. package/dist/src/daemon/server/planning-context.d.ts +8 -0
  680. package/dist/src/daemon/server/planning-context.js +18 -0
  681. package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +62 -0
  682. package/dist/src/daemon/server/project-graph-incremental-recomputation.js +690 -0
  683. package/dist/src/daemon/server/project-graph-listener-sockets.d.ts +7 -0
  684. package/dist/src/daemon/server/project-graph-listener-sockets.js +25 -0
  685. package/dist/src/daemon/server/restart-checks.d.ts +22 -0
  686. package/dist/src/daemon/server/restart-checks.js +77 -0
  687. package/dist/src/daemon/server/server.d.ts +11 -0
  688. package/dist/src/daemon/server/server.js +489 -0
  689. package/dist/src/daemon/server/shutdown-utils.d.ts +18 -0
  690. package/dist/src/daemon/server/shutdown-utils.js +136 -0
  691. package/dist/src/daemon/server/start.d.ts +1 -0
  692. package/dist/src/daemon/server/start.js +20 -0
  693. package/dist/src/daemon/server/sync-generators.d.ts +14 -0
  694. package/dist/src/daemon/server/sync-generators.js +368 -0
  695. package/dist/src/daemon/server/ultracache-configuration-state.d.ts +7 -0
  696. package/dist/src/daemon/server/ultracache-configuration-state.js +36 -0
  697. package/dist/src/daemon/socket-utils.d.ts +43 -0
  698. package/dist/src/daemon/socket-utils.js +131 -0
  699. package/dist/src/daemon/tmp-dir.d.ts +62 -0
  700. package/dist/src/daemon/tmp-dir.js +477 -0
  701. package/dist/src/devkit-exports.d.ts +139 -0
  702. package/dist/src/devkit-exports.js +143 -0
  703. package/dist/src/devkit-internals.d.ts +146 -0
  704. package/dist/src/devkit-internals.js +336 -0
  705. package/dist/src/devkit-testing-exports.d.ts +2 -0
  706. package/dist/src/devkit-testing-exports.js +8 -0
  707. package/dist/src/executors/noop/noop.impl.d.ts +3 -0
  708. package/dist/src/executors/noop/noop.impl.js +6 -0
  709. package/dist/src/executors/noop/schema.json +10 -0
  710. package/dist/src/executors/run-commands/run-commands.impl.d.ts +60 -0
  711. package/dist/src/executors/run-commands/run-commands.impl.js +315 -0
  712. package/dist/src/executors/run-commands/running-tasks.d.ts +53 -0
  713. package/dist/src/executors/run-commands/running-tasks.js +603 -0
  714. package/dist/src/executors/run-commands/schema.json +198 -0
  715. package/dist/src/executors/run-script/run-script.impl.d.ts +8 -0
  716. package/dist/src/executors/run-script/run-script.impl.js +86 -0
  717. package/dist/src/executors/run-script/schema.json +28 -0
  718. package/dist/src/executors/utils/convert-nx-executor.d.ts +10 -0
  719. package/dist/src/executors/utils/convert-nx-executor.js +83 -0
  720. package/dist/src/generators/internal-utils/format-changed-files.d.ts +24 -0
  721. package/dist/src/generators/internal-utils/format-changed-files.js +163 -0
  722. package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +26 -0
  723. package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +70 -0
  724. package/dist/src/generators/testing-utils/create-tree.d.ts +5 -0
  725. package/dist/src/generators/testing-utils/create-tree.js +14 -0
  726. package/dist/src/generators/tree.d.ts +127 -0
  727. package/dist/src/generators/tree.js +310 -0
  728. package/dist/src/generators/utils/generate-files.d.ts +44 -0
  729. package/dist/src/generators/utils/generate-files.js +114 -0
  730. package/dist/src/generators/utils/glob.d.ts +22 -0
  731. package/dist/src/generators/utils/glob.js +51 -0
  732. package/dist/src/generators/utils/json.d.ts +28 -0
  733. package/dist/src/generators/utils/json.js +48 -0
  734. package/dist/src/generators/utils/nx-json.d.ts +10 -0
  735. package/dist/src/generators/utils/nx-json.js +62 -0
  736. package/dist/src/generators/utils/project-configuration.d.ts +51 -0
  737. package/dist/src/generators/utils/project-configuration.js +299 -0
  738. package/dist/src/hasher/check-task-files.d.ts +86 -0
  739. package/dist/src/hasher/check-task-files.js +378 -0
  740. package/dist/src/hasher/create-task-hasher.d.ts +11 -0
  741. package/dist/src/hasher/create-task-hasher.js +25 -0
  742. package/dist/src/hasher/file-hasher.d.ts +3 -0
  743. package/dist/src/hasher/file-hasher.js +23 -0
  744. package/dist/src/hasher/hash-plan-inspector.d.ts +33 -0
  745. package/dist/src/hasher/hash-plan-inspector.js +70 -0
  746. package/dist/src/hasher/hash-task.d.ts +17 -0
  747. package/dist/src/hasher/hash-task.js +202 -0
  748. package/dist/src/hasher/native-task-hasher-impl.d.ts +34 -0
  749. package/dist/src/hasher/native-task-hasher-impl.js +104 -0
  750. package/dist/src/hasher/task-hasher.d.ts +177 -0
  751. package/dist/src/hasher/task-hasher.js +320 -0
  752. package/dist/src/hasher/task-planning-context.d.ts +13 -0
  753. package/dist/src/hasher/task-planning-context.js +12 -0
  754. package/dist/src/index.d.ts +1 -0
  755. package/dist/src/index.js +2 -0
  756. package/dist/src/migrations/update-15-0-0/prefix-outputs.d.ts +2 -0
  757. package/dist/src/migrations/update-15-0-0/prefix-outputs.js +54 -0
  758. package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +2 -0
  759. package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +16 -0
  760. package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +2 -0
  761. package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +82 -0
  762. package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +2 -0
  763. package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +29 -0
  764. package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +2 -0
  765. package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +50 -0
  766. package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +12 -0
  767. package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +67 -0
  768. package/dist/src/migrations/update-17-0-0/move-cache-directory.d.ts +2 -0
  769. package/dist/src/migrations/update-17-0-0/move-cache-directory.js +35 -0
  770. package/dist/src/migrations/update-17-0-0/move-cache-directory.md +31 -0
  771. package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +2 -0
  772. package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +72 -0
  773. package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +2 -0
  774. package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +126 -0
  775. package/dist/src/migrations/update-17-2-0/move-default-base.d.ts +5 -0
  776. package/dist/src/migrations/update-17-2-0/move-default-base.js +20 -0
  777. package/dist/src/migrations/update-17-3-0/update-nxw.d.ts +2 -0
  778. package/dist/src/migrations/update-17-3-0/update-nxw.js +7 -0
  779. package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +2 -0
  780. package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +11 -0
  781. package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts +4 -0
  782. package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.js +33 -0
  783. package/dist/src/migrations/update-19-2-4/set-project-name.d.ts +2 -0
  784. package/dist/src/migrations/update-19-2-4/set-project-name.js +34 -0
  785. package/dist/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +2 -0
  786. package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +25 -0
  787. package/dist/src/migrations/update-20-0-0/move-use-daemon-process.md +27 -0
  788. package/dist/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
  789. package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +20 -0
  790. package/dist/src/migrations/update-20-0-1/use-legacy-cache.md +24 -0
  791. package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +2 -0
  792. package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +38 -0
  793. package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.md +49 -0
  794. package/dist/src/migrations/update-21-0-0/release-version-config-changes.d.ts +2 -0
  795. package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +101 -0
  796. package/dist/src/migrations/update-21-0-0/release-version-config-changes.md +54 -0
  797. package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +2 -0
  798. package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +38 -0
  799. package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.md +28 -0
  800. package/dist/src/migrations/update-21-0-0/remove-legacy-cache.d.ts +2 -0
  801. package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +17 -0
  802. package/dist/src/migrations/update-21-0-0/remove-legacy-cache.md +22 -0
  803. package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +2 -0
  804. package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +100 -0
  805. package/dist/src/migrations/update-22-0-0/release-version-config-changes.d.ts +2 -0
  806. package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +101 -0
  807. package/dist/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +2 -0
  808. package/dist/src/migrations/update-22-1-0/update-nx-wrapper.js +7 -0
  809. package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.d.ts +2 -0
  810. package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +19 -0
  811. package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.md +11 -0
  812. package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts +2 -0
  813. package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +16 -0
  814. package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts +2 -0
  815. package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +16 -0
  816. package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts +2 -0
  817. package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.js +23 -0
  818. package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +2 -0
  819. package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +16 -0
  820. package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.d.ts +2 -0
  821. package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +16 -0
  822. package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +9 -0
  823. package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +18 -0
  824. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +12 -0
  825. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +250 -0
  826. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +50 -0
  827. package/dist/src/migrations/utils/target-defaults.d.ts +28 -0
  828. package/dist/src/migrations/utils/target-defaults.js +46 -0
  829. package/dist/src/native/assert-supported-platform.d.ts +1 -0
  830. package/dist/src/native/assert-supported-platform.js +38 -0
  831. package/dist/src/native/browser.js +1 -0
  832. package/dist/src/native/index.d.ts +1419 -0
  833. package/dist/src/native/index.js +216 -0
  834. package/dist/src/native/native-bindings.js +654 -0
  835. package/dist/src/native/native-file-cache-location.d.ts +17 -0
  836. package/dist/src/native/native-file-cache-location.js +97 -0
  837. package/dist/src/native/nx.openharmony-arm64.node +0 -0
  838. package/dist/src/native/nx.wasi-browser.js +131 -0
  839. package/dist/src/native/nx.wasi.cjs +161 -0
  840. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  841. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  842. package/dist/src/native/transform-objects.d.ts +12 -0
  843. package/dist/src/native/transform-objects.js +97 -0
  844. package/dist/src/native/wasi-worker-browser.mjs +30 -0
  845. package/dist/src/native/wasi-worker.mjs +63 -0
  846. package/dist/src/nx-cloud/debug-logger.d.ts +1 -0
  847. package/dist/src/nx-cloud/debug-logger.js +8 -0
  848. package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +14 -0
  849. package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +166 -0
  850. package/dist/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +41 -0
  851. package/dist/src/nx-cloud/models/onboarding-status.d.ts +1 -0
  852. package/dist/src/nx-cloud/models/onboarding-status.js +2 -0
  853. package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +16 -0
  854. package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.js +41 -0
  855. package/dist/src/nx-cloud/resolution-helpers.d.ts +1 -0
  856. package/dist/src/nx-cloud/resolution-helpers.js +19 -0
  857. package/dist/src/nx-cloud/update-manager.d.ts +26 -0
  858. package/dist/src/nx-cloud/update-manager.js +274 -0
  859. package/dist/src/nx-cloud/utilities/client.d.ts +10 -0
  860. package/dist/src/nx-cloud/utilities/client.js +42 -0
  861. package/dist/src/nx-cloud/utilities/environment.d.ts +3 -0
  862. package/dist/src/nx-cloud/utilities/environment.js +48 -0
  863. package/dist/src/nx-cloud/utilities/get-cloud-options.d.ts +5 -0
  864. package/dist/src/nx-cloud/utilities/get-cloud-options.js +26 -0
  865. package/dist/src/nx-cloud/utilities/is-workspace-claimed.d.ts +1 -0
  866. package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +26 -0
  867. package/dist/src/nx-cloud/utilities/nx-cloud-http-client.d.ts +5 -0
  868. package/dist/src/nx-cloud/utilities/nx-cloud-http-client.js +16 -0
  869. package/dist/src/nx-cloud/utilities/onboarding.d.ts +5 -0
  870. package/dist/src/nx-cloud/utilities/onboarding.js +31 -0
  871. package/dist/src/nx-cloud/utilities/url-shorten.d.ts +2 -0
  872. package/dist/src/nx-cloud/utilities/url-shorten.js +92 -0
  873. package/dist/src/plugins/js/hasher/hasher.d.ts +5 -0
  874. package/dist/src/plugins/js/hasher/hasher.js +51 -0
  875. package/dist/src/plugins/js/index.d.ts +4 -0
  876. package/dist/src/plugins/js/index.js +182 -0
  877. package/dist/src/plugins/js/lock-file/bun-parser.d.ts +14 -0
  878. package/dist/src/plugins/js/lock-file/bun-parser.js +992 -0
  879. package/dist/src/plugins/js/lock-file/lock-file.d.ts +85 -0
  880. package/dist/src/plugins/js/lock-file/lock-file.js +441 -0
  881. package/dist/src/plugins/js/lock-file/npm-parser.d.ts +10 -0
  882. package/dist/src/plugins/js/lock-file/npm-parser.js +595 -0
  883. package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +10 -0
  884. package/dist/src/plugins/js/lock-file/pnpm-parser.js +1047 -0
  885. package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +35 -0
  886. package/dist/src/plugins/js/lock-file/project-graph-pruning.js +290 -0
  887. package/dist/src/plugins/js/lock-file/pruned-output.d.ts +331 -0
  888. package/dist/src/plugins/js/lock-file/pruned-output.js +1465 -0
  889. package/dist/src/plugins/js/lock-file/utils/package-json.d.ts +10 -0
  890. package/dist/src/plugins/js/lock-file/utils/package-json.js +38 -0
  891. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +23 -0
  892. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +897 -0
  893. package/dist/src/plugins/js/lock-file/yarn-parser.d.ts +10 -0
  894. package/dist/src/plugins/js/lock-file/yarn-parser.js +536 -0
  895. package/dist/src/plugins/js/package-json/create-package-json.d.ts +29 -0
  896. package/dist/src/plugins/js/package-json/create-package-json.js +312 -0
  897. package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +11 -0
  898. package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +172 -0
  899. package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +12 -0
  900. package/dist/src/plugins/js/project-graph/affected/npm-packages.js +145 -0
  901. package/dist/src/plugins/js/project-graph/affected/touched-projects.d.ts +2 -0
  902. package/dist/src/plugins/js/project-graph/affected/touched-projects.js +18 -0
  903. package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +4 -0
  904. package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +63 -0
  905. package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +6 -0
  906. package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +45 -0
  907. package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +4 -0
  908. package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +88 -0
  909. package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +4 -0
  910. package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +75 -0
  911. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +81 -0
  912. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +468 -0
  913. package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +2 -0
  914. package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +31 -0
  915. package/dist/src/plugins/js/utils/config.d.ts +2 -0
  916. package/dist/src/plugins/js/utils/config.js +61 -0
  917. package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts +2 -0
  918. package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.js +13 -0
  919. package/dist/src/plugins/js/utils/packages.d.ts +8 -0
  920. package/dist/src/plugins/js/utils/packages.js +91 -0
  921. package/dist/src/plugins/js/utils/register.d.ts +350 -0
  922. package/dist/src/plugins/js/utils/register.js +1279 -0
  923. package/dist/src/plugins/js/utils/resolve-relative-to-dir.d.ts +5 -0
  924. package/dist/src/plugins/js/utils/resolve-relative-to-dir.js +17 -0
  925. package/dist/src/plugins/js/utils/typescript.d.ts +32 -0
  926. package/dist/src/plugins/js/utils/typescript.js +157 -0
  927. package/dist/src/plugins/js/versions.d.ts +1 -0
  928. package/dist/src/plugins/js/versions.js +4 -0
  929. package/dist/src/plugins/package-json/create-nodes.d.ts +28 -0
  930. package/dist/src/plugins/package-json/create-nodes.js +243 -0
  931. package/dist/src/plugins/package-json/index.d.ts +2 -0
  932. package/dist/src/plugins/package-json/index.js +6 -0
  933. package/dist/src/plugins/project-json/build-nodes/project-json.d.ts +5 -0
  934. package/dist/src/plugins/project-json/build-nodes/project-json.js +33 -0
  935. package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +25 -0
  936. package/dist/src/project-graph/affected/affected-project-graph-models.js +2 -0
  937. package/dist/src/project-graph/affected/affected-project-graph.d.ts +4 -0
  938. package/dist/src/project-graph/affected/affected-project-graph.js +77 -0
  939. package/dist/src/project-graph/affected/affected-projects.d.ts +7 -0
  940. package/dist/src/project-graph/affected/affected-projects.js +42 -0
  941. package/dist/src/project-graph/affected/affected-reasons.d.ts +116 -0
  942. package/dist/src/project-graph/affected/affected-reasons.js +459 -0
  943. package/dist/src/project-graph/affected/affected-tasks.d.ts +103 -0
  944. package/dist/src/project-graph/affected/affected-tasks.js +386 -0
  945. package/dist/src/project-graph/affected/print-explanation.d.ts +11 -0
  946. package/dist/src/project-graph/affected/print-explanation.js +44 -0
  947. package/dist/src/project-graph/build-project-graph.d.ts +26 -0
  948. package/dist/src/project-graph/build-project-graph.js +309 -0
  949. package/dist/src/project-graph/error-types.d.ts +156 -0
  950. package/dist/src/project-graph/error-types.js +523 -0
  951. package/dist/src/project-graph/file-map-utils.d.ts +18 -0
  952. package/dist/src/project-graph/file-map-utils.js +61 -0
  953. package/dist/src/project-graph/file-utils.d.ts +33 -0
  954. package/dist/src/project-graph/file-utils.js +196 -0
  955. package/dist/src/project-graph/nx-deps-cache.d.ts +65 -0
  956. package/dist/src/project-graph/nx-deps-cache.js +345 -0
  957. package/dist/src/project-graph/operators.d.ts +11 -0
  958. package/dist/src/project-graph/operators.js +70 -0
  959. package/dist/src/project-graph/plugins/get-plugins.d.ts +53 -0
  960. package/dist/src/project-graph/plugins/get-plugins.js +379 -0
  961. package/dist/src/project-graph/plugins/in-process-loader.d.ts +10 -0
  962. package/dist/src/project-graph/plugins/in-process-loader.js +58 -0
  963. package/dist/src/project-graph/plugins/index.d.ts +4 -0
  964. package/dist/src/project-graph/plugins/index.js +12 -0
  965. package/dist/src/project-graph/plugins/isolation/enabled.d.ts +1 -0
  966. package/dist/src/project-graph/plugins/isolation/enabled.js +19 -0
  967. package/dist/src/project-graph/plugins/isolation/index.d.ts +1 -0
  968. package/dist/src/project-graph/plugins/isolation/index.js +7 -0
  969. package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +103 -0
  970. package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +626 -0
  971. package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +12 -0
  972. package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.js +74 -0
  973. package/dist/src/project-graph/plugins/isolation/message-types.d.ts +59 -0
  974. package/dist/src/project-graph/plugins/isolation/message-types.js +9 -0
  975. package/dist/src/project-graph/plugins/isolation/messaging.d.ts +156 -0
  976. package/dist/src/project-graph/plugins/isolation/messaging.js +87 -0
  977. package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +82 -0
  978. package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.js +188 -0
  979. package/dist/src/project-graph/plugins/isolation/plugin-worker.d.ts +2 -0
  980. package/dist/src/project-graph/plugins/isolation/plugin-worker.js +225 -0
  981. package/dist/src/project-graph/plugins/isolation/worker-streaming.d.ts +14 -0
  982. package/dist/src/project-graph/plugins/isolation/worker-streaming.js +39 -0
  983. package/dist/src/project-graph/plugins/load-resolved-plugin.d.ts +3 -0
  984. package/dist/src/project-graph/plugins/load-resolved-plugin.js +24 -0
  985. package/dist/src/project-graph/plugins/loaded-nx-plugin.d.ts +44 -0
  986. package/dist/src/project-graph/plugins/loaded-nx-plugin.js +117 -0
  987. package/dist/src/project-graph/plugins/nx-plugin-capabilities.d.ts +6 -0
  988. package/dist/src/project-graph/plugins/nx-plugin-capabilities.js +28 -0
  989. package/dist/src/project-graph/plugins/public-api.d.ts +139 -0
  990. package/dist/src/project-graph/plugins/public-api.js +4 -0
  991. package/dist/src/project-graph/plugins/resolve-plugin.d.ts +25 -0
  992. package/dist/src/project-graph/plugins/resolve-plugin.js +277 -0
  993. package/dist/src/project-graph/plugins/task-results-stub.d.ts +50 -0
  994. package/dist/src/project-graph/plugins/task-results-stub.js +111 -0
  995. package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +4 -0
  996. package/dist/src/project-graph/plugins/tasks-execution-hooks.js +80 -0
  997. package/dist/src/project-graph/plugins/transpiler.d.ts +20 -0
  998. package/dist/src/project-graph/plugins/transpiler.js +99 -0
  999. package/dist/src/project-graph/plugins/utils.d.ts +4 -0
  1000. package/dist/src/project-graph/plugins/utils.js +32 -0
  1001. package/dist/src/project-graph/project-graph-builder.d.ts +133 -0
  1002. package/dist/src/project-graph/project-graph-builder.js +395 -0
  1003. package/dist/src/project-graph/project-graph.d.ts +54 -0
  1004. package/dist/src/project-graph/project-graph.js +461 -0
  1005. package/dist/src/project-graph/utils/build-all-workspace-files.d.ts +2 -0
  1006. package/dist/src/project-graph/utils/build-all-workspace-files.js +14 -0
  1007. package/dist/src/project-graph/utils/find-project-for-path.d.ts +20 -0
  1008. package/dist/src/project-graph/utils/find-project-for-path.js +55 -0
  1009. package/dist/src/project-graph/utils/implicit-project-dependencies.d.ts +3 -0
  1010. package/dist/src/project-graph/utils/implicit-project-dependencies.js +18 -0
  1011. package/dist/src/project-graph/utils/normalize-project-nodes.d.ts +6 -0
  1012. package/dist/src/project-graph/utils/normalize-project-nodes.js +117 -0
  1013. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +48 -0
  1014. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +270 -0
  1015. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +49 -0
  1016. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +296 -0
  1017. package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +34 -0
  1018. package/dist/src/project-graph/utils/project-configuration/source-maps.js +85 -0
  1019. package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +50 -0
  1020. package/dist/src/project-graph/utils/project-configuration/target-defaults.js +466 -0
  1021. package/dist/src/project-graph/utils/project-configuration/target-merging.d.ts +32 -0
  1022. package/dist/src/project-graph/utils/project-configuration/target-merging.js +574 -0
  1023. package/dist/src/project-graph/utils/project-configuration/target-normalization.d.ts +12 -0
  1024. package/dist/src/project-graph/utils/project-configuration/target-normalization.js +396 -0
  1025. package/dist/src/project-graph/utils/project-configuration/utils.d.ts +39 -0
  1026. package/dist/src/project-graph/utils/project-configuration/utils.js +216 -0
  1027. package/dist/src/project-graph/utils/project-configuration-utils.d.ts +86 -0
  1028. package/dist/src/project-graph/utils/project-configuration-utils.js +325 -0
  1029. package/dist/src/project-graph/utils/retrieve-workspace-files.d.ts +35 -0
  1030. package/dist/src/project-graph/utils/retrieve-workspace-files.js +110 -0
  1031. package/dist/src/tasks-runner/batch/batch-messages.d.ts +35 -0
  1032. package/dist/src/tasks-runner/batch/batch-messages.js +9 -0
  1033. package/dist/src/tasks-runner/batch/run-batch.d.ts +1 -0
  1034. package/dist/src/tasks-runner/batch/run-batch.js +93 -0
  1035. package/dist/src/tasks-runner/cache.d.ts +129 -0
  1036. package/dist/src/tasks-runner/cache.js +645 -0
  1037. package/dist/src/tasks-runner/create-task-graph.d.ts +64 -0
  1038. package/dist/src/tasks-runner/create-task-graph.js +360 -0
  1039. package/dist/src/tasks-runner/default-tasks-runner.d.ts +25 -0
  1040. package/dist/src/tasks-runner/default-tasks-runner.js +74 -0
  1041. package/dist/src/tasks-runner/fork.d.ts +1 -0
  1042. package/dist/src/tasks-runner/fork.js +73 -0
  1043. package/dist/src/tasks-runner/forked-process-task-runner.d.ts +45 -0
  1044. package/dist/src/tasks-runner/forked-process-task-runner.js +309 -0
  1045. package/dist/src/tasks-runner/init-tasks-runner.d.ts +12 -0
  1046. package/dist/src/tasks-runner/init-tasks-runner.js +124 -0
  1047. package/dist/src/tasks-runner/is-tui-enabled.d.ts +18 -0
  1048. package/dist/src/tasks-runner/is-tui-enabled.js +94 -0
  1049. package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +18 -0
  1050. package/dist/src/tasks-runner/legacy-depends-on-warning.js +109 -0
  1051. package/dist/src/tasks-runner/life-cycle.d.ts +93 -0
  1052. package/dist/src/tasks-runner/life-cycle.js +155 -0
  1053. package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +25 -0
  1054. package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +366 -0
  1055. package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +24 -0
  1056. package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +238 -0
  1057. package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +5 -0
  1058. package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +16 -0
  1059. package/dist/src/tasks-runner/life-cycles/formatting-utils.d.ts +3 -0
  1060. package/dist/src/tasks-runner/life-cycles/formatting-utils.js +55 -0
  1061. package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +13 -0
  1062. package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +67 -0
  1063. package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +173 -0
  1064. package/dist/src/tasks-runner/life-cycles/performance-analysis.js +508 -0
  1065. package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +59 -0
  1066. package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +193 -0
  1067. package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +77 -0
  1068. package/dist/src/tasks-runner/life-cycles/performance-report.js +428 -0
  1069. package/dist/src/tasks-runner/life-cycles/pretty-time.d.ts +4 -0
  1070. package/dist/src/tasks-runner/life-cycles/pretty-time.js +73 -0
  1071. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +54 -0
  1072. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +203 -0
  1073. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +54 -0
  1074. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +193 -0
  1075. package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +17 -0
  1076. package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.js +87 -0
  1077. package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.d.ts +35 -0
  1078. package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.js +146 -0
  1079. package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +11 -0
  1080. package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +91 -0
  1081. package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +16 -0
  1082. package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.js +117 -0
  1083. package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +14 -0
  1084. package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.js +73 -0
  1085. package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts +6 -0
  1086. package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.js +17 -0
  1087. package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts +9 -0
  1088. package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.js +42 -0
  1089. package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +8 -0
  1090. package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.js +39 -0
  1091. package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +19 -0
  1092. package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +339 -0
  1093. package/dist/src/tasks-runner/life-cycles/view-logs-utils.d.ts +1 -0
  1094. package/dist/src/tasks-runner/life-cycles/view-logs-utils.js +15 -0
  1095. package/dist/src/tasks-runner/process-metrics-service.d.ts +53 -0
  1096. package/dist/src/tasks-runner/process-metrics-service.js +161 -0
  1097. package/dist/src/tasks-runner/prune-task-graph.d.ts +17 -0
  1098. package/dist/src/tasks-runner/prune-task-graph.js +45 -0
  1099. package/dist/src/tasks-runner/pseudo-ipc.d.ts +48 -0
  1100. package/dist/src/tasks-runner/pseudo-ipc.js +157 -0
  1101. package/dist/src/tasks-runner/pseudo-terminal.d.ts +72 -0
  1102. package/dist/src/tasks-runner/pseudo-terminal.js +209 -0
  1103. package/dist/src/tasks-runner/remove-old-cache-records.d.ts +1 -0
  1104. package/dist/src/tasks-runner/remove-old-cache-records.js +60 -0
  1105. package/dist/src/tasks-runner/run-command.d.ts +78 -0
  1106. package/dist/src/tasks-runner/run-command.js +971 -0
  1107. package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +148 -0
  1108. package/dist/src/tasks-runner/running-tasks/batch-process.js +362 -0
  1109. package/dist/src/tasks-runner/running-tasks/node-child-process.d.ts +40 -0
  1110. package/dist/src/tasks-runner/running-tasks/node-child-process.js +175 -0
  1111. package/dist/src/tasks-runner/running-tasks/noop-child-process.d.ts +16 -0
  1112. package/dist/src/tasks-runner/running-tasks/noop-child-process.js +22 -0
  1113. package/dist/src/tasks-runner/running-tasks/output-prefix.d.ts +13 -0
  1114. package/dist/src/tasks-runner/running-tasks/output-prefix.js +63 -0
  1115. package/dist/src/tasks-runner/running-tasks/running-task.d.ts +11 -0
  1116. package/dist/src/tasks-runner/running-tasks/running-task.js +6 -0
  1117. package/dist/src/tasks-runner/running-tasks/shared-running-task.d.ts +15 -0
  1118. package/dist/src/tasks-runner/running-tasks/shared-running-task.js +41 -0
  1119. package/dist/src/tasks-runner/task-env-paths.d.ts +1 -0
  1120. package/dist/src/tasks-runner/task-env-paths.js +45 -0
  1121. package/dist/src/tasks-runner/task-env.d.ts +56 -0
  1122. package/dist/src/tasks-runner/task-env.js +237 -0
  1123. package/dist/src/tasks-runner/task-graph-utils.d.ts +30 -0
  1124. package/dist/src/tasks-runner/task-graph-utils.js +225 -0
  1125. package/dist/src/tasks-runner/task-io-service.d.ts +104 -0
  1126. package/dist/src/tasks-runner/task-io-service.js +131 -0
  1127. package/dist/src/tasks-runner/task-orchestrator.d.ts +330 -0
  1128. package/dist/src/tasks-runner/task-orchestrator.js +1749 -0
  1129. package/dist/src/tasks-runner/tasks-runner.d.ts +26 -0
  1130. package/dist/src/tasks-runner/tasks-runner.js +2 -0
  1131. package/dist/src/tasks-runner/tasks-schedule.d.ts +48 -0
  1132. package/dist/src/tasks-runner/tasks-schedule.js +258 -0
  1133. package/dist/src/tasks-runner/terminal-output-path.d.ts +11 -0
  1134. package/dist/src/tasks-runner/terminal-output-path.js +18 -0
  1135. package/dist/src/tasks-runner/utils.d.ts +66 -0
  1136. package/dist/src/tasks-runner/utils.js +459 -0
  1137. package/dist/src/ultracache/config.d.ts +21 -0
  1138. package/dist/src/ultracache/config.js +29 -0
  1139. package/dist/src/ultracache/fetch.d.ts +21 -0
  1140. package/dist/src/ultracache/fetch.js +43 -0
  1141. package/dist/src/ultracache/overrides.d.ts +17 -0
  1142. package/dist/src/ultracache/overrides.js +61 -0
  1143. package/dist/src/ultracache/report.d.ts +13 -0
  1144. package/dist/src/ultracache/report.js +62 -0
  1145. package/dist/src/ultracache/store.d.ts +41 -0
  1146. package/dist/src/ultracache/store.js +158 -0
  1147. package/dist/src/utils/ab-testing.d.ts +62 -0
  1148. package/dist/src/utils/ab-testing.js +145 -0
  1149. package/dist/src/utils/acknowledge-build-scripts.d.ts +13 -0
  1150. package/dist/src/utils/acknowledge-build-scripts.js +102 -0
  1151. package/dist/src/utils/all-file-data.d.ts +2 -0
  1152. package/dist/src/utils/all-file-data.js +8 -0
  1153. package/dist/src/utils/analytics-enabled.d.ts +7 -0
  1154. package/dist/src/utils/analytics-enabled.js +11 -0
  1155. package/dist/src/utils/analytics-prompt.d.ts +9 -0
  1156. package/dist/src/utils/analytics-prompt.js +81 -0
  1157. package/dist/src/utils/assert-workspace-validity.d.ts +3 -0
  1158. package/dist/src/utils/assert-workspace-validity.js +90 -0
  1159. package/dist/src/utils/async-iterator.d.ts +2 -0
  1160. package/dist/src/utils/async-iterator.js +18 -0
  1161. package/dist/src/utils/binary-extensions.d.ts +1 -0
  1162. package/dist/src/utils/binary-extensions.js +279 -0
  1163. package/dist/src/utils/cache-directory.d.ts +68 -0
  1164. package/dist/src/utils/cache-directory.js +337 -0
  1165. package/dist/src/utils/call-sites.d.ts +14 -0
  1166. package/dist/src/utils/call-sites.js +28 -0
  1167. package/dist/src/utils/catalog/bun-manager-utils.d.ts +8 -0
  1168. package/dist/src/utils/catalog/bun-manager-utils.js +174 -0
  1169. package/dist/src/utils/catalog/bun-manager.d.ts +28 -0
  1170. package/dist/src/utils/catalog/bun-manager.js +130 -0
  1171. package/dist/src/utils/catalog/index.d.ts +22 -0
  1172. package/dist/src/utils/catalog/index.js +87 -0
  1173. package/dist/src/utils/catalog/manager-factory.d.ts +5 -0
  1174. package/dist/src/utils/catalog/manager-factory.js +23 -0
  1175. package/dist/src/utils/catalog/manager-utils.d.ts +15 -0
  1176. package/dist/src/utils/catalog/manager-utils.js +237 -0
  1177. package/dist/src/utils/catalog/manager.d.ts +52 -0
  1178. package/dist/src/utils/catalog/manager.js +43 -0
  1179. package/dist/src/utils/catalog/pnpm-manager.d.ts +23 -0
  1180. package/dist/src/utils/catalog/pnpm-manager.js +142 -0
  1181. package/dist/src/utils/catalog/types.d.ts +15 -0
  1182. package/dist/src/utils/catalog/types.js +2 -0
  1183. package/dist/src/utils/catalog/yarn-manager.d.ts +26 -0
  1184. package/dist/src/utils/catalog/yarn-manager.js +130 -0
  1185. package/dist/src/utils/child-process.d.ts +52 -0
  1186. package/dist/src/utils/child-process.js +194 -0
  1187. package/dist/src/utils/chunkify.d.ts +11 -0
  1188. package/dist/src/utils/chunkify.js +45 -0
  1189. package/dist/src/utils/code-frames.d.ts +14 -0
  1190. package/dist/src/utils/code-frames.js +116 -0
  1191. package/dist/src/utils/command-line-utils.d.ts +77 -0
  1192. package/dist/src/utils/command-line-utils.js +266 -0
  1193. package/dist/src/utils/compile-cache.d.ts +24 -0
  1194. package/dist/src/utils/compile-cache.js +49 -0
  1195. package/dist/src/utils/consume-messages-from-socket.d.ts +44 -0
  1196. package/dist/src/utils/consume-messages-from-socket.js +291 -0
  1197. package/dist/src/utils/create-cli-options.d.ts +6 -0
  1198. package/dist/src/utils/create-cli-options.js +29 -0
  1199. package/dist/src/utils/db-connection.d.ts +16 -0
  1200. package/dist/src/utils/db-connection.js +58 -0
  1201. package/dist/src/utils/default-base.d.ts +1 -0
  1202. package/dist/src/utils/default-base.js +17 -0
  1203. package/dist/src/utils/delayed-spinner.d.ts +51 -0
  1204. package/dist/src/utils/delayed-spinner.js +88 -0
  1205. package/dist/src/utils/dotenv.d.ts +7 -0
  1206. package/dist/src/utils/dotenv.js +19 -0
  1207. package/dist/src/utils/enable-compile-cache.d.ts +1 -0
  1208. package/dist/src/utils/enable-compile-cache.js +7 -0
  1209. package/dist/src/utils/exit-codes.d.ts +24 -0
  1210. package/dist/src/utils/exit-codes.js +94 -0
  1211. package/dist/src/utils/fileutils.d.ts +72 -0
  1212. package/dist/src/utils/fileutils.js +117 -0
  1213. package/dist/src/utils/find-matching-projects.d.ts +18 -0
  1214. package/dist/src/utils/find-matching-projects.js +222 -0
  1215. package/dist/src/utils/find-workspace-root.d.ts +11 -0
  1216. package/dist/src/utils/find-workspace-root.js +33 -0
  1217. package/dist/src/utils/formatters/index.d.ts +19 -0
  1218. package/dist/src/utils/formatters/index.js +79 -0
  1219. package/dist/src/utils/formatters/oxfmt.d.ts +32 -0
  1220. package/dist/src/utils/formatters/oxfmt.js +764 -0
  1221. package/dist/src/utils/formatters/prettier.d.ts +18 -0
  1222. package/dist/src/utils/formatters/prettier.js +179 -0
  1223. package/dist/src/utils/formatters/shared.d.ts +5 -0
  1224. package/dist/src/utils/formatters/shared.js +8 -0
  1225. package/dist/src/utils/get-package-name-from-import-path.d.ts +1 -0
  1226. package/dist/src/utils/get-package-name-from-import-path.js +17 -0
  1227. package/dist/src/utils/git-revision.d.ts +12 -0
  1228. package/dist/src/utils/git-revision.js +25 -0
  1229. package/dist/src/utils/git-utils.d.ts +125 -0
  1230. package/dist/src/utils/git-utils.index-filter.d.ts +1 -0
  1231. package/dist/src/utils/git-utils.index-filter.js +23 -0
  1232. package/dist/src/utils/git-utils.js +991 -0
  1233. package/dist/src/utils/git-utils.tree-filter.d.ts +1 -0
  1234. package/dist/src/utils/git-utils.tree-filter.js +47 -0
  1235. package/dist/src/utils/git-worktrees.d.ts +30 -0
  1236. package/dist/src/utils/git-worktrees.js +212 -0
  1237. package/dist/src/utils/globs.d.ts +3 -0
  1238. package/dist/src/utils/globs.js +18 -0
  1239. package/dist/src/utils/handle-errors.d.ts +1 -0
  1240. package/dist/src/utils/handle-errors.js +53 -0
  1241. package/dist/src/utils/handle-import.d.ts +15 -0
  1242. package/dist/src/utils/handle-import.js +86 -0
  1243. package/dist/src/utils/has-nx-js-plugin.d.ts +9 -0
  1244. package/dist/src/utils/has-nx-js-plugin.js +24 -0
  1245. package/dist/src/utils/http-client.d.ts +27 -0
  1246. package/dist/src/utils/http-client.js +193 -0
  1247. package/dist/src/utils/ignore.d.ts +178 -0
  1248. package/dist/src/utils/ignore.js +294 -0
  1249. package/dist/src/utils/installation-directory.d.ts +2 -0
  1250. package/dist/src/utils/installation-directory.js +12 -0
  1251. package/dist/src/utils/installed-nx-version.d.ts +23 -0
  1252. package/dist/src/utils/installed-nx-version.js +67 -0
  1253. package/dist/src/utils/is-ci.d.ts +1 -0
  1254. package/dist/src/utils/is-ci.js +26 -0
  1255. package/dist/src/utils/is-sandbox.d.ts +1 -0
  1256. package/dist/src/utils/is-sandbox.js +11 -0
  1257. package/dist/src/utils/json-diff.d.ts +20 -0
  1258. package/dist/src/utils/json-diff.js +24 -0
  1259. package/dist/src/utils/json.d.ts +44 -0
  1260. package/dist/src/utils/json.js +62 -0
  1261. package/dist/src/utils/kill-child-on-host-exit.d.ts +7 -0
  1262. package/dist/src/utils/kill-child-on-host-exit.js +42 -0
  1263. package/dist/src/utils/legacy-task-history.d.ts +8 -0
  1264. package/dist/src/utils/legacy-task-history.js +87 -0
  1265. package/dist/src/utils/logger.d.ts +23 -0
  1266. package/dist/src/utils/logger.js +74 -0
  1267. package/dist/src/utils/long-running-target.d.ts +10 -0
  1268. package/dist/src/utils/long-running-target.js +19 -0
  1269. package/dist/src/utils/machine-id-cache.d.ts +5 -0
  1270. package/dist/src/utils/machine-id-cache.js +93 -0
  1271. package/dist/src/utils/min-release-age/behavior/bun.d.ts +30 -0
  1272. package/dist/src/utils/min-release-age/behavior/bun.js +274 -0
  1273. package/dist/src/utils/min-release-age/behavior/npm.d.ts +21 -0
  1274. package/dist/src/utils/min-release-age/behavior/npm.js +296 -0
  1275. package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +23 -0
  1276. package/dist/src/utils/min-release-age/behavior/pnpm.js +535 -0
  1277. package/dist/src/utils/min-release-age/behavior/yarn.d.ts +22 -0
  1278. package/dist/src/utils/min-release-age/behavior/yarn.js +314 -0
  1279. package/dist/src/utils/min-release-age/constants.d.ts +3 -0
  1280. package/dist/src/utils/min-release-age/constants.js +8 -0
  1281. package/dist/src/utils/min-release-age/errors.d.ts +28 -0
  1282. package/dist/src/utils/min-release-age/errors.js +22 -0
  1283. package/dist/src/utils/min-release-age/packument.d.ts +13 -0
  1284. package/dist/src/utils/min-release-age/packument.js +34 -0
  1285. package/dist/src/utils/min-release-age/pick.d.ts +72 -0
  1286. package/dist/src/utils/min-release-age/pick.js +206 -0
  1287. package/dist/src/utils/min-release-age/pnpm-exclude-writer.d.ts +12 -0
  1288. package/dist/src/utils/min-release-age/pnpm-exclude-writer.js +58 -0
  1289. package/dist/src/utils/min-release-age/policy.d.ts +38 -0
  1290. package/dist/src/utils/min-release-age/policy.js +59 -0
  1291. package/dist/src/utils/min-release-age/resolve.d.ts +8 -0
  1292. package/dist/src/utils/min-release-age/resolve.js +14 -0
  1293. package/dist/src/utils/nx-cloud-utils.d.ts +6 -0
  1294. package/dist/src/utils/nx-cloud-utils.js +33 -0
  1295. package/dist/src/utils/nx-console-prompt.d.ts +1 -0
  1296. package/dist/src/utils/nx-console-prompt.js +61 -0
  1297. package/dist/src/utils/nx-key.d.ts +6 -0
  1298. package/dist/src/utils/nx-key.js +50 -0
  1299. package/dist/src/utils/nx-package-group.d.ts +8 -0
  1300. package/dist/src/utils/nx-package-group.js +15 -0
  1301. package/dist/src/utils/nx-tmp-dir.d.ts +23 -0
  1302. package/dist/src/utils/nx-tmp-dir.js +45 -0
  1303. package/dist/src/utils/object-sort.d.ts +1 -0
  1304. package/dist/src/utils/object-sort.js +9 -0
  1305. package/dist/src/utils/output.d.ts +251 -0
  1306. package/dist/src/utils/output.js +571 -0
  1307. package/dist/src/utils/owned-private-dir.d.ts +145 -0
  1308. package/dist/src/utils/owned-private-dir.js +362 -0
  1309. package/dist/src/utils/package-json.d.ts +256 -0
  1310. package/dist/src/utils/package-json.js +441 -0
  1311. package/dist/src/utils/package-manager-config/bunfig.d.ts +14 -0
  1312. package/dist/src/utils/package-manager-config/bunfig.js +49 -0
  1313. package/dist/src/utils/package-manager-config/npmrc.d.ts +23 -0
  1314. package/dist/src/utils/package-manager-config/npmrc.js +124 -0
  1315. package/dist/src/utils/package-manager-config/pnpm-config.d.ts +17 -0
  1316. package/dist/src/utils/package-manager-config/pnpm-config.js +60 -0
  1317. package/dist/src/utils/package-manager.d.ts +167 -0
  1318. package/dist/src/utils/package-manager.js +860 -0
  1319. package/dist/src/utils/params.d.ts +146 -0
  1320. package/dist/src/utils/params.js +768 -0
  1321. package/dist/src/utils/path.d.ts +25 -0
  1322. package/dist/src/utils/path.js +53 -0
  1323. package/dist/src/utils/perf-hooks.d.ts +19 -0
  1324. package/dist/src/utils/perf-logging.d.ts +1 -0
  1325. package/dist/src/utils/perf-logging.js +46 -0
  1326. package/dist/src/utils/permission-errors.d.ts +11 -0
  1327. package/dist/src/utils/permission-errors.js +17 -0
  1328. package/dist/src/utils/plugin-cache-utils.d.ts +82 -0
  1329. package/dist/src/utils/plugin-cache-utils.js +212 -0
  1330. package/dist/src/utils/plugin-progress-text.d.ts +1 -0
  1331. package/dist/src/utils/plugin-progress-text.js +15 -0
  1332. package/dist/src/utils/plugins/atomizer-utils.d.ts +11 -0
  1333. package/dist/src/utils/plugins/atomizer-utils.js +23 -0
  1334. package/dist/src/utils/plugins/core-plugins.d.ts +6 -0
  1335. package/dist/src/utils/plugins/core-plugins.js +117 -0
  1336. package/dist/src/utils/plugins/index.d.ts +5 -0
  1337. package/dist/src/utils/plugins/index.js +15 -0
  1338. package/dist/src/utils/plugins/installed-plugins.d.ts +5 -0
  1339. package/dist/src/utils/plugins/installed-plugins.js +76 -0
  1340. package/dist/src/utils/plugins/local-plugins.d.ts +22 -0
  1341. package/dist/src/utils/plugins/local-plugins.js +60 -0
  1342. package/dist/src/utils/plugins/output.d.ts +34 -0
  1343. package/dist/src/utils/plugins/output.js +201 -0
  1344. package/dist/src/utils/plugins/plugin-capabilities.d.ts +15 -0
  1345. package/dist/src/utils/plugins/plugin-capabilities.js +83 -0
  1346. package/dist/src/utils/pnpm-workspace.d.ts +8 -0
  1347. package/dist/src/utils/pnpm-workspace.js +2 -0
  1348. package/dist/src/utils/print-help.d.ts +11 -0
  1349. package/dist/src/utils/print-help.js +259 -0
  1350. package/dist/src/utils/progress-topics.d.ts +19 -0
  1351. package/dist/src/utils/progress-topics.js +21 -0
  1352. package/dist/src/utils/project-graph-utils.d.ts +20 -0
  1353. package/dist/src/utils/project-graph-utils.js +90 -0
  1354. package/dist/src/utils/promised-based-queue.d.ts +6 -0
  1355. package/dist/src/utils/promised-based-queue.js +43 -0
  1356. package/dist/src/utils/prompt-helpers.d.ts +53 -0
  1357. package/dist/src/utils/prompt-helpers.js +111 -0
  1358. package/dist/src/utils/provenance.d.ts +47 -0
  1359. package/dist/src/utils/provenance.js +123 -0
  1360. package/dist/src/utils/registry-config/bun.d.ts +2 -0
  1361. package/dist/src/utils/registry-config/bun.js +257 -0
  1362. package/dist/src/utils/registry-config/index.d.ts +13 -0
  1363. package/dist/src/utils/registry-config/index.js +102 -0
  1364. package/dist/src/utils/registry-config/pnpm.d.ts +2 -0
  1365. package/dist/src/utils/registry-config/pnpm.js +1551 -0
  1366. package/dist/src/utils/registry-config/utils.d.ts +195 -0
  1367. package/dist/src/utils/registry-config/utils.js +496 -0
  1368. package/dist/src/utils/registry-config/yarn-berry.d.ts +2 -0
  1369. package/dist/src/utils/registry-config/yarn-berry.js +612 -0
  1370. package/dist/src/utils/registry-config/yarn-classic.d.ts +2 -0
  1371. package/dist/src/utils/registry-config/yarn-classic.js +1001 -0
  1372. package/dist/src/utils/require-nx-key.d.ts +1 -0
  1373. package/dist/src/utils/require-nx-key.js +23 -0
  1374. package/dist/src/utils/safe-spawn.d.ts +24 -0
  1375. package/dist/src/utils/safe-spawn.js +104 -0
  1376. package/dist/src/utils/serializable-error.d.ts +4 -0
  1377. package/dist/src/utils/serializable-error.js +33 -0
  1378. package/dist/src/utils/serialize-overrides-into-command-line.d.ts +3 -0
  1379. package/dist/src/utils/serialize-overrides-into-command-line.js +39 -0
  1380. package/dist/src/utils/serialize-target.d.ts +1 -0
  1381. package/dist/src/utils/serialize-target.js +6 -0
  1382. package/dist/src/utils/shell-quoting.d.ts +25 -0
  1383. package/dist/src/utils/shell-quoting.js +76 -0
  1384. package/dist/src/utils/socket-refused-exit-code.d.ts +15 -0
  1385. package/dist/src/utils/socket-refused-exit-code.js +18 -0
  1386. package/dist/src/utils/spinner.d.ts +24 -0
  1387. package/dist/src/utils/spinner.js +77 -0
  1388. package/dist/src/utils/split-target.d.ts +15 -0
  1389. package/dist/src/utils/split-target.js +239 -0
  1390. package/dist/src/utils/strip-indents.d.ts +14 -0
  1391. package/dist/src/utils/strip-indents.js +23 -0
  1392. package/dist/src/utils/sync-generators.d.ts +66 -0
  1393. package/dist/src/utils/sync-generators.js +355 -0
  1394. package/dist/src/utils/tar.d.ts +8 -0
  1395. package/dist/src/utils/tar.js +44 -0
  1396. package/dist/src/utils/task-history.d.ts +17 -0
  1397. package/dist/src/utils/task-history.js +51 -0
  1398. package/dist/src/utils/terminal-link.d.ts +20 -0
  1399. package/dist/src/utils/terminal-link.js +85 -0
  1400. package/dist/src/utils/update-nxw.d.ts +2 -0
  1401. package/dist/src/utils/update-nxw.js +22 -0
  1402. package/dist/src/utils/versions.d.ts +1 -0
  1403. package/dist/src/utils/versions.js +4 -0
  1404. package/dist/src/utils/wait-for-socket-connection.d.ts +26 -0
  1405. package/dist/src/utils/wait-for-socket-connection.js +59 -0
  1406. package/dist/src/utils/workspace-context.d.ts +69 -0
  1407. package/dist/src/utils/workspace-context.js +284 -0
  1408. package/dist/src/utils/workspace-id.d.ts +20 -0
  1409. package/dist/src/utils/workspace-id.js +54 -0
  1410. package/dist/src/utils/workspace-root.d.ts +6 -0
  1411. package/dist/src/utils/workspace-root.js +40 -0
  1412. package/dist/src/utils/write-formatted-json-file.d.ts +7 -0
  1413. package/dist/src/utils/write-formatted-json-file.js +24 -0
  1414. package/dist/src/utils/yarn-syml/index.d.ts +23 -0
  1415. package/dist/src/utils/yarn-syml/index.js +151 -0
  1416. package/dist/src/utils/yarn-syml/syml-grammar.js +1911 -0
  1417. package/dist/tasks-runners/default.d.ts +1 -0
  1418. package/dist/tasks-runners/default.js +5 -0
  1419. package/executors.json +19 -0
  1420. package/generators.json +16 -0
  1421. package/migrations.json +195 -0
  1422. package/package.json +516 -9
  1423. package/readme-template.md +16 -0
  1424. package/schemas/migrations-schema.json +186 -0
  1425. package/schemas/nx-schema.json +1653 -0
  1426. package/schemas/project-schema.json +461 -0
  1427. package/schemas/workspace-schema.json +185 -0
  1428. package/local-natives.js +0 -59
@@ -0,0 +1,1284 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.daemonClient = exports.DaemonClient = exports.WatcherFailedError = void 0;
4
+ exports.isDaemonEnabled = isDaemonEnabled;
5
+ exports.daemonPermissionException = daemonPermissionException;
6
+ exports.daemonProcessException = daemonProcessException;
7
+ const child_process_1 = require("child_process");
8
+ const net_1 = require("net");
9
+ const node_fs_1 = require("node:fs");
10
+ const path_1 = require("path");
11
+ const perf_hooks_1 = require("perf_hooks");
12
+ const configuration_1 = require("../../config/configuration");
13
+ const nx_json_1 = require("../../config/nx-json");
14
+ const prune_task_graph_1 = require("../../tasks-runner/prune-task-graph");
15
+ const native_1 = require("../../native");
16
+ const error_types_1 = require("../../project-graph/error-types");
17
+ const typescript_1 = require("../../plugins/js/utils/typescript");
18
+ const project_graph_1 = require("../../project-graph/project-graph");
19
+ const consume_messages_from_socket_1 = require("../../utils/consume-messages-from-socket");
20
+ const delayed_spinner_1 = require("../../utils/delayed-spinner");
21
+ const handle_import_1 = require("../../utils/handle-import");
22
+ const is_ci_1 = require("../../utils/is-ci");
23
+ const is_sandbox_1 = require("../../utils/is-sandbox");
24
+ const output_1 = require("../../utils/output");
25
+ const permission_errors_1 = require("../../utils/permission-errors");
26
+ const promised_based_queue_1 = require("../../utils/promised-based-queue");
27
+ const wait_for_socket_connection_1 = require("../../utils/wait-for-socket-connection");
28
+ const workspace_root_1 = require("../../utils/workspace-root");
29
+ const cache_1 = require("../cache");
30
+ const is_nx_version_mismatch_1 = require("../is-nx-version-mismatch");
31
+ const logger_1 = require("../logger");
32
+ const configure_ai_agents_1 = require("../message-types/configure-ai-agents");
33
+ const flush_sync_generator_changes_to_disk_1 = require("../message-types/flush-sync-generator-changes-to-disk");
34
+ const get_context_file_data_1 = require("../message-types/get-context-file-data");
35
+ const get_files_in_directory_1 = require("../message-types/get-files-in-directory");
36
+ const get_nx_workspace_files_1 = require("../message-types/get-nx-workspace-files");
37
+ const get_registered_sync_generators_1 = require("../message-types/get-registered-sync-generators");
38
+ const get_plugin_capabilities_1 = require("../message-types/get-plugin-capabilities");
39
+ const select_affected_tasks_1 = require("../message-types/select-affected-tasks");
40
+ const get_sync_generator_changes_1 = require("../message-types/get-sync-generator-changes");
41
+ const hash_glob_1 = require("../message-types/hash-glob");
42
+ const nx_console_1 = require("../message-types/nx-console");
43
+ const register_project_graph_listener_1 = require("../message-types/register-project-graph-listener");
44
+ const run_tasks_execution_hooks_1 = require("../message-types/run-tasks-execution-hooks");
45
+ const streaming_messages_1 = require("../message-types/streaming-messages");
46
+ const task_history_1 = require("../message-types/task-history");
47
+ const update_workspace_context_1 = require("../message-types/update-workspace-context");
48
+ const tmp_dir_1 = require("../tmp-dir");
49
+ const sandbox_socket_hint_1 = require("../sandbox-socket-hint");
50
+ const socket_refused_exit_code_1 = require("../../utils/socket-refused-exit-code");
51
+ const daemon_socket_messenger_1 = require("./daemon-socket-messenger");
52
+ const daemon_environment_1 = require("./daemon-environment");
53
+ var DaemonStatus;
54
+ (function (DaemonStatus) {
55
+ DaemonStatus[DaemonStatus["CONNECTING"] = 0] = "CONNECTING";
56
+ DaemonStatus[DaemonStatus["DISCONNECTED"] = 1] = "DISCONNECTED";
57
+ DaemonStatus[DaemonStatus["CONNECTED"] = 2] = "CONNECTED";
58
+ })(DaemonStatus || (DaemonStatus = {}));
59
+ const WAIT_FOR_SERVER_CONFIG = {
60
+ delayMs: 10,
61
+ maxAttempts: 6000, // 6000 * 10ms = 60 seconds
62
+ };
63
+ /**
64
+ * The daemon's workspace watcher died. Nothing it serves will see file changes
65
+ * again, so a watching client has to restart rather than keep waiting.
66
+ */
67
+ class WatcherFailedError extends Error {
68
+ constructor(message) {
69
+ super(message);
70
+ this.name = 'WatcherFailedError';
71
+ Object.setPrototypeOf(this, WatcherFailedError.prototype);
72
+ }
73
+ }
74
+ exports.WatcherFailedError = WatcherFailedError;
75
+ /**
76
+ * A framing failure repeats on every redial, so the watcher channels stop
77
+ * re-dialing once this many land back to back without a message in between.
78
+ */
79
+ const MAX_CONSECUTIVE_FRAMING_FAILURES = 3;
80
+ // Task results get written back onto these task objects as the run
81
+ // progresses — hash/hashDetails/timestamps by hashing and the orchestrator,
82
+ // terminalOutput by the Nx Cloud life cycle (untyped) — so a later message
83
+ // would otherwise re-ship every earlier result.
84
+ function withoutTaskResults(tasks, taskGraph) {
85
+ const pruned = (0, prune_task_graph_1.pruneTaskGraph)(taskGraph);
86
+ return { tasks: tasks.map((t) => pruned.tasks[t.id]), taskGraph: pruned };
87
+ }
88
+ class DaemonClient {
89
+ constructor() {
90
+ // Tracks the spinner owned by the in-flight request so streamed
91
+ // progress updates are routed to the caller's spinner instead of
92
+ // mutating the process-wide globalSpinner (which may belong to an
93
+ // unrelated command).
94
+ this.currentSpinner = null;
95
+ this._daemonStatus = DaemonStatus.DISCONNECTED;
96
+ this._waitForDaemonReady = null;
97
+ this._daemonReady = null;
98
+ this.fileWatcherReconnecting = false;
99
+ this.fileWatcherFramingFailures = 0;
100
+ this.fileWatcherCallbacks = new Map();
101
+ this.fileWatcherConfigs = new Map();
102
+ this.projectGraphListenerReconnecting = false;
103
+ this.projectGraphListenerFramingFailures = 0;
104
+ this.projectGraphListenerCallbacks = new Map();
105
+ this.envReflectionSent = false;
106
+ try {
107
+ this.nxJson = (0, configuration_1.readNxJson)();
108
+ }
109
+ catch (e) {
110
+ this.nxJson = null;
111
+ }
112
+ this.reset();
113
+ }
114
+ enabled() {
115
+ if (this._enabled === undefined) {
116
+ const useDaemonProcessOption = this.nxJson?.useDaemonProcess;
117
+ const env = process.env.NX_DAEMON;
118
+ // env takes precedence
119
+ // option=true,env=false => no daemon
120
+ // option=false,env=undefined => no daemon
121
+ // option=false,env=false => no daemon
122
+ // option=undefined,env=undefined => daemon
123
+ // option=true,env=true => daemon
124
+ // option=false,env=true => daemon
125
+ // CI=true,env=undefined => no daemon
126
+ // CI=true,env=false => no daemon
127
+ // CI=true,env=true => daemon
128
+ // docker=true,env=undefined => no daemon
129
+ // docker=true,env=false => no daemon
130
+ // docker=true,env=true => daemon
131
+ // WASM => no daemon because file watching does not work
132
+ // version mismatch => no daemon because the installed nx version differs from the running one
133
+ if ((0, is_nx_version_mismatch_1.isNxVersionMismatch)() ||
134
+ (((0, is_ci_1.isCI)() || isDocker()) && env !== 'true') ||
135
+ (0, tmp_dir_1.isDaemonDisabled)() ||
136
+ nxJsonIsNotPresent() ||
137
+ (useDaemonProcessOption === undefined && env === 'false') ||
138
+ (useDaemonProcessOption === true && env === 'false') ||
139
+ (useDaemonProcessOption === false && env === undefined) ||
140
+ (useDaemonProcessOption === false && env === 'false')) {
141
+ this._enabled = false;
142
+ }
143
+ else if (native_1.IS_WASM) {
144
+ output_1.output.warn({
145
+ title: 'The Nx Daemon is unsupported in WebAssembly environments. Some things may be slower than or not function as expected.',
146
+ });
147
+ this._enabled = false;
148
+ }
149
+ else {
150
+ this._enabled = true;
151
+ }
152
+ }
153
+ return this._enabled;
154
+ }
155
+ reset() {
156
+ this.socketMessenger?.close();
157
+ this.socketMessenger = null;
158
+ this.queue = new promised_based_queue_1.PromisedBasedQueue();
159
+ this.currentMessage = null;
160
+ this.currentResolve = null;
161
+ this.currentReject = null;
162
+ this._enabled = undefined;
163
+ // Clean up file watcher and project graph listener connections
164
+ this.fileWatcherMessenger?.close();
165
+ this.fileWatcherMessenger = undefined;
166
+ this.projectGraphListenerMessenger?.close();
167
+ this.projectGraphListenerMessenger = undefined;
168
+ this._daemonStatus = DaemonStatus.DISCONNECTED;
169
+ this._waitForDaemonReady = new Promise((resolve) => (this._daemonReady = resolve));
170
+ }
171
+ getSocketPath() {
172
+ const daemonProcessJson = (0, cache_1.readDaemonProcessJsonCache)();
173
+ if (daemonProcessJson?.socketPath) {
174
+ return daemonProcessJson.socketPath;
175
+ }
176
+ else {
177
+ throw daemonProcessException('Unable to connect to daemon: no socket path available');
178
+ }
179
+ }
180
+ async requestShutdown() {
181
+ return this.sendToDaemonViaQueue({ type: 'REQUEST_SHUTDOWN' });
182
+ }
183
+ async getProjectGraphAndSourceMaps() {
184
+ (0, project_graph_1.preventRecursionInGraphConstruction)();
185
+ let spinner;
186
+ // If the graph takes a while to load, we want to show a spinner.
187
+ spinner = new delayed_spinner_1.DelayedSpinner('Calculating the project graph on the Nx Daemon');
188
+ this.currentSpinner = spinner;
189
+ try {
190
+ const response = await this.sendToDaemonViaQueue({
191
+ type: 'REQUEST_PROJECT_GRAPH',
192
+ });
193
+ return {
194
+ projectGraph: response.projectGraph,
195
+ sourceMaps: response.sourceMaps,
196
+ };
197
+ }
198
+ catch (e) {
199
+ if (e.name === error_types_1.DaemonProjectGraphError.name) {
200
+ throw error_types_1.ProjectGraphError.fromDaemonProjectGraphError(e);
201
+ }
202
+ else {
203
+ throw e;
204
+ }
205
+ }
206
+ finally {
207
+ spinner?.cleanup();
208
+ this.currentSpinner = null;
209
+ }
210
+ }
211
+ async getAllFileData() {
212
+ return await this.sendToDaemonViaQueue({ type: 'REQUEST_FILE_DATA' });
213
+ }
214
+ hashTasks(runnerOptions, tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ultracacheConfigurationsVersion) {
215
+ return this.sendToDaemonViaQueue({
216
+ type: 'HASH_TASKS',
217
+ runnerOptions,
218
+ perTaskEnvs,
219
+ ...withoutTaskResults(tasks, taskGraph),
220
+ cwd,
221
+ collectInputs,
222
+ // An External cannot cross the socket: the version names the stored set
223
+ // to hash from. Absent means native hashing.
224
+ ultracacheConfigurationsVersion,
225
+ });
226
+ }
227
+ hashTasksUpfront(runnerOptions, tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ultracacheConfigurationsVersion) {
228
+ return this.sendToDaemonViaQueue({
229
+ type: 'HASH_TASKS_UPFRONT',
230
+ runnerOptions,
231
+ perTaskEnvs,
232
+ ...withoutTaskResults(tasks, taskGraph),
233
+ cwd,
234
+ collectInputs,
235
+ ultracacheConfigurationsVersion,
236
+ });
237
+ }
238
+ async registerFileWatcher(config, callback) {
239
+ try {
240
+ await this.getProjectGraphAndSourceMaps();
241
+ }
242
+ catch (e) {
243
+ if (config.allowPartialGraph && e instanceof error_types_1.ProjectGraphError) {
244
+ // we are fine with partial graph
245
+ }
246
+ else {
247
+ throw e;
248
+ }
249
+ }
250
+ // Generate unique ID for this callback
251
+ const callbackId = Math.random().toString(36).substring(2, 11);
252
+ // Store callback and config for reconnection
253
+ this.fileWatcherCallbacks.set(callbackId, callback);
254
+ this.fileWatcherConfigs.set(callbackId, config);
255
+ await this.queue.sendToQueue(async () => {
256
+ // If we already have a connection, just register the new config
257
+ if (this.fileWatcherMessenger) {
258
+ this.fileWatcherMessenger.sendMessage({
259
+ type: 'REGISTER_FILE_WATCHER',
260
+ config,
261
+ });
262
+ return;
263
+ }
264
+ await this.startDaemonIfNecessary();
265
+ const socketPath = this.getSocketPath();
266
+ this.fileWatcherMessenger = new daemon_socket_messenger_1.DaemonSocketMessenger((0, net_1.connect)(socketPath)).listen((message) => {
267
+ try {
268
+ const parsedMessage = (0, consume_messages_from_socket_1.parseMessage)(message);
269
+ // A delivered message means the stream is healthy again.
270
+ this.fileWatcherFramingFailures = 0;
271
+ if (parsedMessage?.watcherError) {
272
+ const error = new WatcherFailedError(parsedMessage.watcherError);
273
+ for (const cb of this.fileWatcherCallbacks.values()) {
274
+ cb(error, null);
275
+ }
276
+ return;
277
+ }
278
+ // Notify all callbacks
279
+ for (const cb of this.fileWatcherCallbacks.values()) {
280
+ cb(null, parsedMessage);
281
+ }
282
+ }
283
+ catch (e) {
284
+ for (const cb of this.fileWatcherCallbacks.values()) {
285
+ cb(e, null);
286
+ }
287
+ }
288
+ }, () => {
289
+ // Connection closed - trigger reconnection
290
+ logger_1.clientLogger.log(`[FileWatcher] Socket closed, triggering reconnection`);
291
+ this.fileWatcherMessenger = undefined;
292
+ for (const cb of this.fileWatcherCallbacks.values()) {
293
+ cb('reconnecting', null);
294
+ }
295
+ this.reconnectFileWatcher();
296
+ }, (err) => {
297
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
298
+ for (const cb of this.fileWatcherCallbacks.values()) {
299
+ cb('closed', null);
300
+ }
301
+ process.exit(1);
302
+ }
303
+ for (const cb of this.fileWatcherCallbacks.values()) {
304
+ cb(err, null);
305
+ }
306
+ if (err instanceof consume_messages_from_socket_1.MessageFramingError) {
307
+ this.fileWatcherFramingFailures++;
308
+ }
309
+ // Close so 'close' fires and the reconnect path runs; a framing
310
+ // failure would otherwise leave this channel silent forever.
311
+ this.fileWatcherMessenger?.close();
312
+ });
313
+ this.fileWatcherMessenger.sendMessage({
314
+ type: 'REGISTER_FILE_WATCHER',
315
+ config,
316
+ });
317
+ });
318
+ // Return unregister function
319
+ return () => {
320
+ this.fileWatcherCallbacks.delete(callbackId);
321
+ this.fileWatcherConfigs.delete(callbackId);
322
+ // If no more callbacks, close the connection
323
+ if (this.fileWatcherCallbacks.size === 0) {
324
+ this.fileWatcherMessenger?.close();
325
+ this.fileWatcherMessenger = undefined;
326
+ }
327
+ };
328
+ }
329
+ async reconnectFileWatcher() {
330
+ // Guard against concurrent reconnection attempts
331
+ if (this.fileWatcherReconnecting) {
332
+ return;
333
+ }
334
+ // The concurrency guard above is cleared before this method recurses, so it
335
+ // bounds overlap rather than iterations. A framing failure is deterministic
336
+ // — re-dialing replays it — so without this the channel would reconnect and
337
+ // re-fail forever. Reaching a payload over NX_MAX_MESSAGE_SIZE does exactly
338
+ // that on every notification.
339
+ if (this.fileWatcherFramingFailures >= MAX_CONSECUTIVE_FRAMING_FAILURES) {
340
+ logger_1.clientLogger.log(`[FileWatcher] Giving up after ${this.fileWatcherFramingFailures} consecutive framing failures`);
341
+ this.fileWatcherReconnecting = false;
342
+ for (const cb of this.fileWatcherCallbacks.values()) {
343
+ cb('closed', null);
344
+ }
345
+ return;
346
+ }
347
+ if (this.fileWatcherCallbacks.size === 0) {
348
+ return; // No callbacks to reconnect
349
+ }
350
+ this.fileWatcherReconnecting = true;
351
+ logger_1.clientLogger.log(`[FileWatcher] Starting reconnection for ${this.fileWatcherCallbacks.size} callbacks`);
352
+ // Wait for daemon server to be available before trying to reconnect
353
+ let serverAvailable;
354
+ try {
355
+ ({ available: serverAvailable } = await this.waitForServerToBeAvailable({
356
+ ignoreVersionMismatch: false,
357
+ }));
358
+ }
359
+ catch (err) {
360
+ // Version mismatch - pass error to callbacks so they can handle it
361
+ logger_1.clientLogger.log(`[FileWatcher] Error during reconnection: ${err.message}`);
362
+ this.fileWatcherReconnecting = false;
363
+ for (const cb of this.fileWatcherCallbacks.values()) {
364
+ cb(err, null);
365
+ }
366
+ return;
367
+ }
368
+ if (!serverAvailable) {
369
+ // Failed to reconnect after all attempts - notify as closed
370
+ logger_1.clientLogger.log(`[FileWatcher] Failed to reconnect - server unavailable`);
371
+ this.fileWatcherReconnecting = false;
372
+ for (const cb of this.fileWatcherCallbacks.values()) {
373
+ cb('closed', null);
374
+ }
375
+ return;
376
+ }
377
+ try {
378
+ // Try to reconnect
379
+ const socketPath = this.getSocketPath();
380
+ this.fileWatcherMessenger = new daemon_socket_messenger_1.DaemonSocketMessenger((0, net_1.connect)(socketPath)).listen((message) => {
381
+ try {
382
+ const parsedMessage = (0, consume_messages_from_socket_1.parseMessage)(message);
383
+ // A delivered message means the stream is healthy again.
384
+ this.fileWatcherFramingFailures = 0;
385
+ for (const cb of this.fileWatcherCallbacks.values()) {
386
+ cb(null, parsedMessage);
387
+ }
388
+ }
389
+ catch (e) {
390
+ for (const cb of this.fileWatcherCallbacks.values()) {
391
+ cb(e, null);
392
+ }
393
+ }
394
+ }, () => {
395
+ // Connection closed - trigger reconnection again
396
+ this.fileWatcherMessenger = undefined;
397
+ // Reset reconnection flag before triggering reconnection
398
+ this.fileWatcherReconnecting = false;
399
+ for (const cb of this.fileWatcherCallbacks.values()) {
400
+ cb('reconnecting', null);
401
+ }
402
+ this.reconnectFileWatcher();
403
+ }, (err) => {
404
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
405
+ for (const cb of this.fileWatcherCallbacks.values()) {
406
+ cb('closed', null);
407
+ }
408
+ process.exit(1);
409
+ }
410
+ if (err instanceof consume_messages_from_socket_1.MessageFramingError) {
411
+ this.fileWatcherFramingFailures++;
412
+ }
413
+ // The retry loop is driven by 'close', which a framing failure does
414
+ // not emit, so close explicitly to hand off to it.
415
+ this.fileWatcherMessenger?.close();
416
+ });
417
+ // Re-register all stored configs
418
+ for (const cfg of this.fileWatcherConfigs.values()) {
419
+ this.fileWatcherMessenger.sendMessage({
420
+ type: 'REGISTER_FILE_WATCHER',
421
+ config: cfg,
422
+ });
423
+ }
424
+ // Successfully reconnected - notify callbacks
425
+ logger_1.clientLogger.log(`[FileWatcher] Reconnected successfully`);
426
+ for (const cb of this.fileWatcherCallbacks.values()) {
427
+ cb('reconnected', null);
428
+ }
429
+ this.fileWatcherReconnecting = false;
430
+ }
431
+ catch (e) {
432
+ // Failed to reconnect - notify as closed
433
+ logger_1.clientLogger.log(`[FileWatcher] Reconnection failed: ${e.message}`);
434
+ this.fileWatcherReconnecting = false;
435
+ for (const cb of this.fileWatcherCallbacks.values()) {
436
+ cb('closed', null);
437
+ }
438
+ }
439
+ }
440
+ async registerProjectGraphRecomputationListener(callback) {
441
+ // Generate unique ID for this callback
442
+ const callbackId = Math.random().toString(36).substring(2, 11);
443
+ // Store callback
444
+ this.projectGraphListenerCallbacks.set(callbackId, callback);
445
+ await this.queue.sendToQueue(async () => {
446
+ // If we already have a connection, just send the registration
447
+ if (this.projectGraphListenerMessenger) {
448
+ this.projectGraphListenerMessenger.sendMessage({
449
+ type: register_project_graph_listener_1.REGISTER_PROJECT_GRAPH_LISTENER,
450
+ });
451
+ return;
452
+ }
453
+ await this.startDaemonIfNecessary();
454
+ const socketPath = this.getSocketPath();
455
+ this.projectGraphListenerMessenger = new daemon_socket_messenger_1.DaemonSocketMessenger((0, net_1.connect)(socketPath)).listen((message) => {
456
+ try {
457
+ const parsedMessage = (0, consume_messages_from_socket_1.parseMessage)(message);
458
+ // A delivered message means the stream is healthy again.
459
+ this.projectGraphListenerFramingFailures = 0;
460
+ // Notify all callbacks
461
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
462
+ cb(null, parsedMessage);
463
+ }
464
+ }
465
+ catch (e) {
466
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
467
+ cb(e, null);
468
+ }
469
+ }
470
+ }, () => {
471
+ // Connection closed - trigger reconnection
472
+ logger_1.clientLogger.log(`[ProjectGraphListener] Socket closed, triggering reconnection`);
473
+ this.projectGraphListenerMessenger = undefined;
474
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
475
+ cb('reconnecting', null);
476
+ }
477
+ this.reconnectProjectGraphListener();
478
+ }, (err) => {
479
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
480
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
481
+ cb('closed', null);
482
+ }
483
+ process.exit(1);
484
+ }
485
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
486
+ cb(err, null);
487
+ }
488
+ if (err instanceof consume_messages_from_socket_1.MessageFramingError) {
489
+ this.projectGraphListenerFramingFailures++;
490
+ }
491
+ this.projectGraphListenerMessenger?.close();
492
+ });
493
+ this.projectGraphListenerMessenger.sendMessage({
494
+ type: register_project_graph_listener_1.REGISTER_PROJECT_GRAPH_LISTENER,
495
+ });
496
+ });
497
+ // Return unregister function
498
+ return () => {
499
+ this.projectGraphListenerCallbacks.delete(callbackId);
500
+ // If no more callbacks, close the connection
501
+ if (this.projectGraphListenerCallbacks.size === 0) {
502
+ this.projectGraphListenerMessenger?.close();
503
+ this.projectGraphListenerMessenger = undefined;
504
+ }
505
+ };
506
+ }
507
+ async reconnectProjectGraphListener() {
508
+ // Guard against concurrent reconnection attempts
509
+ if (this.projectGraphListenerReconnecting) {
510
+ return;
511
+ }
512
+ // See reconnectFileWatcher: a framing failure repeats on every redial, so
513
+ // the concurrency guard alone cannot bound it.
514
+ if (this.projectGraphListenerFramingFailures >=
515
+ MAX_CONSECUTIVE_FRAMING_FAILURES) {
516
+ logger_1.clientLogger.log(`[ProjectGraphListener] Giving up after ${this.projectGraphListenerFramingFailures} consecutive framing failures`);
517
+ this.projectGraphListenerReconnecting = false;
518
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
519
+ cb('closed', null);
520
+ }
521
+ return;
522
+ }
523
+ if (this.projectGraphListenerCallbacks.size === 0) {
524
+ return; // No callbacks to reconnect
525
+ }
526
+ this.projectGraphListenerReconnecting = true;
527
+ logger_1.clientLogger.log(`[ProjectGraphListener] Starting reconnection for ${this.projectGraphListenerCallbacks.size} callbacks`);
528
+ // Wait for daemon server to be available before trying to reconnect
529
+ let serverAvailable;
530
+ try {
531
+ ({ available: serverAvailable } = await this.waitForServerToBeAvailable({
532
+ ignoreVersionMismatch: false,
533
+ }));
534
+ }
535
+ catch (err) {
536
+ // Version mismatch - pass error to callbacks so they can handle it
537
+ logger_1.clientLogger.log(`[ProjectGraphListener] Error during reconnection: ${err.message}`);
538
+ this.projectGraphListenerReconnecting = false;
539
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
540
+ cb(err, null);
541
+ }
542
+ return;
543
+ }
544
+ if (!serverAvailable) {
545
+ // Failed to reconnect after all attempts - notify as closed
546
+ logger_1.clientLogger.log(`[ProjectGraphListener] Failed to reconnect - server unavailable`);
547
+ this.projectGraphListenerReconnecting = false;
548
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
549
+ cb('closed', null);
550
+ }
551
+ return;
552
+ }
553
+ try {
554
+ const socketPath = this.getSocketPath();
555
+ // Try to reconnect
556
+ this.projectGraphListenerMessenger = new daemon_socket_messenger_1.DaemonSocketMessenger((0, net_1.connect)(socketPath)).listen((message) => {
557
+ try {
558
+ const parsedMessage = (0, consume_messages_from_socket_1.parseMessage)(message);
559
+ // A delivered message means the stream is healthy again.
560
+ this.projectGraphListenerFramingFailures = 0;
561
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
562
+ cb(null, parsedMessage);
563
+ }
564
+ }
565
+ catch (e) {
566
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
567
+ cb(e, null);
568
+ }
569
+ }
570
+ }, () => {
571
+ // Connection closed - trigger reconnection again
572
+ this.projectGraphListenerMessenger = undefined;
573
+ // Reset reconnection flag before triggering reconnection
574
+ this.projectGraphListenerReconnecting = false;
575
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
576
+ cb('reconnecting', null);
577
+ }
578
+ this.reconnectProjectGraphListener();
579
+ }, (err) => {
580
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
581
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
582
+ cb('closed', null);
583
+ }
584
+ process.exit(1);
585
+ }
586
+ if (err instanceof consume_messages_from_socket_1.MessageFramingError) {
587
+ this.projectGraphListenerFramingFailures++;
588
+ }
589
+ // The retry loop is driven by 'close', which a framing failure does
590
+ // not emit, so close explicitly to hand off to it.
591
+ this.projectGraphListenerMessenger?.close();
592
+ });
593
+ // Re-register
594
+ this.projectGraphListenerMessenger.sendMessage({
595
+ type: register_project_graph_listener_1.REGISTER_PROJECT_GRAPH_LISTENER,
596
+ });
597
+ // Successfully reconnected - notify callbacks
598
+ logger_1.clientLogger.log(`[ProjectGraphListener] Reconnected successfully`);
599
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
600
+ cb('reconnected', null);
601
+ }
602
+ this.projectGraphListenerReconnecting = false;
603
+ }
604
+ catch (e) {
605
+ // Failed to reconnect - notify as closed
606
+ logger_1.clientLogger.log(`[ProjectGraphListener] Reconnection failed: ${e.message}`);
607
+ this.projectGraphListenerReconnecting = false;
608
+ for (const cb of this.projectGraphListenerCallbacks.values()) {
609
+ cb('closed', null);
610
+ }
611
+ }
612
+ }
613
+ processInBackground(requirePath, data) {
614
+ return this.sendToDaemonViaQueue({
615
+ type: 'PROCESS_IN_BACKGROUND',
616
+ requirePath,
617
+ data,
618
+ },
619
+ // This method is sometimes passed data that cannot be serialized with v8
620
+ // so we force JSON serialization here
621
+ 'json');
622
+ }
623
+ recordOutputsHashBatch(entries) {
624
+ return this.sendToDaemonViaQueue({
625
+ type: 'RECORD_OUTPUTS_HASH_BATCH',
626
+ data: entries,
627
+ });
628
+ }
629
+ outputsHashesMatchBatch(entries) {
630
+ return this.sendToDaemonViaQueue({
631
+ type: 'OUTPUTS_HASHES_MATCH_BATCH',
632
+ data: entries,
633
+ });
634
+ }
635
+ glob(globs, exclude) {
636
+ const message = {
637
+ type: 'GLOB',
638
+ globs,
639
+ exclude,
640
+ };
641
+ return this.sendToDaemonViaQueue(message);
642
+ }
643
+ multiGlob(globs, exclude) {
644
+ const message = {
645
+ type: 'MULTI_GLOB',
646
+ globs,
647
+ exclude,
648
+ };
649
+ return this.sendToDaemonViaQueue(message);
650
+ }
651
+ getWorkspaceContextFileData() {
652
+ const message = {
653
+ type: get_context_file_data_1.GET_CONTEXT_FILE_DATA,
654
+ };
655
+ return this.sendToDaemonViaQueue(message);
656
+ }
657
+ getWorkspaceFiles(projectRootMap) {
658
+ const message = {
659
+ type: get_nx_workspace_files_1.GET_NX_WORKSPACE_FILES,
660
+ projectRootMap,
661
+ };
662
+ return this.sendToDaemonViaQueue(message);
663
+ }
664
+ getFilesInDirectory(dir) {
665
+ const message = {
666
+ type: get_files_in_directory_1.GET_FILES_IN_DIRECTORY,
667
+ dir,
668
+ };
669
+ return this.sendToDaemonViaQueue(message);
670
+ }
671
+ hashGlob(globs, exclude) {
672
+ const message = {
673
+ type: hash_glob_1.HASH_GLOB,
674
+ globs,
675
+ exclude,
676
+ };
677
+ return this.sendToDaemonViaQueue(message);
678
+ }
679
+ hashMultiGlob(globGroups) {
680
+ const message = {
681
+ type: hash_glob_1.HASH_MULTI_GLOB,
682
+ globGroups: globGroups,
683
+ };
684
+ return this.sendToDaemonViaQueue(message);
685
+ }
686
+ getFlakyTasks(hashes) {
687
+ const message = {
688
+ type: task_history_1.GET_FLAKY_TASKS,
689
+ hashes,
690
+ };
691
+ return this.sendToDaemonViaQueue(message);
692
+ }
693
+ async getEstimatedTaskTimings(targets) {
694
+ const message = {
695
+ type: task_history_1.GET_ESTIMATED_TASK_TIMINGS,
696
+ targets,
697
+ };
698
+ return this.sendToDaemonViaQueue(message);
699
+ }
700
+ recordTaskRuns(taskRuns) {
701
+ const message = {
702
+ type: task_history_1.RECORD_TASK_RUNS,
703
+ taskRuns,
704
+ };
705
+ return this.sendToDaemonViaQueue(message);
706
+ }
707
+ getSyncGeneratorChanges(generators) {
708
+ const message = {
709
+ type: get_sync_generator_changes_1.GET_SYNC_GENERATOR_CHANGES,
710
+ generators,
711
+ };
712
+ return this.sendToDaemonViaQueue(message);
713
+ }
714
+ flushSyncGeneratorChangesToDisk(generators) {
715
+ const message = {
716
+ type: flush_sync_generator_changes_to_disk_1.FLUSH_SYNC_GENERATOR_CHANGES_TO_DISK,
717
+ generators,
718
+ };
719
+ return this.sendToDaemonViaQueue(message);
720
+ }
721
+ getRegisteredSyncGenerators() {
722
+ const message = {
723
+ type: get_registered_sync_generators_1.GET_REGISTERED_SYNC_GENERATORS,
724
+ };
725
+ return this.sendToDaemonViaQueue(message);
726
+ }
727
+ getPluginCapabilities() {
728
+ const message = {
729
+ type: get_plugin_capabilities_1.GET_PLUGIN_CAPABILITIES,
730
+ };
731
+ return this.sendToDaemonViaQueue(message);
732
+ }
733
+ /** Selection runs where hashing does, so the plans it builds are reused. */
734
+ selectAffectedTasks(request) {
735
+ const message = {
736
+ type: select_affected_tasks_1.SELECT_AFFECTED_TASKS,
737
+ request,
738
+ };
739
+ return this.sendToDaemonViaQueue(message);
740
+ }
741
+ updateWorkspaceContext(createdFiles, updatedFiles, deletedFiles) {
742
+ const message = {
743
+ type: update_workspace_context_1.UPDATE_WORKSPACE_CONTEXT,
744
+ createdFiles,
745
+ updatedFiles,
746
+ deletedFiles,
747
+ };
748
+ return this.sendToDaemonViaQueue(message);
749
+ }
750
+ async runPreTasksExecution(context) {
751
+ const message = {
752
+ type: run_tasks_execution_hooks_1.PRE_TASKS_EXECUTION,
753
+ context,
754
+ };
755
+ return this.sendToDaemonViaQueue(message);
756
+ }
757
+ async runPostTasksExecution(context) {
758
+ const message = {
759
+ type: run_tasks_execution_hooks_1.POST_TASKS_EXECUTION,
760
+ context,
761
+ };
762
+ return this.sendToDaemonViaQueue(message);
763
+ }
764
+ getNxConsoleStatus() {
765
+ const message = {
766
+ type: nx_console_1.GET_NX_CONSOLE_STATUS,
767
+ };
768
+ return this.sendToDaemonViaQueue(message);
769
+ }
770
+ setNxConsolePreferenceAndInstall(preference) {
771
+ const message = {
772
+ type: nx_console_1.SET_NX_CONSOLE_PREFERENCE_AND_INSTALL,
773
+ preference,
774
+ };
775
+ return this.sendToDaemonViaQueue(message);
776
+ }
777
+ getConfigureAiAgentsStatus() {
778
+ const message = {
779
+ type: configure_ai_agents_1.GET_CONFIGURE_AI_AGENTS_STATUS,
780
+ };
781
+ return this.sendToDaemonViaQueue(message);
782
+ }
783
+ resetConfigureAiAgentsStatus() {
784
+ const message = {
785
+ type: configure_ai_agents_1.RESET_CONFIGURE_AI_AGENTS_STATUS,
786
+ };
787
+ return this.sendToDaemonViaQueue(message);
788
+ }
789
+ /**
790
+ * The pre-start probe, returning why it failed rather than leaving it on the
791
+ * instance: `_daemonStatus` does not serialize `isServerAvailable`'s five
792
+ * public callers against `startDaemonIfNecessary`.
793
+ */
794
+ async probeServer() {
795
+ return new Promise((resolve, reject) => {
796
+ try {
797
+ const socketPath = this.getSocketPath();
798
+ if (!socketPath) {
799
+ resolve({ available: false });
800
+ return;
801
+ }
802
+ const socket = (0, net_1.connect)(socketPath, () => {
803
+ socket.destroy();
804
+ resolve({ available: true });
805
+ });
806
+ socket.once('error', (err) => {
807
+ // The only place the errno for "the socket is there but refuses us"
808
+ // is produced, and the only thing separating it from "no daemon yet".
809
+ resolve({ available: false, refusal: { error: err, socketPath } });
810
+ });
811
+ }
812
+ catch (err) {
813
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
814
+ reject(err); // Let version mismatch bubble up
815
+ }
816
+ resolve({ available: false });
817
+ }
818
+ });
819
+ }
820
+ async isServerAvailable() {
821
+ return (await this.probeServer()).available;
822
+ }
823
+ async startDaemonIfNecessary() {
824
+ if (this._daemonStatus == DaemonStatus.CONNECTED) {
825
+ return;
826
+ }
827
+ // Ensure daemon is running and socket path is available
828
+ if (this._daemonStatus == DaemonStatus.DISCONNECTED) {
829
+ this._daemonStatus = DaemonStatus.CONNECTING;
830
+ let daemonPid = null;
831
+ let probe;
832
+ try {
833
+ probe = await this.probeServer();
834
+ }
835
+ catch (err) {
836
+ // Version mismatch - treat as server not available, start new one
837
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
838
+ probe = { available: false };
839
+ }
840
+ else {
841
+ throw err;
842
+ }
843
+ }
844
+ if (!probe.available) {
845
+ // Carried as a value so no other caller's probe can substitute for it.
846
+ daemonPid = await this.startInBackground(probe.refusal);
847
+ }
848
+ this.setUpConnection();
849
+ this._daemonStatus = DaemonStatus.CONNECTED;
850
+ this._daemonReady();
851
+ daemonPid ??= (0, cache_1.getDaemonProcessIdSync)();
852
+ // Fire-and-forget - don't block daemon connection by waiting for metrics registration
853
+ this.registerDaemonProcessWithMetricsService(daemonPid);
854
+ }
855
+ else if (this._daemonStatus == DaemonStatus.CONNECTING) {
856
+ await this._waitForDaemonReady;
857
+ const daemonPid = (0, cache_1.getDaemonProcessIdSync)();
858
+ // Fire-and-forget - don't block daemon connection by waiting for metrics registration
859
+ this.registerDaemonProcessWithMetricsService(daemonPid);
860
+ }
861
+ }
862
+ async sendToDaemonViaQueue(messageToDaemon, parser) {
863
+ return this.queue.sendToQueue(async () => {
864
+ // Set currentSpinner inside the queued function so it's only
865
+ // active while this specific message is in flight — preventing
866
+ // concurrent callers from overwriting each other's spinner
867
+ // reference before their turn arrives.
868
+ return await this.sendMessageToDaemon(messageToDaemon, parser);
869
+ });
870
+ }
871
+ setUpConnection() {
872
+ const socketPath = this.getSocketPath();
873
+ const socket = (0, net_1.connect)(socketPath);
874
+ // Unref the socket so it doesn't keep the process alive. The
875
+ // sendMessageToDaemon method uses a keep-alive setTimeout to
876
+ // explicitly hold the event loop open while awaiting a response.
877
+ socket.unref();
878
+ this.socketMessenger = new daemon_socket_messenger_1.DaemonSocketMessenger(socket).listen((message) => this.handleMessage(message), () => {
879
+ // it's ok for the daemon to terminate if the client doesn't wait on
880
+ // any messages from the daemon
881
+ if (this.queue.isEmpty()) {
882
+ this.reset();
883
+ }
884
+ else {
885
+ // Connection closed while we had pending work - try to reconnect
886
+ this._daemonStatus = DaemonStatus.DISCONNECTED;
887
+ this.handleConnectionError(daemonProcessException('Daemon process terminated and closed the connection'));
888
+ }
889
+ }, (err) => {
890
+ // Every recovery path below is keyed on the socket 'close' event, and a
891
+ // framing failure emits neither 'close' nor 'error'. Without the
892
+ // teardown at the end of this handler the connection stays open and
893
+ // permanently deaf, and the next request waits out the keep-alive.
894
+ if (!err.message) {
895
+ this.currentReject(daemonProcessException(err.toString()));
896
+ this.socketMessenger?.close();
897
+ return;
898
+ }
899
+ let error;
900
+ if ((0, permission_errors_1.isPermissionDenied)(err)) {
901
+ // Checked before the ENOENT branch so a refusal can never be read as
902
+ // an absent socket. The 0700 dir and 0600 socket mean the OS refuses
903
+ // this rather than the connect silently succeeding.
904
+ error = daemonPermissionException(socketPath, err.message);
905
+ }
906
+ else if (err.code === 'ENOENT') {
907
+ error = daemonProcessException([
908
+ 'The Daemon Server is not running',
909
+ // A denied bind leaves no socket file behind, so the client sees
910
+ // a missing socket rather than a refused connection. Outside a
911
+ // sandbox this is just the ordinary "not started yet" case.
912
+ ...((0, is_sandbox_1.isSandbox)() ? (0, sandbox_socket_hint_1.sandboxSocketHint)() : []),
913
+ ].join('\n'));
914
+ }
915
+ else if (err.message.startsWith('connect ECONNREFUSED')) {
916
+ error = daemonProcessException(`A server instance had not been fully shut down. Please try running the command again.`);
917
+ }
918
+ else if (err.message.startsWith('read ECONNRESET')) {
919
+ error = daemonProcessException(`Unable to connect to the daemon process.`);
920
+ }
921
+ else {
922
+ error = daemonProcessException(err.toString());
923
+ }
924
+ this.currentReject(error);
925
+ this.socketMessenger?.close();
926
+ });
927
+ }
928
+ async handleConnectionError(error) {
929
+ logger_1.clientLogger.log(`[Reconnect] Connection error detected: ${error.message}`);
930
+ // Create a new ready promise for new requests to wait on
931
+ this._waitForDaemonReady = new Promise((resolve) => (this._daemonReady = resolve));
932
+ // Set status to CONNECTING so new requests will wait for reconnection
933
+ this._daemonStatus = DaemonStatus.CONNECTING;
934
+ let serverAvailable;
935
+ try {
936
+ ({ available: serverAvailable } = await this.waitForServerToBeAvailable({
937
+ ignoreVersionMismatch: false,
938
+ }));
939
+ }
940
+ catch (err) {
941
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
942
+ // New daemon has different version - reject with error so caller can handle
943
+ if (this.currentReject) {
944
+ this.currentReject(err);
945
+ }
946
+ return;
947
+ }
948
+ throw err;
949
+ }
950
+ if (serverAvailable) {
951
+ logger_1.clientLogger.log(`[Reconnect] Reconnection successful, re-establishing connection`);
952
+ // Server is back up, establish connection and signal ready
953
+ this.establishConnection();
954
+ // Resend the pending message if one exists
955
+ if (this.currentMessage && this.currentResolve && this.currentReject) {
956
+ // Retry the message directly (not through the queue) to resolve the
957
+ // pending promise that the original queue entry is waiting on.
958
+ // This allows the original queue entry to complete naturally.
959
+ const msg = this.currentMessage;
960
+ const res = this.currentResolve;
961
+ const rej = this.currentReject;
962
+ this.sendMessageToDaemon(msg).then(res, rej);
963
+ }
964
+ }
965
+ else {
966
+ // Failed to reconnect after all attempts, reject the pending request
967
+ if (this.currentReject) {
968
+ this.currentReject(error);
969
+ }
970
+ }
971
+ }
972
+ establishConnection() {
973
+ this._daemonStatus = DaemonStatus.DISCONNECTED;
974
+ this.setUpConnection();
975
+ this._daemonStatus = DaemonStatus.CONNECTED;
976
+ this._daemonReady();
977
+ }
978
+ /**
979
+ * Wait for daemon server to be available.
980
+ * Used for reconnection - throws VersionMismatchError if daemon version differs.
981
+ */
982
+ async waitForServerToBeAvailable(options) {
983
+ logger_1.clientLogger.log(`[Client] Waiting for server (max: ${WAIT_FOR_SERVER_CONFIG.maxAttempts} attempts, ${WAIT_FOR_SERVER_CONFIG.delayMs}ms interval)`);
984
+ // Poll-scoped, not instance state: reconnect paths have their own flags, so
985
+ // several attempts can be in flight and a shared slot would let one report
986
+ // another's socket.
987
+ let stoppedOnRefusal = false;
988
+ let refusal;
989
+ const socket = await (0, wait_for_socket_connection_1.waitForSocketConnection)(() => {
990
+ try {
991
+ return this.getSocketPath();
992
+ }
993
+ catch (err) {
994
+ if (err instanceof daemon_socket_messenger_1.VersionMismatchError) {
995
+ if (!options.ignoreVersionMismatch) {
996
+ throw err;
997
+ }
998
+ }
999
+ // Socket path not available yet — keep polling
1000
+ return null;
1001
+ }
1002
+ }, {
1003
+ maxAttempts: WAIT_FOR_SERVER_CONFIG.maxAttempts,
1004
+ delayMs: WAIT_FOR_SERVER_CONFIG.delayMs,
1005
+ onConnectError: (error, socketPath) => {
1006
+ refusal = { error, socketPath };
1007
+ // A refusal is not expected to become an acceptance, so polling the
1008
+ // full 60s budget only delays the same answer. Not absolute:
1009
+ // `server.ts` binds before it chmods to 0600, so under a umask that
1010
+ // strips owner write a same-user connect can lose a microsecond race
1011
+ // and see EACCES. That costs a specific error rather than a retry — a
1012
+ // better trade than a 60s hang.
1013
+ return (stoppedOnRefusal = (0, permission_errors_1.isPermissionDenied)(error));
1014
+ },
1015
+ });
1016
+ if (socket) {
1017
+ socket.destroy();
1018
+ logger_1.clientLogger.log(`[Client] Server available`);
1019
+ return { available: true };
1020
+ }
1021
+ // Keyed on the early exit taken, not on whether an errno was recorded:
1022
+ // every failed connect records one, including an ordinary cold start's
1023
+ // ENOENT.
1024
+ logger_1.clientLogger.log(stoppedOnRefusal
1025
+ ? `[Client] Server refused the connection (${refusal?.error.code}), stopped polling`
1026
+ : `[Client] Server not available after ${WAIT_FOR_SERVER_CONFIG.maxAttempts} attempts`);
1027
+ return { available: false, refusal };
1028
+ }
1029
+ async sendMessageToDaemon(message, force) {
1030
+ // the first message sent to the daemon includes an env prop
1031
+ // that updates the process.env values on the daemon.
1032
+ if (!this.envReflectionSent && !global.NX_PLUGIN_WORKER) {
1033
+ message.env = (0, daemon_environment_1.getDaemonEnv)();
1034
+ this.envReflectionSent = true;
1035
+ }
1036
+ await this.startDaemonIfNecessary();
1037
+ let keepAlive;
1038
+ return new Promise((resolve, reject) => {
1039
+ perf_hooks_1.performance.mark('sendMessageToDaemon-start');
1040
+ // An open promise isn't enough to keep the event loop
1041
+ // alive, so we set a timeout here and clear it when we hear
1042
+ // back. This **must** be longer than the message timeout used
1043
+ // in the plugin isolation messages, or the daemon will timeout before
1044
+ // a plugin worker would, and that can result in odd exit behavior.
1045
+ keepAlive = setTimeout(() => {
1046
+ reject(new Error('The daemon timed out while processing ' + message.type));
1047
+ }, 20 * 60 * 1000);
1048
+ this.currentMessage = message;
1049
+ this.currentResolve = resolve;
1050
+ this.currentReject = reject;
1051
+ this.socketMessenger.sendMessage(message, force);
1052
+ }).finally(() => {
1053
+ clearTimeout(keepAlive);
1054
+ });
1055
+ }
1056
+ async registerDaemonProcessWithMetricsService(daemonPid) {
1057
+ if (!daemonPid) {
1058
+ return;
1059
+ }
1060
+ try {
1061
+ const { getProcessMetricsService } = await (0, handle_import_1.handleImport)('../../tasks-runner/process-metrics-service.js', __dirname);
1062
+ getProcessMetricsService().registerDaemonProcess(daemonPid);
1063
+ }
1064
+ catch {
1065
+ // don't error, this is a secondary concern that should not break task execution
1066
+ }
1067
+ }
1068
+ handleMessage(serializedResult) {
1069
+ try {
1070
+ perf_hooks_1.performance.mark('result-parse-start-' + this.currentMessage.type);
1071
+ const parsedResult = (0, consume_messages_from_socket_1.parseMessage)(serializedResult);
1072
+ perf_hooks_1.performance.mark('result-parse-end-' + this.currentMessage.type);
1073
+ perf_hooks_1.performance.measure('deserialize daemon response - ' + this.currentMessage.type, 'result-parse-start-' + this.currentMessage.type, 'result-parse-end-' + this.currentMessage.type);
1074
+ // Streaming messages fire side-effects on the client but do not
1075
+ // resolve the pending request promise — the daemon can push several
1076
+ // of these before finally sending the real response. Progress
1077
+ // updates route through the in-flight request's own spinner so
1078
+ // we don't stomp on unrelated commands' spinner text.
1079
+ if ((0, streaming_messages_1.isUpdateProgressMessage)(parsedResult)) {
1080
+ this.currentSpinner?.setMessage(parsedResult.message);
1081
+ return;
1082
+ }
1083
+ if ((0, streaming_messages_1.isEmitLogMessage)(parsedResult)) {
1084
+ console[parsedResult.level](parsedResult.message);
1085
+ return;
1086
+ }
1087
+ if (parsedResult.error) {
1088
+ this.currentReject(parsedResult.error);
1089
+ }
1090
+ else {
1091
+ perf_hooks_1.performance.measure(`${this.currentMessage.type} round trip`, 'sendMessageToDaemon-start', 'result-parse-end-' + this.currentMessage.type);
1092
+ return this.currentResolve(parsedResult);
1093
+ }
1094
+ }
1095
+ catch (e) {
1096
+ const endOfResponse = (0, consume_messages_from_socket_1.describeMessage)(serializedResult, {
1097
+ from: 'end',
1098
+ });
1099
+ this.currentReject(daemonProcessException([
1100
+ 'Could not deserialize response from Nx daemon.',
1101
+ `Message: ${e.message}`,
1102
+ '\n',
1103
+ `Received:`,
1104
+ endOfResponse,
1105
+ '\n',
1106
+ ].join('\n')));
1107
+ }
1108
+ }
1109
+ /**
1110
+ * @param probeRefusal what the caller's pre-start probe saw. The only evidence
1111
+ * when a daemon refuses us and then exits — the poll cannot reproduce it
1112
+ * once the process json is gone. `nx daemon --start` passes nothing.
1113
+ */
1114
+ async startInBackground(probeRefusal) {
1115
+ if (global.NX_PLUGIN_WORKER) {
1116
+ throw new Error('Fatal Error: Something unexpected has occurred. Plugin Workers should not start a new daemon process. Please report this issue.');
1117
+ }
1118
+ (0, node_fs_1.mkdirSync)(tmp_dir_1.DAEMON_DIR_FOR_CURRENT_WORKSPACE, { recursive: true });
1119
+ if (!(0, node_fs_1.existsSync)(tmp_dir_1.DAEMON_OUTPUT_LOG_FILE)) {
1120
+ (0, node_fs_1.writeFileSync)(tmp_dir_1.DAEMON_OUTPUT_LOG_FILE, '');
1121
+ }
1122
+ // Redirect the detached daemon's stdout/stderr into the log file. The
1123
+ // child dup's these descriptors at spawn, so we close ours right after
1124
+ // instead of holding them for the life of this process (Node >=26 turns a
1125
+ // file descriptor closed during garbage collection into a fatal error).
1126
+ const outFd = (0, node_fs_1.openSync)(tmp_dir_1.DAEMON_OUTPUT_LOG_FILE, 'a');
1127
+ const errFd = (0, node_fs_1.openSync)(tmp_dir_1.DAEMON_OUTPUT_LOG_FILE, 'a');
1128
+ logger_1.clientLogger.log(`[Client] Starting new daemon server in background`);
1129
+ const backgroundProcess = (0, child_process_1.spawn)(process.execPath, [
1130
+ // Spawn with the same resolve conditions Nx uses for plugin entries so a
1131
+ // source-loaded plugin's transitive workspace imports resolve to source.
1132
+ ...(0, typescript_1.getPluginResolveConditionNodeArgs)(),
1133
+ (0, path_1.join)(__dirname, `../server/start.js`),
1134
+ ], {
1135
+ cwd: workspace_root_1.workspaceRoot,
1136
+ stdio: ['ignore', outFd, errFd],
1137
+ detached: true,
1138
+ windowsHide: true,
1139
+ shell: false,
1140
+ env: (0, daemon_environment_1.getDaemonSpawnEnv)(),
1141
+ });
1142
+ // The child now owns dup'd copies of the descriptors, so release ours.
1143
+ (0, node_fs_1.closeSync)(outFd);
1144
+ (0, node_fs_1.closeSync)(errFd);
1145
+ // A refused bind leaves no socket, so the poll below sees only ENOENT and
1146
+ // cannot tell a sandbox refusal from a daemon that has not come up yet. The
1147
+ // server exits with SOCKET_REFUSED_EXIT_CODE when its own bind hits
1148
+ // EPERM/EACCES, which is the only way that errno reaches this process.
1149
+ // Attached before `unref` so the listener is registered before the child can
1150
+ // exit; `unref` only stops the child holding the event loop open.
1151
+ let daemonRefusedSocket = false;
1152
+ backgroundProcess.once('exit', (code) => {
1153
+ daemonRefusedSocket = code === socket_refused_exit_code_1.SOCKET_REFUSED_EXIT_CODE;
1154
+ });
1155
+ // if this process is the process that spawned the daemon,
1156
+ // the daemon env is already up to date
1157
+ this.envReflectionSent = true;
1158
+ backgroundProcess.unref();
1159
+ /**
1160
+ * Ensure the server is actually available to connect to via IPC before resolving
1161
+ */
1162
+ const { available, refusal: polled } = await this.waitForServerToBeAvailable({ ignoreVersionMismatch: true });
1163
+ if (available) {
1164
+ logger_1.clientLogger.log(`[Client] Daemon server started, pid=${backgroundProcess.pid}`);
1165
+ return backgroundProcess.pid;
1166
+ }
1167
+ else {
1168
+ // A permission refusal from either source wins, then the poll's errno,
1169
+ // then the probe's. Recency alone would report a daemon's ENOENT over the
1170
+ // EACCES the probe saw a moment earlier, losing the diagnosis.
1171
+ const refusal = [polled, probeRefusal].find((r) => r && (0, permission_errors_1.isPermissionDenied)(r.error)) ??
1172
+ polled ??
1173
+ probeRefusal;
1174
+ if (refusal && (0, permission_errors_1.isPermissionDenied)(refusal.error)) {
1175
+ // Reported here rather than as a generic startup failure, so it degrades
1176
+ // without disabling the daemon until `nx reset`. Both operands come from
1177
+ // the refusal: resolving a path here instead would throw once a daemon
1178
+ // that failed to bind has unlinked its process json.
1179
+ throw daemonPermissionException(refusal.socketPath, refusal.error.message);
1180
+ }
1181
+ throw daemonProcessException([
1182
+ 'Failed to start or connect to the Nx Daemon process.',
1183
+ // The daemon can fail to start for many reasons, so the guidance is
1184
+ // withheld unless its own errno proved a refusal or the environment
1185
+ // already says a sandbox is in play. The errno arm is what reaches an
1186
+ // agent whose sandbox `isSandbox()` cannot see, such as Copilot CLI.
1187
+ ...(daemonRefusedSocket || (0, is_sandbox_1.isSandbox)()
1188
+ ? (0, sandbox_socket_hint_1.sandboxSocketHint)({ certain: daemonRefusedSocket })
1189
+ : []),
1190
+ ].join('\n'));
1191
+ }
1192
+ }
1193
+ async stop() {
1194
+ try {
1195
+ const pid = (0, cache_1.getDaemonProcessIdSync)();
1196
+ if (pid) {
1197
+ process.kill(pid, 'SIGTERM');
1198
+ }
1199
+ }
1200
+ catch (err) {
1201
+ if (err.code !== 'ESRCH') {
1202
+ output_1.output.error({
1203
+ title: err?.message ||
1204
+ 'Something unexpected went wrong when stopping the daemon server',
1205
+ });
1206
+ }
1207
+ }
1208
+ (0, tmp_dir_1.removeSocketDir)();
1209
+ }
1210
+ }
1211
+ exports.DaemonClient = DaemonClient;
1212
+ exports.daemonClient = new DaemonClient();
1213
+ function isDaemonEnabled() {
1214
+ return exports.daemonClient.enabled();
1215
+ }
1216
+ function isDocker() {
1217
+ try {
1218
+ (0, node_fs_1.statSync)('/.dockerenv');
1219
+ return true;
1220
+ }
1221
+ catch {
1222
+ try {
1223
+ return (0, node_fs_1.readFileSync)('/proc/self/cgroup', 'utf8')?.includes('docker');
1224
+ }
1225
+ catch { }
1226
+ return false;
1227
+ }
1228
+ }
1229
+ function nxJsonIsNotPresent() {
1230
+ return !(0, nx_json_1.hasNxJson)(workspace_root_1.workspaceRoot);
1231
+ }
1232
+ /**
1233
+ * The operating system refused the connection. Most often the socket belongs to
1234
+ * another user, which is the guarantee the owner-only socket directory buys —
1235
+ * but a sandbox that denies unix-socket connects produces the same errno, so the
1236
+ * message does not assert which. Either way it is an environment condition
1237
+ * rather than a defect in Nx, and it deliberately does not
1238
+ * carry `internalDaemonError`: that tag tells the user to file an issue and
1239
+ * disables the daemon until `nx reset`, which would outlast the stale socket
1240
+ * that caused it.
1241
+ *
1242
+ * It also skips the daemon log that `daemonProcessException` appends. The log
1243
+ * belongs to *our* daemon; the process holding this socket is someone else's, so
1244
+ * quoting it would describe an unrelated run.
1245
+ */
1246
+ function daemonPermissionException(socketPath, cause) {
1247
+ const error = new Error([
1248
+ `The operating system refused the connection to the Nx Daemon socket (${cause}).`,
1249
+ '',
1250
+ `Socket: ${socketPath}`,
1251
+ '',
1252
+ 'Most often the socket belongs to a different user: a daemon left behind by running Nx under `sudo`, a different uid inside a container, or a working copy shared between accounts. If the socket is your own, a sandbox is refusing the connection instead.',
1253
+ 'If it belongs to another user, delete the socket above or set NX_SOCKET_DIR to a directory only your user can reach. If you are in a sandbox, allow unix sockets under the Nx socket root: `nx configure-ai-agents` writes that for Claude Code, and the per-agent setting is listed at https://nx.dev/docs/kb/nx-sandbox-unix-sockets',
1254
+ ].join('\n'));
1255
+ error.daemonPermissionError = true;
1256
+ return error;
1257
+ }
1258
+ /**
1259
+ * Exported for testing: the `internalDaemonError` tag decides whether a daemon
1260
+ * failure degrades to a daemonless graph build or aborts the command.
1261
+ */
1262
+ function daemonProcessException(message) {
1263
+ // The log is an enrichment, not the classifier: it is absent on a first run,
1264
+ // which is exactly when the daemon is most likely to fail to start.
1265
+ let body = message;
1266
+ try {
1267
+ let log = (0, node_fs_1.readFileSync)(tmp_dir_1.DAEMON_OUTPUT_LOG_FILE).toString().split('\n');
1268
+ if (log.length > 20) {
1269
+ log = log.slice(log.length - 20);
1270
+ }
1271
+ body = [
1272
+ message,
1273
+ '',
1274
+ 'Messages from the log:',
1275
+ ...log,
1276
+ '\n',
1277
+ `More information: ${tmp_dir_1.DAEMON_OUTPUT_LOG_FILE}`,
1278
+ ].join('\n');
1279
+ }
1280
+ catch { }
1281
+ const error = new Error(body);
1282
+ error.internalDaemonError = true;
1283
+ return error;
1284
+ }