@ohos-ports/nx 23.2.1-beta.0 → 23.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +60 -13
- package/dist/bin/init-local.d.ts +8 -0
- package/dist/bin/init-local.js +192 -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 +341 -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/nx-cloud-internals.d.ts +1 -0
- package/dist/nx-cloud-internals.js +9 -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 +114 -0
- package/dist/release/changelog-renderer/index.js +397 -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 +1083 -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 +46 -0
- package/dist/src/ai/constants.js +92 -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 +578 -0
- package/dist/src/ai/utils.d.ts +33 -0
- package/dist/src/ai/utils.js +246 -0
- package/dist/src/analytics/analytics.d.ts +16 -0
- package/dist/src/analytics/analytics.js +246 -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 +142 -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 +151 -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 +102 -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 +436 -0
- package/dist/src/command-line/daemon/command-object.d.ts +3 -0
- package/dist/src/command-line/daemon/command-object.js +29 -0
- package/dist/src/command-line/daemon/daemon.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 +200 -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 +25 -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 +101 -0
- package/dist/src/command-line/graph/graph.js +1080 -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 +590 -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 +30 -0
- package/dist/src/command-line/init/command-object.d.ts +2 -0
- package/dist/src/command-line/init/command-object.js +118 -0
- package/dist/src/command-line/init/configure-plugins.d.ts +34 -0
- package/dist/src/command-line/init/configure-plugins.js +214 -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 +119 -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 +350 -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 +67 -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 +37 -0
- package/dist/src/command-line/init/implementation/angular/index.d.ts +2 -0
- package/dist/src/command-line/init/implementation/angular/index.js +127 -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 +152 -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 +204 -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 +136 -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 +151 -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/format.d.ts +18 -0
- package/dist/src/command-line/init/implementation/format.js +113 -0
- package/dist/src/command-line/init/implementation/utils.d.ts +34 -0
- package/dist/src/command-line/init/implementation/utils.js +419 -0
- package/dist/src/command-line/init/init-v1.d.ts +8 -0
- package/dist/src/command-line/init/init-v1.js +101 -0
- package/dist/src/command-line/init/init-v2.d.ts +23 -0
- package/dist/src/command-line/init/init-v2.js +619 -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 +47 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +216 -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/close-agent-session.d.ts +21 -0
- package/dist/src/command-line/migrate/agentic/close-agent-session.js +126 -0
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +30 -0
- package/dist/src/command-line/migrate/agentic/definitions.js +207 -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/format-command.d.ts +14 -0
- package/dist/src/command-line/migrate/agentic/format-command.js +44 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +61 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +78 -0
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +102 -0
- package/dist/src/command-line/migrate/agentic/handoff.js +335 -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/instruction-files.d.ts +23 -0
- package/dist/src/command-line/migrate/agentic/instruction-files.js +41 -0
- package/dist/src/command-line/migrate/agentic/master/invocations.d.ts +12 -0
- package/dist/src/command-line/migrate/agentic/master/invocations.js +54 -0
- package/dist/src/command-line/migrate/agentic/master/run-master-session.d.ts +16 -0
- package/dist/src/command-line/migrate/agentic/master/run-master-session.js +175 -0
- package/dist/src/command-line/migrate/agentic/master/spawn-master.d.ts +31 -0
- package/dist/src/command-line/migrate/agentic/master/spawn-master.js +222 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +17 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +57 -0
- package/dist/src/command-line/migrate/agentic/prompts/final-validation.d.ts +13 -0
- package/dist/src/command-line/migrate/agentic/prompts/final-validation.js +41 -0
- package/dist/src/command-line/migrate/agentic/prompts/fragments.d.ts +17 -0
- package/dist/src/command-line/migrate/agentic/prompts/fragments.js +90 -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 +67 -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 +70 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +113 -0
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +68 -0
- package/dist/src/command-line/migrate/agentic/run-step.js +148 -0
- package/dist/src/command-line/migrate/agentic/runner.d.ts +21 -0
- package/dist/src/command-line/migrate/agentic/runner.js +262 -0
- package/dist/src/command-line/migrate/agentic/select.d.ts +24 -0
- package/dist/src/command-line/migrate/agentic/select.js +251 -0
- package/dist/src/command-line/migrate/agentic/terminal-repair.d.ts +1 -0
- package/dist/src/command-line/migrate/agentic/terminal-repair.js +27 -0
- package/dist/src/command-line/migrate/agentic/types.d.ts +147 -0
- package/dist/src/command-line/migrate/agentic/types.js +40 -0
- package/dist/src/command-line/migrate/agentic/windows-cmd.d.ts +33 -0
- package/dist/src/command-line/migrate/agentic/windows-cmd.js +88 -0
- package/dist/src/command-line/migrate/command-object.d.ts +55 -0
- package/dist/src/command-line/migrate/command-object.js +162 -0
- package/dist/src/command-line/migrate/deferred-output.d.ts +44 -0
- package/dist/src/command-line/migrate/deferred-output.js +92 -0
- package/dist/src/command-line/migrate/execute-migration.d.ts +97 -0
- package/dist/src/command-line/migrate/execute-migration.js +511 -0
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +131 -0
- package/dist/src/command-line/migrate/migrate-analytics.js +378 -0
- package/dist/src/command-line/migrate/migrate-commits.d.ts +81 -0
- package/dist/src/command-line/migrate/migrate-commits.js +227 -0
- package/dist/src/command-line/migrate/migrate-config.d.ts +32 -0
- package/dist/src/command-line/migrate/migrate-config.js +120 -0
- package/dist/src/command-line/migrate/migrate-output.d.ts +214 -0
- package/dist/src/command-line/migrate/migrate-output.js +298 -0
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +89 -0
- package/dist/src/command-line/migrate/migrate-ui-api.js +437 -0
- package/dist/src/command-line/migrate/migrate.d.ts +245 -0
- package/dist/src/command-line/migrate/migrate.js +2944 -0
- package/dist/src/command-line/migrate/migration-shape.d.ts +16 -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 +215 -0
- package/dist/src/command-line/migrate/prompt-files.d.ts +31 -0
- package/dist/src/command-line/migrate/prompt-files.js +134 -0
- package/dist/src/command-line/migrate/resolve-package-version.d.ts +24 -0
- package/dist/src/command-line/migrate/resolve-package-version.js +228 -0
- package/dist/src/command-line/migrate/run/agent-output.d.ts +31 -0
- package/dist/src/command-line/migrate/run/agent-output.js +84 -0
- package/dist/src/command-line/migrate/run/agent-work-payload.d.ts +37 -0
- package/dist/src/command-line/migrate/run/agent-work-payload.js +156 -0
- package/dist/src/command-line/migrate/run/atomic-write.d.ts +8 -0
- package/dist/src/command-line/migrate/run/atomic-write.js +17 -0
- package/dist/src/command-line/migrate/run/broker.d.ts +150 -0
- package/dist/src/command-line/migrate/run/broker.js +568 -0
- package/dist/src/command-line/migrate/run/clean-retry.d.ts +12 -0
- package/dist/src/command-line/migrate/run/clean-retry.js +99 -0
- package/dist/src/command-line/migrate/run/existing-run-report.d.ts +55 -0
- package/dist/src/command-line/migrate/run/existing-run-report.js +227 -0
- package/dist/src/command-line/migrate/run/give-up.d.ts +41 -0
- package/dist/src/command-line/migrate/run/give-up.js +148 -0
- package/dist/src/command-line/migrate/run/index.d.ts +12 -0
- package/dist/src/command-line/migrate/run/index.js +42 -0
- package/dist/src/command-line/migrate/run/issues.d.ts +127 -0
- package/dist/src/command-line/migrate/run/issues.js +1121 -0
- package/dist/src/command-line/migrate/run/orchestrator.d.ts +78 -0
- package/dist/src/command-line/migrate/run/orchestrator.js +2272 -0
- package/dist/src/command-line/migrate/run/run-id.d.ts +8 -0
- package/dist/src/command-line/migrate/run/run-id.js +26 -0
- package/dist/src/command-line/migrate/run/run-state.d.ts +217 -0
- package/dist/src/command-line/migrate/run/run-state.js +669 -0
- package/dist/src/command-line/migrate/run/runbook.d.ts +18 -0
- package/dist/src/command-line/migrate/run/runbook.js +118 -0
- package/dist/src/command-line/migrate/run/state-lock.d.ts +56 -0
- package/dist/src/command-line/migrate/run/state-lock.js +202 -0
- package/dist/src/command-line/migrate/run/state-machine.d.ts +133 -0
- package/dist/src/command-line/migrate/run/state-machine.js +628 -0
- package/dist/src/command-line/migrate/run/util.d.ts +61 -0
- package/dist/src/command-line/migrate/run/util.js +169 -0
- package/dist/src/command-line/migrate/run/worker.d.ts +16 -0
- package/dist/src/command-line/migrate/run/worker.js +843 -0
- package/dist/src/command-line/migrate/run-migration-process.js +110 -0
- package/dist/src/command-line/migrate/safe-prompt.d.ts +21 -0
- package/dist/src/command-line/migrate/safe-prompt.js +47 -0
- package/dist/src/command-line/migrate/sort-migrations.d.ts +16 -0
- package/dist/src/command-line/migrate/sort-migrations.js +32 -0
- package/dist/src/command-line/migrate/step-actions.d.ts +5 -0
- package/dist/src/command-line/migrate/step-actions.js +18 -0
- package/dist/src/command-line/migrate/text.d.ts +24 -0
- package/dist/src/command-line/migrate/text.js +51 -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-skew-guard.d.ts +60 -0
- package/dist/src/command-line/migrate/version-skew-guard.js +177 -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 +260 -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/start-nx-agents/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.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 +183 -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 +907 -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 +248 -0
- package/dist/src/command-line/release/publish.d.ts +9 -0
- package/dist/src/command-line/release/publish.js +298 -0
- package/dist/src/command-line/release/release.d.ts +5 -0
- package/dist/src/command-line/release/release.js +299 -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 +248 -0
- package/dist/src/command-line/release/utils/release-graph.js +769 -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 +333 -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 +259 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +113 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +172 -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 +41 -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 +139 -0
- package/dist/src/command-line/release/version/release-group-processor.js +706 -0
- package/dist/src/command-line/release/version/resolve-current-version.d.ts +32 -0
- package/dist/src/command-line/release/version/resolve-current-version.js +240 -0
- package/dist/src/command-line/release/version/topological-sort.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 +227 -0
- package/dist/src/command-line/release/version/version-actions.js +255 -0
- package/dist/src/command-line/release/version.d.ts +28 -0
- package/dist/src/command-line/release/version.js +382 -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 +73 -0
- package/dist/src/command-line/report/report.js +432 -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 +189 -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 +159 -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 +84 -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 +131 -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 +211 -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 +95 -0
- package/dist/src/command-line/yargs-utils/shared-options.js +431 -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 +266 -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 +295 -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 +167 -0
- package/dist/src/daemon/client/client.js +1284 -0
- package/dist/src/daemon/client/daemon-environment.d.ts +74 -0
- package/dist/src/daemon/client/daemon-environment.js +422 -0
- package/dist/src/daemon/client/daemon-socket-messenger.d.ts +12 -0
- package/dist/src/daemon/client/daemon-socket-messenger.js +63 -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 +39 -0
- package/dist/src/daemon/message-types/daemon-message.js +54 -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-plugin-capabilities.d.ts +5 -0
- package/dist/src/daemon/message-types/get-plugin-capabilities.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 +14 -0
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.js +19 -0
- package/dist/src/daemon/message-types/select-affected-tasks.d.ts +21 -0
- package/dist/src/daemon/message-types/select-affected-tasks.js +11 -0
- package/dist/src/daemon/message-types/streaming-messages.d.ts +14 -0
- package/dist/src/daemon/message-types/streaming-messages.js +19 -0
- package/dist/src/daemon/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/ultracache-configuration-version.d.ts +8 -0
- package/dist/src/daemon/message-types/ultracache-configuration-version.js +2 -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/sandbox-socket-hint.d.ts +27 -0
- package/dist/src/daemon/sandbox-socket-hint.js +136 -0
- package/dist/src/daemon/server/client-socket-context.d.ts +23 -0
- package/dist/src/daemon/server/client-socket-context.js +88 -0
- package/dist/src/daemon/server/dotenv-graph-changes.d.ts +97 -0
- package/dist/src/daemon/server/dotenv-graph-changes.js +284 -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 +17 -0
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +82 -0
- package/dist/src/daemon/server/handle-client-env.d.ts +8 -0
- package/dist/src/daemon/server/handle-client-env.js +113 -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-plugin-capabilities.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-plugin-capabilities.js +13 -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 +20 -0
- package/dist/src/daemon/server/handle-hash-tasks.js +43 -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-select-affected-tasks.d.ts +3 -0
- package/dist/src/daemon/server/handle-select-affected-tasks.js +26 -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 +20 -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/handle-watch-events.d.ts +10 -0
- package/dist/src/daemon/server/handle-watch-events.js +85 -0
- package/dist/src/daemon/server/latest-nx.d.ts +10 -0
- package/dist/src/daemon/server/latest-nx.js +56 -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 +11 -0
- package/dist/src/daemon/server/outputs-tracking.js +20 -0
- package/dist/src/daemon/server/planning-context.d.ts +8 -0
- package/dist/src/daemon/server/planning-context.js +18 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +62 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +690 -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/restart-checks.d.ts +22 -0
- package/dist/src/daemon/server/restart-checks.js +77 -0
- package/dist/src/daemon/server/server.d.ts +11 -0
- package/dist/src/daemon/server/server.js +489 -0
- package/dist/src/daemon/server/shutdown-utils.d.ts +18 -0
- package/dist/src/daemon/server/shutdown-utils.js +136 -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/ultracache-configuration-state.d.ts +7 -0
- package/dist/src/daemon/server/ultracache-configuration-state.js +36 -0
- package/dist/src/daemon/socket-utils.d.ts +43 -0
- package/dist/src/daemon/socket-utils.js +131 -0
- package/dist/src/daemon/tmp-dir.d.ts +62 -0
- package/dist/src/daemon/tmp-dir.js +477 -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 +146 -0
- package/dist/src/devkit-internals.js +336 -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 +60 -0
- package/dist/src/executors/run-commands/run-commands.impl.js +315 -0
- package/dist/src/executors/run-commands/running-tasks.d.ts +53 -0
- package/dist/src/executors/run-commands/running-tasks.js +603 -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.d.ts +24 -0
- package/dist/src/generators/internal-utils/format-changed-files.js +163 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +26 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +70 -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 +127 -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 +11 -0
- package/dist/src/hasher/create-task-hasher.js +25 -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 +202 -0
- package/dist/src/hasher/native-task-hasher-impl.d.ts +34 -0
- package/dist/src/hasher/native-task-hasher-impl.js +104 -0
- package/dist/src/hasher/task-hasher.d.ts +177 -0
- package/dist/src/hasher/task-hasher.js +320 -0
- package/dist/src/hasher/task-planning-context.d.ts +13 -0
- package/dist/src/hasher/task-planning-context.js +12 -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/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +12 -0
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +250 -0
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +50 -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 +38 -0
- package/dist/src/native/browser.js +1 -0
- package/dist/src/native/index.d.ts +1419 -0
- package/dist/src/native/index.js +216 -0
- package/dist/src/native/native-bindings.js +654 -0
- package/dist/src/native/native-file-cache-location.d.ts +17 -0
- package/dist/src/native/native-file-cache-location.js +97 -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 +12 -0
- package/dist/src/native/transform-objects.js +97 -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 +166 -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 +26 -0
- package/dist/src/nx-cloud/update-manager.js +274 -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 +26 -0
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.d.ts +1 -0
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +26 -0
- package/dist/src/nx-cloud/utilities/nx-cloud-http-client.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/nx-cloud-http-client.js +16 -0
- package/dist/src/nx-cloud/utilities/onboarding.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/onboarding.js +31 -0
- package/dist/src/nx-cloud/utilities/url-shorten.d.ts +2 -0
- package/dist/src/nx-cloud/utilities/url-shorten.js +92 -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 +182 -0
- package/dist/src/plugins/js/lock-file/bun-parser.d.ts +14 -0
- package/dist/src/plugins/js/lock-file/bun-parser.js +992 -0
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +85 -0
- package/dist/src/plugins/js/lock-file/lock-file.js +441 -0
- package/dist/src/plugins/js/lock-file/npm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/npm-parser.js +595 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +1047 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +35 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +290 -0
- package/dist/src/plugins/js/lock-file/pruned-output.d.ts +331 -0
- package/dist/src/plugins/js/lock-file/pruned-output.js +1465 -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 +23 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +897 -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 +11 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +172 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +12 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.js +145 -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 +468 -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 +350 -0
- package/dist/src/plugins/js/utils/register.js +1279 -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 +25 -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 +77 -0
- package/dist/src/project-graph/affected/affected-projects.d.ts +7 -0
- package/dist/src/project-graph/affected/affected-projects.js +42 -0
- package/dist/src/project-graph/affected/affected-reasons.d.ts +116 -0
- package/dist/src/project-graph/affected/affected-reasons.js +459 -0
- package/dist/src/project-graph/affected/affected-tasks.d.ts +103 -0
- package/dist/src/project-graph/affected/affected-tasks.js +386 -0
- package/dist/src/project-graph/affected/print-explanation.d.ts +11 -0
- package/dist/src/project-graph/affected/print-explanation.js +44 -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 +156 -0
- package/dist/src/project-graph/error-types.js +523 -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 +33 -0
- package/dist/src/project-graph/file-utils.js +196 -0
- package/dist/src/project-graph/nx-deps-cache.d.ts +65 -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 +53 -0
- package/dist/src/project-graph/plugins/get-plugins.js +379 -0
- package/dist/src/project-graph/plugins/in-process-loader.d.ts +10 -0
- package/dist/src/project-graph/plugins/in-process-loader.js +58 -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 +19 -0
- package/dist/src/project-graph/plugins/isolation/index.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/index.js +7 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +103 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +626 -0
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +12 -0
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.js +74 -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 +156 -0
- package/dist/src/project-graph/plugins/isolation/messaging.js +87 -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 +225 -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 +44 -0
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +117 -0
- package/dist/src/project-graph/plugins/nx-plugin-capabilities.d.ts +6 -0
- package/dist/src/project-graph/plugins/nx-plugin-capabilities.js +28 -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/task-results-stub.d.ts +50 -0
- package/dist/src/project-graph/plugins/task-results-stub.js +111 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +4 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +80 -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 +461 -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 +49 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +296 -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 +466 -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 +574 -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 +396 -0
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +39 -0
- package/dist/src/project-graph/utils/project-configuration/utils.js +216 -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 +93 -0
- package/dist/src/tasks-runner/cache.d.ts +129 -0
- package/dist/src/tasks-runner/cache.js +645 -0
- package/dist/src/tasks-runner/create-task-graph.d.ts +64 -0
- package/dist/src/tasks-runner/create-task-graph.js +360 -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 +45 -0
- package/dist/src/tasks-runner/forked-process-task-runner.js +309 -0
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +12 -0
- package/dist/src/tasks-runner/init-tasks-runner.js +124 -0
- package/dist/src/tasks-runner/is-tui-enabled.d.ts +18 -0
- package/dist/src/tasks-runner/is-tui-enabled.js +94 -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 +93 -0
- package/dist/src/tasks-runner/life-cycle.js +155 -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 +77 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.js +428 -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 +54 -0
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +203 -0
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +54 -0
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +193 -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/summary-terminal-output-life-cycle.d.ts +35 -0
- package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.js +146 -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 +117 -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/prune-task-graph.d.ts +17 -0
- package/dist/src/tasks-runner/prune-task-graph.js +45 -0
- package/dist/src/tasks-runner/pseudo-ipc.d.ts +48 -0
- package/dist/src/tasks-runner/pseudo-ipc.js +157 -0
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +72 -0
- package/dist/src/tasks-runner/pseudo-terminal.js +209 -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 +78 -0
- package/dist/src/tasks-runner/run-command.js +971 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +148 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.js +362 -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 +15 -0
- package/dist/src/tasks-runner/running-tasks/shared-running-task.js +41 -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 +56 -0
- package/dist/src/tasks-runner/task-env.js +237 -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 +104 -0
- package/dist/src/tasks-runner/task-io-service.js +131 -0
- package/dist/src/tasks-runner/task-orchestrator.d.ts +330 -0
- package/dist/src/tasks-runner/task-orchestrator.js +1749 -0
- package/dist/src/tasks-runner/tasks-runner.d.ts +26 -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/terminal-output-path.d.ts +11 -0
- package/dist/src/tasks-runner/terminal-output-path.js +18 -0
- package/dist/src/tasks-runner/utils.d.ts +66 -0
- package/dist/src/tasks-runner/utils.js +459 -0
- package/dist/src/ultracache/config.d.ts +21 -0
- package/dist/src/ultracache/config.js +29 -0
- package/dist/src/ultracache/fetch.d.ts +21 -0
- package/dist/src/ultracache/fetch.js +43 -0
- package/dist/src/ultracache/overrides.d.ts +17 -0
- package/dist/src/ultracache/overrides.js +61 -0
- package/dist/src/ultracache/report.d.ts +13 -0
- package/dist/src/ultracache/report.js +62 -0
- package/dist/src/ultracache/store.d.ts +41 -0
- package/dist/src/ultracache/store.js +158 -0
- package/dist/src/utils/ab-testing.d.ts +62 -0
- package/dist/src/utils/ab-testing.js +145 -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-enabled.d.ts +7 -0
- package/dist/src/utils/analytics-enabled.js +11 -0
- package/dist/src/utils/analytics-prompt.d.ts +9 -0
- package/dist/src/utils/analytics-prompt.js +81 -0
- package/dist/src/utils/assert-workspace-validity.d.ts +3 -0
- package/dist/src/utils/assert-workspace-validity.js +90 -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 +68 -0
- package/dist/src/utils/cache-directory.js +337 -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/bun-manager-utils.d.ts +8 -0
- package/dist/src/utils/catalog/bun-manager-utils.js +174 -0
- package/dist/src/utils/catalog/bun-manager.d.ts +28 -0
- package/dist/src/utils/catalog/bun-manager.js +130 -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 +23 -0
- package/dist/src/utils/catalog/manager-utils.d.ts +15 -0
- package/dist/src/utils/catalog/manager-utils.js +237 -0
- package/dist/src/utils/catalog/manager.d.ts +52 -0
- package/dist/src/utils/catalog/manager.js +43 -0
- package/dist/src/utils/catalog/pnpm-manager.d.ts +23 -0
- package/dist/src/utils/catalog/pnpm-manager.js +142 -0
- package/dist/src/utils/catalog/types.d.ts +15 -0
- package/dist/src/utils/catalog/types.js +2 -0
- package/dist/src/utils/catalog/yarn-manager.d.ts +26 -0
- package/dist/src/utils/catalog/yarn-manager.js +130 -0
- package/dist/src/utils/child-process.d.ts +52 -0
- package/dist/src/utils/child-process.js +194 -0
- package/dist/src/utils/chunkify.d.ts +11 -0
- package/dist/src/utils/chunkify.js +45 -0
- package/dist/src/utils/code-frames.d.ts +14 -0
- package/dist/src/utils/code-frames.js +116 -0
- package/dist/src/utils/command-line-utils.d.ts +77 -0
- package/dist/src/utils/command-line-utils.js +266 -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 +44 -0
- package/dist/src/utils/consume-messages-from-socket.js +291 -0
- package/dist/src/utils/create-cli-options.d.ts +6 -0
- package/dist/src/utils/create-cli-options.js +29 -0
- package/dist/src/utils/db-connection.d.ts +16 -0
- package/dist/src/utils/db-connection.js +58 -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 +24 -0
- package/dist/src/utils/exit-codes.js +94 -0
- package/dist/src/utils/fileutils.d.ts +72 -0
- package/dist/src/utils/fileutils.js +117 -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/formatters/index.d.ts +19 -0
- package/dist/src/utils/formatters/index.js +79 -0
- package/dist/src/utils/formatters/oxfmt.d.ts +32 -0
- package/dist/src/utils/formatters/oxfmt.js +764 -0
- package/dist/src/utils/formatters/prettier.d.ts +18 -0
- package/dist/src/utils/formatters/prettier.js +179 -0
- package/dist/src/utils/formatters/shared.d.ts +5 -0
- package/dist/src/utils/formatters/shared.js +8 -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 +125 -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 +991 -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/git-worktrees.d.ts +30 -0
- package/dist/src/utils/git-worktrees.js +212 -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 +53 -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/http-client.d.ts +27 -0
- package/dist/src/utils/http-client.js +193 -0
- package/dist/src/utils/ignore.d.ts +178 -0
- package/dist/src/utils/ignore.js +294 -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 +67 -0
- package/dist/src/utils/is-ci.d.ts +1 -0
- package/dist/src/utils/is-ci.js +26 -0
- package/dist/src/utils/is-sandbox.d.ts +1 -0
- package/dist/src/utils/is-sandbox.js +11 -0
- package/dist/src/utils/json-diff.d.ts +20 -0
- package/dist/src/utils/json-diff.js +24 -0
- package/dist/src/utils/json.d.ts +44 -0
- package/dist/src/utils/json.js +62 -0
- package/dist/src/utils/kill-child-on-host-exit.d.ts +7 -0
- package/dist/src/utils/kill-child-on-host-exit.js +42 -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/long-running-target.d.ts +10 -0
- package/dist/src/utils/long-running-target.js +19 -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 +274 -0
- package/dist/src/utils/min-release-age/behavior/npm.d.ts +21 -0
- package/dist/src/utils/min-release-age/behavior/npm.js +296 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +23 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.js +535 -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/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 +6 -0
- package/dist/src/utils/nx-cloud-utils.js +33 -0
- package/dist/src/utils/nx-console-prompt.d.ts +1 -0
- package/dist/src/utils/nx-console-prompt.js +61 -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/nx-tmp-dir.d.ts +23 -0
- package/dist/src/utils/nx-tmp-dir.js +45 -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 +251 -0
- package/dist/src/utils/output.js +571 -0
- package/dist/src/utils/owned-private-dir.d.ts +145 -0
- package/dist/src/utils/owned-private-dir.js +362 -0
- package/dist/src/utils/package-json.d.ts +256 -0
- package/dist/src/utils/package-json.js +441 -0
- package/dist/src/utils/package-manager-config/bunfig.d.ts +14 -0
- package/dist/src/utils/package-manager-config/bunfig.js +49 -0
- package/dist/src/utils/package-manager-config/npmrc.d.ts +23 -0
- package/dist/src/utils/package-manager-config/npmrc.js +124 -0
- package/dist/src/utils/package-manager-config/pnpm-config.d.ts +17 -0
- package/dist/src/utils/package-manager-config/pnpm-config.js +60 -0
- package/dist/src/utils/package-manager.d.ts +167 -0
- package/dist/src/utils/package-manager.js +860 -0
- package/dist/src/utils/params.d.ts +146 -0
- package/dist/src/utils/params.js +768 -0
- package/dist/src/utils/path.d.ts +25 -0
- package/dist/src/utils/path.js +53 -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/permission-errors.d.ts +11 -0
- package/dist/src/utils/permission-errors.js +17 -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 +117 -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 +83 -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 +20 -0
- package/dist/src/utils/project-graph-utils.js +90 -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/prompt-helpers.d.ts +53 -0
- package/dist/src/utils/prompt-helpers.js +111 -0
- package/dist/src/utils/provenance.d.ts +47 -0
- package/dist/src/utils/provenance.js +123 -0
- package/dist/src/utils/registry-config/bun.d.ts +2 -0
- package/dist/src/utils/registry-config/bun.js +257 -0
- package/dist/src/utils/registry-config/index.d.ts +13 -0
- package/dist/src/utils/registry-config/index.js +102 -0
- package/dist/src/utils/registry-config/pnpm.d.ts +2 -0
- package/dist/src/utils/registry-config/pnpm.js +1551 -0
- package/dist/src/utils/registry-config/utils.d.ts +195 -0
- package/dist/src/utils/registry-config/utils.js +496 -0
- package/dist/src/utils/registry-config/yarn-berry.d.ts +2 -0
- package/dist/src/utils/registry-config/yarn-berry.js +612 -0
- package/dist/src/utils/registry-config/yarn-classic.d.ts +2 -0
- package/dist/src/utils/registry-config/yarn-classic.js +1001 -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/safe-spawn.d.ts +24 -0
- package/dist/src/utils/safe-spawn.js +104 -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 +39 -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 +25 -0
- package/dist/src/utils/shell-quoting.js +76 -0
- package/dist/src/utils/socket-refused-exit-code.d.ts +15 -0
- package/dist/src/utils/socket-refused-exit-code.js +18 -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 +26 -0
- package/dist/src/utils/wait-for-socket-connection.js +59 -0
- package/dist/src/utils/workspace-context.d.ts +69 -0
- package/dist/src/utils/workspace-context.js +284 -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 +7 -0
- package/dist/src/utils/write-formatted-json-file.js +24 -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 +195 -0
- package/package.json +516 -9
- package/readme-template.md +16 -0
- package/schemas/migrations-schema.json +186 -0
- package/schemas/nx-schema.json +1653 -0
- package/schemas/project-schema.json +461 -0
- package/schemas/workspace-schema.json +185 -0
- package/local-natives.js +0 -59
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GIT_SHA = exports.GitRepository = void 0;
|
|
4
|
+
exports.cloneFromUpstream = cloneFromUpstream;
|
|
5
|
+
exports.parseVcsRemoteUrl = parseVcsRemoteUrl;
|
|
6
|
+
exports.locateGitDir = locateGitDir;
|
|
7
|
+
exports.getVcsRemoteInfo = getVcsRemoteInfo;
|
|
8
|
+
exports.getGitRootPath = getGitRootPath;
|
|
9
|
+
exports.getGitRootRelativePath = getGitRootRelativePath;
|
|
10
|
+
exports.isShallowRepository = isShallowRepository;
|
|
11
|
+
exports.getFirstCommitSha = getFirstCommitSha;
|
|
12
|
+
exports.isGitRepository = isGitRepository;
|
|
13
|
+
exports.getGitRepositoryStatus = getGitRepositoryStatus;
|
|
14
|
+
exports.getGitCurrentBranch = getGitCurrentBranch;
|
|
15
|
+
exports.getGitRemoteNames = getGitRemoteNames;
|
|
16
|
+
exports.getWorkingTreeStatus = getWorkingTreeStatus;
|
|
17
|
+
exports.hasUncommittedChanges = hasUncommittedChanges;
|
|
18
|
+
exports.getPathCommitExposure = getPathCommitExposure;
|
|
19
|
+
exports.getUncommittedChangesSnapshot = getUncommittedChangesSnapshot;
|
|
20
|
+
exports.commitChanges = commitChanges;
|
|
21
|
+
exports.tryCommitChanges = tryCommitChanges;
|
|
22
|
+
exports.tryCommitChangesAsync = tryCommitChangesAsync;
|
|
23
|
+
exports.resetWorkingTree = resetWorkingTree;
|
|
24
|
+
exports.getLatestCommitSha = getLatestCommitSha;
|
|
25
|
+
exports.getAncestorStatus = getAncestorStatus;
|
|
26
|
+
exports.isAncestorCommit = isAncestorCommit;
|
|
27
|
+
const tslib_1 = require("tslib");
|
|
28
|
+
const child_process_1 = require("child_process");
|
|
29
|
+
const crypto = tslib_1.__importStar(require("crypto"));
|
|
30
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
31
|
+
const path_1 = require("path");
|
|
32
|
+
const owned_private_dir_1 = require("./owned-private-dir");
|
|
33
|
+
function execFileAsync(file, args, execOptions) {
|
|
34
|
+
return new Promise((res, rej) => {
|
|
35
|
+
(0, child_process_1.execFile)(file, args, { ...execOptions, windowsHide: true }, (err, stdout) => {
|
|
36
|
+
if (err) {
|
|
37
|
+
return rej(err);
|
|
38
|
+
}
|
|
39
|
+
res(stdout.toString());
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async function cloneFromUpstream(url, destination, { originName, depth } = {
|
|
44
|
+
originName: 'origin',
|
|
45
|
+
}) {
|
|
46
|
+
await execFileAsync('git', [
|
|
47
|
+
'clone',
|
|
48
|
+
url,
|
|
49
|
+
destination,
|
|
50
|
+
...(depth ? ['--depth', `${depth}`] : []),
|
|
51
|
+
'--origin',
|
|
52
|
+
originName,
|
|
53
|
+
], {
|
|
54
|
+
cwd: (0, path_1.dirname)(destination),
|
|
55
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
56
|
+
});
|
|
57
|
+
return new GitRepository(destination);
|
|
58
|
+
}
|
|
59
|
+
class GitRepository {
|
|
60
|
+
constructor(directory) {
|
|
61
|
+
this.directory = directory;
|
|
62
|
+
this.root = this.getGitRootPath(this.directory);
|
|
63
|
+
}
|
|
64
|
+
getGitRootPath(cwd) {
|
|
65
|
+
return getGitRootPath(cwd);
|
|
66
|
+
}
|
|
67
|
+
async hasUncommittedChanges() {
|
|
68
|
+
const data = await this.execGit(['status', '--porcelain']);
|
|
69
|
+
return data.trim() !== '';
|
|
70
|
+
}
|
|
71
|
+
async addFetchRemote(remoteName, branch) {
|
|
72
|
+
return await this.execGit([
|
|
73
|
+
'config',
|
|
74
|
+
'--add',
|
|
75
|
+
`remote.${remoteName}.fetch`,
|
|
76
|
+
`+refs/heads/${branch}:refs/remotes/${remoteName}/${branch}`,
|
|
77
|
+
]);
|
|
78
|
+
}
|
|
79
|
+
async showStat() {
|
|
80
|
+
return await this.execGit(['show', '--stat']);
|
|
81
|
+
}
|
|
82
|
+
async listBranches() {
|
|
83
|
+
return (await this.execGit(['ls-remote', '--heads', '--quiet']))
|
|
84
|
+
.trim()
|
|
85
|
+
.split('\n')
|
|
86
|
+
.map((s) => s
|
|
87
|
+
.trim()
|
|
88
|
+
.substring(s.indexOf('\t') + 1)
|
|
89
|
+
.replace('refs/heads/', ''));
|
|
90
|
+
}
|
|
91
|
+
async getGitFiles(path) {
|
|
92
|
+
// Use -z to return file names exactly as they are stored in git, separated by NULL (\x00) character.
|
|
93
|
+
// This avoids problems with special characters in file names.
|
|
94
|
+
return (await this.execGit(['ls-files', '-z', '--', path]))
|
|
95
|
+
.trim()
|
|
96
|
+
.split('\x00')
|
|
97
|
+
.map((s) => s.trim())
|
|
98
|
+
.filter(Boolean);
|
|
99
|
+
}
|
|
100
|
+
async reset(ref) {
|
|
101
|
+
return await this.execGit(['reset', '--hard', ref]);
|
|
102
|
+
}
|
|
103
|
+
async mergeUnrelatedHistories(ref, message) {
|
|
104
|
+
return await this.execGit([
|
|
105
|
+
'merge',
|
|
106
|
+
ref,
|
|
107
|
+
'-X',
|
|
108
|
+
'ours',
|
|
109
|
+
'--allow-unrelated-histories',
|
|
110
|
+
'-m',
|
|
111
|
+
message,
|
|
112
|
+
]);
|
|
113
|
+
}
|
|
114
|
+
async fetch(remote, ref) {
|
|
115
|
+
return await this.execGit(['fetch', remote, ...(ref ? [ref] : [])]);
|
|
116
|
+
}
|
|
117
|
+
async checkout(branch, opts) {
|
|
118
|
+
return await this.execGit([
|
|
119
|
+
'checkout',
|
|
120
|
+
...(opts.new ? ['-b'] : []),
|
|
121
|
+
branch,
|
|
122
|
+
...(opts.base ? [opts.base] : []),
|
|
123
|
+
]);
|
|
124
|
+
}
|
|
125
|
+
async move(path, destination) {
|
|
126
|
+
return await this.execGit(['mv', '--', path, destination]);
|
|
127
|
+
}
|
|
128
|
+
async push(ref, remoteName) {
|
|
129
|
+
return await this.execGit(['push', '-u', '-f', remoteName, ref]);
|
|
130
|
+
}
|
|
131
|
+
async commit(message) {
|
|
132
|
+
return await this.execGit(['commit', '-am', message]);
|
|
133
|
+
}
|
|
134
|
+
async amendCommit() {
|
|
135
|
+
return await this.execGit(['commit', '--amend', '-a', '--no-edit']);
|
|
136
|
+
}
|
|
137
|
+
async deleteGitRemote(name) {
|
|
138
|
+
return await this.execGit(['remote', 'rm', name]);
|
|
139
|
+
}
|
|
140
|
+
async addGitRemote(name, url) {
|
|
141
|
+
return await this.execGit(['remote', 'add', name, url]);
|
|
142
|
+
}
|
|
143
|
+
async hasFilterRepoInstalled() {
|
|
144
|
+
try {
|
|
145
|
+
await this.execGit(['filter-repo', '--help']);
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// git-filter-repo is much faster than filter-branch, but needs to be installed by user
|
|
153
|
+
// Use `hasFilterRepoInstalled` to check if it's installed
|
|
154
|
+
async filterRepo(source, destination) {
|
|
155
|
+
// NOTE: filter-repo requires POSIX path to work
|
|
156
|
+
const sourcePosixPath = source.split(path_1.sep).join(path_1.posix.sep);
|
|
157
|
+
const destinationPosixPath = destination.split(path_1.sep).join(path_1.posix.sep);
|
|
158
|
+
const sourcePath = ensureTrailingSlash(sourcePosixPath);
|
|
159
|
+
const destinationPath = ensureTrailingSlash(destinationPosixPath);
|
|
160
|
+
await this.execGit([
|
|
161
|
+
'filter-repo',
|
|
162
|
+
'-f',
|
|
163
|
+
...(source !== '' ? ['--path', sourcePosixPath] : []),
|
|
164
|
+
...(source !== destination
|
|
165
|
+
? ['--path-rename', `${sourcePath}:${destinationPath}`]
|
|
166
|
+
: []),
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
async filterBranch(source, destination, branchName) {
|
|
170
|
+
// We need non-ASCII file names to not be quoted, or else filter-branch will exclude them.
|
|
171
|
+
await this.execGit(['config', 'core.quotepath', 'false']);
|
|
172
|
+
// NOTE: filter-repo requires POSIX path to work
|
|
173
|
+
const sourcePosixPath = source.split(path_1.sep).join(path_1.posix.sep);
|
|
174
|
+
const destinationPosixPath = destination.split(path_1.sep).join(path_1.posix.sep);
|
|
175
|
+
// First, if the source is not a root project, then only include commits relevant to the subdirectory.
|
|
176
|
+
if (source !== '') {
|
|
177
|
+
const indexFilterCommand = `node ${quoteForShell((0, path_1.join)(__dirname, 'git-utils.index-filter.js'))}`;
|
|
178
|
+
await this.execGit([
|
|
179
|
+
'filter-branch',
|
|
180
|
+
'-f',
|
|
181
|
+
'--index-filter',
|
|
182
|
+
indexFilterCommand,
|
|
183
|
+
'--prune-empty',
|
|
184
|
+
'--',
|
|
185
|
+
branchName,
|
|
186
|
+
], {
|
|
187
|
+
NX_IMPORT_SOURCE: sourcePosixPath,
|
|
188
|
+
NX_IMPORT_DESTINATION: destinationPosixPath,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
// Then, move files to their new location if necessary.
|
|
192
|
+
if (source === '' || source !== destination) {
|
|
193
|
+
const treeFilterCommand = `node ${quoteForShell((0, path_1.join)(__dirname, 'git-utils.tree-filter.js'))}`;
|
|
194
|
+
await this.execGit([
|
|
195
|
+
'filter-branch',
|
|
196
|
+
'-f',
|
|
197
|
+
'--tree-filter',
|
|
198
|
+
treeFilterCommand,
|
|
199
|
+
'--',
|
|
200
|
+
branchName,
|
|
201
|
+
], {
|
|
202
|
+
NX_IMPORT_SOURCE: sourcePosixPath,
|
|
203
|
+
NX_IMPORT_DESTINATION: destinationPosixPath,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
execGit(args, env) {
|
|
208
|
+
return execFileAsync('git', args, {
|
|
209
|
+
cwd: this.root,
|
|
210
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
211
|
+
env: {
|
|
212
|
+
...process.env,
|
|
213
|
+
...env,
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
exports.GitRepository = GitRepository;
|
|
219
|
+
function ensureTrailingSlash(path) {
|
|
220
|
+
return path !== '' && !path.endsWith('/') ? `${path}/` : path;
|
|
221
|
+
}
|
|
222
|
+
function quoteForShell(arg) {
|
|
223
|
+
return `'${arg.replaceAll("'", "'\"'\"'")}'`;
|
|
224
|
+
}
|
|
225
|
+
function parseVcsRemoteUrl(url) {
|
|
226
|
+
// Remove whitespace and handle common URL formats
|
|
227
|
+
const cleanUrl = url.trim();
|
|
228
|
+
// SSH format: git@domain:owner/repo.git
|
|
229
|
+
const sshMatch = cleanUrl.match(/^git@([^:]+):([^\/]+)\/(.+?)(\.git)?$/);
|
|
230
|
+
if (sshMatch) {
|
|
231
|
+
const [, domain, owner, repo] = sshMatch;
|
|
232
|
+
return {
|
|
233
|
+
domain,
|
|
234
|
+
slug: `${owner}/${repo}`,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
// HTTPS with authentication: https://user@domain/owner/repo.git
|
|
238
|
+
const httpsAuthMatch = cleanUrl.match(/^https?:\/\/[^@]+@([^\/]+)\/([^\/]+)\/(.+?)(\.git)?$/);
|
|
239
|
+
if (httpsAuthMatch) {
|
|
240
|
+
const [, domain, owner, repo] = httpsAuthMatch;
|
|
241
|
+
return {
|
|
242
|
+
domain,
|
|
243
|
+
slug: `${owner}/${repo}`,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
// HTTPS format: https://domain/owner/repo.git (without authentication)
|
|
247
|
+
const httpsMatch = cleanUrl.match(/^https?:\/\/([^@\/]+)\/([^\/]+)\/(.+?)(\.git)?$/);
|
|
248
|
+
if (httpsMatch) {
|
|
249
|
+
const [, domain, owner, repo] = httpsMatch;
|
|
250
|
+
return {
|
|
251
|
+
domain,
|
|
252
|
+
slug: `${owner}/${repo}`,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
// SSH alternative format: ssh://git@domain/owner/repo.git or ssh://git@domain:port/owner/repo.git
|
|
256
|
+
const sshAltMatch = cleanUrl.match(/^ssh:\/\/[^@]+@([^:\/]+)(:[0-9]+)?\/([^\/]+)\/(.+?)(\.git)?$/);
|
|
257
|
+
if (sshAltMatch) {
|
|
258
|
+
const [, domain, , owner, repo] = sshAltMatch;
|
|
259
|
+
return {
|
|
260
|
+
domain,
|
|
261
|
+
slug: `${owner}/${repo}`,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Where `directory`'s repository keeps its working root and its shared config.
|
|
268
|
+
*
|
|
269
|
+
* Walking up for `.git` is what lets the caller answer "which repo, and where
|
|
270
|
+
* am I inside it" without spawning git. It also reports the root as the caller
|
|
271
|
+
* referred to it, where `git rev-parse --show-toplevel` reports the realpath —
|
|
272
|
+
* relevant wherever a path crosses a symlink, macOS's /tmp being the common
|
|
273
|
+
* case.
|
|
274
|
+
*
|
|
275
|
+
* A linked worktree and a submodule both have `.git` as a FILE holding
|
|
276
|
+
* `gitdir: <path>`, and their remotes live in the shared common dir rather than
|
|
277
|
+
* in that per-worktree gitdir, which `commondir` names when it is not the
|
|
278
|
+
* gitdir itself.
|
|
279
|
+
*/
|
|
280
|
+
/**
|
|
281
|
+
* Contents of `path`, or null unless it is a regular file belonging to us.
|
|
282
|
+
*
|
|
283
|
+
* Three flags carry three separate guarantees, and the read needs all of them:
|
|
284
|
+
* `O_NOFOLLOW` refuses a symlink, keeping the read inside the repository;
|
|
285
|
+
* `O_NONBLOCK` stops a FIFO blocking the open forever, which at module scope of
|
|
286
|
+
* `cache-directory.ts` would hang every command in the workspace before it
|
|
287
|
+
* printed anything; and taking the type and owner from `fstat` on the
|
|
288
|
+
* descriptor that is then read leaves no window for the path to be swapped
|
|
289
|
+
* between the check and the read.
|
|
290
|
+
*/
|
|
291
|
+
function readOwnedFileSync(path) {
|
|
292
|
+
let fd;
|
|
293
|
+
try {
|
|
294
|
+
fd = fs.openSync(path, fs.constants.O_RDONLY |
|
|
295
|
+
(fs.constants.O_NOFOLLOW ?? 0) |
|
|
296
|
+
(fs.constants.O_NONBLOCK ?? 0));
|
|
297
|
+
const stats = fs.fstatSync(fd);
|
|
298
|
+
if (!stats.isFile() ||
|
|
299
|
+
(typeof process.getuid === 'function' && stats.uid !== process.getuid())) {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
return fs.readFileSync(fd, 'utf8');
|
|
303
|
+
}
|
|
304
|
+
catch {
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
finally {
|
|
308
|
+
if (fd !== undefined) {
|
|
309
|
+
try {
|
|
310
|
+
fs.closeSync(fd);
|
|
311
|
+
}
|
|
312
|
+
catch { }
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
function locateGitDir(directory) {
|
|
317
|
+
let current = (0, path_1.resolve)(directory);
|
|
318
|
+
// Terminates at the filesystem root, where `dirname` is a fixed point.
|
|
319
|
+
while ((0, path_1.dirname)(current) !== current) {
|
|
320
|
+
const located = gitDirAt(current);
|
|
321
|
+
if (located !== undefined) {
|
|
322
|
+
return located;
|
|
323
|
+
}
|
|
324
|
+
current = (0, path_1.dirname)(current);
|
|
325
|
+
}
|
|
326
|
+
// The root itself: check it directly rather than walking past it.
|
|
327
|
+
return gitDirAt(current) ?? null;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* The repository whose working root is `directory`, or:
|
|
331
|
+
*
|
|
332
|
+
* - `null` when a `.git` is there but is not one we will read, which ends the
|
|
333
|
+
* walk rather than continuing past it -- git would not look further either.
|
|
334
|
+
* - `undefined` when there is no `.git` there at all, so the caller keeps
|
|
335
|
+
* walking up.
|
|
336
|
+
*/
|
|
337
|
+
function gitDirAt(directory) {
|
|
338
|
+
const dotGit = (0, path_1.join)(directory, '.git');
|
|
339
|
+
let entry;
|
|
340
|
+
try {
|
|
341
|
+
entry = fs.statSync(dotGit);
|
|
342
|
+
}
|
|
343
|
+
catch {
|
|
344
|
+
return undefined;
|
|
345
|
+
}
|
|
346
|
+
if (entry.isDirectory()) {
|
|
347
|
+
// A directory named `.git` is not a repository. Git checks this before
|
|
348
|
+
// reading config, and asking git is what this function replaced -- so
|
|
349
|
+
// without it a `.git` planted in any writable ancestor (`/tmp` is 1777)
|
|
350
|
+
// decides the workspace identity for everything beneath it.
|
|
351
|
+
if (!fs.existsSync((0, path_1.join)(dotGit, 'HEAD')) ||
|
|
352
|
+
!fs.existsSync((0, path_1.join)(dotGit, 'objects'))) {
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
// Shape says it is a repository; ownership says it is ours. A real
|
|
356
|
+
// repository belonging to another user passes the check above, and git
|
|
357
|
+
// refuses exactly that (`safe.directory`, CVE-2022-24765). `lstat`
|
|
358
|
+
// inside also refuses a symlink standing in for `.git`.
|
|
359
|
+
return (0, owned_private_dir_1.isOwnedRealDirectory)(dotGit)
|
|
360
|
+
? { gitRoot: directory, commonDir: dotGit }
|
|
361
|
+
: null;
|
|
362
|
+
}
|
|
363
|
+
if (entry.isFile()) {
|
|
364
|
+
const pointer = readOwnedFileSync(dotGit)?.match(/^gitdir:\s*(.+)$/m);
|
|
365
|
+
if (!pointer) {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
const gitDir = (0, path_1.resolve)(directory, pointer[1].trim());
|
|
369
|
+
// No commondir file: the gitdir is its own common dir.
|
|
370
|
+
const shared = readOwnedFileSync((0, path_1.join)(gitDir, 'commondir'))?.trim();
|
|
371
|
+
const commonDir = shared ? (0, path_1.resolve)(gitDir, shared) : gitDir;
|
|
372
|
+
// `gitdir:` and `commondir` are paths taken from file contents, so this
|
|
373
|
+
// branch can be pointed anywhere; the directory checks above apply to it
|
|
374
|
+
// just as much.
|
|
375
|
+
return (0, owned_private_dir_1.isOwnedRealDirectory)(commonDir)
|
|
376
|
+
? { gitRoot: directory, commonDir }
|
|
377
|
+
: null;
|
|
378
|
+
}
|
|
379
|
+
return undefined;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Remote name -> url from a git config file, or null when this parser cannot
|
|
383
|
+
* answer for the whole file.
|
|
384
|
+
*
|
|
385
|
+
* Null on `include`/`includeIf` specifically: git resolves those by reading
|
|
386
|
+
* other files, so a remote could live somewhere this does not look, and
|
|
387
|
+
* answering from a partial view would be worse than paying for git.
|
|
388
|
+
*/
|
|
389
|
+
function parseGitConfigRemotes(contents) {
|
|
390
|
+
const remotes = {};
|
|
391
|
+
let remoteName = null;
|
|
392
|
+
for (const rawLine of contents.split('\n')) {
|
|
393
|
+
const line = rawLine.trim();
|
|
394
|
+
if (!line || line.startsWith('#') || line.startsWith(';')) {
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
if (line.startsWith('[')) {
|
|
398
|
+
const close = line.indexOf(']');
|
|
399
|
+
const section = (close === -1 ? line.slice(1) : line.slice(1, close)).trim();
|
|
400
|
+
if (/^include(If)?\b/i.test(section)) {
|
|
401
|
+
return null;
|
|
402
|
+
}
|
|
403
|
+
// `git remote -v` prints the rewritten url; resolving `insteadOf` here
|
|
404
|
+
// would mean reimplementing the longest-prefix match, so defer instead.
|
|
405
|
+
// A rewrite in the *global* config stays an accepted divergence: this
|
|
406
|
+
// parser deliberately never opens `~/.gitconfig`.
|
|
407
|
+
if (/^url\s+"/i.test(section)) {
|
|
408
|
+
return null;
|
|
409
|
+
}
|
|
410
|
+
const named = section.match(/^remote\s+"(.*)"$/i);
|
|
411
|
+
remoteName = named ? named[1] : null;
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
if (!remoteName) {
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
const equals = line.indexOf('=');
|
|
418
|
+
if (equals === -1) {
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
if (line.slice(0, equals).trim().toLowerCase() !== 'url') {
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
const raw = line.slice(equals + 1).trim();
|
|
425
|
+
// Git ends a value at an unquoted `#`/`;` and honours `\` escapes. Both are
|
|
426
|
+
// enough to change the url, and reimplementing them is how a parser starts
|
|
427
|
+
// answering confidently wrong, so hand the file to git when either appears.
|
|
428
|
+
if (/[#;\\]/.test(raw)) {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
const value = raw.replace(/^"(.*)"$/, '$1');
|
|
432
|
+
if (value.includes('"')) {
|
|
433
|
+
return null;
|
|
434
|
+
}
|
|
435
|
+
// `remote.<name>.url` is multi-valued and git fetches from the first, so
|
|
436
|
+
// taking the first here matches it.
|
|
437
|
+
if (remotes[remoteName] === undefined) {
|
|
438
|
+
remotes[remoteName] = value;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return remotes;
|
|
442
|
+
}
|
|
443
|
+
/** `origin`, then `upstream`, then `base`, then whichever came first. */
|
|
444
|
+
function selectRemote(found, first) {
|
|
445
|
+
for (const remote of ['origin', 'upstream', 'base']) {
|
|
446
|
+
if (found[remote]) {
|
|
447
|
+
return found[remote];
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return first;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* The remote read straight from `.git/config`, or null when that cannot settle
|
|
454
|
+
* it and git itself has to be asked.
|
|
455
|
+
*
|
|
456
|
+
* Worth having because this runs on the import path of every Nx process:
|
|
457
|
+
* `cacheDir` is resolved at module scope, which reaches the repo identity, and
|
|
458
|
+
* `git remote -v` spawns a shell and git to answer a question a file read
|
|
459
|
+
* answers in microseconds.
|
|
460
|
+
*/
|
|
461
|
+
function remoteInfoFromGitConfig(directory) {
|
|
462
|
+
try {
|
|
463
|
+
const located = locateGitDir(directory);
|
|
464
|
+
if (!located) {
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
const contents = readOwnedFileSync((0, path_1.join)(located.commonDir, 'config'));
|
|
468
|
+
if (contents === null) {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
471
|
+
const remotes = parseGitConfigRemotes(contents);
|
|
472
|
+
if (!remotes) {
|
|
473
|
+
return null;
|
|
474
|
+
}
|
|
475
|
+
const found = {};
|
|
476
|
+
let first = null;
|
|
477
|
+
for (const [name, url] of Object.entries(remotes)) {
|
|
478
|
+
const info = parseVcsRemoteUrl(url);
|
|
479
|
+
if (info && !found[name]) {
|
|
480
|
+
found[name] = info;
|
|
481
|
+
first ??= info;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return selectRemote(found, first);
|
|
485
|
+
}
|
|
486
|
+
catch {
|
|
487
|
+
return null;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
function getVcsRemoteInfo(directory) {
|
|
491
|
+
const fromConfig = remoteInfoFromGitConfig(directory ?? process.cwd());
|
|
492
|
+
if (fromConfig) {
|
|
493
|
+
return fromConfig;
|
|
494
|
+
}
|
|
495
|
+
// Reached when there is no readable config, no remote in it, or an `include`
|
|
496
|
+
// this parser will not follow. Note for anyone running a spec that asserts no
|
|
497
|
+
// subprocess: a repository with no remote at all lands here every time, so
|
|
498
|
+
// the shell-out is on the failure path rather than gone.
|
|
499
|
+
try {
|
|
500
|
+
const gitRemote = (0, child_process_1.execSync)('git remote -v', {
|
|
501
|
+
stdio: 'pipe',
|
|
502
|
+
windowsHide: true,
|
|
503
|
+
cwd: directory,
|
|
504
|
+
})
|
|
505
|
+
.toString()
|
|
506
|
+
.trim();
|
|
507
|
+
if (!gitRemote || gitRemote.length === 0) {
|
|
508
|
+
return null;
|
|
509
|
+
}
|
|
510
|
+
const lines = gitRemote.split('\n').filter((line) => line.trim());
|
|
511
|
+
const foundRemotes = {};
|
|
512
|
+
let firstRemote = null;
|
|
513
|
+
for (const line of lines) {
|
|
514
|
+
const match = line.trim().match(/^(\w+)\s+(\S+)\s+\((fetch|push)\)$/);
|
|
515
|
+
if (match) {
|
|
516
|
+
const [, remoteName, url] = match;
|
|
517
|
+
const remoteInfo = parseVcsRemoteUrl(url);
|
|
518
|
+
if (remoteInfo && !foundRemotes[remoteName]) {
|
|
519
|
+
foundRemotes[remoteName] = remoteInfo;
|
|
520
|
+
if (!firstRemote) {
|
|
521
|
+
firstRemote = remoteInfo;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return selectRemote(foundRemotes, firstRemote);
|
|
527
|
+
}
|
|
528
|
+
catch (e) {
|
|
529
|
+
return null;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function getGitRootPath(cwd) {
|
|
533
|
+
const located = locateGitDir(cwd ?? process.cwd());
|
|
534
|
+
if (located) {
|
|
535
|
+
return located.gitRoot;
|
|
536
|
+
}
|
|
537
|
+
// Outside a repository this throws, which is what `getGitRootRelativePath`
|
|
538
|
+
// turns into null. Kept as the fallback rather than the primary so the common
|
|
539
|
+
// case pays no subprocess.
|
|
540
|
+
return (0, child_process_1.execFileSync)('git', ['rev-parse', '--show-toplevel'], {
|
|
541
|
+
cwd,
|
|
542
|
+
windowsHide: true,
|
|
543
|
+
})
|
|
544
|
+
.toString()
|
|
545
|
+
.trim();
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Path of `directory` relative to its git root, posix-separated so it is
|
|
549
|
+
* identical on every OS, and '' when the directory is the git root itself.
|
|
550
|
+
* Null outside a git repository.
|
|
551
|
+
*/
|
|
552
|
+
function getGitRootRelativePath(directory) {
|
|
553
|
+
try {
|
|
554
|
+
return (0, path_1.relative)(getGitRootPath(directory), directory)
|
|
555
|
+
.split(path_1.sep)
|
|
556
|
+
.join(path_1.posix.sep);
|
|
557
|
+
}
|
|
558
|
+
catch {
|
|
559
|
+
return null;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
/** A shallow clone's truncated history has no stable root commit. */
|
|
563
|
+
function isShallowRepository(directory) {
|
|
564
|
+
try {
|
|
565
|
+
return ((0, child_process_1.execFileSync)('git', ['rev-parse', '--is-shallow-repository'], {
|
|
566
|
+
encoding: 'utf8',
|
|
567
|
+
stdio: 'pipe',
|
|
568
|
+
cwd: directory,
|
|
569
|
+
windowsHide: true,
|
|
570
|
+
}).trim() === 'true');
|
|
571
|
+
}
|
|
572
|
+
catch {
|
|
573
|
+
return false;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* SHA of the repository's first commit. Merged unrelated histories leave
|
|
578
|
+
* several root commits — the sorted-first one is picked so every clone
|
|
579
|
+
* agrees. Null when there are no commits, or outside a git repository.
|
|
580
|
+
*/
|
|
581
|
+
function getFirstCommitSha(directory) {
|
|
582
|
+
try {
|
|
583
|
+
const roots = (0, child_process_1.execFileSync)('git', ['rev-list', '--max-parents=0', 'HEAD'], {
|
|
584
|
+
encoding: 'utf8',
|
|
585
|
+
stdio: 'pipe',
|
|
586
|
+
cwd: directory,
|
|
587
|
+
windowsHide: true,
|
|
588
|
+
})
|
|
589
|
+
.trim()
|
|
590
|
+
.split(/\r?\n/)
|
|
591
|
+
.filter(Boolean);
|
|
592
|
+
return roots.sort()[0] ?? null;
|
|
593
|
+
}
|
|
594
|
+
catch {
|
|
595
|
+
return null;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
function isGitRepository(directory) {
|
|
599
|
+
try {
|
|
600
|
+
(0, child_process_1.execSync)('git rev-parse --is-inside-work-tree', {
|
|
601
|
+
stdio: 'ignore',
|
|
602
|
+
cwd: directory,
|
|
603
|
+
windowsHide: true,
|
|
604
|
+
});
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
catch {
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Like `isGitRepository`, but separates "this is not a git repository" from
|
|
613
|
+
* "the probe itself failed" (git not installed, permissions). Callers gating
|
|
614
|
+
* destructive or unverifiable behavior on the answer must fail closed on
|
|
615
|
+
* 'unknown' instead of reading a broken probe as a missing repository.
|
|
616
|
+
*/
|
|
617
|
+
function getGitRepositoryStatus(directory) {
|
|
618
|
+
try {
|
|
619
|
+
(0, child_process_1.execSync)('git rev-parse --is-inside-work-tree', {
|
|
620
|
+
stdio: 'pipe',
|
|
621
|
+
cwd: directory,
|
|
622
|
+
windowsHide: true,
|
|
623
|
+
// Force untranslated messages; the classification matches on the
|
|
624
|
+
// English "not a git repository".
|
|
625
|
+
env: { ...process.env, LC_ALL: 'C' },
|
|
626
|
+
});
|
|
627
|
+
return 'git';
|
|
628
|
+
}
|
|
629
|
+
catch (err) {
|
|
630
|
+
const stderr = err?.stderr?.toString() ?? '';
|
|
631
|
+
return /not a git repository/i.test(stderr) ? 'not-git' : 'unknown';
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
// Checked-out branch name, or null when there isn't one to act on: a detached
|
|
635
|
+
// HEAD reports the literal "HEAD" (treated as no branch), and any git error
|
|
636
|
+
// (not a repo, no commits yet) also yields null.
|
|
637
|
+
function getGitCurrentBranch(directory) {
|
|
638
|
+
try {
|
|
639
|
+
const branch = (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', {
|
|
640
|
+
encoding: 'utf8',
|
|
641
|
+
cwd: directory,
|
|
642
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
643
|
+
windowsHide: true,
|
|
644
|
+
}).trim();
|
|
645
|
+
return branch && branch !== 'HEAD' ? branch : null;
|
|
646
|
+
}
|
|
647
|
+
catch {
|
|
648
|
+
return null;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
// Names of the remotes configured in the repository, empty when there are
|
|
652
|
+
// none or the probe itself failed.
|
|
653
|
+
function getGitRemoteNames(directory) {
|
|
654
|
+
try {
|
|
655
|
+
return (0, child_process_1.execSync)('git remote', {
|
|
656
|
+
encoding: 'utf8',
|
|
657
|
+
cwd: directory,
|
|
658
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
659
|
+
windowsHide: true,
|
|
660
|
+
})
|
|
661
|
+
.split('\n')
|
|
662
|
+
.map((name) => name.trim())
|
|
663
|
+
.filter(Boolean);
|
|
664
|
+
}
|
|
665
|
+
catch {
|
|
666
|
+
return [];
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
// Tri-state working-tree probe: 'unknown' means the probe itself failed (git
|
|
670
|
+
// missing, spawn failure, permissions), not that the tree is clean. Callers
|
|
671
|
+
// that gate destructive actions on tree cleanliness must treat 'unknown' as
|
|
672
|
+
// unsafe rather than clean.
|
|
673
|
+
// `excludePaths` are left out of the probe the way `tryCommitChanges` leaves
|
|
674
|
+
// them out of the commit, so a tree dirty only under them reads as clean. An
|
|
675
|
+
// exclude-only pathspec still covers the whole tree, matching `git add -A`.
|
|
676
|
+
function getWorkingTreeStatus(directory, excludePaths = []) {
|
|
677
|
+
const pathspecs = excludePaths
|
|
678
|
+
.map((excludePath) => ` ":(exclude)${excludePath}"`)
|
|
679
|
+
.join('');
|
|
680
|
+
try {
|
|
681
|
+
const out = (0, child_process_1.execSync)(`git status --porcelain${pathspecs ? ` --${pathspecs}` : ''}`, {
|
|
682
|
+
encoding: 'utf8',
|
|
683
|
+
cwd: directory,
|
|
684
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
685
|
+
windowsHide: true,
|
|
686
|
+
});
|
|
687
|
+
return out.trim() === '' ? 'clean' : 'dirty';
|
|
688
|
+
}
|
|
689
|
+
catch {
|
|
690
|
+
return 'unknown';
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
// Sync companion to `GitRepository.hasUncommittedChanges` for callers that
|
|
694
|
+
// can't drop into the async class. A failed probe reads as false; callers for
|
|
695
|
+
// whom that tolerance is unsafe use `getWorkingTreeStatus` instead.
|
|
696
|
+
function hasUncommittedChanges(directory, excludePaths = []) {
|
|
697
|
+
return getWorkingTreeStatus(directory, excludePaths) === 'dirty';
|
|
698
|
+
}
|
|
699
|
+
// Classifies whether `git add -A` commits made in `directory` can sweep in
|
|
700
|
+
// the directory at `dirPath`. Tracked files stay committable no matter what
|
|
701
|
+
// the ignore rules say (ignore rules never apply to tracked files), so
|
|
702
|
+
// `git ls-files` decides 'tracked' first; `git check-ignore` then splits the
|
|
703
|
+
// untracked remainder into 'ignored' (covered) vs 'unignored' (no
|
|
704
|
+
// coverage). 'unknown' means the probe itself failed (not a git repository,
|
|
705
|
+
// git missing); callers gating destructive behavior on the result must
|
|
706
|
+
// treat it as unsafe.
|
|
707
|
+
function getPathCommitExposure(dirPath, directory) {
|
|
708
|
+
try {
|
|
709
|
+
const tracked = (0, child_process_1.execSync)(`git ls-files -- ${dirPath}`, {
|
|
710
|
+
encoding: 'utf8',
|
|
711
|
+
cwd: directory,
|
|
712
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
713
|
+
windowsHide: true,
|
|
714
|
+
});
|
|
715
|
+
if (tracked.trim() !== '') {
|
|
716
|
+
return 'tracked';
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
catch {
|
|
720
|
+
return 'unknown';
|
|
721
|
+
}
|
|
722
|
+
// Query with a trailing slash so git treats the path as a directory even
|
|
723
|
+
// when it does not exist on disk yet: a directory-only ignore rule (a
|
|
724
|
+
// trailing-slash .gitignore entry) does not match a bare query for an
|
|
725
|
+
// absent path, which would misreport covered workspaces as unignored.
|
|
726
|
+
const asDir = dirPath.endsWith('/') ? dirPath : `${dirPath}/`;
|
|
727
|
+
try {
|
|
728
|
+
(0, child_process_1.execSync)(`git check-ignore -q -- ${asDir}`, {
|
|
729
|
+
cwd: directory,
|
|
730
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
731
|
+
windowsHide: true,
|
|
732
|
+
});
|
|
733
|
+
return 'ignored';
|
|
734
|
+
}
|
|
735
|
+
catch (e) {
|
|
736
|
+
// check-ignore exits 1 for "not ignored"; anything else is a probe
|
|
737
|
+
// failure.
|
|
738
|
+
return e?.status === 1 ? 'unignored' : 'unknown';
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
// Returns a content-sensitive sha1 snapshot of the working tree state for
|
|
742
|
+
// before/after comparison. Hashes three probes:
|
|
743
|
+
// 1. `git diff HEAD` with defensive flags — every byte of tracked-file
|
|
744
|
+
// changes. `--no-ext-diff` / `--no-textconv` neuter user/repo driver
|
|
745
|
+
// overrides so output is deterministic; `--binary` keeps binary
|
|
746
|
+
// edits from collapsing to "Binary files differ".
|
|
747
|
+
// 2. `git status --porcelain=v1 -uall` — untracked paths the diff
|
|
748
|
+
// omits. `-uall` expands untracked directories per-file.
|
|
749
|
+
// 3. Untracked file content bytes — so a same-path content edit on an
|
|
750
|
+
// already-untracked file does not collapse against the baseline.
|
|
751
|
+
//
|
|
752
|
+
// Each probe is wrapped independently with a failure sentinel so a
|
|
753
|
+
// single-sided git error (e.g. `git diff HEAD` on an initial-commit-less
|
|
754
|
+
// repo) cannot mask surviving signal from the others.
|
|
755
|
+
function getUncommittedChangesSnapshot(directory) {
|
|
756
|
+
const hasher = crypto.createHash('sha1');
|
|
757
|
+
const cwd = directory ?? process.cwd();
|
|
758
|
+
const execOpts = {
|
|
759
|
+
encoding: 'utf8',
|
|
760
|
+
cwd,
|
|
761
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
762
|
+
windowsHide: true,
|
|
763
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
764
|
+
};
|
|
765
|
+
let diffOutput;
|
|
766
|
+
try {
|
|
767
|
+
diffOutput = (0, child_process_1.execSync)('git diff HEAD --no-color --no-ext-diff --no-textconv --binary', execOpts);
|
|
768
|
+
}
|
|
769
|
+
catch {
|
|
770
|
+
diffOutput = '<diff-unavailable>';
|
|
771
|
+
}
|
|
772
|
+
hasher.update('diff:').update(diffOutput).update('\0');
|
|
773
|
+
let statusOutput;
|
|
774
|
+
try {
|
|
775
|
+
statusOutput = (0, child_process_1.execSync)('git status --porcelain=v1 -uall', execOpts);
|
|
776
|
+
}
|
|
777
|
+
catch {
|
|
778
|
+
statusOutput = '<status-unavailable>';
|
|
779
|
+
}
|
|
780
|
+
hasher.update('status:').update(statusOutput).update('\0');
|
|
781
|
+
let untrackedRaw;
|
|
782
|
+
try {
|
|
783
|
+
untrackedRaw = (0, child_process_1.execSync)('git ls-files --others --exclude-standard -z', execOpts);
|
|
784
|
+
}
|
|
785
|
+
catch {
|
|
786
|
+
untrackedRaw = '';
|
|
787
|
+
}
|
|
788
|
+
const untrackedPaths = untrackedRaw.split('\0').filter(Boolean).sort();
|
|
789
|
+
hasher.update('untracked:');
|
|
790
|
+
for (const p of untrackedPaths) {
|
|
791
|
+
hasher.update(p).update('\0');
|
|
792
|
+
try {
|
|
793
|
+
hasher.update(fs.readFileSync((0, path_1.join)(cwd, p)));
|
|
794
|
+
}
|
|
795
|
+
catch {
|
|
796
|
+
hasher.update('<file-unreadable>');
|
|
797
|
+
}
|
|
798
|
+
hasher.update('\0');
|
|
799
|
+
}
|
|
800
|
+
return hasher.digest('hex');
|
|
801
|
+
}
|
|
802
|
+
function commitChanges(commitMessage, directory) {
|
|
803
|
+
try {
|
|
804
|
+
(0, child_process_1.execSync)('git add -A', {
|
|
805
|
+
encoding: 'utf8',
|
|
806
|
+
stdio: 'pipe',
|
|
807
|
+
cwd: directory,
|
|
808
|
+
windowsHide: true,
|
|
809
|
+
});
|
|
810
|
+
(0, child_process_1.execSync)('git commit --no-verify -F -', {
|
|
811
|
+
encoding: 'utf8',
|
|
812
|
+
stdio: 'pipe',
|
|
813
|
+
input: commitMessage,
|
|
814
|
+
cwd: directory,
|
|
815
|
+
windowsHide: true,
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
catch (err) {
|
|
819
|
+
if (directory) {
|
|
820
|
+
// We don't want to throw during create-nx-workspace
|
|
821
|
+
// because maybe there was an error when setting up git
|
|
822
|
+
// initially.
|
|
823
|
+
// Required here, not imported: `logger` reaches `daemon/*`, and this
|
|
824
|
+
// module is on the import path of `cache-directory`, whose bindings
|
|
825
|
+
// `daemon/tmp-dir.ts` reads at module scope. A static import would make
|
|
826
|
+
// that a cycle. This is the only logger use in the file.
|
|
827
|
+
const { logger } = require('./logger');
|
|
828
|
+
logger.verbose(`Git may not be set up correctly for this new workspace.
|
|
829
|
+
${err}`);
|
|
830
|
+
}
|
|
831
|
+
else {
|
|
832
|
+
throw new Error(`Error committing changes:\n${err.stderr}`);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
return getLatestCommitSha(directory);
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Throws on git failure with the real stderr attached. Use this when the
|
|
839
|
+
* caller needs to distinguish hook rejection / GPG signing failures / LFS
|
|
840
|
+
* lock errors from a successful no-op. Callers should pre-check
|
|
841
|
+
* `hasUncommittedChanges` to avoid the "nothing to commit" rejection
|
|
842
|
+
* (which `git commit` exits non-zero for).
|
|
843
|
+
*
|
|
844
|
+
* Returns `null` (rather than throwing) when the commit itself succeeded
|
|
845
|
+
* but `git rev-parse HEAD` failed transiently — by contract the diff is
|
|
846
|
+
* no longer in the working tree, so callers must NOT report it as such.
|
|
847
|
+
*
|
|
848
|
+
* `excludePaths` are `directory`-relative paths the commit must not capture,
|
|
849
|
+
* whatever the ignore rules say. Their working-tree files are left intact;
|
|
850
|
+
* only their index entries are put back to HEAD's state. Paths come from
|
|
851
|
+
* callers' own constants, never from user input.
|
|
852
|
+
*/
|
|
853
|
+
function tryCommitChanges(commitMessage, directory, excludePaths = []) {
|
|
854
|
+
try {
|
|
855
|
+
for (const { command, input } of commitCommands(commitMessage, excludePaths)) {
|
|
856
|
+
(0, child_process_1.execSync)(command, {
|
|
857
|
+
encoding: 'utf8',
|
|
858
|
+
stdio: 'pipe',
|
|
859
|
+
input,
|
|
860
|
+
cwd: directory,
|
|
861
|
+
windowsHide: true,
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
catch (err) {
|
|
866
|
+
throw commitFailure(err);
|
|
867
|
+
}
|
|
868
|
+
return getLatestCommitSha(directory);
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* `tryCommitChanges` for a process that has to stay responsive while git
|
|
872
|
+
* runs: a signing prompt or a hook can hold the commit for minutes.
|
|
873
|
+
*/
|
|
874
|
+
async function tryCommitChangesAsync(commitMessage, directory, excludePaths = []) {
|
|
875
|
+
try {
|
|
876
|
+
for (const { command, input } of commitCommands(commitMessage, excludePaths)) {
|
|
877
|
+
await execAsync(command, directory, input);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
catch (err) {
|
|
881
|
+
throw commitFailure(err);
|
|
882
|
+
}
|
|
883
|
+
return getLatestCommitSha(directory);
|
|
884
|
+
}
|
|
885
|
+
function commitCommands(commitMessage, excludePaths) {
|
|
886
|
+
return [
|
|
887
|
+
{ command: 'git add -A' },
|
|
888
|
+
// Exclusion happens as an unstage rather than an add-time pathspec:
|
|
889
|
+
// `git add` refuses a pathspec naming an ignored directory (exit 1) even
|
|
890
|
+
// as an exclusion, and an add-time pathspec cannot cover entries that
|
|
891
|
+
// were already staged before this call. The reset is relative to cwd, so
|
|
892
|
+
// a workspace nested inside a larger repo excludes its own path; a path
|
|
893
|
+
// with no index entry is a quiet no-op, unborn HEAD included.
|
|
894
|
+
...excludePaths.map((excludePath) => ({
|
|
895
|
+
command: `git reset -q -- "${excludePath}"`,
|
|
896
|
+
})),
|
|
897
|
+
{ command: 'git commit --no-verify -F -', input: commitMessage },
|
|
898
|
+
];
|
|
899
|
+
}
|
|
900
|
+
function commitFailure(err) {
|
|
901
|
+
const stderr = err?.stderr?.toString();
|
|
902
|
+
const stdout = err?.stdout?.toString();
|
|
903
|
+
const detail = [stderr, stdout]
|
|
904
|
+
.map((s) => s?.trim())
|
|
905
|
+
.filter(Boolean)
|
|
906
|
+
.join('\n');
|
|
907
|
+
// `{ cause }` preserves structured fields (.signal, .status, .code)
|
|
908
|
+
// for callers to inspect; otherwise only stderr/stdout text survives.
|
|
909
|
+
return new Error(detail || (err instanceof Error ? err.message : String(err)), { cause: err });
|
|
910
|
+
}
|
|
911
|
+
function execAsync(command, cwd, input) {
|
|
912
|
+
return new Promise((res, rej) => {
|
|
913
|
+
const child = (0, child_process_1.exec)(command, { encoding: 'utf8', cwd, windowsHide: true },
|
|
914
|
+
// The streams ride on the error as `execSync` reports them, so
|
|
915
|
+
// `commitFailure` shapes both the same way.
|
|
916
|
+
(err, stdout, stderr) => err ? rej(Object.assign(err, { stdout, stderr })) : res());
|
|
917
|
+
// Closed for every command, since `git commit -F -` reads to end of
|
|
918
|
+
// input. A child that exits before reading raises EPIPE here, which the
|
|
919
|
+
// exit callback already reports.
|
|
920
|
+
child.stdin?.on('error', () => { });
|
|
921
|
+
child.stdin?.end(input ?? '');
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* `git reset --hard <ref>` then `git clean -fd`, keeping `keepPaths` (git
|
|
926
|
+
* exclusion patterns, repo-relative) out of the clean. Throws with git's
|
|
927
|
+
* stderr when either fails. `ref` is a sha a caller validated with `GIT_SHA`,
|
|
928
|
+
* never user input.
|
|
929
|
+
*/
|
|
930
|
+
function resetWorkingTree(ref, keepPaths, directory) {
|
|
931
|
+
const options = {
|
|
932
|
+
encoding: 'utf8',
|
|
933
|
+
stdio: 'pipe',
|
|
934
|
+
cwd: directory,
|
|
935
|
+
windowsHide: true,
|
|
936
|
+
};
|
|
937
|
+
(0, child_process_1.execFileSync)('git', ['reset', '--hard', ref], options);
|
|
938
|
+
(0, child_process_1.execFileSync)('git', ['clean', '-fd', ...keepPaths.flatMap((keepPath) => ['-e', keepPath])], options);
|
|
939
|
+
}
|
|
940
|
+
function getLatestCommitSha(directory) {
|
|
941
|
+
try {
|
|
942
|
+
return (0, child_process_1.execSync)('git rev-parse HEAD', {
|
|
943
|
+
encoding: 'utf8',
|
|
944
|
+
stdio: 'pipe',
|
|
945
|
+
windowsHide: true,
|
|
946
|
+
cwd: directory,
|
|
947
|
+
}).trim();
|
|
948
|
+
}
|
|
949
|
+
catch {
|
|
950
|
+
return null;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* The shape of a recorded `git rev-parse` output: 40 hex chars, or 64 in a
|
|
955
|
+
* sha256 repository. Anything a caller persists and later interpolates into a
|
|
956
|
+
* command line has to be checked against this first.
|
|
957
|
+
*/
|
|
958
|
+
exports.GIT_SHA = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/i;
|
|
959
|
+
/**
|
|
960
|
+
* Whether `ancestor` is reachable from `descendant`. 'unknown' means the
|
|
961
|
+
* answer could not be established (invalid input, not a repository, a commit
|
|
962
|
+
* git does not know), which is distinct from a verified 'not-ancestor'.
|
|
963
|
+
*/
|
|
964
|
+
function getAncestorStatus(ancestor, descendant, directory) {
|
|
965
|
+
if (!exports.GIT_SHA.test(ancestor) || !exports.GIT_SHA.test(descendant)) {
|
|
966
|
+
return 'unknown';
|
|
967
|
+
}
|
|
968
|
+
try {
|
|
969
|
+
(0, child_process_1.execSync)(`git merge-base --is-ancestor ${ancestor} ${descendant}`, {
|
|
970
|
+
stdio: 'pipe',
|
|
971
|
+
windowsHide: true,
|
|
972
|
+
cwd: directory,
|
|
973
|
+
});
|
|
974
|
+
return 'ancestor';
|
|
975
|
+
}
|
|
976
|
+
catch (e) {
|
|
977
|
+
// Exit 1 is git's verified "no"; anything else is a failed probe.
|
|
978
|
+
return e?.status === 1
|
|
979
|
+
? 'not-ancestor'
|
|
980
|
+
: 'unknown';
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Whether `ancestor` is reachable from `descendant`, i.e. resetting to
|
|
985
|
+
* `descendant` keeps `ancestor` in history. Returns false when the answer
|
|
986
|
+
* cannot be established (invalid input, not a repository, unknown commits),
|
|
987
|
+
* so callers treat an unverifiable commit as not preserved.
|
|
988
|
+
*/
|
|
989
|
+
function isAncestorCommit(ancestor, descendant, directory) {
|
|
990
|
+
return getAncestorStatus(ancestor, descendant, directory) === 'ancestor';
|
|
991
|
+
}
|