@ohos-ports/nx 23.2.0-beta.0 → 23.2.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -60
- package/local-natives.js +59 -0
- package/package.json +9 -534
- package/LICENSE +0 -22
- package/dist/bin/init-local.d.ts +0 -8
- package/dist/bin/init-local.js +0 -186
- package/dist/bin/nx-cloud.d.ts +0 -3
- package/dist/bin/nx-cloud.js +0 -47
- package/dist/bin/nx.d.ts +0 -3
- package/dist/bin/nx.js +0 -341
- package/dist/bin/post-install.d.ts +0 -1
- package/dist/bin/post-install.js +0 -52
- package/dist/bin/run-executor.d.ts +0 -1
- package/dist/bin/run-executor.js +0 -66
- package/dist/plugins/package-json.d.ts +0 -4
- package/dist/plugins/package-json.js +0 -40
- package/dist/presets/core.json +0 -1
- package/dist/presets/npm.json +0 -7
- package/dist/release/changelog-renderer/index.d.ts +0 -110
- package/dist/release/changelog-renderer/index.js +0 -381
- package/dist/release/index.d.ts +0 -4
- package/dist/release/index.js +0 -13
- package/dist/src/adapter/angular-json.d.ts +0 -10
- package/dist/src/adapter/angular-json.js +0 -129
- package/dist/src/adapter/compat.d.ts +0 -2
- package/dist/src/adapter/compat.js +0 -154
- package/dist/src/adapter/ngcli-adapter.d.ts +0 -105
- package/dist/src/adapter/ngcli-adapter.js +0 -1083
- package/dist/src/adapter/rxjs-for-await.d.ts +0 -109
- package/dist/src/adapter/rxjs-for-await.js +0 -362
- package/dist/src/ai/clone-ai-config-repo.d.ts +0 -11
- package/dist/src/ai/clone-ai-config-repo.js +0 -155
- package/dist/src/ai/configure-ai-agents-disclaimer.d.ts +0 -5
- package/dist/src/ai/configure-ai-agents-disclaimer.js +0 -31
- package/dist/src/ai/constants.d.ts +0 -46
- package/dist/src/ai/constants.js +0 -92
- package/dist/src/ai/detect-ai-agent.d.ts +0 -2
- package/dist/src/ai/detect-ai-agent.js +0 -12
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.d.ts +0 -5
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.js +0 -26
- package/dist/src/ai/set-up-ai-agents/schema.d.ts +0 -11
- package/dist/src/ai/set-up-ai-agents/schema.json +0 -34
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts +0 -10
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +0 -578
- package/dist/src/ai/utils.d.ts +0 -33
- package/dist/src/ai/utils.js +0 -246
- package/dist/src/analytics/analytics.d.ts +0 -16
- package/dist/src/analytics/analytics.js +0 -246
- package/dist/src/analytics/index.d.ts +0 -1
- package/dist/src/analytics/index.js +0 -12
- package/dist/src/command-line/add/add.d.ts +0 -3
- package/dist/src/command-line/add/add.js +0 -138
- package/dist/src/command-line/add/command-object.d.ts +0 -8
- package/dist/src/command-line/add/command-object.js +0 -28
- package/dist/src/command-line/add/completion.d.ts +0 -1
- package/dist/src/command-line/add/completion.js +0 -15
- package/dist/src/command-line/affected/affected.d.ts +0 -10
- package/dist/src/command-line/affected/affected.js +0 -90
- package/dist/src/command-line/affected/command-object.d.ts +0 -6
- package/dist/src/command-line/affected/command-object.js +0 -83
- package/dist/src/command-line/affected/completion.d.ts +0 -1
- package/dist/src/command-line/affected/completion.js +0 -15
- package/dist/src/command-line/ai/ai-output.d.ts +0 -46
- package/dist/src/command-line/ai/ai-output.js +0 -86
- package/dist/src/command-line/completion/argv-layout.d.ts +0 -6
- package/dist/src/command-line/completion/argv-layout.js +0 -19
- package/dist/src/command-line/completion/command-completions.d.ts +0 -19
- package/dist/src/command-line/completion/command-completions.js +0 -120
- package/dist/src/command-line/completion/command-handlers.d.ts +0 -30
- package/dist/src/command-line/completion/command-handlers.js +0 -69
- package/dist/src/command-line/completion/command-object.d.ts +0 -10
- package/dist/src/command-line/completion/command-object.js +0 -102
- package/dist/src/command-line/completion/completion-providers.d.ts +0 -21
- package/dist/src/command-line/completion/completion-providers.js +0 -194
- package/dist/src/command-line/completion/infix-targets.d.ts +0 -1
- package/dist/src/command-line/completion/infix-targets.js +0 -48
- package/dist/src/command-line/completion/metadata.d.ts +0 -22
- package/dist/src/command-line/completion/metadata.js +0 -71
- package/dist/src/command-line/completion/registrations.d.ts +0 -9
- package/dist/src/command-line/completion/registrations.js +0 -16
- package/dist/src/command-line/completion/scripts/bash.sh +0 -51
- package/dist/src/command-line/completion/scripts/fish.fish +0 -47
- package/dist/src/command-line/completion/scripts/powershell.ps1 +0 -52
- package/dist/src/command-line/completion/scripts/zsh.zsh +0 -69
- package/dist/src/command-line/completion/scripts.d.ts +0 -18
- package/dist/src/command-line/completion/scripts.js +0 -140
- package/dist/src/command-line/completion/trigger.d.ts +0 -3
- package/dist/src/command-line/completion/trigger.js +0 -21
- package/dist/src/command-line/completion/value-completions.d.ts +0 -3
- package/dist/src/command-line/completion/value-completions.js +0 -21
- package/dist/src/command-line/configure-ai-agents/command-object.d.ts +0 -8
- package/dist/src/command-line/configure-ai-agents/command-object.js +0 -59
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.d.ts +0 -3
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +0 -436
- package/dist/src/command-line/daemon/command-object.d.ts +0 -3
- package/dist/src/command-line/daemon/command-object.js +0 -29
- package/dist/src/command-line/daemon/daemon.d.ts +0 -2
- package/dist/src/command-line/daemon/daemon.js +0 -31
- package/dist/src/command-line/deprecated/command-objects.d.ts +0 -9
- package/dist/src/command-line/deprecated/command-objects.js +0 -48
- package/dist/src/command-line/examples.d.ts +0 -12
- package/dist/src/command-line/examples.js +0 -403
- package/dist/src/command-line/exec/command-object.d.ts +0 -2
- package/dist/src/command-line/exec/command-object.js +0 -20
- package/dist/src/command-line/exec/exec.d.ts +0 -1
- package/dist/src/command-line/exec/exec.js +0 -143
- package/dist/src/command-line/format/command-object.d.ts +0 -3
- package/dist/src/command-line/format/command-object.js +0 -58
- package/dist/src/command-line/format/format.d.ts +0 -2
- package/dist/src/command-line/format/format.js +0 -216
- package/dist/src/command-line/generate/command-object.d.ts +0 -2
- package/dist/src/command-line/generate/command-object.js +0 -67
- package/dist/src/command-line/generate/completion.d.ts +0 -1
- package/dist/src/command-line/generate/completion.js +0 -9
- package/dist/src/command-line/generate/generate.d.ts +0 -21
- package/dist/src/command-line/generate/generate.js +0 -281
- package/dist/src/command-line/generate/generator-utils.d.ts +0 -18
- package/dist/src/command-line/generate/generator-utils.js +0 -91
- package/dist/src/command-line/graph/command-object.d.ts +0 -25
- package/dist/src/command-line/graph/command-object.js +0 -76
- package/dist/src/command-line/graph/completion.d.ts +0 -1
- package/dist/src/command-line/graph/completion.js +0 -13
- package/dist/src/command-line/graph/graph.d.ts +0 -70
- package/dist/src/command-line/graph/graph.js +0 -987
- package/dist/src/command-line/import/command-object.d.ts +0 -2
- package/dist/src/command-line/import/command-object.js +0 -63
- package/dist/src/command-line/import/import.d.ts +0 -26
- package/dist/src/command-line/import/import.js +0 -590
- package/dist/src/command-line/import/utils/ai-output.d.ts +0 -93
- package/dist/src/command-line/import/utils/ai-output.js +0 -209
- package/dist/src/command-line/import/utils/merge-remote-source.d.ts +0 -2
- package/dist/src/command-line/import/utils/merge-remote-source.js +0 -14
- package/dist/src/command-line/import/utils/prepare-source-repo.d.ts +0 -2
- package/dist/src/command-line/import/utils/prepare-source-repo.js +0 -27
- package/dist/src/command-line/index.d.ts +0 -22
- package/dist/src/command-line/index.js +0 -26
- package/dist/src/command-line/init/ai-agent-prompts.d.ts +0 -2
- package/dist/src/command-line/init/ai-agent-prompts.js +0 -30
- package/dist/src/command-line/init/command-object.d.ts +0 -2
- package/dist/src/command-line/init/command-object.js +0 -118
- package/dist/src/command-line/init/configure-plugins.d.ts +0 -34
- package/dist/src/command-line/init/configure-plugins.js +0 -214
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +0 -6
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +0 -122
- package/dist/src/command-line/init/implementation/add-nx-to-nest.d.ts +0 -5
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +0 -353
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +0 -6
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +0 -70
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +0 -4
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +0 -37
- package/dist/src/command-line/init/implementation/angular/index.d.ts +0 -2
- package/dist/src/command-line/init/implementation/angular/index.js +0 -130
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.d.ts +0 -1
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +0 -9
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts +0 -2
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +0 -155
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.d.ts +0 -1
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +0 -204
- package/dist/src/command-line/init/implementation/angular/types.d.ts +0 -20
- package/dist/src/command-line/init/implementation/angular/types.js +0 -2
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +0 -15
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.js +0 -136
- package/dist/src/command-line/init/implementation/deduce-default-base.d.ts +0 -1
- package/dist/src/command-line/init/implementation/deduce-default-base.js +0 -53
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +0 -11
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +0 -151
- package/dist/src/command-line/init/implementation/dot-nx/nxw.d.ts +0 -1
- package/dist/src/command-line/init/implementation/dot-nx/nxw.js +0 -123
- package/dist/src/command-line/init/implementation/format.d.ts +0 -18
- package/dist/src/command-line/init/implementation/format.js +0 -114
- package/dist/src/command-line/init/implementation/utils.d.ts +0 -35
- package/dist/src/command-line/init/implementation/utils.js +0 -422
- package/dist/src/command-line/init/init-v1.d.ts +0 -8
- package/dist/src/command-line/init/init-v1.js +0 -101
- package/dist/src/command-line/init/init-v2.d.ts +0 -23
- package/dist/src/command-line/init/init-v2.js +0 -622
- package/dist/src/command-line/init/utils/ai-output.d.ts +0 -72
- package/dist/src/command-line/init/utils/ai-output.js +0 -180
- package/dist/src/command-line/list/command-object.d.ts +0 -2
- package/dist/src/command-line/list/command-object.js +0 -21
- package/dist/src/command-line/list/list.d.ts +0 -15
- package/dist/src/command-line/list/list.js +0 -48
- package/dist/src/command-line/mcp/command-object.d.ts +0 -2
- package/dist/src/command-line/mcp/command-object.js +0 -29
- package/dist/src/command-line/mcp/mcp.d.ts +0 -2
- package/dist/src/command-line/mcp/mcp.js +0 -60
- package/dist/src/command-line/migrate/agentic/capture-generator-output.d.ts +0 -22
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +0 -100
- package/dist/src/command-line/migrate/agentic/cli-args.d.ts +0 -12
- package/dist/src/command-line/migrate/agentic/cli-args.js +0 -38
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +0 -6
- package/dist/src/command-line/migrate/agentic/definitions.js +0 -148
- package/dist/src/command-line/migrate/agentic/detect-installed.d.ts +0 -10
- package/dist/src/command-line/migrate/agentic/detect-installed.js +0 -68
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +0 -61
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +0 -78
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +0 -69
- package/dist/src/command-line/migrate/agentic/handoff.js +0 -193
- package/dist/src/command-line/migrate/agentic/inception.d.ts +0 -9
- package/dist/src/command-line/migrate/agentic/inception.js +0 -15
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +0 -17
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +0 -57
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +0 -56
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +0 -66
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +0 -49
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +0 -53
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +0 -26
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +0 -27
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +0 -19
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +0 -145
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +0 -46
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +0 -90
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +0 -68
- package/dist/src/command-line/migrate/agentic/run-step.js +0 -124
- package/dist/src/command-line/migrate/agentic/runner.d.ts +0 -33
- package/dist/src/command-line/migrate/agentic/runner.js +0 -444
- package/dist/src/command-line/migrate/agentic/select.d.ts +0 -24
- package/dist/src/command-line/migrate/agentic/select.js +0 -251
- package/dist/src/command-line/migrate/agentic/types.d.ts +0 -132
- package/dist/src/command-line/migrate/agentic/types.js +0 -37
- package/dist/src/command-line/migrate/command-object.d.ts +0 -53
- package/dist/src/command-line/migrate/command-object.js +0 -152
- package/dist/src/command-line/migrate/execute-migration.d.ts +0 -91
- package/dist/src/command-line/migrate/execute-migration.js +0 -474
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +0 -106
- package/dist/src/command-line/migrate/migrate-analytics.js +0 -317
- package/dist/src/command-line/migrate/migrate-commits.d.ts +0 -80
- package/dist/src/command-line/migrate/migrate-commits.js +0 -217
- package/dist/src/command-line/migrate/migrate-config.d.ts +0 -29
- package/dist/src/command-line/migrate/migrate-config.js +0 -112
- package/dist/src/command-line/migrate/migrate-output.d.ts +0 -218
- package/dist/src/command-line/migrate/migrate-output.js +0 -302
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +0 -89
- package/dist/src/command-line/migrate/migrate-ui-api.js +0 -437
- package/dist/src/command-line/migrate/migrate.d.ts +0 -242
- package/dist/src/command-line/migrate/migrate.js +0 -2807
- package/dist/src/command-line/migrate/migration-shape.d.ts +0 -16
- package/dist/src/command-line/migrate/migration-shape.js +0 -13
- package/dist/src/command-line/migrate/multi-major.d.ts +0 -37
- package/dist/src/command-line/migrate/multi-major.js +0 -215
- package/dist/src/command-line/migrate/prompt-files.d.ts +0 -31
- package/dist/src/command-line/migrate/prompt-files.js +0 -141
- package/dist/src/command-line/migrate/resolve-package-version.d.ts +0 -24
- package/dist/src/command-line/migrate/resolve-package-version.js +0 -245
- package/dist/src/command-line/migrate/run/agent-output.d.ts +0 -20
- package/dist/src/command-line/migrate/run/agent-output.js +0 -65
- package/dist/src/command-line/migrate/run/index.d.ts +0 -9
- package/dist/src/command-line/migrate/run/index.js +0 -23
- package/dist/src/command-line/migrate/run/orchestrator.d.ts +0 -20
- package/dist/src/command-line/migrate/run/orchestrator.js +0 -1200
- package/dist/src/command-line/migrate/run/run-id.d.ts +0 -16
- package/dist/src/command-line/migrate/run/run-id.js +0 -56
- package/dist/src/command-line/migrate/run/run-state.d.ts +0 -157
- package/dist/src/command-line/migrate/run/run-state.js +0 -438
- package/dist/src/command-line/migrate/run/state-lock.d.ts +0 -25
- package/dist/src/command-line/migrate/run/state-lock.js +0 -76
- package/dist/src/command-line/migrate/run/state-machine.d.ts +0 -84
- package/dist/src/command-line/migrate/run/state-machine.js +0 -315
- package/dist/src/command-line/migrate/run/util.d.ts +0 -59
- package/dist/src/command-line/migrate/run/util.js +0 -148
- package/dist/src/command-line/migrate/run/worker.d.ts +0 -16
- package/dist/src/command-line/migrate/run/worker.js +0 -682
- package/dist/src/command-line/migrate/run-migration-process.js +0 -110
- package/dist/src/command-line/migrate/safe-prompt.d.ts +0 -21
- package/dist/src/command-line/migrate/safe-prompt.js +0 -47
- package/dist/src/command-line/migrate/sort-migrations.d.ts +0 -16
- package/dist/src/command-line/migrate/sort-migrations.js +0 -32
- package/dist/src/command-line/migrate/step-actions.d.ts +0 -5
- package/dist/src/command-line/migrate/step-actions.js +0 -12
- package/dist/src/command-line/migrate/text.d.ts +0 -18
- package/dist/src/command-line/migrate/text.js +0 -26
- package/dist/src/command-line/migrate/update-filters.d.ts +0 -11
- package/dist/src/command-line/migrate/update-filters.js +0 -45
- package/dist/src/command-line/migrate/version-skew-guard.d.ts +0 -60
- package/dist/src/command-line/migrate/version-skew-guard.js +0 -175
- package/dist/src/command-line/migrate/version-utils.d.ts +0 -5
- package/dist/src/command-line/migrate/version-utils.js +0 -52
- package/dist/src/command-line/new/command-object.d.ts +0 -2
- package/dist/src/command-line/new/command-object.js +0 -26
- package/dist/src/command-line/new/new.d.ts +0 -3
- package/dist/src/command-line/new/new.js +0 -30
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.js +0 -13
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/complete-run/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/complete-run/command-object.js +0 -17
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.js +0 -13
- package/dist/src/command-line/nx-cloud/connect/command-object.d.ts +0 -3
- package/dist/src/command-line/nx-cloud/connect/command-object.js +0 -28
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +0 -13
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +0 -266
- package/dist/src/command-line/nx-cloud/connect/view-logs.d.ts +0 -1
- package/dist/src/command-line/nx-cloud/connect/view-logs.js +0 -55
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.js +0 -13
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.js +0 -32
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.js +0 -13
- package/dist/src/command-line/nx-cloud/login/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/login/command-object.js +0 -20
- package/dist/src/command-line/nx-cloud/login/login.d.ts +0 -5
- package/dist/src/command-line/nx-cloud/login/login.js +0 -10
- package/dist/src/command-line/nx-cloud/logout/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/logout/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/logout/logout.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/logout/logout.js +0 -7
- package/dist/src/command-line/nx-cloud/record/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/record/command-object.js +0 -19
- package/dist/src/command-line/nx-cloud/record/record.d.ts +0 -5
- package/dist/src/command-line/nx-cloud/record/record.js +0 -33
- package/dist/src/command-line/nx-cloud/start-agent/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/start-agent/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.js +0 -13
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.js +0 -13
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.js +0 -13
- package/dist/src/command-line/nx-cloud/utils.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/utils.js +0 -34
- package/dist/src/command-line/nx-commands.d.ts +0 -10
- package/dist/src/command-line/nx-commands.js +0 -183
- package/dist/src/command-line/register/command-object.d.ts +0 -6
- package/dist/src/command-line/register/command-object.js +0 -27
- package/dist/src/command-line/register/register.d.ts +0 -2
- package/dist/src/command-line/register/register.js +0 -9
- package/dist/src/command-line/release/changelog/commit-utils.d.ts +0 -13
- package/dist/src/command-line/release/changelog/commit-utils.js +0 -63
- package/dist/src/command-line/release/changelog/version-plan-filtering.d.ts +0 -43
- package/dist/src/command-line/release/changelog/version-plan-filtering.js +0 -156
- package/dist/src/command-line/release/changelog/version-plan-utils.d.ts +0 -31
- package/dist/src/command-line/release/changelog/version-plan-utils.js +0 -92
- package/dist/src/command-line/release/changelog.d.ts +0 -28
- package/dist/src/command-line/release/changelog.js +0 -905
- package/dist/src/command-line/release/command-object.d.ts +0 -96
- package/dist/src/command-line/release/command-object.js +0 -342
- package/dist/src/command-line/release/config/config.d.ts +0 -70
- package/dist/src/command-line/release/config/config.js +0 -1204
- package/dist/src/command-line/release/config/conventional-commits.d.ts +0 -2
- package/dist/src/command-line/release/config/conventional-commits.js +0 -106
- package/dist/src/command-line/release/config/deep-merge-json.d.ts +0 -1
- package/dist/src/command-line/release/config/deep-merge-json.js +0 -28
- package/dist/src/command-line/release/config/filter-release-groups.d.ts +0 -23
- package/dist/src/command-line/release/config/filter-release-groups.js +0 -157
- package/dist/src/command-line/release/config/use-legacy-versioning.d.ts +0 -2
- package/dist/src/command-line/release/config/use-legacy-versioning.js +0 -8
- package/dist/src/command-line/release/config/version-plans.d.ts +0 -42
- package/dist/src/command-line/release/config/version-plans.js +0 -278
- package/dist/src/command-line/release/index.d.ts +0 -49
- package/dist/src/command-line/release/index.js +0 -49
- package/dist/src/command-line/release/plan-check.d.ts +0 -4
- package/dist/src/command-line/release/plan-check.js +0 -170
- package/dist/src/command-line/release/plan.d.ts +0 -4
- package/dist/src/command-line/release/plan.js +0 -248
- package/dist/src/command-line/release/publish.d.ts +0 -9
- package/dist/src/command-line/release/publish.js +0 -295
- package/dist/src/command-line/release/release.d.ts +0 -5
- package/dist/src/command-line/release/release.js +0 -299
- package/dist/src/command-line/release/utils/diff.d.ts +0 -21
- package/dist/src/command-line/release/utils/diff.js +0 -168
- package/dist/src/command-line/release/utils/exec-command.d.ts +0 -1
- package/dist/src/command-line/release/utils/exec-command.js +0 -34
- package/dist/src/command-line/release/utils/generate-version-plan-content.d.ts +0 -1
- package/dist/src/command-line/release/utils/generate-version-plan-content.js +0 -20
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.d.ts +0 -7
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.js +0 -78
- package/dist/src/command-line/release/utils/git.d.ts +0 -126
- package/dist/src/command-line/release/utils/git.js +0 -597
- package/dist/src/command-line/release/utils/launch-editor.d.ts +0 -1
- package/dist/src/command-line/release/utils/launch-editor.js +0 -46
- package/dist/src/command-line/release/utils/markdown.d.ts +0 -6
- package/dist/src/command-line/release/utils/markdown.js +0 -28
- package/dist/src/command-line/release/utils/print-changes.d.ts +0 -6
- package/dist/src/command-line/release/utils/print-changes.js +0 -63
- package/dist/src/command-line/release/utils/print-config.d.ts +0 -7
- package/dist/src/command-line/release/utils/print-config.js +0 -36
- package/dist/src/command-line/release/utils/release-graph.d.ts +0 -248
- package/dist/src/command-line/release/utils/release-graph.js +0 -769
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +0 -9
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.js +0 -61
- package/dist/src/command-line/release/utils/remote-release-clients/github.d.ts +0 -58
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +0 -336
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +0 -62
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +0 -259
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +0 -111
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +0 -138
- package/dist/src/command-line/release/utils/repository-git-tags.d.ts +0 -25
- package/dist/src/command-line/release/utils/repository-git-tags.js +0 -125
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.d.ts +0 -2
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +0 -22
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.d.ts +0 -1
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.js +0 -53
- package/dist/src/command-line/release/utils/resolve-semver-specifier.d.ts +0 -7
- package/dist/src/command-line/release/utils/resolve-semver-specifier.js +0 -41
- package/dist/src/command-line/release/utils/semver.d.ts +0 -26
- package/dist/src/command-line/release/utils/semver.js +0 -111
- package/dist/src/command-line/release/utils/shared-legacy.d.ts +0 -25
- package/dist/src/command-line/release/utils/shared-legacy.js +0 -2
- package/dist/src/command-line/release/utils/shared.d.ts +0 -64
- package/dist/src/command-line/release/utils/shared.js +0 -379
- package/dist/src/command-line/release/utils/version-plan-utils.d.ts +0 -40
- package/dist/src/command-line/release/utils/version-plan-utils.js +0 -111
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +0 -8
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.js +0 -61
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +0 -8
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.js +0 -59
- package/dist/src/command-line/release/version/project-logger.d.ts +0 -8
- package/dist/src/command-line/release/version/project-logger.js +0 -47
- package/dist/src/command-line/release/version/release-group-processor.d.ts +0 -139
- package/dist/src/command-line/release/version/release-group-processor.js +0 -706
- package/dist/src/command-line/release/version/resolve-current-version.d.ts +0 -32
- package/dist/src/command-line/release/version/resolve-current-version.js +0 -240
- package/dist/src/command-line/release/version/topological-sort.d.ts +0 -9
- package/dist/src/command-line/release/version/topological-sort.js +0 -41
- package/dist/src/command-line/release/version/version-actions.d.ts +0 -224
- package/dist/src/command-line/release/version/version-actions.js +0 -255
- package/dist/src/command-line/release/version.d.ts +0 -28
- package/dist/src/command-line/release/version.js +0 -382
- package/dist/src/command-line/repair/command-object.d.ts +0 -2
- package/dist/src/command-line/repair/command-object.js +0 -21
- package/dist/src/command-line/repair/repair.d.ts +0 -3
- package/dist/src/command-line/repair/repair.js +0 -41
- package/dist/src/command-line/report/command-object.d.ts +0 -2
- package/dist/src/command-line/report/command-object.js +0 -12
- package/dist/src/command-line/report/report.d.ts +0 -71
- package/dist/src/command-line/report/report.js +0 -405
- package/dist/src/command-line/reset/command-object.d.ts +0 -8
- package/dist/src/command-line/reset/command-object.js +0 -27
- package/dist/src/command-line/reset/reset.d.ts +0 -2
- package/dist/src/command-line/reset/reset.js +0 -185
- package/dist/src/command-line/run/command-object.d.ts +0 -6
- package/dist/src/command-line/run/command-object.js +0 -43
- package/dist/src/command-line/run/completion.d.ts +0 -1
- package/dist/src/command-line/run/completion.js +0 -7
- package/dist/src/command-line/run/executor-utils.d.ts +0 -12
- package/dist/src/command-line/run/executor-utils.js +0 -96
- package/dist/src/command-line/run/run-one.d.ts +0 -17
- package/dist/src/command-line/run/run-one.js +0 -155
- package/dist/src/command-line/run/run.d.ts +0 -51
- package/dist/src/command-line/run/run.js +0 -179
- package/dist/src/command-line/run-many/command-object.d.ts +0 -2
- package/dist/src/command-line/run-many/command-object.js +0 -18
- package/dist/src/command-line/run-many/completion.d.ts +0 -1
- package/dist/src/command-line/run-many/completion.js +0 -13
- package/dist/src/command-line/run-many/run-many.d.ts +0 -10
- package/dist/src/command-line/run-many/run-many.js +0 -90
- package/dist/src/command-line/show/command-object.d.ts +0 -40
- package/dist/src/command-line/show/command-object.js +0 -237
- package/dist/src/command-line/show/completion.d.ts +0 -1
- package/dist/src/command-line/show/completion.js +0 -27
- package/dist/src/command-line/show/project.d.ts +0 -2
- package/dist/src/command-line/show/project.js +0 -103
- package/dist/src/command-line/show/projects.d.ts +0 -2
- package/dist/src/command-line/show/projects.js +0 -80
- package/dist/src/command-line/show/show-target/index.d.ts +0 -3
- package/dist/src/command-line/show/show-target/index.js +0 -9
- package/dist/src/command-line/show/show-target/info.d.ts +0 -28
- package/dist/src/command-line/show/show-target/info.js +0 -389
- package/dist/src/command-line/show/show-target/inputs.d.ts +0 -2
- package/dist/src/command-line/show/show-target/inputs.js +0 -83
- package/dist/src/command-line/show/show-target/outputs.d.ts +0 -2
- package/dist/src/command-line/show/show-target/outputs.js +0 -70
- package/dist/src/command-line/show/show-target/utils.d.ts +0 -54
- package/dist/src/command-line/show/show-target/utils.js +0 -265
- package/dist/src/command-line/sync/command-object.d.ts +0 -6
- package/dist/src/command-line/sync/command-object.js +0 -21
- package/dist/src/command-line/sync/sync.d.ts +0 -6
- package/dist/src/command-line/sync/sync.js +0 -120
- package/dist/src/command-line/watch/command-object.d.ts +0 -2
- package/dist/src/command-line/watch/command-object.js +0 -91
- package/dist/src/command-line/watch/completion.d.ts +0 -1
- package/dist/src/command-line/watch/completion.js +0 -10
- package/dist/src/command-line/watch/watch.d.ts +0 -31
- package/dist/src/command-line/watch/watch.js +0 -211
- package/dist/src/command-line/yargs-utils/arguments-of.d.ts +0 -11
- package/dist/src/command-line/yargs-utils/arguments-of.js +0 -9
- package/dist/src/command-line/yargs-utils/documentation.d.ts +0 -2
- package/dist/src/command-line/yargs-utils/documentation.js +0 -12
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +0 -91
- package/dist/src/command-line/yargs-utils/shared-options.js +0 -397
- package/dist/src/commands-runner/command-graph.d.ts +0 -13
- package/dist/src/commands-runner/command-graph.js +0 -2
- package/dist/src/commands-runner/create-command-graph.d.ts +0 -4
- package/dist/src/commands-runner/create-command-graph.js +0 -72
- package/dist/src/commands-runner/get-command-projects.d.ts +0 -3
- package/dist/src/commands-runner/get-command-projects.js +0 -33
- package/dist/src/config/calculate-default-project-name.d.ts +0 -4
- package/dist/src/config/calculate-default-project-name.js +0 -41
- package/dist/src/config/configuration.d.ts +0 -8
- package/dist/src/config/configuration.js +0 -17
- package/dist/src/config/misc-interfaces.d.ts +0 -266
- package/dist/src/config/misc-interfaces.js +0 -2
- package/dist/src/config/nx-json.d.ts +0 -963
- package/dist/src/config/nx-json.js +0 -40
- package/dist/src/config/project-graph.d.ts +0 -137
- package/dist/src/config/project-graph.js +0 -45
- package/dist/src/config/schema-utils.d.ts +0 -37
- package/dist/src/config/schema-utils.js +0 -199
- package/dist/src/config/task-graph.d.ts +0 -6
- package/dist/src/config/task-graph.js +0 -2
- package/dist/src/config/to-project-name.d.ts +0 -5
- package/dist/src/config/to-project-name.js +0 -12
- package/dist/src/config/workspace-json-project-json.d.ts +0 -273
- package/dist/src/config/workspace-json-project-json.js +0 -2
- package/dist/src/core/graph/environment.js +0 -1
- package/dist/src/core/graph/favicon.ico +0 -0
- package/dist/src/core/graph/index.html +0 -32
- package/dist/src/core/graph/main.js +0 -1
- package/dist/src/core/graph/runtime.js +0 -1
- package/dist/src/core/graph/styles.css +0 -2
- package/dist/src/core/graph/styles.js +0 -1
- package/dist/src/daemon/cache.d.ts +0 -10
- package/dist/src/daemon/cache.js +0 -58
- package/dist/src/daemon/client/client.d.ts +0 -161
- package/dist/src/daemon/client/client.js +0 -1255
- package/dist/src/daemon/client/daemon-environment.d.ts +0 -64
- package/dist/src/daemon/client/daemon-environment.js +0 -378
- package/dist/src/daemon/client/daemon-socket-messenger.d.ts +0 -12
- package/dist/src/daemon/client/daemon-socket-messenger.js +0 -63
- package/dist/src/daemon/is-nx-version-mismatch.d.ts +0 -1
- package/dist/src/daemon/is-nx-version-mismatch.js +0 -8
- package/dist/src/daemon/is-on-daemon.d.ts +0 -1
- package/dist/src/daemon/is-on-daemon.js +0 -6
- package/dist/src/daemon/is-v8-serializer-enabled.d.ts +0 -5
- package/dist/src/daemon/is-v8-serializer-enabled.js +0 -10
- package/dist/src/daemon/logger.d.ts +0 -39
- package/dist/src/daemon/logger.js +0 -80
- package/dist/src/daemon/message-types/configure-ai-agents.d.ts +0 -20
- package/dist/src/daemon/message-types/configure-ai-agents.js +0 -19
- package/dist/src/daemon/message-types/daemon-message.d.ts +0 -39
- package/dist/src/daemon/message-types/daemon-message.js +0 -54
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +0 -6
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.js +0 -11
- package/dist/src/daemon/message-types/force-shutdown.d.ts +0 -5
- package/dist/src/daemon/message-types/force-shutdown.js +0 -11
- package/dist/src/daemon/message-types/get-context-file-data.d.ts +0 -5
- package/dist/src/daemon/message-types/get-context-file-data.js +0 -11
- package/dist/src/daemon/message-types/get-files-in-directory.d.ts +0 -6
- package/dist/src/daemon/message-types/get-files-in-directory.js +0 -11
- package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +0 -6
- package/dist/src/daemon/message-types/get-nx-workspace-files.js +0 -11
- package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +0 -5
- package/dist/src/daemon/message-types/get-registered-sync-generators.js +0 -11
- package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +0 -6
- package/dist/src/daemon/message-types/get-sync-generator-changes.js +0 -11
- package/dist/src/daemon/message-types/glob.d.ts +0 -14
- package/dist/src/daemon/message-types/glob.js +0 -19
- package/dist/src/daemon/message-types/hash-glob.d.ts +0 -13
- package/dist/src/daemon/message-types/hash-glob.js +0 -19
- package/dist/src/daemon/message-types/nx-console.d.ts +0 -17
- package/dist/src/daemon/message-types/nx-console.js +0 -19
- package/dist/src/daemon/message-types/register-project-graph-listener.d.ts +0 -5
- package/dist/src/daemon/message-types/register-project-graph-listener.js +0 -11
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +0 -13
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.js +0 -19
- package/dist/src/daemon/message-types/streaming-messages.d.ts +0 -14
- package/dist/src/daemon/message-types/streaming-messages.js +0 -19
- package/dist/src/daemon/message-types/task-history.d.ts +0 -19
- package/dist/src/daemon/message-types/task-history.js +0 -27
- package/dist/src/daemon/message-types/update-workspace-context.d.ts +0 -8
- package/dist/src/daemon/message-types/update-workspace-context.js +0 -11
- package/dist/src/daemon/sandbox-socket-hint.d.ts +0 -27
- package/dist/src/daemon/sandbox-socket-hint.js +0 -136
- package/dist/src/daemon/server/client-socket-context.d.ts +0 -23
- package/dist/src/daemon/server/client-socket-context.js +0 -88
- package/dist/src/daemon/server/dotenv-graph-changes.d.ts +0 -97
- package/dist/src/daemon/server/dotenv-graph-changes.js +0 -284
- package/dist/src/daemon/server/file-watching/changed-projects.d.ts +0 -10
- package/dist/src/daemon/server/file-watching/changed-projects.js +0 -53
- package/dist/src/daemon/server/file-watching/file-change-events.d.ts +0 -7
- package/dist/src/daemon/server/file-watching/file-change-events.js +0 -19
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -17
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +0 -82
- package/dist/src/daemon/server/file-watching/route-workspace-changes.d.ts +0 -9
- package/dist/src/daemon/server/file-watching/route-workspace-changes.js +0 -76
- package/dist/src/daemon/server/handle-client-env.d.ts +0 -8
- package/dist/src/daemon/server/handle-client-env.js +0 -92
- package/dist/src/daemon/server/handle-configure-ai-agents.d.ts +0 -3
- package/dist/src/daemon/server/handle-configure-ai-agents.js +0 -101
- package/dist/src/daemon/server/handle-context-file-data.d.ts +0 -2
- package/dist/src/daemon/server/handle-context-file-data.js +0 -12
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +0 -2
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +0 -11
- package/dist/src/daemon/server/handle-force-shutdown.d.ts +0 -5
- package/dist/src/daemon/server/handle-force-shutdown.js +0 -18
- package/dist/src/daemon/server/handle-get-files-in-directory.d.ts +0 -2
- package/dist/src/daemon/server/handle-get-files-in-directory.js +0 -12
- package/dist/src/daemon/server/handle-get-registered-sync-generators.d.ts +0 -2
- package/dist/src/daemon/server/handle-get-registered-sync-generators.js +0 -11
- package/dist/src/daemon/server/handle-get-sync-generator-changes.d.ts +0 -2
- package/dist/src/daemon/server/handle-get-sync-generator-changes.js +0 -20
- package/dist/src/daemon/server/handle-glob.d.ts +0 -3
- package/dist/src/daemon/server/handle-glob.js +0 -20
- package/dist/src/daemon/server/handle-hash-glob.d.ts +0 -3
- package/dist/src/daemon/server/handle-hash-glob.js +0 -20
- package/dist/src/daemon/server/handle-hash-tasks.d.ts +0 -12
- package/dist/src/daemon/server/handle-hash-tasks.js +0 -28
- package/dist/src/daemon/server/handle-nx-console.d.ts +0 -3
- package/dist/src/daemon/server/handle-nx-console.js +0 -54
- package/dist/src/daemon/server/handle-nx-workspace-files.d.ts +0 -2
- package/dist/src/daemon/server/handle-nx-workspace-files.js +0 -12
- package/dist/src/daemon/server/handle-outputs-changes.d.ts +0 -10
- package/dist/src/daemon/server/handle-outputs-changes.js +0 -86
- package/dist/src/daemon/server/handle-outputs-tracking.d.ts +0 -15
- package/dist/src/daemon/server/handle-outputs-tracking.js +0 -35
- package/dist/src/daemon/server/handle-process-in-background.d.ts +0 -6
- package/dist/src/daemon/server/handle-process-in-background.js +0 -32
- package/dist/src/daemon/server/handle-request-project-graph.d.ts +0 -3
- package/dist/src/daemon/server/handle-request-project-graph.js +0 -36
- package/dist/src/daemon/server/handle-request-shutdown.d.ts +0 -5
- package/dist/src/daemon/server/handle-request-shutdown.js +0 -27
- package/dist/src/daemon/server/handle-task-history.d.ts +0 -13
- package/dist/src/daemon/server/handle-task-history.js +0 -30
- package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +0 -19
- package/dist/src/daemon/server/handle-tasks-execution-hooks.js +0 -35
- package/dist/src/daemon/server/handle-update-workspace-context.d.ts +0 -2
- package/dist/src/daemon/server/handle-update-workspace-context.js +0 -11
- package/dist/src/daemon/server/latest-nx.d.ts +0 -10
- package/dist/src/daemon/server/latest-nx.js +0 -56
- package/dist/src/daemon/server/nx-console-operations.d.ts +0 -26
- package/dist/src/daemon/server/nx-console-operations.js +0 -97
- package/dist/src/daemon/server/outputs-tracking.d.ts +0 -23
- package/dist/src/daemon/server/outputs-tracking.js +0 -120
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +0 -47
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +0 -660
- package/dist/src/daemon/server/project-graph-listener-sockets.d.ts +0 -7
- package/dist/src/daemon/server/project-graph-listener-sockets.js +0 -25
- package/dist/src/daemon/server/server.d.ts +0 -10
- package/dist/src/daemon/server/server.js +0 -465
- package/dist/src/daemon/server/shutdown-utils.d.ts +0 -23
- package/dist/src/daemon/server/shutdown-utils.js +0 -159
- package/dist/src/daemon/server/start.d.ts +0 -1
- package/dist/src/daemon/server/start.js +0 -20
- package/dist/src/daemon/server/sync-generators.d.ts +0 -14
- package/dist/src/daemon/server/sync-generators.js +0 -368
- package/dist/src/daemon/server/watcher.d.ts +0 -18
- package/dist/src/daemon/server/watcher.js +0 -126
- package/dist/src/daemon/socket-utils.d.ts +0 -43
- package/dist/src/daemon/socket-utils.js +0 -131
- package/dist/src/daemon/tmp-dir.d.ts +0 -62
- package/dist/src/daemon/tmp-dir.js +0 -477
- package/dist/src/devkit-exports.d.ts +0 -139
- package/dist/src/devkit-exports.js +0 -143
- package/dist/src/devkit-internals.d.ts +0 -144
- package/dist/src/devkit-internals.js +0 -331
- package/dist/src/devkit-testing-exports.d.ts +0 -2
- package/dist/src/devkit-testing-exports.js +0 -8
- package/dist/src/executors/noop/noop.impl.d.ts +0 -3
- package/dist/src/executors/noop/noop.impl.js +0 -6
- package/dist/src/executors/noop/schema.json +0 -10
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +0 -59
- package/dist/src/executors/run-commands/run-commands.impl.js +0 -301
- package/dist/src/executors/run-commands/running-tasks.d.ts +0 -52
- package/dist/src/executors/run-commands/running-tasks.js +0 -603
- package/dist/src/executors/run-commands/schema.json +0 -198
- package/dist/src/executors/run-script/run-script.impl.d.ts +0 -8
- package/dist/src/executors/run-script/run-script.impl.js +0 -86
- package/dist/src/executors/run-script/schema.json +0 -28
- package/dist/src/executors/utils/convert-nx-executor.d.ts +0 -10
- package/dist/src/executors/utils/convert-nx-executor.js +0 -83
- package/dist/src/generators/internal-utils/format-changed-files.d.ts +0 -24
- package/dist/src/generators/internal-utils/format-changed-files.js +0 -163
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +0 -26
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +0 -70
- package/dist/src/generators/testing-utils/create-tree.d.ts +0 -5
- package/dist/src/generators/testing-utils/create-tree.js +0 -14
- package/dist/src/generators/tree.d.ts +0 -127
- package/dist/src/generators/tree.js +0 -310
- package/dist/src/generators/utils/generate-files.d.ts +0 -44
- package/dist/src/generators/utils/generate-files.js +0 -114
- package/dist/src/generators/utils/glob.d.ts +0 -22
- package/dist/src/generators/utils/glob.js +0 -51
- package/dist/src/generators/utils/json.d.ts +0 -28
- package/dist/src/generators/utils/json.js +0 -48
- package/dist/src/generators/utils/nx-json.d.ts +0 -10
- package/dist/src/generators/utils/nx-json.js +0 -62
- package/dist/src/generators/utils/project-configuration.d.ts +0 -51
- package/dist/src/generators/utils/project-configuration.js +0 -299
- package/dist/src/hasher/check-task-files.d.ts +0 -86
- package/dist/src/hasher/check-task-files.js +0 -378
- package/dist/src/hasher/create-task-hasher.d.ts +0 -4
- package/dist/src/hasher/create-task-hasher.js +0 -15
- package/dist/src/hasher/file-hasher.d.ts +0 -3
- package/dist/src/hasher/file-hasher.js +0 -23
- package/dist/src/hasher/hash-plan-inspector.d.ts +0 -33
- package/dist/src/hasher/hash-plan-inspector.js +0 -70
- package/dist/src/hasher/hash-task.d.ts +0 -17
- package/dist/src/hasher/hash-task.js +0 -191
- package/dist/src/hasher/native-task-hasher-impl.d.ts +0 -18
- package/dist/src/hasher/native-task-hasher-impl.js +0 -38
- package/dist/src/hasher/task-hasher.d.ts +0 -160
- package/dist/src/hasher/task-hasher.js +0 -301
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -2
- package/dist/src/migrations/update-15-0-0/prefix-outputs.d.ts +0 -2
- package/dist/src/migrations/update-15-0-0/prefix-outputs.js +0 -54
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +0 -2
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +0 -16
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +0 -2
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +0 -82
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +0 -2
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +0 -29
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +0 -2
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +0 -50
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +0 -12
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +0 -67
- package/dist/src/migrations/update-17-0-0/move-cache-directory.d.ts +0 -2
- package/dist/src/migrations/update-17-0-0/move-cache-directory.js +0 -35
- package/dist/src/migrations/update-17-0-0/move-cache-directory.md +0 -31
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +0 -2
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +0 -72
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +0 -2
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +0 -126
- package/dist/src/migrations/update-17-2-0/move-default-base.d.ts +0 -5
- package/dist/src/migrations/update-17-2-0/move-default-base.js +0 -20
- package/dist/src/migrations/update-17-3-0/update-nxw.d.ts +0 -2
- package/dist/src/migrations/update-17-3-0/update-nxw.js +0 -7
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +0 -2
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +0 -11
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts +0 -4
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.js +0 -33
- package/dist/src/migrations/update-19-2-4/set-project-name.d.ts +0 -2
- package/dist/src/migrations/update-19-2-4/set-project-name.js +0 -34
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +0 -2
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +0 -25
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.md +0 -27
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.d.ts +0 -2
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +0 -20
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.md +0 -24
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +0 -38
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.md +0 -49
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +0 -101
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.md +0 -54
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +0 -38
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.md +0 -28
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +0 -17
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.md +0 -22
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +0 -2
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +0 -100
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.d.ts +0 -2
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +0 -101
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +0 -2
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.js +0 -7
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.d.ts +0 -2
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +0 -19
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.md +0 -11
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts +0 -2
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.js +0 -23
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +0 -9
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +0 -18
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +0 -12
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +0 -250
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +0 -50
- package/dist/src/migrations/utils/target-defaults.d.ts +0 -28
- package/dist/src/migrations/utils/target-defaults.js +0 -46
- package/dist/src/native/assert-supported-platform.d.ts +0 -1
- package/dist/src/native/assert-supported-platform.js +0 -39
- package/dist/src/native/browser.js +0 -1
- package/dist/src/native/index.d.ts +0 -858
- package/dist/src/native/index.js +0 -222
- package/dist/src/native/native-bindings.js +0 -642
- package/dist/src/native/native-file-cache-location.d.ts +0 -17
- package/dist/src/native/native-file-cache-location.js +0 -97
- package/dist/src/native/nx.openharmony-arm64.node +0 -0
- package/dist/src/native/nx.wasi-browser.js +0 -131
- package/dist/src/native/nx.wasi.cjs +0 -161
- 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 +0 -3
- package/dist/src/native/transform-objects.js +0 -51
- package/dist/src/native/wasi-worker-browser.mjs +0 -30
- package/dist/src/native/wasi-worker.mjs +0 -63
- package/dist/src/nx-cloud/debug-logger.d.ts +0 -1
- package/dist/src/nx-cloud/debug-logger.js +0 -8
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +0 -14
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +0 -159
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +0 -41
- package/dist/src/nx-cloud/models/onboarding-status.d.ts +0 -1
- package/dist/src/nx-cloud/models/onboarding-status.js +0 -2
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +0 -16
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.js +0 -41
- package/dist/src/nx-cloud/resolution-helpers.d.ts +0 -1
- package/dist/src/nx-cloud/resolution-helpers.js +0 -19
- package/dist/src/nx-cloud/update-manager.d.ts +0 -23
- package/dist/src/nx-cloud/update-manager.js +0 -267
- package/dist/src/nx-cloud/utilities/axios.d.ts +0 -4
- package/dist/src/nx-cloud/utilities/axios.js +0 -17
- package/dist/src/nx-cloud/utilities/client.d.ts +0 -10
- package/dist/src/nx-cloud/utilities/client.js +0 -42
- package/dist/src/nx-cloud/utilities/environment.d.ts +0 -3
- package/dist/src/nx-cloud/utilities/environment.js +0 -48
- package/dist/src/nx-cloud/utilities/get-cloud-options.d.ts +0 -5
- package/dist/src/nx-cloud/utilities/get-cloud-options.js +0 -26
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.d.ts +0 -1
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +0 -25
- package/dist/src/nx-cloud/utilities/onboarding.d.ts +0 -5
- package/dist/src/nx-cloud/utilities/onboarding.js +0 -31
- package/dist/src/nx-cloud/utilities/url-shorten.d.ts +0 -2
- package/dist/src/nx-cloud/utilities/url-shorten.js +0 -85
- package/dist/src/plugins/js/hasher/hasher.d.ts +0 -5
- package/dist/src/plugins/js/hasher/hasher.js +0 -51
- package/dist/src/plugins/js/index.d.ts +0 -4
- package/dist/src/plugins/js/index.js +0 -201
- package/dist/src/plugins/js/lock-file/bun-parser.d.ts +0 -14
- package/dist/src/plugins/js/lock-file/bun-parser.js +0 -992
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +0 -85
- package/dist/src/plugins/js/lock-file/lock-file.js +0 -442
- package/dist/src/plugins/js/lock-file/npm-parser.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/npm-parser.js +0 -595
- package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +0 -1047
- package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +0 -35
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +0 -290
- package/dist/src/plugins/js/lock-file/pruned-output.d.ts +0 -330
- package/dist/src/plugins/js/lock-file/pruned-output.js +0 -1441
- package/dist/src/plugins/js/lock-file/utils/package-json.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/utils/package-json.js +0 -38
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +0 -21
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +0 -875
- package/dist/src/plugins/js/lock-file/yarn-parser.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/yarn-parser.js +0 -536
- package/dist/src/plugins/js/package-json/create-package-json.d.ts +0 -29
- package/dist/src/plugins/js/package-json/create-package-json.js +0 -312
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +0 -3
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +0 -150
- package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/affected/npm-packages.js +0 -124
- package/dist/src/plugins/js/project-graph/affected/touched-projects.d.ts +0 -2
- package/dist/src/plugins/js/project-graph/affected/touched-projects.js +0 -18
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +0 -63
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +0 -6
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +0 -45
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +0 -88
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +0 -75
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +0 -81
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +0 -464
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +0 -2
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +0 -31
- package/dist/src/plugins/js/utils/config.d.ts +0 -2
- package/dist/src/plugins/js/utils/config.js +0 -61
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts +0 -2
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.js +0 -13
- package/dist/src/plugins/js/utils/packages.d.ts +0 -8
- package/dist/src/plugins/js/utils/packages.js +0 -91
- package/dist/src/plugins/js/utils/register.d.ts +0 -350
- package/dist/src/plugins/js/utils/register.js +0 -1270
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.d.ts +0 -5
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.js +0 -17
- package/dist/src/plugins/js/utils/typescript.d.ts +0 -32
- package/dist/src/plugins/js/utils/typescript.js +0 -157
- package/dist/src/plugins/js/versions.d.ts +0 -1
- package/dist/src/plugins/js/versions.js +0 -4
- package/dist/src/plugins/package-json/create-nodes.d.ts +0 -28
- package/dist/src/plugins/package-json/create-nodes.js +0 -243
- package/dist/src/plugins/package-json/index.d.ts +0 -2
- package/dist/src/plugins/package-json/index.js +0 -6
- package/dist/src/plugins/project-json/build-nodes/project-json.d.ts +0 -5
- package/dist/src/plugins/project-json/build-nodes/project-json.js +0 -33
- package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +0 -11
- package/dist/src/project-graph/affected/affected-project-graph-models.js +0 -2
- package/dist/src/project-graph/affected/affected-project-graph.d.ts +0 -4
- package/dist/src/project-graph/affected/affected-project-graph.js +0 -90
- package/dist/src/project-graph/affected/locators/project-glob-changes.d.ts +0 -2
- package/dist/src/project-graph/affected/locators/project-glob-changes.js +0 -47
- package/dist/src/project-graph/affected/locators/workspace-json-changes.d.ts +0 -4
- package/dist/src/project-graph/affected/locators/workspace-json-changes.js +0 -47
- package/dist/src/project-graph/affected/locators/workspace-projects.d.ts +0 -3
- package/dist/src/project-graph/affected/locators/workspace-projects.js +0 -74
- package/dist/src/project-graph/build-project-graph.d.ts +0 -26
- package/dist/src/project-graph/build-project-graph.js +0 -309
- package/dist/src/project-graph/error-types.d.ts +0 -151
- package/dist/src/project-graph/error-types.js +0 -484
- package/dist/src/project-graph/file-map-utils.d.ts +0 -18
- package/dist/src/project-graph/file-map-utils.js +0 -61
- package/dist/src/project-graph/file-utils.d.ts +0 -31
- package/dist/src/project-graph/file-utils.js +0 -187
- package/dist/src/project-graph/nx-deps-cache.d.ts +0 -62
- package/dist/src/project-graph/nx-deps-cache.js +0 -345
- package/dist/src/project-graph/operators.d.ts +0 -11
- package/dist/src/project-graph/operators.js +0 -70
- package/dist/src/project-graph/plugins/get-plugins.d.ts +0 -51
- package/dist/src/project-graph/plugins/get-plugins.js +0 -401
- package/dist/src/project-graph/plugins/in-process-loader.d.ts +0 -10
- package/dist/src/project-graph/plugins/in-process-loader.js +0 -61
- package/dist/src/project-graph/plugins/index.d.ts +0 -4
- package/dist/src/project-graph/plugins/index.js +0 -12
- package/dist/src/project-graph/plugins/isolation/enabled.d.ts +0 -1
- package/dist/src/project-graph/plugins/isolation/enabled.js +0 -19
- package/dist/src/project-graph/plugins/isolation/index.d.ts +0 -1
- package/dist/src/project-graph/plugins/isolation/index.js +0 -5
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +0 -79
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +0 -553
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +0 -3
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.js +0 -24
- package/dist/src/project-graph/plugins/isolation/message-types.d.ts +0 -59
- package/dist/src/project-graph/plugins/isolation/message-types.js +0 -9
- package/dist/src/project-graph/plugins/isolation/messaging.d.ts +0 -155
- package/dist/src/project-graph/plugins/isolation/messaging.js +0 -87
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +0 -82
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.js +0 -188
- package/dist/src/project-graph/plugins/isolation/plugin-worker.d.ts +0 -2
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +0 -221
- package/dist/src/project-graph/plugins/isolation/worker-streaming.d.ts +0 -14
- package/dist/src/project-graph/plugins/isolation/worker-streaming.js +0 -39
- package/dist/src/project-graph/plugins/load-resolved-plugin.d.ts +0 -3
- package/dist/src/project-graph/plugins/load-resolved-plugin.js +0 -24
- package/dist/src/project-graph/plugins/loaded-nx-plugin.d.ts +0 -41
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +0 -104
- package/dist/src/project-graph/plugins/public-api.d.ts +0 -139
- package/dist/src/project-graph/plugins/public-api.js +0 -4
- package/dist/src/project-graph/plugins/resolve-plugin.d.ts +0 -25
- package/dist/src/project-graph/plugins/resolve-plugin.js +0 -277
- package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +0 -3
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +0 -67
- package/dist/src/project-graph/plugins/transpiler.d.ts +0 -20
- package/dist/src/project-graph/plugins/transpiler.js +0 -99
- package/dist/src/project-graph/plugins/utils.d.ts +0 -4
- package/dist/src/project-graph/plugins/utils.js +0 -32
- package/dist/src/project-graph/project-graph-builder.d.ts +0 -133
- package/dist/src/project-graph/project-graph-builder.js +0 -395
- package/dist/src/project-graph/project-graph.d.ts +0 -54
- package/dist/src/project-graph/project-graph.js +0 -460
- package/dist/src/project-graph/utils/build-all-workspace-files.d.ts +0 -2
- package/dist/src/project-graph/utils/build-all-workspace-files.js +0 -14
- package/dist/src/project-graph/utils/find-project-for-path.d.ts +0 -20
- package/dist/src/project-graph/utils/find-project-for-path.js +0 -55
- package/dist/src/project-graph/utils/implicit-project-dependencies.d.ts +0 -3
- package/dist/src/project-graph/utils/implicit-project-dependencies.js +0 -18
- package/dist/src/project-graph/utils/normalize-project-nodes.d.ts +0 -6
- package/dist/src/project-graph/utils/normalize-project-nodes.js +0 -117
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +0 -48
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +0 -270
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +0 -49
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +0 -296
- package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +0 -34
- package/dist/src/project-graph/utils/project-configuration/source-maps.js +0 -85
- package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +0 -50
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +0 -466
- package/dist/src/project-graph/utils/project-configuration/target-merging.d.ts +0 -32
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +0 -507
- package/dist/src/project-graph/utils/project-configuration/target-normalization.d.ts +0 -12
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +0 -313
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +0 -38
- package/dist/src/project-graph/utils/project-configuration/utils.js +0 -215
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +0 -86
- package/dist/src/project-graph/utils/project-configuration-utils.js +0 -325
- package/dist/src/project-graph/utils/retrieve-workspace-files.d.ts +0 -35
- package/dist/src/project-graph/utils/retrieve-workspace-files.js +0 -110
- package/dist/src/tasks-runner/batch/batch-messages.d.ts +0 -35
- package/dist/src/tasks-runner/batch/batch-messages.js +0 -9
- package/dist/src/tasks-runner/batch/run-batch.d.ts +0 -1
- package/dist/src/tasks-runner/batch/run-batch.js +0 -78
- package/dist/src/tasks-runner/cache.d.ts +0 -94
- package/dist/src/tasks-runner/cache.js +0 -604
- package/dist/src/tasks-runner/create-task-graph.d.ts +0 -41
- package/dist/src/tasks-runner/create-task-graph.js +0 -305
- package/dist/src/tasks-runner/default-tasks-runner.d.ts +0 -25
- package/dist/src/tasks-runner/default-tasks-runner.js +0 -74
- package/dist/src/tasks-runner/fork.d.ts +0 -1
- package/dist/src/tasks-runner/fork.js +0 -73
- package/dist/src/tasks-runner/forked-process-task-runner.d.ts +0 -42
- package/dist/src/tasks-runner/forked-process-task-runner.js +0 -299
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +0 -7
- package/dist/src/tasks-runner/init-tasks-runner.js +0 -86
- package/dist/src/tasks-runner/is-tui-enabled.d.ts +0 -18
- package/dist/src/tasks-runner/is-tui-enabled.js +0 -93
- package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +0 -18
- package/dist/src/tasks-runner/legacy-depends-on-warning.js +0 -109
- package/dist/src/tasks-runner/life-cycle.d.ts +0 -86
- package/dist/src/tasks-runner/life-cycle.js +0 -148
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +0 -25
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +0 -366
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +0 -24
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +0 -238
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +0 -5
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +0 -16
- package/dist/src/tasks-runner/life-cycles/formatting-utils.d.ts +0 -3
- package/dist/src/tasks-runner/life-cycles/formatting-utils.js +0 -55
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +0 -13
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +0 -67
- package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +0 -173
- package/dist/src/tasks-runner/life-cycles/performance-analysis.js +0 -508
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +0 -59
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +0 -193
- package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +0 -77
- package/dist/src/tasks-runner/life-cycles/performance-report.js +0 -428
- package/dist/src/tasks-runner/life-cycles/pretty-time.d.ts +0 -4
- package/dist/src/tasks-runner/life-cycles/pretty-time.js +0 -73
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +0 -54
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +0 -203
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +0 -54
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +0 -193
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +0 -17
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.js +0 -87
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +0 -11
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +0 -91
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +0 -16
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.js +0 -112
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +0 -14
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.js +0 -73
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts +0 -6
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.js +0 -17
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts +0 -9
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.js +0 -42
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +0 -8
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.js +0 -39
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +0 -19
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +0 -339
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.d.ts +0 -1
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.js +0 -15
- package/dist/src/tasks-runner/process-metrics-service.d.ts +0 -53
- package/dist/src/tasks-runner/process-metrics-service.js +0 -161
- package/dist/src/tasks-runner/pseudo-ipc.d.ts +0 -48
- package/dist/src/tasks-runner/pseudo-ipc.js +0 -157
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +0 -72
- package/dist/src/tasks-runner/pseudo-terminal.js +0 -209
- package/dist/src/tasks-runner/remove-old-cache-records.d.ts +0 -1
- package/dist/src/tasks-runner/remove-old-cache-records.js +0 -60
- package/dist/src/tasks-runner/run-command.d.ts +0 -42
- package/dist/src/tasks-runner/run-command.js +0 -895
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +0 -74
- package/dist/src/tasks-runner/running-tasks/batch-process.js +0 -263
- package/dist/src/tasks-runner/running-tasks/node-child-process.d.ts +0 -40
- package/dist/src/tasks-runner/running-tasks/node-child-process.js +0 -175
- package/dist/src/tasks-runner/running-tasks/noop-child-process.d.ts +0 -16
- package/dist/src/tasks-runner/running-tasks/noop-child-process.js +0 -22
- package/dist/src/tasks-runner/running-tasks/output-prefix.d.ts +0 -13
- package/dist/src/tasks-runner/running-tasks/output-prefix.js +0 -63
- package/dist/src/tasks-runner/running-tasks/running-task.d.ts +0 -11
- package/dist/src/tasks-runner/running-tasks/running-task.js +0 -6
- package/dist/src/tasks-runner/running-tasks/shared-running-task.d.ts +0 -14
- package/dist/src/tasks-runner/running-tasks/shared-running-task.js +0 -30
- package/dist/src/tasks-runner/task-env-paths.d.ts +0 -1
- package/dist/src/tasks-runner/task-env-paths.js +0 -45
- package/dist/src/tasks-runner/task-env.d.ts +0 -56
- package/dist/src/tasks-runner/task-env.js +0 -237
- package/dist/src/tasks-runner/task-graph-utils.d.ts +0 -30
- package/dist/src/tasks-runner/task-graph-utils.js +0 -225
- package/dist/src/tasks-runner/task-io-service.d.ts +0 -96
- package/dist/src/tasks-runner/task-io-service.js +0 -122
- package/dist/src/tasks-runner/task-orchestrator.d.ts +0 -260
- package/dist/src/tasks-runner/task-orchestrator.js +0 -1521
- package/dist/src/tasks-runner/tasks-runner.d.ts +0 -24
- package/dist/src/tasks-runner/tasks-runner.js +0 -2
- package/dist/src/tasks-runner/tasks-schedule.d.ts +0 -48
- package/dist/src/tasks-runner/tasks-schedule.js +0 -258
- package/dist/src/tasks-runner/utils.d.ts +0 -61
- package/dist/src/tasks-runner/utils.js +0 -447
- package/dist/src/utils/ab-testing.d.ts +0 -59
- package/dist/src/utils/ab-testing.js +0 -142
- package/dist/src/utils/acknowledge-build-scripts.d.ts +0 -13
- package/dist/src/utils/acknowledge-build-scripts.js +0 -102
- package/dist/src/utils/all-file-data.d.ts +0 -2
- package/dist/src/utils/all-file-data.js +0 -8
- package/dist/src/utils/analytics-enabled.d.ts +0 -7
- package/dist/src/utils/analytics-enabled.js +0 -11
- package/dist/src/utils/analytics-prompt.d.ts +0 -9
- package/dist/src/utils/analytics-prompt.js +0 -81
- package/dist/src/utils/assert-workspace-validity.d.ts +0 -3
- package/dist/src/utils/assert-workspace-validity.js +0 -90
- package/dist/src/utils/async-iterator.d.ts +0 -2
- package/dist/src/utils/async-iterator.js +0 -18
- package/dist/src/utils/binary-extensions.d.ts +0 -1
- package/dist/src/utils/binary-extensions.js +0 -279
- package/dist/src/utils/cache-directory.d.ts +0 -68
- package/dist/src/utils/cache-directory.js +0 -337
- package/dist/src/utils/call-sites.d.ts +0 -14
- package/dist/src/utils/call-sites.js +0 -28
- package/dist/src/utils/catalog/bun-manager-utils.d.ts +0 -8
- package/dist/src/utils/catalog/bun-manager-utils.js +0 -174
- package/dist/src/utils/catalog/bun-manager.d.ts +0 -28
- package/dist/src/utils/catalog/bun-manager.js +0 -130
- package/dist/src/utils/catalog/index.d.ts +0 -22
- package/dist/src/utils/catalog/index.js +0 -87
- package/dist/src/utils/catalog/manager-factory.d.ts +0 -5
- package/dist/src/utils/catalog/manager-factory.js +0 -23
- package/dist/src/utils/catalog/manager-utils.d.ts +0 -15
- package/dist/src/utils/catalog/manager-utils.js +0 -237
- package/dist/src/utils/catalog/manager.d.ts +0 -52
- package/dist/src/utils/catalog/manager.js +0 -43
- package/dist/src/utils/catalog/pnpm-manager.d.ts +0 -23
- package/dist/src/utils/catalog/pnpm-manager.js +0 -142
- package/dist/src/utils/catalog/types.d.ts +0 -15
- package/dist/src/utils/catalog/types.js +0 -2
- package/dist/src/utils/catalog/yarn-manager.d.ts +0 -26
- package/dist/src/utils/catalog/yarn-manager.js +0 -130
- package/dist/src/utils/child-process.d.ts +0 -52
- package/dist/src/utils/child-process.js +0 -194
- package/dist/src/utils/chunkify.d.ts +0 -17
- package/dist/src/utils/chunkify.js +0 -51
- package/dist/src/utils/code-frames.d.ts +0 -14
- package/dist/src/utils/code-frames.js +0 -116
- package/dist/src/utils/collapse-expanded-outputs.d.ts +0 -10
- package/dist/src/utils/collapse-expanded-outputs.js +0 -72
- package/dist/src/utils/command-line-utils.d.ts +0 -57
- package/dist/src/utils/command-line-utils.js +0 -259
- package/dist/src/utils/compile-cache.d.ts +0 -24
- package/dist/src/utils/compile-cache.js +0 -49
- package/dist/src/utils/consume-messages-from-socket.d.ts +0 -44
- package/dist/src/utils/consume-messages-from-socket.js +0 -291
- package/dist/src/utils/db-connection.d.ts +0 -14
- package/dist/src/utils/db-connection.js +0 -56
- package/dist/src/utils/default-base.d.ts +0 -1
- package/dist/src/utils/default-base.js +0 -17
- package/dist/src/utils/delayed-spinner.d.ts +0 -51
- package/dist/src/utils/delayed-spinner.js +0 -88
- package/dist/src/utils/dotenv.d.ts +0 -7
- package/dist/src/utils/dotenv.js +0 -19
- package/dist/src/utils/enable-compile-cache.d.ts +0 -1
- package/dist/src/utils/enable-compile-cache.js +0 -7
- package/dist/src/utils/exit-codes.d.ts +0 -24
- package/dist/src/utils/exit-codes.js +0 -94
- package/dist/src/utils/fileutils.d.ts +0 -72
- package/dist/src/utils/fileutils.js +0 -117
- package/dist/src/utils/find-matching-projects.d.ts +0 -18
- package/dist/src/utils/find-matching-projects.js +0 -222
- package/dist/src/utils/find-workspace-root.d.ts +0 -11
- package/dist/src/utils/find-workspace-root.js +0 -33
- package/dist/src/utils/formatters/index.d.ts +0 -13
- package/dist/src/utils/formatters/index.js +0 -74
- package/dist/src/utils/formatters/oxfmt.d.ts +0 -32
- package/dist/src/utils/formatters/oxfmt.js +0 -764
- package/dist/src/utils/formatters/prettier.d.ts +0 -26
- package/dist/src/utils/formatters/prettier.js +0 -201
- package/dist/src/utils/formatters/shared.d.ts +0 -5
- package/dist/src/utils/formatters/shared.js +0 -8
- package/dist/src/utils/get-package-name-from-import-path.d.ts +0 -1
- package/dist/src/utils/get-package-name-from-import-path.js +0 -17
- package/dist/src/utils/git-revision.d.ts +0 -12
- package/dist/src/utils/git-revision.js +0 -25
- package/dist/src/utils/git-utils.d.ts +0 -106
- package/dist/src/utils/git-utils.index-filter.d.ts +0 -1
- package/dist/src/utils/git-utils.index-filter.js +0 -23
- package/dist/src/utils/git-utils.js +0 -933
- package/dist/src/utils/git-utils.tree-filter.d.ts +0 -1
- package/dist/src/utils/git-utils.tree-filter.js +0 -47
- package/dist/src/utils/git-worktrees.d.ts +0 -30
- package/dist/src/utils/git-worktrees.js +0 -212
- package/dist/src/utils/globs.d.ts +0 -3
- package/dist/src/utils/globs.js +0 -18
- package/dist/src/utils/handle-errors.d.ts +0 -1
- package/dist/src/utils/handle-errors.js +0 -91
- package/dist/src/utils/handle-import.d.ts +0 -15
- package/dist/src/utils/handle-import.js +0 -86
- package/dist/src/utils/has-nx-js-plugin.d.ts +0 -9
- package/dist/src/utils/has-nx-js-plugin.js +0 -24
- package/dist/src/utils/ignore.d.ts +0 -178
- package/dist/src/utils/ignore.js +0 -294
- package/dist/src/utils/installation-directory.d.ts +0 -2
- package/dist/src/utils/installation-directory.js +0 -12
- package/dist/src/utils/installed-nx-version.d.ts +0 -23
- package/dist/src/utils/installed-nx-version.js +0 -113
- package/dist/src/utils/is-ci.d.ts +0 -1
- package/dist/src/utils/is-ci.js +0 -26
- package/dist/src/utils/is-sandbox.d.ts +0 -1
- package/dist/src/utils/is-sandbox.js +0 -11
- package/dist/src/utils/json-diff.d.ts +0 -18
- package/dist/src/utils/json-diff.js +0 -112
- package/dist/src/utils/json.d.ts +0 -44
- package/dist/src/utils/json.js +0 -62
- package/dist/src/utils/kill-child-on-host-exit.d.ts +0 -7
- package/dist/src/utils/kill-child-on-host-exit.js +0 -42
- package/dist/src/utils/legacy-task-history.d.ts +0 -8
- package/dist/src/utils/legacy-task-history.js +0 -87
- package/dist/src/utils/logger.d.ts +0 -23
- package/dist/src/utils/logger.js +0 -74
- package/dist/src/utils/long-running-target.d.ts +0 -10
- package/dist/src/utils/long-running-target.js +0 -19
- package/dist/src/utils/machine-id-cache.d.ts +0 -5
- package/dist/src/utils/machine-id-cache.js +0 -93
- package/dist/src/utils/min-release-age/behavior/bun.d.ts +0 -30
- package/dist/src/utils/min-release-age/behavior/bun.js +0 -274
- package/dist/src/utils/min-release-age/behavior/npm.d.ts +0 -21
- package/dist/src/utils/min-release-age/behavior/npm.js +0 -296
- package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +0 -23
- package/dist/src/utils/min-release-age/behavior/pnpm.js +0 -527
- package/dist/src/utils/min-release-age/behavior/yarn.d.ts +0 -22
- package/dist/src/utils/min-release-age/behavior/yarn.js +0 -314
- package/dist/src/utils/min-release-age/constants.d.ts +0 -3
- package/dist/src/utils/min-release-age/constants.js +0 -8
- package/dist/src/utils/min-release-age/errors.d.ts +0 -28
- package/dist/src/utils/min-release-age/errors.js +0 -22
- package/dist/src/utils/min-release-age/packument.d.ts +0 -13
- package/dist/src/utils/min-release-age/packument.js +0 -34
- package/dist/src/utils/min-release-age/pick.d.ts +0 -72
- package/dist/src/utils/min-release-age/pick.js +0 -206
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.d.ts +0 -12
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.js +0 -58
- package/dist/src/utils/min-release-age/policy.d.ts +0 -38
- package/dist/src/utils/min-release-age/policy.js +0 -59
- package/dist/src/utils/min-release-age/resolve.d.ts +0 -8
- package/dist/src/utils/min-release-age/resolve.js +0 -14
- package/dist/src/utils/nx-cloud-utils.d.ts +0 -4
- package/dist/src/utils/nx-cloud-utils.js +0 -28
- package/dist/src/utils/nx-console-prompt.d.ts +0 -1
- package/dist/src/utils/nx-console-prompt.js +0 -61
- package/dist/src/utils/nx-key.d.ts +0 -6
- package/dist/src/utils/nx-key.js +0 -50
- package/dist/src/utils/nx-package-group.d.ts +0 -8
- package/dist/src/utils/nx-package-group.js +0 -15
- package/dist/src/utils/nx-tmp-dir.d.ts +0 -23
- package/dist/src/utils/nx-tmp-dir.js +0 -45
- package/dist/src/utils/object-sort.d.ts +0 -1
- package/dist/src/utils/object-sort.js +0 -9
- package/dist/src/utils/output.d.ts +0 -232
- package/dist/src/utils/output.js +0 -548
- package/dist/src/utils/owned-private-dir.d.ts +0 -145
- package/dist/src/utils/owned-private-dir.js +0 -362
- package/dist/src/utils/package-json.d.ts +0 -231
- package/dist/src/utils/package-json.js +0 -387
- package/dist/src/utils/package-manager-config/bunfig.d.ts +0 -14
- package/dist/src/utils/package-manager-config/bunfig.js +0 -49
- package/dist/src/utils/package-manager-config/npmrc.d.ts +0 -23
- package/dist/src/utils/package-manager-config/npmrc.js +0 -124
- package/dist/src/utils/package-manager-config/pnpm-config.d.ts +0 -17
- package/dist/src/utils/package-manager-config/pnpm-config.js +0 -60
- package/dist/src/utils/package-manager.d.ts +0 -161
- package/dist/src/utils/package-manager.js +0 -850
- package/dist/src/utils/params.d.ts +0 -146
- package/dist/src/utils/params.js +0 -768
- package/dist/src/utils/path.d.ts +0 -19
- package/dist/src/utils/path.js +0 -38
- package/dist/src/utils/perf-hooks.d.ts +0 -19
- package/dist/src/utils/perf-logging.d.ts +0 -1
- package/dist/src/utils/perf-logging.js +0 -46
- package/dist/src/utils/permission-errors.d.ts +0 -11
- package/dist/src/utils/permission-errors.js +0 -17
- package/dist/src/utils/plugin-cache-utils.d.ts +0 -82
- package/dist/src/utils/plugin-cache-utils.js +0 -212
- package/dist/src/utils/plugin-progress-text.d.ts +0 -1
- package/dist/src/utils/plugin-progress-text.js +0 -15
- package/dist/src/utils/plugins/atomizer-utils.d.ts +0 -11
- package/dist/src/utils/plugins/atomizer-utils.js +0 -23
- package/dist/src/utils/plugins/core-plugins.d.ts +0 -6
- package/dist/src/utils/plugins/core-plugins.js +0 -117
- package/dist/src/utils/plugins/index.d.ts +0 -5
- package/dist/src/utils/plugins/index.js +0 -15
- package/dist/src/utils/plugins/installed-plugins.d.ts +0 -5
- package/dist/src/utils/plugins/installed-plugins.js +0 -76
- package/dist/src/utils/plugins/local-plugins.d.ts +0 -22
- package/dist/src/utils/plugins/local-plugins.js +0 -60
- package/dist/src/utils/plugins/output.d.ts +0 -34
- package/dist/src/utils/plugins/output.js +0 -201
- package/dist/src/utils/plugins/plugin-capabilities.d.ts +0 -15
- package/dist/src/utils/plugins/plugin-capabilities.js +0 -78
- package/dist/src/utils/pnpm-workspace.d.ts +0 -8
- package/dist/src/utils/pnpm-workspace.js +0 -2
- package/dist/src/utils/print-help.d.ts +0 -11
- package/dist/src/utils/print-help.js +0 -259
- package/dist/src/utils/progress-topics.d.ts +0 -19
- package/dist/src/utils/progress-topics.js +0 -21
- package/dist/src/utils/project-graph-utils.d.ts +0 -18
- package/dist/src/utils/project-graph-utils.js +0 -78
- package/dist/src/utils/promised-based-queue.d.ts +0 -6
- package/dist/src/utils/promised-based-queue.js +0 -43
- package/dist/src/utils/prompt-helpers.d.ts +0 -53
- package/dist/src/utils/prompt-helpers.js +0 -111
- package/dist/src/utils/provenance.d.ts +0 -47
- package/dist/src/utils/provenance.js +0 -107
- package/dist/src/utils/registry-config/bun.d.ts +0 -2
- package/dist/src/utils/registry-config/bun.js +0 -257
- package/dist/src/utils/registry-config/index.d.ts +0 -13
- package/dist/src/utils/registry-config/index.js +0 -102
- package/dist/src/utils/registry-config/pnpm.d.ts +0 -2
- package/dist/src/utils/registry-config/pnpm.js +0 -1551
- package/dist/src/utils/registry-config/utils.d.ts +0 -195
- package/dist/src/utils/registry-config/utils.js +0 -496
- package/dist/src/utils/registry-config/yarn-berry.d.ts +0 -2
- package/dist/src/utils/registry-config/yarn-berry.js +0 -612
- package/dist/src/utils/registry-config/yarn-classic.d.ts +0 -2
- package/dist/src/utils/registry-config/yarn-classic.js +0 -1001
- package/dist/src/utils/require-nx-key.d.ts +0 -1
- package/dist/src/utils/require-nx-key.js +0 -23
- package/dist/src/utils/safe-spawn.d.ts +0 -24
- package/dist/src/utils/safe-spawn.js +0 -104
- package/dist/src/utils/serializable-error.d.ts +0 -4
- package/dist/src/utils/serializable-error.js +0 -33
- package/dist/src/utils/serialize-overrides-into-command-line.d.ts +0 -3
- package/dist/src/utils/serialize-overrides-into-command-line.js +0 -41
- package/dist/src/utils/serialize-target.d.ts +0 -1
- package/dist/src/utils/serialize-target.js +0 -6
- package/dist/src/utils/shell-quoting.d.ts +0 -25
- package/dist/src/utils/shell-quoting.js +0 -76
- package/dist/src/utils/socket-refused-exit-code.d.ts +0 -15
- package/dist/src/utils/socket-refused-exit-code.js +0 -18
- package/dist/src/utils/spinner.d.ts +0 -24
- package/dist/src/utils/spinner.js +0 -77
- package/dist/src/utils/split-target.d.ts +0 -15
- package/dist/src/utils/split-target.js +0 -239
- package/dist/src/utils/strip-indents.d.ts +0 -14
- package/dist/src/utils/strip-indents.js +0 -23
- package/dist/src/utils/sync-generators.d.ts +0 -66
- package/dist/src/utils/sync-generators.js +0 -355
- package/dist/src/utils/tar.d.ts +0 -8
- package/dist/src/utils/tar.js +0 -44
- package/dist/src/utils/task-history.d.ts +0 -17
- package/dist/src/utils/task-history.js +0 -51
- package/dist/src/utils/terminal-link.d.ts +0 -20
- package/dist/src/utils/terminal-link.js +0 -85
- package/dist/src/utils/update-nxw.d.ts +0 -2
- package/dist/src/utils/update-nxw.js +0 -22
- package/dist/src/utils/versions.d.ts +0 -1
- package/dist/src/utils/versions.js +0 -4
- package/dist/src/utils/wait-for-socket-connection.d.ts +0 -26
- package/dist/src/utils/wait-for-socket-connection.js +0 -59
- package/dist/src/utils/workspace-context.d.ts +0 -21
- package/dist/src/utils/workspace-context.js +0 -120
- package/dist/src/utils/workspace-id.d.ts +0 -20
- package/dist/src/utils/workspace-id.js +0 -54
- package/dist/src/utils/workspace-root.d.ts +0 -6
- package/dist/src/utils/workspace-root.js +0 -40
- package/dist/src/utils/write-formatted-json-file.d.ts +0 -7
- package/dist/src/utils/write-formatted-json-file.js +0 -24
- package/dist/src/utils/yarn-syml/index.d.ts +0 -23
- package/dist/src/utils/yarn-syml/index.js +0 -151
- package/dist/src/utils/yarn-syml/syml-grammar.js +0 -1911
- package/dist/tasks-runners/default.d.ts +0 -1
- package/dist/tasks-runners/default.js +0 -5
- package/executors.json +0 -19
- package/generators.json +0 -16
- package/migrations.json +0 -195
- package/schemas/migrations-schema.json +0 -186
- package/schemas/nx-schema.json +0 -1615
- package/schemas/project-schema.json +0 -426
- package/schemas/workspace-schema.json +0 -185
|
@@ -1,1441 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LOCAL_PATH_MODULES_DIR = exports.PNPM_LOCKFILE_RESOLUTION_CONFIG_FIELDS = void 0;
|
|
4
|
-
exports.stripPrunedLockfilePnpmConfig = stripPrunedLockfilePnpmConfig;
|
|
5
|
-
exports.dropInheritedPnpmPatchedDependencies = dropInheritedPnpmPatchedDependencies;
|
|
6
|
-
exports.getPrunedPnpmInstallSettingsYaml = getPrunedPnpmInstallSettingsYaml;
|
|
7
|
-
exports.normalizePrunedPatchPath = normalizePrunedPatchPath;
|
|
8
|
-
exports.getPrunedPnpmPackageJsonBuildSettings = getPrunedPnpmPackageJsonBuildSettings;
|
|
9
|
-
exports.getPrunedPnpmPatchArtifacts = getPrunedPnpmPatchArtifacts;
|
|
10
|
-
exports.containLocalPath = containLocalPath;
|
|
11
|
-
exports.uncontainLocalPath = uncontainLocalPath;
|
|
12
|
-
exports.normalizeLocalPathSpec = normalizeLocalPathSpec;
|
|
13
|
-
exports.uncontainLocalPathSpec = uncontainLocalPathSpec;
|
|
14
|
-
exports.warnOnWorkspaceModulePathCollision = warnOnWorkspaceModulePathCollision;
|
|
15
|
-
exports.containShippedLocalFilePaths = containShippedLocalFilePaths;
|
|
16
|
-
exports.containShippedLocalLinkRefs = containShippedLocalLinkRefs;
|
|
17
|
-
exports.getPrunedPnpmLocalPathArtifacts = getPrunedPnpmLocalPathArtifacts;
|
|
18
|
-
exports.validatePrunedLocalPathClosure = validatePrunedLocalPathClosure;
|
|
19
|
-
exports.relocatePrunedLocalPathSpec = relocatePrunedLocalPathSpec;
|
|
20
|
-
exports.warnIncompletePrunedPnpmOutput = warnIncompletePrunedPnpmOutput;
|
|
21
|
-
exports.warnUnshippableLocalPathSpec = warnUnshippableLocalPathSpec;
|
|
22
|
-
exports.movePeerDependencyToDependencies = movePeerDependencyToDependencies;
|
|
23
|
-
exports.dropEmptyPeerDependencySections = dropEmptyPeerDependencySections;
|
|
24
|
-
exports.rewritePrunedLocalPathSpecifiers = rewritePrunedLocalPathSpecifiers;
|
|
25
|
-
exports.getPrunedPnpmInstallArtifacts = getPrunedPnpmInstallArtifacts;
|
|
26
|
-
const fs_1 = require("fs");
|
|
27
|
-
const path_1 = require("path");
|
|
28
|
-
const catalog_1 = require("../../../utils/catalog");
|
|
29
|
-
const fileutils_1 = require("../../../utils/fileutils");
|
|
30
|
-
const logger_1 = require("../../../utils/logger");
|
|
31
|
-
const output_1 = require("../../../utils/output");
|
|
32
|
-
const package_manager_1 = require("../../../utils/package-manager");
|
|
33
|
-
const path_2 = require("../../../utils/path");
|
|
34
|
-
const workspace_root_1 = require("../../../utils/workspace-root");
|
|
35
|
-
const pnpm_normalizer_1 = require("./utils/pnpm-normalizer");
|
|
36
|
-
/**
|
|
37
|
-
* The resolution-time pnpm config a pruned standalone output must not carry,
|
|
38
|
-
* with the name each emitted file gives it: `manifest` is the `pnpm.*` key in
|
|
39
|
-
* `package.json`, `lockfile` the top-level lockfile key, and `null` means that
|
|
40
|
-
* file never declares the field. The two names differ often enough
|
|
41
|
-
* (`packageExtensions` against `packageExtensionsChecksum`) that pairing them
|
|
42
|
-
* in one table is what keeps the manifest strip and the lockfile strip from
|
|
43
|
-
* drifting apart when pnpm adds a field.
|
|
44
|
-
*
|
|
45
|
-
* `patchedDependencies` is deliberately absent: it is filtered and re-declared
|
|
46
|
-
* against the shipped patch files rather than dropped.
|
|
47
|
-
*/
|
|
48
|
-
const PNPM_RESOLUTION_CONFIG = [
|
|
49
|
-
{ manifest: 'overrides', lockfile: 'overrides' },
|
|
50
|
-
{
|
|
51
|
-
manifest: 'ignoredOptionalDependencies',
|
|
52
|
-
lockfile: 'ignoredOptionalDependencies',
|
|
53
|
-
},
|
|
54
|
-
{ manifest: 'packageExtensions', lockfile: 'packageExtensionsChecksum' },
|
|
55
|
-
{ manifest: null, lockfile: 'pnpmfileChecksum' },
|
|
56
|
-
{ manifest: null, lockfile: 'settings' },
|
|
57
|
-
{ manifest: null, lockfile: 'catalogs' },
|
|
58
|
-
];
|
|
59
|
-
const PNPM_MANIFEST_RESOLUTION_CONFIG_FIELDS = PNPM_RESOLUTION_CONFIG.flatMap((field) => (field.manifest === null ? [] : [field.manifest]));
|
|
60
|
-
exports.PNPM_LOCKFILE_RESOLUTION_CONFIG_FIELDS = PNPM_RESOLUTION_CONFIG.map((field) => field.lockfile);
|
|
61
|
-
/**
|
|
62
|
-
* Drops the resolution-time pnpm config a pruned standalone lockfile already
|
|
63
|
-
* resolves into its snapshots, then drops an emptied `pnpm` block. Re-declaring
|
|
64
|
-
* it next to a pruned lockfile makes pnpm <=10 fail with
|
|
65
|
-
* ERR_PNPM_LOCKFILE_CONFIG_MISMATCH. Only for an actually pruned lockfile: the
|
|
66
|
-
* root-lockfile fallback keeps the config, which that lockfile still declares.
|
|
67
|
-
*
|
|
68
|
-
* Counterpart to `stripStandaloneLockfileConfig` in the pnpm lock-file parser,
|
|
69
|
-
* which drops the same fields from the generated lockfile.
|
|
70
|
-
*/
|
|
71
|
-
function stripPrunedLockfilePnpmConfig(packageJson) {
|
|
72
|
-
if (!packageJson.pnpm) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
for (const field of PNPM_MANIFEST_RESOLUTION_CONFIG_FIELDS) {
|
|
76
|
-
delete packageJson.pnpm[field];
|
|
77
|
-
}
|
|
78
|
-
if (Object.keys(packageJson.pnpm).length === 0) {
|
|
79
|
-
delete packageJson.pnpm;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Drops the `pnpm.patchedDependencies` the emitted manifest inherited from the
|
|
84
|
-
* project it was built from. The declaration a pruned output needs is the one
|
|
85
|
-
* `getPrunedPnpmPatchArtifacts` derives from the lockfile shipping beside it; an
|
|
86
|
-
* inherited one names the workspace's patch paths rather than the output's, and
|
|
87
|
-
* survives even when the output ships no patch file at all, which fails the
|
|
88
|
-
* install as pnpm hashes every declared patch. pnpm reads the field from the
|
|
89
|
-
* workspace root alone, so a project-level block was inert at home and cannot be
|
|
90
|
-
* trusted here either.
|
|
91
|
-
*/
|
|
92
|
-
function dropInheritedPnpmPatchedDependencies(packageJson) {
|
|
93
|
-
if (!packageJson.pnpm?.patchedDependencies) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
delete packageJson.pnpm.patchedDependencies;
|
|
97
|
-
if (Object.keys(packageJson.pnpm).length === 0) {
|
|
98
|
-
delete packageJson.pnpm;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Builds the settings-only pnpm-workspace.yaml every standalone pruned output
|
|
103
|
-
* ships. Unconditional because a conditional artifact cannot be retracted: a
|
|
104
|
-
* cache replay restores only the files the replayed entry holds and a bundler
|
|
105
|
-
* overwrites rather than cleans its output directory, so an earlier build's
|
|
106
|
-
* copy would survive and its stale settings would apply. A `packages: []`-only
|
|
107
|
-
* file is inert, verified installable with identical module resolution on
|
|
108
|
-
* pnpm 9, 10 and 11.
|
|
109
|
-
*
|
|
110
|
-
* pnpm 11+ reads build approvals (`allowBuilds`), `supportedArchitectures` and
|
|
111
|
-
* `patchedDependencies` only from pnpm-workspace.yaml, so those are carried
|
|
112
|
-
* from the workspace root; pass `prunedLockfileContent` to scope the approvals
|
|
113
|
-
* to the packages the pruned lockfile keeps (an approval for an absent package
|
|
114
|
-
* is inert either way, this only keeps the emitted file accurate). On
|
|
115
|
-
* pnpm <=10, which reads them from the emitted package.json instead (see
|
|
116
|
-
* `getPrunedPnpmPackageJsonBuildSettings`), or when the workspace declares
|
|
117
|
-
* none, the file holds only `packages: []`. Resolution-time config stays out:
|
|
118
|
-
* the pruned lockfile bakes it in (`stripPrunedLockfilePnpmConfig`).
|
|
119
|
-
*
|
|
120
|
-
* The major is the build machine's pnpm, which is all that is knowable at
|
|
121
|
-
* build time: an output built on pnpm <=10 but deployed on pnpm 11+ will not
|
|
122
|
-
* pick its approvals up. `precomputed` lets a caller pass the pnpm major and
|
|
123
|
-
* pruned patchedDependencies it already resolved instead of recomputing them.
|
|
124
|
-
*/
|
|
125
|
-
function getPrunedPnpmInstallSettingsYaml(workspaceRootPath = workspace_root_1.workspaceRoot, prunedLockfileContent, precomputed) {
|
|
126
|
-
const settings = getPrunedPnpmWorkspaceSettings(workspaceRootPath, prunedLockfileContent, precomputed) ?? {};
|
|
127
|
-
const { dump } = require('@zkochan/js-yaml');
|
|
128
|
-
// pnpm 9 rejects a pnpm-workspace.yaml without a `packages` field; an empty
|
|
129
|
-
// list is accepted by pnpm 9-11 without pulling any importer into the install.
|
|
130
|
-
return dump({ packages: [], ...settings });
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* The settings `getPrunedPnpmInstallSettingsYaml` emits, before serialization,
|
|
134
|
-
* so a caller can tell which of them the workspace actually declares. Null when
|
|
135
|
-
* the workspace declares none, or on a pnpm major that reads them from the
|
|
136
|
-
* emitted package.json instead.
|
|
137
|
-
*/
|
|
138
|
-
function getPrunedPnpmWorkspaceSettings(workspaceRootPath, prunedLockfileContent, precomputed) {
|
|
139
|
-
// pnpm 11 was the first major to read these settings only from
|
|
140
|
-
// pnpm-workspace.yaml; later majors keep that behavior. pnpm 10 and below
|
|
141
|
-
// still read them from the emitted package.json, so nothing to carry.
|
|
142
|
-
const pnpmMajor = resolvePnpmMajor(precomputed, workspaceRootPath);
|
|
143
|
-
if (pnpmMajor === null || pnpmMajor < 11) {
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
let rootSettings;
|
|
147
|
-
try {
|
|
148
|
-
const rootWorkspaceYaml = (0, path_1.join)(workspaceRootPath, 'pnpm-workspace.yaml');
|
|
149
|
-
if (!(0, fs_1.existsSync)(rootWorkspaceYaml)) {
|
|
150
|
-
return null;
|
|
151
|
-
}
|
|
152
|
-
// An empty or comment-only file parses to null/undefined; treat it as no
|
|
153
|
-
// settings rather than dereferencing it below.
|
|
154
|
-
rootSettings = (0, fileutils_1.readYamlFile)(rootWorkspaceYaml) ?? {};
|
|
155
|
-
}
|
|
156
|
-
catch {
|
|
157
|
-
// Unreadable or malformed pnpm-workspace.yaml: skip rather than guess.
|
|
158
|
-
logger_1.logger.warn('Could not read the workspace root pnpm-workspace.yaml; the pruned output will not declare pnpm install settings (build-script approvals, supportedArchitectures, patchedDependencies).');
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
|
-
const settings = {};
|
|
162
|
-
if (rootSettings.allowBuilds) {
|
|
163
|
-
const allowBuilds = prunedLockfileContent
|
|
164
|
-
? filterAllowBuildsToLockfile(rootSettings.allowBuilds, prunedLockfileContent)
|
|
165
|
-
: rootSettings.allowBuilds;
|
|
166
|
-
if (Object.keys(allowBuilds).length > 0) {
|
|
167
|
-
settings.allowBuilds = allowBuilds;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
if (rootSettings.supportedArchitectures) {
|
|
171
|
-
settings.supportedArchitectures = rootSettings.supportedArchitectures;
|
|
172
|
-
}
|
|
173
|
-
const patchedDependencies = precomputed?.patchedDependencies ??
|
|
174
|
-
(prunedLockfileContent
|
|
175
|
-
? getPrunedPatchedDependencies(workspaceRootPath, prunedLockfileContent)
|
|
176
|
-
: {});
|
|
177
|
-
if (Object.keys(patchedDependencies).length > 0) {
|
|
178
|
-
settings.patchedDependencies =
|
|
179
|
-
normalizePrunedPatchedDependencies(patchedDependencies);
|
|
180
|
-
}
|
|
181
|
-
return Object.keys(settings).length > 0 ? settings : null;
|
|
182
|
-
}
|
|
183
|
-
const pnpmMajorByWorkspaceRoot = new Map();
|
|
184
|
-
/**
|
|
185
|
-
* The pnpm major of the workspace's package manager, or null when it cannot be
|
|
186
|
-
* determined (unknown or unparseable version). Memoized per workspace root:
|
|
187
|
-
* `getPackageManagerVersion` re-reads the root manifest on every call and shells
|
|
188
|
-
* out to `pnpm --version` when it declares no `packageManager`, while the
|
|
189
|
-
* bundler plugins reach this once per compilation, so a watched build would pay
|
|
190
|
-
* it on every rebuild.
|
|
191
|
-
*/
|
|
192
|
-
function getPnpmMajor(workspaceRootPath) {
|
|
193
|
-
if (pnpmMajorByWorkspaceRoot.has(workspaceRootPath)) {
|
|
194
|
-
return pnpmMajorByWorkspaceRoot.get(workspaceRootPath);
|
|
195
|
-
}
|
|
196
|
-
let major;
|
|
197
|
-
try {
|
|
198
|
-
const parsed = Number.parseInt((0, package_manager_1.getPackageManagerVersion)('pnpm', workspaceRootPath).split('.')[0], 10);
|
|
199
|
-
major = Number.isNaN(parsed) ? null : parsed;
|
|
200
|
-
}
|
|
201
|
-
catch {
|
|
202
|
-
major = null;
|
|
203
|
-
}
|
|
204
|
-
// Only a successful detection is remembered: `getPackageManagerVersion`
|
|
205
|
-
// shells out when the root declares no `packageManager`, and caching one
|
|
206
|
-
// failed spawn would disable the pnpm settings for the rest of the process.
|
|
207
|
-
if (major !== null) {
|
|
208
|
-
pnpmMajorByWorkspaceRoot.set(workspaceRootPath, major);
|
|
209
|
-
}
|
|
210
|
-
return major;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* `getPnpmMajor` for the prune orchestrators: warns on an undeterminable
|
|
214
|
-
* version, since every version-gated install setting is skipped in that case.
|
|
215
|
-
*/
|
|
216
|
-
function getPnpmMajorOrWarn(workspaceRootPath) {
|
|
217
|
-
const pnpmMajor = getPnpmMajor(workspaceRootPath);
|
|
218
|
-
if (pnpmMajor === null) {
|
|
219
|
-
logger_1.logger.warn('Could not determine the pnpm version. The pruned output will not carry pnpm build-script approvals, supportedArchitectures, or patchedDependencies declarations; patch files still ship.');
|
|
220
|
-
}
|
|
221
|
-
return pnpmMajor;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* The pnpm major each install-settings builder works from. Probing is skipped
|
|
225
|
-
* whenever an orchestrator passed its own config, on the presence of that config
|
|
226
|
-
* rather than on the value: a precomputed `null` means the probe already failed
|
|
227
|
-
* and warned, and re-probing it here could disagree with what the sibling
|
|
228
|
-
* builders decided from that same `null`.
|
|
229
|
-
*/
|
|
230
|
-
function resolvePnpmMajor(precomputed, workspaceRootPath) {
|
|
231
|
-
return precomputed ? precomputed.pnpmMajor : getPnpmMajor(workspaceRootPath);
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Keeps only the `allowBuilds` entries whose package is present in the pruned
|
|
235
|
-
* lockfile. Build-script approvals for packages the prune dropped are inert, so
|
|
236
|
-
* dropping them keeps the emitted pnpm-workspace.yaml scoped to the deployment.
|
|
237
|
-
* Carries the approvals verbatim when `getBuildApprovalScopeNames` cannot
|
|
238
|
-
* determine that scope.
|
|
239
|
-
*/
|
|
240
|
-
function filterAllowBuildsToLockfile(allowBuilds, prunedLockfileContent) {
|
|
241
|
-
const present = getBuildApprovalScopeNames(prunedLockfileContent);
|
|
242
|
-
if (present === null) {
|
|
243
|
-
return allowBuilds;
|
|
244
|
-
}
|
|
245
|
-
const filtered = {};
|
|
246
|
-
for (const [name, allowed] of Object.entries(allowBuilds)) {
|
|
247
|
-
if (present.has(name)) {
|
|
248
|
-
filtered[name] = allowed;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return filtered;
|
|
252
|
-
}
|
|
253
|
-
let lastParsedPnpmLockfile = null;
|
|
254
|
-
/**
|
|
255
|
-
* Parses pnpm lockfile content, memoizing the last result: one prune run reads
|
|
256
|
-
* the same content for the patch scope, the build-script approvals, the
|
|
257
|
-
* local-path artifacts, and the link-closure validation, and a watch-mode
|
|
258
|
-
* rebuild re-reads an unchanged lockfile. The fallback path passes the root
|
|
259
|
-
* lockfile in, which pnpm 11 writes as two YAML documents for a package manager
|
|
260
|
-
* it persists (see `shouldPersistLockfile`), so the workspace document is
|
|
261
|
-
* extracted the way the pnpm lockfile parser does. Returns null when the content is not
|
|
262
|
-
* valid YAML or does not parse to an object. Consumers must not mutate the
|
|
263
|
-
* returned document.
|
|
264
|
-
*/
|
|
265
|
-
function parsePnpmLockfileYaml(content) {
|
|
266
|
-
if (lastParsedPnpmLockfile?.content !== content) {
|
|
267
|
-
// One failure disables three independent output-correctness steps at once,
|
|
268
|
-
// and the result is memoized, so it would stay invisible for the rest of
|
|
269
|
-
// the process.
|
|
270
|
-
const warnUnusable = (cause) => {
|
|
271
|
-
logger_1.logger.warn(`Could not parse the pnpm lockfile (${cause}); the pruned output will not carry patch declarations, local-path artifacts, or a validated link closure.`);
|
|
272
|
-
};
|
|
273
|
-
let parsed;
|
|
274
|
-
// A lockfile that opens a YAML document and never separates a second one
|
|
275
|
-
// extracts to nothing, which would otherwise read as an empty lockfile.
|
|
276
|
-
const document = (0, pnpm_normalizer_1.extractMainLockfileDocument)(content);
|
|
277
|
-
if (document.trim() === '' && content.trim() !== '') {
|
|
278
|
-
warnUnusable('it carries no lockfile document');
|
|
279
|
-
parsed = null;
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
try {
|
|
283
|
-
parsed = require('@zkochan/js-yaml').load(document) ?? {};
|
|
284
|
-
}
|
|
285
|
-
catch (e) {
|
|
286
|
-
warnUnusable(e instanceof Error ? e.message : String(e));
|
|
287
|
-
parsed = null;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
if (parsed !== null &&
|
|
291
|
-
(typeof parsed !== 'object' || Array.isArray(parsed))) {
|
|
292
|
-
warnUnusable('it does not parse to a YAML mapping');
|
|
293
|
-
parsed = null;
|
|
294
|
-
}
|
|
295
|
-
lastParsedPnpmLockfile = { content, parsed: parsed };
|
|
296
|
-
}
|
|
297
|
-
return lastParsedPnpmLockfile.parsed;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* The package names a build approval can apply to in the output, read from a
|
|
301
|
-
* pnpm v9 lockfile's `packages` keys (`name@version`, `@scope/name@version`,
|
|
302
|
-
* optionally with a `(peer@ver)` suffix). Returns null when that scope cannot be
|
|
303
|
-
* determined, which callers treat as "carry approvals verbatim", the inert
|
|
304
|
-
* direction: an approval for an absent package does nothing, a dropped one
|
|
305
|
-
* silently skips a needed build script. Three cases yield null:
|
|
306
|
-
* - unparseable content;
|
|
307
|
-
* - a pre-v9 lockfile, whose `/name@version` (v6) and `/name/version` (v5) keys
|
|
308
|
-
* this parse would mangle;
|
|
309
|
-
* - a lockfile with an importer other than the output itself, which is
|
|
310
|
-
* the root-lockfile fallback. It lists the workspace's projects
|
|
311
|
-
* under `importers` and never `packages`, so a workspace module the output
|
|
312
|
-
* ships as a `file:` directory dependency, which pnpm does gate on the
|
|
313
|
-
* approval list, has no name here to match.
|
|
314
|
-
*/
|
|
315
|
-
function getBuildApprovalScopeNames(lockfileContent) {
|
|
316
|
-
const parsed = parsePnpmLockfileYaml(lockfileContent);
|
|
317
|
-
const lockfileVersion = Number.parseFloat(String(parsed?.lockfileVersion));
|
|
318
|
-
if (!parsed || Number.isNaN(lockfileVersion) || lockfileVersion < 9) {
|
|
319
|
-
return null;
|
|
320
|
-
}
|
|
321
|
-
if (Object.keys(parsed.importers ?? {}).some((importer) => importer !== '.')) {
|
|
322
|
-
return null;
|
|
323
|
-
}
|
|
324
|
-
const names = new Set();
|
|
325
|
-
for (const key of Object.keys(parsed.packages ?? {})) {
|
|
326
|
-
// Skip index 0 so a scoped key's leading `@` is not read as the separator.
|
|
327
|
-
const versionSeparator = key.indexOf('@', 1);
|
|
328
|
-
names.add(versionSeparator === -1 ? key : key.slice(0, versionSeparator));
|
|
329
|
-
}
|
|
330
|
-
return names;
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* The workspace root's `patchedDependencies` (package key -> patch file path),
|
|
334
|
-
* scoped to the patches the pruned lockfile keeps. pnpm 11 declares them in
|
|
335
|
-
* pnpm-workspace.yaml; pnpm 10 and below in the package.json `pnpm` field, so
|
|
336
|
-
* read both root sources. A patch entry for a package the prune dropped would
|
|
337
|
-
* fail `pnpm install --frozen-lockfile` with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH,
|
|
338
|
-
* so the pruned lockfile's kept `patchedDependencies` keys are the scope.
|
|
339
|
-
*/
|
|
340
|
-
function getPrunedPatchedDependencies(workspaceRootPath, prunedLockfileContent) {
|
|
341
|
-
if (!prunedLockfileContent) {
|
|
342
|
-
return {};
|
|
343
|
-
}
|
|
344
|
-
const survivingKeys = getPrunedLockfilePatchedKeys(prunedLockfileContent);
|
|
345
|
-
if (survivingKeys.size === 0) {
|
|
346
|
-
return {};
|
|
347
|
-
}
|
|
348
|
-
const rootPatches = readRootPatchedDependencies(workspaceRootPath);
|
|
349
|
-
const scoped = {};
|
|
350
|
-
for (const key of survivingKeys) {
|
|
351
|
-
if (rootPatches[key]) {
|
|
352
|
-
scoped[key] = rootPatches[key];
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
return scoped;
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* The path a `.patch` file takes inside the pruned output, always under the
|
|
359
|
-
* output's declared `patches/` directory: a source path outside it would fall
|
|
360
|
-
* outside the prune target's cached `patches` output and be dropped on a cache
|
|
361
|
-
* replay, and a `..` asset name is not one a bundler can emit. The source
|
|
362
|
-
* sub-structure is kept so same-named patches in different directories stay
|
|
363
|
-
* distinct. The path is collapsed first, the way pnpm collapses it before
|
|
364
|
-
* recording it in the lockfile (`./x` and `a/../x` are both stored as `x`), so
|
|
365
|
-
* the config path read here and the lockfile path read by
|
|
366
|
-
* `filterPatchedDependenciesToPrunedPackages` (which calls this same helper)
|
|
367
|
-
* produce the same destination. A `..` left after collapsing escapes the
|
|
368
|
-
* workspace and is dropped, the one way two sources can still meet on one
|
|
369
|
-
* destination; `getPrunedPnpmPatchArtifacts` rejects that pair rather than
|
|
370
|
-
* shipping one file for both.
|
|
371
|
-
*/
|
|
372
|
-
function normalizePrunedPatchPath(patchPath) {
|
|
373
|
-
const segments = path_1.posix
|
|
374
|
-
.normalize(patchPath.replace(/\\/g, '/'))
|
|
375
|
-
.split('/')
|
|
376
|
-
.filter((segment) => segment !== '' && segment !== '.' && segment !== '..');
|
|
377
|
-
return `patches/${segments.join('/')}`;
|
|
378
|
-
}
|
|
379
|
-
function normalizePrunedPatchedDependencies(patchedDependencies) {
|
|
380
|
-
const normalized = {};
|
|
381
|
-
for (const [key, patchPath] of Object.entries(patchedDependencies)) {
|
|
382
|
-
normalized[key] = normalizePrunedPatchPath(patchPath);
|
|
383
|
-
}
|
|
384
|
-
return normalized;
|
|
385
|
-
}
|
|
386
|
-
function readRootPatchedDependencies(workspaceRootPath) {
|
|
387
|
-
const merged = {};
|
|
388
|
-
// pnpm <=10 reads patchedDependencies from the package.json `pnpm` field,
|
|
389
|
-
// pnpm 11 only from pnpm-workspace.yaml. When both declare the same key the
|
|
390
|
-
// pnpm-workspace.yaml value is the authoritative one on pnpm 11 (pnpm
|
|
391
|
-
// migrates the config there), so read package.json first and let the
|
|
392
|
-
// pnpm-workspace.yaml value win on conflict. Each source is read in its own
|
|
393
|
-
// try so a broken one does not discard the other's patches.
|
|
394
|
-
try {
|
|
395
|
-
const rootPackageJsonPath = (0, path_1.join)(workspaceRootPath, 'package.json');
|
|
396
|
-
if ((0, fs_1.existsSync)(rootPackageJsonPath)) {
|
|
397
|
-
const rootPackageJson = (0, fileutils_1.readJsonFile)(rootPackageJsonPath);
|
|
398
|
-
Object.assign(merged, rootPackageJson.pnpm?.patchedDependencies ?? {});
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
catch {
|
|
402
|
-
logger_1.logger.warn('Could not read patchedDependencies from the workspace root package.json; the pruned output will not carry the patches it declares.');
|
|
403
|
-
}
|
|
404
|
-
try {
|
|
405
|
-
const rootWorkspaceYaml = (0, path_1.join)(workspaceRootPath, 'pnpm-workspace.yaml');
|
|
406
|
-
if ((0, fs_1.existsSync)(rootWorkspaceYaml)) {
|
|
407
|
-
const yaml = (0, fileutils_1.readYamlFile)(rootWorkspaceYaml);
|
|
408
|
-
Object.assign(merged, yaml?.patchedDependencies ?? {});
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
catch {
|
|
412
|
-
logger_1.logger.warn('Could not read patchedDependencies from the workspace root pnpm-workspace.yaml; the pruned output will not carry the patches it declares.');
|
|
413
|
-
}
|
|
414
|
-
return merged;
|
|
415
|
-
}
|
|
416
|
-
/** Copies `key` from `source` to `target` unless the source leaves it unset. */
|
|
417
|
-
function assignDefined(target, source, key) {
|
|
418
|
-
if (source[key] !== undefined) {
|
|
419
|
-
target[key] = source[key];
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* The workspace root's pnpm build-script settings, read from both the
|
|
424
|
-
* pnpm-workspace.yaml and the root package.json `pnpm` field, with the
|
|
425
|
-
* pnpm-workspace.yaml value winning per field (pnpm migrates config there, and
|
|
426
|
-
* pnpm 10 reads both). Mirrors `readRootPatchedDependencies`.
|
|
427
|
-
*/
|
|
428
|
-
function readRootPnpmBuildSettings(workspaceRootPath) {
|
|
429
|
-
const fields = [
|
|
430
|
-
'onlyBuiltDependencies',
|
|
431
|
-
'neverBuiltDependencies',
|
|
432
|
-
'allowBuilds',
|
|
433
|
-
'supportedArchitectures',
|
|
434
|
-
];
|
|
435
|
-
const merged = {};
|
|
436
|
-
const sources = [];
|
|
437
|
-
// Each source is read in its own try so a broken one does not discard the
|
|
438
|
-
// other's settings.
|
|
439
|
-
try {
|
|
440
|
-
const rootPackageJsonPath = (0, path_1.join)(workspaceRootPath, 'package.json');
|
|
441
|
-
if ((0, fs_1.existsSync)(rootPackageJsonPath)) {
|
|
442
|
-
sources.push((0, fileutils_1.readJsonFile)(rootPackageJsonPath).pnpm ?? {});
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
catch {
|
|
446
|
-
logger_1.logger.warn('Could not read the pnpm build-script settings from the workspace root package.json; the pruned output will not carry the settings it declares.');
|
|
447
|
-
}
|
|
448
|
-
try {
|
|
449
|
-
const rootWorkspaceYaml = (0, path_1.join)(workspaceRootPath, 'pnpm-workspace.yaml');
|
|
450
|
-
if ((0, fs_1.existsSync)(rootWorkspaceYaml)) {
|
|
451
|
-
sources.push((0, fileutils_1.readYamlFile)(rootWorkspaceYaml) ?? {});
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
catch {
|
|
455
|
-
logger_1.logger.warn('Could not read the pnpm build-script settings from the workspace root pnpm-workspace.yaml; the pruned output will not carry the settings it declares.');
|
|
456
|
-
}
|
|
457
|
-
// Later source (pnpm-workspace.yaml) wins per field.
|
|
458
|
-
for (const source of sources) {
|
|
459
|
-
for (const field of fields) {
|
|
460
|
-
assignDefined(merged, source, field);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
return merged;
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* The pnpm build-script approvals a standalone pruned output declares in its
|
|
467
|
-
* emitted package.json so native production deps still run their build scripts
|
|
468
|
-
* on pnpm <=10; null on pnpm 11+, which reads approvals only from
|
|
469
|
-
* pnpm-workspace.yaml (`getPrunedPnpmInstallSettingsYaml` carries them there;
|
|
470
|
-
* keep the two in sync when pnpm moves the read again). Both root sources
|
|
471
|
-
* (pnpm-workspace.yaml wins over the package.json `pnpm` field) are read, and
|
|
472
|
-
* a pnpm 10.26+ `allowBuilds` map is folded into the on/never-built lists
|
|
473
|
-
* pnpm <=10 understands. Approvals are scoped to the packages the pruned
|
|
474
|
-
* lockfile keeps (one for a dropped package is inert); when the lockfile's
|
|
475
|
-
* names cannot be extracted (a pre-v9 lockfile, unparseable content) they are
|
|
476
|
-
* carried verbatim instead of scoped to nothing.
|
|
477
|
-
*/
|
|
478
|
-
function getPrunedPnpmPackageJsonBuildSettings(workspaceRootPath = workspace_root_1.workspaceRoot, prunedLockfileContent, precomputed) {
|
|
479
|
-
const pnpmMajor = resolvePnpmMajor(precomputed, workspaceRootPath);
|
|
480
|
-
if (pnpmMajor === null || pnpmMajor >= 11) {
|
|
481
|
-
return null;
|
|
482
|
-
}
|
|
483
|
-
const root = readRootPnpmBuildSettings(workspaceRootPath);
|
|
484
|
-
const present = prunedLockfileContent
|
|
485
|
-
? getBuildApprovalScopeNames(prunedLockfileContent)
|
|
486
|
-
: null;
|
|
487
|
-
const scopeToLockfile = (names) => {
|
|
488
|
-
const scoped = [...names];
|
|
489
|
-
return present ? scoped.filter((name) => present.has(name)) : scoped;
|
|
490
|
-
};
|
|
491
|
-
// pnpm 10.26+ declares approvals as an allowBuilds map; fold it into the
|
|
492
|
-
// on/never-built lists pnpm <=10 reads from package.json.
|
|
493
|
-
const onlyBuilt = new Set(root.onlyBuiltDependencies ?? []);
|
|
494
|
-
const neverBuilt = new Set(root.neverBuiltDependencies ?? []);
|
|
495
|
-
for (const [name, allowed] of Object.entries(root.allowBuilds ?? {})) {
|
|
496
|
-
(allowed ? onlyBuilt : neverBuilt).add(name);
|
|
497
|
-
}
|
|
498
|
-
const settings = {};
|
|
499
|
-
const scopedOnlyBuilt = scopeToLockfile(onlyBuilt);
|
|
500
|
-
if (scopedOnlyBuilt.length > 0) {
|
|
501
|
-
settings.onlyBuiltDependencies = scopedOnlyBuilt;
|
|
502
|
-
}
|
|
503
|
-
const scopedNeverBuilt = scopeToLockfile(neverBuilt);
|
|
504
|
-
if (scopedNeverBuilt.length > 0) {
|
|
505
|
-
settings.neverBuiltDependencies = scopedNeverBuilt;
|
|
506
|
-
}
|
|
507
|
-
if (root.supportedArchitectures) {
|
|
508
|
-
settings.supportedArchitectures = root.supportedArchitectures;
|
|
509
|
-
}
|
|
510
|
-
return Object.keys(settings).length > 0 ? settings : null;
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Folds the pnpm <=10 package.json additions a standalone pruned output needs
|
|
514
|
-
* (build approvals from `getPrunedPnpmPackageJsonBuildSettings`, plus the
|
|
515
|
-
* `patchedDependencies` declaration) onto `packageJson` in place. Build-approval
|
|
516
|
-
* lists union the manifest's own entries with the carried ones so a project-level
|
|
517
|
-
* approval is never dropped. Does nothing when there is nothing to add.
|
|
518
|
-
*/
|
|
519
|
-
function applyPrunedPnpmPackageJsonSettings(packageJson, buildSettings, patchedDependencies) {
|
|
520
|
-
if (!buildSettings && !patchedDependencies) {
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
const union = (a = [], b = []) => [
|
|
524
|
-
...new Set([...a, ...b]),
|
|
525
|
-
];
|
|
526
|
-
packageJson.pnpm ??= {};
|
|
527
|
-
if (buildSettings?.onlyBuiltDependencies) {
|
|
528
|
-
packageJson.pnpm.onlyBuiltDependencies = union(packageJson.pnpm.onlyBuiltDependencies, buildSettings.onlyBuiltDependencies);
|
|
529
|
-
}
|
|
530
|
-
if (buildSettings?.neverBuiltDependencies) {
|
|
531
|
-
packageJson.pnpm.neverBuiltDependencies = union(packageJson.pnpm.neverBuiltDependencies, buildSettings.neverBuiltDependencies);
|
|
532
|
-
}
|
|
533
|
-
if (buildSettings?.supportedArchitectures) {
|
|
534
|
-
packageJson.pnpm.supportedArchitectures = {
|
|
535
|
-
...buildSettings.supportedArchitectures,
|
|
536
|
-
...packageJson.pnpm.supportedArchitectures,
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
if (patchedDependencies) {
|
|
540
|
-
packageJson.pnpm.patchedDependencies = patchedDependencies;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
function getPrunedLockfilePatchedKeys(prunedLockfileContent) {
|
|
544
|
-
const parsed = parsePnpmLockfileYaml(prunedLockfileContent);
|
|
545
|
-
return new Set(Object.keys(parsed?.patchedDependencies ?? {}));
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Patch artifacts a standalone pruned output must ship to keep a `pnpm patch`
|
|
549
|
-
* workspace installable: the `.patch` files (path relative to the output root,
|
|
550
|
-
* plus content) and, on pnpm 10 and below, the `patchedDependencies` map to
|
|
551
|
-
* declare in the emitted package.json. On pnpm 11+ that map is carried in
|
|
552
|
-
* pnpm-workspace.yaml (see `getPrunedPnpmInstallSettingsYaml`), so
|
|
553
|
-
* `packageJsonPatchedDependencies` is null there. Both are scoped to the patches
|
|
554
|
-
* the pruned lockfile keeps. Returns the file contents so the file-writing prune
|
|
555
|
-
* paths and the bundler asset pipelines can each ship them their own way.
|
|
556
|
-
*/
|
|
557
|
-
function getPrunedPnpmPatchArtifacts(workspaceRootPath = workspace_root_1.workspaceRoot, prunedLockfileContent, precomputed) {
|
|
558
|
-
const patchedDependencies = precomputed?.patchedDependencies ??
|
|
559
|
-
getPrunedPatchedDependencies(workspaceRootPath, prunedLockfileContent);
|
|
560
|
-
if (Object.keys(patchedDependencies).length === 0) {
|
|
561
|
-
return { patchFiles: [], packageJsonPatchedDependencies: null };
|
|
562
|
-
}
|
|
563
|
-
const patchFiles = [];
|
|
564
|
-
// normalizePrunedPatchPath collapses the path, so two distinct sources can
|
|
565
|
-
// normalize to one shipped path, which would ship a single file for both
|
|
566
|
-
// entries and apply the wrong patch. Detect the clash and fail loudly rather
|
|
567
|
-
// than silently corrupt the output.
|
|
568
|
-
const shippedFrom = new Map();
|
|
569
|
-
for (const patchPath of new Set(Object.values(patchedDependencies))) {
|
|
570
|
-
// The config/lockfile side normalizes an absolute patch path under patches/,
|
|
571
|
-
// so read its source from that absolute location to keep the shipped file in
|
|
572
|
-
// sync; only a relative path resolves against the workspace root.
|
|
573
|
-
const source = (0, path_1.isAbsolute)(patchPath)
|
|
574
|
-
? patchPath
|
|
575
|
-
: (0, path_1.join)(workspaceRootPath, patchPath);
|
|
576
|
-
const destination = normalizePrunedPatchPath(patchPath);
|
|
577
|
-
const existingSource = shippedFrom.get(destination);
|
|
578
|
-
if (existingSource !== undefined && existingSource !== source) {
|
|
579
|
-
throw new Error(`Cannot prune pnpm patches: "${existingSource}" and "${source}" both ship to "${destination}" in the standalone output. Rename one so the patches do not collide.`);
|
|
580
|
-
}
|
|
581
|
-
shippedFrom.set(destination, source);
|
|
582
|
-
// A file check rather than a mere existence one: a path whose segments all
|
|
583
|
-
// normalize away (``, `.`, `..`) resolves to a directory, which would fail
|
|
584
|
-
// the read below with a raw EISDIR instead of taking the warn path.
|
|
585
|
-
if ((0, fileutils_1.fileExists)(source)) {
|
|
586
|
-
// Ship the patch under the `patches/<subpath>` path the pruned output
|
|
587
|
-
// declares, reading it from wherever the workspace kept it.
|
|
588
|
-
patchFiles.push({
|
|
589
|
-
path: destination,
|
|
590
|
-
content: (0, fs_1.readFileSync)(source, 'utf-8'),
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
else {
|
|
594
|
-
// The root config declares this patch but no file is there (already a
|
|
595
|
-
// broken workspace, the root install would fail too). Warn rather than
|
|
596
|
-
// drop the declaration: the pruned lockfile still lists the patch, so
|
|
597
|
-
// dropping only the config would trade this for a lockfile config mismatch.
|
|
598
|
-
logger_1.logger.warn(`Patch file "${patchPath}" referenced by patchedDependencies was not found; the pruned output declares the patch but cannot ship the file.`);
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
const pnpmMajor = resolvePnpmMajor(precomputed, workspaceRootPath);
|
|
602
|
-
return {
|
|
603
|
-
patchFiles,
|
|
604
|
-
packageJsonPatchedDependencies: pnpmMajor !== null && pnpmMajor < 11
|
|
605
|
-
? normalizePrunedPatchedDependencies(patchedDependencies)
|
|
606
|
-
: null,
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
const WORKSPACE_MODULES_DIR = 'workspace_modules';
|
|
610
|
-
/**
|
|
611
|
-
* Non-workspace local-path deps (`file:` tarballs/dirs, `link:` targets) ship
|
|
612
|
-
* under this single output directory rather than at their workspace-relative
|
|
613
|
-
* path. A generated `prune-lockfile` target declares dynamic output paths it
|
|
614
|
-
* cannot enumerate at generate time; corralling every vendored artifact under
|
|
615
|
-
* one directory lets `getPruneTargets` declare it, so a cache replay restores it
|
|
616
|
-
* (an artifact shipped outside a declared output is dropped on replay, breaking
|
|
617
|
-
* the standalone deploy). The manifest specifiers and pruned-lockfile refs are
|
|
618
|
-
* relocated into this directory to match; source reads strip it back off.
|
|
619
|
-
*/
|
|
620
|
-
exports.LOCAL_PATH_MODULES_DIR = 'local_path_modules';
|
|
621
|
-
/**
|
|
622
|
-
* Relocates a workspace-relative local-path into the shipped output directory.
|
|
623
|
-
* Injective, so `uncontainLocalPath` recovers the source path for every input:
|
|
624
|
-
* a workspace directory literally named `local_path_modules/` relocates like
|
|
625
|
-
* any other rather than being mistaken for an already-relocated path. Callers
|
|
626
|
-
* must therefore relocate each path exactly once.
|
|
627
|
-
*/
|
|
628
|
-
function containLocalPath(wsRelativePath) {
|
|
629
|
-
return `${exports.LOCAL_PATH_MODULES_DIR}/${wsRelativePath}`;
|
|
630
|
-
}
|
|
631
|
-
/**
|
|
632
|
-
* The workspace-relative source path of a shipped local-path artifact, i.e. the
|
|
633
|
-
* inverse of `containLocalPath`. A path that is not under the shipped directory
|
|
634
|
-
* (an unshippable target left at its original spec) is returned unchanged.
|
|
635
|
-
*/
|
|
636
|
-
function uncontainLocalPath(shippedPath) {
|
|
637
|
-
if (shippedPath === exports.LOCAL_PATH_MODULES_DIR) {
|
|
638
|
-
return '';
|
|
639
|
-
}
|
|
640
|
-
return shippedPath.startsWith(`${exports.LOCAL_PATH_MODULES_DIR}/`)
|
|
641
|
-
? shippedPath.slice(exports.LOCAL_PATH_MODULES_DIR.length + 1)
|
|
642
|
-
: shippedPath;
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* A `file:`/`link:` specifier with its path separators unified, so specifiers
|
|
646
|
-
* that differ only in how they were authored compare equal. Returns anything
|
|
647
|
-
* that is not a local-path specifier unchanged.
|
|
648
|
-
*/
|
|
649
|
-
function normalizeLocalPathSpec(spec) {
|
|
650
|
-
const protocol = spec.startsWith('link:')
|
|
651
|
-
? 'link:'
|
|
652
|
-
: spec.startsWith('file:')
|
|
653
|
-
? 'file:'
|
|
654
|
-
: null;
|
|
655
|
-
return protocol
|
|
656
|
-
? `${protocol}${(0, path_2.normalizePath)(spec.slice(protocol.length))}`
|
|
657
|
-
: spec;
|
|
658
|
-
}
|
|
659
|
-
/**
|
|
660
|
-
* A relocated `file:`/`link:` specifier read back as the source path it was
|
|
661
|
-
* relocated from, so it compares equal to the source specifier for the same
|
|
662
|
-
* target (`normalizeLocalPathSpec`). Relocation is injective and strips exactly
|
|
663
|
-
* one level, so only the relocated side of a comparison may go through this: a
|
|
664
|
-
* source path that itself starts with the shipped directory's name relocates
|
|
665
|
-
* like any other, and stripping it too would read it as a different target.
|
|
666
|
-
*/
|
|
667
|
-
function uncontainLocalPathSpec(spec) {
|
|
668
|
-
const normalized = normalizeLocalPathSpec(spec);
|
|
669
|
-
const protocol = normalized.startsWith('link:')
|
|
670
|
-
? 'link:'
|
|
671
|
-
: normalized.startsWith('file:')
|
|
672
|
-
? 'file:'
|
|
673
|
-
: null;
|
|
674
|
-
return protocol
|
|
675
|
-
? `${protocol}${uncontainLocalPath(normalized.slice(protocol.length))}`
|
|
676
|
-
: normalized;
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* The absolute source of a local-path target, or the reason it cannot ship into
|
|
680
|
-
* the pruned output. The containment check is lexical, so it cannot see where a
|
|
681
|
-
* symlinked source points: resolving it is what separates a link into the
|
|
682
|
-
* workspace, which ships like any other directory, from one that lands on the
|
|
683
|
-
* workspace root or leaves it. A dangling link is reported rather than accepted,
|
|
684
|
-
* which `lstat` would have done. Shared so the artifact collector and the
|
|
685
|
-
* closure validation cannot disagree about what the output actually carries.
|
|
686
|
-
*/
|
|
687
|
-
function resolveLocalPathSource(wsRelativePath, workspaceRootPath, workspaceRootRealPath) {
|
|
688
|
-
if (localPathEscapesOutput(wsRelativePath)) {
|
|
689
|
-
return { source: null, reason: 'outside-workspace' };
|
|
690
|
-
}
|
|
691
|
-
const attempted = (0, path_1.join)(workspaceRootPath, wsRelativePath);
|
|
692
|
-
let resolved;
|
|
693
|
-
try {
|
|
694
|
-
resolved = (0, fs_1.realpathSync)(attempted);
|
|
695
|
-
}
|
|
696
|
-
catch {
|
|
697
|
-
return { source: null, reason: 'missing', attempted };
|
|
698
|
-
}
|
|
699
|
-
// Shipping the root itself would copy the whole workspace into the output.
|
|
700
|
-
if (resolved === workspaceRootRealPath) {
|
|
701
|
-
return { source: null, reason: 'workspace-root', attempted, resolved };
|
|
702
|
-
}
|
|
703
|
-
if (!resolved.startsWith(`${workspaceRootRealPath}${path_1.sep}`)) {
|
|
704
|
-
return { source: null, reason: 'outside-workspace', attempted, resolved };
|
|
705
|
-
}
|
|
706
|
-
return { source: attempted, attempted, resolved };
|
|
707
|
-
}
|
|
708
|
-
/**
|
|
709
|
-
* Contains a workspace-relative `file:` path, leaving unshippable ones as-is.
|
|
710
|
-
* `synthesized` holds the copied-workspace-module paths the caller assembled,
|
|
711
|
-
* which are already output paths: they are recognized by identity rather than by
|
|
712
|
-
* their `workspace_modules/` prefix, so a workspace directory that happens to
|
|
713
|
-
* carry that name relocates like any other source.
|
|
714
|
-
*/
|
|
715
|
-
function containVendoredFilePath(wsRelativePath, synthesized) {
|
|
716
|
-
if (wsRelativePath === '' ||
|
|
717
|
-
wsRelativePath === '.' ||
|
|
718
|
-
synthesized.has(wsRelativePath) ||
|
|
719
|
-
localPathEscapesOutput(wsRelativePath)) {
|
|
720
|
-
return wsRelativePath;
|
|
721
|
-
}
|
|
722
|
-
return containLocalPath(wsRelativePath);
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Contains the `file:` path in a lockfile token, which is either a bare spec
|
|
726
|
-
* (`file:X`) or one carrying the target's real package name (`name@file:X`, the
|
|
727
|
-
* shape pnpm records for an aliased dependency and uses as that package's key).
|
|
728
|
-
* Package keys and the refs that point at them go through this one function, so
|
|
729
|
-
* a renamed key and its refs cannot drift apart; pnpm rejects that mismatch with
|
|
730
|
-
* ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY. A resolved-peer suffix rides along in
|
|
731
|
-
* the sliced path (`name@file:X(peer@1.0.0)`) and survives untouched because
|
|
732
|
-
* containment only prepends.
|
|
733
|
-
*/
|
|
734
|
-
function containFileToken(token, synthesized) {
|
|
735
|
-
const marker = token.startsWith('file:') ? 'file:' : '@file:';
|
|
736
|
-
const index = token.startsWith('file:') ? 0 : token.indexOf(marker);
|
|
737
|
-
if (index === -1) {
|
|
738
|
-
return token;
|
|
739
|
-
}
|
|
740
|
-
const pathStart = index + marker.length;
|
|
741
|
-
// Normalize separators first, matching the artifact shipping side
|
|
742
|
-
// (getPrunedPnpmLocalPathArtifacts), so a backslash-authored token contains to
|
|
743
|
-
// the same posix path the artifacts ship to.
|
|
744
|
-
const path = (0, path_2.normalizePath)(token.slice(pathStart));
|
|
745
|
-
const contained = containVendoredFilePath(path, synthesized);
|
|
746
|
-
return contained === path
|
|
747
|
-
? token
|
|
748
|
-
: `${token.slice(0, pathStart)}${contained}`;
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* Warns when a workspace directory occupies the output path of a copied
|
|
752
|
-
* workspace module. Both spell `workspace_modules/<name>`, so no later pass can
|
|
753
|
-
* tell them apart: the vendored source is read as the copied module and never
|
|
754
|
-
* ships, leaving the lockfile pointing at a path the output does not carry.
|
|
755
|
-
*/
|
|
756
|
-
function warnOnWorkspaceModulePathCollision(sourcePackages, synthesizedModulePaths) {
|
|
757
|
-
for (const snapshot of Object.values(sourcePackages ?? {})) {
|
|
758
|
-
const directory = snapshot
|
|
759
|
-
?.resolution?.directory;
|
|
760
|
-
if (typeof directory === 'string' &&
|
|
761
|
-
synthesizedModulePaths.has((0, path_2.normalizePath)(directory))) {
|
|
762
|
-
logger_1.logger.warn(`Local-path dependency "file:${directory}" sits where the pruned output copies a workspace module of the same name, so it cannot ship separately. Move it out of ${WORKSPACE_MODULES_DIR}/ to deploy it.`);
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Relocates every shippable non-workspace `file:` local-path reference in a
|
|
768
|
-
* pruned lockfile (package keys, resolutions, and snapshot/importer dependency
|
|
769
|
-
* refs) under `LOCAL_PATH_MODULES_DIR`, matching where the artifacts ship, so a
|
|
770
|
-
* standalone `pnpm install` resolves them. `link:` refs are relocated upstream
|
|
771
|
-
* (`containShippedLocalLinkRefs` for the source snapshots, the assembly's own
|
|
772
|
-
* synthesis sites for the rest); only `file:` paths, which the source lockfile
|
|
773
|
-
* carries verbatim, are contained here. Workspace-module and escaping paths
|
|
774
|
-
* are left untouched. Mutates `lockfile` in place; the key rename and every ref
|
|
775
|
-
* use the same `file:` path, so they stay in sync.
|
|
776
|
-
*
|
|
777
|
-
* Takes the normalized document rather than a looser shape: dependency refs are
|
|
778
|
-
* rewritten only where they are plain strings, which is what normalization
|
|
779
|
-
* guarantees. A raw v9 file records an importer ref as `{ specifier, version }`
|
|
780
|
-
* and would have its package key renamed while that ref kept pointing at the
|
|
781
|
-
* old path.
|
|
782
|
-
*/
|
|
783
|
-
function containShippedLocalFilePaths(lockfile, synthesizedModulePaths = new Set()) {
|
|
784
|
-
const synthesized = synthesizedModulePaths;
|
|
785
|
-
const containSnapshot = (snapshot) => {
|
|
786
|
-
if (!snapshot || typeof snapshot !== 'object') {
|
|
787
|
-
return;
|
|
788
|
-
}
|
|
789
|
-
const record = snapshot;
|
|
790
|
-
const resolution = record.resolution;
|
|
791
|
-
if (resolution && typeof resolution === 'object') {
|
|
792
|
-
if (typeof resolution.directory === 'string') {
|
|
793
|
-
// Normalize separators first, matching the artifact shipping side
|
|
794
|
-
// (getPrunedPnpmLocalPathArtifacts), so a backslash directory contains
|
|
795
|
-
// to the same posix path the artifacts ship to.
|
|
796
|
-
resolution.directory = containVendoredFilePath((0, path_2.normalizePath)(resolution.directory), synthesized);
|
|
797
|
-
}
|
|
798
|
-
if (typeof resolution.tarball === 'string') {
|
|
799
|
-
resolution.tarball = containFileToken(resolution.tarball, synthesized);
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
for (const section of LOCKFILE_DEP_SECTIONS) {
|
|
803
|
-
const deps = record[section];
|
|
804
|
-
if (!deps || typeof deps !== 'object') {
|
|
805
|
-
continue;
|
|
806
|
-
}
|
|
807
|
-
for (const [name, ref] of Object.entries(deps)) {
|
|
808
|
-
if (typeof ref === 'string') {
|
|
809
|
-
deps[name] = containFileToken(ref, synthesized);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
};
|
|
814
|
-
if (lockfile.packages) {
|
|
815
|
-
const contained = {};
|
|
816
|
-
for (const [key, snapshot] of Object.entries(lockfile.packages)) {
|
|
817
|
-
containSnapshot(snapshot);
|
|
818
|
-
contained[containFileToken(key, synthesized)] = snapshot;
|
|
819
|
-
}
|
|
820
|
-
lockfile.packages = contained;
|
|
821
|
-
}
|
|
822
|
-
for (const importer of Object.values(lockfile.importers ?? {})) {
|
|
823
|
-
containSnapshot(importer);
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Relocates the shippable `link:` refs a source lockfile's package snapshots
|
|
828
|
-
* carry, so they resolve from the pruned output's root. pnpm reads a snapshot
|
|
829
|
-
* `link:` ref against the lockfile directory, which is the workspace root at
|
|
830
|
-
* source and the deploy root in the output, so a ref left verbatim points at a
|
|
831
|
-
* path the standalone output does not carry once the target ships under
|
|
832
|
-
* `LOCAL_PATH_MODULES_DIR`. A target that cannot ship keeps its ref, matching
|
|
833
|
-
* the copied manifest; the artifact collector reports why.
|
|
834
|
-
*
|
|
835
|
-
* Takes the source snapshots alone rather than the assembled document: the
|
|
836
|
-
* assembly relocates its own refs at their synthesis site, and a second pass
|
|
837
|
-
* cannot tell an already-relocated path from a workspace path that starts with
|
|
838
|
-
* the shipped directory's name. Mutates the snapshots in place.
|
|
839
|
-
*/
|
|
840
|
-
function containShippedLocalLinkRefs(sourceSnapshots) {
|
|
841
|
-
for (const snapshot of Object.values(sourceSnapshots ?? {})) {
|
|
842
|
-
if (!snapshot || typeof snapshot !== 'object') {
|
|
843
|
-
continue;
|
|
844
|
-
}
|
|
845
|
-
const record = snapshot;
|
|
846
|
-
for (const section of LOCKFILE_DEP_SECTIONS) {
|
|
847
|
-
const deps = record[section];
|
|
848
|
-
if (!deps || typeof deps !== 'object') {
|
|
849
|
-
continue;
|
|
850
|
-
}
|
|
851
|
-
for (const [name, ref] of Object.entries(deps)) {
|
|
852
|
-
if (typeof ref !== 'string' || !ref.startsWith('link:')) {
|
|
853
|
-
continue;
|
|
854
|
-
}
|
|
855
|
-
deps[name] = relocatePrunedLocalPathSpec(ref, '', '')?.spec ?? ref;
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
const LOCKFILE_DEP_SECTIONS = [
|
|
861
|
-
'dependencies',
|
|
862
|
-
'optionalDependencies',
|
|
863
|
-
'devDependencies',
|
|
864
|
-
];
|
|
865
|
-
/** True when a workspace-root-relative path escapes the output root. */
|
|
866
|
-
function localPathEscapesOutput(wsRelativePath) {
|
|
867
|
-
// An absolute path counts as escaping: join(workspaceRoot, target) would
|
|
868
|
-
// silently rebase it under the workspace root instead of resolving it.
|
|
869
|
-
return ((0, path_1.isAbsolute)(wsRelativePath) || wsRelativePath.split(/[\\/]/).includes('..'));
|
|
870
|
-
}
|
|
871
|
-
/** True when a resolution `directory` points at a copied workspace module. */
|
|
872
|
-
function isUnderWorkspaceModules(directory) {
|
|
873
|
-
return (directory === WORKSPACE_MODULES_DIR ||
|
|
874
|
-
directory.startsWith(`${WORKSPACE_MODULES_DIR}/`) ||
|
|
875
|
-
directory.startsWith(`${WORKSPACE_MODULES_DIR}\\`));
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* pnpm resolves every pruned-lockfile `link:` ref relative to the lockfile
|
|
879
|
-
* directory: snapshot refs are read against it directly, and the output's only
|
|
880
|
-
* importer is `.`, the lockfile directory itself. Normalize the ref to a
|
|
881
|
-
* workspace-root-relative posix path. An absolute target is returned as-is
|
|
882
|
-
* (join would rebase it) so the escape check can reject it.
|
|
883
|
-
*/
|
|
884
|
-
function resolveLinkTarget(linkRef) {
|
|
885
|
-
const refPath = linkRef.slice('link:'.length);
|
|
886
|
-
return (0, path_2.normalizePath)((0, path_1.isAbsolute)(refPath) ? refPath : (0, path_1.join)(refPath));
|
|
887
|
-
}
|
|
888
|
-
function parsePrunedLockfile(content) {
|
|
889
|
-
return parsePnpmLockfileYaml(content);
|
|
890
|
-
}
|
|
891
|
-
/**
|
|
892
|
-
* The non-workspace `link:` target directories the pruned lockfile references
|
|
893
|
-
* (root importer versions and package snapshot refs, e.g. from copied
|
|
894
|
-
* workspace modules and vendored `file:` directories), each resolved to a
|
|
895
|
-
* workspace-root-relative posix path paired with the lockfile ref it came from.
|
|
896
|
-
* Targets under `workspace_modules/` are excluded (copy-workspace-modules ships
|
|
897
|
-
* those); a target that escapes the workspace root is included so the caller
|
|
898
|
-
* can report it; a target that is the workspace root itself is skipped with a
|
|
899
|
-
* warning (shipping it would copy the entire workspace).
|
|
900
|
-
*/
|
|
901
|
-
// The link-closure validator and the local-path artifact collector both walk
|
|
902
|
-
// the same parsed lockfile in one prune run; caching per document runs the walk
|
|
903
|
-
// (and its warnings) once. Callers must not mutate the returned array.
|
|
904
|
-
const collectedPrunedLinkTargets = new WeakMap();
|
|
905
|
-
function collectPrunedLinkTargetDirs(parsed) {
|
|
906
|
-
const cached = collectedPrunedLinkTargets.get(parsed);
|
|
907
|
-
if (cached) {
|
|
908
|
-
return cached;
|
|
909
|
-
}
|
|
910
|
-
const targets = new Map();
|
|
911
|
-
const addRef = (value) => {
|
|
912
|
-
const ref = typeof value === 'string' ? value : value?.version;
|
|
913
|
-
if (typeof ref !== 'string' || !ref.startsWith('link:')) {
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
const target = resolveLinkTarget(ref);
|
|
917
|
-
if (target === '' || target === '.') {
|
|
918
|
-
logger_1.logger.warn(`Local-path dependency "${ref}" resolves to the workspace root itself and cannot be shipped into the pruned output.`);
|
|
919
|
-
return;
|
|
920
|
-
}
|
|
921
|
-
if (!isUnderWorkspaceModules(target) && !targets.has(target)) {
|
|
922
|
-
targets.set(target, ref);
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
// Every link: ref resolves from the lockfile dir (see resolveLinkTarget), so
|
|
926
|
-
// scan the root importer and both dependency-carrying package sections.
|
|
927
|
-
const rootImporter = parsed.importers?.['.'] ?? {};
|
|
928
|
-
for (const section of LOCKFILE_DEP_SECTIONS) {
|
|
929
|
-
for (const value of Object.values(rootImporter[section] ?? {})) {
|
|
930
|
-
addRef(value);
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
for (const section of [parsed.snapshots, parsed.packages]) {
|
|
934
|
-
for (const snapshot of Object.values(section ?? {})) {
|
|
935
|
-
for (const depSection of LOCKFILE_DEP_SECTIONS) {
|
|
936
|
-
for (const value of Object.values(snapshot?.[depSection] ?? {})) {
|
|
937
|
-
addRef(value);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
const result = [...targets].map(([target, ref]) => ({ target, ref }));
|
|
943
|
-
collectedPrunedLinkTargets.set(parsed, result);
|
|
944
|
-
return result;
|
|
945
|
-
}
|
|
946
|
-
/**
|
|
947
|
-
* The non-workspace local-path packages a standalone pruned output must ship so
|
|
948
|
-
* `pnpm install` can resolve them. The pruned lockfile records each path
|
|
949
|
-
* relocated under `LOCAL_PATH_MODULES_DIR` (see containLocalPath), so `path`
|
|
950
|
-
* ships there while `sourcePath` reads from the original workspace location.
|
|
951
|
-
* Three shapes ship: a `file:` tarball (the `.tgz`), a `file:` directory not
|
|
952
|
-
* under `workspace_modules/` (copied workspace modules ship via
|
|
953
|
-
* copy-workspace-modules and are skipped here), and a `link:` target directory
|
|
954
|
-
* (a root importer `link:` version, or a package `link:` snapshot ref).
|
|
955
|
-
* `node_modules` is filtered from every directory copy; a symlink inside a
|
|
956
|
-
* shipped tree is skipped with a warning while a symlinked root ships when it
|
|
957
|
-
* resolves under the workspace root; entries are deduped by destination; a
|
|
958
|
-
* source missing on disk or resolving outside the workspace root is skipped
|
|
959
|
-
* with a warning (not reproducibly deployable). Source paths rather than bytes
|
|
960
|
-
* so the file-writing prune paths can copy without buffering whole trees.
|
|
961
|
-
*/
|
|
962
|
-
function getPrunedPnpmLocalPathArtifacts(workspaceRootPath = workspace_root_1.workspaceRoot, prunedLockfileContent) {
|
|
963
|
-
if (!prunedLockfileContent) {
|
|
964
|
-
return [];
|
|
965
|
-
}
|
|
966
|
-
const parsed = parsePrunedLockfile(prunedLockfileContent);
|
|
967
|
-
if (!parsed) {
|
|
968
|
-
return [];
|
|
969
|
-
}
|
|
970
|
-
const artifacts = [];
|
|
971
|
-
const shippedRoots = new Set();
|
|
972
|
-
const seenDestinations = new Set();
|
|
973
|
-
// Compared against every resolved source below, so the containment check is
|
|
974
|
-
// not defeated by a workspace root that is itself reached through a link
|
|
975
|
-
// (`/tmp` on macOS). Falls back to the declared root when it cannot be
|
|
976
|
-
// resolved; the per-target resolution then reports the failure.
|
|
977
|
-
let workspaceRootRealPath;
|
|
978
|
-
try {
|
|
979
|
-
workspaceRootRealPath = (0, fs_1.realpathSync)(workspaceRootPath);
|
|
980
|
-
}
|
|
981
|
-
catch {
|
|
982
|
-
workspaceRootRealPath = workspaceRootPath;
|
|
983
|
-
}
|
|
984
|
-
// The absolute source for a shippable target, or null (with a warning) when
|
|
985
|
-
// the target escapes the workspace root or is missing on disk.
|
|
986
|
-
const resolveShippableSource = (wsRelativePath, origin) => {
|
|
987
|
-
const resolution = resolveLocalPathSource(wsRelativePath, workspaceRootPath, workspaceRootRealPath);
|
|
988
|
-
if (resolution.source) {
|
|
989
|
-
return resolution.source;
|
|
990
|
-
}
|
|
991
|
-
if (resolution.reason === 'missing') {
|
|
992
|
-
logger_1.logger.warn(`Local-path dependency "${origin}" was not found at ${resolution.attempted}; the pruned output references it but cannot ship it.`);
|
|
993
|
-
}
|
|
994
|
-
else if (resolution.reason === 'workspace-root') {
|
|
995
|
-
warnUnshippableLocalPathSpec(`"${origin}"`, 'workspace-root');
|
|
996
|
-
}
|
|
997
|
-
else {
|
|
998
|
-
logger_1.logger.warn(resolution.resolved
|
|
999
|
-
? `Local-path dependency "${origin}" resolves to ${resolution.resolved}, outside the workspace root, and cannot be shipped into the pruned output. Vendor it inside the workspace to deploy it.`
|
|
1000
|
-
: `Local-path dependency "${origin}" resolves outside the workspace root and cannot be shipped into the pruned output. Vendor it inside the workspace to deploy it.`);
|
|
1001
|
-
}
|
|
1002
|
-
return null;
|
|
1003
|
-
};
|
|
1004
|
-
// Callers pass the shipped path (relocated under LOCAL_PATH_MODULES_DIR, as the
|
|
1005
|
-
// pruned lockfile records it); it is the artifact destination, while the source
|
|
1006
|
-
// is read from the original workspace location.
|
|
1007
|
-
const shipFile = (shippedPath, origin) => {
|
|
1008
|
-
if (shippedRoots.has(shippedPath)) {
|
|
1009
|
-
return;
|
|
1010
|
-
}
|
|
1011
|
-
shippedRoots.add(shippedPath);
|
|
1012
|
-
const source = resolveShippableSource(uncontainLocalPath(shippedPath), origin);
|
|
1013
|
-
if (!source || seenDestinations.has(shippedPath)) {
|
|
1014
|
-
return;
|
|
1015
|
-
}
|
|
1016
|
-
seenDestinations.add(shippedPath);
|
|
1017
|
-
artifacts.push({ path: shippedPath, sourcePath: source });
|
|
1018
|
-
};
|
|
1019
|
-
const shipDirectory = (shippedPath, origin) => {
|
|
1020
|
-
if (shippedRoots.has(shippedPath)) {
|
|
1021
|
-
return;
|
|
1022
|
-
}
|
|
1023
|
-
shippedRoots.add(shippedPath);
|
|
1024
|
-
const source = resolveShippableSource(uncontainLocalPath(shippedPath), origin);
|
|
1025
|
-
if (!source) {
|
|
1026
|
-
return;
|
|
1027
|
-
}
|
|
1028
|
-
if (!(0, fs_1.statSync)(source).isDirectory()) {
|
|
1029
|
-
logger_1.logger.warn(`Local-path dependency "${origin}" is not a directory at ${source}; the pruned output references it but cannot ship it.`);
|
|
1030
|
-
return;
|
|
1031
|
-
}
|
|
1032
|
-
// Walk the tree, skipping node_modules, deduping by destination.
|
|
1033
|
-
const walk = (absoluteDir, destinationDir) => {
|
|
1034
|
-
for (const entry of (0, fs_1.readdirSync)(absoluteDir, { withFileTypes: true })) {
|
|
1035
|
-
if (entry.name === 'node_modules') {
|
|
1036
|
-
continue;
|
|
1037
|
-
}
|
|
1038
|
-
const absoluteEntry = (0, path_1.join)(absoluteDir, entry.name);
|
|
1039
|
-
const destinationEntry = `${destinationDir}/${entry.name}`;
|
|
1040
|
-
if (entry.isDirectory()) {
|
|
1041
|
-
walk(absoluteEntry, destinationEntry);
|
|
1042
|
-
}
|
|
1043
|
-
else if (entry.isFile()) {
|
|
1044
|
-
if (seenDestinations.has(destinationEntry)) {
|
|
1045
|
-
continue;
|
|
1046
|
-
}
|
|
1047
|
-
seenDestinations.add(destinationEntry);
|
|
1048
|
-
artifacts.push({ path: destinationEntry, sourcePath: absoluteEntry });
|
|
1049
|
-
}
|
|
1050
|
-
else if (entry.isSymbolicLink()) {
|
|
1051
|
-
// Following links risks cycles and machine-specific targets, so they
|
|
1052
|
-
// are not shipped; surface the gap instead of silently dropping it.
|
|
1053
|
-
logger_1.logger.warn(`Local-path dependency "${origin}" contains a symbolic link at ${absoluteEntry}, which is not shipped into the pruned output.`);
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
};
|
|
1057
|
-
walk(source, shippedPath);
|
|
1058
|
-
};
|
|
1059
|
-
// file: tarball + file: directory resolutions (resolutions live in `packages`).
|
|
1060
|
-
for (const snapshot of Object.values(parsed.packages ?? {})) {
|
|
1061
|
-
const tarball = snapshot?.resolution?.tarball;
|
|
1062
|
-
if (tarball?.startsWith('file:')) {
|
|
1063
|
-
shipFile(tarball.slice('file:'.length), tarball);
|
|
1064
|
-
continue;
|
|
1065
|
-
}
|
|
1066
|
-
const directory = snapshot?.resolution?.directory;
|
|
1067
|
-
if (directory && !isUnderWorkspaceModules(directory)) {
|
|
1068
|
-
shipDirectory((0, path_2.normalizePath)(directory), `file:${directory}`);
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
// link: targets (root importer versions + directory-package snapshot refs).
|
|
1072
|
-
for (const { target, ref } of collectPrunedLinkTargetDirs(parsed)) {
|
|
1073
|
-
shipDirectory(target, ref);
|
|
1074
|
-
}
|
|
1075
|
-
return artifacts;
|
|
1076
|
-
}
|
|
1077
|
-
/**
|
|
1078
|
-
* Whether the pruned lockfile references a non-workspace local path at all.
|
|
1079
|
-
* Reads the same refs as `getPrunedPnpmLocalPathArtifacts` without walking the
|
|
1080
|
-
* trees behind them, so a caller that only needs the answer neither lists every
|
|
1081
|
-
* shipped file nor repeats that function's per-target warnings.
|
|
1082
|
-
*/
|
|
1083
|
-
function prunedLockfileReferencesLocalPaths(prunedLockfileContent) {
|
|
1084
|
-
const parsed = parsePrunedLockfile(prunedLockfileContent);
|
|
1085
|
-
if (!parsed) {
|
|
1086
|
-
return false;
|
|
1087
|
-
}
|
|
1088
|
-
for (const snapshot of Object.values(parsed.packages ?? {})) {
|
|
1089
|
-
if (snapshot?.resolution?.tarball?.startsWith('file:')) {
|
|
1090
|
-
return true;
|
|
1091
|
-
}
|
|
1092
|
-
const directory = snapshot?.resolution?.directory;
|
|
1093
|
-
if (directory && !isUnderWorkspaceModules(directory)) {
|
|
1094
|
-
return true;
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
return collectPrunedLinkTargetDirs(parsed).length > 0;
|
|
1098
|
-
}
|
|
1099
|
-
/**
|
|
1100
|
-
* Fails the pruned build when a shipped local-path target has a required
|
|
1101
|
-
* dependency that will not be resolvable in the standalone deploy: a `link:`
|
|
1102
|
-
* target (a symlink, not a packed package, so pnpm never installs its
|
|
1103
|
-
* dependency closure) or a `file:` directory package whose lockfile entry
|
|
1104
|
-
* carries no dependency edges (a peer backfilled when `autoInstallPeers` is
|
|
1105
|
-
* off). Both install, `pnpm install --frozen-lockfile` exits 0, and the target
|
|
1106
|
-
* resolves its `require`s only from the deploy-root node_modules, so a
|
|
1107
|
-
* required dep missing there fails at runtime with MODULE_NOT_FOUND; this
|
|
1108
|
-
* throws at build time with the remedy.
|
|
1109
|
-
*
|
|
1110
|
-
* Only a required dep absent from the app's installed direct deps fails. A
|
|
1111
|
-
* peer or optional dep of the target, or a required dep present only in the
|
|
1112
|
-
* app's devDependencies (a `--prod` install may omit it), warns instead; these
|
|
1113
|
-
* are not provably broken. The app's own peerDependencies count as installed:
|
|
1114
|
-
* the pruned root importer folds them into `dependencies` (mirroring pnpm's
|
|
1115
|
-
* autoInstallPeers). A backfilled `file:` tarball peer's manifest is inside
|
|
1116
|
-
* the archive and is not read, so its closure is not validated. pnpm-only;
|
|
1117
|
-
* call sites gate on the package manager.
|
|
1118
|
-
*/
|
|
1119
|
-
function validatePrunedLocalPathClosure(packageJson, workspaceRootPath, prunedLockfileContent) {
|
|
1120
|
-
if (!prunedLockfileContent) {
|
|
1121
|
-
return;
|
|
1122
|
-
}
|
|
1123
|
-
const parsed = parsePrunedLockfile(prunedLockfileContent);
|
|
1124
|
-
if (!parsed) {
|
|
1125
|
-
return;
|
|
1126
|
-
}
|
|
1127
|
-
// Targets are keyed by their original workspace source path (the pruned
|
|
1128
|
-
// lockfile records them relocated under LOCAL_PATH_MODULES_DIR; strip it back
|
|
1129
|
-
// to read the target's manifest from disk).
|
|
1130
|
-
const targets = new Map();
|
|
1131
|
-
// Copied workspace modules and entries with resolved edges install their
|
|
1132
|
-
// recorded closure and are skipped; a link: target for the same path wins the
|
|
1133
|
-
// kind so the failure message names the sharper cause.
|
|
1134
|
-
for (const [key, entry] of Object.entries(parsed.packages ?? {})) {
|
|
1135
|
-
const directory = entry?.resolution?.directory;
|
|
1136
|
-
if (!directory || isUnderWorkspaceModules(directory)) {
|
|
1137
|
-
continue;
|
|
1138
|
-
}
|
|
1139
|
-
const source = uncontainLocalPath((0, path_2.normalizePath)(directory)).replace(/\/+$/, '');
|
|
1140
|
-
// The workspace root is not a shippable target, and validating it would
|
|
1141
|
-
// fail the build over the root manifest's own dependencies.
|
|
1142
|
-
if (source === '' || source === '.' || localPathEscapesOutput(source)) {
|
|
1143
|
-
continue;
|
|
1144
|
-
}
|
|
1145
|
-
const snapshot = parsed.snapshots?.[key] ?? entry;
|
|
1146
|
-
const hasEdges = LOCKFILE_DEP_SECTIONS.some((section) => Object.keys(snapshot?.[section] ?? {}).length > 0);
|
|
1147
|
-
if (!hasEdges) {
|
|
1148
|
-
targets.set(source, 'directory');
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
for (const { target } of collectPrunedLinkTargetDirs(parsed)) {
|
|
1152
|
-
const source = uncontainLocalPath(target);
|
|
1153
|
-
if (!localPathEscapesOutput(source)) {
|
|
1154
|
-
targets.set(source, 'link');
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
if (targets.size === 0) {
|
|
1158
|
-
return;
|
|
1159
|
-
}
|
|
1160
|
-
const rootInstalled = new Set([
|
|
1161
|
-
...Object.keys(packageJson.dependencies ?? {}),
|
|
1162
|
-
...Object.keys(packageJson.optionalDependencies ?? {}),
|
|
1163
|
-
...Object.keys(packageJson.peerDependencies ?? {}),
|
|
1164
|
-
]);
|
|
1165
|
-
const rootDev = new Set(Object.keys(packageJson.devDependencies ?? {}));
|
|
1166
|
-
const appName = packageJson.name || 'the app';
|
|
1167
|
-
let workspaceRootRealPath;
|
|
1168
|
-
try {
|
|
1169
|
-
workspaceRootRealPath = (0, fs_1.realpathSync)(workspaceRootPath);
|
|
1170
|
-
}
|
|
1171
|
-
catch {
|
|
1172
|
-
workspaceRootRealPath = workspaceRootPath;
|
|
1173
|
-
}
|
|
1174
|
-
for (const [target, kind] of targets) {
|
|
1175
|
-
// A target the output cannot carry has no closure to break in the deploy,
|
|
1176
|
-
// and the artifact collector reports why it cannot ship. Resolving it here
|
|
1177
|
-
// too is what keeps a symlinked target from failing the build over the
|
|
1178
|
-
// manifest of whatever it points at.
|
|
1179
|
-
if (!resolveLocalPathSource(target, workspaceRootPath, workspaceRootRealPath)
|
|
1180
|
-
.source) {
|
|
1181
|
-
continue;
|
|
1182
|
-
}
|
|
1183
|
-
const manifestPath = (0, path_1.join)(workspaceRootPath, target, 'package.json');
|
|
1184
|
-
if (!(0, fs_1.existsSync)(manifestPath)) {
|
|
1185
|
-
continue;
|
|
1186
|
-
}
|
|
1187
|
-
const descriptor = kind === 'link' ? 'linked package' : 'local package';
|
|
1188
|
-
let targetManifest;
|
|
1189
|
-
try {
|
|
1190
|
-
targetManifest = (0, fileutils_1.readJsonFile)(manifestPath);
|
|
1191
|
-
}
|
|
1192
|
-
catch {
|
|
1193
|
-
logger_1.logger.warn(`${descriptor} ${target} has an unreadable package.json at ${manifestPath}; its dependency closure was not validated for the standalone deploy.`);
|
|
1194
|
-
continue;
|
|
1195
|
-
}
|
|
1196
|
-
const targetName = targetManifest.name || target;
|
|
1197
|
-
for (const dep of Object.keys(targetManifest.dependencies ?? {})) {
|
|
1198
|
-
if (rootInstalled.has(dep)) {
|
|
1199
|
-
continue;
|
|
1200
|
-
}
|
|
1201
|
-
if (rootDev.has(dep)) {
|
|
1202
|
-
logger_1.logger.warn(`${descriptor} ${targetName} requires ${dep}, which is only a devDependency of ${appName}; a production (--prod) install of the standalone deploy would omit it.`);
|
|
1203
|
-
continue;
|
|
1204
|
-
}
|
|
1205
|
-
throw new Error(kind === 'link'
|
|
1206
|
-
? `linked package ${targetName} requires ${dep}, which won't be resolvable in the standalone deploy (link: cannot provide a self-contained dependency closure). Convert ${targetName} to a file: dependency for a self-contained artifact, or add ${dep} to ${appName}'s dependencies.`
|
|
1207
|
-
: `local package ${targetName} requires ${dep}, which won't be resolvable in the standalone deploy (its dependency closure was never resolved into the pruned lockfile). Declare ${targetName} as a regular dependency of the package that peer-depends on it, enable autoInstallPeers, or add ${dep} to ${appName}'s dependencies.`);
|
|
1208
|
-
}
|
|
1209
|
-
for (const dep of [
|
|
1210
|
-
...Object.keys(targetManifest.peerDependencies ?? {}),
|
|
1211
|
-
...Object.keys(targetManifest.optionalDependencies ?? {}),
|
|
1212
|
-
]) {
|
|
1213
|
-
if (rootInstalled.has(dep) || rootDev.has(dep)) {
|
|
1214
|
-
continue;
|
|
1215
|
-
}
|
|
1216
|
-
logger_1.logger.warn(`${descriptor} ${targetName} may need ${dep} at runtime, which is not a dependency of ${appName}; add it to ${appName} if it fails to resolve.`);
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
/**
|
|
1221
|
-
* Relocates a `file:`/`link:` specifier recorded relative to `sourceDir` so it
|
|
1222
|
-
* resolves from `destDir` (both workspace-root-relative posix paths, '' meaning
|
|
1223
|
-
* the workspace root itself) to the target's shipped location under
|
|
1224
|
-
* `LOCAL_PATH_MODULES_DIR`. Returns null for a non-local-path spec. When the
|
|
1225
|
-
* target cannot ship into the pruned output, `spec` is returned unchanged with
|
|
1226
|
-
* the `reason`: absolute or escaping the workspace root (`outside-workspace`),
|
|
1227
|
-
* or the workspace root itself (`workspace-root`).
|
|
1228
|
-
* Every layer of the pruned output (app manifest, copied-module manifests,
|
|
1229
|
-
* lockfile snapshot refs) relocates through this one function so the layers
|
|
1230
|
-
* cannot disagree.
|
|
1231
|
-
*/
|
|
1232
|
-
function relocatePrunedLocalPathSpec(spec, sourceDir, destDir) {
|
|
1233
|
-
const protocol = spec.startsWith('link:')
|
|
1234
|
-
? 'link:'
|
|
1235
|
-
: spec.startsWith('file:')
|
|
1236
|
-
? 'file:'
|
|
1237
|
-
: null;
|
|
1238
|
-
if (!protocol) {
|
|
1239
|
-
return null;
|
|
1240
|
-
}
|
|
1241
|
-
// Normalize separators before joining, matching the artifact shipping side:
|
|
1242
|
-
// a backslash-authored spec is one opaque segment to a posix join(), so its
|
|
1243
|
-
// `..` never resolves and an in-workspace target reads as escaping.
|
|
1244
|
-
const rawPath = (0, path_2.normalizePath)(spec.slice(protocol.length));
|
|
1245
|
-
// join() does not reset on an absolute segment; it would silently rebase the
|
|
1246
|
-
// target under sourceDir, so reject absolutes up front.
|
|
1247
|
-
if ((0, path_1.isAbsolute)(rawPath)) {
|
|
1248
|
-
return { spec, reason: 'outside-workspace' };
|
|
1249
|
-
}
|
|
1250
|
-
// join() keeps a trailing separator, so `../../` arrives as './' rather than
|
|
1251
|
-
// '.' and would slip past the workspace-root check below.
|
|
1252
|
-
const wsRelativeTarget = (0, path_2.normalizePath)((0, path_1.join)(sourceDir, rawPath)).replace(/\/+$/, '');
|
|
1253
|
-
// A `..` segment escapes the workspace, and so does an absolute result: the
|
|
1254
|
-
// absolute-spec check above cannot see an absolute `sourceDir`, which join()
|
|
1255
|
-
// carries through and containment would turn into
|
|
1256
|
-
// `local_path_modules//abs/...`, a path the output never ships.
|
|
1257
|
-
if ((0, path_1.isAbsolute)(wsRelativeTarget) ||
|
|
1258
|
-
wsRelativeTarget.split('/').includes('..')) {
|
|
1259
|
-
return { spec, reason: 'outside-workspace' };
|
|
1260
|
-
}
|
|
1261
|
-
if (wsRelativeTarget === '' || wsRelativeTarget === '.') {
|
|
1262
|
-
return { spec, reason: 'workspace-root' };
|
|
1263
|
-
}
|
|
1264
|
-
// The target ships under LOCAL_PATH_MODULES_DIR (see containLocalPath), so
|
|
1265
|
-
// resolve the spec against its shipped location, not its workspace path.
|
|
1266
|
-
const shippedTarget = containLocalPath(wsRelativeTarget);
|
|
1267
|
-
const relocated = destDir === '' || destDir === '.'
|
|
1268
|
-
? shippedTarget
|
|
1269
|
-
: (0, path_2.normalizePath)((0, path_1.relative)(destDir, shippedTarget));
|
|
1270
|
-
return { spec: `${protocol}${relocated}` };
|
|
1271
|
-
}
|
|
1272
|
-
/**
|
|
1273
|
-
* Warns when a pruned pnpm lockfile needs install-time artifacts that only
|
|
1274
|
-
* `generatePrunedDeployOutput` ships, naming the ones this workspace actually
|
|
1275
|
-
* needs. For callers of
|
|
1276
|
-
* the bare `createLockFile`, which hands back a lockfile and nothing else: the
|
|
1277
|
-
* pieces below live outside it, so an output assembled from the lockfile and
|
|
1278
|
-
* the manifest alone installs without the workspace's build-script approvals,
|
|
1279
|
-
* patches, or vendored local paths. Silent when the workspace needs none of
|
|
1280
|
-
* them, which is the common case.
|
|
1281
|
-
*/
|
|
1282
|
-
function warnIncompletePrunedPnpmOutput(lockFileContent, workspaceRootPath = workspace_root_1.workspaceRoot) {
|
|
1283
|
-
const missing = [];
|
|
1284
|
-
// Keyed on the approvals themselves rather than on the emitted file, which a
|
|
1285
|
-
// workspace declaring only patches still gets.
|
|
1286
|
-
const workspaceSettings = getPrunedPnpmWorkspaceSettings(workspaceRootPath, lockFileContent);
|
|
1287
|
-
if (workspaceSettings?.allowBuilds !== undefined ||
|
|
1288
|
-
workspaceSettings?.supportedArchitectures !== undefined ||
|
|
1289
|
-
getPrunedPnpmPackageJsonBuildSettings(workspaceRootPath, lockFileContent)) {
|
|
1290
|
-
missing.push('the build-script approvals and supportedArchitectures the workspace declares');
|
|
1291
|
-
}
|
|
1292
|
-
if (Object.keys(getPrunedPatchedDependencies(workspaceRootPath, lockFileContent)).length > 0) {
|
|
1293
|
-
missing.push('the patch files its patchedDependencies declare');
|
|
1294
|
-
}
|
|
1295
|
-
if (prunedLockfileReferencesLocalPaths(lockFileContent)) {
|
|
1296
|
-
missing.push('the vendored file:/link: dependencies it references');
|
|
1297
|
-
}
|
|
1298
|
-
if (missing.length === 0) {
|
|
1299
|
-
return;
|
|
1300
|
-
}
|
|
1301
|
-
output_1.output.warn({
|
|
1302
|
-
title: 'The pruned pnpm lockfile needs artifacts this call does not return',
|
|
1303
|
-
bodyLines: [
|
|
1304
|
-
`A standalone install of the output will be missing ${missing.join(', and ')}.`,
|
|
1305
|
-
'Use generatePrunedDeployOutput to ship them.',
|
|
1306
|
-
],
|
|
1307
|
-
});
|
|
1308
|
-
}
|
|
1309
|
-
/** Warns that a local-path target cannot ship, with the reason-specific remedy. */
|
|
1310
|
-
function warnUnshippableLocalPathSpec(description, reason) {
|
|
1311
|
-
logger_1.logger.warn(reason === 'workspace-root'
|
|
1312
|
-
? `Local-path dependency ${description} resolves to the workspace root itself and cannot be shipped into the pruned output.`
|
|
1313
|
-
: `Local-path dependency ${description} resolves outside the workspace root and cannot be shipped into the pruned output. Vendor it inside the workspace to deploy it.`);
|
|
1314
|
-
}
|
|
1315
|
-
/**
|
|
1316
|
-
* Moves a peer dependency into `dependencies` under the given specifier: pnpm
|
|
1317
|
-
* rejects a `file:`/`link:` spec under peerDependencies outright, so a shipped
|
|
1318
|
-
* local path or workspace module declared there would fail the whole install.
|
|
1319
|
-
* The `peerDependenciesMeta` entry goes with it, since the optional/required
|
|
1320
|
-
* marker is orphaned once the dependency is no longer a peer.
|
|
1321
|
-
*/
|
|
1322
|
-
function movePeerDependencyToDependencies(packageJson, name, spec) {
|
|
1323
|
-
(packageJson.dependencies ??= {})[name] = spec;
|
|
1324
|
-
if (packageJson.peerDependencies) {
|
|
1325
|
-
delete packageJson.peerDependencies[name];
|
|
1326
|
-
}
|
|
1327
|
-
if (packageJson.peerDependenciesMeta) {
|
|
1328
|
-
delete packageJson.peerDependenciesMeta[name];
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
/**
|
|
1332
|
-
* Drops a `peerDependencies`/`peerDependenciesMeta` section left empty by
|
|
1333
|
-
* `movePeerDependencyToDependencies`, so a manifest that declared nothing but
|
|
1334
|
-
* moved peers does not ship an empty section.
|
|
1335
|
-
*/
|
|
1336
|
-
function dropEmptyPeerDependencySections(packageJson) {
|
|
1337
|
-
if (packageJson.peerDependencies &&
|
|
1338
|
-
Object.keys(packageJson.peerDependencies).length === 0) {
|
|
1339
|
-
delete packageJson.peerDependencies;
|
|
1340
|
-
}
|
|
1341
|
-
if (packageJson.peerDependenciesMeta &&
|
|
1342
|
-
Object.keys(packageJson.peerDependenciesMeta).length === 0) {
|
|
1343
|
-
delete packageJson.peerDependenciesMeta;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
/**
|
|
1347
|
-
* Rewrites a standalone pruned manifest's non-workspace local-path specifiers
|
|
1348
|
-
* (`file:` tarball/dir, `link:` dir) to their shipped location under
|
|
1349
|
-
* `LOCAL_PATH_MODULES_DIR`, so a non-frozen `pnpm install` of the deploy
|
|
1350
|
-
* output resolves them from where the shipped source sits (see
|
|
1351
|
-
* `getPrunedPnpmLocalPathArtifacts`). Mutates `packageJson` in place.
|
|
1352
|
-
* pnpm-only; call sites gate on the package manager.
|
|
1353
|
-
*
|
|
1354
|
-
* Per specifier, in order: resolve a `catalog:` reference first (the bundler's
|
|
1355
|
-
* `createPackageJson` does not), skip a workspace package (copied to
|
|
1356
|
-
* `workspace_modules/`), then relocate from `projectRoot`-relative to the
|
|
1357
|
-
* shipped location. A `file:`/`link:` peer dependency is moved into
|
|
1358
|
-
* `dependencies` with its `peerDependenciesMeta` entry dropped even when the
|
|
1359
|
-
* target cannot ship (pnpm rejects such a spec under peerDependencies
|
|
1360
|
-
* outright, so leaving it would fail the whole install), mirroring the
|
|
1361
|
-
* workspace-module handling. An unshippable target otherwise keeps its
|
|
1362
|
-
* specifier, with a warning.
|
|
1363
|
-
*/
|
|
1364
|
-
function rewritePrunedLocalPathSpecifiers(packageJson, projectRoot, workspaceRootPath, workspacePackageNames) {
|
|
1365
|
-
const catalogManager = (0, catalog_1.getCatalogManager)(workspaceRootPath);
|
|
1366
|
-
const sections = [
|
|
1367
|
-
'dependencies',
|
|
1368
|
-
'optionalDependencies',
|
|
1369
|
-
'devDependencies',
|
|
1370
|
-
'peerDependencies',
|
|
1371
|
-
];
|
|
1372
|
-
for (const section of sections) {
|
|
1373
|
-
const deps = packageJson[section];
|
|
1374
|
-
if (!deps) {
|
|
1375
|
-
continue;
|
|
1376
|
-
}
|
|
1377
|
-
for (const [name, specifier] of Object.entries(deps)) {
|
|
1378
|
-
let resolved = specifier;
|
|
1379
|
-
if (catalogManager?.isCatalogReference(specifier)) {
|
|
1380
|
-
const resolvedCatalog = catalogManager.resolveCatalogReference(workspaceRootPath, name, specifier);
|
|
1381
|
-
if (resolvedCatalog) {
|
|
1382
|
-
resolved = resolvedCatalog;
|
|
1383
|
-
deps[name] = resolvedCatalog;
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
if (workspacePackageNames.has(name)) {
|
|
1387
|
-
continue;
|
|
1388
|
-
}
|
|
1389
|
-
const relocation = relocatePrunedLocalPathSpec(resolved, projectRoot, '');
|
|
1390
|
-
if (!relocation) {
|
|
1391
|
-
continue;
|
|
1392
|
-
}
|
|
1393
|
-
if (relocation.reason) {
|
|
1394
|
-
warnUnshippableLocalPathSpec(`"${name}": "${resolved}"`, relocation.reason);
|
|
1395
|
-
}
|
|
1396
|
-
if (section === 'peerDependencies') {
|
|
1397
|
-
// Moved even when the target cannot ship: pnpm rejects the spec here
|
|
1398
|
-
// either way, so leaving it would fail the whole install.
|
|
1399
|
-
movePeerDependencyToDependencies(packageJson, name, relocation.spec);
|
|
1400
|
-
}
|
|
1401
|
-
else if (!relocation.reason) {
|
|
1402
|
-
deps[name] = relocation.spec;
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
dropEmptyPeerDependencySections(packageJson);
|
|
1407
|
-
}
|
|
1408
|
-
/**
|
|
1409
|
-
* The pnpm install-time artifacts a standalone pruned output needs, as data
|
|
1410
|
-
* for a caller to write or emit: the settings-only pnpm-workspace.yaml, the
|
|
1411
|
-
* `pnpm patch` files, and the non-workspace local-path dependencies (carried
|
|
1412
|
-
* as a source path rather than content so a directory sink can copy them
|
|
1413
|
-
* straight across). Everything is resolved before returning, so a colliding
|
|
1414
|
-
* patch path aborts before the caller ships anything. The pnpm <=10
|
|
1415
|
-
* build-script approvals and `patchedDependencies` declaration are folded onto
|
|
1416
|
-
* `packageJson` in place (see `getPrunedPnpmPackageJsonBuildSettings`), so
|
|
1417
|
-
* write or emit the manifest after this returns.
|
|
1418
|
-
*
|
|
1419
|
-
* Pass `includeLocalPathArtifacts: false` for the root-lockfile fallback
|
|
1420
|
-
* (`pruned: false` from `createPrunedLockfile`): its importer references the
|
|
1421
|
-
* whole workspace, so shipping its local-path trees would copy unrelated
|
|
1422
|
-
* sources into the output.
|
|
1423
|
-
*/
|
|
1424
|
-
function getPrunedPnpmInstallArtifacts(workspaceRootPath, prunedLockfileContent, packageJson, options) {
|
|
1425
|
-
const config = {
|
|
1426
|
-
pnpmMajor: getPnpmMajorOrWarn(workspaceRootPath),
|
|
1427
|
-
patchedDependencies: getPrunedPatchedDependencies(workspaceRootPath, prunedLockfileContent),
|
|
1428
|
-
};
|
|
1429
|
-
const { patchFiles, packageJsonPatchedDependencies } = getPrunedPnpmPatchArtifacts(workspaceRootPath, prunedLockfileContent, config);
|
|
1430
|
-
const yaml = getPrunedPnpmInstallSettingsYaml(workspaceRootPath, prunedLockfileContent, config);
|
|
1431
|
-
const artifacts = [
|
|
1432
|
-
{ path: 'pnpm-workspace.yaml', content: yaml },
|
|
1433
|
-
];
|
|
1434
|
-
artifacts.push(...patchFiles);
|
|
1435
|
-
if (options?.includeLocalPathArtifacts !== false) {
|
|
1436
|
-
artifacts.push(...getPrunedPnpmLocalPathArtifacts(workspaceRootPath, prunedLockfileContent));
|
|
1437
|
-
}
|
|
1438
|
-
const buildSettings = getPrunedPnpmPackageJsonBuildSettings(workspaceRootPath, prunedLockfileContent, config);
|
|
1439
|
-
applyPrunedPnpmPackageJsonSettings(packageJson, buildSettings, packageJsonPatchedDependencies);
|
|
1440
|
-
return artifacts;
|
|
1441
|
-
}
|