@ohos-npm-ports/nx 23.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +65 -0
- package/dist/bin/init-local.d.ts +8 -0
- package/dist/bin/init-local.js +188 -0
- package/dist/bin/nx-cloud.d.ts +3 -0
- package/dist/bin/nx-cloud.js +47 -0
- package/dist/bin/nx.d.ts +3 -0
- package/dist/bin/nx.js +340 -0
- package/dist/bin/post-install.d.ts +1 -0
- package/dist/bin/post-install.js +52 -0
- package/dist/bin/run-executor.d.ts +1 -0
- package/dist/bin/run-executor.js +66 -0
- package/dist/plugins/package-json.d.ts +4 -0
- package/dist/plugins/package-json.js +40 -0
- package/dist/presets/core.json +1 -0
- package/dist/presets/npm.json +7 -0
- package/dist/release/changelog-renderer/index.d.ts +110 -0
- package/dist/release/changelog-renderer/index.js +382 -0
- package/dist/release/index.d.ts +4 -0
- package/dist/release/index.js +13 -0
- package/dist/src/adapter/angular-json.d.ts +10 -0
- package/dist/src/adapter/angular-json.js +129 -0
- package/dist/src/adapter/compat.d.ts +2 -0
- package/dist/src/adapter/compat.js +154 -0
- package/dist/src/adapter/ngcli-adapter.d.ts +105 -0
- package/dist/src/adapter/ngcli-adapter.js +1024 -0
- package/dist/src/adapter/rxjs-for-await.d.ts +109 -0
- package/dist/src/adapter/rxjs-for-await.js +362 -0
- package/dist/src/ai/clone-ai-config-repo.d.ts +11 -0
- package/dist/src/ai/clone-ai-config-repo.js +155 -0
- package/dist/src/ai/configure-ai-agents-disclaimer.d.ts +5 -0
- package/dist/src/ai/configure-ai-agents-disclaimer.js +31 -0
- package/dist/src/ai/constants.d.ts +31 -0
- package/dist/src/ai/constants.js +76 -0
- package/dist/src/ai/detect-ai-agent.d.ts +2 -0
- package/dist/src/ai/detect-ai-agent.js +12 -0
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.d.ts +5 -0
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.js +26 -0
- package/dist/src/ai/set-up-ai-agents/schema.d.ts +11 -0
- package/dist/src/ai/set-up-ai-agents/schema.json +34 -0
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts +10 -0
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +530 -0
- package/dist/src/ai/utils.d.ts +20 -0
- package/dist/src/ai/utils.js +217 -0
- package/dist/src/analytics/analytics.d.ts +16 -0
- package/dist/src/analytics/analytics.js +248 -0
- package/dist/src/analytics/index.d.ts +1 -0
- package/dist/src/analytics/index.js +12 -0
- package/dist/src/command-line/add/add.d.ts +3 -0
- package/dist/src/command-line/add/add.js +133 -0
- package/dist/src/command-line/add/command-object.d.ts +8 -0
- package/dist/src/command-line/add/command-object.js +28 -0
- package/dist/src/command-line/add/completion.d.ts +1 -0
- package/dist/src/command-line/add/completion.js +15 -0
- package/dist/src/command-line/affected/affected.d.ts +10 -0
- package/dist/src/command-line/affected/affected.js +89 -0
- package/dist/src/command-line/affected/command-object.d.ts +6 -0
- package/dist/src/command-line/affected/command-object.js +83 -0
- package/dist/src/command-line/affected/completion.d.ts +1 -0
- package/dist/src/command-line/affected/completion.js +15 -0
- package/dist/src/command-line/ai/ai-output.d.ts +46 -0
- package/dist/src/command-line/ai/ai-output.js +86 -0
- package/dist/src/command-line/completion/argv-layout.d.ts +6 -0
- package/dist/src/command-line/completion/argv-layout.js +19 -0
- package/dist/src/command-line/completion/command-completions.d.ts +19 -0
- package/dist/src/command-line/completion/command-completions.js +120 -0
- package/dist/src/command-line/completion/command-handlers.d.ts +30 -0
- package/dist/src/command-line/completion/command-handlers.js +69 -0
- package/dist/src/command-line/completion/command-object.d.ts +10 -0
- package/dist/src/command-line/completion/command-object.js +107 -0
- package/dist/src/command-line/completion/completion-providers.d.ts +21 -0
- package/dist/src/command-line/completion/completion-providers.js +194 -0
- package/dist/src/command-line/completion/infix-targets.d.ts +1 -0
- package/dist/src/command-line/completion/infix-targets.js +48 -0
- package/dist/src/command-line/completion/metadata.d.ts +22 -0
- package/dist/src/command-line/completion/metadata.js +71 -0
- package/dist/src/command-line/completion/registrations.d.ts +9 -0
- package/dist/src/command-line/completion/registrations.js +16 -0
- package/dist/src/command-line/completion/scripts/bash.sh +51 -0
- package/dist/src/command-line/completion/scripts/fish.fish +47 -0
- package/dist/src/command-line/completion/scripts/powershell.ps1 +52 -0
- package/dist/src/command-line/completion/scripts/zsh.zsh +69 -0
- package/dist/src/command-line/completion/scripts.d.ts +18 -0
- package/dist/src/command-line/completion/scripts.js +140 -0
- package/dist/src/command-line/completion/trigger.d.ts +3 -0
- package/dist/src/command-line/completion/trigger.js +21 -0
- package/dist/src/command-line/completion/value-completions.d.ts +3 -0
- package/dist/src/command-line/completion/value-completions.js +21 -0
- package/dist/src/command-line/configure-ai-agents/command-object.d.ts +8 -0
- package/dist/src/command-line/configure-ai-agents/command-object.js +59 -0
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.d.ts +3 -0
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +425 -0
- package/dist/src/command-line/daemon/command-object.d.ts +1 -0
- package/dist/src/command-line/daemon/command-object.js +29 -0
- package/dist/src/command-line/daemon/daemon.d.ts +2 -0
- package/dist/src/command-line/daemon/daemon.js +31 -0
- package/dist/src/command-line/deprecated/command-objects.d.ts +9 -0
- package/dist/src/command-line/deprecated/command-objects.js +48 -0
- package/dist/src/command-line/examples.d.ts +12 -0
- package/dist/src/command-line/examples.js +403 -0
- package/dist/src/command-line/exec/command-object.d.ts +2 -0
- package/dist/src/command-line/exec/command-object.js +20 -0
- package/dist/src/command-line/exec/exec.d.ts +1 -0
- package/dist/src/command-line/exec/exec.js +143 -0
- package/dist/src/command-line/format/command-object.d.ts +3 -0
- package/dist/src/command-line/format/command-object.js +58 -0
- package/dist/src/command-line/format/format.d.ts +2 -0
- package/dist/src/command-line/format/format.js +233 -0
- package/dist/src/command-line/generate/command-object.d.ts +2 -0
- package/dist/src/command-line/generate/command-object.js +67 -0
- package/dist/src/command-line/generate/completion.d.ts +1 -0
- package/dist/src/command-line/generate/completion.js +9 -0
- package/dist/src/command-line/generate/generate.d.ts +21 -0
- package/dist/src/command-line/generate/generate.js +281 -0
- package/dist/src/command-line/generate/generator-utils.d.ts +18 -0
- package/dist/src/command-line/generate/generator-utils.js +91 -0
- package/dist/src/command-line/graph/command-object.d.ts +3 -0
- package/dist/src/command-line/graph/command-object.js +76 -0
- package/dist/src/command-line/graph/completion.d.ts +1 -0
- package/dist/src/command-line/graph/completion.js +13 -0
- package/dist/src/command-line/graph/graph.d.ts +70 -0
- package/dist/src/command-line/graph/graph.js +987 -0
- package/dist/src/command-line/import/command-object.d.ts +2 -0
- package/dist/src/command-line/import/command-object.js +63 -0
- package/dist/src/command-line/import/import.d.ts +26 -0
- package/dist/src/command-line/import/import.js +600 -0
- package/dist/src/command-line/import/utils/ai-output.d.ts +93 -0
- package/dist/src/command-line/import/utils/ai-output.js +209 -0
- package/dist/src/command-line/import/utils/merge-remote-source.d.ts +2 -0
- package/dist/src/command-line/import/utils/merge-remote-source.js +14 -0
- package/dist/src/command-line/import/utils/prepare-source-repo.d.ts +2 -0
- package/dist/src/command-line/import/utils/prepare-source-repo.js +27 -0
- package/dist/src/command-line/index.d.ts +22 -0
- package/dist/src/command-line/index.js +26 -0
- package/dist/src/command-line/init/ai-agent-prompts.d.ts +2 -0
- package/dist/src/command-line/init/ai-agent-prompts.js +36 -0
- package/dist/src/command-line/init/command-object.d.ts +2 -0
- package/dist/src/command-line/init/command-object.js +116 -0
- package/dist/src/command-line/init/configure-plugins.d.ts +34 -0
- package/dist/src/command-line/init/configure-plugins.js +211 -0
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +6 -0
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +142 -0
- package/dist/src/command-line/init/implementation/add-nx-to-nest.d.ts +5 -0
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +357 -0
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +6 -0
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +83 -0
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +51 -0
- package/dist/src/command-line/init/implementation/angular/index.d.ts +2 -0
- package/dist/src/command-line/init/implementation/angular/index.js +135 -0
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.d.ts +1 -0
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +9 -0
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts +2 -0
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +153 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.d.ts +1 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +198 -0
- package/dist/src/command-line/init/implementation/angular/types.d.ts +20 -0
- package/dist/src/command-line/init/implementation/angular/types.js +2 -0
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +15 -0
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.js +134 -0
- package/dist/src/command-line/init/implementation/deduce-default-base.d.ts +1 -0
- package/dist/src/command-line/init/implementation/deduce-default-base.js +53 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +11 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +146 -0
- package/dist/src/command-line/init/implementation/dot-nx/nxw.d.ts +1 -0
- package/dist/src/command-line/init/implementation/dot-nx/nxw.js +123 -0
- package/dist/src/command-line/init/implementation/utils.d.ts +35 -0
- package/dist/src/command-line/init/implementation/utils.js +422 -0
- package/dist/src/command-line/init/init-v1.d.ts +8 -0
- package/dist/src/command-line/init/init-v1.js +104 -0
- package/dist/src/command-line/init/init-v2.d.ts +23 -0
- package/dist/src/command-line/init/init-v2.js +612 -0
- package/dist/src/command-line/init/utils/ai-output.d.ts +72 -0
- package/dist/src/command-line/init/utils/ai-output.js +180 -0
- package/dist/src/command-line/list/command-object.d.ts +2 -0
- package/dist/src/command-line/list/command-object.js +21 -0
- package/dist/src/command-line/list/list.d.ts +15 -0
- package/dist/src/command-line/list/list.js +48 -0
- package/dist/src/command-line/mcp/command-object.d.ts +2 -0
- package/dist/src/command-line/mcp/command-object.js +29 -0
- package/dist/src/command-line/mcp/mcp.d.ts +2 -0
- package/dist/src/command-line/mcp/mcp.js +60 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +100 -0
- package/dist/src/command-line/migrate/agentic/cli-args.d.ts +12 -0
- package/dist/src/command-line/migrate/agentic/cli-args.js +38 -0
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +6 -0
- package/dist/src/command-line/migrate/agentic/definitions.js +121 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.d.ts +10 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.js +68 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +87 -0
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +69 -0
- package/dist/src/command-line/migrate/agentic/handoff.js +190 -0
- package/dist/src/command-line/migrate/agentic/inception.d.ts +9 -0
- package/dist/src/command-line/migrate/agentic/inception.js +15 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +50 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +56 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +66 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +49 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +53 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +26 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +27 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +19 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +145 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +90 -0
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +58 -0
- package/dist/src/command-line/migrate/agentic/run-step.js +123 -0
- package/dist/src/command-line/migrate/agentic/runner.d.ts +33 -0
- package/dist/src/command-line/migrate/agentic/runner.js +444 -0
- package/dist/src/command-line/migrate/agentic/select.d.ts +16 -0
- package/dist/src/command-line/migrate/agentic/select.js +253 -0
- package/dist/src/command-line/migrate/agentic/types.d.ts +102 -0
- package/dist/src/command-line/migrate/agentic/types.js +2 -0
- package/dist/src/command-line/migrate/command-object.d.ts +47 -0
- package/dist/src/command-line/migrate/command-object.js +134 -0
- package/dist/src/command-line/migrate/execute-migration.d.ts +72 -0
- package/dist/src/command-line/migrate/execute-migration.js +389 -0
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +71 -0
- package/dist/src/command-line/migrate/migrate-analytics.js +253 -0
- package/dist/src/command-line/migrate/migrate-commits.d.ts +50 -0
- package/dist/src/command-line/migrate/migrate-commits.js +102 -0
- package/dist/src/command-line/migrate/migrate-config.d.ts +28 -0
- package/dist/src/command-line/migrate/migrate-config.js +104 -0
- package/dist/src/command-line/migrate/migrate-output.d.ts +180 -0
- package/dist/src/command-line/migrate/migrate-output.js +258 -0
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +88 -0
- package/dist/src/command-line/migrate/migrate-ui-api.js +428 -0
- package/dist/src/command-line/migrate/migrate.d.ts +269 -0
- package/dist/src/command-line/migrate/migrate.js +2417 -0
- package/dist/src/command-line/migrate/migration-shape.d.ts +8 -0
- package/dist/src/command-line/migrate/migration-shape.js +13 -0
- package/dist/src/command-line/migrate/multi-major.d.ts +37 -0
- package/dist/src/command-line/migrate/multi-major.js +218 -0
- package/dist/src/command-line/migrate/prompt-files.d.ts +31 -0
- package/dist/src/command-line/migrate/prompt-files.js +141 -0
- package/dist/src/command-line/migrate/resolve-package-version.d.ts +24 -0
- package/dist/src/command-line/migrate/resolve-package-version.js +249 -0
- package/dist/src/command-line/migrate/run-migration-process.js +109 -0
- package/dist/src/command-line/migrate/safe-prompt.d.ts +33 -0
- package/dist/src/command-line/migrate/safe-prompt.js +58 -0
- package/dist/src/command-line/migrate/update-filters.d.ts +11 -0
- package/dist/src/command-line/migrate/update-filters.js +45 -0
- package/dist/src/command-line/migrate/version-utils.d.ts +5 -0
- package/dist/src/command-line/migrate/version-utils.js +52 -0
- package/dist/src/command-line/new/command-object.d.ts +2 -0
- package/dist/src/command-line/new/command-object.js +26 -0
- package/dist/src/command-line/new/new.d.ts +3 -0
- package/dist/src/command-line/new/new.js +30 -0
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.js +13 -0
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/complete-run/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/complete-run/command-object.js +17 -0
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.js +13 -0
- package/dist/src/command-line/nx-cloud/connect/command-object.d.ts +3 -0
- package/dist/src/command-line/nx-cloud/connect/command-object.js +28 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +13 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +270 -0
- package/dist/src/command-line/nx-cloud/connect/view-logs.d.ts +1 -0
- package/dist/src/command-line/nx-cloud/connect/view-logs.js +55 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.js +13 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.js +32 -0
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.js +13 -0
- package/dist/src/command-line/nx-cloud/login/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/login/command-object.js +20 -0
- package/dist/src/command-line/nx-cloud/login/login.d.ts +5 -0
- package/dist/src/command-line/nx-cloud/login/login.js +10 -0
- package/dist/src/command-line/nx-cloud/logout/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/logout/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/logout/logout.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/logout/logout.js +7 -0
- package/dist/src/command-line/nx-cloud/record/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/record/command-object.js +19 -0
- package/dist/src/command-line/nx-cloud/record/record.d.ts +5 -0
- package/dist/src/command-line/nx-cloud/record/record.js +33 -0
- package/dist/src/command-line/nx-cloud/start-agent/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-agent/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.js +13 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.js +13 -0
- package/dist/src/command-line/nx-cloud/utils.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/utils.js +34 -0
- package/dist/src/command-line/nx-commands.d.ts +10 -0
- package/dist/src/command-line/nx-commands.js +181 -0
- package/dist/src/command-line/register/command-object.d.ts +6 -0
- package/dist/src/command-line/register/command-object.js +27 -0
- package/dist/src/command-line/register/register.d.ts +2 -0
- package/dist/src/command-line/register/register.js +9 -0
- package/dist/src/command-line/release/changelog/commit-utils.d.ts +13 -0
- package/dist/src/command-line/release/changelog/commit-utils.js +63 -0
- package/dist/src/command-line/release/changelog/version-plan-filtering.d.ts +43 -0
- package/dist/src/command-line/release/changelog/version-plan-filtering.js +156 -0
- package/dist/src/command-line/release/changelog/version-plan-utils.d.ts +31 -0
- package/dist/src/command-line/release/changelog/version-plan-utils.js +92 -0
- package/dist/src/command-line/release/changelog.d.ts +28 -0
- package/dist/src/command-line/release/changelog.js +911 -0
- package/dist/src/command-line/release/command-object.d.ts +96 -0
- package/dist/src/command-line/release/command-object.js +342 -0
- package/dist/src/command-line/release/config/config.d.ts +70 -0
- package/dist/src/command-line/release/config/config.js +1204 -0
- package/dist/src/command-line/release/config/conventional-commits.d.ts +2 -0
- package/dist/src/command-line/release/config/conventional-commits.js +106 -0
- package/dist/src/command-line/release/config/deep-merge-json.d.ts +1 -0
- package/dist/src/command-line/release/config/deep-merge-json.js +28 -0
- package/dist/src/command-line/release/config/filter-release-groups.d.ts +23 -0
- package/dist/src/command-line/release/config/filter-release-groups.js +157 -0
- package/dist/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
- package/dist/src/command-line/release/config/use-legacy-versioning.js +8 -0
- package/dist/src/command-line/release/config/version-plans.d.ts +42 -0
- package/dist/src/command-line/release/config/version-plans.js +278 -0
- package/dist/src/command-line/release/index.d.ts +49 -0
- package/dist/src/command-line/release/index.js +49 -0
- package/dist/src/command-line/release/plan-check.d.ts +4 -0
- package/dist/src/command-line/release/plan-check.js +170 -0
- package/dist/src/command-line/release/plan.d.ts +4 -0
- package/dist/src/command-line/release/plan.js +261 -0
- package/dist/src/command-line/release/publish.d.ts +9 -0
- package/dist/src/command-line/release/publish.js +290 -0
- package/dist/src/command-line/release/release.d.ts +5 -0
- package/dist/src/command-line/release/release.js +310 -0
- package/dist/src/command-line/release/utils/diff.d.ts +21 -0
- package/dist/src/command-line/release/utils/diff.js +168 -0
- package/dist/src/command-line/release/utils/exec-command.d.ts +1 -0
- package/dist/src/command-line/release/utils/exec-command.js +34 -0
- package/dist/src/command-line/release/utils/generate-version-plan-content.d.ts +1 -0
- package/dist/src/command-line/release/utils/generate-version-plan-content.js +20 -0
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.d.ts +7 -0
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.js +78 -0
- package/dist/src/command-line/release/utils/git.d.ts +126 -0
- package/dist/src/command-line/release/utils/git.js +597 -0
- package/dist/src/command-line/release/utils/launch-editor.d.ts +1 -0
- package/dist/src/command-line/release/utils/launch-editor.js +46 -0
- package/dist/src/command-line/release/utils/markdown.d.ts +6 -0
- package/dist/src/command-line/release/utils/markdown.js +28 -0
- package/dist/src/command-line/release/utils/print-changes.d.ts +6 -0
- package/dist/src/command-line/release/utils/print-changes.js +63 -0
- package/dist/src/command-line/release/utils/print-config.d.ts +7 -0
- package/dist/src/command-line/release/utils/print-config.js +36 -0
- package/dist/src/command-line/release/utils/release-graph.d.ts +230 -0
- package/dist/src/command-line/release/utils/release-graph.js +709 -0
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +9 -0
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.js +61 -0
- package/dist/src/command-line/release/utils/remote-release-clients/github.d.ts +58 -0
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +342 -0
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +62 -0
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +268 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +111 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +138 -0
- package/dist/src/command-line/release/utils/repository-git-tags.d.ts +25 -0
- package/dist/src/command-line/release/utils/repository-git-tags.js +125 -0
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.d.ts +2 -0
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +22 -0
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.d.ts +1 -0
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.js +53 -0
- package/dist/src/command-line/release/utils/resolve-semver-specifier.d.ts +7 -0
- package/dist/src/command-line/release/utils/resolve-semver-specifier.js +63 -0
- package/dist/src/command-line/release/utils/semver.d.ts +26 -0
- package/dist/src/command-line/release/utils/semver.js +111 -0
- package/dist/src/command-line/release/utils/shared-legacy.d.ts +25 -0
- package/dist/src/command-line/release/utils/shared-legacy.js +2 -0
- package/dist/src/command-line/release/utils/shared.d.ts +64 -0
- package/dist/src/command-line/release/utils/shared.js +379 -0
- package/dist/src/command-line/release/utils/version-plan-utils.d.ts +40 -0
- package/dist/src/command-line/release/utils/version-plan-utils.js +111 -0
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +8 -0
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.js +61 -0
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
- package/dist/src/command-line/release/version/project-logger.d.ts +8 -0
- package/dist/src/command-line/release/version/project-logger.js +47 -0
- package/dist/src/command-line/release/version/release-group-processor.d.ts +115 -0
- package/dist/src/command-line/release/version/release-group-processor.js +632 -0
- package/dist/src/command-line/release/version/resolve-current-version.d.ts +32 -0
- package/dist/src/command-line/release/version/resolve-current-version.js +243 -0
- package/dist/src/command-line/release/version/topological-sort.d.ts +9 -0
- package/dist/src/command-line/release/version/topological-sort.js +41 -0
- package/dist/src/command-line/release/version/version-actions.d.ts +199 -0
- package/dist/src/command-line/release/version/version-actions.js +247 -0
- package/dist/src/command-line/release/version.d.ts +28 -0
- package/dist/src/command-line/release/version.js +378 -0
- package/dist/src/command-line/repair/command-object.d.ts +2 -0
- package/dist/src/command-line/repair/command-object.js +21 -0
- package/dist/src/command-line/repair/repair.d.ts +3 -0
- package/dist/src/command-line/repair/repair.js +41 -0
- package/dist/src/command-line/report/command-object.d.ts +2 -0
- package/dist/src/command-line/report/command-object.js +12 -0
- package/dist/src/command-line/report/report.d.ts +71 -0
- package/dist/src/command-line/report/report.js +405 -0
- package/dist/src/command-line/reset/command-object.d.ts +8 -0
- package/dist/src/command-line/reset/command-object.js +27 -0
- package/dist/src/command-line/reset/reset.d.ts +2 -0
- package/dist/src/command-line/reset/reset.js +178 -0
- package/dist/src/command-line/run/command-object.d.ts +6 -0
- package/dist/src/command-line/run/command-object.js +43 -0
- package/dist/src/command-line/run/completion.d.ts +1 -0
- package/dist/src/command-line/run/completion.js +7 -0
- package/dist/src/command-line/run/executor-utils.d.ts +12 -0
- package/dist/src/command-line/run/executor-utils.js +96 -0
- package/dist/src/command-line/run/run-one.d.ts +17 -0
- package/dist/src/command-line/run/run-one.js +154 -0
- package/dist/src/command-line/run/run.d.ts +51 -0
- package/dist/src/command-line/run/run.js +179 -0
- package/dist/src/command-line/run-many/command-object.d.ts +2 -0
- package/dist/src/command-line/run-many/command-object.js +18 -0
- package/dist/src/command-line/run-many/completion.d.ts +1 -0
- package/dist/src/command-line/run-many/completion.js +13 -0
- package/dist/src/command-line/run-many/run-many.d.ts +10 -0
- package/dist/src/command-line/run-many/run-many.js +89 -0
- package/dist/src/command-line/show/command-object.d.ts +40 -0
- package/dist/src/command-line/show/command-object.js +237 -0
- package/dist/src/command-line/show/completion.d.ts +1 -0
- package/dist/src/command-line/show/completion.js +27 -0
- package/dist/src/command-line/show/project.d.ts +2 -0
- package/dist/src/command-line/show/project.js +103 -0
- package/dist/src/command-line/show/projects.d.ts +2 -0
- package/dist/src/command-line/show/projects.js +80 -0
- package/dist/src/command-line/show/show-target/index.d.ts +3 -0
- package/dist/src/command-line/show/show-target/index.js +9 -0
- package/dist/src/command-line/show/show-target/info.d.ts +28 -0
- package/dist/src/command-line/show/show-target/info.js +389 -0
- package/dist/src/command-line/show/show-target/inputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/inputs.js +83 -0
- package/dist/src/command-line/show/show-target/outputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/outputs.js +70 -0
- package/dist/src/command-line/show/show-target/utils.d.ts +54 -0
- package/dist/src/command-line/show/show-target/utils.js +265 -0
- package/dist/src/command-line/sync/command-object.d.ts +6 -0
- package/dist/src/command-line/sync/command-object.js +21 -0
- package/dist/src/command-line/sync/sync.d.ts +6 -0
- package/dist/src/command-line/sync/sync.js +120 -0
- package/dist/src/command-line/watch/command-object.d.ts +2 -0
- package/dist/src/command-line/watch/command-object.js +91 -0
- package/dist/src/command-line/watch/completion.d.ts +1 -0
- package/dist/src/command-line/watch/completion.js +10 -0
- package/dist/src/command-line/watch/watch.d.ts +31 -0
- package/dist/src/command-line/watch/watch.js +198 -0
- package/dist/src/command-line/yargs-utils/arguments-of.d.ts +11 -0
- package/dist/src/command-line/yargs-utils/arguments-of.js +9 -0
- package/dist/src/command-line/yargs-utils/documentation.d.ts +2 -0
- package/dist/src/command-line/yargs-utils/documentation.js +12 -0
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +61 -0
- package/dist/src/command-line/yargs-utils/shared-options.js +395 -0
- package/dist/src/commands-runner/command-graph.d.ts +13 -0
- package/dist/src/commands-runner/command-graph.js +2 -0
- package/dist/src/commands-runner/create-command-graph.d.ts +4 -0
- package/dist/src/commands-runner/create-command-graph.js +72 -0
- package/dist/src/commands-runner/get-command-projects.d.ts +3 -0
- package/dist/src/commands-runner/get-command-projects.js +33 -0
- package/dist/src/config/calculate-default-project-name.d.ts +4 -0
- package/dist/src/config/calculate-default-project-name.js +41 -0
- package/dist/src/config/configuration.d.ts +8 -0
- package/dist/src/config/configuration.js +17 -0
- package/dist/src/config/misc-interfaces.d.ts +254 -0
- package/dist/src/config/misc-interfaces.js +2 -0
- package/dist/src/config/nx-json.d.ts +963 -0
- package/dist/src/config/nx-json.js +40 -0
- package/dist/src/config/project-graph.d.ts +137 -0
- package/dist/src/config/project-graph.js +45 -0
- package/dist/src/config/schema-utils.d.ts +37 -0
- package/dist/src/config/schema-utils.js +199 -0
- package/dist/src/config/task-graph.d.ts +6 -0
- package/dist/src/config/task-graph.js +2 -0
- package/dist/src/config/to-project-name.d.ts +5 -0
- package/dist/src/config/to-project-name.js +12 -0
- package/dist/src/config/workspace-json-project-json.d.ts +273 -0
- package/dist/src/config/workspace-json-project-json.js +2 -0
- package/dist/src/core/graph/environment.js +1 -0
- package/dist/src/core/graph/favicon.ico +0 -0
- package/dist/src/core/graph/index.html +32 -0
- package/dist/src/core/graph/main.js +1 -0
- package/dist/src/core/graph/runtime.js +1 -0
- package/dist/src/core/graph/styles.css +2 -0
- package/dist/src/core/graph/styles.js +1 -0
- package/dist/src/daemon/cache.d.ts +10 -0
- package/dist/src/daemon/cache.js +58 -0
- package/dist/src/daemon/client/client.d.ts +115 -0
- package/dist/src/daemon/client/client.js +1046 -0
- package/dist/src/daemon/client/daemon-environment.d.ts +12 -0
- package/dist/src/daemon/client/daemon-environment.js +170 -0
- package/dist/src/daemon/client/daemon-socket-messenger.d.ts +12 -0
- package/dist/src/daemon/client/daemon-socket-messenger.js +54 -0
- package/dist/src/daemon/is-nx-version-mismatch.d.ts +1 -0
- package/dist/src/daemon/is-nx-version-mismatch.js +8 -0
- package/dist/src/daemon/is-on-daemon.d.ts +1 -0
- package/dist/src/daemon/is-on-daemon.js +6 -0
- package/dist/src/daemon/is-v8-serializer-enabled.d.ts +5 -0
- package/dist/src/daemon/is-v8-serializer-enabled.js +10 -0
- package/dist/src/daemon/logger.d.ts +39 -0
- package/dist/src/daemon/logger.js +80 -0
- package/dist/src/daemon/message-types/configure-ai-agents.d.ts +20 -0
- package/dist/src/daemon/message-types/configure-ai-agents.js +19 -0
- package/dist/src/daemon/message-types/daemon-message.d.ts +6 -0
- package/dist/src/daemon/message-types/daemon-message.js +6 -0
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +6 -0
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.js +11 -0
- package/dist/src/daemon/message-types/force-shutdown.d.ts +5 -0
- package/dist/src/daemon/message-types/force-shutdown.js +11 -0
- package/dist/src/daemon/message-types/get-context-file-data.d.ts +5 -0
- package/dist/src/daemon/message-types/get-context-file-data.js +11 -0
- package/dist/src/daemon/message-types/get-files-in-directory.d.ts +6 -0
- package/dist/src/daemon/message-types/get-files-in-directory.js +11 -0
- package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +6 -0
- package/dist/src/daemon/message-types/get-nx-workspace-files.js +11 -0
- package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +5 -0
- package/dist/src/daemon/message-types/get-registered-sync-generators.js +11 -0
- package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +6 -0
- package/dist/src/daemon/message-types/get-sync-generator-changes.js +11 -0
- package/dist/src/daemon/message-types/glob.d.ts +14 -0
- package/dist/src/daemon/message-types/glob.js +19 -0
- package/dist/src/daemon/message-types/hash-glob.d.ts +13 -0
- package/dist/src/daemon/message-types/hash-glob.js +19 -0
- package/dist/src/daemon/message-types/nx-console.d.ts +17 -0
- package/dist/src/daemon/message-types/nx-console.js +19 -0
- package/dist/src/daemon/message-types/register-project-graph-listener.d.ts +5 -0
- package/dist/src/daemon/message-types/register-project-graph-listener.js +11 -0
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +13 -0
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.js +19 -0
- package/dist/src/daemon/message-types/streaming-messages.d.ts +14 -0
- package/dist/src/daemon/message-types/streaming-messages.js +19 -0
- package/dist/src/daemon/message-types/task-history.d.ts +19 -0
- package/dist/src/daemon/message-types/task-history.js +27 -0
- package/dist/src/daemon/message-types/update-workspace-context.d.ts +8 -0
- package/dist/src/daemon/message-types/update-workspace-context.js +11 -0
- package/dist/src/daemon/server/client-socket-context.d.ts +23 -0
- package/dist/src/daemon/server/client-socket-context.js +89 -0
- package/dist/src/daemon/server/file-watching/changed-projects.d.ts +10 -0
- package/dist/src/daemon/server/file-watching/changed-projects.js +53 -0
- package/dist/src/daemon/server/file-watching/file-change-events.d.ts +7 -0
- package/dist/src/daemon/server/file-watching/file-change-events.js +19 -0
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +12 -0
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +66 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.d.ts +9 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.js +76 -0
- package/dist/src/daemon/server/handle-configure-ai-agents.d.ts +3 -0
- package/dist/src/daemon/server/handle-configure-ai-agents.js +101 -0
- package/dist/src/daemon/server/handle-context-file-data.d.ts +2 -0
- package/dist/src/daemon/server/handle-context-file-data.js +12 -0
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +2 -0
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +11 -0
- package/dist/src/daemon/server/handle-force-shutdown.d.ts +5 -0
- package/dist/src/daemon/server/handle-force-shutdown.js +18 -0
- package/dist/src/daemon/server/handle-get-files-in-directory.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-files-in-directory.js +12 -0
- package/dist/src/daemon/server/handle-get-registered-sync-generators.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-registered-sync-generators.js +11 -0
- package/dist/src/daemon/server/handle-get-sync-generator-changes.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-sync-generator-changes.js +20 -0
- package/dist/src/daemon/server/handle-glob.d.ts +3 -0
- package/dist/src/daemon/server/handle-glob.js +20 -0
- package/dist/src/daemon/server/handle-hash-glob.d.ts +3 -0
- package/dist/src/daemon/server/handle-hash-glob.js +20 -0
- package/dist/src/daemon/server/handle-hash-tasks.d.ts +12 -0
- package/dist/src/daemon/server/handle-hash-tasks.js +28 -0
- package/dist/src/daemon/server/handle-nx-console.d.ts +3 -0
- package/dist/src/daemon/server/handle-nx-console.js +54 -0
- package/dist/src/daemon/server/handle-nx-workspace-files.d.ts +2 -0
- package/dist/src/daemon/server/handle-nx-workspace-files.js +12 -0
- package/dist/src/daemon/server/handle-outputs-tracking.d.ts +15 -0
- package/dist/src/daemon/server/handle-outputs-tracking.js +35 -0
- package/dist/src/daemon/server/handle-process-in-background.d.ts +6 -0
- package/dist/src/daemon/server/handle-process-in-background.js +32 -0
- package/dist/src/daemon/server/handle-request-project-graph.d.ts +3 -0
- package/dist/src/daemon/server/handle-request-project-graph.js +36 -0
- package/dist/src/daemon/server/handle-request-shutdown.d.ts +5 -0
- package/dist/src/daemon/server/handle-request-shutdown.js +27 -0
- package/dist/src/daemon/server/handle-task-history.d.ts +13 -0
- package/dist/src/daemon/server/handle-task-history.js +30 -0
- package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +19 -0
- package/dist/src/daemon/server/handle-tasks-execution-hooks.js +35 -0
- package/dist/src/daemon/server/handle-update-workspace-context.d.ts +2 -0
- package/dist/src/daemon/server/handle-update-workspace-context.js +11 -0
- package/dist/src/daemon/server/latest-nx.d.ts +10 -0
- package/dist/src/daemon/server/latest-nx.js +53 -0
- package/dist/src/daemon/server/nx-console-operations.d.ts +26 -0
- package/dist/src/daemon/server/nx-console-operations.js +97 -0
- package/dist/src/daemon/server/outputs-tracking.d.ts +23 -0
- package/dist/src/daemon/server/outputs-tracking.js +120 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +26 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +507 -0
- package/dist/src/daemon/server/project-graph-listener-sockets.d.ts +7 -0
- package/dist/src/daemon/server/project-graph-listener-sockets.js +25 -0
- package/dist/src/daemon/server/server.d.ts +10 -0
- package/dist/src/daemon/server/server.js +477 -0
- package/dist/src/daemon/server/shutdown-utils.d.ts +18 -0
- package/dist/src/daemon/server/shutdown-utils.js +152 -0
- package/dist/src/daemon/server/start.d.ts +1 -0
- package/dist/src/daemon/server/start.js +20 -0
- package/dist/src/daemon/server/sync-generators.d.ts +14 -0
- package/dist/src/daemon/server/sync-generators.js +368 -0
- package/dist/src/daemon/server/watcher.d.ts +18 -0
- package/dist/src/daemon/server/watcher.js +126 -0
- package/dist/src/daemon/socket-utils.d.ts +23 -0
- package/dist/src/daemon/socket-utils.js +96 -0
- package/dist/src/daemon/tmp-dir.d.ts +12 -0
- package/dist/src/daemon/tmp-dir.js +71 -0
- package/dist/src/devkit-exports.d.ts +139 -0
- package/dist/src/devkit-exports.js +143 -0
- package/dist/src/devkit-internals.d.ts +43 -0
- package/dist/src/devkit-internals.js +101 -0
- package/dist/src/devkit-testing-exports.d.ts +2 -0
- package/dist/src/devkit-testing-exports.js +8 -0
- package/dist/src/executors/noop/noop.impl.d.ts +3 -0
- package/dist/src/executors/noop/noop.impl.js +6 -0
- package/dist/src/executors/noop/schema.json +10 -0
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +59 -0
- package/dist/src/executors/run-commands/run-commands.impl.js +301 -0
- package/dist/src/executors/run-commands/running-tasks.d.ts +52 -0
- package/dist/src/executors/run-commands/running-tasks.js +586 -0
- package/dist/src/executors/run-commands/schema.json +198 -0
- package/dist/src/executors/run-script/run-script.impl.d.ts +8 -0
- package/dist/src/executors/run-script/run-script.impl.js +86 -0
- package/dist/src/executors/run-script/schema.json +28 -0
- package/dist/src/executors/utils/convert-nx-executor.d.ts +10 -0
- package/dist/src/executors/utils/convert-nx-executor.js +83 -0
- package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +19 -0
- package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +81 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +11 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +52 -0
- package/dist/src/generators/testing-utils/create-tree.d.ts +5 -0
- package/dist/src/generators/testing-utils/create-tree.js +14 -0
- package/dist/src/generators/tree.d.ts +125 -0
- package/dist/src/generators/tree.js +310 -0
- package/dist/src/generators/utils/generate-files.d.ts +44 -0
- package/dist/src/generators/utils/generate-files.js +114 -0
- package/dist/src/generators/utils/glob.d.ts +22 -0
- package/dist/src/generators/utils/glob.js +51 -0
- package/dist/src/generators/utils/json.d.ts +28 -0
- package/dist/src/generators/utils/json.js +48 -0
- package/dist/src/generators/utils/nx-json.d.ts +10 -0
- package/dist/src/generators/utils/nx-json.js +62 -0
- package/dist/src/generators/utils/project-configuration.d.ts +51 -0
- package/dist/src/generators/utils/project-configuration.js +299 -0
- package/dist/src/hasher/check-task-files.d.ts +86 -0
- package/dist/src/hasher/check-task-files.js +378 -0
- package/dist/src/hasher/create-task-hasher.d.ts +4 -0
- package/dist/src/hasher/create-task-hasher.js +15 -0
- package/dist/src/hasher/file-hasher.d.ts +3 -0
- package/dist/src/hasher/file-hasher.js +23 -0
- package/dist/src/hasher/hash-plan-inspector.d.ts +33 -0
- package/dist/src/hasher/hash-plan-inspector.js +70 -0
- package/dist/src/hasher/hash-task.d.ts +17 -0
- package/dist/src/hasher/hash-task.js +191 -0
- package/dist/src/hasher/native-task-hasher-impl.d.ts +18 -0
- package/dist/src/hasher/native-task-hasher-impl.js +38 -0
- package/dist/src/hasher/task-hasher.d.ts +160 -0
- package/dist/src/hasher/task-hasher.js +301 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/migrations/update-15-0-0/prefix-outputs.d.ts +2 -0
- package/dist/src/migrations/update-15-0-0/prefix-outputs.js +54 -0
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +16 -0
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +82 -0
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +29 -0
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +2 -0
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +50 -0
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +12 -0
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +67 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.js +35 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.md +31 -0
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +72 -0
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +126 -0
- package/dist/src/migrations/update-17-2-0/move-default-base.d.ts +5 -0
- package/dist/src/migrations/update-17-2-0/move-default-base.js +20 -0
- package/dist/src/migrations/update-17-3-0/update-nxw.d.ts +2 -0
- package/dist/src/migrations/update-17-3-0/update-nxw.js +7 -0
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +2 -0
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +11 -0
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts +4 -0
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.js +33 -0
- package/dist/src/migrations/update-19-2-4/set-project-name.d.ts +2 -0
- package/dist/src/migrations/update-19-2-4/set-project-name.js +34 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +2 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +25 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.md +27 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +20 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.md +24 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +38 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.md +49 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +101 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.md +54 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +38 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.md +28 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +17 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.md +22 -0
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +2 -0
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +100 -0
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +101 -0
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +2 -0
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.js +7 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.d.ts +2 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +19 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.md +11 -0
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.js +23 -0
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +18 -0
- package/dist/src/migrations/utils/target-defaults.d.ts +28 -0
- package/dist/src/migrations/utils/target-defaults.js +46 -0
- package/dist/src/native/assert-supported-platform.d.ts +1 -0
- package/dist/src/native/assert-supported-platform.js +39 -0
- package/dist/src/native/browser.js +1 -0
- package/dist/src/native/index.d.ts +844 -0
- package/dist/src/native/index.js +173 -0
- package/dist/src/native/native-bindings.js +641 -0
- package/dist/src/native/native-file-cache-location.d.ts +1 -0
- package/dist/src/native/native-file-cache-location.js +23 -0
- package/dist/src/native/nx.openharmony-arm64.node +0 -0
- package/dist/src/native/nx.wasi-browser.js +131 -0
- package/dist/src/native/nx.wasi.cjs +161 -0
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/native/transform-objects.d.ts +3 -0
- package/dist/src/native/transform-objects.js +51 -0
- package/dist/src/native/wasi-worker-browser.mjs +30 -0
- package/dist/src/native/wasi-worker.mjs +63 -0
- package/dist/src/nx-cloud/debug-logger.d.ts +1 -0
- package/dist/src/nx-cloud/debug-logger.js +8 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +14 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +159 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +41 -0
- package/dist/src/nx-cloud/models/onboarding-status.d.ts +1 -0
- package/dist/src/nx-cloud/models/onboarding-status.js +2 -0
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +16 -0
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.js +41 -0
- package/dist/src/nx-cloud/resolution-helpers.d.ts +1 -0
- package/dist/src/nx-cloud/resolution-helpers.js +19 -0
- package/dist/src/nx-cloud/update-manager.d.ts +23 -0
- package/dist/src/nx-cloud/update-manager.js +267 -0
- package/dist/src/nx-cloud/utilities/axios.d.ts +4 -0
- package/dist/src/nx-cloud/utilities/axios.js +17 -0
- package/dist/src/nx-cloud/utilities/client.d.ts +10 -0
- package/dist/src/nx-cloud/utilities/client.js +42 -0
- package/dist/src/nx-cloud/utilities/environment.d.ts +3 -0
- package/dist/src/nx-cloud/utilities/environment.js +48 -0
- package/dist/src/nx-cloud/utilities/get-cloud-options.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/get-cloud-options.js +23 -0
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.d.ts +1 -0
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +25 -0
- package/dist/src/nx-cloud/utilities/onboarding.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/onboarding.js +28 -0
- package/dist/src/nx-cloud/utilities/url-shorten.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/url-shorten.js +84 -0
- package/dist/src/plugins/js/hasher/hasher.d.ts +5 -0
- package/dist/src/plugins/js/hasher/hasher.js +51 -0
- package/dist/src/plugins/js/index.d.ts +4 -0
- package/dist/src/plugins/js/index.js +201 -0
- package/dist/src/plugins/js/lock-file/bun-parser.d.ts +14 -0
- package/dist/src/plugins/js/lock-file/bun-parser.js +959 -0
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +43 -0
- package/dist/src/plugins/js/lock-file/lock-file.js +265 -0
- package/dist/src/plugins/js/lock-file/npm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/npm-parser.js +588 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +693 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +11 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +210 -0
- package/dist/src/plugins/js/lock-file/utils/package-json.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/utils/package-json.js +38 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +20 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +874 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.js +536 -0
- package/dist/src/plugins/js/package-json/create-package-json.d.ts +29 -0
- package/dist/src/plugins/js/package-json/create-package-json.js +312 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +3 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +150 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.js +93 -0
- package/dist/src/plugins/js/project-graph/affected/touched-projects.d.ts +2 -0
- package/dist/src/plugins/js/project-graph/affected/touched-projects.js +18 -0
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +63 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +6 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +45 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +88 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +75 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +81 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +462 -0
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +2 -0
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +31 -0
- package/dist/src/plugins/js/utils/config.d.ts +2 -0
- package/dist/src/plugins/js/utils/config.js +61 -0
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts +2 -0
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.js +13 -0
- package/dist/src/plugins/js/utils/packages.d.ts +8 -0
- package/dist/src/plugins/js/utils/packages.js +91 -0
- package/dist/src/plugins/js/utils/register.d.ts +339 -0
- package/dist/src/plugins/js/utils/register.js +1236 -0
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.d.ts +5 -0
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.js +17 -0
- package/dist/src/plugins/js/utils/typescript.d.ts +32 -0
- package/dist/src/plugins/js/utils/typescript.js +157 -0
- package/dist/src/plugins/js/versions.d.ts +1 -0
- package/dist/src/plugins/js/versions.js +4 -0
- package/dist/src/plugins/package-json/create-nodes.d.ts +28 -0
- package/dist/src/plugins/package-json/create-nodes.js +243 -0
- package/dist/src/plugins/package-json/index.d.ts +2 -0
- package/dist/src/plugins/package-json/index.js +6 -0
- package/dist/src/plugins/project-json/build-nodes/project-json.d.ts +5 -0
- package/dist/src/plugins/project-json/build-nodes/project-json.js +33 -0
- package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +11 -0
- package/dist/src/project-graph/affected/affected-project-graph-models.js +2 -0
- package/dist/src/project-graph/affected/affected-project-graph.d.ts +4 -0
- package/dist/src/project-graph/affected/affected-project-graph.js +90 -0
- package/dist/src/project-graph/affected/locators/project-glob-changes.d.ts +2 -0
- package/dist/src/project-graph/affected/locators/project-glob-changes.js +44 -0
- package/dist/src/project-graph/affected/locators/workspace-json-changes.d.ts +4 -0
- package/dist/src/project-graph/affected/locators/workspace-json-changes.js +47 -0
- package/dist/src/project-graph/affected/locators/workspace-projects.d.ts +3 -0
- package/dist/src/project-graph/affected/locators/workspace-projects.js +74 -0
- package/dist/src/project-graph/build-project-graph.d.ts +26 -0
- package/dist/src/project-graph/build-project-graph.js +309 -0
- package/dist/src/project-graph/error-types.d.ts +140 -0
- package/dist/src/project-graph/error-types.js +459 -0
- package/dist/src/project-graph/file-map-utils.d.ts +18 -0
- package/dist/src/project-graph/file-map-utils.js +61 -0
- package/dist/src/project-graph/file-utils.d.ts +31 -0
- package/dist/src/project-graph/file-utils.js +187 -0
- package/dist/src/project-graph/nx-deps-cache.d.ts +62 -0
- package/dist/src/project-graph/nx-deps-cache.js +345 -0
- package/dist/src/project-graph/operators.d.ts +11 -0
- package/dist/src/project-graph/operators.js +70 -0
- package/dist/src/project-graph/plugins/get-plugins.d.ts +25 -0
- package/dist/src/project-graph/plugins/get-plugins.js +296 -0
- package/dist/src/project-graph/plugins/in-process-loader.d.ts +10 -0
- package/dist/src/project-graph/plugins/in-process-loader.js +61 -0
- package/dist/src/project-graph/plugins/index.d.ts +4 -0
- package/dist/src/project-graph/plugins/index.js +12 -0
- package/dist/src/project-graph/plugins/isolation/enabled.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/enabled.js +22 -0
- package/dist/src/project-graph/plugins/isolation/index.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/index.js +5 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +62 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +478 -0
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +3 -0
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.js +24 -0
- package/dist/src/project-graph/plugins/isolation/message-types.d.ts +59 -0
- package/dist/src/project-graph/plugins/isolation/message-types.js +9 -0
- package/dist/src/project-graph/plugins/isolation/messaging.d.ts +142 -0
- package/dist/src/project-graph/plugins/isolation/messaging.js +86 -0
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +82 -0
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.js +188 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.d.ts +2 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +150 -0
- package/dist/src/project-graph/plugins/isolation/worker-streaming.d.ts +14 -0
- package/dist/src/project-graph/plugins/isolation/worker-streaming.js +39 -0
- package/dist/src/project-graph/plugins/load-resolved-plugin.d.ts +3 -0
- package/dist/src/project-graph/plugins/load-resolved-plugin.js +24 -0
- package/dist/src/project-graph/plugins/loaded-nx-plugin.d.ts +41 -0
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +104 -0
- package/dist/src/project-graph/plugins/public-api.d.ts +139 -0
- package/dist/src/project-graph/plugins/public-api.js +4 -0
- package/dist/src/project-graph/plugins/resolve-plugin.d.ts +25 -0
- package/dist/src/project-graph/plugins/resolve-plugin.js +277 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +3 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +67 -0
- package/dist/src/project-graph/plugins/transpiler.d.ts +20 -0
- package/dist/src/project-graph/plugins/transpiler.js +99 -0
- package/dist/src/project-graph/plugins/utils.d.ts +4 -0
- package/dist/src/project-graph/plugins/utils.js +32 -0
- package/dist/src/project-graph/project-graph-builder.d.ts +133 -0
- package/dist/src/project-graph/project-graph-builder.js +395 -0
- package/dist/src/project-graph/project-graph.d.ts +54 -0
- package/dist/src/project-graph/project-graph.js +415 -0
- package/dist/src/project-graph/utils/build-all-workspace-files.d.ts +2 -0
- package/dist/src/project-graph/utils/build-all-workspace-files.js +14 -0
- package/dist/src/project-graph/utils/find-project-for-path.d.ts +20 -0
- package/dist/src/project-graph/utils/find-project-for-path.js +55 -0
- package/dist/src/project-graph/utils/implicit-project-dependencies.d.ts +3 -0
- package/dist/src/project-graph/utils/implicit-project-dependencies.js +18 -0
- package/dist/src/project-graph/utils/normalize-project-nodes.d.ts +6 -0
- package/dist/src/project-graph/utils/normalize-project-nodes.js +117 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +48 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +270 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +42 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +284 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +34 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.js +85 -0
- package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +50 -0
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +440 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.d.ts +32 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +507 -0
- package/dist/src/project-graph/utils/project-configuration/target-normalization.d.ts +12 -0
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +183 -0
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +38 -0
- package/dist/src/project-graph/utils/project-configuration/utils.js +215 -0
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +86 -0
- package/dist/src/project-graph/utils/project-configuration-utils.js +325 -0
- package/dist/src/project-graph/utils/retrieve-workspace-files.d.ts +35 -0
- package/dist/src/project-graph/utils/retrieve-workspace-files.js +110 -0
- package/dist/src/tasks-runner/batch/batch-messages.d.ts +35 -0
- package/dist/src/tasks-runner/batch/batch-messages.js +9 -0
- package/dist/src/tasks-runner/batch/run-batch.d.ts +1 -0
- package/dist/src/tasks-runner/batch/run-batch.js +78 -0
- package/dist/src/tasks-runner/cache.d.ts +94 -0
- package/dist/src/tasks-runner/cache.js +604 -0
- package/dist/src/tasks-runner/create-task-graph.d.ts +41 -0
- package/dist/src/tasks-runner/create-task-graph.js +305 -0
- package/dist/src/tasks-runner/default-tasks-runner.d.ts +25 -0
- package/dist/src/tasks-runner/default-tasks-runner.js +74 -0
- package/dist/src/tasks-runner/fork.d.ts +1 -0
- package/dist/src/tasks-runner/fork.js +73 -0
- package/dist/src/tasks-runner/forked-process-task-runner.d.ts +42 -0
- package/dist/src/tasks-runner/forked-process-task-runner.js +299 -0
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +7 -0
- package/dist/src/tasks-runner/init-tasks-runner.js +86 -0
- package/dist/src/tasks-runner/is-tui-enabled.d.ts +18 -0
- package/dist/src/tasks-runner/is-tui-enabled.js +91 -0
- package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +18 -0
- package/dist/src/tasks-runner/legacy-depends-on-warning.js +109 -0
- package/dist/src/tasks-runner/life-cycle.d.ts +86 -0
- package/dist/src/tasks-runner/life-cycle.js +148 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +25 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +366 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +24 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +238 -0
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +5 -0
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +16 -0
- package/dist/src/tasks-runner/life-cycles/formatting-utils.d.ts +3 -0
- package/dist/src/tasks-runner/life-cycles/formatting-utils.js +55 -0
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +13 -0
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +67 -0
- package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +173 -0
- package/dist/src/tasks-runner/life-cycles/performance-analysis.js +508 -0
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +59 -0
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +193 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +65 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.js +369 -0
- package/dist/src/tasks-runner/life-cycles/pretty-time.d.ts +4 -0
- package/dist/src/tasks-runner/life-cycles/pretty-time.js +73 -0
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +29 -0
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +109 -0
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +28 -0
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +97 -0
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +17 -0
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.js +87 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +11 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +91 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +16 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.js +112 -0
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +14 -0
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.js +73 -0
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts +6 -0
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.js +17 -0
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts +9 -0
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.js +42 -0
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +8 -0
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.js +39 -0
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +19 -0
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +339 -0
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.d.ts +1 -0
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.js +15 -0
- package/dist/src/tasks-runner/process-metrics-service.d.ts +53 -0
- package/dist/src/tasks-runner/process-metrics-service.js +161 -0
- package/dist/src/tasks-runner/pseudo-ipc.d.ts +48 -0
- package/dist/src/tasks-runner/pseudo-ipc.js +156 -0
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +58 -0
- package/dist/src/tasks-runner/pseudo-terminal.js +197 -0
- package/dist/src/tasks-runner/remove-old-cache-records.d.ts +1 -0
- package/dist/src/tasks-runner/remove-old-cache-records.js +60 -0
- package/dist/src/tasks-runner/run-command.d.ts +42 -0
- package/dist/src/tasks-runner/run-command.js +902 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +19 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.js +110 -0
- package/dist/src/tasks-runner/running-tasks/node-child-process.d.ts +40 -0
- package/dist/src/tasks-runner/running-tasks/node-child-process.js +175 -0
- package/dist/src/tasks-runner/running-tasks/noop-child-process.d.ts +16 -0
- package/dist/src/tasks-runner/running-tasks/noop-child-process.js +22 -0
- package/dist/src/tasks-runner/running-tasks/output-prefix.d.ts +13 -0
- package/dist/src/tasks-runner/running-tasks/output-prefix.js +63 -0
- package/dist/src/tasks-runner/running-tasks/running-task.d.ts +11 -0
- package/dist/src/tasks-runner/running-tasks/running-task.js +6 -0
- package/dist/src/tasks-runner/running-tasks/shared-running-task.d.ts +14 -0
- package/dist/src/tasks-runner/running-tasks/shared-running-task.js +30 -0
- package/dist/src/tasks-runner/task-env-paths.d.ts +1 -0
- package/dist/src/tasks-runner/task-env-paths.js +45 -0
- package/dist/src/tasks-runner/task-env.d.ts +31 -0
- package/dist/src/tasks-runner/task-env.js +195 -0
- package/dist/src/tasks-runner/task-graph-utils.d.ts +30 -0
- package/dist/src/tasks-runner/task-graph-utils.js +225 -0
- package/dist/src/tasks-runner/task-io-service.d.ts +96 -0
- package/dist/src/tasks-runner/task-io-service.js +122 -0
- package/dist/src/tasks-runner/task-orchestrator.d.ts +192 -0
- package/dist/src/tasks-runner/task-orchestrator.js +1370 -0
- package/dist/src/tasks-runner/tasks-runner.d.ts +24 -0
- package/dist/src/tasks-runner/tasks-runner.js +2 -0
- package/dist/src/tasks-runner/tasks-schedule.d.ts +48 -0
- package/dist/src/tasks-runner/tasks-schedule.js +258 -0
- package/dist/src/tasks-runner/utils.d.ts +61 -0
- package/dist/src/tasks-runner/utils.js +451 -0
- package/dist/src/utils/ab-testing.d.ts +59 -0
- package/dist/src/utils/ab-testing.js +142 -0
- package/dist/src/utils/acknowledge-build-scripts.d.ts +13 -0
- package/dist/src/utils/acknowledge-build-scripts.js +102 -0
- package/dist/src/utils/all-file-data.d.ts +2 -0
- package/dist/src/utils/all-file-data.js +8 -0
- package/dist/src/utils/analytics-prompt.d.ts +9 -0
- package/dist/src/utils/analytics-prompt.js +84 -0
- package/dist/src/utils/assert-workspace-validity.d.ts +3 -0
- package/dist/src/utils/assert-workspace-validity.js +85 -0
- package/dist/src/utils/async-iterator.d.ts +2 -0
- package/dist/src/utils/async-iterator.js +18 -0
- package/dist/src/utils/binary-extensions.d.ts +1 -0
- package/dist/src/utils/binary-extensions.js +279 -0
- package/dist/src/utils/cache-directory.d.ts +9 -0
- package/dist/src/utils/cache-directory.js +86 -0
- package/dist/src/utils/call-sites.d.ts +14 -0
- package/dist/src/utils/call-sites.js +28 -0
- package/dist/src/utils/catalog/index.d.ts +22 -0
- package/dist/src/utils/catalog/index.js +87 -0
- package/dist/src/utils/catalog/manager-factory.d.ts +5 -0
- package/dist/src/utils/catalog/manager-factory.js +20 -0
- package/dist/src/utils/catalog/manager-utils.d.ts +8 -0
- package/dist/src/utils/catalog/manager-utils.js +232 -0
- package/dist/src/utils/catalog/manager.d.ts +40 -0
- package/dist/src/utils/catalog/manager.js +13 -0
- package/dist/src/utils/catalog/pnpm-manager.d.ts +22 -0
- package/dist/src/utils/catalog/pnpm-manager.js +139 -0
- package/dist/src/utils/catalog/types.d.ts +11 -0
- package/dist/src/utils/catalog/types.js +2 -0
- package/dist/src/utils/catalog/yarn-manager.d.ts +22 -0
- package/dist/src/utils/catalog/yarn-manager.js +139 -0
- package/dist/src/utils/child-process.d.ts +22 -0
- package/dist/src/utils/child-process.js +91 -0
- package/dist/src/utils/chunkify.d.ts +11 -0
- package/dist/src/utils/chunkify.js +44 -0
- package/dist/src/utils/code-frames.d.ts +14 -0
- package/dist/src/utils/code-frames.js +116 -0
- package/dist/src/utils/collapse-expanded-outputs.d.ts +10 -0
- package/dist/src/utils/collapse-expanded-outputs.js +72 -0
- package/dist/src/utils/command-line-utils.d.ts +57 -0
- package/dist/src/utils/command-line-utils.js +259 -0
- package/dist/src/utils/compile-cache.d.ts +24 -0
- package/dist/src/utils/compile-cache.js +49 -0
- package/dist/src/utils/consume-messages-from-socket.d.ts +9 -0
- package/dist/src/utils/consume-messages-from-socket.js +56 -0
- package/dist/src/utils/db-connection.d.ts +14 -0
- package/dist/src/utils/db-connection.js +64 -0
- package/dist/src/utils/default-base.d.ts +1 -0
- package/dist/src/utils/default-base.js +17 -0
- package/dist/src/utils/delayed-spinner.d.ts +51 -0
- package/dist/src/utils/delayed-spinner.js +88 -0
- package/dist/src/utils/dotenv.d.ts +7 -0
- package/dist/src/utils/dotenv.js +19 -0
- package/dist/src/utils/enable-compile-cache.d.ts +1 -0
- package/dist/src/utils/enable-compile-cache.js +7 -0
- package/dist/src/utils/exit-codes.d.ts +15 -0
- package/dist/src/utils/exit-codes.js +75 -0
- package/dist/src/utils/fileutils.d.ts +67 -0
- package/dist/src/utils/fileutils.js +112 -0
- package/dist/src/utils/find-matching-projects.d.ts +18 -0
- package/dist/src/utils/find-matching-projects.js +222 -0
- package/dist/src/utils/find-workspace-root.d.ts +11 -0
- package/dist/src/utils/find-workspace-root.js +33 -0
- package/dist/src/utils/get-package-name-from-import-path.d.ts +1 -0
- package/dist/src/utils/get-package-name-from-import-path.js +17 -0
- package/dist/src/utils/git-revision.d.ts +12 -0
- package/dist/src/utils/git-revision.js +25 -0
- package/dist/src/utils/git-utils.d.ts +70 -0
- package/dist/src/utils/git-utils.index-filter.d.ts +1 -0
- package/dist/src/utils/git-utils.index-filter.js +23 -0
- package/dist/src/utils/git-utils.js +530 -0
- package/dist/src/utils/git-utils.tree-filter.d.ts +1 -0
- package/dist/src/utils/git-utils.tree-filter.js +47 -0
- package/dist/src/utils/globs.d.ts +3 -0
- package/dist/src/utils/globs.js +18 -0
- package/dist/src/utils/handle-errors.d.ts +1 -0
- package/dist/src/utils/handle-errors.js +91 -0
- package/dist/src/utils/handle-import.d.ts +15 -0
- package/dist/src/utils/handle-import.js +86 -0
- package/dist/src/utils/has-nx-js-plugin.d.ts +9 -0
- package/dist/src/utils/has-nx-js-plugin.js +24 -0
- package/dist/src/utils/ignore.d.ts +9 -0
- package/dist/src/utils/ignore.js +42 -0
- package/dist/src/utils/installation-directory.d.ts +2 -0
- package/dist/src/utils/installation-directory.js +12 -0
- package/dist/src/utils/installed-nx-version.d.ts +23 -0
- package/dist/src/utils/installed-nx-version.js +113 -0
- package/dist/src/utils/is-ci.d.ts +1 -0
- package/dist/src/utils/is-ci.js +26 -0
- package/dist/src/utils/is-sandbox.d.ts +1 -0
- package/dist/src/utils/is-sandbox.js +11 -0
- package/dist/src/utils/is-using-prettier.d.ts +3 -0
- package/dist/src/utils/is-using-prettier.js +62 -0
- package/dist/src/utils/json-diff.d.ts +18 -0
- package/dist/src/utils/json-diff.js +112 -0
- package/dist/src/utils/json.d.ts +44 -0
- package/dist/src/utils/json.js +62 -0
- package/dist/src/utils/legacy-task-history.d.ts +8 -0
- package/dist/src/utils/legacy-task-history.js +87 -0
- package/dist/src/utils/logger.d.ts +23 -0
- package/dist/src/utils/logger.js +74 -0
- package/dist/src/utils/machine-id-cache.d.ts +5 -0
- package/dist/src/utils/machine-id-cache.js +93 -0
- package/dist/src/utils/min-release-age/behavior/bun.d.ts +30 -0
- package/dist/src/utils/min-release-age/behavior/bun.js +278 -0
- package/dist/src/utils/min-release-age/behavior/npm.d.ts +21 -0
- package/dist/src/utils/min-release-age/behavior/npm.js +293 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +23 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.js +527 -0
- package/dist/src/utils/min-release-age/behavior/yarn.d.ts +22 -0
- package/dist/src/utils/min-release-age/behavior/yarn.js +314 -0
- package/dist/src/utils/min-release-age/constants.d.ts +3 -0
- package/dist/src/utils/min-release-age/constants.js +8 -0
- package/dist/src/utils/min-release-age/errors.d.ts +28 -0
- package/dist/src/utils/min-release-age/errors.js +22 -0
- package/dist/src/utils/min-release-age/npmrc.d.ts +15 -0
- package/dist/src/utils/min-release-age/npmrc.js +45 -0
- package/dist/src/utils/min-release-age/packument.d.ts +13 -0
- package/dist/src/utils/min-release-age/packument.js +34 -0
- package/dist/src/utils/min-release-age/pick.d.ts +72 -0
- package/dist/src/utils/min-release-age/pick.js +206 -0
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.d.ts +12 -0
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.js +58 -0
- package/dist/src/utils/min-release-age/policy.d.ts +38 -0
- package/dist/src/utils/min-release-age/policy.js +59 -0
- package/dist/src/utils/min-release-age/resolve.d.ts +8 -0
- package/dist/src/utils/min-release-age/resolve.js +14 -0
- package/dist/src/utils/nx-cloud-utils.d.ts +4 -0
- package/dist/src/utils/nx-cloud-utils.js +28 -0
- package/dist/src/utils/nx-console-prompt.d.ts +1 -0
- package/dist/src/utils/nx-console-prompt.js +64 -0
- package/dist/src/utils/nx-key.d.ts +6 -0
- package/dist/src/utils/nx-key.js +50 -0
- package/dist/src/utils/nx-package-group.d.ts +8 -0
- package/dist/src/utils/nx-package-group.js +15 -0
- package/dist/src/utils/object-sort.d.ts +1 -0
- package/dist/src/utils/object-sort.js +9 -0
- package/dist/src/utils/output.d.ts +79 -0
- package/dist/src/utils/output.js +264 -0
- package/dist/src/utils/package-json.d.ts +229 -0
- package/dist/src/utils/package-json.js +387 -0
- package/dist/src/utils/package-manager.d.ts +142 -0
- package/dist/src/utils/package-manager.js +643 -0
- package/dist/src/utils/params.d.ts +140 -0
- package/dist/src/utils/params.js +710 -0
- package/dist/src/utils/path.d.ts +19 -0
- package/dist/src/utils/path.js +38 -0
- package/dist/src/utils/perf-hooks.d.ts +19 -0
- package/dist/src/utils/perf-logging.d.ts +1 -0
- package/dist/src/utils/perf-logging.js +46 -0
- package/dist/src/utils/plugin-cache-utils.d.ts +82 -0
- package/dist/src/utils/plugin-cache-utils.js +212 -0
- package/dist/src/utils/plugin-progress-text.d.ts +1 -0
- package/dist/src/utils/plugin-progress-text.js +15 -0
- package/dist/src/utils/plugins/atomizer-utils.d.ts +11 -0
- package/dist/src/utils/plugins/atomizer-utils.js +23 -0
- package/dist/src/utils/plugins/core-plugins.d.ts +6 -0
- package/dist/src/utils/plugins/core-plugins.js +113 -0
- package/dist/src/utils/plugins/index.d.ts +5 -0
- package/dist/src/utils/plugins/index.js +15 -0
- package/dist/src/utils/plugins/installed-plugins.d.ts +5 -0
- package/dist/src/utils/plugins/installed-plugins.js +76 -0
- package/dist/src/utils/plugins/local-plugins.d.ts +22 -0
- package/dist/src/utils/plugins/local-plugins.js +60 -0
- package/dist/src/utils/plugins/output.d.ts +34 -0
- package/dist/src/utils/plugins/output.js +201 -0
- package/dist/src/utils/plugins/plugin-capabilities.d.ts +15 -0
- package/dist/src/utils/plugins/plugin-capabilities.js +78 -0
- package/dist/src/utils/pnpm-workspace.d.ts +8 -0
- package/dist/src/utils/pnpm-workspace.js +2 -0
- package/dist/src/utils/print-help.d.ts +11 -0
- package/dist/src/utils/print-help.js +259 -0
- package/dist/src/utils/progress-topics.d.ts +19 -0
- package/dist/src/utils/progress-topics.js +21 -0
- package/dist/src/utils/project-graph-utils.d.ts +18 -0
- package/dist/src/utils/project-graph-utils.js +78 -0
- package/dist/src/utils/promised-based-queue.d.ts +6 -0
- package/dist/src/utils/promised-based-queue.js +43 -0
- package/dist/src/utils/provenance.d.ts +47 -0
- package/dist/src/utils/provenance.js +115 -0
- package/dist/src/utils/require-nx-key.d.ts +1 -0
- package/dist/src/utils/require-nx-key.js +23 -0
- package/dist/src/utils/serializable-error.d.ts +4 -0
- package/dist/src/utils/serializable-error.js +33 -0
- package/dist/src/utils/serialize-overrides-into-command-line.d.ts +3 -0
- package/dist/src/utils/serialize-overrides-into-command-line.js +41 -0
- package/dist/src/utils/serialize-target.d.ts +1 -0
- package/dist/src/utils/serialize-target.js +6 -0
- package/dist/src/utils/shell-quoting.d.ts +10 -0
- package/dist/src/utils/shell-quoting.js +41 -0
- package/dist/src/utils/spinner.d.ts +24 -0
- package/dist/src/utils/spinner.js +77 -0
- package/dist/src/utils/split-target.d.ts +15 -0
- package/dist/src/utils/split-target.js +239 -0
- package/dist/src/utils/strip-indents.d.ts +14 -0
- package/dist/src/utils/strip-indents.js +23 -0
- package/dist/src/utils/sync-generators.d.ts +66 -0
- package/dist/src/utils/sync-generators.js +355 -0
- package/dist/src/utils/tar.d.ts +8 -0
- package/dist/src/utils/tar.js +44 -0
- package/dist/src/utils/task-history.d.ts +17 -0
- package/dist/src/utils/task-history.js +51 -0
- package/dist/src/utils/terminal-link.d.ts +20 -0
- package/dist/src/utils/terminal-link.js +85 -0
- package/dist/src/utils/update-nxw.d.ts +2 -0
- package/dist/src/utils/update-nxw.js +22 -0
- package/dist/src/utils/versions.d.ts +1 -0
- package/dist/src/utils/versions.js +4 -0
- package/dist/src/utils/wait-for-socket-connection.d.ts +15 -0
- package/dist/src/utils/wait-for-socket-connection.js +53 -0
- package/dist/src/utils/workspace-context.d.ts +21 -0
- package/dist/src/utils/workspace-context.js +120 -0
- package/dist/src/utils/workspace-id.d.ts +20 -0
- package/dist/src/utils/workspace-id.js +54 -0
- package/dist/src/utils/workspace-root.d.ts +6 -0
- package/dist/src/utils/workspace-root.js +40 -0
- package/dist/src/utils/write-formatted-json-file.d.ts +6 -0
- package/dist/src/utils/write-formatted-json-file.js +23 -0
- package/dist/src/utils/yarn-syml/index.d.ts +23 -0
- package/dist/src/utils/yarn-syml/index.js +151 -0
- package/dist/src/utils/yarn-syml/syml-grammar.js +1911 -0
- package/dist/tasks-runners/default.d.ts +1 -0
- package/dist/tasks-runners/default.js +5 -0
- package/executors.json +19 -0
- package/generators.json +16 -0
- package/migrations.json +189 -0
- package/package.json +542 -0
- package/schemas/migrations-schema.json +186 -0
- package/schemas/nx-schema.json +1615 -0
- package/schemas/project-schema.json +426 -0
- package/schemas/workspace-schema.json +185 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPackageNameFromImportPath(importExpression: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPackageNameFromImportPath = getPackageNameFromImportPath;
|
|
4
|
+
//# Converts import paths to package names.
|
|
5
|
+
//# e.g. - `@nx/workspace` -> `@nx/workspace`
|
|
6
|
+
//# - `@nx/workspace/plugin` -> `@nx/workspace`
|
|
7
|
+
//# - `@nx/workspace/other` -> `@nx/workspace`
|
|
8
|
+
//# - `nx/plugin` -> `nx`
|
|
9
|
+
function getPackageNameFromImportPath(importExpression) {
|
|
10
|
+
// Check if the package is scoped
|
|
11
|
+
if (importExpression.startsWith('@')) {
|
|
12
|
+
// For scoped packages, the package name is up to the second '/'
|
|
13
|
+
return importExpression.split('/').slice(0, 2).join('/');
|
|
14
|
+
}
|
|
15
|
+
// For unscoped packages, the package name is up to the first '/'
|
|
16
|
+
return importExpression.split('/')[0];
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git parses any argument beginning with `-` as an option rather than a
|
|
3
|
+
* revision, so a flag-shaped revision could smuggle options such as
|
|
4
|
+
* `--upload-pack` into the git commands Nx runs.
|
|
5
|
+
*/
|
|
6
|
+
export declare function assertValidGitRevision(revision: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* For refs Nx itself recorded from `git rev-parse` and later read back off
|
|
9
|
+
* disk, where anything other than a commit sha means the value was tampered
|
|
10
|
+
* with rather than that the user picked an unusual revision.
|
|
11
|
+
*/
|
|
12
|
+
export declare function assertValidGitSha(sha: string): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertValidGitRevision = assertValidGitRevision;
|
|
4
|
+
exports.assertValidGitSha = assertValidGitSha;
|
|
5
|
+
/**
|
|
6
|
+
* Git parses any argument beginning with `-` as an option rather than a
|
|
7
|
+
* revision, so a flag-shaped revision could smuggle options such as
|
|
8
|
+
* `--upload-pack` into the git commands Nx runs.
|
|
9
|
+
*/
|
|
10
|
+
function assertValidGitRevision(revision) {
|
|
11
|
+
if (revision.startsWith('-')) {
|
|
12
|
+
throw new Error(`Invalid git revision: "${revision}". Git revisions cannot start with "-".`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const COMMIT_SHA = /^[0-9a-f]{7,40}$/i;
|
|
16
|
+
/**
|
|
17
|
+
* For refs Nx itself recorded from `git rev-parse` and later read back off
|
|
18
|
+
* disk, where anything other than a commit sha means the value was tampered
|
|
19
|
+
* with rather than that the user picked an unusual revision.
|
|
20
|
+
*/
|
|
21
|
+
function assertValidGitSha(sha) {
|
|
22
|
+
if (!COMMIT_SHA.test(sha)) {
|
|
23
|
+
throw new Error(`Invalid git commit sha: "${sha}". Expected a hexadecimal commit sha.`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare function cloneFromUpstream(url: string, destination: string, { originName, depth }?: {
|
|
2
|
+
originName: string;
|
|
3
|
+
depth?: number;
|
|
4
|
+
}): Promise<GitRepository>;
|
|
5
|
+
export declare class GitRepository {
|
|
6
|
+
private directory;
|
|
7
|
+
root: string;
|
|
8
|
+
constructor(directory: string);
|
|
9
|
+
getGitRootPath(cwd: string): string;
|
|
10
|
+
hasUncommittedChanges(): Promise<boolean>;
|
|
11
|
+
addFetchRemote(remoteName: string, branch: string): Promise<string>;
|
|
12
|
+
showStat(): Promise<string>;
|
|
13
|
+
listBranches(): Promise<string[]>;
|
|
14
|
+
getGitFiles(path: string): Promise<string[]>;
|
|
15
|
+
reset(ref: string): Promise<string>;
|
|
16
|
+
mergeUnrelatedHistories(ref: string, message: string): Promise<string>;
|
|
17
|
+
fetch(remote: string, ref?: string): Promise<string>;
|
|
18
|
+
checkout(branch: string, opts: {
|
|
19
|
+
new: boolean;
|
|
20
|
+
base: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
move(path: string, destination: string): Promise<string>;
|
|
23
|
+
push(ref: string, remoteName: string): Promise<string>;
|
|
24
|
+
commit(message: string): Promise<string>;
|
|
25
|
+
amendCommit(): Promise<string>;
|
|
26
|
+
deleteGitRemote(name: string): Promise<string>;
|
|
27
|
+
addGitRemote(name: string, url: string): Promise<string>;
|
|
28
|
+
hasFilterRepoInstalled(): Promise<boolean>;
|
|
29
|
+
filterRepo(source: string, destination: string): Promise<void>;
|
|
30
|
+
filterBranch(source: string, destination: string, branchName: string): Promise<void>;
|
|
31
|
+
private execGit;
|
|
32
|
+
}
|
|
33
|
+
export interface VcsRemoteInfo {
|
|
34
|
+
domain: string;
|
|
35
|
+
slug: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function parseVcsRemoteUrl(url: string): VcsRemoteInfo | null;
|
|
38
|
+
export declare function getVcsRemoteInfo(directory?: string): VcsRemoteInfo | null;
|
|
39
|
+
export declare function getGitRootPath(cwd?: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Path of `directory` relative to its git root, posix-separated so it is
|
|
42
|
+
* identical on every OS, and '' when the directory is the git root itself.
|
|
43
|
+
* Null outside a git repository.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getGitRootRelativePath(directory: string): string | null;
|
|
46
|
+
/** A shallow clone's truncated history has no stable root commit. */
|
|
47
|
+
export declare function isShallowRepository(directory?: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* SHA of the repository's first commit. Merged unrelated histories leave
|
|
50
|
+
* several root commits — the sorted-first one is picked so every clone
|
|
51
|
+
* agrees. Null when there are no commits, or outside a git repository.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getFirstCommitSha(directory?: string): string | null;
|
|
54
|
+
export declare function isGitRepository(directory?: string): boolean;
|
|
55
|
+
export declare function hasUncommittedChanges(directory?: string): boolean;
|
|
56
|
+
export declare function getUncommittedChangesSnapshot(directory?: string): string;
|
|
57
|
+
export declare function commitChanges(commitMessage: string, directory?: string): string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Throws on git failure with the real stderr attached. Use this when the
|
|
60
|
+
* caller needs to distinguish hook rejection / GPG signing failures / LFS
|
|
61
|
+
* lock errors from a successful no-op. Callers should pre-check
|
|
62
|
+
* `hasUncommittedChanges` to avoid the "nothing to commit" rejection
|
|
63
|
+
* (which `git commit` exits non-zero for).
|
|
64
|
+
*
|
|
65
|
+
* Returns `null` (rather than throwing) when the commit itself succeeded
|
|
66
|
+
* but `git rev-parse HEAD` failed transiently — by contract the diff is
|
|
67
|
+
* no longer in the working tree, so callers must NOT report it as such.
|
|
68
|
+
*/
|
|
69
|
+
export declare function tryCommitChanges(commitMessage: string, directory: string): string | null;
|
|
70
|
+
export declare function getLatestCommitSha(directory?: string): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* This is meant to be used with `git filter-branch --index-filter` to rewrite
|
|
5
|
+
* history such that only commits related to the subdirectory is kept.
|
|
6
|
+
*
|
|
7
|
+
* Example:
|
|
8
|
+
* NX_IMPORT_SOURCE=<source> git filter-branch --index-filter 'node git-utils.index-filter.js' --prune-empty -- --all
|
|
9
|
+
*/
|
|
10
|
+
try {
|
|
11
|
+
const { execSync } = require('child_process');
|
|
12
|
+
// NOTE: Using env vars because Windows PowerShell has its own handling of quotes (") messes up quotes in args, even if escaped.
|
|
13
|
+
const src = process.env.NX_IMPORT_SOURCE;
|
|
14
|
+
execSync('git read-tree --empty', { stdio: 'inherit', windowsHide: true });
|
|
15
|
+
execSync(`git reset ${process.env.GIT_COMMIT} -- "${src}"`, {
|
|
16
|
+
stdio: 'inherit',
|
|
17
|
+
windowsHide: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
console.error(`Error executing Git commands: ${error}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitRepository = void 0;
|
|
4
|
+
exports.cloneFromUpstream = cloneFromUpstream;
|
|
5
|
+
exports.parseVcsRemoteUrl = parseVcsRemoteUrl;
|
|
6
|
+
exports.getVcsRemoteInfo = getVcsRemoteInfo;
|
|
7
|
+
exports.getGitRootPath = getGitRootPath;
|
|
8
|
+
exports.getGitRootRelativePath = getGitRootRelativePath;
|
|
9
|
+
exports.isShallowRepository = isShallowRepository;
|
|
10
|
+
exports.getFirstCommitSha = getFirstCommitSha;
|
|
11
|
+
exports.isGitRepository = isGitRepository;
|
|
12
|
+
exports.hasUncommittedChanges = hasUncommittedChanges;
|
|
13
|
+
exports.getUncommittedChangesSnapshot = getUncommittedChangesSnapshot;
|
|
14
|
+
exports.commitChanges = commitChanges;
|
|
15
|
+
exports.tryCommitChanges = tryCommitChanges;
|
|
16
|
+
exports.getLatestCommitSha = getLatestCommitSha;
|
|
17
|
+
const tslib_1 = require("tslib");
|
|
18
|
+
const child_process_1 = require("child_process");
|
|
19
|
+
const crypto = tslib_1.__importStar(require("crypto"));
|
|
20
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
21
|
+
const path_1 = require("path");
|
|
22
|
+
const logger_1 = require("./logger");
|
|
23
|
+
function execFileAsync(file, args, execOptions) {
|
|
24
|
+
return new Promise((res, rej) => {
|
|
25
|
+
(0, child_process_1.execFile)(file, args, { ...execOptions, windowsHide: true }, (err, stdout) => {
|
|
26
|
+
if (err) {
|
|
27
|
+
return rej(err);
|
|
28
|
+
}
|
|
29
|
+
res(stdout.toString());
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async function cloneFromUpstream(url, destination, { originName, depth } = {
|
|
34
|
+
originName: 'origin',
|
|
35
|
+
}) {
|
|
36
|
+
await execFileAsync('git', [
|
|
37
|
+
'clone',
|
|
38
|
+
url,
|
|
39
|
+
destination,
|
|
40
|
+
...(depth ? ['--depth', `${depth}`] : []),
|
|
41
|
+
'--origin',
|
|
42
|
+
originName,
|
|
43
|
+
], {
|
|
44
|
+
cwd: (0, path_1.dirname)(destination),
|
|
45
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
46
|
+
});
|
|
47
|
+
return new GitRepository(destination);
|
|
48
|
+
}
|
|
49
|
+
class GitRepository {
|
|
50
|
+
constructor(directory) {
|
|
51
|
+
this.directory = directory;
|
|
52
|
+
this.root = this.getGitRootPath(this.directory);
|
|
53
|
+
}
|
|
54
|
+
getGitRootPath(cwd) {
|
|
55
|
+
return getGitRootPath(cwd);
|
|
56
|
+
}
|
|
57
|
+
async hasUncommittedChanges() {
|
|
58
|
+
const data = await this.execGit(['status', '--porcelain']);
|
|
59
|
+
return data.trim() !== '';
|
|
60
|
+
}
|
|
61
|
+
async addFetchRemote(remoteName, branch) {
|
|
62
|
+
return await this.execGit([
|
|
63
|
+
'config',
|
|
64
|
+
'--add',
|
|
65
|
+
`remote.${remoteName}.fetch`,
|
|
66
|
+
`+refs/heads/${branch}:refs/remotes/${remoteName}/${branch}`,
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
async showStat() {
|
|
70
|
+
return await this.execGit(['show', '--stat']);
|
|
71
|
+
}
|
|
72
|
+
async listBranches() {
|
|
73
|
+
return (await this.execGit(['ls-remote', '--heads', '--quiet']))
|
|
74
|
+
.trim()
|
|
75
|
+
.split('\n')
|
|
76
|
+
.map((s) => s
|
|
77
|
+
.trim()
|
|
78
|
+
.substring(s.indexOf('\t') + 1)
|
|
79
|
+
.replace('refs/heads/', ''));
|
|
80
|
+
}
|
|
81
|
+
async getGitFiles(path) {
|
|
82
|
+
// Use -z to return file names exactly as they are stored in git, separated by NULL (\x00) character.
|
|
83
|
+
// This avoids problems with special characters in file names.
|
|
84
|
+
return (await this.execGit(['ls-files', '-z', '--', path]))
|
|
85
|
+
.trim()
|
|
86
|
+
.split('\x00')
|
|
87
|
+
.map((s) => s.trim())
|
|
88
|
+
.filter(Boolean);
|
|
89
|
+
}
|
|
90
|
+
async reset(ref) {
|
|
91
|
+
return await this.execGit(['reset', '--hard', ref]);
|
|
92
|
+
}
|
|
93
|
+
async mergeUnrelatedHistories(ref, message) {
|
|
94
|
+
return await this.execGit([
|
|
95
|
+
'merge',
|
|
96
|
+
ref,
|
|
97
|
+
'-X',
|
|
98
|
+
'ours',
|
|
99
|
+
'--allow-unrelated-histories',
|
|
100
|
+
'-m',
|
|
101
|
+
message,
|
|
102
|
+
]);
|
|
103
|
+
}
|
|
104
|
+
async fetch(remote, ref) {
|
|
105
|
+
return await this.execGit(['fetch', remote, ...(ref ? [ref] : [])]);
|
|
106
|
+
}
|
|
107
|
+
async checkout(branch, opts) {
|
|
108
|
+
return await this.execGit([
|
|
109
|
+
'checkout',
|
|
110
|
+
...(opts.new ? ['-b'] : []),
|
|
111
|
+
branch,
|
|
112
|
+
...(opts.base ? [opts.base] : []),
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
async move(path, destination) {
|
|
116
|
+
return await this.execGit(['mv', '--', path, destination]);
|
|
117
|
+
}
|
|
118
|
+
async push(ref, remoteName) {
|
|
119
|
+
return await this.execGit(['push', '-u', '-f', remoteName, ref]);
|
|
120
|
+
}
|
|
121
|
+
async commit(message) {
|
|
122
|
+
return await this.execGit(['commit', '-am', message]);
|
|
123
|
+
}
|
|
124
|
+
async amendCommit() {
|
|
125
|
+
return await this.execGit(['commit', '--amend', '-a', '--no-edit']);
|
|
126
|
+
}
|
|
127
|
+
async deleteGitRemote(name) {
|
|
128
|
+
return await this.execGit(['remote', 'rm', name]);
|
|
129
|
+
}
|
|
130
|
+
async addGitRemote(name, url) {
|
|
131
|
+
return await this.execGit(['remote', 'add', name, url]);
|
|
132
|
+
}
|
|
133
|
+
async hasFilterRepoInstalled() {
|
|
134
|
+
try {
|
|
135
|
+
await this.execGit(['filter-repo', '--help']);
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// git-filter-repo is much faster than filter-branch, but needs to be installed by user
|
|
143
|
+
// Use `hasFilterRepoInstalled` to check if it's installed
|
|
144
|
+
async filterRepo(source, destination) {
|
|
145
|
+
// NOTE: filter-repo requires POSIX path to work
|
|
146
|
+
const sourcePosixPath = source.split(path_1.sep).join(path_1.posix.sep);
|
|
147
|
+
const destinationPosixPath = destination.split(path_1.sep).join(path_1.posix.sep);
|
|
148
|
+
const sourcePath = ensureTrailingSlash(sourcePosixPath);
|
|
149
|
+
const destinationPath = ensureTrailingSlash(destinationPosixPath);
|
|
150
|
+
await this.execGit([
|
|
151
|
+
'filter-repo',
|
|
152
|
+
'-f',
|
|
153
|
+
...(source !== '' ? ['--path', sourcePosixPath] : []),
|
|
154
|
+
...(source !== destination
|
|
155
|
+
? ['--path-rename', `${sourcePath}:${destinationPath}`]
|
|
156
|
+
: []),
|
|
157
|
+
]);
|
|
158
|
+
}
|
|
159
|
+
async filterBranch(source, destination, branchName) {
|
|
160
|
+
// We need non-ASCII file names to not be quoted, or else filter-branch will exclude them.
|
|
161
|
+
await this.execGit(['config', 'core.quotepath', 'false']);
|
|
162
|
+
// NOTE: filter-repo requires POSIX path to work
|
|
163
|
+
const sourcePosixPath = source.split(path_1.sep).join(path_1.posix.sep);
|
|
164
|
+
const destinationPosixPath = destination.split(path_1.sep).join(path_1.posix.sep);
|
|
165
|
+
// First, if the source is not a root project, then only include commits relevant to the subdirectory.
|
|
166
|
+
if (source !== '') {
|
|
167
|
+
const indexFilterCommand = `node ${quoteForShell((0, path_1.join)(__dirname, 'git-utils.index-filter.js'))}`;
|
|
168
|
+
await this.execGit([
|
|
169
|
+
'filter-branch',
|
|
170
|
+
'-f',
|
|
171
|
+
'--index-filter',
|
|
172
|
+
indexFilterCommand,
|
|
173
|
+
'--prune-empty',
|
|
174
|
+
'--',
|
|
175
|
+
branchName,
|
|
176
|
+
], {
|
|
177
|
+
NX_IMPORT_SOURCE: sourcePosixPath,
|
|
178
|
+
NX_IMPORT_DESTINATION: destinationPosixPath,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
// Then, move files to their new location if necessary.
|
|
182
|
+
if (source === '' || source !== destination) {
|
|
183
|
+
const treeFilterCommand = `node ${quoteForShell((0, path_1.join)(__dirname, 'git-utils.tree-filter.js'))}`;
|
|
184
|
+
await this.execGit([
|
|
185
|
+
'filter-branch',
|
|
186
|
+
'-f',
|
|
187
|
+
'--tree-filter',
|
|
188
|
+
treeFilterCommand,
|
|
189
|
+
'--',
|
|
190
|
+
branchName,
|
|
191
|
+
], {
|
|
192
|
+
NX_IMPORT_SOURCE: sourcePosixPath,
|
|
193
|
+
NX_IMPORT_DESTINATION: destinationPosixPath,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
execGit(args, env) {
|
|
198
|
+
return execFileAsync('git', args, {
|
|
199
|
+
cwd: this.root,
|
|
200
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
201
|
+
env: {
|
|
202
|
+
...process.env,
|
|
203
|
+
...env,
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.GitRepository = GitRepository;
|
|
209
|
+
function ensureTrailingSlash(path) {
|
|
210
|
+
return path !== '' && !path.endsWith('/') ? `${path}/` : path;
|
|
211
|
+
}
|
|
212
|
+
function quoteForShell(arg) {
|
|
213
|
+
return `'${arg.replaceAll("'", "'\"'\"'")}'`;
|
|
214
|
+
}
|
|
215
|
+
function parseVcsRemoteUrl(url) {
|
|
216
|
+
// Remove whitespace and handle common URL formats
|
|
217
|
+
const cleanUrl = url.trim();
|
|
218
|
+
// SSH format: git@domain:owner/repo.git
|
|
219
|
+
const sshMatch = cleanUrl.match(/^git@([^:]+):([^\/]+)\/(.+?)(\.git)?$/);
|
|
220
|
+
if (sshMatch) {
|
|
221
|
+
const [, domain, owner, repo] = sshMatch;
|
|
222
|
+
return {
|
|
223
|
+
domain,
|
|
224
|
+
slug: `${owner}/${repo}`,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
// HTTPS with authentication: https://user@domain/owner/repo.git
|
|
228
|
+
const httpsAuthMatch = cleanUrl.match(/^https?:\/\/[^@]+@([^\/]+)\/([^\/]+)\/(.+?)(\.git)?$/);
|
|
229
|
+
if (httpsAuthMatch) {
|
|
230
|
+
const [, domain, owner, repo] = httpsAuthMatch;
|
|
231
|
+
return {
|
|
232
|
+
domain,
|
|
233
|
+
slug: `${owner}/${repo}`,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
// HTTPS format: https://domain/owner/repo.git (without authentication)
|
|
237
|
+
const httpsMatch = cleanUrl.match(/^https?:\/\/([^@\/]+)\/([^\/]+)\/(.+?)(\.git)?$/);
|
|
238
|
+
if (httpsMatch) {
|
|
239
|
+
const [, domain, owner, repo] = httpsMatch;
|
|
240
|
+
return {
|
|
241
|
+
domain,
|
|
242
|
+
slug: `${owner}/${repo}`,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
// SSH alternative format: ssh://git@domain/owner/repo.git or ssh://git@domain:port/owner/repo.git
|
|
246
|
+
const sshAltMatch = cleanUrl.match(/^ssh:\/\/[^@]+@([^:\/]+)(:[0-9]+)?\/([^\/]+)\/(.+?)(\.git)?$/);
|
|
247
|
+
if (sshAltMatch) {
|
|
248
|
+
const [, domain, , owner, repo] = sshAltMatch;
|
|
249
|
+
return {
|
|
250
|
+
domain,
|
|
251
|
+
slug: `${owner}/${repo}`,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
function getVcsRemoteInfo(directory) {
|
|
257
|
+
try {
|
|
258
|
+
const gitRemote = (0, child_process_1.execSync)('git remote -v', {
|
|
259
|
+
stdio: 'pipe',
|
|
260
|
+
windowsHide: true,
|
|
261
|
+
cwd: directory,
|
|
262
|
+
})
|
|
263
|
+
.toString()
|
|
264
|
+
.trim();
|
|
265
|
+
if (!gitRemote || gitRemote.length === 0) {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
const lines = gitRemote.split('\n').filter((line) => line.trim());
|
|
269
|
+
const remotesPriority = ['origin', 'upstream', 'base'];
|
|
270
|
+
const foundRemotes = {};
|
|
271
|
+
let firstRemote = null;
|
|
272
|
+
for (const line of lines) {
|
|
273
|
+
const match = line.trim().match(/^(\w+)\s+(\S+)\s+\((fetch|push)\)$/);
|
|
274
|
+
if (match) {
|
|
275
|
+
const [, remoteName, url] = match;
|
|
276
|
+
const remoteInfo = parseVcsRemoteUrl(url);
|
|
277
|
+
if (remoteInfo && !foundRemotes[remoteName]) {
|
|
278
|
+
foundRemotes[remoteName] = remoteInfo;
|
|
279
|
+
if (!firstRemote) {
|
|
280
|
+
firstRemote = remoteInfo;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
// Return high-priority remote if found
|
|
286
|
+
for (const remote of remotesPriority) {
|
|
287
|
+
if (foundRemotes[remote]) {
|
|
288
|
+
return foundRemotes[remote];
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
// Return first found remote
|
|
292
|
+
return firstRemote;
|
|
293
|
+
}
|
|
294
|
+
catch (e) {
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
function getGitRootPath(cwd) {
|
|
299
|
+
return (0, child_process_1.execFileSync)('git', ['rev-parse', '--show-toplevel'], {
|
|
300
|
+
cwd,
|
|
301
|
+
windowsHide: true,
|
|
302
|
+
})
|
|
303
|
+
.toString()
|
|
304
|
+
.trim();
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Path of `directory` relative to its git root, posix-separated so it is
|
|
308
|
+
* identical on every OS, and '' when the directory is the git root itself.
|
|
309
|
+
* Null outside a git repository.
|
|
310
|
+
*/
|
|
311
|
+
function getGitRootRelativePath(directory) {
|
|
312
|
+
try {
|
|
313
|
+
return (0, path_1.relative)(getGitRootPath(directory), directory)
|
|
314
|
+
.split(path_1.sep)
|
|
315
|
+
.join(path_1.posix.sep);
|
|
316
|
+
}
|
|
317
|
+
catch {
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
/** A shallow clone's truncated history has no stable root commit. */
|
|
322
|
+
function isShallowRepository(directory) {
|
|
323
|
+
try {
|
|
324
|
+
return ((0, child_process_1.execFileSync)('git', ['rev-parse', '--is-shallow-repository'], {
|
|
325
|
+
encoding: 'utf8',
|
|
326
|
+
stdio: 'pipe',
|
|
327
|
+
cwd: directory,
|
|
328
|
+
windowsHide: true,
|
|
329
|
+
}).trim() === 'true');
|
|
330
|
+
}
|
|
331
|
+
catch {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* SHA of the repository's first commit. Merged unrelated histories leave
|
|
337
|
+
* several root commits — the sorted-first one is picked so every clone
|
|
338
|
+
* agrees. Null when there are no commits, or outside a git repository.
|
|
339
|
+
*/
|
|
340
|
+
function getFirstCommitSha(directory) {
|
|
341
|
+
try {
|
|
342
|
+
const roots = (0, child_process_1.execFileSync)('git', ['rev-list', '--max-parents=0', 'HEAD'], {
|
|
343
|
+
encoding: 'utf8',
|
|
344
|
+
stdio: 'pipe',
|
|
345
|
+
cwd: directory,
|
|
346
|
+
windowsHide: true,
|
|
347
|
+
})
|
|
348
|
+
.trim()
|
|
349
|
+
.split(/\r?\n/)
|
|
350
|
+
.filter(Boolean);
|
|
351
|
+
return roots.sort()[0] ?? null;
|
|
352
|
+
}
|
|
353
|
+
catch {
|
|
354
|
+
return null;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
function isGitRepository(directory) {
|
|
358
|
+
try {
|
|
359
|
+
(0, child_process_1.execSync)('git rev-parse --is-inside-work-tree', {
|
|
360
|
+
stdio: 'ignore',
|
|
361
|
+
cwd: directory,
|
|
362
|
+
windowsHide: true,
|
|
363
|
+
});
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
366
|
+
catch {
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// Sync companion to `GitRepository.hasUncommittedChanges` for callers that
|
|
371
|
+
// can't drop into the async class (e.g. the migrate orchestrator, which
|
|
372
|
+
// branches on this before spawning subprocesses synchronously).
|
|
373
|
+
function hasUncommittedChanges(directory) {
|
|
374
|
+
try {
|
|
375
|
+
const out = (0, child_process_1.execSync)('git status --porcelain', {
|
|
376
|
+
encoding: 'utf8',
|
|
377
|
+
cwd: directory,
|
|
378
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
379
|
+
windowsHide: true,
|
|
380
|
+
});
|
|
381
|
+
return out.trim() !== '';
|
|
382
|
+
}
|
|
383
|
+
catch {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
// Returns a content-sensitive sha1 snapshot of the working tree state for
|
|
388
|
+
// before/after comparison. Hashes three probes:
|
|
389
|
+
// 1. `git diff HEAD` with defensive flags — every byte of tracked-file
|
|
390
|
+
// changes. `--no-ext-diff` / `--no-textconv` neuter user/repo driver
|
|
391
|
+
// overrides so output is deterministic; `--binary` keeps binary
|
|
392
|
+
// edits from collapsing to "Binary files differ".
|
|
393
|
+
// 2. `git status --porcelain=v1 -uall` — untracked paths the diff
|
|
394
|
+
// omits. `-uall` expands untracked directories per-file.
|
|
395
|
+
// 3. Untracked file content bytes — so a same-path content edit on an
|
|
396
|
+
// already-untracked file does not collapse against the baseline.
|
|
397
|
+
//
|
|
398
|
+
// Each probe is wrapped independently with a failure sentinel so a
|
|
399
|
+
// single-sided git error (e.g. `git diff HEAD` on an initial-commit-less
|
|
400
|
+
// repo) cannot mask surviving signal from the others.
|
|
401
|
+
function getUncommittedChangesSnapshot(directory) {
|
|
402
|
+
const hasher = crypto.createHash('sha1');
|
|
403
|
+
const cwd = directory ?? process.cwd();
|
|
404
|
+
const execOpts = {
|
|
405
|
+
encoding: 'utf8',
|
|
406
|
+
cwd,
|
|
407
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
408
|
+
windowsHide: true,
|
|
409
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
410
|
+
};
|
|
411
|
+
let diffOutput;
|
|
412
|
+
try {
|
|
413
|
+
diffOutput = (0, child_process_1.execSync)('git diff HEAD --no-color --no-ext-diff --no-textconv --binary', execOpts);
|
|
414
|
+
}
|
|
415
|
+
catch {
|
|
416
|
+
diffOutput = '<diff-unavailable>';
|
|
417
|
+
}
|
|
418
|
+
hasher.update('diff:').update(diffOutput).update('\0');
|
|
419
|
+
let statusOutput;
|
|
420
|
+
try {
|
|
421
|
+
statusOutput = (0, child_process_1.execSync)('git status --porcelain=v1 -uall', execOpts);
|
|
422
|
+
}
|
|
423
|
+
catch {
|
|
424
|
+
statusOutput = '<status-unavailable>';
|
|
425
|
+
}
|
|
426
|
+
hasher.update('status:').update(statusOutput).update('\0');
|
|
427
|
+
let untrackedRaw;
|
|
428
|
+
try {
|
|
429
|
+
untrackedRaw = (0, child_process_1.execSync)('git ls-files --others --exclude-standard -z', execOpts);
|
|
430
|
+
}
|
|
431
|
+
catch {
|
|
432
|
+
untrackedRaw = '';
|
|
433
|
+
}
|
|
434
|
+
const untrackedPaths = untrackedRaw.split('\0').filter(Boolean).sort();
|
|
435
|
+
hasher.update('untracked:');
|
|
436
|
+
for (const p of untrackedPaths) {
|
|
437
|
+
hasher.update(p).update('\0');
|
|
438
|
+
try {
|
|
439
|
+
hasher.update(fs.readFileSync((0, path_1.join)(cwd, p)));
|
|
440
|
+
}
|
|
441
|
+
catch {
|
|
442
|
+
hasher.update('<file-unreadable>');
|
|
443
|
+
}
|
|
444
|
+
hasher.update('\0');
|
|
445
|
+
}
|
|
446
|
+
return hasher.digest('hex');
|
|
447
|
+
}
|
|
448
|
+
function commitChanges(commitMessage, directory) {
|
|
449
|
+
try {
|
|
450
|
+
(0, child_process_1.execSync)('git add -A', {
|
|
451
|
+
encoding: 'utf8',
|
|
452
|
+
stdio: 'pipe',
|
|
453
|
+
cwd: directory,
|
|
454
|
+
windowsHide: true,
|
|
455
|
+
});
|
|
456
|
+
(0, child_process_1.execSync)('git commit --no-verify -F -', {
|
|
457
|
+
encoding: 'utf8',
|
|
458
|
+
stdio: 'pipe',
|
|
459
|
+
input: commitMessage,
|
|
460
|
+
cwd: directory,
|
|
461
|
+
windowsHide: true,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
catch (err) {
|
|
465
|
+
if (directory) {
|
|
466
|
+
// We don't want to throw during create-nx-workspace
|
|
467
|
+
// because maybe there was an error when setting up git
|
|
468
|
+
// initially.
|
|
469
|
+
logger_1.logger.verbose(`Git may not be set up correctly for this new workspace.
|
|
470
|
+
${err}`);
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
throw new Error(`Error committing changes:\n${err.stderr}`);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return getLatestCommitSha(directory);
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Throws on git failure with the real stderr attached. Use this when the
|
|
480
|
+
* caller needs to distinguish hook rejection / GPG signing failures / LFS
|
|
481
|
+
* lock errors from a successful no-op. Callers should pre-check
|
|
482
|
+
* `hasUncommittedChanges` to avoid the "nothing to commit" rejection
|
|
483
|
+
* (which `git commit` exits non-zero for).
|
|
484
|
+
*
|
|
485
|
+
* Returns `null` (rather than throwing) when the commit itself succeeded
|
|
486
|
+
* but `git rev-parse HEAD` failed transiently — by contract the diff is
|
|
487
|
+
* no longer in the working tree, so callers must NOT report it as such.
|
|
488
|
+
*/
|
|
489
|
+
function tryCommitChanges(commitMessage, directory) {
|
|
490
|
+
try {
|
|
491
|
+
(0, child_process_1.execSync)('git add -A', {
|
|
492
|
+
encoding: 'utf8',
|
|
493
|
+
stdio: 'pipe',
|
|
494
|
+
cwd: directory,
|
|
495
|
+
windowsHide: true,
|
|
496
|
+
});
|
|
497
|
+
(0, child_process_1.execSync)('git commit --no-verify -F -', {
|
|
498
|
+
encoding: 'utf8',
|
|
499
|
+
stdio: 'pipe',
|
|
500
|
+
input: commitMessage,
|
|
501
|
+
cwd: directory,
|
|
502
|
+
windowsHide: true,
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
catch (err) {
|
|
506
|
+
const stderr = err?.stderr?.toString();
|
|
507
|
+
const stdout = err?.stdout?.toString();
|
|
508
|
+
const detail = [stderr, stdout]
|
|
509
|
+
.map((s) => s?.trim())
|
|
510
|
+
.filter(Boolean)
|
|
511
|
+
.join('\n');
|
|
512
|
+
// `{ cause }` preserves structured fields (.signal, .status, .code)
|
|
513
|
+
// for callers to inspect; otherwise only stderr/stdout text survives.
|
|
514
|
+
throw new Error(detail || (err instanceof Error ? err.message : String(err)), { cause: err });
|
|
515
|
+
}
|
|
516
|
+
return getLatestCommitSha(directory);
|
|
517
|
+
}
|
|
518
|
+
function getLatestCommitSha(directory) {
|
|
519
|
+
try {
|
|
520
|
+
return (0, child_process_1.execSync)('git rev-parse HEAD', {
|
|
521
|
+
encoding: 'utf8',
|
|
522
|
+
stdio: 'pipe',
|
|
523
|
+
windowsHide: true,
|
|
524
|
+
cwd: directory,
|
|
525
|
+
}).trim();
|
|
526
|
+
}
|
|
527
|
+
catch {
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|