nx 20.8.4 → 22.7.7
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.
- package/LICENSE +1 -1
- package/README.md +5 -5
- package/dist/bin/init-local.d.ts +8 -0
- package/dist/bin/init-local.js +197 -0
- package/dist/bin/nx.d.ts +3 -0
- package/dist/bin/nx.js +306 -0
- package/dist/bin/post-install.js +52 -0
- package/dist/plugins/package-json.d.ts +4 -0
- package/dist/plugins/package-json.js +38 -0
- package/dist/release/changelog-renderer/index.d.ts +109 -0
- package/dist/release/changelog-renderer/index.js +367 -0
- package/dist/src/adapter/angular-json.js +130 -0
- package/dist/src/adapter/compat.d.ts +2 -0
- package/dist/src/adapter/compat.js +153 -0
- package/dist/src/adapter/ngcli-adapter.d.ts +104 -0
- package/dist/src/adapter/ngcli-adapter.js +1001 -0
- package/dist/src/ai/clone-ai-config-repo.d.ts +11 -0
- package/dist/src/ai/clone-ai-config-repo.js +155 -0
- package/dist/src/ai/constants.d.ts +26 -0
- package/dist/src/ai/constants.js +71 -0
- package/dist/src/ai/detect-ai-agent.d.ts +2 -0
- package/dist/src/ai/detect-ai-agent.js +12 -0
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.d.ts +5 -0
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.js +26 -0
- package/dist/src/ai/set-up-ai-agents/schema.d.ts +11 -0
- package/dist/src/ai/set-up-ai-agents/schema.json +34 -0
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts +10 -0
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +516 -0
- package/dist/src/ai/utils.d.ts +20 -0
- package/dist/src/ai/utils.js +217 -0
- package/dist/src/analytics/analytics.d.ts +10 -0
- package/dist/src/analytics/analytics.js +236 -0
- package/dist/src/analytics/index.d.ts +1 -0
- package/dist/src/analytics/index.js +11 -0
- package/dist/src/command-line/add/add.js +126 -0
- package/dist/src/command-line/add/command-object.js +28 -0
- package/dist/src/command-line/affected/affected.js +89 -0
- package/dist/src/command-line/affected/command-object.js +83 -0
- package/dist/src/command-line/ai/ai-output.d.ts +46 -0
- package/dist/src/command-line/ai/ai-output.js +86 -0
- package/dist/src/command-line/configure-ai-agents/command-object.d.ts +8 -0
- package/dist/src/command-line/configure-ai-agents/command-object.js +47 -0
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.d.ts +3 -0
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +425 -0
- package/dist/src/command-line/daemon/command-object.d.ts +3 -0
- package/dist/src/command-line/daemon/command-object.js +29 -0
- package/dist/src/command-line/daemon/daemon.js +31 -0
- package/dist/src/command-line/examples.d.ts +12 -0
- package/dist/src/command-line/examples.js +403 -0
- package/dist/src/command-line/exec/command-object.js +20 -0
- package/dist/src/command-line/exec/exec.js +143 -0
- package/dist/src/command-line/format/command-object.js +58 -0
- package/dist/src/command-line/format/format.js +233 -0
- package/dist/src/command-line/generate/command-object.js +67 -0
- package/dist/src/command-line/generate/generate.js +281 -0
- package/dist/src/command-line/graph/command-object.js +76 -0
- package/dist/src/command-line/graph/graph.d.ts +69 -0
- package/dist/src/command-line/graph/graph.js +978 -0
- package/dist/src/command-line/import/command-object.js +63 -0
- package/dist/src/command-line/import/import.d.ts +26 -0
- package/dist/src/command-line/import/import.js +600 -0
- package/dist/src/command-line/import/utils/ai-output.d.ts +93 -0
- package/dist/src/command-line/import/utils/ai-output.js +209 -0
- package/dist/src/command-line/import/utils/merge-remote-source.js +14 -0
- package/dist/src/command-line/import/utils/prepare-source-repo.js +27 -0
- package/dist/src/command-line/index.d.ts +22 -0
- package/dist/src/command-line/index.js +26 -0
- package/dist/src/command-line/init/ai-agent-prompts.d.ts +2 -0
- package/dist/src/command-line/init/ai-agent-prompts.js +35 -0
- package/dist/src/command-line/init/command-object.js +108 -0
- package/dist/src/command-line/init/configure-plugins.js +210 -0
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +6 -0
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +140 -0
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +356 -0
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +6 -0
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +82 -0
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +50 -0
- package/dist/src/command-line/init/implementation/angular/index.js +133 -0
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +12 -0
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +149 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +204 -0
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.js +134 -0
- package/dist/src/command-line/init/implementation/deduce-default-base.js +53 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +10 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +137 -0
- package/dist/src/command-line/init/implementation/dot-nx/nxw.js +123 -0
- package/dist/src/command-line/init/implementation/utils.d.ts +27 -0
- package/dist/src/command-line/init/implementation/utils.js +343 -0
- package/dist/src/command-line/init/init-v1.d.ts +8 -0
- package/dist/src/command-line/init/init-v1.js +104 -0
- package/dist/src/command-line/init/init-v2.d.ts +23 -0
- package/dist/src/command-line/init/init-v2.js +609 -0
- package/dist/src/command-line/init/utils/ai-output.d.ts +72 -0
- package/dist/src/command-line/init/utils/ai-output.js +180 -0
- package/dist/src/command-line/list/command-object.js +21 -0
- package/dist/src/command-line/list/list.d.ts +15 -0
- package/dist/src/command-line/list/list.js +48 -0
- package/dist/src/command-line/mcp/command-object.d.ts +2 -0
- package/dist/src/command-line/mcp/command-object.js +29 -0
- package/dist/src/command-line/mcp/mcp.d.ts +2 -0
- package/dist/src/command-line/mcp/mcp.js +60 -0
- package/dist/src/command-line/migrate/command-object.js +79 -0
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +76 -0
- package/dist/src/command-line/migrate/migrate-ui-api.js +354 -0
- package/dist/src/command-line/migrate/migrate.d.ts +151 -0
- package/dist/src/command-line/migrate/migrate.js +1608 -0
- package/dist/src/command-line/migrate/run-migration-process.js +87 -0
- package/dist/src/command-line/new/command-object.js +26 -0
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.js +13 -0
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/complete-run/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/complete-run/command-object.js +17 -0
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.js +13 -0
- package/dist/src/command-line/nx-cloud/connect/command-object.js +28 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +13 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +253 -0
- package/dist/src/command-line/nx-cloud/connect/view-logs.js +53 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.js +13 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.js +32 -0
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.js +13 -0
- package/dist/src/command-line/nx-cloud/login/command-object.js +20 -0
- package/dist/src/command-line/nx-cloud/login/login.js +10 -0
- package/dist/src/command-line/nx-cloud/logout/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/logout/logout.js +7 -0
- package/dist/src/command-line/nx-cloud/record/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/record/command-object.js +19 -0
- package/dist/src/command-line/nx-cloud/record/record.d.ts +5 -0
- package/dist/src/command-line/nx-cloud/record/record.js +33 -0
- package/dist/src/command-line/nx-cloud/start-agent/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-agent/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.js +13 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.js +13 -0
- package/dist/src/command-line/nx-cloud/utils.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/utils.js +34 -0
- package/dist/src/command-line/nx-commands.d.ts +10 -0
- package/dist/src/command-line/nx-commands.js +170 -0
- package/dist/src/command-line/register/command-object.js +27 -0
- package/dist/src/command-line/release/changelog/commit-utils.d.ts +13 -0
- package/dist/src/command-line/release/changelog/commit-utils.js +63 -0
- package/dist/src/command-line/release/changelog/version-plan-filtering.d.ts +41 -0
- package/dist/src/command-line/release/changelog/version-plan-filtering.js +152 -0
- package/dist/src/command-line/release/changelog/version-plan-utils.d.ts +31 -0
- package/dist/src/command-line/release/changelog/version-plan-utils.js +92 -0
- package/dist/src/command-line/release/changelog.d.ts +21 -0
- package/dist/src/command-line/release/changelog.js +893 -0
- package/dist/src/command-line/release/command-object.d.ts +84 -0
- package/dist/src/command-line/release/command-object.js +342 -0
- package/dist/src/command-line/release/config/config.d.ts +73 -0
- package/dist/src/command-line/release/config/config.js +1172 -0
- package/dist/src/command-line/release/config/conventional-commits.js +106 -0
- package/dist/src/command-line/release/config/filter-release-groups.d.ts +23 -0
- package/dist/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
- package/dist/src/command-line/release/config/use-legacy-versioning.js +8 -0
- package/dist/src/command-line/release/config/version-plans.js +278 -0
- package/dist/src/command-line/release/index.d.ts +49 -0
- package/dist/src/command-line/release/index.js +49 -0
- package/dist/src/command-line/release/plan-check.js +170 -0
- package/dist/src/command-line/release/plan.js +261 -0
- package/dist/src/command-line/release/publish.d.ts +9 -0
- package/dist/src/command-line/release/publish.js +290 -0
- package/dist/src/command-line/release/release.d.ts +5 -0
- package/dist/src/command-line/release/release.js +300 -0
- package/dist/src/command-line/release/utils/diff.d.ts +21 -0
- package/dist/src/command-line/release/utils/diff.js +168 -0
- package/dist/src/command-line/release/utils/exec-command.js +34 -0
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.js +78 -0
- package/dist/src/command-line/release/utils/git.d.ts +120 -0
- package/dist/src/command-line/release/utils/git.js +560 -0
- package/dist/src/command-line/release/utils/launch-editor.js +46 -0
- package/dist/src/command-line/release/utils/print-changes.js +63 -0
- package/dist/src/command-line/release/utils/release-graph.d.ts +230 -0
- package/dist/src/command-line/release/utils/release-graph.js +710 -0
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +9 -0
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.js +61 -0
- package/dist/src/command-line/release/utils/remote-release-clients/github.d.ts +58 -0
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +342 -0
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +62 -0
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +268 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +111 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +138 -0
- package/dist/src/command-line/release/utils/repository-git-tags.d.ts +25 -0
- package/dist/src/command-line/release/utils/repository-git-tags.js +125 -0
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.d.ts +2 -0
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +34 -0
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.js +53 -0
- package/dist/src/command-line/release/utils/resolve-semver-specifier.d.ts +7 -0
- package/dist/src/command-line/release/utils/resolve-semver-specifier.js +58 -0
- package/dist/src/command-line/release/utils/semver.d.ts +26 -0
- package/dist/src/command-line/release/utils/semver.js +111 -0
- package/dist/src/command-line/release/utils/shared.d.ts +64 -0
- package/dist/src/command-line/release/utils/shared.js +363 -0
- package/dist/src/command-line/release/utils/version-plan-utils.d.ts +40 -0
- package/dist/src/command-line/release/utils/version-plan-utils.js +111 -0
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +8 -0
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.js +56 -0
- package/dist/src/command-line/release/version/project-logger.js +47 -0
- package/dist/src/command-line/release/version/release-group-processor.d.ts +115 -0
- package/dist/src/command-line/release/version/release-group-processor.js +632 -0
- package/dist/src/command-line/release/version/resolve-current-version.d.ts +32 -0
- package/dist/src/command-line/release/version/resolve-current-version.js +240 -0
- package/dist/src/command-line/release/version/topological-sort.js +41 -0
- package/dist/src/command-line/release/version/version-actions.d.ts +199 -0
- package/dist/src/command-line/release/version/version-actions.js +251 -0
- package/dist/src/command-line/release/version.d.ts +25 -0
- package/dist/src/command-line/release/version.js +368 -0
- package/dist/src/command-line/repair/command-object.js +21 -0
- package/dist/src/command-line/repair/repair.js +41 -0
- package/dist/src/command-line/report/command-object.js +12 -0
- package/dist/src/command-line/report/report.d.ts +71 -0
- package/dist/src/command-line/report/report.js +404 -0
- package/dist/src/command-line/reset/command-object.js +27 -0
- package/dist/src/command-line/reset/reset.js +178 -0
- package/dist/src/command-line/run/command-object.js +43 -0
- package/dist/src/command-line/run/executor-utils.d.ts +12 -0
- package/dist/src/command-line/run/executor-utils.js +96 -0
- package/dist/src/command-line/run/run-one.d.ts +17 -0
- package/dist/src/command-line/run/run-one.js +154 -0
- package/dist/src/command-line/run/run.js +179 -0
- package/dist/src/command-line/run-many/command-object.js +18 -0
- package/dist/src/command-line/run-many/run-many.js +89 -0
- package/dist/src/command-line/show/command-object.d.ts +40 -0
- package/dist/src/command-line/show/command-object.js +237 -0
- package/dist/src/command-line/show/project.js +103 -0
- package/dist/src/command-line/show/projects.js +80 -0
- package/dist/src/command-line/show/show-target/index.d.ts +3 -0
- package/dist/src/command-line/show/show-target/index.js +9 -0
- package/dist/src/command-line/show/show-target/info.d.ts +27 -0
- package/dist/src/command-line/show/show-target/info.js +299 -0
- package/dist/src/command-line/show/show-target/inputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/inputs.js +186 -0
- package/dist/src/command-line/show/show-target/outputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/outputs.js +195 -0
- package/dist/src/command-line/show/show-target/utils.d.ts +26 -0
- package/dist/src/command-line/show/show-target/utils.js +185 -0
- package/dist/src/command-line/sync/command-object.js +21 -0
- package/dist/src/command-line/sync/sync.js +120 -0
- package/dist/src/command-line/watch/command-object.js +71 -0
- package/dist/src/command-line/watch/watch.d.ts +24 -0
- package/dist/src/command-line/watch/watch.js +198 -0
- package/dist/src/command-line/yargs-utils/arguments-of.d.ts +11 -0
- package/dist/src/command-line/yargs-utils/arguments-of.js +9 -0
- package/dist/src/command-line/yargs-utils/documentation.js +12 -0
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +91 -0
- package/dist/src/command-line/yargs-utils/shared-options.js +395 -0
- package/dist/src/commands-runner/get-command-projects.js +33 -0
- package/dist/src/config/misc-interfaces.d.ts +229 -0
- package/dist/src/config/nx-json.d.ts +862 -0
- package/dist/src/config/nx-json.js +40 -0
- package/dist/src/config/schema-utils.js +126 -0
- package/dist/src/config/task-graph.d.ts +109 -0
- package/dist/src/config/workspace-json-project-json.d.ts +263 -0
- package/dist/src/core/graph/index.html +32 -0
- package/dist/src/core/graph/main.js +1 -0
- package/dist/src/core/graph/runtime.js +1 -0
- package/dist/src/core/graph/styles.css +3 -0
- package/dist/src/core/graph/styles.js +1 -0
- package/dist/src/daemon/cache.d.ts +10 -0
- package/dist/src/daemon/cache.js +58 -0
- package/dist/src/daemon/client/client.d.ts +117 -0
- package/dist/src/daemon/client/client.js +1040 -0
- package/dist/src/daemon/client/daemon-environment.d.ts +4 -0
- package/dist/src/daemon/client/daemon-environment.js +121 -0
- package/dist/src/daemon/client/daemon-socket-messenger.d.ts +12 -0
- package/dist/src/daemon/client/daemon-socket-messenger.js +54 -0
- package/dist/src/daemon/is-nx-version-mismatch.d.ts +1 -0
- package/dist/src/daemon/is-nx-version-mismatch.js +8 -0
- package/dist/src/daemon/is-v8-serializer-enabled.d.ts +5 -0
- package/dist/src/daemon/is-v8-serializer-enabled.js +10 -0
- package/dist/src/daemon/logger.d.ts +39 -0
- package/dist/src/daemon/logger.js +80 -0
- package/dist/src/daemon/message-types/configure-ai-agents.d.ts +20 -0
- package/dist/src/daemon/message-types/configure-ai-agents.js +19 -0
- package/dist/src/daemon/message-types/daemon-message.d.ts +6 -0
- package/dist/src/daemon/message-types/daemon-message.js +6 -0
- package/dist/src/daemon/message-types/nx-console.d.ts +17 -0
- package/dist/src/daemon/message-types/nx-console.js +19 -0
- package/dist/src/daemon/message-types/register-project-graph-listener.d.ts +5 -0
- package/dist/src/daemon/message-types/register-project-graph-listener.js +11 -0
- package/dist/src/daemon/message-types/streaming-messages.d.ts +14 -0
- package/dist/src/daemon/message-types/streaming-messages.js +19 -0
- package/dist/src/daemon/server/client-socket-context.d.ts +23 -0
- package/dist/src/daemon/server/client-socket-context.js +89 -0
- package/dist/src/daemon/server/file-watching/file-change-events.d.ts +7 -0
- package/dist/src/daemon/server/file-watching/file-change-events.js +19 -0
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +66 -0
- package/dist/src/daemon/server/handle-configure-ai-agents.d.ts +3 -0
- package/dist/src/daemon/server/handle-configure-ai-agents.js +101 -0
- package/dist/src/daemon/server/handle-context-file-data.js +12 -0
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +11 -0
- package/dist/src/daemon/server/handle-get-files-in-directory.js +12 -0
- package/dist/src/daemon/server/handle-get-registered-sync-generators.js +11 -0
- package/dist/src/daemon/server/handle-get-sync-generator-changes.js +20 -0
- package/dist/src/daemon/server/handle-glob.js +20 -0
- package/dist/src/daemon/server/handle-hash-tasks.d.ts +12 -0
- package/dist/src/daemon/server/handle-hash-tasks.js +28 -0
- package/dist/src/daemon/server/handle-nx-console.d.ts +3 -0
- package/dist/src/daemon/server/handle-nx-console.js +54 -0
- package/dist/src/daemon/server/handle-nx-workspace-files.js +12 -0
- package/dist/src/daemon/server/handle-outputs-tracking.d.ts +15 -0
- package/dist/src/daemon/server/handle-outputs-tracking.js +35 -0
- package/dist/src/daemon/server/handle-process-in-background.js +32 -0
- package/dist/src/daemon/server/handle-request-project-graph.d.ts +3 -0
- package/dist/src/daemon/server/handle-request-project-graph.js +36 -0
- package/dist/src/daemon/server/handle-task-history.d.ts +13 -0
- package/dist/src/daemon/server/handle-task-history.js +30 -0
- package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +19 -0
- package/dist/src/daemon/server/handle-tasks-execution-hooks.js +35 -0
- package/dist/src/daemon/server/latest-nx.d.ts +10 -0
- package/dist/src/daemon/server/latest-nx.js +51 -0
- package/dist/src/daemon/server/nx-console-operations.d.ts +26 -0
- package/dist/src/daemon/server/nx-console-operations.js +97 -0
- package/dist/src/daemon/server/outputs-tracking.d.ts +23 -0
- package/dist/src/daemon/server/outputs-tracking.js +120 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +29 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +411 -0
- package/dist/src/daemon/server/project-graph-listener-sockets.d.ts +7 -0
- package/dist/src/daemon/server/project-graph-listener-sockets.js +25 -0
- package/dist/src/daemon/server/server.d.ts +10 -0
- package/dist/src/daemon/server/server.js +519 -0
- package/dist/src/daemon/server/shutdown-utils.d.ts +18 -0
- package/dist/src/daemon/server/shutdown-utils.js +152 -0
- package/dist/src/daemon/server/start.d.ts +1 -0
- package/dist/src/daemon/server/start.js +20 -0
- package/dist/src/daemon/server/sync-generators.d.ts +14 -0
- package/dist/src/daemon/server/sync-generators.js +368 -0
- package/dist/src/daemon/server/watcher.d.ts +11 -0
- package/dist/src/daemon/server/watcher.js +98 -0
- package/dist/src/daemon/socket-utils.d.ts +23 -0
- package/dist/src/daemon/socket-utils.js +96 -0
- package/dist/src/daemon/tmp-dir.d.ts +12 -0
- package/dist/src/daemon/tmp-dir.js +71 -0
- package/dist/src/devkit-exports.d.ts +139 -0
- package/dist/src/devkit-internals.d.ts +35 -0
- package/dist/src/devkit-internals.js +75 -0
- package/dist/src/executors/noop/schema.json +10 -0
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +59 -0
- package/dist/src/executors/run-commands/run-commands.impl.js +301 -0
- package/dist/src/executors/run-commands/running-tasks.d.ts +45 -0
- package/dist/src/executors/run-commands/running-tasks.js +513 -0
- package/dist/src/executors/run-commands/schema.json +198 -0
- package/dist/src/executors/run-script/run-script.impl.js +93 -0
- package/dist/src/executors/run-script/schema.json +28 -0
- package/dist/src/executors/utils/convert-nx-executor.js +83 -0
- package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +19 -0
- package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +81 -0
- package/dist/src/generators/tree.js +310 -0
- package/dist/src/generators/utils/generate-files.d.ts +44 -0
- package/dist/src/generators/utils/generate-files.js +114 -0
- package/dist/src/generators/utils/nx-json.d.ts +10 -0
- package/dist/src/generators/utils/nx-json.js +52 -0
- package/dist/src/generators/utils/project-configuration.js +307 -0
- package/dist/src/hasher/hash-plan-inspector.d.ts +33 -0
- package/dist/src/hasher/hash-plan-inspector.js +70 -0
- package/dist/src/hasher/hash-task.d.ts +17 -0
- package/dist/src/hasher/hash-task.js +191 -0
- package/dist/src/hasher/native-task-hasher-impl.d.ts +18 -0
- package/dist/src/hasher/native-task-hasher-impl.js +38 -0
- package/dist/src/hasher/task-hasher.d.ts +160 -0
- package/dist/src/hasher/task-hasher.js +299 -0
- package/dist/src/migrations/update-15-0-0/prefix-outputs.d.ts +2 -0
- package/dist/src/migrations/update-15-0-0/prefix-outputs.js +49 -0
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +16 -0
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +97 -0
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +29 -0
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +2 -0
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +45 -0
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +12 -0
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +67 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.js +35 -0
- package/dist/src/migrations/update-17-2-0/move-default-base.js +20 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +38 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +101 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +38 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +17 -0
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +2 -0
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +100 -0
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +101 -0
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +2 -0
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.js +7 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.d.ts +2 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +19 -0
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.js +23 -0
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +16 -0
- package/dist/src/native/index.d.ts +672 -0
- package/dist/src/native/index.js +173 -0
- package/dist/src/native/native-bindings.js +635 -0
- package/dist/src/native/native-file-cache-location.js +23 -0
- package/dist/src/native/nx.wasi-browser.js +131 -0
- package/dist/src/native/nx.wasi.cjs +161 -0
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/native/wasi-worker-browser.mjs +30 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +14 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +159 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +41 -0
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.js +41 -0
- package/dist/src/nx-cloud/update-manager.d.ts +23 -0
- package/dist/src/nx-cloud/update-manager.js +267 -0
- package/dist/src/nx-cloud/utilities/axios.d.ts +4 -0
- package/dist/src/nx-cloud/utilities/axios.js +17 -0
- package/dist/src/nx-cloud/utilities/client.d.ts +10 -0
- package/dist/src/nx-cloud/utilities/client.js +42 -0
- package/dist/src/nx-cloud/utilities/environment.js +48 -0
- package/dist/src/nx-cloud/utilities/onboarding.js +28 -0
- package/dist/src/nx-cloud/utilities/url-shorten.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/url-shorten.js +84 -0
- package/dist/src/plugins/js/index.d.ts +4 -0
- package/dist/src/plugins/js/index.js +201 -0
- package/dist/src/plugins/js/lock-file/bun-parser.d.ts +14 -0
- package/dist/src/plugins/js/lock-file/bun-parser.js +936 -0
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +38 -0
- package/dist/src/plugins/js/lock-file/lock-file.js +255 -0
- package/dist/src/plugins/js/lock-file/npm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/npm-parser.js +544 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +660 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +11 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +210 -0
- package/dist/src/plugins/js/lock-file/utils/package-json.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/utils/package-json.js +38 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +873 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.js +509 -0
- package/dist/src/plugins/js/package-json/create-package-json.js +291 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +5 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +72 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.js +93 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +45 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +86 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +75 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +74 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +429 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.js +121 -0
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts +2 -0
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.js +13 -0
- package/dist/src/plugins/js/utils/register.d.ts +159 -0
- package/dist/src/plugins/js/utils/register.js +485 -0
- package/dist/src/plugins/js/utils/typescript.d.ts +23 -0
- package/dist/src/plugins/js/utils/typescript.js +142 -0
- package/dist/src/plugins/js/versions.d.ts +1 -0
- package/dist/src/plugins/js/versions.js +4 -0
- package/dist/src/plugins/package-json/create-nodes.d.ts +27 -0
- package/dist/src/plugins/package-json/create-nodes.js +239 -0
- package/dist/src/plugins/project-json/build-nodes/project-json.d.ts +5 -0
- package/dist/src/plugins/project-json/build-nodes/project-json.js +33 -0
- package/dist/src/project-graph/affected/affected-project-graph.js +90 -0
- package/dist/src/project-graph/build-project-graph.d.ts +23 -0
- package/dist/src/project-graph/build-project-graph.js +304 -0
- package/dist/src/project-graph/error-types.d.ts +140 -0
- package/dist/src/project-graph/error-types.js +419 -0
- package/dist/src/project-graph/file-utils.d.ts +24 -0
- package/dist/src/project-graph/file-utils.js +114 -0
- package/dist/src/project-graph/nx-deps-cache.d.ts +62 -0
- package/dist/src/project-graph/nx-deps-cache.js +345 -0
- package/dist/src/project-graph/plugins/get-plugins.d.ts +5 -0
- package/dist/src/project-graph/plugins/get-plugins.js +224 -0
- package/dist/src/project-graph/plugins/in-process-loader.d.ts +10 -0
- package/dist/src/project-graph/plugins/in-process-loader.js +61 -0
- package/dist/src/project-graph/plugins/isolation/enabled.js +22 -0
- package/dist/src/project-graph/plugins/isolation/index.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/index.js +5 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +62 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +474 -0
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +3 -0
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.js +24 -0
- package/dist/src/project-graph/plugins/isolation/message-types.d.ts +59 -0
- package/dist/src/project-graph/plugins/isolation/message-types.js +9 -0
- package/dist/src/project-graph/plugins/isolation/messaging.d.ts +142 -0
- package/dist/src/project-graph/plugins/isolation/messaging.js +86 -0
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +82 -0
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.js +188 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.d.ts +2 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +151 -0
- package/dist/src/project-graph/plugins/isolation/worker-streaming.d.ts +14 -0
- package/dist/src/project-graph/plugins/isolation/worker-streaming.js +39 -0
- package/dist/src/project-graph/plugins/load-resolved-plugin.d.ts +3 -0
- package/dist/src/project-graph/plugins/load-resolved-plugin.js +24 -0
- package/dist/src/project-graph/plugins/loaded-nx-plugin.d.ts +41 -0
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +101 -0
- package/dist/src/project-graph/plugins/public-api.d.ts +120 -0
- package/dist/src/project-graph/plugins/resolve-plugin.d.ts +18 -0
- package/dist/src/project-graph/plugins/resolve-plugin.js +256 -0
- package/dist/src/project-graph/plugins/transpiler.js +47 -0
- package/dist/src/project-graph/plugins/utils.d.ts +4 -0
- package/dist/src/project-graph/plugins/utils.js +32 -0
- package/dist/src/project-graph/project-graph.d.ts +54 -0
- package/dist/src/project-graph/project-graph.js +411 -0
- package/dist/src/project-graph/utils/normalize-project-nodes.d.ts +6 -0
- package/dist/src/project-graph/utils/normalize-project-nodes.js +117 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +74 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +469 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +39 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +264 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +69 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.js +94 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.d.ts +31 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +332 -0
- package/dist/src/project-graph/utils/project-configuration/target-normalization.d.ts +12 -0
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +177 -0
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +51 -0
- package/dist/src/project-graph/utils/project-configuration-utils.js +238 -0
- package/dist/src/project-graph/utils/retrieve-workspace-files.d.ts +26 -0
- package/dist/src/tasks-runner/batch/run-batch.js +75 -0
- package/dist/src/tasks-runner/cache.d.ts +94 -0
- package/dist/src/tasks-runner/cache.js +604 -0
- package/dist/src/tasks-runner/create-task-graph.d.ts +42 -0
- package/dist/src/tasks-runner/create-task-graph.js +313 -0
- package/dist/src/tasks-runner/default-tasks-runner.js +71 -0
- package/dist/src/tasks-runner/fork.js +73 -0
- package/dist/src/tasks-runner/forked-process-task-runner.d.ts +42 -0
- package/dist/src/tasks-runner/forked-process-task-runner.js +294 -0
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +22 -0
- package/dist/src/tasks-runner/init-tasks-runner.js +149 -0
- package/dist/src/tasks-runner/is-tui-enabled.d.ts +18 -0
- package/dist/src/tasks-runner/is-tui-enabled.js +91 -0
- package/dist/src/tasks-runner/life-cycle.d.ts +75 -0
- package/dist/src/tasks-runner/life-cycle.js +141 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +366 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +238 -0
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +109 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +11 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +91 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +16 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.js +112 -0
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts +9 -0
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.js +42 -0
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +19 -0
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +339 -0
- package/dist/src/tasks-runner/process-metrics-service.d.ts +53 -0
- package/dist/src/tasks-runner/process-metrics-service.js +161 -0
- package/dist/src/tasks-runner/pseudo-ipc.js +156 -0
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +57 -0
- package/dist/src/tasks-runner/pseudo-terminal.js +171 -0
- package/dist/src/tasks-runner/run-command.d.ts +42 -0
- package/dist/src/tasks-runner/run-command.js +876 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +19 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.js +112 -0
- package/dist/src/tasks-runner/running-tasks/node-child-process.d.ts +40 -0
- package/dist/src/tasks-runner/running-tasks/node-child-process.js +177 -0
- package/dist/src/tasks-runner/running-tasks/noop-child-process.d.ts +16 -0
- package/dist/src/tasks-runner/running-tasks/noop-child-process.js +22 -0
- package/dist/src/tasks-runner/running-tasks/output-prefix.d.ts +13 -0
- package/dist/src/tasks-runner/running-tasks/output-prefix.js +63 -0
- package/dist/src/tasks-runner/running-tasks/running-task.d.ts +11 -0
- package/dist/src/tasks-runner/running-tasks/running-task.js +6 -0
- package/dist/src/tasks-runner/running-tasks/shared-running-task.d.ts +14 -0
- package/dist/src/tasks-runner/running-tasks/shared-running-task.js +30 -0
- package/dist/src/tasks-runner/task-env-paths.d.ts +1 -0
- package/dist/src/tasks-runner/task-env-paths.js +45 -0
- package/dist/src/tasks-runner/task-env.d.ts +22 -0
- package/dist/src/tasks-runner/task-env.js +166 -0
- package/dist/src/tasks-runner/task-graph-utils.d.ts +30 -0
- package/dist/src/tasks-runner/task-graph-utils.js +225 -0
- package/dist/src/tasks-runner/task-io-service.d.ts +96 -0
- package/dist/src/tasks-runner/task-io-service.js +122 -0
- package/dist/src/tasks-runner/task-orchestrator.d.ts +179 -0
- package/dist/src/tasks-runner/task-orchestrator.js +1277 -0
- package/dist/src/tasks-runner/tasks-runner.d.ts +24 -0
- package/dist/src/tasks-runner/tasks-schedule.d.ts +48 -0
- package/dist/src/tasks-runner/tasks-schedule.js +258 -0
- package/dist/src/tasks-runner/utils.d.ts +61 -0
- package/dist/src/tasks-runner/utils.js +450 -0
- package/dist/src/utils/ab-testing.d.ts +50 -0
- package/dist/src/utils/ab-testing.js +128 -0
- package/dist/src/utils/analytics-prompt.d.ts +12 -0
- package/dist/src/utils/analytics-prompt.js +137 -0
- package/dist/src/utils/assert-workspace-validity.js +85 -0
- package/dist/src/utils/binary-extensions.d.ts +1 -0
- package/dist/src/utils/binary-extensions.js +279 -0
- package/dist/src/utils/cache-directory.d.ts +9 -0
- package/dist/src/utils/cache-directory.js +86 -0
- package/dist/src/utils/call-sites.d.ts +14 -0
- package/dist/src/utils/call-sites.js +28 -0
- package/dist/src/utils/catalog/index.d.ts +9 -0
- package/dist/src/utils/catalog/index.js +38 -0
- package/dist/src/utils/catalog/manager-factory.d.ts +5 -0
- package/dist/src/utils/catalog/manager-factory.js +20 -0
- package/dist/src/utils/catalog/manager.d.ts +40 -0
- package/dist/src/utils/catalog/manager.js +13 -0
- package/dist/src/utils/catalog/pnpm-manager.d.ts +21 -0
- package/dist/src/utils/catalog/pnpm-manager.js +249 -0
- package/dist/src/utils/catalog/types.d.ts +11 -0
- package/dist/src/utils/catalog/types.js +2 -0
- package/dist/src/utils/catalog/yarn-manager.d.ts +21 -0
- package/dist/src/utils/catalog/yarn-manager.js +249 -0
- package/dist/src/utils/child-process.js +91 -0
- package/dist/src/utils/code-frames.js +116 -0
- package/dist/src/utils/collapse-expanded-outputs.d.ts +10 -0
- package/dist/src/utils/collapse-expanded-outputs.js +72 -0
- package/dist/src/utils/command-line-utils.d.ts +57 -0
- package/dist/src/utils/command-line-utils.js +249 -0
- package/dist/src/utils/compile-cache.d.ts +24 -0
- package/dist/src/utils/compile-cache.js +49 -0
- package/dist/src/utils/consume-messages-from-socket.d.ts +9 -0
- package/dist/src/utils/consume-messages-from-socket.js +56 -0
- package/dist/src/utils/db-connection.d.ts +14 -0
- package/dist/src/utils/db-connection.js +64 -0
- package/dist/src/utils/default-base.js +17 -0
- package/dist/src/utils/delayed-spinner.d.ts +51 -0
- package/dist/src/utils/delayed-spinner.js +88 -0
- package/dist/src/utils/dotenv.js +19 -0
- package/dist/src/utils/enable-compile-cache.js +7 -0
- package/dist/src/utils/exit-codes.d.ts +15 -0
- package/dist/src/utils/exit-codes.js +75 -0
- package/dist/src/utils/fileutils.js +152 -0
- package/dist/src/utils/find-matching-projects.js +222 -0
- package/dist/src/utils/git-utils.d.ts +42 -0
- package/dist/src/utils/git-utils.index-filter.js +23 -0
- package/dist/src/utils/git-utils.js +298 -0
- package/dist/src/utils/git-utils.tree-filter.js +47 -0
- package/dist/src/utils/handle-errors.js +83 -0
- package/dist/src/utils/handle-import.d.ts +12 -0
- package/dist/src/utils/handle-import.js +32 -0
- package/dist/src/utils/has-nx-js-plugin.d.ts +9 -0
- package/dist/src/utils/has-nx-js-plugin.js +24 -0
- package/dist/src/utils/ignore.d.ts +9 -0
- package/dist/src/utils/ignore.js +42 -0
- package/dist/src/utils/installation-directory.js +12 -0
- package/dist/src/utils/installed-nx-version.d.ts +8 -0
- package/dist/src/utils/installed-nx-version.js +67 -0
- package/dist/src/utils/is-ci.d.ts +1 -0
- package/dist/src/utils/is-ci.js +26 -0
- package/dist/src/utils/is-sandbox.d.ts +1 -0
- package/dist/src/utils/is-sandbox.js +9 -0
- package/dist/src/utils/logger.d.ts +23 -0
- package/dist/src/utils/logger.js +74 -0
- package/dist/src/utils/machine-id-cache.d.ts +5 -0
- package/dist/src/utils/machine-id-cache.js +93 -0
- package/dist/src/utils/nx-cloud-utils.d.ts +4 -0
- package/dist/src/utils/nx-cloud-utils.js +28 -0
- package/dist/src/utils/nx-console-prompt.d.ts +1 -0
- package/dist/src/utils/nx-console-prompt.js +64 -0
- package/dist/src/utils/nx-key.d.ts +6 -0
- package/dist/src/utils/nx-key.js +50 -0
- package/dist/src/utils/output.d.ts +79 -0
- package/dist/src/utils/output.js +264 -0
- package/dist/src/utils/package-json.d.ts +212 -0
- package/dist/src/utils/package-json.js +361 -0
- package/dist/src/utils/package-manager.d.ts +122 -0
- package/dist/src/utils/package-manager.js +577 -0
- package/dist/src/utils/params.d.ts +140 -0
- package/dist/src/utils/params.js +710 -0
- package/dist/src/utils/path.js +38 -0
- package/dist/src/utils/perf-hooks.d.ts +19 -0
- package/dist/src/utils/perf-logging.js +46 -0
- package/dist/src/utils/plugin-cache-utils.d.ts +73 -0
- package/dist/src/utils/plugin-cache-utils.js +202 -0
- package/dist/src/utils/plugin-progress-text.d.ts +1 -0
- package/dist/src/utils/plugin-progress-text.js +15 -0
- package/dist/src/utils/plugins/atomizer-utils.d.ts +11 -0
- package/dist/src/utils/plugins/atomizer-utils.js +23 -0
- package/dist/src/utils/plugins/index.d.ts +5 -0
- package/dist/src/utils/plugins/index.js +15 -0
- package/dist/src/utils/plugins/output.d.ts +34 -0
- package/dist/src/utils/plugins/output.js +201 -0
- package/dist/src/utils/plugins/plugin-capabilities.d.ts +15 -0
- package/dist/src/utils/plugins/plugin-capabilities.js +78 -0
- package/dist/src/utils/pnpm-workspace.d.ts +8 -0
- package/dist/src/utils/pnpm-workspace.js +2 -0
- package/dist/src/utils/print-help.js +259 -0
- package/dist/src/utils/progress-topics.d.ts +19 -0
- package/dist/src/utils/progress-topics.js +21 -0
- package/dist/src/utils/project-graph-utils.d.ts +18 -0
- package/dist/src/utils/project-graph-utils.js +78 -0
- package/dist/src/utils/provenance.d.ts +47 -0
- package/dist/src/utils/provenance.js +105 -0
- package/dist/src/utils/require-nx-key.js +23 -0
- package/dist/src/utils/serialize-overrides-into-command-line.js +41 -0
- package/dist/src/utils/shell-quoting.d.ts +10 -0
- package/dist/src/utils/shell-quoting.js +41 -0
- package/dist/src/utils/spinner.d.ts +12 -0
- package/dist/src/utils/spinner.js +61 -0
- package/dist/src/utils/split-target.d.ts +15 -0
- package/dist/src/utils/split-target.js +239 -0
- package/dist/src/utils/sync-generators.d.ts +66 -0
- package/dist/src/utils/sync-generators.js +355 -0
- package/dist/src/utils/task-history.js +51 -0
- package/dist/src/utils/update-nxw.js +22 -0
- package/dist/src/utils/versions.js +4 -0
- package/dist/src/utils/wait-for-socket-connection.d.ts +15 -0
- package/dist/src/utils/wait-for-socket-connection.js +53 -0
- package/dist/src/utils/workspace-context.d.ts +21 -0
- package/dist/src/utils/workspace-context.js +120 -0
- package/dist/src/utils/workspace-root.js +40 -0
- package/dist/src/utils/write-formatted-json-file.d.ts +6 -0
- package/dist/src/utils/write-formatted-json-file.js +23 -0
- package/dist/src/utils/yarn-syml/index.d.ts +23 -0
- package/dist/src/utils/yarn-syml/index.js +151 -0
- package/dist/src/utils/yarn-syml/syml-grammar.js +1911 -0
- package/executors.json +6 -6
- package/generators.json +8 -2
- package/migrations.json +108 -11
- package/package.json +410 -44
- package/schemas/nx-schema.json +718 -136
- package/schemas/project-schema.json +107 -12
- package/.eslintrc.json +0 -146
- package/bin/init-local.d.ts +0 -8
- package/bin/init-local.js +0 -144
- package/bin/nx.d.ts +0 -2
- package/bin/nx.js +0 -239
- package/bin/post-install.js +0 -66
- package/plugins/package-json.d.ts +0 -5
- package/plugins/package-json.js +0 -37
- package/release/changelog-renderer/index.d.ts +0 -102
- package/release/changelog-renderer/index.js +0 -339
- package/src/adapter/angular-json.js +0 -122
- package/src/adapter/compat.d.ts +0 -2
- package/src/adapter/compat.js +0 -145
- package/src/adapter/decorate-cli.d.ts +0 -1
- package/src/adapter/decorate-cli.js +0 -24
- package/src/adapter/ngcli-adapter.d.ts +0 -90
- package/src/adapter/ngcli-adapter.js +0 -854
- package/src/command-line/add/add.js +0 -123
- package/src/command-line/add/command-object.js +0 -27
- package/src/command-line/affected/affected.js +0 -88
- package/src/command-line/affected/command-object.js +0 -82
- package/src/command-line/connect/command-object.js +0 -32
- package/src/command-line/connect/connect-to-nx-cloud.d.ts +0 -12
- package/src/command-line/connect/connect-to-nx-cloud.js +0 -149
- package/src/command-line/connect/view-logs.js +0 -55
- package/src/command-line/daemon/command-object.d.ts +0 -2
- package/src/command-line/daemon/command-object.js +0 -21
- package/src/command-line/daemon/daemon.js +0 -26
- package/src/command-line/examples.d.ts +0 -5
- package/src/command-line/examples.js +0 -375
- package/src/command-line/exec/command-object.js +0 -19
- package/src/command-line/exec/exec.js +0 -142
- package/src/command-line/format/command-object.js +0 -55
- package/src/command-line/format/format.js +0 -199
- package/src/command-line/generate/command-object.js +0 -66
- package/src/command-line/generate/generate.js +0 -264
- package/src/command-line/graph/command-object.js +0 -75
- package/src/command-line/graph/graph.d.ts +0 -68
- package/src/command-line/graph/graph.js +0 -803
- package/src/command-line/import/command-object.js +0 -44
- package/src/command-line/import/import.d.ts +0 -25
- package/src/command-line/import/import.js +0 -367
- package/src/command-line/import/utils/merge-remote-source.js +0 -14
- package/src/command-line/import/utils/prepare-source-repo.js +0 -27
- package/src/command-line/init/command-object.js +0 -99
- package/src/command-line/init/configure-plugins.js +0 -203
- package/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +0 -6
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +0 -130
- package/src/command-line/init/implementation/add-nx-to-nest.js +0 -345
- package/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +0 -6
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +0 -72
- package/src/command-line/init/implementation/add-nx-to-turborepo.js +0 -49
- package/src/command-line/init/implementation/angular/index.js +0 -125
- package/src/command-line/init/implementation/angular/integrated-workspace.js +0 -12
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +0 -123
- package/src/command-line/init/implementation/angular/standalone-workspace.js +0 -178
- package/src/command-line/init/implementation/check-compatible-with-plugins.js +0 -134
- package/src/command-line/init/implementation/deduce-default-base.js +0 -53
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +0 -8
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +0 -106
- package/src/command-line/init/implementation/dot-nx/nxw.js +0 -117
- package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.d.ts +0 -1
- package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.js +0 -21
- package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.d.ts +0 -1
- package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +0 -20
- package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.d.ts +0 -1
- package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.js +0 -17
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.d.ts +0 -1
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +0 -20
- package/src/command-line/init/implementation/react/clean-up-files.d.ts +0 -1
- package/src/command-line/init/implementation/react/clean-up-files.js +0 -30
- package/src/command-line/init/implementation/react/index.d.ts +0 -4
- package/src/command-line/init/implementation/react/index.js +0 -77
- package/src/command-line/init/implementation/react/read-name-from-package-json.d.ts +0 -1
- package/src/command-line/init/implementation/react/read-name-from-package-json.js +0 -16
- package/src/command-line/init/implementation/react/rename-js-to-jsx.d.ts +0 -1
- package/src/command-line/init/implementation/react/rename-js-to-jsx.js +0 -22
- package/src/command-line/init/implementation/react/tsconfig-setup.d.ts +0 -1
- package/src/command-line/init/implementation/react/tsconfig-setup.js +0 -108
- package/src/command-line/init/implementation/react/write-vite-config.d.ts +0 -1
- package/src/command-line/init/implementation/react/write-vite-config.js +0 -53
- package/src/command-line/init/implementation/react/write-vite-index-html.d.ts +0 -1
- package/src/command-line/init/implementation/react/write-vite-index-html.js +0 -24
- package/src/command-line/init/implementation/utils.d.ts +0 -20
- package/src/command-line/init/implementation/utils.js +0 -284
- package/src/command-line/init/init-v1.d.ts +0 -11
- package/src/command-line/init/init-v1.js +0 -130
- package/src/command-line/init/init-v2.d.ts +0 -14
- package/src/command-line/init/init-v2.js +0 -257
- package/src/command-line/list/command-object.js +0 -15
- package/src/command-line/list/list.d.ts +0 -13
- package/src/command-line/list/list.js +0 -44
- package/src/command-line/login/command-object.js +0 -16
- package/src/command-line/login/login.js +0 -19
- package/src/command-line/logout/command-object.js +0 -12
- package/src/command-line/logout/logout.js +0 -16
- package/src/command-line/migrate/command-object.js +0 -77
- package/src/command-line/migrate/migrate.d.ts +0 -115
- package/src/command-line/migrate/migrate.js +0 -1202
- package/src/command-line/new/command-object.js +0 -25
- package/src/command-line/nx-commands.d.ts +0 -10
- package/src/command-line/nx-commands.js +0 -142
- package/src/command-line/register/command-object.js +0 -26
- package/src/command-line/release/changelog.d.ts +0 -35
- package/src/command-line/release/changelog.js +0 -982
- package/src/command-line/release/command-object.d.ts +0 -72
- package/src/command-line/release/command-object.js +0 -308
- package/src/command-line/release/config/config.d.ts +0 -55
- package/src/command-line/release/config/config.js +0 -994
- package/src/command-line/release/config/conventional-commits.js +0 -105
- package/src/command-line/release/config/filter-release-groups.d.ts +0 -19
- package/src/command-line/release/config/use-legacy-versioning.d.ts +0 -2
- package/src/command-line/release/config/use-legacy-versioning.js +0 -9
- package/src/command-line/release/config/version-plans.js +0 -220
- package/src/command-line/release/index.d.ts +0 -37
- package/src/command-line/release/index.js +0 -42
- package/src/command-line/release/plan-check.js +0 -172
- package/src/command-line/release/plan.js +0 -263
- package/src/command-line/release/publish.d.ts +0 -9
- package/src/command-line/release/publish.js +0 -187
- package/src/command-line/release/release.d.ts +0 -5
- package/src/command-line/release/release.js +0 -255
- package/src/command-line/release/utils/batch-projects-by-generator-config.d.ts +0 -7
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +0 -39
- package/src/command-line/release/utils/exec-command.js +0 -34
- package/src/command-line/release/utils/get-touched-projects-for-group.js +0 -78
- package/src/command-line/release/utils/git.d.ts +0 -68
- package/src/command-line/release/utils/git.js +0 -492
- package/src/command-line/release/utils/github.d.ts +0 -32
- package/src/command-line/release/utils/github.js +0 -326
- package/src/command-line/release/utils/launch-editor.js +0 -46
- package/src/command-line/release/utils/print-changes.js +0 -61
- package/src/command-line/release/utils/resolve-changelog-renderer.d.ts +0 -2
- package/src/command-line/release/utils/resolve-changelog-renderer.js +0 -30
- package/src/command-line/release/utils/resolve-nx-json-error-message.js +0 -52
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +0 -5
- package/src/command-line/release/utils/resolve-semver-specifier.js +0 -58
- package/src/command-line/release/utils/semver.d.ts +0 -19
- package/src/command-line/release/utils/semver.js +0 -66
- package/src/command-line/release/utils/shared.d.ts +0 -47
- package/src/command-line/release/utils/shared.js +0 -219
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +0 -7
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +0 -47
- package/src/command-line/release/version/project-logger.js +0 -45
- package/src/command-line/release/version/release-group-processor.d.ts +0 -251
- package/src/command-line/release/version/release-group-processor.js +0 -1048
- package/src/command-line/release/version/resolve-current-version.d.ts +0 -32
- package/src/command-line/release/version/resolve-current-version.js +0 -241
- package/src/command-line/release/version/test-utils.d.ts +0 -95
- package/src/command-line/release/version/test-utils.js +0 -416
- package/src/command-line/release/version/topological-sort.js +0 -41
- package/src/command-line/release/version/version-actions.d.ts +0 -170
- package/src/command-line/release/version/version-actions.js +0 -183
- package/src/command-line/release/version-legacy.d.ts +0 -46
- package/src/command-line/release/version-legacy.js +0 -453
- package/src/command-line/release/version.d.ts +0 -20
- package/src/command-line/release/version.js +0 -301
- package/src/command-line/repair/command-object.js +0 -20
- package/src/command-line/repair/repair.js +0 -36
- package/src/command-line/report/command-object.js +0 -11
- package/src/command-line/report/report.d.ts +0 -61
- package/src/command-line/report/report.js +0 -339
- package/src/command-line/reset/command-object.js +0 -26
- package/src/command-line/reset/reset.js +0 -131
- package/src/command-line/run/command-object.js +0 -42
- package/src/command-line/run/executor-utils.d.ts +0 -7
- package/src/command-line/run/executor-utils.js +0 -86
- package/src/command-line/run/run-one.d.ts +0 -7
- package/src/command-line/run/run-one.js +0 -138
- package/src/command-line/run/run.js +0 -178
- package/src/command-line/run-many/command-object.js +0 -17
- package/src/command-line/run-many/run-many.js +0 -89
- package/src/command-line/show/command-object.d.ts +0 -26
- package/src/command-line/show/command-object.js +0 -115
- package/src/command-line/show/project.js +0 -82
- package/src/command-line/show/projects.js +0 -81
- package/src/command-line/sync/command-object.js +0 -20
- package/src/command-line/sync/sync.js +0 -114
- package/src/command-line/watch/command-object.js +0 -64
- package/src/command-line/watch/watch.d.ts +0 -23
- package/src/command-line/watch/watch.js +0 -173
- package/src/command-line/yargs-utils/documentation.js +0 -11
- package/src/command-line/yargs-utils/shared-options.d.ts +0 -79
- package/src/command-line/yargs-utils/shared-options.js +0 -279
- package/src/commands-runner/get-command-projects.js +0 -18
- package/src/config/misc-interfaces.d.ts +0 -200
- package/src/config/nx-json.d.ts +0 -605
- package/src/config/nx-json.js +0 -39
- package/src/config/schema-utils.js +0 -125
- package/src/config/task-graph.d.ts +0 -104
- package/src/config/workspace-json-project-json.d.ts +0 -246
- package/src/core/graph/index.html +0 -30
- package/src/core/graph/main.js +0 -1
- package/src/core/graph/runtime.js +0 -1
- package/src/core/graph/styles.css +0 -3
- package/src/core/graph/styles.js +0 -1
- package/src/daemon/cache.d.ts +0 -9
- package/src/daemon/cache.js +0 -68
- package/src/daemon/client/client.d.ts +0 -77
- package/src/daemon/client/client.js +0 -543
- package/src/daemon/client/daemon-socket-messenger.d.ts +0 -12
- package/src/daemon/client/daemon-socket-messenger.js +0 -26
- package/src/daemon/client/exec-is-server-available.js +0 -11
- package/src/daemon/client/generate-help-output.d.ts +0 -1
- package/src/daemon/client/generate-help-output.js +0 -26
- package/src/daemon/server/file-watching/file-watcher-sockets.js +0 -66
- package/src/daemon/server/handle-context-file-data.js +0 -12
- package/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +0 -11
- package/src/daemon/server/handle-get-files-in-directory.js +0 -12
- package/src/daemon/server/handle-get-registered-sync-generators.js +0 -11
- package/src/daemon/server/handle-get-sync-generator-changes.js +0 -19
- package/src/daemon/server/handle-glob.js +0 -20
- package/src/daemon/server/handle-hash-tasks.d.ts +0 -10
- package/src/daemon/server/handle-hash-tasks.js +0 -35
- package/src/daemon/server/handle-nx-workspace-files.js +0 -12
- package/src/daemon/server/handle-outputs-tracking.d.ts +0 -15
- package/src/daemon/server/handle-outputs-tracking.js +0 -35
- package/src/daemon/server/handle-process-in-background.js +0 -32
- package/src/daemon/server/handle-request-project-graph.d.ts +0 -2
- package/src/daemon/server/handle-request-project-graph.js +0 -36
- package/src/daemon/server/handle-task-history.d.ts +0 -13
- package/src/daemon/server/handle-task-history.js +0 -30
- package/src/daemon/server/handle-tasks-execution-hooks.d.ts +0 -19
- package/src/daemon/server/handle-tasks-execution-hooks.js +0 -35
- package/src/daemon/server/logger.d.ts +0 -18
- package/src/daemon/server/logger.js +0 -38
- package/src/daemon/server/outputs-tracking.d.ts +0 -8
- package/src/daemon/server/outputs-tracking.js +0 -93
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts +0 -24
- package/src/daemon/server/project-graph-incremental-recomputation.js +0 -300
- package/src/daemon/server/server.d.ts +0 -9
- package/src/daemon/server/server.js +0 -404
- package/src/daemon/server/shutdown-utils.d.ts +0 -17
- package/src/daemon/server/shutdown-utils.js +0 -91
- package/src/daemon/server/start.js +0 -17
- package/src/daemon/server/sync-generators.d.ts +0 -13
- package/src/daemon/server/sync-generators.js +0 -357
- package/src/daemon/server/watcher.d.ts +0 -11
- package/src/daemon/server/watcher.js +0 -103
- package/src/daemon/socket-utils.d.ts +0 -12
- package/src/daemon/socket-utils.js +0 -55
- package/src/daemon/tmp-dir.d.ts +0 -12
- package/src/daemon/tmp-dir.js +0 -70
- package/src/devkit-exports.d.ts +0 -139
- package/src/devkit-internals.d.ts +0 -28
- package/src/devkit-internals.js +0 -57
- package/src/executors/noop/schema.json +0 -10
- package/src/executors/run-commands/run-commands.impl.d.ts +0 -58
- package/src/executors/run-commands/run-commands.impl.js +0 -487
- package/src/executors/run-commands/schema.json +0 -198
- package/src/executors/run-script/run-script.impl.js +0 -57
- package/src/executors/run-script/schema.json +0 -28
- package/src/executors/utils/convert-nx-executor.js +0 -83
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +0 -14
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +0 -66
- package/src/generators/tree.js +0 -309
- package/src/generators/utils/nx-json.d.ts +0 -11
- package/src/generators/utils/nx-json.js +0 -58
- package/src/generators/utils/project-configuration.js +0 -289
- package/src/hasher/hash-task.d.ts +0 -8
- package/src/hasher/hash-task.js +0 -85
- package/src/hasher/native-task-hasher-impl.d.ts +0 -18
- package/src/hasher/native-task-hasher-impl.js +0 -37
- package/src/hasher/task-hasher.d.ts +0 -124
- package/src/hasher/task-hasher.js +0 -240
- package/src/migrations/update-17-0-0/move-cache-directory.js +0 -35
- package/src/migrations/update-17-2-0/move-default-base.js +0 -21
- package/src/native/index.d.ts +0 -311
- package/src/native/index.js +0 -108
- package/src/native/native-bindings.js +0 -393
- package/src/native/native-file-cache-location.js +0 -22
- package/src/native/nx.wasi-browser.js +0 -117
- package/src/native/nx.wasi.cjs +0 -148
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/native/tests/__fixtures__/file-lock.fixture.js +0 -20
- package/src/native/wasi-worker-browser.mjs +0 -32
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +0 -14
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +0 -160
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +0 -41
- package/src/nx-cloud/nx-cloud-tasks-runner-shell.js +0 -41
- package/src/nx-cloud/update-manager.d.ts +0 -19
- package/src/nx-cloud/update-manager.js +0 -252
- package/src/nx-cloud/utilities/axios.d.ts +0 -2
- package/src/nx-cloud/utilities/axios.js +0 -24
- package/src/nx-cloud/utilities/client.d.ts +0 -10
- package/src/nx-cloud/utilities/client.js +0 -35
- package/src/nx-cloud/utilities/environment.js +0 -47
- package/src/nx-cloud/utilities/onboarding.js +0 -28
- package/src/nx-cloud/utilities/url-shorten.d.ts +0 -10
- package/src/nx-cloud/utilities/url-shorten.js +0 -156
- package/src/plugins/js/index.d.ts +0 -4
- package/src/plugins/js/index.js +0 -106
- package/src/plugins/js/lock-file/lock-file.d.ts +0 -34
- package/src/plugins/js/lock-file/lock-file.js +0 -226
- package/src/plugins/js/lock-file/npm-parser.d.ts +0 -7
- package/src/plugins/js/lock-file/npm-parser.js +0 -475
- package/src/plugins/js/lock-file/pnpm-parser.d.ts +0 -7
- package/src/plugins/js/lock-file/pnpm-parser.js +0 -466
- package/src/plugins/js/lock-file/project-graph-pruning.d.ts +0 -7
- package/src/plugins/js/lock-file/project-graph-pruning.js +0 -154
- package/src/plugins/js/lock-file/utils/package-json.d.ts +0 -10
- package/src/plugins/js/lock-file/utils/package-json.js +0 -35
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +0 -854
- package/src/plugins/js/lock-file/yarn-parser.d.ts +0 -7
- package/src/plugins/js/lock-file/yarn-parser.js +0 -494
- package/src/plugins/js/package-json/create-package-json.js +0 -247
- package/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +0 -4
- package/src/plugins/js/project-graph/affected/lock-file-changes.js +0 -29
- package/src/plugins/js/project-graph/affected/npm-packages.js +0 -68
- package/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +0 -45
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +0 -80
- package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +0 -88
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +0 -71
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +0 -358
- package/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.js +0 -120
- package/src/plugins/js/utils/register.d.ts +0 -156
- package/src/plugins/js/utils/register.js +0 -344
- package/src/plugins/js/utils/typescript.d.ts +0 -15
- package/src/plugins/js/utils/typescript.js +0 -98
- package/src/plugins/js/versions.d.ts +0 -1
- package/src/plugins/js/versions.js +0 -4
- package/src/plugins/package-json/create-nodes.d.ts +0 -19
- package/src/plugins/package-json/create-nodes.js +0 -209
- package/src/plugins/project-json/build-nodes/project-json.d.ts +0 -6
- package/src/plugins/project-json/build-nodes/project-json.js +0 -45
- package/src/project-graph/affected/affected-project-graph.js +0 -85
- package/src/project-graph/build-project-graph.d.ts +0 -23
- package/src/project-graph/build-project-graph.js +0 -315
- package/src/project-graph/error-types.d.ts +0 -138
- package/src/project-graph/error-types.js +0 -391
- package/src/project-graph/file-utils.d.ts +0 -30
- package/src/project-graph/file-utils.js +0 -180
- package/src/project-graph/nx-deps-cache.d.ts +0 -51
- package/src/project-graph/nx-deps-cache.js +0 -282
- package/src/project-graph/plugins/get-plugins.d.ts +0 -4
- package/src/project-graph/plugins/get-plugins.js +0 -144
- package/src/project-graph/plugins/in-process-loader.d.ts +0 -10
- package/src/project-graph/plugins/in-process-loader.js +0 -60
- package/src/project-graph/plugins/isolation/enabled.js +0 -19
- package/src/project-graph/plugins/isolation/index.d.ts +0 -3
- package/src/project-graph/plugins/isolation/index.js +0 -8
- package/src/project-graph/plugins/isolation/messaging.d.ts +0 -143
- package/src/project-graph/plugins/isolation/messaging.js +0 -50
- package/src/project-graph/plugins/isolation/plugin-pool.d.ts +0 -3
- package/src/project-graph/plugins/isolation/plugin-pool.js +0 -310
- package/src/project-graph/plugins/isolation/plugin-worker.js +0 -208
- package/src/project-graph/plugins/load-resolved-plugin.d.ts +0 -3
- package/src/project-graph/plugins/load-resolved-plugin.js +0 -22
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts +0 -20
- package/src/project-graph/plugins/loaded-nx-plugin.js +0 -80
- package/src/project-graph/plugins/public-api.d.ts +0 -149
- package/src/project-graph/plugins/resolve-plugin.d.ts +0 -15
- package/src/project-graph/plugins/resolve-plugin.js +0 -134
- package/src/project-graph/plugins/transpiler.js +0 -47
- package/src/project-graph/plugins/utils.d.ts +0 -2
- package/src/project-graph/plugins/utils.js +0 -26
- package/src/project-graph/project-graph.d.ts +0 -53
- package/src/project-graph/project-graph.js +0 -327
- package/src/project-graph/utils/normalize-project-nodes.d.ts +0 -6
- package/src/project-graph/utils/normalize-project-nodes.js +0 -88
- package/src/project-graph/utils/project-configuration-utils.d.ts +0 -74
- package/src/project-graph/utils/project-configuration-utils.js +0 -811
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +0 -26
- package/src/tasks-runner/batch/run-batch.js +0 -75
- package/src/tasks-runner/cache.d.ts +0 -82
- package/src/tasks-runner/cache.js +0 -541
- package/src/tasks-runner/create-task-graph.d.ts +0 -40
- package/src/tasks-runner/create-task-graph.js +0 -270
- package/src/tasks-runner/default-tasks-runner.js +0 -80
- package/src/tasks-runner/fork.js +0 -30
- package/src/tasks-runner/forked-process-task-runner.d.ts +0 -45
- package/src/tasks-runner/forked-process-task-runner.js +0 -427
- package/src/tasks-runner/init-tasks-runner.d.ts +0 -13
- package/src/tasks-runner/init-tasks-runner.js +0 -59
- package/src/tasks-runner/life-cycle.d.ts +0 -50
- package/src/tasks-runner/life-cycle.js +0 -71
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +0 -353
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +0 -228
- package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +0 -106
- package/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +0 -9
- package/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +0 -54
- package/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +0 -10
- package/src/tasks-runner/life-cycles/task-history-life-cycle.js +0 -55
- package/src/tasks-runner/pseudo-ipc.js +0 -140
- package/src/tasks-runner/pseudo-terminal.d.ts +0 -45
- package/src/tasks-runner/pseudo-terminal.js +0 -168
- package/src/tasks-runner/run-command.d.ts +0 -36
- package/src/tasks-runner/run-command.js +0 -623
- package/src/tasks-runner/task-env.d.ts +0 -20
- package/src/tasks-runner/task-env.js +0 -171
- package/src/tasks-runner/task-graph-utils.d.ts +0 -21
- package/src/tasks-runner/task-graph-utils.js +0 -111
- package/src/tasks-runner/task-orchestrator.d.ts +0 -53
- package/src/tasks-runner/task-orchestrator.js +0 -468
- package/src/tasks-runner/tasks-runner.d.ts +0 -23
- package/src/tasks-runner/tasks-schedule.d.ts +0 -41
- package/src/tasks-runner/tasks-schedule.js +0 -192
- package/src/tasks-runner/utils.d.ts +0 -57
- package/src/tasks-runner/utils.js +0 -394
- package/src/utils/ab-testing.d.ts +0 -51
- package/src/utils/ab-testing.js +0 -112
- package/src/utils/assert-workspace-validity.js +0 -88
- package/src/utils/cache-directory.d.ts +0 -7
- package/src/utils/cache-directory.js +0 -71
- package/src/utils/child-process.js +0 -112
- package/src/utils/code-frames.js +0 -118
- package/src/utils/collapse-expanded-outputs.d.ts +0 -1
- package/src/utils/collapse-expanded-outputs.js +0 -40
- package/src/utils/command-line-utils.d.ts +0 -56
- package/src/utils/command-line-utils.js +0 -247
- package/src/utils/consume-messages-from-socket.d.ts +0 -1
- package/src/utils/consume-messages-from-socket.js +0 -21
- package/src/utils/db-connection.d.ts +0 -6
- package/src/utils/db-connection.js +0 -29
- package/src/utils/default-base.js +0 -17
- package/src/utils/delayed-spinner.d.ts +0 -42
- package/src/utils/delayed-spinner.js +0 -80
- package/src/utils/dotenv.js +0 -21
- package/src/utils/exit-codes.d.ts +0 -5
- package/src/utils/exit-codes.js +0 -19
- package/src/utils/fileutils.js +0 -151
- package/src/utils/find-matching-projects.js +0 -222
- package/src/utils/git-utils.d.ts +0 -41
- package/src/utils/git-utils.index-filter.d.ts +0 -0
- package/src/utils/git-utils.index-filter.js +0 -21
- package/src/utils/git-utils.js +0 -259
- package/src/utils/git-utils.tree-filter.d.ts +0 -11
- package/src/utils/git-utils.tree-filter.js +0 -45
- package/src/utils/handle-errors.js +0 -82
- package/src/utils/ignore.d.ts +0 -8
- package/src/utils/ignore.js +0 -75
- package/src/utils/installation-directory.js +0 -12
- package/src/utils/is-ci.d.ts +0 -1
- package/src/utils/is-ci.js +0 -23
- package/src/utils/logger.d.ts +0 -12
- package/src/utils/logger.js +0 -52
- package/src/utils/nx-cloud-utils.d.ts +0 -3
- package/src/utils/nx-cloud-utils.js +0 -21
- package/src/utils/nx-key.d.ts +0 -7
- package/src/utils/nx-key.js +0 -52
- package/src/utils/output.d.ts +0 -71
- package/src/utils/output.js +0 -240
- package/src/utils/package-json.d.ts +0 -107
- package/src/utils/package-json.js +0 -179
- package/src/utils/package-manager.d.ts +0 -114
- package/src/utils/package-manager.js +0 -490
- package/src/utils/params.d.ts +0 -137
- package/src/utils/params.js +0 -664
- package/src/utils/path.js +0 -37
- package/src/utils/perf-logging.js +0 -13
- package/src/utils/plugins/index.d.ts +0 -4
- package/src/utils/plugins/index.js +0 -13
- package/src/utils/plugins/output.d.ts +0 -6
- package/src/utils/plugins/output.js +0 -111
- package/src/utils/plugins/plugin-capabilities.d.ts +0 -14
- package/src/utils/plugins/plugin-capabilities.js +0 -76
- package/src/utils/print-help.js +0 -258
- package/src/utils/project-graph-utils.d.ts +0 -13
- package/src/utils/project-graph-utils.js +0 -73
- package/src/utils/require-nx-key.js +0 -22
- package/src/utils/serialize-overrides-into-command-line.js +0 -42
- package/src/utils/split-target.d.ts +0 -3
- package/src/utils/split-target.js +0 -48
- package/src/utils/sync-generators.d.ts +0 -64
- package/src/utils/sync-generators.js +0 -348
- package/src/utils/task-history.js +0 -51
- package/src/utils/update-nxw.js +0 -11
- package/src/utils/versions.js +0 -4
- package/src/utils/workspace-context.d.ts +0 -21
- package/src/utils/workspace-context.js +0 -119
- package/src/utils/workspace-root.js +0 -39
- /package/{bin → dist/bin}/nx-cloud.d.ts +0 -0
- /package/{bin → dist/bin}/nx-cloud.js +0 -0
- /package/{bin → dist/bin}/post-install.d.ts +0 -0
- /package/{bin → dist/bin}/run-executor.d.ts +0 -0
- /package/{bin → dist/bin}/run-executor.js +0 -0
- /package/{presets → dist/presets}/core.json +0 -0
- /package/{presets → dist/presets}/npm.json +0 -0
- /package/{release → dist/release}/index.d.ts +0 -0
- /package/{release → dist/release}/index.js +0 -0
- /package/{src → dist/src}/adapter/angular-json.d.ts +0 -0
- /package/{src → dist/src}/adapter/rxjs-for-await.d.ts +0 -0
- /package/{src → dist/src}/adapter/rxjs-for-await.js +0 -0
- /package/{src → dist/src}/command-line/add/add.d.ts +0 -0
- /package/{src → dist/src}/command-line/add/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/affected/affected.d.ts +0 -0
- /package/{src → dist/src}/command-line/affected/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/daemon/daemon.d.ts +0 -0
- /package/{src → dist/src}/command-line/deprecated/command-objects.d.ts +0 -0
- /package/{src → dist/src}/command-line/deprecated/command-objects.js +0 -0
- /package/{src → dist/src}/command-line/exec/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/exec/exec.d.ts +0 -0
- /package/{src → dist/src}/command-line/format/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/format/format.d.ts +0 -0
- /package/{src → dist/src}/command-line/generate/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/generate/generate.d.ts +0 -0
- /package/{src → dist/src}/command-line/generate/generator-utils.d.ts +0 -0
- /package/{src → dist/src}/command-line/generate/generator-utils.js +0 -0
- /package/{src → dist/src}/command-line/graph/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/import/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/import/utils/merge-remote-source.d.ts +0 -0
- /package/{src → dist/src}/command-line/import/utils/prepare-source-repo.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/configure-plugins.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/add-nx-to-nest.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/add-nx-to-turborepo.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/index.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/integrated-workspace.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/legacy-angular-versions.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/standalone-workspace.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/types.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/types.js +0 -0
- /package/{src → dist/src}/command-line/init/implementation/check-compatible-with-plugins.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/deduce-default-base.d.ts +0 -0
- /package/{src → dist/src}/command-line/init/implementation/dot-nx/nxw.d.ts +0 -0
- /package/{src → dist/src}/command-line/list/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/migrate/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/new/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/new/new.d.ts +0 -0
- /package/{src → dist/src}/command-line/new/new.js +0 -0
- /package/{src/command-line → dist/src/command-line/nx-cloud}/connect/command-object.d.ts +0 -0
- /package/{src/command-line → dist/src/command-line/nx-cloud}/connect/view-logs.d.ts +0 -0
- /package/{src/command-line → dist/src/command-line/nx-cloud}/login/command-object.d.ts +0 -0
- /package/{src/command-line → dist/src/command-line/nx-cloud}/login/login.d.ts +0 -0
- /package/{src/command-line → dist/src/command-line/nx-cloud}/logout/command-object.d.ts +0 -0
- /package/{src/command-line → dist/src/command-line/nx-cloud}/logout/logout.d.ts +0 -0
- /package/{src → dist/src}/command-line/register/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/register/register.d.ts +0 -0
- /package/{src → dist/src}/command-line/register/register.js +0 -0
- /package/{src → dist/src}/command-line/release/config/conventional-commits.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/config/deep-merge-json.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/config/deep-merge-json.js +0 -0
- /package/{src → dist/src}/command-line/release/config/filter-release-groups.js +0 -0
- /package/{src → dist/src}/command-line/release/config/version-plans.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/plan-check.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/plan.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/exec-command.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/generate-version-plan-content.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/generate-version-plan-content.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/get-touched-projects-for-group.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/launch-editor.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/markdown.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/markdown.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/print-changes.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/print-config.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/print-config.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/resolve-nx-json-error-message.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/shared-legacy.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/utils/shared-legacy.js +0 -0
- /package/{src → dist/src}/command-line/release/version/deriver-specifier-from-version-plans.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/version/deriver-specifier-from-version-plans.js +0 -0
- /package/{src → dist/src}/command-line/release/version/project-logger.d.ts +0 -0
- /package/{src → dist/src}/command-line/release/version/topological-sort.d.ts +0 -0
- /package/{src → dist/src}/command-line/repair/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/repair/repair.d.ts +0 -0
- /package/{src → dist/src}/command-line/report/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/reset/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/reset/reset.d.ts +0 -0
- /package/{src → dist/src}/command-line/run/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/run/run.d.ts +0 -0
- /package/{src → dist/src}/command-line/run-many/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/run-many/run-many.d.ts +0 -0
- /package/{src → dist/src}/command-line/show/project.d.ts +0 -0
- /package/{src → dist/src}/command-line/show/projects.d.ts +0 -0
- /package/{src → dist/src}/command-line/sync/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/sync/sync.d.ts +0 -0
- /package/{src → dist/src}/command-line/watch/command-object.d.ts +0 -0
- /package/{src → dist/src}/command-line/yargs-utils/documentation.d.ts +0 -0
- /package/{src → dist/src}/commands-runner/command-graph.d.ts +0 -0
- /package/{src → dist/src}/commands-runner/command-graph.js +0 -0
- /package/{src → dist/src}/commands-runner/create-command-graph.d.ts +0 -0
- /package/{src → dist/src}/commands-runner/create-command-graph.js +0 -0
- /package/{src → dist/src}/commands-runner/get-command-projects.d.ts +0 -0
- /package/{src → dist/src}/config/calculate-default-project-name.d.ts +0 -0
- /package/{src → dist/src}/config/calculate-default-project-name.js +0 -0
- /package/{src → dist/src}/config/configuration.d.ts +0 -0
- /package/{src → dist/src}/config/configuration.js +0 -0
- /package/{src → dist/src}/config/misc-interfaces.js +0 -0
- /package/{src → dist/src}/config/project-graph.d.ts +0 -0
- /package/{src → dist/src}/config/project-graph.js +0 -0
- /package/{src → dist/src}/config/schema-utils.d.ts +0 -0
- /package/{src → dist/src}/config/task-graph.js +0 -0
- /package/{src → dist/src}/config/to-project-name.d.ts +0 -0
- /package/{src → dist/src}/config/to-project-name.js +0 -0
- /package/{src → dist/src}/config/workspace-json-project-json.js +0 -0
- /package/{src → dist/src}/core/graph/environment.js +0 -0
- /package/{src → dist/src}/core/graph/favicon.ico +0 -0
- /package/{src → dist/src}/daemon/is-on-daemon.d.ts +0 -0
- /package/{src → dist/src}/daemon/is-on-daemon.js +0 -0
- /package/{src → dist/src}/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/flush-sync-generator-changes-to-disk.js +0 -0
- /package/{src → dist/src}/daemon/message-types/force-shutdown.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/force-shutdown.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-context-file-data.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/get-context-file-data.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-files-in-directory.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/get-files-in-directory.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-nx-workspace-files.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/get-nx-workspace-files.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-registered-sync-generators.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/get-registered-sync-generators.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-sync-generator-changes.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/get-sync-generator-changes.js +0 -0
- /package/{src → dist/src}/daemon/message-types/glob.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/glob.js +0 -0
- /package/{src → dist/src}/daemon/message-types/hash-glob.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/hash-glob.js +0 -0
- /package/{src → dist/src}/daemon/message-types/run-tasks-execution-hooks.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/run-tasks-execution-hooks.js +0 -0
- /package/{src → dist/src}/daemon/message-types/task-history.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/task-history.js +0 -0
- /package/{src → dist/src}/daemon/message-types/update-workspace-context.d.ts +0 -0
- /package/{src → dist/src}/daemon/message-types/update-workspace-context.js +0 -0
- /package/{src → dist/src}/daemon/server/file-watching/changed-projects.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/file-watching/changed-projects.js +0 -0
- /package/{src → dist/src}/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-context-file-data.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-force-shutdown.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-force-shutdown.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-get-files-in-directory.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-get-registered-sync-generators.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-get-sync-generator-changes.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-glob.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-hash-glob.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-hash-glob.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-nx-workspace-files.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-process-in-background.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-request-shutdown.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-request-shutdown.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-update-workspace-context.d.ts +0 -0
- /package/{src → dist/src}/daemon/server/handle-update-workspace-context.js +0 -0
- /package/{src → dist/src}/devkit-exports.js +0 -0
- /package/{src → dist/src}/devkit-testing-exports.d.ts +0 -0
- /package/{src → dist/src}/devkit-testing-exports.js +0 -0
- /package/{src → dist/src}/executors/noop/noop.impl.d.ts +0 -0
- /package/{src → dist/src}/executors/noop/noop.impl.js +0 -0
- /package/{src → dist/src}/executors/run-script/run-script.impl.d.ts +0 -0
- /package/{src → dist/src}/executors/utils/convert-nx-executor.d.ts +0 -0
- /package/{src → dist/src}/generators/testing-utils/create-tree-with-empty-workspace.d.ts +0 -0
- /package/{src → dist/src}/generators/testing-utils/create-tree-with-empty-workspace.js +0 -0
- /package/{src → dist/src}/generators/testing-utils/create-tree.d.ts +0 -0
- /package/{src → dist/src}/generators/testing-utils/create-tree.js +0 -0
- /package/{src → dist/src}/generators/tree.d.ts +0 -0
- /package/{src → dist/src}/generators/utils/glob.d.ts +0 -0
- /package/{src → dist/src}/generators/utils/glob.js +0 -0
- /package/{src → dist/src}/generators/utils/json.d.ts +0 -0
- /package/{src → dist/src}/generators/utils/json.js +0 -0
- /package/{src → dist/src}/generators/utils/project-configuration.d.ts +0 -0
- /package/{src → dist/src}/hasher/create-task-hasher.d.ts +0 -0
- /package/{src → dist/src}/hasher/create-task-hasher.js +0 -0
- /package/{src → dist/src}/hasher/file-hasher.d.ts +0 -0
- /package/{src → dist/src}/hasher/file-hasher.js +0 -0
- /package/{src → dist/src}/index.d.ts +0 -0
- /package/{src → dist/src}/index.js +0 -0
- /package/{src → dist/src}/migrations/update-17-0-0/move-cache-directory.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-17-0-0/rm-default-collection-npm-scope.js +0 -0
- /package/{src → dist/src}/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +0 -0
- /package/{src → dist/src}/migrations/update-17-2-0/move-default-base.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-17-3-0/nx-release-path.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-17-3-0/nx-release-path.js +0 -0
- /package/{src → dist/src}/migrations/update-17-3-0/update-nxw.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-17-3-0/update-nxw.js +0 -0
- /package/{src → dist/src}/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +0 -0
- /package/{src → dist/src}/migrations/update-19-2-0/move-workspace-data-directory.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-19-2-0/move-workspace-data-directory.js +0 -0
- /package/{src → dist/src}/migrations/update-19-2-4/set-project-name.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-19-2-4/set-project-name.js +0 -0
- /package/{src → dist/src}/migrations/update-20-0-0/move-use-daemon-process.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-20-0-0/move-use-daemon-process.js +0 -0
- /package/{src → dist/src}/migrations/update-20-0-1/use-legacy-cache.d.ts +0 -0
- /package/{src → dist/src}/migrations/update-20-0-1/use-legacy-cache.js +0 -0
- /package/{src → dist/src}/native/assert-supported-platform.d.ts +0 -0
- /package/{src → dist/src}/native/assert-supported-platform.js +0 -0
- /package/{src → dist/src}/native/browser.js +0 -0
- /package/{src → dist/src}/native/native-file-cache-location.d.ts +0 -0
- /package/{src → dist/src}/native/transform-objects.d.ts +0 -0
- /package/{src → dist/src}/native/transform-objects.js +0 -0
- /package/{src → dist/src}/native/wasi-worker.mjs +0 -0
- /package/{src → dist/src}/nx-cloud/debug-logger.d.ts +0 -0
- /package/{src → dist/src}/nx-cloud/debug-logger.js +0 -0
- /package/{src → dist/src}/nx-cloud/models/onboarding-status.d.ts +0 -0
- /package/{src → dist/src}/nx-cloud/models/onboarding-status.js +0 -0
- /package/{src → dist/src}/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +0 -0
- /package/{src → dist/src}/nx-cloud/resolution-helpers.d.ts +0 -0
- /package/{src → dist/src}/nx-cloud/resolution-helpers.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/environment.d.ts +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/get-cloud-options.d.ts +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/get-cloud-options.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/is-workspace-claimed.d.ts +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/is-workspace-claimed.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/onboarding.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/hasher/hasher.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/hasher/hasher.js +0 -0
- /package/{src → dist/src}/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/package-json/create-package-json.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/affected/npm-packages.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/affected/touched-projects.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/affected/touched-projects.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/affected/tsconfig-json-changes.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/strip-source-code.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/strip-source-code.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/typescript-import-locator.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +0 -0
- /package/{src → dist/src}/plugins/js/utils/config.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/utils/config.js +0 -0
- /package/{src → dist/src}/plugins/js/utils/packages.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/utils/packages.js +0 -0
- /package/{src → dist/src}/plugins/js/utils/resolve-relative-to-dir.d.ts +0 -0
- /package/{src → dist/src}/plugins/js/utils/resolve-relative-to-dir.js +0 -0
- /package/{src → dist/src}/plugins/package-json/index.d.ts +0 -0
- /package/{src → dist/src}/plugins/package-json/index.js +0 -0
- /package/{src → dist/src}/project-graph/affected/affected-project-graph-models.d.ts +0 -0
- /package/{src → dist/src}/project-graph/affected/affected-project-graph-models.js +0 -0
- /package/{src → dist/src}/project-graph/affected/affected-project-graph.d.ts +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/project-glob-changes.d.ts +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/project-glob-changes.js +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/workspace-json-changes.d.ts +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/workspace-json-changes.js +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/workspace-projects.d.ts +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/workspace-projects.js +0 -0
- /package/{src → dist/src}/project-graph/file-map-utils.d.ts +0 -0
- /package/{src → dist/src}/project-graph/file-map-utils.js +0 -0
- /package/{src → dist/src}/project-graph/operators.d.ts +0 -0
- /package/{src → dist/src}/project-graph/operators.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/index.d.ts +0 -0
- /package/{src → dist/src}/project-graph/plugins/index.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/isolation/enabled.d.ts +0 -0
- /package/{src → dist/src}/project-graph/plugins/public-api.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/tasks-execution-hooks.d.ts +0 -0
- /package/{src → dist/src}/project-graph/plugins/tasks-execution-hooks.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/transpiler.d.ts +0 -0
- /package/{src → dist/src}/project-graph/project-graph-builder.d.ts +0 -0
- /package/{src → dist/src}/project-graph/project-graph-builder.js +0 -0
- /package/{src → dist/src}/project-graph/utils/build-all-workspace-files.d.ts +0 -0
- /package/{src → dist/src}/project-graph/utils/build-all-workspace-files.js +0 -0
- /package/{src → dist/src}/project-graph/utils/find-project-for-path.d.ts +0 -0
- /package/{src → dist/src}/project-graph/utils/find-project-for-path.js +0 -0
- /package/{src → dist/src}/project-graph/utils/implicit-project-dependencies.d.ts +0 -0
- /package/{src → dist/src}/project-graph/utils/implicit-project-dependencies.js +0 -0
- /package/{src → dist/src}/project-graph/utils/retrieve-workspace-files.js +0 -0
- /package/{src → dist/src}/tasks-runner/batch/batch-messages.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/batch/batch-messages.js +0 -0
- /package/{src → dist/src}/tasks-runner/batch/run-batch.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/default-tasks-runner.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/fork.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/formatting-utils.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/formatting-utils.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/pretty-time.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/pretty-time.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/store-run-information-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-profiling-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-results-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-results-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-timings-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/view-logs-utils.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/view-logs-utils.js +0 -0
- /package/{src → dist/src}/tasks-runner/pseudo-ipc.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/remove-old-cache-records.d.ts +0 -0
- /package/{src → dist/src}/tasks-runner/remove-old-cache-records.js +0 -0
- /package/{src → dist/src}/tasks-runner/tasks-runner.js +0 -0
- /package/{src → dist/src}/utils/all-file-data.d.ts +0 -0
- /package/{src → dist/src}/utils/all-file-data.js +0 -0
- /package/{src → dist/src}/utils/assert-workspace-validity.d.ts +0 -0
- /package/{src → dist/src}/utils/async-iterator.d.ts +0 -0
- /package/{src → dist/src}/utils/async-iterator.js +0 -0
- /package/{src → dist/src}/utils/child-process.d.ts +0 -0
- /package/{src → dist/src}/utils/chunkify.d.ts +0 -0
- /package/{src → dist/src}/utils/chunkify.js +0 -0
- /package/{src → dist/src}/utils/code-frames.d.ts +0 -0
- /package/{src → dist/src}/utils/default-base.d.ts +0 -0
- /package/{src → dist/src}/utils/dotenv.d.ts +0 -0
- /package/{src/daemon/client/exec-is-server-available.d.ts → dist/src/utils/enable-compile-cache.d.ts} +0 -0
- /package/{src → dist/src}/utils/fileutils.d.ts +0 -0
- /package/{src → dist/src}/utils/find-matching-projects.d.ts +0 -0
- /package/{src → dist/src}/utils/find-workspace-root.d.ts +0 -0
- /package/{src → dist/src}/utils/find-workspace-root.js +0 -0
- /package/{src → dist/src}/utils/get-package-name-from-import-path.d.ts +0 -0
- /package/{src → dist/src}/utils/get-package-name-from-import-path.js +0 -0
- /package/{src/daemon/server/start.d.ts → dist/src/utils/git-utils.index-filter.d.ts} +0 -0
- /package/{src/project-graph/plugins/isolation/plugin-worker.d.ts → dist/src/utils/git-utils.tree-filter.d.ts} +0 -0
- /package/{src → dist/src}/utils/globs.d.ts +0 -0
- /package/{src → dist/src}/utils/globs.js +0 -0
- /package/{src → dist/src}/utils/handle-errors.d.ts +0 -0
- /package/{src → dist/src}/utils/installation-directory.d.ts +0 -0
- /package/{src → dist/src}/utils/is-using-prettier.d.ts +0 -0
- /package/{src → dist/src}/utils/is-using-prettier.js +0 -0
- /package/{src → dist/src}/utils/json-diff.d.ts +0 -0
- /package/{src → dist/src}/utils/json-diff.js +0 -0
- /package/{src → dist/src}/utils/json.d.ts +0 -0
- /package/{src → dist/src}/utils/json.js +0 -0
- /package/{src → dist/src}/utils/legacy-task-history.d.ts +0 -0
- /package/{src → dist/src}/utils/legacy-task-history.js +0 -0
- /package/{src → dist/src}/utils/object-sort.d.ts +0 -0
- /package/{src → dist/src}/utils/object-sort.js +0 -0
- /package/{src → dist/src}/utils/path.d.ts +0 -0
- /package/{src → dist/src}/utils/perf-logging.d.ts +0 -0
- /package/{src → dist/src}/utils/plugins/core-plugins.d.ts +0 -0
- /package/{src → dist/src}/utils/plugins/core-plugins.js +0 -0
- /package/{src → dist/src}/utils/plugins/installed-plugins.d.ts +0 -0
- /package/{src → dist/src}/utils/plugins/installed-plugins.js +0 -0
- /package/{src → dist/src}/utils/plugins/local-plugins.d.ts +0 -0
- /package/{src → dist/src}/utils/plugins/local-plugins.js +0 -0
- /package/{src → dist/src}/utils/print-help.d.ts +0 -0
- /package/{src → dist/src}/utils/promised-based-queue.d.ts +0 -0
- /package/{src → dist/src}/utils/promised-based-queue.js +0 -0
- /package/{src → dist/src}/utils/require-nx-key.d.ts +0 -0
- /package/{src → dist/src}/utils/serializable-error.d.ts +0 -0
- /package/{src → dist/src}/utils/serializable-error.js +0 -0
- /package/{src → dist/src}/utils/serialize-overrides-into-command-line.d.ts +0 -0
- /package/{src → dist/src}/utils/serialize-target.d.ts +0 -0
- /package/{src → dist/src}/utils/serialize-target.js +0 -0
- /package/{src → dist/src}/utils/strip-indents.d.ts +0 -0
- /package/{src → dist/src}/utils/strip-indents.js +0 -0
- /package/{src → dist/src}/utils/task-history.d.ts +0 -0
- /package/{src → dist/src}/utils/update-nxw.d.ts +0 -0
- /package/{src → dist/src}/utils/versions.d.ts +0 -0
- /package/{src → dist/src}/utils/workspace-root.d.ts +0 -0
- /package/{tasks-runners → dist/tasks-runners}/default.d.ts +0 -0
- /package/{tasks-runners → dist/tasks-runners}/default.js +0 -0
|
@@ -0,0 +1,1277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskOrchestrator = void 0;
|
|
4
|
+
exports.getThreadPoolSize = getThreadPoolSize;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const events_1 = require("events");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const perf_hooks_1 = require("perf_hooks");
|
|
11
|
+
const project_graph_1 = require("../project-graph/project-graph");
|
|
12
|
+
const run_commands_impl_1 = require("../executors/run-commands/run-commands.impl");
|
|
13
|
+
const hash_task_1 = require("../hasher/hash-task");
|
|
14
|
+
const task_graph_utils_1 = require("./task-graph-utils");
|
|
15
|
+
const task_hasher_1 = require("../hasher/task-hasher");
|
|
16
|
+
const native_1 = require("../native");
|
|
17
|
+
const db_connection_1 = require("../utils/db-connection");
|
|
18
|
+
const output_1 = require("../utils/output");
|
|
19
|
+
const params_1 = require("../utils/params");
|
|
20
|
+
const workspace_root_1 = require("../utils/workspace-root");
|
|
21
|
+
const exit_codes_1 = require("../utils/exit-codes");
|
|
22
|
+
const cache_1 = require("./cache");
|
|
23
|
+
const forked_process_task_runner_1 = require("./forked-process-task-runner");
|
|
24
|
+
const is_tui_enabled_1 = require("./is-tui-enabled");
|
|
25
|
+
const pseudo_terminal_1 = require("./pseudo-terminal");
|
|
26
|
+
const output_prefix_1 = require("./running-tasks/output-prefix");
|
|
27
|
+
const noop_child_process_1 = require("./running-tasks/noop-child-process");
|
|
28
|
+
const task_env_1 = require("./task-env");
|
|
29
|
+
const tasks_schedule_1 = require("./tasks-schedule");
|
|
30
|
+
const utils_1 = require("./utils");
|
|
31
|
+
const shared_running_task_1 = require("./running-tasks/shared-running-task");
|
|
32
|
+
/**
|
|
33
|
+
* Resolve a batch executor's per-task result to a TaskStatus. Prefers an
|
|
34
|
+
* explicit `status` from the executor; falls back to the `success` boolean
|
|
35
|
+
* for executors that pre-date the `status` field.
|
|
36
|
+
*/
|
|
37
|
+
function resolveBatchTaskStatus(result) {
|
|
38
|
+
return result.status ?? (result.success ? 'success' : 'failure');
|
|
39
|
+
}
|
|
40
|
+
class TaskOrchestrator {
|
|
41
|
+
// endregion internal state
|
|
42
|
+
constructor(hasher, initiatingProject, initiatingTasks, projectGraph, taskGraph, nxJson, options, bail, daemon, outputStyle, taskGraphForHashing = taskGraph) {
|
|
43
|
+
this.hasher = hasher;
|
|
44
|
+
this.initiatingProject = initiatingProject;
|
|
45
|
+
this.initiatingTasks = initiatingTasks;
|
|
46
|
+
this.projectGraph = projectGraph;
|
|
47
|
+
this.taskGraph = taskGraph;
|
|
48
|
+
this.nxJson = nxJson;
|
|
49
|
+
this.options = options;
|
|
50
|
+
this.bail = bail;
|
|
51
|
+
this.daemon = daemon;
|
|
52
|
+
this.outputStyle = outputStyle;
|
|
53
|
+
this.taskGraphForHashing = taskGraphForHashing;
|
|
54
|
+
this.taskDetails = (0, hash_task_1.getTaskDetails)();
|
|
55
|
+
this.cache = (0, cache_1.getCache)(this.options);
|
|
56
|
+
this.tuiEnabled = (0, is_tui_enabled_1.isTuiEnabled)();
|
|
57
|
+
// Derived from projectGraph once — passed to getExecutorForTask /
|
|
58
|
+
// getCustomHasher so they don't have to re-walk the graph per call.
|
|
59
|
+
this.projects = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(this.projectGraph).projects;
|
|
60
|
+
this.forkedProcessTaskRunner = new forked_process_task_runner_1.ForkedProcessTaskRunner(this.options, this.tuiEnabled);
|
|
61
|
+
this.runningTasksService = !native_1.IS_WASM
|
|
62
|
+
? new native_1.RunningTasksService((0, db_connection_1.getLocalDbConnection)())
|
|
63
|
+
: null;
|
|
64
|
+
this.tasksSchedule = new tasks_schedule_1.TasksSchedule(this.projectGraph, this.projects, this.taskGraph, this.options);
|
|
65
|
+
// region internal state
|
|
66
|
+
this.batchEnv = (0, task_env_1.getEnvVariablesForBatchProcess)(this.options.skipNxCache, this.options.captureStderr);
|
|
67
|
+
this.reverseTaskDeps = (0, utils_1.calculateReverseDeps)(this.taskGraph);
|
|
68
|
+
// `nx:noop` initiating tasks exit instantly via the fast-path in
|
|
69
|
+
// `spawnProcess`. If we treat the noop itself as the keep-alive anchor for
|
|
70
|
+
// its continuous dependencies, `cleanUpUnneededContinuousTasks` kills those
|
|
71
|
+
// children the moment the noop finishes. Expand through noops so the
|
|
72
|
+
// underlying real tasks become the anchors.
|
|
73
|
+
this.initializingTaskIds = (0, utils_1.expandInitiatingTasksThroughNoop)(this.initiatingTasks, this.taskGraph, this.projectGraph);
|
|
74
|
+
this.processedTasks = new Map();
|
|
75
|
+
this.completedTasks = new Map();
|
|
76
|
+
this.waitingForTasks = [];
|
|
77
|
+
this.pendingDiscreteWorkers = new Set();
|
|
78
|
+
this.groups = [];
|
|
79
|
+
this.continuousTasksStarted = 0;
|
|
80
|
+
this.bailed = false;
|
|
81
|
+
this.resolveStopPromise = null;
|
|
82
|
+
this.stopRequested = false;
|
|
83
|
+
this.runningContinuousTasks = new Map();
|
|
84
|
+
this.runningRunCommandsTasks = new Map();
|
|
85
|
+
this.runningDiscreteTasks = new Map();
|
|
86
|
+
this.discreteTaskExitHandled = new Map();
|
|
87
|
+
this.continuousTaskExitHandled = new Map();
|
|
88
|
+
this.cleanupPromise = null;
|
|
89
|
+
}
|
|
90
|
+
async init() {
|
|
91
|
+
this.setupSignalHandlers();
|
|
92
|
+
// Init the ForkedProcessTaskRunner, TasksSchedule, and Cache
|
|
93
|
+
await Promise.all([
|
|
94
|
+
this.forkedProcessTaskRunner.init(),
|
|
95
|
+
this.tasksSchedule.init().then(() => {
|
|
96
|
+
return this.tasksSchedule.scheduleNextTasks();
|
|
97
|
+
}),
|
|
98
|
+
'init' in this.cache ? this.cache.init() : null,
|
|
99
|
+
]);
|
|
100
|
+
// Pass estimated timings to TUI after TasksSchedule is initialized
|
|
101
|
+
if (this.tuiEnabled) {
|
|
102
|
+
const estimatedTimings = this.tasksSchedule.getEstimatedTaskTimings();
|
|
103
|
+
this.options.lifeCycle.setEstimatedTaskTimings(estimatedTimings);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
async run() {
|
|
107
|
+
await this.init();
|
|
108
|
+
perf_hooks_1.performance.mark('task-execution:start');
|
|
109
|
+
const { discrete, continuous, total } = getThreadPoolSize(this.options, this.taskGraph);
|
|
110
|
+
process.stdout.setMaxListeners(total + events_1.defaultMaxListeners);
|
|
111
|
+
process.stderr.setMaxListeners(total + events_1.defaultMaxListeners);
|
|
112
|
+
process.setMaxListeners(total + events_1.defaultMaxListeners);
|
|
113
|
+
const doNotSkipCache = this.options.skipNxCache === false ||
|
|
114
|
+
this.options.skipNxCache === undefined;
|
|
115
|
+
// Start continuous task loops (these run independently)
|
|
116
|
+
const continuousLoops = [];
|
|
117
|
+
for (let i = 0; i < continuous; ++i) {
|
|
118
|
+
continuousLoops.push(this.executeContinuousTaskLoop(continuous));
|
|
119
|
+
}
|
|
120
|
+
// Set up forced shutdown handler
|
|
121
|
+
const shutdownPromise = this.tuiEnabled
|
|
122
|
+
? new Promise((resolve) => {
|
|
123
|
+
this.options.lifeCycle.registerForcedShutdownCallback(() => {
|
|
124
|
+
this.stopRequested = true;
|
|
125
|
+
resolve(undefined);
|
|
126
|
+
});
|
|
127
|
+
})
|
|
128
|
+
: new Promise((resolve) => {
|
|
129
|
+
this.resolveStopPromise = resolve;
|
|
130
|
+
});
|
|
131
|
+
const coordinatorLoop = this.executeCoordinatorLoop(doNotSkipCache, discrete);
|
|
132
|
+
await Promise.race([
|
|
133
|
+
Promise.all([coordinatorLoop, ...continuousLoops]),
|
|
134
|
+
shutdownPromise,
|
|
135
|
+
]);
|
|
136
|
+
perf_hooks_1.performance.mark('task-execution:end');
|
|
137
|
+
perf_hooks_1.performance.measure('task-execution', 'task-execution:start', 'task-execution:end');
|
|
138
|
+
if (!this.stopRequested) {
|
|
139
|
+
this.cache.removeOldCacheRecords();
|
|
140
|
+
}
|
|
141
|
+
await this.cleanup();
|
|
142
|
+
// Public API (defaultTasksRunner) returns a plain object keyed by
|
|
143
|
+
// task id. Internal state is a Map for faster lookup.
|
|
144
|
+
return Object.fromEntries(this.completedTasks);
|
|
145
|
+
}
|
|
146
|
+
nextBatch() {
|
|
147
|
+
return this.tasksSchedule.nextBatch();
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Coordinator loop. All batch operations (hashing, cache resolution)
|
|
151
|
+
* happen on this single thread — no races. Cache misses are dispatched
|
|
152
|
+
* as fire-and-forget workers. Workers signal completion via
|
|
153
|
+
* scheduleNextTasksAndReleaseThreads which wakes all waiting loops.
|
|
154
|
+
*
|
|
155
|
+
* Safety: the dispatch phase (step 5) is fully synchronous — no
|
|
156
|
+
* worker can run during it. So all tasks picked up by nextTask()
|
|
157
|
+
* are guaranteed to be in processedTasks from step 1.
|
|
158
|
+
*/
|
|
159
|
+
async executeCoordinatorLoop(doNotSkipCache, parallelism) {
|
|
160
|
+
while (true) {
|
|
161
|
+
if (this.bailed || this.stopRequested)
|
|
162
|
+
break;
|
|
163
|
+
// 1. Hash BEFORE processAll so processTask sees hashes set, and so
|
|
164
|
+
// resolveCachedTasksBulk can look them up in the cache. Each task
|
|
165
|
+
// is hashed with its own task-specific env (project/target .env
|
|
166
|
+
// files, custom hasher env reads) — the shared batchEnv would
|
|
167
|
+
// compute a different cache key than the single-task path and
|
|
168
|
+
// risk stale cache reuse after env changes.
|
|
169
|
+
{
|
|
170
|
+
const { scheduledTasks } = this.tasksSchedule.getAllScheduledTasks();
|
|
171
|
+
const unhashed = scheduledTasks
|
|
172
|
+
.map((id) => this.taskGraph.tasks[id])
|
|
173
|
+
.filter((t) => !t.hash &&
|
|
174
|
+
this.taskGraph.dependencies[t.id].every((depId) => this.completedTasks.has(depId)));
|
|
175
|
+
if (unhashed.length > 0) {
|
|
176
|
+
const perTaskEnvs = {};
|
|
177
|
+
for (const task of unhashed) {
|
|
178
|
+
perTaskEnvs[task.id] = (0, task_env_1.getTaskSpecificEnv)(task, this.projectGraph);
|
|
179
|
+
}
|
|
180
|
+
await (0, hash_task_1.hashTasks)(this.hasher, this.projectGraph, this.taskGraphForHashing, perTaskEnvs, this.taskDetails, unhashed);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// 2. Bulk-resolve cache hits before processTask — avoids N
|
|
184
|
+
// lifecycle calls for tasks that will be resolved from cache.
|
|
185
|
+
if (doNotSkipCache) {
|
|
186
|
+
const resolved = await this.resolveCachedTasksBulk();
|
|
187
|
+
if (resolved)
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
// 3. Process remaining scheduled tasks (cache misses + non-cacheable).
|
|
191
|
+
this.processAllScheduledTasks();
|
|
192
|
+
// 4. Handle batch executors
|
|
193
|
+
const batch = this.nextBatch();
|
|
194
|
+
if (batch) {
|
|
195
|
+
const groupId = this.closeGroup();
|
|
196
|
+
await this.applyFromCacheOrRunBatch(doNotSkipCache, batch, groupId);
|
|
197
|
+
this.openGroup(groupId);
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
// 5. Dispatch cache misses as individual workers
|
|
201
|
+
while (this.pendingDiscreteWorkers.size < parallelism) {
|
|
202
|
+
const task = this.tasksSchedule.nextTask((t) => !t.continuous);
|
|
203
|
+
if (!task)
|
|
204
|
+
break;
|
|
205
|
+
const groupId = this.closeGroup();
|
|
206
|
+
this.dispatchDiscreteWorker(doNotSkipCache, task, groupId);
|
|
207
|
+
}
|
|
208
|
+
// 6. Nothing left to dispatch and nothing in flight — done.
|
|
209
|
+
if (!this.tasksSchedule.hasTasks() &&
|
|
210
|
+
this.pendingDiscreteWorkers.size === 0) {
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
// 7. Wait for a worker to finish (woken by scheduleNextTasksAndReleaseThreads)
|
|
214
|
+
await new Promise((res) => this.waitingForTasks.push(res));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
async executeContinuousTaskLoop(continuousTaskCount) {
|
|
218
|
+
while (true) {
|
|
219
|
+
// completed all the tasks
|
|
220
|
+
if (!this.tasksSchedule.hasTasks() || this.bailed || this.stopRequested) {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
this.processAllScheduledTasks();
|
|
224
|
+
const task = this.tasksSchedule.nextTask((t) => t.continuous);
|
|
225
|
+
if (task) {
|
|
226
|
+
// Use a separate groupId space (parallel..parallel+N) so continuous tasks
|
|
227
|
+
// don't consume discrete group slots
|
|
228
|
+
const groupId = this.options.parallel + this.continuousTasksStarted++;
|
|
229
|
+
const runningTask = await this.startContinuousTask(task, groupId);
|
|
230
|
+
if (this.initializingTaskIds.has(task.id)) {
|
|
231
|
+
await this.continuousTaskExitHandled.get(task.id);
|
|
232
|
+
}
|
|
233
|
+
// all continuous tasks have been started, thread can exit
|
|
234
|
+
if (this.continuousTasksStarted >= continuousTaskCount) {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
// all continuous tasks have been started, thread can exit
|
|
240
|
+
if (this.continuousTasksStarted >= continuousTaskCount) {
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
243
|
+
// block until some other task completes, then try again
|
|
244
|
+
await new Promise((res) => this.waitingForTasks.push(res));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
// region Processing Scheduled Tasks
|
|
248
|
+
async processTask(taskId) {
|
|
249
|
+
const task = this.taskGraph.tasks[taskId];
|
|
250
|
+
const taskSpecificEnv = (0, task_env_1.getTaskSpecificEnv)(task, this.projectGraph);
|
|
251
|
+
if (!task.hash) {
|
|
252
|
+
await (0, hash_task_1.hashTask)(this.hasher, this.projectGraph, this.taskGraphForHashing, task, taskSpecificEnv, this.taskDetails);
|
|
253
|
+
}
|
|
254
|
+
await this.options.lifeCycle.scheduleTask(task);
|
|
255
|
+
return taskSpecificEnv;
|
|
256
|
+
}
|
|
257
|
+
processAllScheduledTasks() {
|
|
258
|
+
const { scheduledTasks } = this.tasksSchedule.getAllScheduledTasks();
|
|
259
|
+
for (const taskId of scheduledTasks) {
|
|
260
|
+
// Task is already handled or being handled
|
|
261
|
+
if (!this.processedTasks.has(taskId)) {
|
|
262
|
+
this.processedTasks.set(taskId, this.processTask(taskId));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// endregion Processing Scheduled Tasks
|
|
267
|
+
// region Applying Cache
|
|
268
|
+
async applyCachedResults(tasks) {
|
|
269
|
+
const cacheableTasks = tasks.filter((t) => (0, utils_1.isCacheableTask)(t, this.options));
|
|
270
|
+
if (cacheableTasks.length === 0)
|
|
271
|
+
return [];
|
|
272
|
+
const cacheHits = await this.fetchCacheHits(cacheableTasks);
|
|
273
|
+
if (cacheHits.length === 0)
|
|
274
|
+
return [];
|
|
275
|
+
return this.finalizeCacheHits(cacheHits);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Batch cache lookup + filter to successful entries. Handles both
|
|
279
|
+
* local (one rarray SQL call) and remote (parallel HTTP retrievals)
|
|
280
|
+
* inside DbCache.getBatch.
|
|
281
|
+
*/
|
|
282
|
+
async fetchCacheHits(tasks) {
|
|
283
|
+
const batchResults = await this.cache.getBatch(tasks);
|
|
284
|
+
const cacheHits = [];
|
|
285
|
+
for (const task of tasks) {
|
|
286
|
+
const cachedResult = batchResults.get(task.hash);
|
|
287
|
+
if (cachedResult && cachedResult.code === 0) {
|
|
288
|
+
cacheHits.push({ task, cachedResult });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return cacheHits;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* For each confirmed cache hit: decide whether to copy outputs from
|
|
295
|
+
* the cache (skipping if the on-disk outputs already match the
|
|
296
|
+
* recorded hash), copy in parallel, derive the task status, print
|
|
297
|
+
* terminal output, and return the assembled results.
|
|
298
|
+
*/
|
|
299
|
+
async finalizeCacheHits(cacheHits) {
|
|
300
|
+
// Batch-check which tasks need outputs copied from cache. Remote
|
|
301
|
+
// cache entries come pre-restored to their output dirs when the
|
|
302
|
+
// db cache is on, so we only check ones that aren't.
|
|
303
|
+
const usingDbCache = (0, cache_1.dbCacheEnabled)();
|
|
304
|
+
const tasksNeedingOutputCheck = cacheHits.filter(({ task, cachedResult }) => task.outputs.length > 0 && (!cachedResult.remote || !usingDbCache));
|
|
305
|
+
const shouldCopyMap = await this.shouldCopyOutputsFromCacheBatch(tasksNeedingOutputCheck.map(({ task }) => ({
|
|
306
|
+
outputs: task.outputs,
|
|
307
|
+
hash: task.hash,
|
|
308
|
+
})));
|
|
309
|
+
// Copy outputs in parallel for tasks that need it.
|
|
310
|
+
await Promise.all(cacheHits.map(async ({ task, cachedResult }) => {
|
|
311
|
+
if (shouldCopyMap.get(task.hash)) {
|
|
312
|
+
await this.cache.copyFilesFromCache(task.hash, cachedResult, task.outputs);
|
|
313
|
+
}
|
|
314
|
+
}));
|
|
315
|
+
// Derive status, print terminal output, build results.
|
|
316
|
+
const results = [];
|
|
317
|
+
for (const { task, cachedResult } of cacheHits) {
|
|
318
|
+
const shouldCopy = shouldCopyMap.get(task.hash) ?? false;
|
|
319
|
+
const status = cachedResult.remote
|
|
320
|
+
? 'remote-cache'
|
|
321
|
+
: shouldCopy
|
|
322
|
+
? 'local-cache'
|
|
323
|
+
: 'local-cache-kept-existing';
|
|
324
|
+
this.options.lifeCycle.printTaskTerminalOutput(task, status, cachedResult.terminalOutput);
|
|
325
|
+
results.push({
|
|
326
|
+
task,
|
|
327
|
+
code: cachedResult.code,
|
|
328
|
+
status,
|
|
329
|
+
terminalOutput: cachedResult.terminalOutput,
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
return results;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Coordinator wrapper around {@link resolveCachedTasks}: peeks at
|
|
336
|
+
* scheduledTasks (without removing anything from the schedule),
|
|
337
|
+
* filters to cacheable hashed discrete candidates, and delegates the
|
|
338
|
+
* cache fetch + lifecycle to the public method. Returns true if any
|
|
339
|
+
* tasks were resolved.
|
|
340
|
+
*
|
|
341
|
+
* The coordinator relies on this running unconditionally (when cache
|
|
342
|
+
* is enabled): tasks dispatched in step 5 via runTaskDirectly skip
|
|
343
|
+
* their own cache lookup on the assumption that this has already
|
|
344
|
+
* confirmed them as misses. Don't add length-based bails.
|
|
345
|
+
*/
|
|
346
|
+
async resolveCachedTasksBulk() {
|
|
347
|
+
const { scheduledTasks } = this.tasksSchedule.getAllScheduledTasks();
|
|
348
|
+
const candidates = [];
|
|
349
|
+
for (const id of scheduledTasks) {
|
|
350
|
+
const task = this.taskGraph.tasks[id];
|
|
351
|
+
if (task.hash &&
|
|
352
|
+
!task.continuous &&
|
|
353
|
+
(0, utils_1.isCacheableTask)(task, this.options)) {
|
|
354
|
+
candidates.push(task);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
if (candidates.length === 0)
|
|
358
|
+
return false;
|
|
359
|
+
// postRunSteps → complete() → tasksSchedule.complete() will filter
|
|
360
|
+
// resolved hits out of scheduledTasks before we return, so there's
|
|
361
|
+
// no need to mutate the schedule here.
|
|
362
|
+
const groupId = this.closeGroup();
|
|
363
|
+
try {
|
|
364
|
+
const results = await this.resolveCachedTasks(true, candidates, groupId);
|
|
365
|
+
return results.length > 0;
|
|
366
|
+
}
|
|
367
|
+
finally {
|
|
368
|
+
this.openGroup(groupId);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
// endregion Applying Cache
|
|
372
|
+
// region Batch
|
|
373
|
+
/**
|
|
374
|
+
* Hash all batch tasks and resolve cache hits topologically.
|
|
375
|
+
*
|
|
376
|
+
* Walks the task graph level by level. Every task gets a preliminary hash
|
|
377
|
+
* (so startTasks always has a valid hash for Cloud). Tasks with depsOutputs
|
|
378
|
+
* whose deps weren't cached are ineligible for cache lookup but still
|
|
379
|
+
* receive a preliminary hash — they'll be re-hashed after execution.
|
|
380
|
+
*/
|
|
381
|
+
async applyBatchCachedResults(batch, doNotSkipCache, groupId) {
|
|
382
|
+
const cachedResults = [];
|
|
383
|
+
const needsRehashAfterExecution = new Set();
|
|
384
|
+
const tasks = Object.values(batch.taskGraph.tasks);
|
|
385
|
+
if (!doNotSkipCache) {
|
|
386
|
+
// Cache skipped — just hash so startTasks has valid hashes
|
|
387
|
+
await this.hashBatchTasks(tasks);
|
|
388
|
+
return { cachedResults, needsRehashAfterExecution };
|
|
389
|
+
}
|
|
390
|
+
const nonCachedTaskIds = new Set();
|
|
391
|
+
await (0, task_graph_utils_1.walkTaskGraph)(batch.taskGraph, async (rootTaskIds) => {
|
|
392
|
+
const rootTasks = rootTaskIds.map((id) => batch.taskGraph.tasks[id]);
|
|
393
|
+
await this.hashBatchTasks(rootTasks);
|
|
394
|
+
const eligible = [];
|
|
395
|
+
for (const task of rootTasks) {
|
|
396
|
+
const depIds = batch.taskGraph.dependencies[task.id];
|
|
397
|
+
const hasNonCachedDep = depIds.some((id) => nonCachedTaskIds.has(id));
|
|
398
|
+
if (hasNonCachedDep &&
|
|
399
|
+
(0, task_hasher_1.getInputs)(task, this.projectGraph, this.nxJson).depsOutputs.length > 0) {
|
|
400
|
+
nonCachedTaskIds.add(task.id);
|
|
401
|
+
needsRehashAfterExecution.add(task.id);
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
eligible.push(task);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
if (eligible.length > 0) {
|
|
408
|
+
const cacheResults = await this.applyCachedResults(eligible);
|
|
409
|
+
const cachedIds = new Set(cacheResults.map((r) => r.task.id));
|
|
410
|
+
cachedResults.push(...cacheResults);
|
|
411
|
+
if (cacheResults.length > 0) {
|
|
412
|
+
const cachedTasks = cacheResults.map((r) => r.task);
|
|
413
|
+
await Promise.all(cachedTasks.map((task) => this.options.lifeCycle.scheduleTask(task)));
|
|
414
|
+
await this.preRunSteps(cachedTasks, { groupId });
|
|
415
|
+
await this.postRunSteps(cacheResults, doNotSkipCache, { groupId });
|
|
416
|
+
}
|
|
417
|
+
for (const task of eligible) {
|
|
418
|
+
if (!cachedIds.has(task.id)) {
|
|
419
|
+
nonCachedTaskIds.add(task.id);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
return { cachedResults, needsRehashAfterExecution };
|
|
425
|
+
}
|
|
426
|
+
async hashBatchTasks(tasks) {
|
|
427
|
+
// Batch executors run every task in the same forked process, but
|
|
428
|
+
// each task still has its own .env files / custom-hasher env — use
|
|
429
|
+
// task-specific env for hashing so the cache key matches the
|
|
430
|
+
// single-task path.
|
|
431
|
+
const perTaskEnvs = {};
|
|
432
|
+
for (const task of tasks) {
|
|
433
|
+
perTaskEnvs[task.id] = (0, task_env_1.getTaskSpecificEnv)(task, this.projectGraph);
|
|
434
|
+
}
|
|
435
|
+
await (0, hash_task_1.hashTasks)(this.hasher, this.projectGraph, this.taskGraphForHashing, perTaskEnvs, this.taskDetails, tasks);
|
|
436
|
+
}
|
|
437
|
+
async applyFromCacheOrRunBatch(doNotSkipCache, batch, groupId) {
|
|
438
|
+
const applyFromCacheOrRunBatchStart = perf_hooks_1.performance.mark('TaskOrchestrator-apply-from-cache-or-run-batch:start');
|
|
439
|
+
const taskEntries = Object.entries(batch.taskGraph.tasks);
|
|
440
|
+
const tasks = taskEntries.map(([, task]) => task);
|
|
441
|
+
this.options.lifeCycle.registerRunningBatch?.(batch.id, {
|
|
442
|
+
executorName: batch.executorName,
|
|
443
|
+
taskIds: Object.keys(batch.taskGraph.tasks),
|
|
444
|
+
});
|
|
445
|
+
const { cachedResults, needsRehashAfterExecution } = await this.applyBatchCachedResults(batch, doNotSkipCache, groupId);
|
|
446
|
+
// Schedule and start non-cached tasks (cached tasks were already
|
|
447
|
+
// started and completed inside applyBatchCachedResults)
|
|
448
|
+
const cachedTaskIds = new Set(cachedResults.map((r) => r.task.id));
|
|
449
|
+
const nonCachedTasks = tasks.filter((t) => !cachedTaskIds.has(t.id));
|
|
450
|
+
if (nonCachedTasks.length > 0) {
|
|
451
|
+
await Promise.all(nonCachedTasks.map((task) => this.options.lifeCycle.scheduleTask(task)));
|
|
452
|
+
await this.preRunSteps(nonCachedTasks, { groupId });
|
|
453
|
+
}
|
|
454
|
+
// Phase 2: Run non-cached tasks, then re-hash depsOutputs tasks
|
|
455
|
+
const taskIdsToSkip = cachedResults.map((r) => r.task.id);
|
|
456
|
+
let batchResults = [];
|
|
457
|
+
if (taskIdsToSkip.length < tasks.length) {
|
|
458
|
+
const runGraph = (0, utils_1.removeTasksFromTaskGraph)(batch.taskGraph, taskIdsToSkip);
|
|
459
|
+
batchResults = await this.runBatch({
|
|
460
|
+
id: batch.id,
|
|
461
|
+
executorName: batch.executorName,
|
|
462
|
+
taskGraph: runGraph,
|
|
463
|
+
}, this.batchEnv, groupId);
|
|
464
|
+
// Re-hash depsOutputs tasks — their dep outputs are now on disk
|
|
465
|
+
const tasksToRehash = batchResults
|
|
466
|
+
.filter((r) => needsRehashAfterExecution.has(r.task.id) &&
|
|
467
|
+
(r.status === 'success' || r.status === 'failure'))
|
|
468
|
+
.map((r) => r.task);
|
|
469
|
+
if (tasksToRehash.length > 0) {
|
|
470
|
+
await this.hashBatchTasks(tasksToRehash);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
if (batchResults.length > 0) {
|
|
474
|
+
await this.postRunSteps(batchResults, doNotSkipCache, { groupId });
|
|
475
|
+
}
|
|
476
|
+
// Update batch status based on all task results
|
|
477
|
+
const hasFailures = taskEntries.some(([taskId]) => {
|
|
478
|
+
const status = this.completedTasks.get(taskId);
|
|
479
|
+
return status === 'failure' || status === 'skipped';
|
|
480
|
+
});
|
|
481
|
+
this.options.lifeCycle.setBatchStatus?.(batch.id, hasFailures ? "Failure" /* BatchStatus.Failure */ : "Success" /* BatchStatus.Success */);
|
|
482
|
+
this.forkedProcessTaskRunner.cleanUpBatchProcesses();
|
|
483
|
+
const tasksCompleted = taskEntries.filter(([taskId]) => this.completedTasks.has(taskId));
|
|
484
|
+
// Batch is still not done, run it again
|
|
485
|
+
if (tasksCompleted.length !== taskEntries.length) {
|
|
486
|
+
await this.applyFromCacheOrRunBatch(doNotSkipCache, {
|
|
487
|
+
id: batch.id,
|
|
488
|
+
executorName: batch.executorName,
|
|
489
|
+
taskGraph: (0, utils_1.removeTasksFromTaskGraph)(batch.taskGraph, tasksCompleted.map(([taskId]) => taskId)),
|
|
490
|
+
}, groupId);
|
|
491
|
+
}
|
|
492
|
+
// Batch is done, mark it as completed
|
|
493
|
+
const applyFromCacheOrRunBatchEnd = perf_hooks_1.performance.mark('TaskOrchestrator-apply-from-cache-or-run-batch:end');
|
|
494
|
+
perf_hooks_1.performance.measure('TaskOrchestrator-apply-from-cache-or-run-batch', applyFromCacheOrRunBatchStart.name, applyFromCacheOrRunBatchEnd.name);
|
|
495
|
+
return [...cachedResults, ...batchResults];
|
|
496
|
+
}
|
|
497
|
+
async runBatch(batch, env, groupId) {
|
|
498
|
+
const runBatchStart = perf_hooks_1.performance.mark('TaskOrchestrator-run-batch:start');
|
|
499
|
+
try {
|
|
500
|
+
const batchProcess = await this.forkedProcessTaskRunner.forkProcessForBatch(batch, this.projectGraph, this.taskGraph, env);
|
|
501
|
+
// Stream output from batch process to the batch
|
|
502
|
+
batchProcess.onOutput((output) => {
|
|
503
|
+
this.options.lifeCycle.appendBatchOutput?.(batch.id, output);
|
|
504
|
+
});
|
|
505
|
+
// Stream task results as they complete
|
|
506
|
+
// Heavy operations (caching, scheduling, complete) happen at batch-end in postRunSteps
|
|
507
|
+
batchProcess.onTaskResults((taskId, result) => {
|
|
508
|
+
const task = this.taskGraph.tasks[taskId];
|
|
509
|
+
const status = resolveBatchTaskStatus(result);
|
|
510
|
+
// Append before print so printTaskTerminalOutput finds the PTY already
|
|
511
|
+
// populated and no-ops; reversing the order writes terminalOutput twice.
|
|
512
|
+
if (result.terminalOutput) {
|
|
513
|
+
this.options.lifeCycle.appendTaskOutput(taskId, result.terminalOutput, false);
|
|
514
|
+
}
|
|
515
|
+
// Skipped tasks didn't run, so they have no terminal output and don't
|
|
516
|
+
// need a per-task PTY — calling printTaskTerminalOutput would otherwise
|
|
517
|
+
// allocate one just to write a cursor-hide escape.
|
|
518
|
+
if (status !== 'skipped') {
|
|
519
|
+
this.options.lifeCycle.printTaskTerminalOutput(task, status, result.terminalOutput ?? '');
|
|
520
|
+
}
|
|
521
|
+
task.startTime = result.startTime;
|
|
522
|
+
task.endTime = result.endTime;
|
|
523
|
+
if (result.startTime && result.endTime) {
|
|
524
|
+
this.options.lifeCycle.setTaskTiming?.(taskId, result.startTime, result.endTime);
|
|
525
|
+
}
|
|
526
|
+
this.options.lifeCycle.setTaskStatus(taskId, (0, native_1.parseTaskStatus)(status));
|
|
527
|
+
});
|
|
528
|
+
const results = await batchProcess.getResults();
|
|
529
|
+
const batchResultEntries = Object.entries(results);
|
|
530
|
+
return batchResultEntries.map(([taskId, result]) => {
|
|
531
|
+
const task = this.taskGraph.tasks[taskId];
|
|
532
|
+
task.startTime = result.startTime;
|
|
533
|
+
task.endTime = result.endTime;
|
|
534
|
+
const status = resolveBatchTaskStatus(result);
|
|
535
|
+
return {
|
|
536
|
+
code: status === 'success' ? 0 : 1,
|
|
537
|
+
task,
|
|
538
|
+
status,
|
|
539
|
+
terminalOutput: result.terminalOutput,
|
|
540
|
+
};
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
catch (e) {
|
|
544
|
+
const isBatchStopping = this.stopRequested;
|
|
545
|
+
return Object.keys(batch.taskGraph.tasks).map((taskId) => {
|
|
546
|
+
const task = this.taskGraph.tasks[taskId];
|
|
547
|
+
if (isBatchStopping) {
|
|
548
|
+
task.endTime = Date.now();
|
|
549
|
+
}
|
|
550
|
+
return {
|
|
551
|
+
task,
|
|
552
|
+
code: 1,
|
|
553
|
+
status: (isBatchStopping ? 'stopped' : 'failure'),
|
|
554
|
+
terminalOutput: isBatchStopping ? '' : (e.stack ?? e.message ?? ''),
|
|
555
|
+
};
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
finally {
|
|
559
|
+
const runBatchEnd = perf_hooks_1.performance.mark('TaskOrchestrator-run-batch:end');
|
|
560
|
+
perf_hooks_1.performance.measure('TaskOrchestrator-run-batch', runBatchStart.name, runBatchEnd.name);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
// endregion Batch
|
|
564
|
+
// region Single Task
|
|
565
|
+
/**
|
|
566
|
+
* Bulk-resolve cache hits for a set of tasks: fetch cached entries,
|
|
567
|
+
* copy outputs as needed, fire lifecycle, and return the TaskResults
|
|
568
|
+
* for the hits. Tasks that aren't in the cache (or aren't cacheable)
|
|
569
|
+
* are silently omitted from the return value — callers are responsible
|
|
570
|
+
* for running those via {@link runTaskDirectly}.
|
|
571
|
+
*
|
|
572
|
+
* Fires scheduleTask lifecycle for hits that haven't been through
|
|
573
|
+
* processAllScheduledTasks yet. That's a coordinator gap-filler and
|
|
574
|
+
* a no-op for callers that pre-process the schedule.
|
|
575
|
+
*
|
|
576
|
+
* The caller provides `groupId` — cache hits share one slot since they
|
|
577
|
+
* don't actually compete for parallelism.
|
|
578
|
+
*/
|
|
579
|
+
async resolveCachedTasks(doNotSkipCache, tasks, groupId) {
|
|
580
|
+
if (!doNotSkipCache || tasks.length === 0)
|
|
581
|
+
return [];
|
|
582
|
+
const cacheableTasks = tasks.filter((t) => (0, utils_1.isCacheableTask)(t, this.options));
|
|
583
|
+
if (cacheableTasks.length === 0)
|
|
584
|
+
return [];
|
|
585
|
+
// Wait for any queued processTask promises to settle so task.hash is
|
|
586
|
+
// populated before cache.getBatch maps it into a Rust String.
|
|
587
|
+
await Promise.all(cacheableTasks.map((t) => this.processedTasks.get(t.id)));
|
|
588
|
+
const cacheHits = await this.fetchCacheHits(cacheableTasks);
|
|
589
|
+
if (cacheHits.length === 0)
|
|
590
|
+
return [];
|
|
591
|
+
// scheduleTask lifecycle for hits the coordinator resolved before
|
|
592
|
+
// processAllScheduledTasks could fire it. No-op for callers that
|
|
593
|
+
// already ran processAllScheduledTasks (every hit is in processedTasks).
|
|
594
|
+
await Promise.all(cacheHits
|
|
595
|
+
.filter(({ task }) => !this.processedTasks.has(task.id))
|
|
596
|
+
.map(({ task }) => this.options.lifeCycle.scheduleTask(task)));
|
|
597
|
+
const hitTasks = cacheHits.map((h) => h.task);
|
|
598
|
+
await this.preRunSteps(hitTasks, { groupId });
|
|
599
|
+
const results = await this.finalizeCacheHits(cacheHits);
|
|
600
|
+
await this.postRunSteps(results, doNotSkipCache, { groupId });
|
|
601
|
+
return results;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Fire a discrete-task worker and track it in pendingDiscreteWorkers until
|
|
605
|
+
* it settles. Uses runTaskDirectly (not applyFromCacheOrRun*) because
|
|
606
|
+
* resolveCachedTasksBulk already confirmed this task is a cache miss —
|
|
607
|
+
* another lookup would re-query the DB and (for Nx Cloud users) repeat
|
|
608
|
+
* the remote HTTP retrieval.
|
|
609
|
+
*/
|
|
610
|
+
dispatchDiscreteWorker(doNotSkipCache, task, groupId) {
|
|
611
|
+
const worker = this.runTaskDirectly(doNotSkipCache, task, groupId)
|
|
612
|
+
.catch((e) => this.handleDiscreteWorkerFailure(doNotSkipCache, task, groupId, e))
|
|
613
|
+
.finally(() => {
|
|
614
|
+
this.openGroup(groupId);
|
|
615
|
+
this.pendingDiscreteWorkers.delete(worker);
|
|
616
|
+
// Wake coordinator — the delete above may satisfy the exit condition
|
|
617
|
+
// (pendingDiscreteWorkers.size === 0) that was missed when
|
|
618
|
+
// scheduleNextTasksAndReleaseThreads fired earlier.
|
|
619
|
+
this.waitingForTasks.forEach((f) => f(null));
|
|
620
|
+
this.waitingForTasks.length = 0;
|
|
621
|
+
});
|
|
622
|
+
this.pendingDiscreteWorkers.add(worker);
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Route a worker rejection (e.g. remote cache errors) through the normal
|
|
626
|
+
* failure path instead of letting it become an unhandled promise. Guard
|
|
627
|
+
* against double-finalize: completeTasks() populates `completedTasks`,
|
|
628
|
+
* so a rejection arriving after postRunSteps has already finalized the
|
|
629
|
+
* task must not run postRunSteps again.
|
|
630
|
+
*/
|
|
631
|
+
async handleDiscreteWorkerFailure(doNotSkipCache, task, groupId, e) {
|
|
632
|
+
if (this.completedTasks.has(task.id))
|
|
633
|
+
return;
|
|
634
|
+
const terminalOutput = e?.message ?? '';
|
|
635
|
+
this.options.lifeCycle.printTaskTerminalOutput(task, 'failure', terminalOutput);
|
|
636
|
+
await this.postRunSteps([{ task, status: 'failure', terminalOutput }], doNotSkipCache, { groupId });
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Spawn and wait on a task's child process, unconditionally — no cache
|
|
640
|
+
* lookup. Callers must have already confirmed the task is a cache miss
|
|
641
|
+
* (or disabled caching entirely).
|
|
642
|
+
*/
|
|
643
|
+
async runTaskDirectly(doNotSkipCache, task, groupId) {
|
|
644
|
+
// Wait for task to be processed
|
|
645
|
+
const taskSpecificEnv = await this.processedTasks.get(task.id);
|
|
646
|
+
await this.preRunSteps([task], { groupId });
|
|
647
|
+
const pipeOutput = await this.pipeOutputCapture(task);
|
|
648
|
+
const temporaryOutputPath = this.cache.temporaryOutputPath(task);
|
|
649
|
+
const streamOutput = this.outputStyle === 'static'
|
|
650
|
+
? false
|
|
651
|
+
: (0, utils_1.shouldStreamOutput)(task, this.initiatingProject);
|
|
652
|
+
const env = pipeOutput
|
|
653
|
+
? (0, task_env_1.getEnvVariablesForTask)(task, taskSpecificEnv, process.env.FORCE_COLOR === undefined
|
|
654
|
+
? 'true'
|
|
655
|
+
: process.env.FORCE_COLOR, this.options.skipNxCache, this.options.captureStderr, null, null)
|
|
656
|
+
: (0, task_env_1.getEnvVariablesForTask)(task, taskSpecificEnv, undefined, this.options.skipNxCache, this.options.captureStderr, temporaryOutputPath, streamOutput);
|
|
657
|
+
let resolveDiscreteExit;
|
|
658
|
+
const discreteExitHandled = new Promise((r) => (resolveDiscreteExit = r));
|
|
659
|
+
this.discreteTaskExitHandled.set(task.id, discreteExitHandled);
|
|
660
|
+
const childProcess = await this.runTask(task, streamOutput, env, temporaryOutputPath, pipeOutput);
|
|
661
|
+
this.runningDiscreteTasks.set(task.id, {
|
|
662
|
+
runningTask: childProcess,
|
|
663
|
+
stopping: false,
|
|
664
|
+
});
|
|
665
|
+
const { code, terminalOutput } = await childProcess.getResults();
|
|
666
|
+
const isStopping = this.runningDiscreteTasks.get(task.id)?.stopping ?? false;
|
|
667
|
+
this.runningDiscreteTasks.delete(task.id);
|
|
668
|
+
const result = {
|
|
669
|
+
task,
|
|
670
|
+
code,
|
|
671
|
+
status: isStopping ? 'stopped' : code === 0 ? 'success' : 'failure',
|
|
672
|
+
terminalOutput,
|
|
673
|
+
};
|
|
674
|
+
try {
|
|
675
|
+
await this.postRunSteps([result], doNotSkipCache, { groupId });
|
|
676
|
+
}
|
|
677
|
+
finally {
|
|
678
|
+
this.discreteTaskExitHandled.delete(task.id);
|
|
679
|
+
resolveDiscreteExit();
|
|
680
|
+
}
|
|
681
|
+
return result;
|
|
682
|
+
}
|
|
683
|
+
async runTask(task, streamOutput, env, temporaryOutputPath, pipeOutput) {
|
|
684
|
+
const shouldPrefix = streamOutput &&
|
|
685
|
+
process.env.NX_PREFIX_OUTPUT === 'true' &&
|
|
686
|
+
!this.tuiEnabled;
|
|
687
|
+
const targetConfiguration = (0, utils_1.getTargetConfigurationForTask)(task, this.projectGraph);
|
|
688
|
+
if (process.env.NX_RUN_COMMANDS_DIRECTLY !== 'false' &&
|
|
689
|
+
targetConfiguration.executor === 'nx:run-commands') {
|
|
690
|
+
try {
|
|
691
|
+
const { schema } = (0, utils_1.getExecutorForTask)(task, this.projects);
|
|
692
|
+
const combinedOptions = (0, params_1.combineOptionsForExecutor)(task.overrides, task.target.configuration ?? targetConfiguration.defaultConfiguration, targetConfiguration, schema, task.target.project, (0, path_1.relative)(task.projectRoot ?? workspace_root_1.workspaceRoot, process.cwd()), process.env.NX_VERBOSE_LOGGING === 'true');
|
|
693
|
+
if (combinedOptions.env) {
|
|
694
|
+
env = {
|
|
695
|
+
...env,
|
|
696
|
+
...combinedOptions.env,
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
if (streamOutput) {
|
|
700
|
+
const args = (0, utils_1.getPrintableCommandArgsForTask)(task);
|
|
701
|
+
output_1.output.logCommand(args.join(' '));
|
|
702
|
+
}
|
|
703
|
+
const runCommandsOptions = {
|
|
704
|
+
...combinedOptions,
|
|
705
|
+
env,
|
|
706
|
+
usePty: this.tuiEnabled ||
|
|
707
|
+
(!this.tasksSchedule.hasTasks() &&
|
|
708
|
+
this.runningContinuousTasks.size === 0),
|
|
709
|
+
streamOutput: streamOutput && !shouldPrefix,
|
|
710
|
+
};
|
|
711
|
+
const runningTask = await (0, run_commands_impl_1.runCommands)(runCommandsOptions, {
|
|
712
|
+
root: workspace_root_1.workspaceRoot, // only root is needed in runCommands
|
|
713
|
+
}, task.id);
|
|
714
|
+
this.runningRunCommandsTasks.set(task.id, runningTask);
|
|
715
|
+
runningTask.onExit(() => {
|
|
716
|
+
this.runningRunCommandsTasks.delete(task.id);
|
|
717
|
+
});
|
|
718
|
+
if (shouldPrefix) {
|
|
719
|
+
const color = (0, output_prefix_1.getColor)(task.target.project);
|
|
720
|
+
const formattedPrefix = pc.bold(color(`${task.target.project}:`));
|
|
721
|
+
runningTask.onOutput((chunk) => {
|
|
722
|
+
(0, output_prefix_1.writePrefixedLines)(chunk, formattedPrefix);
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
else if (this.tuiEnabled) {
|
|
726
|
+
if (runningTask instanceof pseudo_terminal_1.PseudoTtyProcess) {
|
|
727
|
+
// This is an external of a the pseudo terminal where a task is running and can be passed to the TUI
|
|
728
|
+
this.options.lifeCycle.registerRunningTask(task.id, runningTask.getParserAndWriter());
|
|
729
|
+
runningTask.onOutput((output) => {
|
|
730
|
+
this.options.lifeCycle.appendTaskOutput(task.id, output, true);
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
else {
|
|
734
|
+
this.options.lifeCycle.registerRunningTaskWithEmptyParser(task.id);
|
|
735
|
+
runningTask.onOutput((output) => {
|
|
736
|
+
this.options.lifeCycle.appendTaskOutput(task.id, output, false);
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
if (!streamOutput && !shouldPrefix) {
|
|
741
|
+
// TODO: shouldn't this be checking if the task is continuous before writing anything to disk or calling printTaskTerminalOutput?
|
|
742
|
+
runningTask.onExit((code, terminalOutput) => {
|
|
743
|
+
this.options.lifeCycle.printTaskTerminalOutput(task, code === 0 ? 'success' : 'failure', terminalOutput);
|
|
744
|
+
(0, fs_1.writeFileSync)(temporaryOutputPath, terminalOutput);
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
return runningTask;
|
|
748
|
+
}
|
|
749
|
+
catch (e) {
|
|
750
|
+
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
751
|
+
console.error(e);
|
|
752
|
+
}
|
|
753
|
+
else {
|
|
754
|
+
console.error(e.message);
|
|
755
|
+
}
|
|
756
|
+
const terminalOutput = e.stack ?? e.message ?? '';
|
|
757
|
+
(0, fs_1.writeFileSync)(temporaryOutputPath, terminalOutput);
|
|
758
|
+
return new noop_child_process_1.NoopChildProcess({
|
|
759
|
+
code: 1,
|
|
760
|
+
terminalOutput,
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
else if (targetConfiguration.executor === 'nx:noop') {
|
|
765
|
+
(0, fs_1.writeFileSync)(temporaryOutputPath, '');
|
|
766
|
+
return new noop_child_process_1.NoopChildProcess({
|
|
767
|
+
code: 0,
|
|
768
|
+
terminalOutput: '',
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
// cache prep
|
|
773
|
+
const runningTask = await this.runTaskInForkedProcess(task, env, pipeOutput, temporaryOutputPath, streamOutput);
|
|
774
|
+
if (this.tuiEnabled) {
|
|
775
|
+
if (runningTask instanceof pseudo_terminal_1.PseudoTtyProcess) {
|
|
776
|
+
// This is an external of a the pseudo terminal where a task is running and can be passed to the TUI
|
|
777
|
+
this.options.lifeCycle.registerRunningTask(task.id, runningTask.getParserAndWriter());
|
|
778
|
+
runningTask.onOutput((output) => {
|
|
779
|
+
this.options.lifeCycle.appendTaskOutput(task.id, output, true);
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
else if ('onOutput' in runningTask &&
|
|
783
|
+
typeof runningTask.onOutput === 'function') {
|
|
784
|
+
// Register task that can provide progressive output but isn't interactive (e.g., NodeChildProcessWithNonDirectOutput)
|
|
785
|
+
this.options.lifeCycle.registerRunningTaskWithEmptyParser(task.id);
|
|
786
|
+
runningTask.onOutput((output) => {
|
|
787
|
+
this.options.lifeCycle.appendTaskOutput(task.id, output, false);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
// Fallback for tasks that don't support progressive output
|
|
792
|
+
this.options.lifeCycle.registerRunningTaskWithEmptyParser(task.id);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
return runningTask;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
async runTaskInForkedProcess(task, env, pipeOutput, temporaryOutputPath, streamOutput) {
|
|
799
|
+
try {
|
|
800
|
+
const usePtyFork = process.env.NX_NATIVE_COMMAND_RUNNER !== 'false';
|
|
801
|
+
// Disable the pseudo terminal if this is a run-many or when running a continuous task as part of a run-one
|
|
802
|
+
const disablePseudoTerminal = !this.tuiEnabled && (!this.initiatingProject || task.continuous);
|
|
803
|
+
// execution
|
|
804
|
+
const childProcess = usePtyFork
|
|
805
|
+
? await this.forkedProcessTaskRunner.forkProcess(task, {
|
|
806
|
+
temporaryOutputPath,
|
|
807
|
+
streamOutput,
|
|
808
|
+
pipeOutput,
|
|
809
|
+
taskGraph: this.taskGraph,
|
|
810
|
+
env,
|
|
811
|
+
disablePseudoTerminal,
|
|
812
|
+
})
|
|
813
|
+
: await this.forkedProcessTaskRunner.forkProcessLegacy(task, {
|
|
814
|
+
temporaryOutputPath,
|
|
815
|
+
streamOutput,
|
|
816
|
+
pipeOutput,
|
|
817
|
+
taskGraph: this.taskGraph,
|
|
818
|
+
env,
|
|
819
|
+
});
|
|
820
|
+
return childProcess;
|
|
821
|
+
}
|
|
822
|
+
catch (e) {
|
|
823
|
+
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
824
|
+
console.error(e);
|
|
825
|
+
}
|
|
826
|
+
return new noop_child_process_1.NoopChildProcess({
|
|
827
|
+
code: 1,
|
|
828
|
+
terminalOutput: e.stack ?? e.message ?? '',
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
async startContinuousTask(task, groupId) {
|
|
833
|
+
if (this.runningTasksService &&
|
|
834
|
+
this.runningTasksService.getRunningTasks([task.id]).length) {
|
|
835
|
+
await this.preRunSteps([task], { groupId });
|
|
836
|
+
if (this.tuiEnabled) {
|
|
837
|
+
this.options.lifeCycle.setTaskStatus(task.id, 8 /* NativeTaskStatus.Shared */);
|
|
838
|
+
}
|
|
839
|
+
const runningTask = new shared_running_task_1.SharedRunningTask(this.runningTasksService, task.id);
|
|
840
|
+
this.runningContinuousTasks.set(task.id, {
|
|
841
|
+
runningTask,
|
|
842
|
+
groupId,
|
|
843
|
+
ownsRunningTasksService: false,
|
|
844
|
+
});
|
|
845
|
+
this.continuousTaskExitHandled.set(task.id, new Promise((resolve) => {
|
|
846
|
+
runningTask.onExit(async (code) => {
|
|
847
|
+
await this.handleContinuousTaskExit(code, task, groupId, false);
|
|
848
|
+
resolve();
|
|
849
|
+
});
|
|
850
|
+
}));
|
|
851
|
+
// task is already running by another process, we schedule the next tasks
|
|
852
|
+
// and release the threads
|
|
853
|
+
await this.scheduleNextTasksAndReleaseThreads();
|
|
854
|
+
return runningTask;
|
|
855
|
+
}
|
|
856
|
+
const taskSpecificEnv = await this.processedTasks.get(task.id);
|
|
857
|
+
await this.preRunSteps([task], { groupId });
|
|
858
|
+
const pipeOutput = await this.pipeOutputCapture(task);
|
|
859
|
+
// obtain metadata
|
|
860
|
+
const temporaryOutputPath = this.cache.temporaryOutputPath(task);
|
|
861
|
+
const streamOutput = this.outputStyle === 'static'
|
|
862
|
+
? false
|
|
863
|
+
: (0, utils_1.shouldStreamOutput)(task, this.initiatingProject);
|
|
864
|
+
let env = pipeOutput
|
|
865
|
+
? (0, task_env_1.getEnvVariablesForTask)(task, taskSpecificEnv, process.env.FORCE_COLOR === undefined
|
|
866
|
+
? 'true'
|
|
867
|
+
: process.env.FORCE_COLOR, this.options.skipNxCache, this.options.captureStderr, null, null)
|
|
868
|
+
: (0, task_env_1.getEnvVariablesForTask)(task, taskSpecificEnv, undefined, this.options.skipNxCache, this.options.captureStderr, temporaryOutputPath, streamOutput);
|
|
869
|
+
const childProcess = await this.runTask(task, streamOutput, env, temporaryOutputPath, pipeOutput);
|
|
870
|
+
this.runningTasksService?.addRunningTask(task.id);
|
|
871
|
+
this.runningContinuousTasks.set(task.id, {
|
|
872
|
+
runningTask: childProcess,
|
|
873
|
+
groupId,
|
|
874
|
+
ownsRunningTasksService: true,
|
|
875
|
+
});
|
|
876
|
+
this.continuousTaskExitHandled.set(task.id, new Promise((resolve) => {
|
|
877
|
+
childProcess.onExit(async (code) => {
|
|
878
|
+
await this.handleContinuousTaskExit(code, task, groupId, true);
|
|
879
|
+
resolve();
|
|
880
|
+
});
|
|
881
|
+
}));
|
|
882
|
+
await this.scheduleNextTasksAndReleaseThreads();
|
|
883
|
+
return childProcess;
|
|
884
|
+
}
|
|
885
|
+
// endregion Single Task
|
|
886
|
+
// region Lifecycle
|
|
887
|
+
async preRunSteps(tasks, metadata) {
|
|
888
|
+
const now = Date.now();
|
|
889
|
+
for (const task of tasks) {
|
|
890
|
+
task.startTime = now;
|
|
891
|
+
}
|
|
892
|
+
await this.options.lifeCycle.startTasks(tasks, metadata);
|
|
893
|
+
}
|
|
894
|
+
async postRunSteps(results, doNotSkipCache, { groupId }) {
|
|
895
|
+
const now = Date.now();
|
|
896
|
+
const tasksToRecord = [];
|
|
897
|
+
for (const { task, status } of results) {
|
|
898
|
+
// Only set endTime as fallback (batch provides timing via result.task)
|
|
899
|
+
task.endTime ??= now;
|
|
900
|
+
// Skip recording for tasks whose outputs already match the cache —
|
|
901
|
+
// the daemon already has the correct hash recorded.
|
|
902
|
+
if (!this.stopRequested &&
|
|
903
|
+
task.outputs.length > 0 &&
|
|
904
|
+
status !== 'local-cache-kept-existing') {
|
|
905
|
+
tasksToRecord.push({ outputs: task.outputs, hash: task.hash });
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
if (tasksToRecord.length > 0) {
|
|
909
|
+
await this.recordOutputsHashBatch(tasksToRecord);
|
|
910
|
+
}
|
|
911
|
+
if (doNotSkipCache && !this.stopRequested) {
|
|
912
|
+
// cache the results
|
|
913
|
+
perf_hooks_1.performance.mark('cache-results-start');
|
|
914
|
+
await Promise.all(results
|
|
915
|
+
.filter(({ status }) => status !== 'local-cache' &&
|
|
916
|
+
status !== 'local-cache-kept-existing' &&
|
|
917
|
+
status !== 'remote-cache' &&
|
|
918
|
+
status !== 'skipped' &&
|
|
919
|
+
status !== 'stopped')
|
|
920
|
+
.map((result) => ({
|
|
921
|
+
...result,
|
|
922
|
+
code: result.status === 'local-cache' ||
|
|
923
|
+
result.status === 'local-cache-kept-existing' ||
|
|
924
|
+
result.status === 'remote-cache' ||
|
|
925
|
+
result.status === 'success'
|
|
926
|
+
? 0
|
|
927
|
+
: 1,
|
|
928
|
+
outputs: result.task.outputs,
|
|
929
|
+
}))
|
|
930
|
+
.filter(({ task, code }) => this.shouldCacheTaskResult(task, code))
|
|
931
|
+
.filter(({ terminalOutput, outputs }) => terminalOutput || outputs)
|
|
932
|
+
.map(async ({ task, code, terminalOutput, outputs }) => this.cache.put(task, terminalOutput, outputs, code)));
|
|
933
|
+
perf_hooks_1.performance.mark('cache-results-end');
|
|
934
|
+
perf_hooks_1.performance.measure('cache-results', 'cache-results-start', 'cache-results-end');
|
|
935
|
+
}
|
|
936
|
+
await this.complete(results, groupId);
|
|
937
|
+
await this.scheduleNextTasksAndReleaseThreads();
|
|
938
|
+
}
|
|
939
|
+
async scheduleNextTasksAndReleaseThreads() {
|
|
940
|
+
if (this.stopRequested) {
|
|
941
|
+
this.waitingForTasks.forEach((f) => f(null));
|
|
942
|
+
this.waitingForTasks.length = 0;
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
await this.tasksSchedule.scheduleNextTasks();
|
|
946
|
+
// release blocked threads
|
|
947
|
+
this.waitingForTasks.forEach((f) => f(null));
|
|
948
|
+
this.waitingForTasks.length = 0;
|
|
949
|
+
}
|
|
950
|
+
async complete(results, groupId) {
|
|
951
|
+
await this.completeTasks(results, groupId);
|
|
952
|
+
this.cleanUpUnneededContinuousTasks();
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Unified task completion handler for a set of tasks.
|
|
956
|
+
* - Calls endTasks() lifecycle hook (non-skipped only)
|
|
957
|
+
* - Marks complete in scheduler
|
|
958
|
+
* - Sets completedTasks
|
|
959
|
+
* - Updates TUI status
|
|
960
|
+
* - Skip dependent tasks
|
|
961
|
+
*/
|
|
962
|
+
async completeTasks(results, groupId) {
|
|
963
|
+
// 1. endTasks FIRST (non-skipped only)
|
|
964
|
+
const tasksToReport = [];
|
|
965
|
+
const taskIds = [];
|
|
966
|
+
for (const { task, status, terminalOutput } of results) {
|
|
967
|
+
taskIds.push(task.id);
|
|
968
|
+
if (!this.completedTasks.has(task.id) && status !== 'skipped') {
|
|
969
|
+
tasksToReport.push({
|
|
970
|
+
task,
|
|
971
|
+
status,
|
|
972
|
+
terminalOutput,
|
|
973
|
+
code: status === 'success' ||
|
|
974
|
+
status === 'local-cache' ||
|
|
975
|
+
status === 'local-cache-kept-existing' ||
|
|
976
|
+
status === 'remote-cache'
|
|
977
|
+
? 0
|
|
978
|
+
: 1,
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
if (tasksToReport.length > 0) {
|
|
983
|
+
await this.options.lifeCycle.endTasks(tasksToReport, { groupId });
|
|
984
|
+
}
|
|
985
|
+
// 2. Mark complete in scheduler
|
|
986
|
+
this.tasksSchedule.complete(taskIds);
|
|
987
|
+
// 3. Set completedTasks + update TUI + collect dependent tasks to skip
|
|
988
|
+
const dependentTasksToSkip = [];
|
|
989
|
+
for (const { task, status, displayStatus } of results) {
|
|
990
|
+
if (this.completedTasks.has(task.id))
|
|
991
|
+
continue;
|
|
992
|
+
this.completedTasks.set(task.id, status);
|
|
993
|
+
if (this.tuiEnabled) {
|
|
994
|
+
this.options.lifeCycle.setTaskStatus(task.id, displayStatus ?? (0, native_1.parseTaskStatus)(status));
|
|
995
|
+
}
|
|
996
|
+
if (status === 'failure' ||
|
|
997
|
+
status === 'skipped' ||
|
|
998
|
+
status === 'stopped') {
|
|
999
|
+
if (this.bail) {
|
|
1000
|
+
// mark the execution as bailed which will stop all further execution
|
|
1001
|
+
// only the tasks that are currently running will finish
|
|
1002
|
+
this.bailed = true;
|
|
1003
|
+
}
|
|
1004
|
+
else {
|
|
1005
|
+
// Collect reverse deps to skip
|
|
1006
|
+
for (const depTaskId of this.reverseTaskDeps[task.id]) {
|
|
1007
|
+
const depTask = this.taskGraph.tasks[depTaskId];
|
|
1008
|
+
if (depTask) {
|
|
1009
|
+
// Don't skip tasks that are still running/stopping — their own
|
|
1010
|
+
// exit handler will set the correct terminal status
|
|
1011
|
+
if (this.runningDiscreteTasks.has(depTaskId) ||
|
|
1012
|
+
this.runningContinuousTasks.has(depTaskId)) {
|
|
1013
|
+
continue;
|
|
1014
|
+
}
|
|
1015
|
+
dependentTasksToSkip.push({ task: depTask, status: 'skipped' });
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
// 4. Skip dependent tasks
|
|
1022
|
+
if (dependentTasksToSkip.length > 0) {
|
|
1023
|
+
await this.completeTasks(dependentTasksToSkip, groupId);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
//endregion Lifecycle
|
|
1027
|
+
// region utils
|
|
1028
|
+
async pipeOutputCapture(task) {
|
|
1029
|
+
try {
|
|
1030
|
+
if (process.env.NX_NATIVE_COMMAND_RUNNER !== 'false') {
|
|
1031
|
+
return true;
|
|
1032
|
+
}
|
|
1033
|
+
// When TUI is enabled, we need to use pipe output capture to support
|
|
1034
|
+
// progressive output streaming via the onOutput callback
|
|
1035
|
+
if (this.tuiEnabled) {
|
|
1036
|
+
return true;
|
|
1037
|
+
}
|
|
1038
|
+
const { schema } = (0, utils_1.getExecutorForTask)(task, this.projects);
|
|
1039
|
+
return (schema.outputCapture === 'pipe' ||
|
|
1040
|
+
process.env.NX_STREAM_OUTPUT === 'true');
|
|
1041
|
+
}
|
|
1042
|
+
catch (e) {
|
|
1043
|
+
return false;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
shouldCacheTaskResult(task, code) {
|
|
1047
|
+
return ((0, utils_1.isCacheableTask)(task, this.options) &&
|
|
1048
|
+
(process.env.NX_CACHE_FAILURES == 'true' ? true : code === 0));
|
|
1049
|
+
}
|
|
1050
|
+
closeGroup() {
|
|
1051
|
+
for (let i = 0; i < this.options.parallel; i++) {
|
|
1052
|
+
if (!this.groups[i]) {
|
|
1053
|
+
this.groups[i] = true;
|
|
1054
|
+
return i;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
openGroup(id) {
|
|
1059
|
+
this.groups[id] = false;
|
|
1060
|
+
}
|
|
1061
|
+
async shouldCopyOutputsFromCacheBatch(tasks) {
|
|
1062
|
+
const resultMap = new Map();
|
|
1063
|
+
if (tasks.length === 0)
|
|
1064
|
+
return resultMap;
|
|
1065
|
+
if (this.daemon?.enabled()) {
|
|
1066
|
+
const matches = await this.daemon.outputsHashesMatchBatch(tasks);
|
|
1067
|
+
for (let i = 0; i < tasks.length; i++) {
|
|
1068
|
+
resultMap.set(tasks[i].hash, !matches[i]);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
else {
|
|
1072
|
+
// No daemon → can't verify on-disk outputs, always copy.
|
|
1073
|
+
for (const task of tasks) {
|
|
1074
|
+
resultMap.set(task.hash, true);
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
return resultMap;
|
|
1078
|
+
}
|
|
1079
|
+
async recordOutputsHashBatch(entries) {
|
|
1080
|
+
if (this.daemon?.enabled()) {
|
|
1081
|
+
return this.daemon.recordOutputsHashBatch(entries);
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
// endregion utils
|
|
1085
|
+
async handleContinuousTaskExit(code, task, groupId, ownsRunningTasksService) {
|
|
1086
|
+
// If cleanup already completed this task, nothing left to do
|
|
1087
|
+
if (this.completedTasks.has(task.id)) {
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
const stoppingReason = this.runningContinuousTasks.get(task.id)?.stoppingReason;
|
|
1091
|
+
if (stoppingReason || exit_codes_1.EXPECTED_TERMINATION_SIGNALS.has(code)) {
|
|
1092
|
+
const reason = stoppingReason === 'fulfilled' ? 'fulfilled' : 'interrupted';
|
|
1093
|
+
await this.completeContinuousTask(task, groupId, ownsRunningTasksService, reason);
|
|
1094
|
+
}
|
|
1095
|
+
else {
|
|
1096
|
+
console.error(`Task "${task.id}" is continuous but exited with code ${code}`);
|
|
1097
|
+
await this.completeContinuousTask(task, groupId, ownsRunningTasksService, 'crashed');
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
async completeContinuousTask(task, groupId, ownsRunningTasksService, reason) {
|
|
1101
|
+
if (this.completedTasks.has(task.id))
|
|
1102
|
+
return;
|
|
1103
|
+
this.runningContinuousTasks.delete(task.id);
|
|
1104
|
+
if (ownsRunningTasksService) {
|
|
1105
|
+
this.runningTasksService?.removeRunningTask(task.id);
|
|
1106
|
+
}
|
|
1107
|
+
task.endTime = Date.now();
|
|
1108
|
+
if (reason === 'fulfilled') {
|
|
1109
|
+
await this.complete([
|
|
1110
|
+
{
|
|
1111
|
+
task,
|
|
1112
|
+
status: 'success',
|
|
1113
|
+
displayStatus: 9 /* NativeTaskStatus.Stopped */,
|
|
1114
|
+
},
|
|
1115
|
+
], groupId);
|
|
1116
|
+
}
|
|
1117
|
+
else if (reason === 'crashed') {
|
|
1118
|
+
await this.complete([{ task, status: 'failure' }], groupId);
|
|
1119
|
+
}
|
|
1120
|
+
else {
|
|
1121
|
+
await this.complete([{ task, status: 'stopped' }], groupId);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
async cleanup() {
|
|
1125
|
+
if (this.cleanupPromise) {
|
|
1126
|
+
return this.cleanupPromise;
|
|
1127
|
+
}
|
|
1128
|
+
this.cleanupPromise = this.performCleanup();
|
|
1129
|
+
return this.cleanupPromise;
|
|
1130
|
+
}
|
|
1131
|
+
async performCleanup() {
|
|
1132
|
+
// Mark all running tasks for intentional stop
|
|
1133
|
+
const reason = this.stopRequested ? 'interrupted' : 'fulfilled';
|
|
1134
|
+
for (const entry of this.runningContinuousTasks.values()) {
|
|
1135
|
+
entry.stoppingReason = reason;
|
|
1136
|
+
}
|
|
1137
|
+
for (const entry of this.runningDiscreteTasks.values()) {
|
|
1138
|
+
entry.stopping = true;
|
|
1139
|
+
}
|
|
1140
|
+
// Snapshot continuous tasks before clearing the map.
|
|
1141
|
+
// We clear first because complete() -> cleanUpUnneededContinuousTasks()
|
|
1142
|
+
// iterates runningContinuousTasks and would re-kill already-stopping tasks.
|
|
1143
|
+
const continuousSnapshot = Array.from(this.runningContinuousTasks.entries());
|
|
1144
|
+
this.runningContinuousTasks.clear();
|
|
1145
|
+
// Complete continuous tasks directly — don't rely on onExit which may hang
|
|
1146
|
+
// when grandchild processes keep the pty slave fd open.
|
|
1147
|
+
for (const [taskId, { groupId, ownsRunningTasksService },] of continuousSnapshot) {
|
|
1148
|
+
const task = this.taskGraph.tasks[taskId];
|
|
1149
|
+
if (!task)
|
|
1150
|
+
continue;
|
|
1151
|
+
await this.completeContinuousTask(task, groupId, ownsRunningTasksService, reason);
|
|
1152
|
+
}
|
|
1153
|
+
// Kill all processes
|
|
1154
|
+
this.forkedProcessTaskRunner.cleanup();
|
|
1155
|
+
await Promise.all([
|
|
1156
|
+
...continuousSnapshot.map(async ([taskId, { runningTask }]) => {
|
|
1157
|
+
try {
|
|
1158
|
+
await runningTask.kill();
|
|
1159
|
+
}
|
|
1160
|
+
catch (e) {
|
|
1161
|
+
console.error(`Unable to terminate ${taskId}\nError:`, e);
|
|
1162
|
+
}
|
|
1163
|
+
}),
|
|
1164
|
+
...Array.from(this.runningDiscreteTasks).map(async ([taskId, { runningTask }]) => {
|
|
1165
|
+
try {
|
|
1166
|
+
await runningTask.kill();
|
|
1167
|
+
}
|
|
1168
|
+
catch (e) {
|
|
1169
|
+
console.error(`Unable to terminate ${taskId}\nError:`, e);
|
|
1170
|
+
}
|
|
1171
|
+
}),
|
|
1172
|
+
...Array.from(this.runningRunCommandsTasks).map(async ([taskId, t]) => {
|
|
1173
|
+
try {
|
|
1174
|
+
await t.kill();
|
|
1175
|
+
}
|
|
1176
|
+
catch (e) {
|
|
1177
|
+
console.error(`Unable to terminate ${taskId}\nError:`, e);
|
|
1178
|
+
}
|
|
1179
|
+
}),
|
|
1180
|
+
]);
|
|
1181
|
+
// Discrete exit promises resolve promptly (process kill → getResults →
|
|
1182
|
+
// postRunSteps → resolve). Await them so lifecycle endTasks() completes
|
|
1183
|
+
// before run() returns and endCommand() is called.
|
|
1184
|
+
await Promise.all(this.discreteTaskExitHandled.values());
|
|
1185
|
+
}
|
|
1186
|
+
setupSignalHandlers() {
|
|
1187
|
+
process.once('SIGINT', () => {
|
|
1188
|
+
this.stopRequested = true;
|
|
1189
|
+
if (!this.tuiEnabled) {
|
|
1190
|
+
// Synchronously remove DB entries before async cleanup to prevent
|
|
1191
|
+
// new nx processes from seeing stale "Waiting for ..." messages.
|
|
1192
|
+
// This replicates the cleanup that process.exit() + Rust Drop
|
|
1193
|
+
// previously provided.
|
|
1194
|
+
for (const [taskId, { ownsRunningTasksService }] of this
|
|
1195
|
+
.runningContinuousTasks) {
|
|
1196
|
+
if (ownsRunningTasksService) {
|
|
1197
|
+
this.runningTasksService?.removeRunningTask(taskId);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
// Silence output — pnpm (and similar wrappers) may exit before nx
|
|
1201
|
+
// finishes cleanup, returning the shell prompt. Any output after
|
|
1202
|
+
// that point would appear after the prompt.
|
|
1203
|
+
const noop = (_chunk, _encoding, callback) => {
|
|
1204
|
+
if (callback)
|
|
1205
|
+
callback();
|
|
1206
|
+
return true;
|
|
1207
|
+
};
|
|
1208
|
+
process.stdout.write = noop;
|
|
1209
|
+
process.stderr.write = noop;
|
|
1210
|
+
}
|
|
1211
|
+
this.cleanup().finally(() => {
|
|
1212
|
+
if (this.resolveStopPromise) {
|
|
1213
|
+
this.resolveStopPromise();
|
|
1214
|
+
}
|
|
1215
|
+
else {
|
|
1216
|
+
process.exit((0, exit_codes_1.signalToCode)('SIGINT'));
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
});
|
|
1220
|
+
process.once('SIGTERM', () => {
|
|
1221
|
+
this.stopRequested = true;
|
|
1222
|
+
this.cleanup().finally(() => {
|
|
1223
|
+
if (this.resolveStopPromise) {
|
|
1224
|
+
this.resolveStopPromise();
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
});
|
|
1228
|
+
process.once('SIGHUP', () => {
|
|
1229
|
+
this.stopRequested = true;
|
|
1230
|
+
this.cleanup().finally(() => {
|
|
1231
|
+
if (this.resolveStopPromise) {
|
|
1232
|
+
this.resolveStopPromise();
|
|
1233
|
+
}
|
|
1234
|
+
});
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
cleanUpUnneededContinuousTasks() {
|
|
1238
|
+
const incompleteTasks = this.tasksSchedule.getIncompleteTasks();
|
|
1239
|
+
const neededContinuousTasks = new Set();
|
|
1240
|
+
for (const task of incompleteTasks) {
|
|
1241
|
+
// Keep initiating tasks that are still incomplete
|
|
1242
|
+
if (task.continuous && this.initializingTaskIds.has(task.id)) {
|
|
1243
|
+
neededContinuousTasks.add(task.id);
|
|
1244
|
+
}
|
|
1245
|
+
const continuousDependencies = this.taskGraph.continuousDependencies[task.id];
|
|
1246
|
+
for (const continuousDependency of continuousDependencies) {
|
|
1247
|
+
neededContinuousTasks.add(continuousDependency);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
for (const [taskId, entry] of this.runningContinuousTasks) {
|
|
1251
|
+
if (!neededContinuousTasks.has(taskId)) {
|
|
1252
|
+
// Mark as intentional kill before calling kill()
|
|
1253
|
+
// onExit will see this and use success/Stopped
|
|
1254
|
+
entry.stoppingReason = 'fulfilled';
|
|
1255
|
+
entry.runningTask.kill();
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
exports.TaskOrchestrator = TaskOrchestrator;
|
|
1261
|
+
function getThreadPoolSize(options, taskGraph) {
|
|
1262
|
+
if (options['parallel'] === 'false' ||
|
|
1263
|
+
options['parallel'] === false) {
|
|
1264
|
+
options['parallel'] = 1;
|
|
1265
|
+
}
|
|
1266
|
+
else if (options['parallel'] === 'true' ||
|
|
1267
|
+
options['parallel'] === true ||
|
|
1268
|
+
options['parallel'] === undefined ||
|
|
1269
|
+
options['parallel'] === '') {
|
|
1270
|
+
options['parallel'] = Number(options['maxParallel'] || 3);
|
|
1271
|
+
}
|
|
1272
|
+
const continuousCount = Object.values(taskGraph.tasks).filter((t) => t.continuous).length;
|
|
1273
|
+
const discrete = options['parallel'];
|
|
1274
|
+
const continuous = continuousCount;
|
|
1275
|
+
const total = discrete + continuous;
|
|
1276
|
+
return { discrete, continuous, total };
|
|
1277
|
+
}
|