@ohos-npm-ports/nx 23.1.1-beta.1
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 +22 -0
- package/README.md +65 -0
- package/dist/bin/init-local.d.ts +8 -0
- package/dist/bin/init-local.js +188 -0
- package/dist/bin/nx-cloud.d.ts +3 -0
- package/dist/bin/nx-cloud.js +47 -0
- package/dist/bin/nx.d.ts +3 -0
- package/dist/bin/nx.js +340 -0
- package/dist/bin/post-install.d.ts +1 -0
- package/dist/bin/post-install.js +52 -0
- package/dist/bin/run-executor.d.ts +1 -0
- package/dist/bin/run-executor.js +66 -0
- package/dist/plugins/package-json.d.ts +4 -0
- package/dist/plugins/package-json.js +40 -0
- package/dist/presets/core.json +1 -0
- package/dist/presets/npm.json +7 -0
- package/dist/release/changelog-renderer/index.d.ts +110 -0
- package/dist/release/changelog-renderer/index.js +382 -0
- package/dist/release/index.d.ts +4 -0
- package/dist/release/index.js +13 -0
- package/dist/src/adapter/angular-json.d.ts +10 -0
- package/dist/src/adapter/angular-json.js +129 -0
- package/dist/src/adapter/compat.d.ts +2 -0
- package/dist/src/adapter/compat.js +154 -0
- package/dist/src/adapter/ngcli-adapter.d.ts +105 -0
- package/dist/src/adapter/ngcli-adapter.js +1024 -0
- package/dist/src/adapter/rxjs-for-await.d.ts +109 -0
- package/dist/src/adapter/rxjs-for-await.js +362 -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/configure-ai-agents-disclaimer.d.ts +5 -0
- package/dist/src/ai/configure-ai-agents-disclaimer.js +31 -0
- package/dist/src/ai/constants.d.ts +31 -0
- package/dist/src/ai/constants.js +76 -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 +530 -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 +16 -0
- package/dist/src/analytics/analytics.js +248 -0
- package/dist/src/analytics/index.d.ts +1 -0
- package/dist/src/analytics/index.js +12 -0
- package/dist/src/command-line/add/add.d.ts +3 -0
- package/dist/src/command-line/add/add.js +133 -0
- package/dist/src/command-line/add/command-object.d.ts +8 -0
- package/dist/src/command-line/add/command-object.js +28 -0
- package/dist/src/command-line/add/completion.d.ts +1 -0
- package/dist/src/command-line/add/completion.js +15 -0
- package/dist/src/command-line/affected/affected.d.ts +10 -0
- package/dist/src/command-line/affected/affected.js +89 -0
- package/dist/src/command-line/affected/command-object.d.ts +6 -0
- package/dist/src/command-line/affected/command-object.js +83 -0
- package/dist/src/command-line/affected/completion.d.ts +1 -0
- package/dist/src/command-line/affected/completion.js +15 -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/completion/argv-layout.d.ts +6 -0
- package/dist/src/command-line/completion/argv-layout.js +19 -0
- package/dist/src/command-line/completion/command-completions.d.ts +19 -0
- package/dist/src/command-line/completion/command-completions.js +120 -0
- package/dist/src/command-line/completion/command-handlers.d.ts +30 -0
- package/dist/src/command-line/completion/command-handlers.js +69 -0
- package/dist/src/command-line/completion/command-object.d.ts +10 -0
- package/dist/src/command-line/completion/command-object.js +107 -0
- package/dist/src/command-line/completion/completion-providers.d.ts +21 -0
- package/dist/src/command-line/completion/completion-providers.js +194 -0
- package/dist/src/command-line/completion/infix-targets.d.ts +1 -0
- package/dist/src/command-line/completion/infix-targets.js +48 -0
- package/dist/src/command-line/completion/metadata.d.ts +22 -0
- package/dist/src/command-line/completion/metadata.js +71 -0
- package/dist/src/command-line/completion/registrations.d.ts +9 -0
- package/dist/src/command-line/completion/registrations.js +16 -0
- package/dist/src/command-line/completion/scripts/bash.sh +51 -0
- package/dist/src/command-line/completion/scripts/fish.fish +47 -0
- package/dist/src/command-line/completion/scripts/powershell.ps1 +52 -0
- package/dist/src/command-line/completion/scripts/zsh.zsh +69 -0
- package/dist/src/command-line/completion/scripts.d.ts +18 -0
- package/dist/src/command-line/completion/scripts.js +140 -0
- package/dist/src/command-line/completion/trigger.d.ts +3 -0
- package/dist/src/command-line/completion/trigger.js +21 -0
- package/dist/src/command-line/completion/value-completions.d.ts +3 -0
- package/dist/src/command-line/completion/value-completions.js +21 -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 +59 -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 +1 -0
- package/dist/src/command-line/daemon/command-object.js +29 -0
- package/dist/src/command-line/daemon/daemon.d.ts +2 -0
- package/dist/src/command-line/daemon/daemon.js +31 -0
- package/dist/src/command-line/deprecated/command-objects.d.ts +9 -0
- package/dist/src/command-line/deprecated/command-objects.js +48 -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.d.ts +2 -0
- package/dist/src/command-line/exec/command-object.js +20 -0
- package/dist/src/command-line/exec/exec.d.ts +1 -0
- package/dist/src/command-line/exec/exec.js +143 -0
- package/dist/src/command-line/format/command-object.d.ts +3 -0
- package/dist/src/command-line/format/command-object.js +58 -0
- package/dist/src/command-line/format/format.d.ts +2 -0
- package/dist/src/command-line/format/format.js +233 -0
- package/dist/src/command-line/generate/command-object.d.ts +2 -0
- package/dist/src/command-line/generate/command-object.js +67 -0
- package/dist/src/command-line/generate/completion.d.ts +1 -0
- package/dist/src/command-line/generate/completion.js +9 -0
- package/dist/src/command-line/generate/generate.d.ts +21 -0
- package/dist/src/command-line/generate/generate.js +281 -0
- package/dist/src/command-line/generate/generator-utils.d.ts +18 -0
- package/dist/src/command-line/generate/generator-utils.js +91 -0
- package/dist/src/command-line/graph/command-object.d.ts +3 -0
- package/dist/src/command-line/graph/command-object.js +76 -0
- package/dist/src/command-line/graph/completion.d.ts +1 -0
- package/dist/src/command-line/graph/completion.js +13 -0
- package/dist/src/command-line/graph/graph.d.ts +70 -0
- package/dist/src/command-line/graph/graph.js +987 -0
- package/dist/src/command-line/import/command-object.d.ts +2 -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.d.ts +2 -0
- package/dist/src/command-line/import/utils/merge-remote-source.js +14 -0
- package/dist/src/command-line/import/utils/prepare-source-repo.d.ts +2 -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 +36 -0
- package/dist/src/command-line/init/command-object.d.ts +2 -0
- package/dist/src/command-line/init/command-object.js +116 -0
- package/dist/src/command-line/init/configure-plugins.d.ts +34 -0
- package/dist/src/command-line/init/configure-plugins.js +211 -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 +142 -0
- package/dist/src/command-line/init/implementation/add-nx-to-nest.d.ts +5 -0
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +357 -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 +83 -0
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +51 -0
- package/dist/src/command-line/init/implementation/angular/index.d.ts +2 -0
- package/dist/src/command-line/init/implementation/angular/index.js +135 -0
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.d.ts +1 -0
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +9 -0
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts +2 -0
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +153 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.d.ts +1 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +198 -0
- package/dist/src/command-line/init/implementation/angular/types.d.ts +20 -0
- package/dist/src/command-line/init/implementation/angular/types.js +2 -0
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +15 -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.d.ts +1 -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 +11 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +146 -0
- package/dist/src/command-line/init/implementation/dot-nx/nxw.d.ts +1 -0
- package/dist/src/command-line/init/implementation/dot-nx/nxw.js +123 -0
- package/dist/src/command-line/init/implementation/utils.d.ts +35 -0
- package/dist/src/command-line/init/implementation/utils.js +422 -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 +612 -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.d.ts +2 -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/agentic/capture-generator-output.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +100 -0
- package/dist/src/command-line/migrate/agentic/cli-args.d.ts +12 -0
- package/dist/src/command-line/migrate/agentic/cli-args.js +38 -0
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +6 -0
- package/dist/src/command-line/migrate/agentic/definitions.js +121 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.d.ts +10 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.js +68 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +87 -0
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +69 -0
- package/dist/src/command-line/migrate/agentic/handoff.js +190 -0
- package/dist/src/command-line/migrate/agentic/inception.d.ts +9 -0
- package/dist/src/command-line/migrate/agentic/inception.js +15 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +50 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +56 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +66 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +49 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +53 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +26 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +27 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +19 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +145 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +90 -0
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +58 -0
- package/dist/src/command-line/migrate/agentic/run-step.js +123 -0
- package/dist/src/command-line/migrate/agentic/runner.d.ts +33 -0
- package/dist/src/command-line/migrate/agentic/runner.js +444 -0
- package/dist/src/command-line/migrate/agentic/select.d.ts +16 -0
- package/dist/src/command-line/migrate/agentic/select.js +253 -0
- package/dist/src/command-line/migrate/agentic/types.d.ts +102 -0
- package/dist/src/command-line/migrate/agentic/types.js +2 -0
- package/dist/src/command-line/migrate/command-object.d.ts +47 -0
- package/dist/src/command-line/migrate/command-object.js +134 -0
- package/dist/src/command-line/migrate/execute-migration.d.ts +72 -0
- package/dist/src/command-line/migrate/execute-migration.js +389 -0
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +71 -0
- package/dist/src/command-line/migrate/migrate-analytics.js +253 -0
- package/dist/src/command-line/migrate/migrate-commits.d.ts +50 -0
- package/dist/src/command-line/migrate/migrate-commits.js +102 -0
- package/dist/src/command-line/migrate/migrate-config.d.ts +28 -0
- package/dist/src/command-line/migrate/migrate-config.js +104 -0
- package/dist/src/command-line/migrate/migrate-output.d.ts +180 -0
- package/dist/src/command-line/migrate/migrate-output.js +258 -0
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +88 -0
- package/dist/src/command-line/migrate/migrate-ui-api.js +428 -0
- package/dist/src/command-line/migrate/migrate.d.ts +269 -0
- package/dist/src/command-line/migrate/migrate.js +2417 -0
- package/dist/src/command-line/migrate/migration-shape.d.ts +8 -0
- package/dist/src/command-line/migrate/migration-shape.js +13 -0
- package/dist/src/command-line/migrate/multi-major.d.ts +37 -0
- package/dist/src/command-line/migrate/multi-major.js +218 -0
- package/dist/src/command-line/migrate/prompt-files.d.ts +31 -0
- package/dist/src/command-line/migrate/prompt-files.js +141 -0
- package/dist/src/command-line/migrate/resolve-package-version.d.ts +24 -0
- package/dist/src/command-line/migrate/resolve-package-version.js +249 -0
- package/dist/src/command-line/migrate/run-migration-process.js +109 -0
- package/dist/src/command-line/migrate/safe-prompt.d.ts +33 -0
- package/dist/src/command-line/migrate/safe-prompt.js +58 -0
- package/dist/src/command-line/migrate/update-filters.d.ts +11 -0
- package/dist/src/command-line/migrate/update-filters.js +45 -0
- package/dist/src/command-line/migrate/version-utils.d.ts +5 -0
- package/dist/src/command-line/migrate/version-utils.js +52 -0
- package/dist/src/command-line/new/command-object.d.ts +2 -0
- package/dist/src/command-line/new/command-object.js +26 -0
- package/dist/src/command-line/new/new.d.ts +3 -0
- package/dist/src/command-line/new/new.js +30 -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.d.ts +3 -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 +270 -0
- package/dist/src/command-line/nx-cloud/connect/view-logs.d.ts +1 -0
- package/dist/src/command-line/nx-cloud/connect/view-logs.js +55 -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.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/login/command-object.js +20 -0
- package/dist/src/command-line/nx-cloud/login/login.d.ts +5 -0
- package/dist/src/command-line/nx-cloud/login/login.js +10 -0
- package/dist/src/command-line/nx-cloud/logout/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/logout/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/logout/logout.d.ts +4 -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 +181 -0
- package/dist/src/command-line/register/command-object.d.ts +6 -0
- package/dist/src/command-line/register/command-object.js +27 -0
- package/dist/src/command-line/register/register.d.ts +2 -0
- package/dist/src/command-line/register/register.js +9 -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 +43 -0
- package/dist/src/command-line/release/changelog/version-plan-filtering.js +156 -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 +28 -0
- package/dist/src/command-line/release/changelog.js +911 -0
- package/dist/src/command-line/release/command-object.d.ts +96 -0
- package/dist/src/command-line/release/command-object.js +342 -0
- package/dist/src/command-line/release/config/config.d.ts +70 -0
- package/dist/src/command-line/release/config/config.js +1204 -0
- package/dist/src/command-line/release/config/conventional-commits.d.ts +2 -0
- package/dist/src/command-line/release/config/conventional-commits.js +106 -0
- package/dist/src/command-line/release/config/deep-merge-json.d.ts +1 -0
- package/dist/src/command-line/release/config/deep-merge-json.js +28 -0
- package/dist/src/command-line/release/config/filter-release-groups.d.ts +23 -0
- package/dist/src/command-line/release/config/filter-release-groups.js +157 -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.d.ts +42 -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.d.ts +4 -0
- package/dist/src/command-line/release/plan-check.js +170 -0
- package/dist/src/command-line/release/plan.d.ts +4 -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 +310 -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.d.ts +1 -0
- package/dist/src/command-line/release/utils/exec-command.js +34 -0
- package/dist/src/command-line/release/utils/generate-version-plan-content.d.ts +1 -0
- package/dist/src/command-line/release/utils/generate-version-plan-content.js +20 -0
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.d.ts +7 -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 +126 -0
- package/dist/src/command-line/release/utils/git.js +597 -0
- package/dist/src/command-line/release/utils/launch-editor.d.ts +1 -0
- package/dist/src/command-line/release/utils/launch-editor.js +46 -0
- package/dist/src/command-line/release/utils/markdown.d.ts +6 -0
- package/dist/src/command-line/release/utils/markdown.js +28 -0
- package/dist/src/command-line/release/utils/print-changes.d.ts +6 -0
- package/dist/src/command-line/release/utils/print-changes.js +63 -0
- package/dist/src/command-line/release/utils/print-config.d.ts +7 -0
- package/dist/src/command-line/release/utils/print-config.js +36 -0
- package/dist/src/command-line/release/utils/release-graph.d.ts +230 -0
- package/dist/src/command-line/release/utils/release-graph.js +709 -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 +22 -0
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.d.ts +1 -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 +63 -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-legacy.d.ts +25 -0
- package/dist/src/command-line/release/utils/shared-legacy.js +2 -0
- package/dist/src/command-line/release/utils/shared.d.ts +64 -0
- package/dist/src/command-line/release/utils/shared.js +379 -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 +61 -0
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
- package/dist/src/command-line/release/version/project-logger.d.ts +8 -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 +243 -0
- package/dist/src/command-line/release/version/topological-sort.d.ts +9 -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 +247 -0
- package/dist/src/command-line/release/version.d.ts +28 -0
- package/dist/src/command-line/release/version.js +378 -0
- package/dist/src/command-line/repair/command-object.d.ts +2 -0
- package/dist/src/command-line/repair/command-object.js +21 -0
- package/dist/src/command-line/repair/repair.d.ts +3 -0
- package/dist/src/command-line/repair/repair.js +41 -0
- package/dist/src/command-line/report/command-object.d.ts +2 -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 +405 -0
- package/dist/src/command-line/reset/command-object.d.ts +8 -0
- package/dist/src/command-line/reset/command-object.js +27 -0
- package/dist/src/command-line/reset/reset.d.ts +2 -0
- package/dist/src/command-line/reset/reset.js +178 -0
- package/dist/src/command-line/run/command-object.d.ts +6 -0
- package/dist/src/command-line/run/command-object.js +43 -0
- package/dist/src/command-line/run/completion.d.ts +1 -0
- package/dist/src/command-line/run/completion.js +7 -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.d.ts +51 -0
- package/dist/src/command-line/run/run.js +179 -0
- package/dist/src/command-line/run-many/command-object.d.ts +2 -0
- package/dist/src/command-line/run-many/command-object.js +18 -0
- package/dist/src/command-line/run-many/completion.d.ts +1 -0
- package/dist/src/command-line/run-many/completion.js +13 -0
- package/dist/src/command-line/run-many/run-many.d.ts +10 -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/completion.d.ts +1 -0
- package/dist/src/command-line/show/completion.js +27 -0
- package/dist/src/command-line/show/project.d.ts +2 -0
- package/dist/src/command-line/show/project.js +103 -0
- package/dist/src/command-line/show/projects.d.ts +2 -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 +28 -0
- package/dist/src/command-line/show/show-target/info.js +389 -0
- package/dist/src/command-line/show/show-target/inputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/inputs.js +83 -0
- package/dist/src/command-line/show/show-target/outputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/outputs.js +70 -0
- package/dist/src/command-line/show/show-target/utils.d.ts +54 -0
- package/dist/src/command-line/show/show-target/utils.js +265 -0
- package/dist/src/command-line/sync/command-object.d.ts +6 -0
- package/dist/src/command-line/sync/command-object.js +21 -0
- package/dist/src/command-line/sync/sync.d.ts +6 -0
- package/dist/src/command-line/sync/sync.js +120 -0
- package/dist/src/command-line/watch/command-object.d.ts +2 -0
- package/dist/src/command-line/watch/command-object.js +91 -0
- package/dist/src/command-line/watch/completion.d.ts +1 -0
- package/dist/src/command-line/watch/completion.js +10 -0
- package/dist/src/command-line/watch/watch.d.ts +31 -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.d.ts +2 -0
- package/dist/src/command-line/yargs-utils/documentation.js +12 -0
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +61 -0
- package/dist/src/command-line/yargs-utils/shared-options.js +395 -0
- package/dist/src/commands-runner/command-graph.d.ts +13 -0
- package/dist/src/commands-runner/command-graph.js +2 -0
- package/dist/src/commands-runner/create-command-graph.d.ts +4 -0
- package/dist/src/commands-runner/create-command-graph.js +72 -0
- package/dist/src/commands-runner/get-command-projects.d.ts +3 -0
- package/dist/src/commands-runner/get-command-projects.js +33 -0
- package/dist/src/config/calculate-default-project-name.d.ts +4 -0
- package/dist/src/config/calculate-default-project-name.js +41 -0
- package/dist/src/config/configuration.d.ts +8 -0
- package/dist/src/config/configuration.js +17 -0
- package/dist/src/config/misc-interfaces.d.ts +254 -0
- package/dist/src/config/misc-interfaces.js +2 -0
- package/dist/src/config/nx-json.d.ts +963 -0
- package/dist/src/config/nx-json.js +40 -0
- package/dist/src/config/project-graph.d.ts +137 -0
- package/dist/src/config/project-graph.js +45 -0
- package/dist/src/config/schema-utils.d.ts +37 -0
- package/dist/src/config/schema-utils.js +199 -0
- package/dist/src/config/task-graph.d.ts +6 -0
- package/dist/src/config/task-graph.js +2 -0
- package/dist/src/config/to-project-name.d.ts +5 -0
- package/dist/src/config/to-project-name.js +12 -0
- package/dist/src/config/workspace-json-project-json.d.ts +273 -0
- package/dist/src/config/workspace-json-project-json.js +2 -0
- package/dist/src/core/graph/environment.js +1 -0
- package/dist/src/core/graph/favicon.ico +0 -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 +2 -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 +115 -0
- package/dist/src/daemon/client/client.js +1046 -0
- package/dist/src/daemon/client/daemon-environment.d.ts +12 -0
- package/dist/src/daemon/client/daemon-environment.js +170 -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-on-daemon.d.ts +1 -0
- package/dist/src/daemon/is-on-daemon.js +6 -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/flush-sync-generator-changes-to-disk.d.ts +6 -0
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.js +11 -0
- package/dist/src/daemon/message-types/force-shutdown.d.ts +5 -0
- package/dist/src/daemon/message-types/force-shutdown.js +11 -0
- package/dist/src/daemon/message-types/get-context-file-data.d.ts +5 -0
- package/dist/src/daemon/message-types/get-context-file-data.js +11 -0
- package/dist/src/daemon/message-types/get-files-in-directory.d.ts +6 -0
- package/dist/src/daemon/message-types/get-files-in-directory.js +11 -0
- package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +6 -0
- package/dist/src/daemon/message-types/get-nx-workspace-files.js +11 -0
- package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +5 -0
- package/dist/src/daemon/message-types/get-registered-sync-generators.js +11 -0
- package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +6 -0
- package/dist/src/daemon/message-types/get-sync-generator-changes.js +11 -0
- package/dist/src/daemon/message-types/glob.d.ts +14 -0
- package/dist/src/daemon/message-types/glob.js +19 -0
- package/dist/src/daemon/message-types/hash-glob.d.ts +13 -0
- package/dist/src/daemon/message-types/hash-glob.js +19 -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/run-tasks-execution-hooks.d.ts +13 -0
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.js +19 -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/message-types/task-history.d.ts +19 -0
- package/dist/src/daemon/message-types/task-history.js +27 -0
- package/dist/src/daemon/message-types/update-workspace-context.d.ts +8 -0
- package/dist/src/daemon/message-types/update-workspace-context.js +11 -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/changed-projects.d.ts +10 -0
- package/dist/src/daemon/server/file-watching/changed-projects.js +53 -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.d.ts +12 -0
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +66 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.d.ts +9 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.js +76 -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.d.ts +2 -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.d.ts +2 -0
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +11 -0
- package/dist/src/daemon/server/handle-force-shutdown.d.ts +5 -0
- package/dist/src/daemon/server/handle-force-shutdown.js +18 -0
- package/dist/src/daemon/server/handle-get-files-in-directory.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-files-in-directory.js +12 -0
- package/dist/src/daemon/server/handle-get-registered-sync-generators.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-registered-sync-generators.js +11 -0
- package/dist/src/daemon/server/handle-get-sync-generator-changes.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-sync-generator-changes.js +20 -0
- package/dist/src/daemon/server/handle-glob.d.ts +3 -0
- package/dist/src/daemon/server/handle-glob.js +20 -0
- package/dist/src/daemon/server/handle-hash-glob.d.ts +3 -0
- package/dist/src/daemon/server/handle-hash-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.d.ts +2 -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.d.ts +6 -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-request-shutdown.d.ts +5 -0
- package/dist/src/daemon/server/handle-request-shutdown.js +27 -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/handle-update-workspace-context.d.ts +2 -0
- package/dist/src/daemon/server/handle-update-workspace-context.js +11 -0
- package/dist/src/daemon/server/latest-nx.d.ts +10 -0
- package/dist/src/daemon/server/latest-nx.js +53 -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 +26 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +507 -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 +477 -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 +18 -0
- package/dist/src/daemon/server/watcher.js +126 -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-exports.js +143 -0
- package/dist/src/devkit-internals.d.ts +43 -0
- package/dist/src/devkit-internals.js +101 -0
- package/dist/src/devkit-testing-exports.d.ts +2 -0
- package/dist/src/devkit-testing-exports.js +8 -0
- package/dist/src/executors/noop/noop.impl.d.ts +3 -0
- package/dist/src/executors/noop/noop.impl.js +6 -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 +52 -0
- package/dist/src/executors/run-commands/running-tasks.js +586 -0
- package/dist/src/executors/run-commands/schema.json +198 -0
- package/dist/src/executors/run-script/run-script.impl.d.ts +8 -0
- package/dist/src/executors/run-script/run-script.impl.js +86 -0
- package/dist/src/executors/run-script/schema.json +28 -0
- package/dist/src/executors/utils/convert-nx-executor.d.ts +10 -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/testing-utils/create-tree-with-empty-workspace.d.ts +11 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +52 -0
- package/dist/src/generators/testing-utils/create-tree.d.ts +5 -0
- package/dist/src/generators/testing-utils/create-tree.js +14 -0
- package/dist/src/generators/tree.d.ts +125 -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/glob.d.ts +22 -0
- package/dist/src/generators/utils/glob.js +51 -0
- package/dist/src/generators/utils/json.d.ts +28 -0
- package/dist/src/generators/utils/json.js +48 -0
- package/dist/src/generators/utils/nx-json.d.ts +10 -0
- package/dist/src/generators/utils/nx-json.js +62 -0
- package/dist/src/generators/utils/project-configuration.d.ts +51 -0
- package/dist/src/generators/utils/project-configuration.js +299 -0
- package/dist/src/hasher/check-task-files.d.ts +86 -0
- package/dist/src/hasher/check-task-files.js +378 -0
- package/dist/src/hasher/create-task-hasher.d.ts +4 -0
- package/dist/src/hasher/create-task-hasher.js +15 -0
- package/dist/src/hasher/file-hasher.d.ts +3 -0
- package/dist/src/hasher/file-hasher.js +23 -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 +301 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -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 +54 -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 +82 -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 +50 -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.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.js +35 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.md +31 -0
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +72 -0
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +126 -0
- package/dist/src/migrations/update-17-2-0/move-default-base.d.ts +5 -0
- package/dist/src/migrations/update-17-2-0/move-default-base.js +20 -0
- package/dist/src/migrations/update-17-3-0/update-nxw.d.ts +2 -0
- package/dist/src/migrations/update-17-3-0/update-nxw.js +7 -0
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +2 -0
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +11 -0
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts +4 -0
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.js +33 -0
- package/dist/src/migrations/update-19-2-4/set-project-name.d.ts +2 -0
- package/dist/src/migrations/update-19-2-4/set-project-name.js +34 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +2 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +25 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.md +27 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +20 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.md +24 -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-changelog-config-changes.md +49 -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/release-version-config-changes.md +54 -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-custom-tasks-runner.md +28 -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-21-0-0/remove-legacy-cache.md +22 -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-2-0/add-self-healing-to-gitignore.md +11 -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/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +18 -0
- package/dist/src/migrations/utils/target-defaults.d.ts +28 -0
- package/dist/src/migrations/utils/target-defaults.js +46 -0
- package/dist/src/native/assert-supported-platform.d.ts +1 -0
- package/dist/src/native/assert-supported-platform.js +39 -0
- package/dist/src/native/browser.js +1 -0
- package/dist/src/native/index.d.ts +844 -0
- package/dist/src/native/index.js +173 -0
- package/dist/src/native/native-bindings.js +641 -0
- package/dist/src/native/native-file-cache-location.d.ts +1 -0
- package/dist/src/native/native-file-cache-location.js +23 -0
- package/dist/src/native/nx.openharmony-arm64.node +0 -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/transform-objects.d.ts +3 -0
- package/dist/src/native/transform-objects.js +51 -0
- package/dist/src/native/wasi-worker-browser.mjs +30 -0
- package/dist/src/native/wasi-worker.mjs +63 -0
- package/dist/src/nx-cloud/debug-logger.d.ts +1 -0
- package/dist/src/nx-cloud/debug-logger.js +8 -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/models/onboarding-status.d.ts +1 -0
- package/dist/src/nx-cloud/models/onboarding-status.js +2 -0
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +16 -0
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.js +41 -0
- package/dist/src/nx-cloud/resolution-helpers.d.ts +1 -0
- package/dist/src/nx-cloud/resolution-helpers.js +19 -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.d.ts +3 -0
- package/dist/src/nx-cloud/utilities/environment.js +48 -0
- package/dist/src/nx-cloud/utilities/get-cloud-options.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/get-cloud-options.js +23 -0
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.d.ts +1 -0
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +25 -0
- package/dist/src/nx-cloud/utilities/onboarding.d.ts +5 -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/hasher/hasher.d.ts +5 -0
- package/dist/src/plugins/js/hasher/hasher.js +51 -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 +959 -0
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +43 -0
- package/dist/src/plugins/js/lock-file/lock-file.js +265 -0
- package/dist/src/plugins/js/lock-file/npm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/npm-parser.js +588 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +693 -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.d.ts +20 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +874 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.js +536 -0
- package/dist/src/plugins/js/package-json/create-package-json.d.ts +29 -0
- package/dist/src/plugins/js/package-json/create-package-json.js +312 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +3 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +150 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.js +93 -0
- package/dist/src/plugins/js/project-graph/affected/touched-projects.d.ts +2 -0
- package/dist/src/plugins/js/project-graph/affected/touched-projects.js +18 -0
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +63 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +6 -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.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +88 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +4 -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 +81 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +462 -0
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +2 -0
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +31 -0
- package/dist/src/plugins/js/utils/config.d.ts +2 -0
- package/dist/src/plugins/js/utils/config.js +61 -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/packages.d.ts +8 -0
- package/dist/src/plugins/js/utils/packages.js +91 -0
- package/dist/src/plugins/js/utils/register.d.ts +339 -0
- package/dist/src/plugins/js/utils/register.js +1236 -0
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.d.ts +5 -0
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.js +17 -0
- package/dist/src/plugins/js/utils/typescript.d.ts +32 -0
- package/dist/src/plugins/js/utils/typescript.js +157 -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 +28 -0
- package/dist/src/plugins/package-json/create-nodes.js +243 -0
- package/dist/src/plugins/package-json/index.d.ts +2 -0
- package/dist/src/plugins/package-json/index.js +6 -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-models.d.ts +11 -0
- package/dist/src/project-graph/affected/affected-project-graph-models.js +2 -0
- package/dist/src/project-graph/affected/affected-project-graph.d.ts +4 -0
- package/dist/src/project-graph/affected/affected-project-graph.js +90 -0
- package/dist/src/project-graph/affected/locators/project-glob-changes.d.ts +2 -0
- package/dist/src/project-graph/affected/locators/project-glob-changes.js +44 -0
- package/dist/src/project-graph/affected/locators/workspace-json-changes.d.ts +4 -0
- package/dist/src/project-graph/affected/locators/workspace-json-changes.js +47 -0
- package/dist/src/project-graph/affected/locators/workspace-projects.d.ts +3 -0
- package/dist/src/project-graph/affected/locators/workspace-projects.js +74 -0
- package/dist/src/project-graph/build-project-graph.d.ts +26 -0
- package/dist/src/project-graph/build-project-graph.js +309 -0
- package/dist/src/project-graph/error-types.d.ts +140 -0
- package/dist/src/project-graph/error-types.js +459 -0
- package/dist/src/project-graph/file-map-utils.d.ts +18 -0
- package/dist/src/project-graph/file-map-utils.js +61 -0
- package/dist/src/project-graph/file-utils.d.ts +31 -0
- package/dist/src/project-graph/file-utils.js +187 -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/operators.d.ts +11 -0
- package/dist/src/project-graph/operators.js +70 -0
- package/dist/src/project-graph/plugins/get-plugins.d.ts +25 -0
- package/dist/src/project-graph/plugins/get-plugins.js +296 -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/index.d.ts +4 -0
- package/dist/src/project-graph/plugins/index.js +12 -0
- package/dist/src/project-graph/plugins/isolation/enabled.d.ts +1 -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 +478 -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 +150 -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 +104 -0
- package/dist/src/project-graph/plugins/public-api.d.ts +139 -0
- package/dist/src/project-graph/plugins/public-api.js +4 -0
- package/dist/src/project-graph/plugins/resolve-plugin.d.ts +25 -0
- package/dist/src/project-graph/plugins/resolve-plugin.js +277 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +3 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +67 -0
- package/dist/src/project-graph/plugins/transpiler.d.ts +20 -0
- package/dist/src/project-graph/plugins/transpiler.js +99 -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-builder.d.ts +133 -0
- package/dist/src/project-graph/project-graph-builder.js +395 -0
- package/dist/src/project-graph/project-graph.d.ts +54 -0
- package/dist/src/project-graph/project-graph.js +415 -0
- package/dist/src/project-graph/utils/build-all-workspace-files.d.ts +2 -0
- package/dist/src/project-graph/utils/build-all-workspace-files.js +14 -0
- package/dist/src/project-graph/utils/find-project-for-path.d.ts +20 -0
- package/dist/src/project-graph/utils/find-project-for-path.js +55 -0
- package/dist/src/project-graph/utils/implicit-project-dependencies.d.ts +3 -0
- package/dist/src/project-graph/utils/implicit-project-dependencies.js +18 -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 +48 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +270 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +42 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +284 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +34 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.js +85 -0
- package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +50 -0
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +440 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.d.ts +32 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +507 -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 +183 -0
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +38 -0
- package/dist/src/project-graph/utils/project-configuration/utils.js +215 -0
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +86 -0
- package/dist/src/project-graph/utils/project-configuration-utils.js +325 -0
- package/dist/src/project-graph/utils/retrieve-workspace-files.d.ts +35 -0
- package/dist/src/project-graph/utils/retrieve-workspace-files.js +110 -0
- package/dist/src/tasks-runner/batch/batch-messages.d.ts +35 -0
- package/dist/src/tasks-runner/batch/batch-messages.js +9 -0
- package/dist/src/tasks-runner/batch/run-batch.d.ts +1 -0
- package/dist/src/tasks-runner/batch/run-batch.js +78 -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 +41 -0
- package/dist/src/tasks-runner/create-task-graph.js +305 -0
- package/dist/src/tasks-runner/default-tasks-runner.d.ts +25 -0
- package/dist/src/tasks-runner/default-tasks-runner.js +74 -0
- package/dist/src/tasks-runner/fork.d.ts +1 -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 +299 -0
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +7 -0
- package/dist/src/tasks-runner/init-tasks-runner.js +86 -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/legacy-depends-on-warning.d.ts +18 -0
- package/dist/src/tasks-runner/legacy-depends-on-warning.js +109 -0
- package/dist/src/tasks-runner/life-cycle.d.ts +86 -0
- package/dist/src/tasks-runner/life-cycle.js +148 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +25 -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.d.ts +24 -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/empty-terminal-output-life-cycle.d.ts +5 -0
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +16 -0
- package/dist/src/tasks-runner/life-cycles/formatting-utils.d.ts +3 -0
- package/dist/src/tasks-runner/life-cycles/formatting-utils.js +55 -0
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +13 -0
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +67 -0
- package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +173 -0
- package/dist/src/tasks-runner/life-cycles/performance-analysis.js +508 -0
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +59 -0
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +193 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +65 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.js +369 -0
- package/dist/src/tasks-runner/life-cycles/pretty-time.d.ts +4 -0
- package/dist/src/tasks-runner/life-cycles/pretty-time.js +73 -0
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +29 -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/static-run-one-terminal-output-life-cycle.d.ts +28 -0
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +97 -0
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +17 -0
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.js +87 -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-profiling-life-cycle.d.ts +14 -0
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.js +73 -0
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts +6 -0
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.js +17 -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/task-timings-life-cycle.d.ts +8 -0
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.js +39 -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/life-cycles/view-logs-utils.d.ts +1 -0
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.js +15 -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.d.ts +48 -0
- package/dist/src/tasks-runner/pseudo-ipc.js +156 -0
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +58 -0
- package/dist/src/tasks-runner/pseudo-terminal.js +197 -0
- package/dist/src/tasks-runner/remove-old-cache-records.d.ts +1 -0
- package/dist/src/tasks-runner/remove-old-cache-records.js +60 -0
- package/dist/src/tasks-runner/run-command.d.ts +42 -0
- package/dist/src/tasks-runner/run-command.js +902 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +19 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.js +110 -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 +175 -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 +31 -0
- package/dist/src/tasks-runner/task-env.js +195 -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 +192 -0
- package/dist/src/tasks-runner/task-orchestrator.js +1370 -0
- package/dist/src/tasks-runner/tasks-runner.d.ts +24 -0
- package/dist/src/tasks-runner/tasks-runner.js +2 -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 +451 -0
- package/dist/src/utils/ab-testing.d.ts +59 -0
- package/dist/src/utils/ab-testing.js +142 -0
- package/dist/src/utils/acknowledge-build-scripts.d.ts +13 -0
- package/dist/src/utils/acknowledge-build-scripts.js +102 -0
- package/dist/src/utils/all-file-data.d.ts +2 -0
- package/dist/src/utils/all-file-data.js +8 -0
- package/dist/src/utils/analytics-prompt.d.ts +9 -0
- package/dist/src/utils/analytics-prompt.js +84 -0
- package/dist/src/utils/assert-workspace-validity.d.ts +3 -0
- package/dist/src/utils/assert-workspace-validity.js +85 -0
- package/dist/src/utils/async-iterator.d.ts +2 -0
- package/dist/src/utils/async-iterator.js +18 -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 +22 -0
- package/dist/src/utils/catalog/index.js +87 -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-utils.d.ts +8 -0
- package/dist/src/utils/catalog/manager-utils.js +232 -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 +22 -0
- package/dist/src/utils/catalog/pnpm-manager.js +139 -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 +22 -0
- package/dist/src/utils/catalog/yarn-manager.js +139 -0
- package/dist/src/utils/child-process.d.ts +22 -0
- package/dist/src/utils/child-process.js +91 -0
- package/dist/src/utils/chunkify.d.ts +11 -0
- package/dist/src/utils/chunkify.js +44 -0
- package/dist/src/utils/code-frames.d.ts +14 -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 +259 -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.d.ts +1 -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.d.ts +7 -0
- package/dist/src/utils/dotenv.js +19 -0
- package/dist/src/utils/enable-compile-cache.d.ts +1 -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.d.ts +67 -0
- package/dist/src/utils/fileutils.js +112 -0
- package/dist/src/utils/find-matching-projects.d.ts +18 -0
- package/dist/src/utils/find-matching-projects.js +222 -0
- package/dist/src/utils/find-workspace-root.d.ts +11 -0
- package/dist/src/utils/find-workspace-root.js +33 -0
- package/dist/src/utils/get-package-name-from-import-path.d.ts +1 -0
- package/dist/src/utils/get-package-name-from-import-path.js +17 -0
- package/dist/src/utils/git-revision.d.ts +12 -0
- package/dist/src/utils/git-revision.js +25 -0
- package/dist/src/utils/git-utils.d.ts +70 -0
- package/dist/src/utils/git-utils.index-filter.d.ts +1 -0
- package/dist/src/utils/git-utils.index-filter.js +23 -0
- package/dist/src/utils/git-utils.js +530 -0
- package/dist/src/utils/git-utils.tree-filter.d.ts +1 -0
- package/dist/src/utils/git-utils.tree-filter.js +47 -0
- package/dist/src/utils/globs.d.ts +3 -0
- package/dist/src/utils/globs.js +18 -0
- package/dist/src/utils/handle-errors.d.ts +1 -0
- package/dist/src/utils/handle-errors.js +91 -0
- package/dist/src/utils/handle-import.d.ts +15 -0
- package/dist/src/utils/handle-import.js +86 -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.d.ts +2 -0
- package/dist/src/utils/installation-directory.js +12 -0
- package/dist/src/utils/installed-nx-version.d.ts +23 -0
- package/dist/src/utils/installed-nx-version.js +113 -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 +11 -0
- package/dist/src/utils/is-using-prettier.d.ts +3 -0
- package/dist/src/utils/is-using-prettier.js +62 -0
- package/dist/src/utils/json-diff.d.ts +18 -0
- package/dist/src/utils/json-diff.js +112 -0
- package/dist/src/utils/json.d.ts +44 -0
- package/dist/src/utils/json.js +62 -0
- package/dist/src/utils/legacy-task-history.d.ts +8 -0
- package/dist/src/utils/legacy-task-history.js +87 -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/min-release-age/behavior/bun.d.ts +30 -0
- package/dist/src/utils/min-release-age/behavior/bun.js +278 -0
- package/dist/src/utils/min-release-age/behavior/npm.d.ts +21 -0
- package/dist/src/utils/min-release-age/behavior/npm.js +293 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +23 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.js +527 -0
- package/dist/src/utils/min-release-age/behavior/yarn.d.ts +22 -0
- package/dist/src/utils/min-release-age/behavior/yarn.js +314 -0
- package/dist/src/utils/min-release-age/constants.d.ts +3 -0
- package/dist/src/utils/min-release-age/constants.js +8 -0
- package/dist/src/utils/min-release-age/errors.d.ts +28 -0
- package/dist/src/utils/min-release-age/errors.js +22 -0
- package/dist/src/utils/min-release-age/npmrc.d.ts +15 -0
- package/dist/src/utils/min-release-age/npmrc.js +45 -0
- package/dist/src/utils/min-release-age/packument.d.ts +13 -0
- package/dist/src/utils/min-release-age/packument.js +34 -0
- package/dist/src/utils/min-release-age/pick.d.ts +72 -0
- package/dist/src/utils/min-release-age/pick.js +206 -0
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.d.ts +12 -0
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.js +58 -0
- package/dist/src/utils/min-release-age/policy.d.ts +38 -0
- package/dist/src/utils/min-release-age/policy.js +59 -0
- package/dist/src/utils/min-release-age/resolve.d.ts +8 -0
- package/dist/src/utils/min-release-age/resolve.js +14 -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/nx-package-group.d.ts +8 -0
- package/dist/src/utils/nx-package-group.js +15 -0
- package/dist/src/utils/object-sort.d.ts +1 -0
- package/dist/src/utils/object-sort.js +9 -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 +229 -0
- package/dist/src/utils/package-json.js +387 -0
- package/dist/src/utils/package-manager.d.ts +142 -0
- package/dist/src/utils/package-manager.js +643 -0
- package/dist/src/utils/params.d.ts +140 -0
- package/dist/src/utils/params.js +710 -0
- package/dist/src/utils/path.d.ts +19 -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.d.ts +1 -0
- package/dist/src/utils/perf-logging.js +46 -0
- package/dist/src/utils/plugin-cache-utils.d.ts +82 -0
- package/dist/src/utils/plugin-cache-utils.js +212 -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/core-plugins.d.ts +6 -0
- package/dist/src/utils/plugins/core-plugins.js +113 -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/installed-plugins.d.ts +5 -0
- package/dist/src/utils/plugins/installed-plugins.js +76 -0
- package/dist/src/utils/plugins/local-plugins.d.ts +22 -0
- package/dist/src/utils/plugins/local-plugins.js +60 -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.d.ts +11 -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/promised-based-queue.d.ts +6 -0
- package/dist/src/utils/promised-based-queue.js +43 -0
- package/dist/src/utils/provenance.d.ts +47 -0
- package/dist/src/utils/provenance.js +115 -0
- package/dist/src/utils/require-nx-key.d.ts +1 -0
- package/dist/src/utils/require-nx-key.js +23 -0
- package/dist/src/utils/serializable-error.d.ts +4 -0
- package/dist/src/utils/serializable-error.js +33 -0
- package/dist/src/utils/serialize-overrides-into-command-line.d.ts +3 -0
- package/dist/src/utils/serialize-overrides-into-command-line.js +41 -0
- package/dist/src/utils/serialize-target.d.ts +1 -0
- package/dist/src/utils/serialize-target.js +6 -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 +24 -0
- package/dist/src/utils/spinner.js +77 -0
- package/dist/src/utils/split-target.d.ts +15 -0
- package/dist/src/utils/split-target.js +239 -0
- package/dist/src/utils/strip-indents.d.ts +14 -0
- package/dist/src/utils/strip-indents.js +23 -0
- package/dist/src/utils/sync-generators.d.ts +66 -0
- package/dist/src/utils/sync-generators.js +355 -0
- package/dist/src/utils/tar.d.ts +8 -0
- package/dist/src/utils/tar.js +44 -0
- package/dist/src/utils/task-history.d.ts +17 -0
- package/dist/src/utils/task-history.js +51 -0
- package/dist/src/utils/terminal-link.d.ts +20 -0
- package/dist/src/utils/terminal-link.js +85 -0
- package/dist/src/utils/update-nxw.d.ts +2 -0
- package/dist/src/utils/update-nxw.js +22 -0
- package/dist/src/utils/versions.d.ts +1 -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-id.d.ts +20 -0
- package/dist/src/utils/workspace-id.js +54 -0
- package/dist/src/utils/workspace-root.d.ts +6 -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/dist/tasks-runners/default.d.ts +1 -0
- package/dist/tasks-runners/default.js +5 -0
- package/executors.json +19 -0
- package/generators.json +16 -0
- package/migrations.json +189 -0
- package/package.json +542 -0
- package/schemas/migrations-schema.json +186 -0
- package/schemas/nx-schema.json +1615 -0
- package/schemas/project-schema.json +426 -0
- package/schemas/workspace-schema.json +185 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AgentDefinition, DetectedInstalledAgent } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Probes each given agent definition for an installed binary on the user's
|
|
4
|
+
* machine. PATH is checked first via `which` (which handles Windows PATHEXT),
|
|
5
|
+
* then the per-agent well-known fallback paths. Probes run in parallel.
|
|
6
|
+
*
|
|
7
|
+
* Returns only the agents that were found, preserving the order of the input
|
|
8
|
+
* `definitions` argument for callers that rely on it for picker presentation.
|
|
9
|
+
*/
|
|
10
|
+
export declare function detectInstalledAgents(definitions: readonly AgentDefinition[]): Promise<DetectedInstalledAgent[]>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectInstalledAgents = detectInstalledAgents;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const promises_1 = require("fs/promises");
|
|
6
|
+
const which_1 = tslib_1.__importDefault(require("which"));
|
|
7
|
+
const logger_1 = require("../../../utils/logger");
|
|
8
|
+
async function isExecutable(path) {
|
|
9
|
+
try {
|
|
10
|
+
await (0, promises_1.access)(path, promises_1.constants.X_OK);
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
catch (err) {
|
|
14
|
+
// EACCES on an existing path means "this looks installed but we can't
|
|
15
|
+
// execute it" — surface so the user can answer "why isn't my agent
|
|
16
|
+
// detected?" without grep-debugging the filesystem.
|
|
17
|
+
const code = err?.code;
|
|
18
|
+
if (code && code !== 'ENOENT') {
|
|
19
|
+
logger_1.logger.verbose(`Agent detection: cannot probe ${path} (${code}).`);
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async function findOnPath(binaryNames) {
|
|
25
|
+
for (const name of binaryNames) {
|
|
26
|
+
// `{ nothrow: true }` avoids the throw-per-missing-binary overhead;
|
|
27
|
+
// EACCES on existing-but-unexecutable paths is handled by `isExecutable`.
|
|
28
|
+
const found = await (0, which_1.default)(name, { nothrow: true });
|
|
29
|
+
if (typeof found === 'string') {
|
|
30
|
+
return found;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
async function detectOne(definition) {
|
|
36
|
+
const onPath = await findOnPath(definition.binaryNames);
|
|
37
|
+
if (onPath) {
|
|
38
|
+
return {
|
|
39
|
+
id: definition.id,
|
|
40
|
+
displayName: definition.displayName,
|
|
41
|
+
binary: onPath,
|
|
42
|
+
source: 'path',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
for (const candidate of definition.wellKnownPaths()) {
|
|
46
|
+
if (await isExecutable(candidate)) {
|
|
47
|
+
return {
|
|
48
|
+
id: definition.id,
|
|
49
|
+
displayName: definition.displayName,
|
|
50
|
+
binary: candidate,
|
|
51
|
+
source: 'well-known',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Probes each given agent definition for an installed binary on the user's
|
|
59
|
+
* machine. PATH is checked first via `which` (which handles Windows PATHEXT),
|
|
60
|
+
* then the per-agent well-known fallback paths. Probes run in parallel.
|
|
61
|
+
*
|
|
62
|
+
* Returns only the agents that were found, preserving the order of the input
|
|
63
|
+
* `definitions` argument for callers that rely on it for picker presentation.
|
|
64
|
+
*/
|
|
65
|
+
async function detectInstalledAgents(definitions) {
|
|
66
|
+
const results = await Promise.all(definitions.map(detectOne));
|
|
67
|
+
return results.filter((result) => result !== null);
|
|
68
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare function isHandoffGitignoreMigration(m: {
|
|
2
|
+
package: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Under `--agentic`, the runner writes per-run scratch under
|
|
7
|
+
* `.nx/migrate-runs/<run-id>/`. The v23 migration
|
|
8
|
+
* `23-0-0-add-migrate-runs-to-git-ignore` adds `.nx/migrate-runs` to
|
|
9
|
+
* `.gitignore`; without intervention it would run in its declared slot
|
|
10
|
+
* (typically late), so earlier per-migration commits would absorb the
|
|
11
|
+
* scratch into the user-visible diff.
|
|
12
|
+
*
|
|
13
|
+
* Two paths cover the leak, with no overlap:
|
|
14
|
+
*
|
|
15
|
+
* 1. HOIST — handled by the sort comparator in `executeMigrations`. When
|
|
16
|
+
* the v23 migration is in the queue, it sorts to position 0 and runs
|
|
17
|
+
* first via the normal migration runner (with its own log line and
|
|
18
|
+
* commit). Fully traceable in `git log`.
|
|
19
|
+
*
|
|
20
|
+
* 2. INLINE FALLBACK — this function. When the migration is NOT in the
|
|
21
|
+
* queue AND the highest target version is < v23 (intra-pre-v23
|
|
22
|
+
* `--agentic` run), the migration won't run at all. Apply its body
|
|
23
|
+
* inline against an `FsTree` and commit it as a standalone preflight
|
|
24
|
+
* commit (or leave in the working tree under `--no-create-commits`).
|
|
25
|
+
*
|
|
26
|
+
* When the migration is not in the queue AND target >= v23, the user is
|
|
27
|
+
* past v23 already. They had the entry historically; if it's gone, that's
|
|
28
|
+
* a conscious removal we respect.
|
|
29
|
+
*/
|
|
30
|
+
export declare function applyAgenticHandoffGitignoreFallback({ migrations, installedNxVersion, effectiveCreateCommits, commitPrefix, root, }: {
|
|
31
|
+
migrations: ReadonlyArray<{
|
|
32
|
+
package: string;
|
|
33
|
+
name: string;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* The version of `nx` currently installed in the workspace. After
|
|
37
|
+
* `nx migrate latest` runs (the step before `--run-migrations`), this is
|
|
38
|
+
* the target nx version. We use it as the v23 cutoff instead of walking
|
|
39
|
+
* the migration list: any third-party plugin migration with a `23.x`
|
|
40
|
+
* version is irrelevant to whether `nx` itself crossed v23.
|
|
41
|
+
*/
|
|
42
|
+
installedNxVersion: string;
|
|
43
|
+
effectiveCreateCommits: boolean;
|
|
44
|
+
commitPrefix: string;
|
|
45
|
+
root: string;
|
|
46
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isHandoffGitignoreMigration = isHandoffGitignoreMigration;
|
|
4
|
+
exports.applyAgenticHandoffGitignoreFallback = applyAgenticHandoffGitignoreFallback;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const semver_1 = require("semver");
|
|
7
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
8
|
+
const add_migrate_runs_to_git_ignore_1 = tslib_1.__importDefault(require("../../../migrations/update-23-0-0/add-migrate-runs-to-git-ignore"));
|
|
9
|
+
const tree_1 = require("../../../generators/tree");
|
|
10
|
+
const git_utils_1 = require("../../../utils/git-utils");
|
|
11
|
+
const logger_1 = require("../../../utils/logger");
|
|
12
|
+
/**
|
|
13
|
+
* Composite identity of the v23 migration that adds `.nx/migrate-runs` to
|
|
14
|
+
* `.gitignore`. Hard-coded because the agentic preflight is a deliberate
|
|
15
|
+
* one-off coupling: this exact migration owns the entry that keeps
|
|
16
|
+
* `.nx/migrate-runs/<run-id>/...` scratch out of per-migration commits. If
|
|
17
|
+
* the migration is ever renamed, this entry must move with it.
|
|
18
|
+
*/
|
|
19
|
+
const HANDOFF_GITIGNORE_MIGRATION_PACKAGE = 'nx';
|
|
20
|
+
const HANDOFF_GITIGNORE_MIGRATION_NAME = '23-0-0-add-migrate-runs-to-git-ignore';
|
|
21
|
+
function isHandoffGitignoreMigration(m) {
|
|
22
|
+
return (m.package === HANDOFF_GITIGNORE_MIGRATION_PACKAGE &&
|
|
23
|
+
m.name === HANDOFF_GITIGNORE_MIGRATION_NAME);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Under `--agentic`, the runner writes per-run scratch under
|
|
27
|
+
* `.nx/migrate-runs/<run-id>/`. The v23 migration
|
|
28
|
+
* `23-0-0-add-migrate-runs-to-git-ignore` adds `.nx/migrate-runs` to
|
|
29
|
+
* `.gitignore`; without intervention it would run in its declared slot
|
|
30
|
+
* (typically late), so earlier per-migration commits would absorb the
|
|
31
|
+
* scratch into the user-visible diff.
|
|
32
|
+
*
|
|
33
|
+
* Two paths cover the leak, with no overlap:
|
|
34
|
+
*
|
|
35
|
+
* 1. HOIST — handled by the sort comparator in `executeMigrations`. When
|
|
36
|
+
* the v23 migration is in the queue, it sorts to position 0 and runs
|
|
37
|
+
* first via the normal migration runner (with its own log line and
|
|
38
|
+
* commit). Fully traceable in `git log`.
|
|
39
|
+
*
|
|
40
|
+
* 2. INLINE FALLBACK — this function. When the migration is NOT in the
|
|
41
|
+
* queue AND the highest target version is < v23 (intra-pre-v23
|
|
42
|
+
* `--agentic` run), the migration won't run at all. Apply its body
|
|
43
|
+
* inline against an `FsTree` and commit it as a standalone preflight
|
|
44
|
+
* commit (or leave in the working tree under `--no-create-commits`).
|
|
45
|
+
*
|
|
46
|
+
* When the migration is not in the queue AND target >= v23, the user is
|
|
47
|
+
* past v23 already. They had the entry historically; if it's gone, that's
|
|
48
|
+
* a conscious removal we respect.
|
|
49
|
+
*/
|
|
50
|
+
async function applyAgenticHandoffGitignoreFallback({ migrations, installedNxVersion, effectiveCreateCommits, commitPrefix, root, }) {
|
|
51
|
+
if (migrations.some(isHandoffGitignoreMigration)) {
|
|
52
|
+
// The hoist path handles this via the sort comparator.
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if ((0, semver_1.major)(installedNxVersion) >= 23) {
|
|
56
|
+
// User is past v23. Respect their `.gitignore` state — if the entry
|
|
57
|
+
// is missing, that's a conscious removal.
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const tree = new tree_1.FsTree(root, false);
|
|
61
|
+
await (0, add_migrate_runs_to_git_ignore_1.default)(tree);
|
|
62
|
+
const changes = tree.listChanges();
|
|
63
|
+
if (changes.length === 0) {
|
|
64
|
+
// Migration body short-circuited (no `.gitignore`, Lerna without nx.json,
|
|
65
|
+
// or the entry is already covered by an existing pattern).
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
(0, tree_1.flushChanges)(root, changes);
|
|
69
|
+
logger_1.logger.info(pc.dim(`- Added .nx/migrate-runs to .gitignore so this --agentic run's handoff scratch is ignored.`));
|
|
70
|
+
if (!effectiveCreateCommits)
|
|
71
|
+
return;
|
|
72
|
+
if (!(0, git_utils_1.hasUncommittedChanges)(root))
|
|
73
|
+
return;
|
|
74
|
+
try {
|
|
75
|
+
const sha = (0, git_utils_1.tryCommitChanges)(`${commitPrefix}add .nx/migrate-runs to .gitignore`, root);
|
|
76
|
+
if (sha) {
|
|
77
|
+
logger_1.logger.info(pc.dim(` Commit: ${sha}`));
|
|
78
|
+
}
|
|
79
|
+
// `null` return = commit landed but `git rev-parse HEAD` raced. The
|
|
80
|
+
// diff cleared from the working tree; nothing more to say.
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
84
|
+
logger_1.logger.info(pc.yellow(`Could not create the agentic preflight commit:\n${reason}\n` +
|
|
85
|
+
`The .gitignore change remains in the working tree; commit it manually or it will be absorbed into the first per-migration commit.`));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { HandoffFile } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Workspace-relative directory holding all migrate-run scratch (handoff
|
|
4
|
+
* files). Shared with the agent permission rules in `definitions.ts` so the
|
|
5
|
+
* pre-authorized write scope can't drift from the actual layout.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MIGRATE_RUNS_RELATIVE_DIR = ".nx/migrate-runs";
|
|
8
|
+
/** Returns the run directory for a given workspace + run id (target version). */
|
|
9
|
+
export declare function runDirPath(workspaceRoot: string, runId: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* `mkdir -p` with a contextual error wrapper. Without this, the raw
|
|
12
|
+
* ENOSPC/EACCES/EROFS surfaces with no indication of which directory the
|
|
13
|
+
* migrate orchestrator was trying to create.
|
|
14
|
+
*/
|
|
15
|
+
export declare function mkdirSafely(dir: string, purpose: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Wipes any prior contents for this run id and recreates an empty directory.
|
|
18
|
+
*
|
|
19
|
+
* Scope of the wipe is intentionally narrow (only `<run-id>/`) so that handoff
|
|
20
|
+
* artifacts from prior runs targeting different versions remain on disk for
|
|
21
|
+
* inspection.
|
|
22
|
+
*/
|
|
23
|
+
export declare function initRunDir(workspaceRoot: string, runId: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Absolute path of the handoff file for a migration step within a run.
|
|
26
|
+
* The package's scope (if any) becomes a real subdirectory so the package name
|
|
27
|
+
* stays readable; two packages can ship a migration with the same name without
|
|
28
|
+
* colliding because they land in different package subdirectories. Each
|
|
29
|
+
* segment is sanitized so the path is always writable on every platform.
|
|
30
|
+
*/
|
|
31
|
+
export declare function stepHandoffPath(runDir: string, migration: {
|
|
32
|
+
package: string;
|
|
33
|
+
name: string;
|
|
34
|
+
}): string;
|
|
35
|
+
export type HandoffReadFailureReason = 'missing' | 'read-error' | 'parse-error' | 'shape-mismatch';
|
|
36
|
+
export type HandoffReadResult = {
|
|
37
|
+
ok: true;
|
|
38
|
+
handoff: HandoffFile;
|
|
39
|
+
} | {
|
|
40
|
+
ok: false;
|
|
41
|
+
reason: HandoffReadFailureReason;
|
|
42
|
+
detail?: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Reads and validates a handoff file written by an agent. Returns a tagged
|
|
46
|
+
* result so callers (the in-loop poller and the post-exit resolver) can
|
|
47
|
+
* distinguish "file not yet written" from "file written but garbage" — the
|
|
48
|
+
* latter is surfaced to the user instead of being collapsed into the same
|
|
49
|
+
* generic ambiguous-outcome prompt.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readHandoffWithReason(filePath: string): HandoffReadResult;
|
|
52
|
+
/**
|
|
53
|
+
* Convenience wrapper preserving the original null-on-any-failure contract.
|
|
54
|
+
* Used by the polling loop (`waitForValidHandoff`) where every failure mode
|
|
55
|
+
* is "keep waiting" — the file may be missing, mid-write, or being rewritten.
|
|
56
|
+
*/
|
|
57
|
+
export declare function readHandoff(filePath: string): HandoffFile | null;
|
|
58
|
+
/**
|
|
59
|
+
* Polls for a valid handoff file. Resolves once `readHandoff` accepts the
|
|
60
|
+
* file's contents. Used to detect when the agent has finished its work so the
|
|
61
|
+
* orchestrator can close the agent's session without depending on the agent
|
|
62
|
+
* exiting on its own.
|
|
63
|
+
*
|
|
64
|
+
* Rejects with the abort reason when `options.signal` is aborted.
|
|
65
|
+
*/
|
|
66
|
+
export declare function waitForValidHandoff(handoffFilePath: string, options?: {
|
|
67
|
+
intervalMs?: number;
|
|
68
|
+
signal?: AbortSignal;
|
|
69
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MIGRATE_RUNS_RELATIVE_DIR = void 0;
|
|
4
|
+
exports.runDirPath = runDirPath;
|
|
5
|
+
exports.mkdirSafely = mkdirSafely;
|
|
6
|
+
exports.initRunDir = initRunDir;
|
|
7
|
+
exports.stepHandoffPath = stepHandoffPath;
|
|
8
|
+
exports.readHandoffWithReason = readHandoffWithReason;
|
|
9
|
+
exports.readHandoff = readHandoff;
|
|
10
|
+
exports.waitForValidHandoff = waitForValidHandoff;
|
|
11
|
+
const fs_1 = require("fs");
|
|
12
|
+
const path_1 = require("path");
|
|
13
|
+
/**
|
|
14
|
+
* Workspace-relative directory holding all migrate-run scratch (handoff
|
|
15
|
+
* files). Shared with the agent permission rules in `definitions.ts` so the
|
|
16
|
+
* pre-authorized write scope can't drift from the actual layout.
|
|
17
|
+
*/
|
|
18
|
+
exports.MIGRATE_RUNS_RELATIVE_DIR = '.nx/migrate-runs';
|
|
19
|
+
/** Returns the run directory for a given workspace + run id (target version). */
|
|
20
|
+
function runDirPath(workspaceRoot, runId) {
|
|
21
|
+
return (0, path_1.join)(workspaceRoot, exports.MIGRATE_RUNS_RELATIVE_DIR, runId);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* `mkdir -p` with a contextual error wrapper. Without this, the raw
|
|
25
|
+
* ENOSPC/EACCES/EROFS surfaces with no indication of which directory the
|
|
26
|
+
* migrate orchestrator was trying to create.
|
|
27
|
+
*/
|
|
28
|
+
function mkdirSafely(dir, purpose) {
|
|
29
|
+
try {
|
|
30
|
+
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
const code = err?.code;
|
|
34
|
+
// `{ cause }` preserves the original ErrnoException so callers can read
|
|
35
|
+
// `.cause.code`/`.cause.path`/`.cause.syscall` for targeted remediation.
|
|
36
|
+
// Without it the only signal beyond the formatted message would be the
|
|
37
|
+
// code string we splice in below.
|
|
38
|
+
throw new Error(`Could not create ${purpose} at ${dir}${code ? ` (${code})` : ''}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Wipes any prior contents for this run id and recreates an empty directory.
|
|
43
|
+
*
|
|
44
|
+
* Scope of the wipe is intentionally narrow (only `<run-id>/`) so that handoff
|
|
45
|
+
* artifacts from prior runs targeting different versions remain on disk for
|
|
46
|
+
* inspection.
|
|
47
|
+
*/
|
|
48
|
+
function initRunDir(workspaceRoot, runId) {
|
|
49
|
+
const dir = runDirPath(workspaceRoot, runId);
|
|
50
|
+
(0, fs_1.rmSync)(dir, { recursive: true, force: true });
|
|
51
|
+
mkdirSafely(dir, 'nx migrate run directory');
|
|
52
|
+
return dir;
|
|
53
|
+
}
|
|
54
|
+
// Windows reserved device names fail to open even with an extension —
|
|
55
|
+
// a migration named `CON` would otherwise produce a `CON.json` that the
|
|
56
|
+
// agent can't write to.
|
|
57
|
+
const WINDOWS_RESERVED_NAMES = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i;
|
|
58
|
+
/**
|
|
59
|
+
* The bare `.` / `..` check must come first — otherwise a malformed migration
|
|
60
|
+
* name of exactly `..` would let the handoff write escape the run directory.
|
|
61
|
+
*/
|
|
62
|
+
function sanitizeSegment(value) {
|
|
63
|
+
if (value === '.' || value === '..')
|
|
64
|
+
return '_';
|
|
65
|
+
let sanitized = value.replace(/[\x00-\x1f<>:"/\\|?*]/g, '_');
|
|
66
|
+
// Windows forbids trailing dots/spaces on file/directory names.
|
|
67
|
+
sanitized = sanitized.replace(/[. ]+$/, '');
|
|
68
|
+
if (WINDOWS_RESERVED_NAMES.test(sanitized)) {
|
|
69
|
+
sanitized = `_${sanitized}`;
|
|
70
|
+
}
|
|
71
|
+
return sanitized || '_';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Absolute path of the handoff file for a migration step within a run.
|
|
75
|
+
* The package's scope (if any) becomes a real subdirectory so the package name
|
|
76
|
+
* stays readable; two packages can ship a migration with the same name without
|
|
77
|
+
* colliding because they land in different package subdirectories. Each
|
|
78
|
+
* segment is sanitized so the path is always writable on every platform.
|
|
79
|
+
*/
|
|
80
|
+
function stepHandoffPath(runDir, migration) {
|
|
81
|
+
return (0, path_1.join)(runDir, ...migration.package.split('/').map(sanitizeSegment), `${sanitizeSegment(migration.name)}.json`);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Reads and validates a handoff file written by an agent. Returns a tagged
|
|
85
|
+
* result so callers (the in-loop poller and the post-exit resolver) can
|
|
86
|
+
* distinguish "file not yet written" from "file written but garbage" — the
|
|
87
|
+
* latter is surfaced to the user instead of being collapsed into the same
|
|
88
|
+
* generic ambiguous-outcome prompt.
|
|
89
|
+
*/
|
|
90
|
+
function readHandoffWithReason(filePath) {
|
|
91
|
+
let raw;
|
|
92
|
+
try {
|
|
93
|
+
raw = (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
const code = err?.code;
|
|
97
|
+
if (code === 'ENOENT')
|
|
98
|
+
return { ok: false, reason: 'missing' };
|
|
99
|
+
return {
|
|
100
|
+
ok: false,
|
|
101
|
+
reason: 'read-error',
|
|
102
|
+
detail: err instanceof Error ? err.message : String(err),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
let parsed;
|
|
106
|
+
try {
|
|
107
|
+
parsed = JSON.parse(raw);
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
return {
|
|
111
|
+
ok: false,
|
|
112
|
+
reason: 'parse-error',
|
|
113
|
+
detail: err instanceof Error ? err.message : String(err),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (!parsed ||
|
|
117
|
+
typeof parsed !== 'object' ||
|
|
118
|
+
Array.isArray(parsed) ||
|
|
119
|
+
typeof parsed.summary !== 'string') {
|
|
120
|
+
return { ok: false, reason: 'shape-mismatch' };
|
|
121
|
+
}
|
|
122
|
+
const obj = parsed;
|
|
123
|
+
const status = obj.status;
|
|
124
|
+
const summary = obj.summary;
|
|
125
|
+
if (status !== 'success' && status !== 'failed') {
|
|
126
|
+
return { ok: false, reason: 'shape-mismatch' };
|
|
127
|
+
}
|
|
128
|
+
// Null-prototype object guards against a prototype-pollution gadget:
|
|
129
|
+
// JSON.parse materializes `__proto__` as an own enumerable property, and
|
|
130
|
+
// a rest-spread would carry it through to wherever extras gets merged.
|
|
131
|
+
const extras = Object.create(null);
|
|
132
|
+
for (const key of Object.keys(obj)) {
|
|
133
|
+
if (key === 'status' || key === 'summary')
|
|
134
|
+
continue;
|
|
135
|
+
extras[key] = obj[key];
|
|
136
|
+
}
|
|
137
|
+
const handoff = { status, summary: summary };
|
|
138
|
+
if (Object.keys(extras).length > 0) {
|
|
139
|
+
handoff.extras = extras;
|
|
140
|
+
}
|
|
141
|
+
return { ok: true, handoff };
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Convenience wrapper preserving the original null-on-any-failure contract.
|
|
145
|
+
* Used by the polling loop (`waitForValidHandoff`) where every failure mode
|
|
146
|
+
* is "keep waiting" — the file may be missing, mid-write, or being rewritten.
|
|
147
|
+
*/
|
|
148
|
+
function readHandoff(filePath) {
|
|
149
|
+
const result = readHandoffWithReason(filePath);
|
|
150
|
+
return result.ok ? result.handoff : null;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Polls for a valid handoff file. Resolves once `readHandoff` accepts the
|
|
154
|
+
* file's contents. Used to detect when the agent has finished its work so the
|
|
155
|
+
* orchestrator can close the agent's session without depending on the agent
|
|
156
|
+
* exiting on its own.
|
|
157
|
+
*
|
|
158
|
+
* Rejects with the abort reason when `options.signal` is aborted.
|
|
159
|
+
*/
|
|
160
|
+
function waitForValidHandoff(handoffFilePath, options = {}) {
|
|
161
|
+
const intervalMs = options.intervalMs ?? 500;
|
|
162
|
+
const { signal } = options;
|
|
163
|
+
return new Promise((resolve, reject) => {
|
|
164
|
+
if (signal?.aborted) {
|
|
165
|
+
reject(signal.reason ?? new Error('aborted'));
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
let timer;
|
|
169
|
+
const onAbort = () => {
|
|
170
|
+
if (timer)
|
|
171
|
+
clearTimeout(timer);
|
|
172
|
+
signal?.removeEventListener('abort', onAbort);
|
|
173
|
+
reject(signal.reason ?? new Error('aborted'));
|
|
174
|
+
};
|
|
175
|
+
const tick = () => {
|
|
176
|
+
if (signal?.aborted) {
|
|
177
|
+
onAbort();
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (readHandoff(handoffFilePath) !== null) {
|
|
181
|
+
signal?.removeEventListener('abort', onAbort);
|
|
182
|
+
resolve();
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
timer = setTimeout(tick, intervalMs);
|
|
186
|
+
};
|
|
187
|
+
signal?.addEventListener('abort', onAbort);
|
|
188
|
+
timer = setTimeout(tick, intervalMs);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true when `nx migrate` is itself being run from inside another AI
|
|
3
|
+
* agent's terminal session. Used to short-circuit the agentic flow so we never
|
|
4
|
+
* spawn an inner agent inside an outer agent.
|
|
5
|
+
*
|
|
6
|
+
* Native `isAiAgent()` covers all supported agents (Claude Code, Cursor,
|
|
7
|
+
* OpenCode, Codex, Gemini, Replit) via parent-process env-var sniffing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isInsideAgent(): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInsideAgent = isInsideAgent;
|
|
4
|
+
const native_1 = require("../../../native");
|
|
5
|
+
/**
|
|
6
|
+
* Returns true when `nx migrate` is itself being run from inside another AI
|
|
7
|
+
* agent's terminal session. Used to short-circuit the agentic flow so we never
|
|
8
|
+
* spawn an inner agent inside an outer agent.
|
|
9
|
+
*
|
|
10
|
+
* Native `isAiAgent()` covers all supported agents (Claude Code, Cursor,
|
|
11
|
+
* OpenCode, Codex, Gemini, Replit) via parent-process env-var sniffing.
|
|
12
|
+
*/
|
|
13
|
+
function isInsideAgent() {
|
|
14
|
+
return (0, native_1.isAiAgent)();
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surfaces a migration's `agentContext` to stdout in an XML-tagged block so an
|
|
3
|
+
* outer AI agent driving `nx migrate` can ingest the hints when no inner agent
|
|
4
|
+
* step ran to consume them.
|
|
5
|
+
*
|
|
6
|
+
* Used only when `agentic.kind === 'inside-agent'`. Under `enabled`, the inner
|
|
7
|
+
* step consumes `agentContext` via the prompt builders. Under `disabled` the
|
|
8
|
+
* run is human-driven and printing agent-targeted context would only add noise.
|
|
9
|
+
*
|
|
10
|
+
* The label format is unambiguous so the outer agent can locate the block
|
|
11
|
+
* within the mixed stdout stream (logger output, migration progress, etc.).
|
|
12
|
+
*/
|
|
13
|
+
export interface DroppedAgentContextInput {
|
|
14
|
+
migration: {
|
|
15
|
+
package: string;
|
|
16
|
+
name: string;
|
|
17
|
+
prompt?: string;
|
|
18
|
+
};
|
|
19
|
+
agentContext: string[];
|
|
20
|
+
}
|
|
21
|
+
export declare function formatDroppedAgentContextForOuterAgent(input: DroppedAgentContextInput): string;
|
|
22
|
+
export declare function printDroppedAgentContextForOuterAgent(input: DroppedAgentContextInput): void;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatDroppedAgentContextForOuterAgent = formatDroppedAgentContextForOuterAgent;
|
|
4
|
+
exports.printDroppedAgentContextForOuterAgent = printDroppedAgentContextForOuterAgent;
|
|
5
|
+
const shared_rendering_1 = require("./prompts/shared-rendering");
|
|
6
|
+
function formatDroppedAgentContextForOuterAgent(input) {
|
|
7
|
+
const entries = (0, shared_rendering_1.filterNonEmptyStrings)(input.agentContext);
|
|
8
|
+
if (entries.length === 0) {
|
|
9
|
+
return '';
|
|
10
|
+
}
|
|
11
|
+
const id = `${input.migration.package}:${input.migration.name}`;
|
|
12
|
+
// Migration metadata and agentContext entries are user-authored (migrations
|
|
13
|
+
// are published by third-party packages); escape any `<` / `&` so a hostile
|
|
14
|
+
// value can't break out of the surrounding XML-framed block. The agent
|
|
15
|
+
// reads `</agent_context>` as literal text, not a closing tag.
|
|
16
|
+
const safeName = (0, shared_rendering_1.escapeXmlBody)(input.migration.name);
|
|
17
|
+
const safePrompt = input.migration.prompt
|
|
18
|
+
? (0, shared_rendering_1.escapeXmlBody)(input.migration.prompt)
|
|
19
|
+
: undefined;
|
|
20
|
+
const preamble = safePrompt
|
|
21
|
+
? `ℹ Hints from the ${safeName} generator for the AI agent driving this run, when applying ${safePrompt}:`
|
|
22
|
+
: `ℹ Hints from the ${safeName} generator for the AI agent driving this run:`;
|
|
23
|
+
return [
|
|
24
|
+
preamble,
|
|
25
|
+
``,
|
|
26
|
+
`<agent_context migration="${escapeXmlAttr(id)}">`,
|
|
27
|
+
...entries.map((entry) => (0, shared_rendering_1.renderListItem)((0, shared_rendering_1.escapeXmlBody)(entry))),
|
|
28
|
+
`</agent_context>`,
|
|
29
|
+
].join('\n');
|
|
30
|
+
}
|
|
31
|
+
// Migration package/name come from arbitrary user-authored package.json /
|
|
32
|
+
// migrations.json — a name with `"` / `<` / `>` / `&` would produce malformed
|
|
33
|
+
// XML the outer agent can't parse. `'` is not strictly required for
|
|
34
|
+
// double-quoted attribute values but is included for defense.
|
|
35
|
+
function escapeXmlAttr(value) {
|
|
36
|
+
return value
|
|
37
|
+
.replace(/&/g, '&')
|
|
38
|
+
.replace(/</g, '<')
|
|
39
|
+
.replace(/>/g, '>')
|
|
40
|
+
.replace(/"/g, '"')
|
|
41
|
+
.replace(/'/g, ''');
|
|
42
|
+
}
|
|
43
|
+
function printDroppedAgentContextForOuterAgent(input) {
|
|
44
|
+
const block = formatDroppedAgentContextForOuterAgent(input);
|
|
45
|
+
if (block) {
|
|
46
|
+
// Bare newline pair frames the block so adjacent stdout (logger output,
|
|
47
|
+
// migration progress) doesn't run into the opening or closing tag.
|
|
48
|
+
process.stdout.write(`\n${block}\n\n`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { FileChange } from '../../../../generators/tree';
|
|
2
|
+
export interface GenericValidationPromptContext {
|
|
3
|
+
package: string;
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Absolute path the agent must write its handoff file to. */
|
|
8
|
+
handoffFileAbsolutePath: string;
|
|
9
|
+
/**
|
|
10
|
+
* Path to the migration's documentation file, if any - workspace-relative,
|
|
11
|
+
* or absolute when it resolves outside the workspace.
|
|
12
|
+
*/
|
|
13
|
+
documentationPath?: string;
|
|
14
|
+
/** Context captured from the deterministic generator phase. */
|
|
15
|
+
impl: {
|
|
16
|
+
/** Raw output from the generator (devkit logger + console). */
|
|
17
|
+
logs?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Files the generator changed. Rendered inside `<files_changed>` as a
|
|
20
|
+
* `[TYPE] path` list — only when `hasDiffContext` is false; when true the
|
|
21
|
+
* agent is instead instructed to inspect via git.
|
|
22
|
+
*/
|
|
23
|
+
changes: FileChange[];
|
|
24
|
+
/** Strings the generator author put in `agentContext`. */
|
|
25
|
+
agentContext?: string[];
|
|
26
|
+
/**
|
|
27
|
+
* True when per-migration commits are in effect (git repo + commits
|
|
28
|
+
* enabled). The prompt instructs the agent to use `git status`/`git diff`
|
|
29
|
+
* for the file list. When false (no git, or commits disabled), the
|
|
30
|
+
* `<files_changed>` block is embedded with `changes` instead.
|
|
31
|
+
*/
|
|
32
|
+
hasDiffContext: boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Cap on the number of file entries rendered verbatim inside `<files_changed>`
|
|
37
|
+
* when the embedded-list path is used (no per-migration commits / no git).
|
|
38
|
+
* Excess entries collapse into a `… and N more files.` line.
|
|
39
|
+
*/
|
|
40
|
+
export declare const GENERIC_VALIDATION_FILE_LIST_CAP = 50;
|
|
41
|
+
/**
|
|
42
|
+
* Builds the user prompt for the framework-owned generic-validation agent step
|
|
43
|
+
* that runs after a generator-only migration produces changes (when `--validate`
|
|
44
|
+
* is enabled and `--agentic` resolves to an enabled agent).
|
|
45
|
+
*
|
|
46
|
+
* Differences from `buildHybridPromptUserPrompt`:
|
|
47
|
+
* - No `<instructions_file>` block — the framework owns the instructions, and
|
|
48
|
+
* they live inline in `<validation_instructions>` below.
|
|
49
|
+
* - No `<precedence>` block — there's no external instructions file to defer
|
|
50
|
+
* to.
|
|
51
|
+
* - File-list cap: when the diff exceeds `GENERIC_VALIDATION_FILE_LIST_CAP`,
|
|
52
|
+
* the first N entries render verbatim and the remainder collapses into a
|
|
53
|
+
* `… and N more files.` count line.
|
|
54
|
+
* - The lead sentence frames the agent as a validator, not an applier.
|
|
55
|
+
*/
|
|
56
|
+
export declare function buildGenericValidationUserPrompt(ctx: GenericValidationPromptContext): string;
|