nx 19.5.0-canary.20240711-2c4c2ae → 19.5.0-canary.20240713-6f50d9f

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. package/bin/init-local.js +2 -3
  2. package/package.json +12 -12
  3. package/schemas/project-schema.json +26 -0
  4. package/src/adapter/angular-json.js +6 -6
  5. package/src/adapter/decorate-cli.js +1 -2
  6. package/src/adapter/ngcli-adapter.js +8 -8
  7. package/src/adapter/rxjs-for-await.js +5 -5
  8. package/src/command-line/add/add.js +2 -2
  9. package/src/command-line/affected/affected.js +2 -3
  10. package/src/command-line/connect/connect-to-nx-cloud.js +5 -6
  11. package/src/command-line/connect/view-logs.js +1 -2
  12. package/src/command-line/daemon/daemon.js +1 -2
  13. package/src/command-line/exec/exec.js +1 -2
  14. package/src/command-line/format/format.js +1 -2
  15. package/src/command-line/generate/generate.js +4 -5
  16. package/src/command-line/generate/generator-utils.js +2 -3
  17. package/src/command-line/graph/command-object.js +2 -2
  18. package/src/command-line/graph/graph.js +2 -3
  19. package/src/command-line/init/implementation/add-nx-to-monorepo.js +1 -2
  20. package/src/command-line/init/implementation/add-nx-to-nest.js +1 -2
  21. package/src/command-line/init/implementation/add-nx-to-npm-repo.js +1 -2
  22. package/src/command-line/init/implementation/angular/index.js +1 -2
  23. package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -2
  24. package/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -2
  25. package/src/command-line/init/implementation/angular/standalone-workspace.js +1 -2
  26. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -1
  27. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +7 -7
  28. package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.js +1 -2
  29. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +1 -2
  30. package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.js +1 -2
  31. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -2
  32. package/src/command-line/init/implementation/react/clean-up-files.js +1 -2
  33. package/src/command-line/init/implementation/react/index.js +1 -2
  34. package/src/command-line/init/implementation/react/read-name-from-package-json.js +1 -2
  35. package/src/command-line/init/implementation/react/rename-js-to-jsx.js +1 -2
  36. package/src/command-line/init/implementation/react/tsconfig-setup.js +1 -2
  37. package/src/command-line/init/implementation/react/write-craco-config.js +1 -2
  38. package/src/command-line/init/implementation/react/write-vite-config.js +1 -2
  39. package/src/command-line/init/implementation/react/write-vite-index-html.js +1 -2
  40. package/src/command-line/init/implementation/utils.js +10 -11
  41. package/src/command-line/init/init-v1.js +1 -2
  42. package/src/command-line/init/init-v2.js +1 -2
  43. package/src/command-line/list/list.js +1 -2
  44. package/src/command-line/migrate/migrate.d.ts +1 -1
  45. package/src/command-line/migrate/migrate.js +5 -5
  46. package/src/command-line/new/new.js +1 -2
  47. package/src/command-line/release/changelog.js +3 -3
  48. package/src/command-line/release/config/config.js +3 -3
  49. package/src/command-line/release/config/filter-release-groups.js +1 -2
  50. package/src/command-line/release/config/version-plans.js +3 -4
  51. package/src/command-line/release/plan.js +2 -2
  52. package/src/command-line/release/publish.js +2 -2
  53. package/src/command-line/release/release.js +2 -2
  54. package/src/command-line/release/utils/batch-projects-by-generator-config.js +1 -2
  55. package/src/command-line/release/utils/exec-command.js +1 -2
  56. package/src/command-line/release/utils/git.js +11 -12
  57. package/src/command-line/release/utils/github.js +5 -6
  58. package/src/command-line/release/utils/launch-editor.js +1 -2
  59. package/src/command-line/release/utils/markdown.js +1 -2
  60. package/src/command-line/release/utils/print-changes.d.ts +0 -1
  61. package/src/command-line/release/utils/print-changes.js +2 -3
  62. package/src/command-line/release/utils/resolve-changelog-renderer.js +1 -2
  63. package/src/command-line/release/utils/resolve-nx-json-error-message.js +1 -2
  64. package/src/command-line/release/utils/resolve-semver-specifier.js +2 -3
  65. package/src/command-line/release/utils/semver.js +4 -5
  66. package/src/command-line/release/utils/shared.js +6 -6
  67. package/src/command-line/release/version.js +2 -2
  68. package/src/command-line/repair/repair.js +1 -2
  69. package/src/command-line/report/report.js +27 -19
  70. package/src/command-line/reset/reset.js +1 -2
  71. package/src/command-line/run/executor-utils.js +2 -3
  72. package/src/command-line/run/run-one.js +1 -2
  73. package/src/command-line/run/run.js +5 -6
  74. package/src/command-line/run-many/run-many.js +2 -3
  75. package/src/command-line/show/project.js +1 -2
  76. package/src/command-line/show/projects.js +1 -2
  77. package/src/command-line/watch/watch.js +2 -2
  78. package/src/command-line/yargs-utils/documentation.js +1 -2
  79. package/src/command-line/yargs-utils/shared-options.js +12 -13
  80. package/src/commands-runner/create-command-graph.js +1 -2
  81. package/src/commands-runner/get-command-projects.js +1 -2
  82. package/src/config/calculate-default-project-name.js +2 -3
  83. package/src/config/configuration.js +2 -2
  84. package/src/config/nx-json.js +2 -3
  85. package/src/config/project-graph.js +3 -3
  86. package/src/config/schema-utils.js +3 -4
  87. package/src/config/task-graph.d.ts +4 -0
  88. package/src/config/to-project-name.js +1 -2
  89. package/src/config/workspace-json-project-json.d.ts +5 -0
  90. package/src/core/graph/main.js +1 -1
  91. package/src/daemon/cache.js +6 -6
  92. package/src/daemon/client/client.d.ts +0 -2
  93. package/src/daemon/client/client.js +2 -2
  94. package/src/daemon/client/daemon-socket-messenger.d.ts +0 -1
  95. package/src/daemon/client/generate-help-output.js +1 -2
  96. package/src/daemon/is-on-daemon.js +1 -2
  97. package/src/daemon/message-types/get-context-file-data.js +2 -2
  98. package/src/daemon/message-types/get-files-in-directory.js +2 -2
  99. package/src/daemon/message-types/get-nx-workspace-files.js +2 -2
  100. package/src/daemon/message-types/glob.js +2 -2
  101. package/src/daemon/message-types/hash-glob.js +2 -2
  102. package/src/daemon/message-types/task-history.js +3 -3
  103. package/src/daemon/message-types/update-context-files.js +2 -2
  104. package/src/daemon/server/file-watching/changed-projects.js +1 -2
  105. package/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -1
  106. package/src/daemon/server/file-watching/file-watcher-sockets.js +4 -4
  107. package/src/daemon/server/handle-context-file-data.js +1 -2
  108. package/src/daemon/server/handle-get-files-in-directory.js +1 -2
  109. package/src/daemon/server/handle-get-task-history.js +1 -2
  110. package/src/daemon/server/handle-glob.js +1 -2
  111. package/src/daemon/server/handle-hash-glob.js +1 -2
  112. package/src/daemon/server/handle-hash-tasks.js +1 -2
  113. package/src/daemon/server/handle-nx-workspace-files.js +1 -2
  114. package/src/daemon/server/handle-outputs-tracking.js +2 -3
  115. package/src/daemon/server/handle-process-in-background.js +1 -2
  116. package/src/daemon/server/handle-request-project-graph.js +1 -2
  117. package/src/daemon/server/handle-request-shutdown.d.ts +0 -1
  118. package/src/daemon/server/handle-request-shutdown.js +1 -2
  119. package/src/daemon/server/handle-write-task-runs-to-history.js +1 -2
  120. package/src/daemon/server/outputs-tracking.js +7 -8
  121. package/src/daemon/server/plugins.js +2 -3
  122. package/src/daemon/server/project-graph-incremental-recomputation.js +3 -3
  123. package/src/daemon/server/server.d.ts +0 -1
  124. package/src/daemon/server/server.js +2 -3
  125. package/src/daemon/server/shutdown-utils.d.ts +0 -1
  126. package/src/daemon/server/shutdown-utils.js +9 -9
  127. package/src/daemon/server/watcher.d.ts +0 -1
  128. package/src/daemon/server/watcher.js +3 -4
  129. package/src/daemon/socket-utils.js +3 -3
  130. package/src/daemon/tmp-dir.js +6 -6
  131. package/src/executors/noop/noop.impl.js +1 -1
  132. package/src/executors/run-commands/run-commands.impl.js +3 -3
  133. package/src/executors/run-script/run-script.impl.js +1 -1
  134. package/src/executors/utils/convert-nx-executor.js +1 -2
  135. package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +1 -2
  136. package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +1 -1
  137. package/src/generators/testing-utils/create-tree-with-empty-workspace.js +2 -3
  138. package/src/generators/testing-utils/create-tree.js +1 -2
  139. package/src/generators/tree.d.ts +0 -2
  140. package/src/generators/tree.js +3 -3
  141. package/src/generators/utils/glob.js +2 -3
  142. package/src/generators/utils/json.js +3 -4
  143. package/src/generators/utils/nx-json.js +2 -3
  144. package/src/generators/utils/project-configuration.js +7 -7
  145. package/src/hasher/create-task-hasher.js +1 -2
  146. package/src/hasher/file-hasher.js +2 -3
  147. package/src/hasher/hash-task.d.ts +0 -1
  148. package/src/hasher/hash-task.js +2 -3
  149. package/src/hasher/native-task-hasher-impl.d.ts +0 -1
  150. package/src/hasher/node-task-hasher-impl.d.ts +0 -1
  151. package/src/hasher/task-hasher.d.ts +0 -1
  152. package/src/hasher/task-hasher.js +10 -10
  153. package/src/migrations/update-15-0-0/migrate-to-inputs.js +1 -1
  154. package/src/migrations/update-15-0-0/prefix-outputs.js +1 -1
  155. package/src/migrations/update-16-0-0/remove-nrwl-cli.js +1 -1
  156. package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +1 -1
  157. package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +1 -1
  158. package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +1 -1
  159. package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +1 -1
  160. package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +1 -1
  161. package/src/migrations/update-17-0-0/move-cache-directory.js +1 -1
  162. package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +1 -1
  163. package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +1 -1
  164. package/src/migrations/update-17-2-0/move-default-base.js +1 -1
  165. package/src/migrations/update-17-3-0/nx-release-path.js +2 -3
  166. package/src/migrations/update-17-3-0/update-nxw.js +1 -1
  167. package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +1 -1
  168. package/src/migrations/update-19-2-0/move-workspace-data-directory.js +3 -4
  169. package/src/migrations/update-19-2-4/set-project-name.js +1 -1
  170. package/src/native/assert-supported-platform.js +1 -2
  171. package/src/native/index.d.ts +1 -0
  172. package/src/native/native-file-cache-location.js +1 -2
  173. package/src/native/nx.wasm32-wasi.wasm +0 -0
  174. package/src/native/transform-objects.js +2 -2
  175. package/src/nx-cloud/debug-logger.js +1 -2
  176. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -2
  177. package/src/nx-cloud/resolution-helpers.js +1 -2
  178. package/src/nx-cloud/update-manager.js +2 -2
  179. package/src/nx-cloud/utilities/axios.js +1 -2
  180. package/src/nx-cloud/utilities/get-cloud-options.js +1 -2
  181. package/src/nx-cloud/utilities/url-shorten.js +8 -9
  182. package/src/plugins/js/hasher/hasher.js +1 -2
  183. package/src/plugins/js/lock-file/lock-file.js +6 -6
  184. package/src/plugins/js/lock-file/npm-parser.js +3 -4
  185. package/src/plugins/js/lock-file/pnpm-parser.js +3 -4
  186. package/src/plugins/js/lock-file/project-graph-pruning.js +1 -2
  187. package/src/plugins/js/lock-file/utils/package-json.js +2 -3
  188. package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +5 -6
  189. package/src/plugins/js/lock-file/yarn-parser.js +3 -4
  190. package/src/plugins/js/package-json/create-package-json.js +2 -3
  191. package/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +1 -2
  192. package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +1 -2
  193. package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -2
  194. package/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +1 -2
  195. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +2 -2
  196. package/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +1 -2
  197. package/src/plugins/js/utils/config.js +1 -2
  198. package/src/plugins/js/utils/register.d.ts +1 -0
  199. package/src/plugins/js/utils/register.js +7 -8
  200. package/src/plugins/js/utils/resolve-relative-to-dir.js +1 -2
  201. package/src/plugins/js/utils/typescript.js +5 -6
  202. package/src/plugins/js/versions.d.ts +1 -1
  203. package/src/plugins/js/versions.js +1 -1
  204. package/src/plugins/package-json-workspaces/create-nodes.js +5 -5
  205. package/src/plugins/project-json/build-nodes/project-json.js +3 -3
  206. package/src/project-graph/affected/affected-project-graph.js +1 -2
  207. package/src/project-graph/build-project-graph.js +3 -4
  208. package/src/project-graph/error-types.js +11 -11
  209. package/src/project-graph/file-map-utils.js +4 -5
  210. package/src/project-graph/file-utils.d.ts +1 -1
  211. package/src/project-graph/file-utils.js +7 -7
  212. package/src/project-graph/nx-deps-cache.js +8 -8
  213. package/src/project-graph/operators.js +5 -5
  214. package/src/project-graph/plugins/internal-api.js +3 -3
  215. package/src/project-graph/plugins/isolation/index.js +1 -2
  216. package/src/project-graph/plugins/isolation/messaging.d.ts +0 -2
  217. package/src/project-graph/plugins/isolation/messaging.js +4 -5
  218. package/src/project-graph/plugins/isolation/plugin-pool.js +1 -2
  219. package/src/project-graph/plugins/loader.js +7 -7
  220. package/src/project-graph/plugins/utils.js +4 -5
  221. package/src/project-graph/project-graph-builder.js +2 -2
  222. package/src/project-graph/project-graph.js +7 -8
  223. package/src/project-graph/utils/build-all-workspace-files.js +1 -2
  224. package/src/project-graph/utils/find-project-for-path.js +4 -5
  225. package/src/project-graph/utils/implicit-project-dependencies.js +1 -2
  226. package/src/project-graph/utils/normalize-project-nodes.js +2 -3
  227. package/src/project-graph/utils/project-configuration-utils.js +27 -13
  228. package/src/project-graph/utils/retrieve-workspace-files.js +6 -7
  229. package/src/tasks-runner/create-task-graph.js +4 -3
  230. package/src/tasks-runner/forked-process-task-runner.d.ts +0 -1
  231. package/src/tasks-runner/init-tasks-runner.js +1 -2
  232. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -2
  233. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +1 -2
  234. package/src/tasks-runner/life-cycles/formatting-utils.js +2 -3
  235. package/src/tasks-runner/life-cycles/pretty-time.js +1 -2
  236. package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -2
  237. package/src/tasks-runner/pseudo-ipc.d.ts +0 -1
  238. package/src/tasks-runner/pseudo-terminal.d.ts +0 -1
  239. package/src/tasks-runner/pseudo-terminal.js +2 -2
  240. package/src/tasks-runner/run-command.js +4 -5
  241. package/src/tasks-runner/task-env.d.ts +0 -1
  242. package/src/tasks-runner/task-env.js +5 -6
  243. package/src/tasks-runner/task-graph-utils.js +2 -3
  244. package/src/tasks-runner/tasks-schedule.d.ts +1 -0
  245. package/src/tasks-runner/tasks-schedule.js +28 -4
  246. package/src/tasks-runner/utils.js +27 -27
  247. package/src/utils/ab-testing.js +2 -2
  248. package/src/utils/all-file-data.js +1 -2
  249. package/src/utils/assert-workspace-validity.js +1 -2
  250. package/src/utils/async-iterator.js +2 -3
  251. package/src/utils/cache-directory.js +2 -2
  252. package/src/utils/child-process.d.ts +0 -1
  253. package/src/utils/child-process.js +3 -3
  254. package/src/utils/chunkify.js +1 -2
  255. package/src/utils/code-frames.js +1 -2
  256. package/src/utils/collapse-expanded-outputs.js +1 -2
  257. package/src/utils/command-line-utils.js +5 -6
  258. package/src/utils/consume-messages-from-socket.js +1 -2
  259. package/src/utils/default-base.js +1 -2
  260. package/src/utils/dotenv.js +1 -2
  261. package/src/utils/exit-codes.d.ts +0 -1
  262. package/src/utils/exit-codes.js +1 -2
  263. package/src/utils/fileutils.d.ts +0 -1
  264. package/src/utils/fileutils.js +9 -10
  265. package/src/utils/find-matching-projects.d.ts +0 -4
  266. package/src/utils/find-matching-projects.js +5 -8
  267. package/src/utils/find-workspace-root.js +1 -2
  268. package/src/utils/get-package-name-from-import-path.js +1 -2
  269. package/src/utils/git-utils.js +4 -5
  270. package/src/utils/globs.d.ts +2 -0
  271. package/src/utils/globs.js +12 -2
  272. package/src/utils/ignore.js +4 -4
  273. package/src/utils/installation-directory.js +2 -3
  274. package/src/utils/is-ci.js +1 -2
  275. package/src/utils/json-diff.js +5 -5
  276. package/src/utils/json.js +3 -3
  277. package/src/utils/logger.js +2 -2
  278. package/src/utils/nx-cloud-utils.js +3 -4
  279. package/src/utils/nx-plugin.deprecated.js +1 -2
  280. package/src/utils/object-sort.js +1 -2
  281. package/src/utils/package-json.js +8 -9
  282. package/src/utils/package-manager.js +13 -14
  283. package/src/utils/params.js +14 -14
  284. package/src/utils/path.js +3 -4
  285. package/src/utils/plugins/community-plugins.js +1 -2
  286. package/src/utils/plugins/core-plugins.js +2 -3
  287. package/src/utils/plugins/installed-plugins.js +3 -4
  288. package/src/utils/plugins/local-plugins.js +2 -3
  289. package/src/utils/plugins/plugin-capabilities.js +2 -3
  290. package/src/utils/plugins/shared.js +1 -2
  291. package/src/utils/print-help.js +1 -2
  292. package/src/utils/project-graph-utils.js +4 -5
  293. package/src/utils/serializable-error.js +1 -2
  294. package/src/utils/serialize-overrides-into-command-line.js +1 -2
  295. package/src/utils/serialize-target.js +1 -2
  296. package/src/utils/split-target.js +2 -3
  297. package/src/utils/strip-indents.js +1 -2
  298. package/src/utils/task-history.js +3 -3
  299. package/src/utils/update-nxw.js +1 -2
  300. package/src/utils/workspace-configuration-check.js +1 -2
  301. package/src/utils/workspace-context.js +10 -11
  302. package/src/utils/workspace-root.js +3 -3
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapTargetDefaultsToDependencies = exports.createTaskGraph = exports.ProcessTasks = void 0;
3
+ exports.ProcessTasks = void 0;
4
+ exports.createTaskGraph = createTaskGraph;
5
+ exports.mapTargetDefaultsToDependencies = mapTargetDefaultsToDependencies;
4
6
  const utils_1 = require("./utils");
5
7
  const project_graph_utils_1 = require("../utils/project-graph-utils");
6
8
  const output_1 = require("../utils/output");
@@ -154,6 +156,7 @@ class ProcessTasks {
154
156
  overrides: interpolatedOverrides,
155
157
  outputs: (0, utils_1.getOutputs)(this.projectGraph.nodes, qualifiedTarget, interpolatedOverrides),
156
158
  cache: project.data.targets[target].cache,
159
+ parallelism: project.data.targets[target].parallelism ?? true,
157
160
  };
158
161
  }
159
162
  resolveConfiguration(project, target, configuration) {
@@ -181,7 +184,6 @@ function createTaskGraph(projectGraph, extraTargetDependencies, projectNames, ta
181
184
  dependencies: p.dependencies,
182
185
  };
183
186
  }
184
- exports.createTaskGraph = createTaskGraph;
185
187
  function mapTargetDefaultsToDependencies(defaults) {
186
188
  const res = {};
187
189
  Object.keys(defaults ?? {}).forEach((k) => {
@@ -189,7 +191,6 @@ function mapTargetDefaultsToDependencies(defaults) {
189
191
  });
190
192
  return res;
191
193
  }
192
- exports.mapTargetDefaultsToDependencies = mapTargetDefaultsToDependencies;
193
194
  function interpolateOverrides(args, projectName, project) {
194
195
  const interpolatedArgs = { ...args };
195
196
  Object.entries(interpolatedArgs).forEach(([name, value]) => {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { DefaultTasksRunnerOptions } from './default-tasks-runner';
3
2
  import { Batch } from './tasks-schedule';
4
3
  import { BatchResults } from './batch/batch-messages';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initTasksRunner = void 0;
3
+ exports.initTasksRunner = initTasksRunner;
4
4
  const workspace_configuration_check_1 = require("../utils/workspace-configuration-check");
5
5
  const configuration_1 = require("../config/configuration");
6
6
  const project_graph_1 = require("../project-graph/project-graph");
@@ -56,4 +56,3 @@ async function initTasksRunner(nxArgs) {
56
56
  },
57
57
  };
58
58
  }
59
- exports.initTasksRunner = initTasksRunner;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createRunManyDynamicOutputRenderer = void 0;
3
+ exports.createRunManyDynamicOutputRenderer = createRunManyDynamicOutputRenderer;
4
4
  const cliCursor = require("cli-cursor");
5
5
  const cli_spinners_1 = require("cli-spinners");
6
6
  const os_1 = require("os");
@@ -318,7 +318,6 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
318
318
  };
319
319
  return { lifeCycle, renderIsDone };
320
320
  }
321
- exports.createRunManyDynamicOutputRenderer = createRunManyDynamicOutputRenderer;
322
321
  function writeCompletedTaskResultLine(line) {
323
322
  output_1.output.overwriteLine(LEFT_PAD + line);
324
323
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createRunOneDynamicOutputRenderer = void 0;
3
+ exports.createRunOneDynamicOutputRenderer = createRunOneDynamicOutputRenderer;
4
4
  const cliCursor = require("cli-cursor");
5
5
  const cli_spinners_1 = require("cli-spinners");
6
6
  const os_1 = require("os");
@@ -226,4 +226,3 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
226
226
  };
227
227
  return { lifeCycle, renderIsDone };
228
228
  }
229
- exports.createRunOneDynamicOutputRenderer = createRunOneDynamicOutputRenderer;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatTargetsAndProjects = exports.formatFlags = void 0;
3
+ exports.formatFlags = formatFlags;
4
+ exports.formatTargetsAndProjects = formatTargetsAndProjects;
4
5
  const output_1 = require("../../utils/output");
5
6
  function formatFlags(leftPadding, flag, value) {
6
7
  return flag == '_'
7
8
  ? `${leftPadding} ${value.join(' ')}`
8
9
  : `${leftPadding} --${flag}=${formatValue(value)}`;
9
10
  }
10
- exports.formatFlags = formatFlags;
11
11
  function formatValue(value) {
12
12
  if (Array.isArray(value)) {
13
13
  return `[${value.join(',')}]`;
@@ -41,4 +41,3 @@ function formatTargetsAndProjects(projectNames, targets, tasks) {
41
41
  }
42
42
  return text;
43
43
  }
44
- exports.formatTargetsAndProjects = formatTargetsAndProjects;
@@ -3,7 +3,7 @@
3
3
  * All credit to https://github.com/jonschlinkert/pretty-time
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.prettyTime = void 0;
6
+ exports.prettyTime = prettyTime;
7
7
  const nano = (time) => +time[0] * 1e9 + +time[1];
8
8
  const scale = {
9
9
  w: 6048e11,
@@ -71,4 +71,3 @@ function prettyTime(time, smallest, digits) {
71
71
  }
72
72
  return res.trim();
73
73
  }
74
- exports.prettyTime = prettyTime;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.viewLogsFooterRows = void 0;
3
+ exports.viewLogsFooterRows = viewLogsFooterRows;
4
4
  const nx_json_1 = require("../../config/nx-json");
5
5
  const nx_cloud_utils_1 = require("../../utils/nx-cloud-utils");
6
6
  const output_1 = require("../../utils/output");
@@ -13,4 +13,3 @@ function viewLogsFooterRows(failedTasks) {
13
13
  return [];
14
14
  }
15
15
  }
16
- exports.viewLogsFooterRows = viewLogsFooterRows;
@@ -16,7 +16,6 @@
16
16
  * * channel = getPseudoIpcChannel(process.env.NX_IPC_CHANNEL_ID)
17
17
  * * forkChildProcess.on('message', writeToPseudoIpcChannel)
18
18
  */
19
- /// <reference types="node" />
20
19
  import { Serializable } from 'child_process';
21
20
  export interface PseudoIPCMessage {
22
21
  type: 'TO_CHILDREN_FROM_PARENT' | 'TO_PARENT_FROM_CHILDREN' | 'CHILD_READY';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { ChildProcess, RustPseudoTerminal } from '../native';
3
2
  import { PseudoIPCServer } from './pseudo-ipc';
4
3
  import { Serializable } from 'child_process';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PseudoTtyProcessWithSend = exports.PseudoTtyProcess = exports.PseudoTerminal = exports.getPseudoTerminal = void 0;
3
+ exports.PseudoTtyProcessWithSend = exports.PseudoTtyProcess = exports.PseudoTerminal = void 0;
4
+ exports.getPseudoTerminal = getPseudoTerminal;
4
5
  const native_1 = require("../native");
5
6
  const pseudo_ipc_1 = require("./pseudo-ipc");
6
7
  const socket_utils_1 = require("../daemon/socket-utils");
@@ -13,7 +14,6 @@ function getPseudoTerminal(skipSupportCheck = false) {
13
14
  pseudoTerminal ??= new PseudoTerminal(new native_1.RustPseudoTerminal());
14
15
  return pseudoTerminal;
15
16
  }
16
- exports.getPseudoTerminal = getPseudoTerminal;
17
17
  class PseudoTerminal {
18
18
  static isSupported() {
19
19
  return process.stdout.isTTY && supportedPtyPlatform();
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRunnerOptions = exports.getRunner = exports.invokeTasksRunner = exports.runCommand = void 0;
3
+ exports.runCommand = runCommand;
4
+ exports.invokeTasksRunner = invokeTasksRunner;
5
+ exports.getRunner = getRunner;
6
+ exports.getRunnerOptions = getRunnerOptions;
4
7
  const path_1 = require("path");
5
8
  const workspace_root_1 = require("../utils/workspace-root");
6
9
  const fileutils_1 = require("../utils/fileutils");
@@ -103,7 +106,6 @@ async function runCommand(projectsToRun, projectGraph, { nxJson }, nxArgs, overr
103
106
  });
104
107
  return status;
105
108
  }
106
- exports.runCommand = runCommand;
107
109
  function setEnvVarsBasedOnArgs(nxArgs, loadDotEnvFiles) {
108
110
  if (nxArgs.outputStyle == 'stream' ||
109
111
  process.env.NX_BATCH_MODE === 'true' ||
@@ -195,7 +197,6 @@ async function invokeTasksRunner({ tasks, projectGraph, taskGraph, lifeCycle, nx
195
197
  }
196
198
  return anyFailures ? 1 : 0;
197
199
  }
198
- exports.invokeTasksRunner = invokeTasksRunner;
199
200
  function constructLifeCycles(lifeCycle) {
200
201
  const lifeCycles = [];
201
202
  lifeCycles.push(new store_run_information_life_cycle_1.StoreRunInformationLifeCycle());
@@ -298,7 +299,6 @@ function getRunner(nxArgs, nxJson) {
298
299
  throw new Error(`Could not find runner configuration for ${runner}`);
299
300
  }
300
301
  }
301
- exports.getRunner = getRunner;
302
302
  function getTasksRunnerPath(runner, nxJson) {
303
303
  let modulePath = nxJson.tasksRunnerOptions?.[runner]?.runner;
304
304
  if (modulePath) {
@@ -355,4 +355,3 @@ function getRunnerOptions(runner, nxJson, nxArgs, isCloudDefault) {
355
355
  }
356
356
  return result;
357
357
  }
358
- exports.getRunnerOptions = getRunnerOptions;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Task } from '../config/task-graph';
3
2
  export declare function getEnvVariablesForBatchProcess(skipNxCache: boolean, captureStderr: boolean): NodeJS.ProcessEnv;
4
3
  export declare function getTaskSpecificEnv(task: Task): NodeJS.ProcessEnv;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unloadDotEnvFile = exports.loadAndExpandDotEnvFile = exports.getEnvVariablesForTask = exports.getTaskSpecificEnv = exports.getEnvVariablesForBatchProcess = void 0;
3
+ exports.getEnvVariablesForBatchProcess = getEnvVariablesForBatchProcess;
4
+ exports.getTaskSpecificEnv = getTaskSpecificEnv;
5
+ exports.getEnvVariablesForTask = getEnvVariablesForTask;
6
+ exports.loadAndExpandDotEnvFile = loadAndExpandDotEnvFile;
7
+ exports.unloadDotEnvFile = unloadDotEnvFile;
4
8
  const dotenv_1 = require("dotenv");
5
9
  const dotenv_expand_1 = require("dotenv-expand");
6
10
  const workspace_root_1 = require("../utils/workspace-root");
@@ -12,7 +16,6 @@ function getEnvVariablesForBatchProcess(skipNxCache, captureStderr) {
12
16
  ...getNxEnvVariablesForForkedProcess(process.env.FORCE_COLOR === undefined ? 'true' : process.env.FORCE_COLOR, skipNxCache, captureStderr),
13
17
  };
14
18
  }
15
- exports.getEnvVariablesForBatchProcess = getEnvVariablesForBatchProcess;
16
19
  function getTaskSpecificEnv(task) {
17
20
  // Unload any dot env files at the root of the workspace that were loaded on init of Nx.
18
21
  const taskEnv = unloadDotEnvFiles({ ...process.env });
@@ -21,7 +24,6 @@ function getTaskSpecificEnv(task) {
21
24
  : // If not loading dot env files, ensure env vars created by system are still loaded
22
25
  taskEnv;
23
26
  }
24
- exports.getTaskSpecificEnv = getTaskSpecificEnv;
25
27
  function getEnvVariablesForTask(task, taskSpecificEnv, forceColor, skipNxCache, captureStderr, outputPath, streamOutput) {
26
28
  const res = {
27
29
  // Start With Dotenv Variables
@@ -39,7 +41,6 @@ function getEnvVariablesForTask(task, taskSpecificEnv, forceColor, skipNxCache,
39
41
  delete res.NX_SET_CLI;
40
42
  return res;
41
43
  }
42
- exports.getEnvVariablesForTask = getEnvVariablesForTask;
43
44
  function getNxEnvVariablesForForkedProcess(forceColor, skipNxCache, captureStderr, outputPath, streamOutput) {
44
45
  const env = {
45
46
  FORCE_COLOR: forceColor,
@@ -92,7 +93,6 @@ function loadAndExpandDotEnvFile(filename, environmentVariables, override = fals
92
93
  processEnv: environmentVariables,
93
94
  });
94
95
  }
95
- exports.loadAndExpandDotEnvFile = loadAndExpandDotEnvFile;
96
96
  /**
97
97
  * This function unloads a .env file and removes the variables in it from the environmentVariables.
98
98
  * @param filename
@@ -107,7 +107,6 @@ function unloadDotEnvFile(filename, environmentVariables, override = false) {
107
107
  }
108
108
  });
109
109
  }
110
- exports.unloadDotEnvFile = unloadDotEnvFile;
111
110
  function getEnvFilesForTask(task) {
112
111
  // Collect dot env files that may pertain to a task
113
112
  return [
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeAcyclic = exports.findCycle = void 0;
3
+ exports.findCycle = findCycle;
4
+ exports.makeAcyclic = makeAcyclic;
4
5
  function _findCycle(graph, id, visited, path) {
5
6
  if (visited[id])
6
7
  return null;
@@ -26,7 +27,6 @@ function findCycle(graph) {
26
27
  }
27
28
  return null;
28
29
  }
29
- exports.findCycle = findCycle;
30
30
  function _makeAcyclic(graph, id, visited, path) {
31
31
  if (visited[id])
32
32
  return;
@@ -52,4 +52,3 @@ function makeAcyclic(graph) {
52
52
  }
53
53
  graph.roots = Object.keys(graph.dependencies).filter((t) => graph.dependencies[t].length === 0);
54
54
  }
55
- exports.makeAcyclic = makeAcyclic;
@@ -14,6 +14,7 @@ export declare class TasksSchedule {
14
14
  private reverseProjectGraph;
15
15
  private scheduledBatches;
16
16
  private scheduledTasks;
17
+ private runningTasks;
17
18
  private completedTasks;
18
19
  private scheduleRequestsExecutionChain;
19
20
  constructor(projectGraph: ProjectGraph, taskGraph: TaskGraph, options: DefaultTasksRunnerOptions);
@@ -14,6 +14,7 @@ class TasksSchedule {
14
14
  this.reverseProjectGraph = (0, operators_1.reverse)(this.projectGraph);
15
15
  this.scheduledBatches = [];
16
16
  this.scheduledTasks = [];
17
+ this.runningTasks = new Set();
17
18
  this.completedTasks = new Set();
18
19
  this.scheduleRequestsExecutionChain = Promise.resolve();
19
20
  }
@@ -31,6 +32,7 @@ class TasksSchedule {
31
32
  complete(taskIds) {
32
33
  for (const taskId of taskIds) {
33
34
  this.completedTasks.add(taskId);
35
+ this.runningTasks.delete(taskId);
34
36
  }
35
37
  this.notScheduledTaskGraph = (0, utils_1.removeTasksFromTaskGraph)(this.notScheduledTaskGraph, taskIds);
36
38
  }
@@ -84,6 +86,7 @@ class TasksSchedule {
84
86
  (0, project_graph_utils_1.findAllProjectNodeDependencies)(project1, this.reverseProjectGraph)
85
87
  .length);
86
88
  });
89
+ this.runningTasks.add(taskId);
87
90
  }
88
91
  async scheduleBatches() {
89
92
  const batchMap = {};
@@ -102,7 +105,7 @@ class TasksSchedule {
102
105
  this.scheduledBatches.push({ executorName, taskGraph });
103
106
  }
104
107
  async processTaskForBatches(batches, task, rootExecutorName, isRoot) {
105
- if (!this.canBatchTaskBeScheduled(task.id, batches[rootExecutorName])) {
108
+ if (!this.canBatchTaskBeScheduled(task, batches[rootExecutorName])) {
106
109
  return;
107
110
  }
108
111
  const { batchImplementationFactory } = (0, utils_1.getExecutorForTask)(task, this.projectGraph);
@@ -131,12 +134,33 @@ class TasksSchedule {
131
134
  await this.processTaskForBatches(batches, depTask, rootExecutorName, false);
132
135
  }
133
136
  }
134
- canBatchTaskBeScheduled(taskId, batchTaskGraph) {
137
+ canBatchTaskBeScheduled(task, batchTaskGraph) {
138
+ // task self needs to have parallelism true
135
139
  // all deps have either completed or belong to the same batch
136
- return this.taskGraph.dependencies[taskId].every((id) => this.completedTasks.has(id) || !!batchTaskGraph?.tasks[id]);
140
+ return (task.parallelism === true &&
141
+ this.taskGraph.dependencies[task.id].every((id) => this.completedTasks.has(id) || !!batchTaskGraph?.tasks[id]));
137
142
  }
138
143
  canBeScheduled(taskId) {
139
- return this.taskGraph.dependencies[taskId].every((id) => this.completedTasks.has(id));
144
+ const hasDependenciesCompleted = this.taskGraph.dependencies[taskId].every((id) => this.completedTasks.has(id));
145
+ // if dependencies have not completed, cannot schedule
146
+ if (!hasDependenciesCompleted) {
147
+ return false;
148
+ }
149
+ // if there are no running tasks, can schedule anything
150
+ if (this.runningTasks.size === 0) {
151
+ return true;
152
+ }
153
+ const runningTasksNotSupportParallelism = Array.from(this.runningTasks).some((taskId) => {
154
+ return this.taskGraph.tasks[taskId].parallelism === false;
155
+ });
156
+ if (runningTasksNotSupportParallelism) {
157
+ // if any running tasks do not support parallelism, no other tasks can be scheduled
158
+ return false;
159
+ }
160
+ else {
161
+ // if all running tasks support parallelism, can only schedule task with parallelism
162
+ return this.taskGraph.tasks[taskId].parallelism === true;
163
+ }
140
164
  }
141
165
  }
142
166
  exports.TasksSchedule = TasksSchedule;
@@ -1,6 +1,30 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unparse = exports.isCacheableTask = exports.shouldStreamOutput = exports.getSerializedArgsForTask = exports.getPrintableCommandArgsForTask = exports.getCliPath = exports.calculateReverseDeps = exports.removeIdsFromGraph = exports.removeTasksFromTaskGraph = exports.getCustomHasher = exports.getExecutorForTask = exports.getExecutorNameForTask = exports.getTargetConfigurationForTask = exports.interpolate = exports.getOutputsForTargetAndConfiguration = exports.transformLegacyOutputs = exports.validateOutputs = exports.normalizeTargetDependencyWithStringProjects = exports.getOutputs = exports.readProjectAndTargetFromTargetString = exports.expandWildcardTargetConfiguration = exports.expandDependencyConfigSyntaxSugar = exports.normalizeDependencyConfigProjects = exports.normalizeDependencyConfigDefinition = exports.getDependencyConfigs = void 0;
3
+ exports.getDependencyConfigs = getDependencyConfigs;
4
+ exports.normalizeDependencyConfigDefinition = normalizeDependencyConfigDefinition;
5
+ exports.normalizeDependencyConfigProjects = normalizeDependencyConfigProjects;
6
+ exports.expandDependencyConfigSyntaxSugar = expandDependencyConfigSyntaxSugar;
7
+ exports.expandWildcardTargetConfiguration = expandWildcardTargetConfiguration;
8
+ exports.readProjectAndTargetFromTargetString = readProjectAndTargetFromTargetString;
9
+ exports.getOutputs = getOutputs;
10
+ exports.normalizeTargetDependencyWithStringProjects = normalizeTargetDependencyWithStringProjects;
11
+ exports.validateOutputs = validateOutputs;
12
+ exports.transformLegacyOutputs = transformLegacyOutputs;
13
+ exports.getOutputsForTargetAndConfiguration = getOutputsForTargetAndConfiguration;
14
+ exports.interpolate = interpolate;
15
+ exports.getTargetConfigurationForTask = getTargetConfigurationForTask;
16
+ exports.getExecutorNameForTask = getExecutorNameForTask;
17
+ exports.getExecutorForTask = getExecutorForTask;
18
+ exports.getCustomHasher = getCustomHasher;
19
+ exports.removeTasksFromTaskGraph = removeTasksFromTaskGraph;
20
+ exports.removeIdsFromGraph = removeIdsFromGraph;
21
+ exports.calculateReverseDeps = calculateReverseDeps;
22
+ exports.getCliPath = getCliPath;
23
+ exports.getPrintableCommandArgsForTask = getPrintableCommandArgsForTask;
24
+ exports.getSerializedArgsForTask = getSerializedArgsForTask;
25
+ exports.shouldStreamOutput = shouldStreamOutput;
26
+ exports.isCacheableTask = isCacheableTask;
27
+ exports.unparse = unparse;
4
28
  const path_1 = require("path");
5
29
  const posix_1 = require("path/posix");
6
30
  const workspace_root_1 = require("../utils/workspace-root");
@@ -12,6 +36,7 @@ const executor_utils_1 = require("../command-line/run/executor-utils");
12
36
  const project_graph_1 = require("../project-graph/project-graph");
13
37
  const find_matching_projects_1 = require("../utils/find-matching-projects");
14
38
  const minimatch_1 = require("minimatch");
39
+ const globs_1 = require("../utils/globs");
15
40
  function getDependencyConfigs({ project, target }, extraTargetDependencies, projectGraph, allTargetNames) {
16
41
  const dependencyConfigs = (projectGraph.nodes[project].data?.targets[target]?.dependsOn ??
17
42
  // This is passed into `run-command` from programmatic invocations
@@ -19,11 +44,9 @@ function getDependencyConfigs({ project, target }, extraTargetDependencies, proj
19
44
  []).flatMap((config) => normalizeDependencyConfigDefinition(config, project, projectGraph, allTargetNames));
20
45
  return dependencyConfigs;
21
46
  }
22
- exports.getDependencyConfigs = getDependencyConfigs;
23
47
  function normalizeDependencyConfigDefinition(definition, currentProject, graph, allTargetNames) {
24
48
  return expandWildcardTargetConfiguration(normalizeDependencyConfigProjects(expandDependencyConfigSyntaxSugar(definition, graph), currentProject, graph), allTargetNames);
25
49
  }
26
- exports.normalizeDependencyConfigDefinition = normalizeDependencyConfigDefinition;
27
50
  function normalizeDependencyConfigProjects(dependencyConfig, currentProject, graph) {
28
51
  const noStringConfig = normalizeTargetDependencyWithStringProjects(dependencyConfig);
29
52
  if (noStringConfig.projects) {
@@ -34,7 +57,6 @@ function normalizeDependencyConfigProjects(dependencyConfig, currentProject, gra
34
57
  }
35
58
  return dependencyConfig;
36
59
  }
37
- exports.normalizeDependencyConfigProjects = normalizeDependencyConfigProjects;
38
60
  function expandDependencyConfigSyntaxSugar(dependencyConfigString, graph) {
39
61
  if (typeof dependencyConfigString !== 'string') {
40
62
  return dependencyConfigString;
@@ -53,11 +75,10 @@ function expandDependencyConfigSyntaxSugar(dependencyConfigString, graph) {
53
75
  const { projects, target } = readProjectAndTargetFromTargetString(targetString, graph.nodes);
54
76
  return projects ? { projects, target } : { target };
55
77
  }
56
- exports.expandDependencyConfigSyntaxSugar = expandDependencyConfigSyntaxSugar;
57
78
  // Weakmap let's the cache get cleared by garbage collector if allTargetNames is no longer used
58
79
  const patternResultCache = new WeakMap();
59
80
  function expandWildcardTargetConfiguration(dependencyConfig, allTargetNames) {
60
- if (!find_matching_projects_1.GLOB_CHARACTERS.some((char) => dependencyConfig.target.includes(char))) {
81
+ if (!(0, globs_1.isGlobPattern)(dependencyConfig.target)) {
61
82
  return [dependencyConfig];
62
83
  }
63
84
  let cache = patternResultCache.get(allTargetNames);
@@ -78,7 +99,6 @@ function expandWildcardTargetConfiguration(dependencyConfig, allTargetNames) {
78
99
  cache.set(dependencyConfig.target, result);
79
100
  return result;
80
101
  }
81
- exports.expandWildcardTargetConfiguration = expandWildcardTargetConfiguration;
82
102
  function readProjectAndTargetFromTargetString(targetString, projects) {
83
103
  // Support for both `project:target` and `target:with:colons` syntax
84
104
  const [maybeProject, ...segments] = (0, split_target_1.splitByColons)(targetString);
@@ -97,11 +117,9 @@ function readProjectAndTargetFromTargetString(targetString, projects) {
97
117
  return { target: targetString };
98
118
  }
99
119
  }
100
- exports.readProjectAndTargetFromTargetString = readProjectAndTargetFromTargetString;
101
120
  function getOutputs(p, target, overrides) {
102
121
  return getOutputsForTargetAndConfiguration(target, overrides, p[target.project]);
103
122
  }
104
- exports.getOutputs = getOutputs;
105
123
  function normalizeTargetDependencyWithStringProjects(dependencyConfig) {
106
124
  if (typeof dependencyConfig.projects === 'string') {
107
125
  /** LERNA SUPPORT START - Remove in v20 */
@@ -127,7 +145,6 @@ function normalizeTargetDependencyWithStringProjects(dependencyConfig) {
127
145
  }
128
146
  return dependencyConfig;
129
147
  }
130
- exports.normalizeTargetDependencyWithStringProjects = normalizeTargetDependencyWithStringProjects;
131
148
  class InvalidOutputsError extends Error {
132
149
  constructor(outputs, invalidOutputs) {
133
150
  super(InvalidOutputsError.createMessage(invalidOutputs));
@@ -167,7 +184,6 @@ function validateOutputs(outputs) {
167
184
  throw new InvalidOutputsError(outputs, invalidOutputs);
168
185
  }
169
186
  }
170
- exports.validateOutputs = validateOutputs;
171
187
  function transformLegacyOutputs(projectRoot, error) {
172
188
  return error.outputs.map((output) => {
173
189
  if (!error.invalidOutputs.has(output)) {
@@ -184,7 +200,6 @@ function transformLegacyOutputs(projectRoot, error) {
184
200
  (0, path_2.joinPathFragments)(isWithinProject ? '{projectRoot}' : '{workspaceRoot}', isWithinProject ? relativePath : outputPath));
185
201
  });
186
202
  }
187
- exports.transformLegacyOutputs = transformLegacyOutputs;
188
203
  /**
189
204
  * Returns the list of outputs that will be cached.
190
205
  */
@@ -230,7 +245,6 @@ function getOutputsForTargetAndConfiguration(taskTargetOrTask, overridesOrNode,
230
245
  return [];
231
246
  }
232
247
  }
233
- exports.getOutputsForTargetAndConfiguration = getOutputsForTargetAndConfiguration;
234
248
  /**
235
249
  * Matches portions of a string which need to be interpolated.
236
250
  * Matches anything within curly braces, excluding the braces.
@@ -250,7 +264,6 @@ function interpolate(template, data) {
250
264
  const parts = template.split('/').map((s) => _interpolate(s, data));
251
265
  return (0, posix_1.join)(...parts).replace('{workspaceRoot}/', '');
252
266
  }
253
- exports.interpolate = interpolate;
254
267
  function _interpolate(template, data) {
255
268
  let res = template;
256
269
  if (data.projectRoot == '.') {
@@ -272,22 +285,18 @@ function getTargetConfigurationForTask(task, projectGraph) {
272
285
  const project = projectGraph.nodes[task.target.project].data;
273
286
  return project.targets[task.target.target];
274
287
  }
275
- exports.getTargetConfigurationForTask = getTargetConfigurationForTask;
276
288
  function getExecutorNameForTask(task, projectGraph) {
277
289
  return getTargetConfigurationForTask(task, projectGraph)?.executor;
278
290
  }
279
- exports.getExecutorNameForTask = getExecutorNameForTask;
280
291
  function getExecutorForTask(task, projectGraph) {
281
292
  const executor = getExecutorNameForTask(task, projectGraph);
282
293
  const [nodeModule, executorName] = executor.split(':');
283
294
  return (0, executor_utils_1.getExecutorInformation)(nodeModule, executorName, workspace_root_1.workspaceRoot, (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph).projects);
284
295
  }
285
- exports.getExecutorForTask = getExecutorForTask;
286
296
  function getCustomHasher(task, projectGraph) {
287
297
  const factory = getExecutorForTask(task, projectGraph).hasherFactory;
288
298
  return factory ? factory() : null;
289
299
  }
290
- exports.getCustomHasher = getCustomHasher;
291
300
  function removeTasksFromTaskGraph(graph, ids) {
292
301
  const newGraph = removeIdsFromGraph(graph, ids, graph.tasks);
293
302
  return {
@@ -296,7 +305,6 @@ function removeTasksFromTaskGraph(graph, ids) {
296
305
  tasks: newGraph.mapWithIds,
297
306
  };
298
307
  }
299
- exports.removeTasksFromTaskGraph = removeTasksFromTaskGraph;
300
308
  function removeIdsFromGraph(graph, ids, mapWithIds) {
301
309
  const filteredMapWithIds = {};
302
310
  const dependencies = {};
@@ -313,7 +321,6 @@ function removeIdsFromGraph(graph, ids, mapWithIds) {
313
321
  roots: Object.keys(dependencies).filter((k) => dependencies[k].length === 0),
314
322
  };
315
323
  }
316
- exports.removeIdsFromGraph = removeIdsFromGraph;
317
324
  function calculateReverseDeps(taskGraph) {
318
325
  const reverseTaskDeps = {};
319
326
  Object.keys(taskGraph.tasks).forEach((t) => {
@@ -326,11 +333,9 @@ function calculateReverseDeps(taskGraph) {
326
333
  });
327
334
  return reverseTaskDeps;
328
335
  }
329
- exports.calculateReverseDeps = calculateReverseDeps;
330
336
  function getCliPath() {
331
337
  return require.resolve(`../../bin/run-executor.js`);
332
338
  }
333
- exports.getCliPath = getCliPath;
334
339
  function getPrintableCommandArgsForTask(task) {
335
340
  const args = task.overrides['__overrides_unparsed__'];
336
341
  const target = task.target.target.includes(':')
@@ -341,7 +346,6 @@ function getPrintableCommandArgsForTask(task) {
341
346
  : '';
342
347
  return ['run', `${task.target.project}:${target}${config}`, ...args];
343
348
  }
344
- exports.getPrintableCommandArgsForTask = getPrintableCommandArgsForTask;
345
349
  function getSerializedArgsForTask(task, isVerbose) {
346
350
  return [
347
351
  JSON.stringify({
@@ -351,7 +355,6 @@ function getSerializedArgsForTask(task, isVerbose) {
351
355
  }),
352
356
  ];
353
357
  }
354
- exports.getSerializedArgsForTask = getSerializedArgsForTask;
355
358
  function shouldStreamOutput(task, initiatingProject) {
356
359
  if (process.env.NX_STREAM_OUTPUT === 'true')
357
360
  return true;
@@ -361,7 +364,6 @@ function shouldStreamOutput(task, initiatingProject) {
361
364
  return true;
362
365
  return false;
363
366
  }
364
- exports.shouldStreamOutput = shouldStreamOutput;
365
367
  function isCacheableTask(task, options) {
366
368
  if (task.cache !== undefined && !longRunningTask(task)) {
367
369
  return task.cache;
@@ -371,7 +373,6 @@ function isCacheableTask(task, options) {
371
373
  cacheable.indexOf(task.target.target) > -1 &&
372
374
  !longRunningTask(task));
373
375
  }
374
- exports.isCacheableTask = isCacheableTask;
375
376
  function longRunningTask(task) {
376
377
  const t = task.target.target;
377
378
  return ((!!task.overrides['watch'] && task.overrides['watch'] !== 'false') ||
@@ -385,4 +386,3 @@ function longRunningTask(task) {
385
386
  function unparse(options) {
386
387
  return (0, serialize_overrides_into_command_line_1.serializeOverridesIntoCommandLine)(options);
387
388
  }
388
- exports.unparse = unparse;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.recordStat = exports.messages = exports.PromptMessages = void 0;
3
+ exports.messages = exports.PromptMessages = void 0;
4
+ exports.recordStat = recordStat;
4
5
  const node_child_process_1 = require("node:child_process");
5
6
  const is_ci_1 = require("./is-ci");
6
7
  const package_manager_1 = require("./package-manager");
@@ -87,7 +88,6 @@ async function recordStat(opts) {
87
88
  }
88
89
  }
89
90
  }
90
- exports.recordStat = recordStat;
91
91
  function shouldRecordStats() {
92
92
  const pmc = (0, package_manager_1.getPackageManagerCommand)();
93
93
  if (!pmc.getRegistryUrl) {
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.allFileData = void 0;
3
+ exports.allFileData = allFileData;
4
4
  const workspace_context_1 = require("./workspace-context");
5
5
  const workspace_root_1 = require("./workspace-root");
6
6
  function allFileData() {
7
7
  return (0, workspace_context_1.getAllFileDataInContext)(workspace_root_1.workspaceRoot);
8
8
  }
9
- exports.allFileData = allFileData;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertWorkspaceValidity = void 0;
3
+ exports.assertWorkspaceValidity = assertWorkspaceValidity;
4
4
  const find_matching_projects_1 = require("./find-matching-projects");
5
5
  const output_1 = require("./output");
6
6
  const devkit_internals_1 = require("../devkit-internals");
@@ -70,7 +70,6 @@ function assertWorkspaceValidity(projects, nxJson) {
70
70
  }
71
71
  throw new devkit_internals_1.WorkspaceValidityError(message);
72
72
  }
73
- exports.assertWorkspaceValidity = assertWorkspaceValidity;
74
73
  function detectAndSetInvalidProjectGlobValues(map, sourceName, desiredImplicitDeps, projectConfigurations, projects) {
75
74
  const invalidProjectsOrGlobs = desiredImplicitDeps.filter((implicit) => {
76
75
  const projectName = implicit.startsWith('!')
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLastValueFromAsyncIterableIterator = exports.isAsyncIterator = void 0;
3
+ exports.isAsyncIterator = isAsyncIterator;
4
+ exports.getLastValueFromAsyncIterableIterator = getLastValueFromAsyncIterableIterator;
4
5
  function isAsyncIterator(v) {
5
6
  return typeof v?.[Symbol.asyncIterator] === 'function';
6
7
  }
7
- exports.isAsyncIterator = isAsyncIterator;
8
8
  async function getLastValueFromAsyncIterableIterator(i) {
9
9
  let prev;
10
10
  let current;
@@ -16,4 +16,3 @@ async function getLastValueFromAsyncIterableIterator(i) {
16
16
  } while (!current.done);
17
17
  return current.value !== undefined || !prev ? current.value : prev.value;
18
18
  }
19
- exports.getLastValueFromAsyncIterableIterator = getLastValueFromAsyncIterableIterator;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.workspaceDataDirectory = exports.cacheDirectoryForWorkspace = exports.cacheDir = void 0;
3
+ exports.workspaceDataDirectory = exports.cacheDir = void 0;
4
+ exports.cacheDirectoryForWorkspace = cacheDirectoryForWorkspace;
4
5
  const fs_1 = require("fs");
5
6
  const path_1 = require("path");
6
7
  const fileutils_1 = require("./fileutils");
@@ -61,7 +62,6 @@ exports.cacheDir = cacheDirectory(workspace_root_1.workspaceRoot, readCacheDirec
61
62
  function cacheDirectoryForWorkspace(workspaceRoot) {
62
63
  return cacheDirectory(workspaceRoot, readCacheDirectoryProperty(workspaceRoot));
63
64
  }
64
- exports.cacheDirectoryForWorkspace = cacheDirectoryForWorkspace;
65
65
  exports.workspaceDataDirectory = absolutePath(workspace_root_1.workspaceRoot, process.env.NX_WORKSPACE_DATA_DIRECTORY ??
66
66
  process.env.NX_PROJECT_GRAPH_CACHE_DIRECTORY ??
67
67
  defaultWorkspaceDataDirectory(workspace_root_1.workspaceRoot));