@depup/nx 23.1.2-depup.1 → 23.2.0-depup.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 +7 -6
- package/changes.json +12 -8
- package/dist/bin/init-local.js +3 -5
- package/dist/bin/nx.js +1 -0
- package/dist/src/adapter/ngcli-adapter.js +60 -1
- package/dist/src/ai/constants.d.ts +15 -0
- package/dist/src/ai/constants.js +17 -1
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +57 -9
- package/dist/src/ai/utils.d.ts +13 -0
- package/dist/src/ai/utils.js +29 -0
- package/dist/src/analytics/analytics.js +2 -4
- package/dist/src/command-line/completion/command-object.js +7 -12
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +42 -31
- package/dist/src/command-line/format/format.js +84 -101
- package/dist/src/command-line/generate/generate.js +35 -35
- package/dist/src/command-line/import/import.js +29 -38
- package/dist/src/command-line/init/ai-agent-prompts.js +5 -11
- package/dist/src/command-line/init/command-object.js +4 -2
- package/dist/src/command-line/init/configure-plugins.js +4 -1
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +12 -32
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +17 -21
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +8 -21
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +3 -17
- package/dist/src/command-line/init/implementation/angular/index.js +10 -15
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +2 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +8 -2
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.js +2 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +5 -0
- package/dist/src/command-line/init/implementation/format.d.ts +18 -0
- package/dist/src/command-line/init/implementation/format.js +114 -0
- package/dist/src/command-line/init/implementation/utils.js +8 -8
- package/dist/src/command-line/init/init-v1.js +15 -18
- package/dist/src/command-line/init/init-v2.js +77 -66
- package/dist/src/command-line/migrate/agentic/definitions.js +36 -9
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +37 -22
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +30 -39
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +7 -7
- package/dist/src/command-line/migrate/agentic/handoff.js +13 -10
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +7 -12
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +7 -0
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +10 -0
- package/dist/src/command-line/migrate/agentic/run-step.js +1 -0
- package/dist/src/command-line/migrate/agentic/runner.js +24 -24
- package/dist/src/command-line/migrate/agentic/select.d.ts +10 -2
- package/dist/src/command-line/migrate/agentic/select.js +30 -32
- package/dist/src/command-line/migrate/agentic/types.d.ts +33 -3
- package/dist/src/command-line/migrate/agentic/types.js +35 -0
- package/dist/src/command-line/migrate/command-object.d.ts +6 -0
- package/dist/src/command-line/migrate/command-object.js +19 -1
- package/dist/src/command-line/migrate/execute-migration.d.ts +28 -9
- package/dist/src/command-line/migrate/execute-migration.js +112 -27
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +35 -0
- package/dist/src/command-line/migrate/migrate-analytics.js +64 -0
- package/dist/src/command-line/migrate/migrate-commits.d.ts +38 -8
- package/dist/src/command-line/migrate/migrate-commits.js +130 -15
- package/dist/src/command-line/migrate/migrate-config.d.ts +13 -12
- package/dist/src/command-line/migrate/migrate-config.js +22 -14
- package/dist/src/command-line/migrate/migrate-output.d.ts +45 -7
- package/dist/src/command-line/migrate/migrate-output.js +52 -8
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +2 -1
- package/dist/src/command-line/migrate/migrate-ui-api.js +16 -7
- package/dist/src/command-line/migrate/migrate.d.ts +24 -55
- package/dist/src/command-line/migrate/migrate.js +553 -226
- package/dist/src/command-line/migrate/migration-shape.d.ts +8 -0
- package/dist/src/command-line/migrate/multi-major.js +7 -10
- package/dist/src/command-line/migrate/resolve-package-version.js +4 -8
- package/dist/src/command-line/migrate/run/agent-output.d.ts +20 -0
- package/dist/src/command-line/migrate/run/agent-output.js +65 -0
- package/dist/src/command-line/migrate/run/index.d.ts +9 -0
- package/dist/src/command-line/migrate/run/index.js +23 -0
- package/dist/src/command-line/migrate/run/orchestrator.d.ts +20 -0
- package/dist/src/command-line/migrate/run/orchestrator.js +1200 -0
- package/dist/src/command-line/migrate/run/run-id.d.ts +16 -0
- package/dist/src/command-line/migrate/run/run-id.js +56 -0
- package/dist/src/command-line/migrate/run/run-state.d.ts +157 -0
- package/dist/src/command-line/migrate/run/run-state.js +438 -0
- package/dist/src/command-line/migrate/run/state-lock.d.ts +25 -0
- package/dist/src/command-line/migrate/run/state-lock.js +76 -0
- package/dist/src/command-line/migrate/run/state-machine.d.ts +84 -0
- package/dist/src/command-line/migrate/run/state-machine.js +315 -0
- package/dist/src/command-line/migrate/run/util.d.ts +59 -0
- package/dist/src/command-line/migrate/run/util.js +148 -0
- package/dist/src/command-line/migrate/run/worker.d.ts +16 -0
- package/dist/src/command-line/migrate/run/worker.js +682 -0
- package/dist/src/command-line/migrate/run-migration-process.js +6 -5
- package/dist/src/command-line/migrate/safe-prompt.d.ts +14 -26
- package/dist/src/command-line/migrate/safe-prompt.js +32 -43
- package/dist/src/command-line/migrate/sort-migrations.d.ts +16 -0
- package/dist/src/command-line/migrate/sort-migrations.js +32 -0
- package/dist/src/command-line/migrate/step-actions.d.ts +5 -0
- package/dist/src/command-line/migrate/step-actions.js +12 -0
- package/dist/src/command-line/migrate/text.d.ts +18 -0
- package/dist/src/command-line/migrate/text.js +26 -0
- package/dist/src/command-line/migrate/version-skew-guard.d.ts +60 -0
- package/dist/src/command-line/migrate/version-skew-guard.js +175 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +16 -20
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.js +13 -0
- package/dist/src/command-line/nx-commands.js +26 -24
- package/dist/src/command-line/release/changelog.js +6 -17
- package/dist/src/command-line/release/plan.js +15 -28
- package/dist/src/command-line/release/publish.js +5 -0
- package/dist/src/command-line/release/release.js +6 -17
- package/dist/src/command-line/release/utils/release-graph.d.ts +1 -0
- package/dist/src/command-line/release/utils/release-graph.js +10 -2
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +10 -22
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +13 -22
- package/dist/src/command-line/release/utils/resolve-semver-specifier.js +19 -41
- package/dist/src/command-line/release/version/resolve-current-version.js +7 -10
- package/dist/src/command-line/release/version.js +2 -2
- package/dist/src/command-line/reset/reset.js +17 -15
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +1 -1
- package/dist/src/command-line/yargs-utils/shared-options.js +3 -1
- package/dist/src/config/misc-interfaces.d.ts +19 -7
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/core/graph/styles.js +1 -1
- package/dist/src/daemon/client/client.d.ts +2 -7
- package/dist/src/daemon/client/client.js +113 -28
- package/dist/src/daemon/client/daemon-environment.d.ts +35 -0
- package/dist/src/daemon/client/daemon-environment.js +106 -6
- package/dist/src/daemon/client/daemon-socket-messenger.d.ts +1 -1
- package/dist/src/daemon/client/daemon-socket-messenger.js +8 -3
- package/dist/src/daemon/is-v8-serializer-enabled.d.ts +2 -2
- package/dist/src/daemon/is-v8-serializer-enabled.js +2 -2
- package/dist/src/daemon/message-types/daemon-message.d.ts +2 -1
- package/dist/src/daemon/message-types/daemon-message.js +25 -2
- package/dist/src/daemon/sandbox-socket-hint.d.ts +27 -0
- package/dist/src/daemon/sandbox-socket-hint.js +136 -0
- package/dist/src/daemon/server/client-socket-context.d.ts +1 -1
- package/dist/src/daemon/server/client-socket-context.js +2 -3
- package/dist/src/daemon/server/dotenv-graph-changes.d.ts +97 -0
- package/dist/src/daemon/server/dotenv-graph-changes.js +284 -0
- package/dist/src/daemon/server/handle-client-env.d.ts +8 -0
- package/dist/src/daemon/server/handle-client-env.js +92 -0
- package/dist/src/daemon/server/handle-outputs-changes.d.ts +10 -0
- package/dist/src/daemon/server/handle-outputs-changes.js +86 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +21 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +159 -6
- package/dist/src/daemon/server/server.js +36 -72
- package/dist/src/daemon/server/shutdown-utils.d.ts +1 -1
- package/dist/src/daemon/server/shutdown-utils.js +2 -2
- package/dist/src/daemon/socket-utils.d.ts +26 -7
- package/dist/src/daemon/socket-utils.js +45 -31
- package/dist/src/daemon/tmp-dir.d.ts +10 -0
- package/dist/src/daemon/tmp-dir.js +21 -37
- package/dist/src/devkit-internals.d.ts +20 -9
- package/dist/src/devkit-internals.js +49 -6
- package/dist/src/executors/run-commands/running-tasks.js +46 -29
- package/dist/src/generators/internal-utils/{format-changed-files-with-prettier-if-available.d.ts → format-changed-files.d.ts} +6 -6
- package/dist/src/generators/internal-utils/format-changed-files.js +163 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +15 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +21 -3
- package/dist/src/migrations/update-15-0-0/prefix-outputs.js +2 -2
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +2 -2
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +2 -2
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +2 -2
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +2 -2
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +2 -2
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +2 -2
- package/dist/src/migrations/update-17-2-0/move-default-base.js +2 -2
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +2 -2
- package/dist/src/migrations/update-19-2-4/set-project-name.js +2 -2
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +2 -2
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +2 -2
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +2 -2
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +2 -2
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +2 -2
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +2 -2
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +2 -2
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +2 -2
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +2 -2
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +2 -2
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +2 -2
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +2 -2
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +2 -2
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +2 -2
- package/dist/src/native/index.d.ts +7 -3
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +3 -3
- package/dist/src/nx-cloud/utilities/url-shorten.d.ts +1 -4
- package/dist/src/nx-cloud/utilities/url-shorten.js +9 -8
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +46 -4
- package/dist/src/plugins/js/lock-file/lock-file.js +192 -15
- package/dist/src/plugins/js/lock-file/npm-parser.js +10 -3
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +356 -62
- package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +25 -1
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +78 -4
- package/dist/src/plugins/js/lock-file/pruned-output.d.ts +330 -0
- package/dist/src/plugins/js/lock-file/pruned-output.js +1441 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +1 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +6 -5
- package/dist/src/plugins/js/utils/register.d.ts +11 -0
- package/dist/src/plugins/js/utils/register.js +40 -6
- package/dist/src/project-graph/plugins/get-plugins.d.ts +27 -1
- package/dist/src/project-graph/plugins/get-plugins.js +110 -5
- package/dist/src/project-graph/plugins/isolation/enabled.js +1 -4
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +16 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +69 -11
- package/dist/src/project-graph/plugins/isolation/messaging.js +1 -3
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +23 -2
- package/dist/src/project-graph/project-graph.js +27 -2
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +7 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +14 -6
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +47 -21
- package/dist/src/tasks-runner/is-tui-enabled.js +3 -1
- package/dist/src/tasks-runner/life-cycle.d.ts +2 -2
- package/dist/src/tasks-runner/life-cycle.js +2 -2
- package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +12 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.js +62 -3
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +26 -1
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +99 -5
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +26 -0
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +113 -17
- package/dist/src/tasks-runner/pseudo-ipc.js +14 -13
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +17 -3
- package/dist/src/tasks-runner/pseudo-terminal.js +22 -10
- package/dist/src/tasks-runner/run-command.js +32 -39
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +55 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.js +161 -8
- package/dist/src/tasks-runner/task-env.d.ts +25 -0
- package/dist/src/tasks-runner/task-env.js +39 -0
- package/dist/src/tasks-runner/task-orchestrator.d.ts +68 -0
- package/dist/src/tasks-runner/task-orchestrator.js +159 -8
- package/dist/src/utils/analytics-enabled.d.ts +7 -0
- package/dist/src/utils/analytics-enabled.js +11 -0
- package/dist/src/utils/analytics-prompt.js +4 -7
- package/dist/src/utils/cache-directory.d.ts +62 -3
- package/dist/src/utils/cache-directory.js +276 -25
- package/dist/src/utils/catalog/bun-manager-utils.d.ts +8 -0
- package/dist/src/utils/catalog/bun-manager-utils.js +174 -0
- package/dist/src/utils/catalog/bun-manager.d.ts +28 -0
- package/dist/src/utils/catalog/bun-manager.js +130 -0
- package/dist/src/utils/catalog/index.d.ts +1 -1
- package/dist/src/utils/catalog/index.js +1 -1
- package/dist/src/utils/catalog/manager-factory.js +3 -0
- package/dist/src/utils/catalog/manager-utils.d.ts +8 -1
- package/dist/src/utils/catalog/manager-utils.js +9 -4
- package/dist/src/utils/catalog/manager.d.ts +13 -1
- package/dist/src/utils/catalog/manager.js +30 -0
- package/dist/src/utils/catalog/pnpm-manager.d.ts +2 -1
- package/dist/src/utils/catalog/pnpm-manager.js +3 -0
- package/dist/src/utils/catalog/types.d.ts +4 -0
- package/dist/src/utils/catalog/yarn-manager.d.ts +6 -2
- package/dist/src/utils/catalog/yarn-manager.js +23 -32
- package/dist/src/utils/child-process.d.ts +31 -1
- package/dist/src/utils/child-process.js +103 -0
- package/dist/src/utils/chunkify.d.ts +7 -1
- package/dist/src/utils/chunkify.js +10 -3
- package/dist/src/utils/consume-messages-from-socket.d.ts +42 -7
- package/dist/src/utils/consume-messages-from-socket.js +273 -38
- package/dist/src/utils/db-connection.js +8 -16
- package/dist/src/utils/exit-codes.d.ts +9 -0
- package/dist/src/utils/exit-codes.js +19 -0
- package/dist/src/utils/formatters/index.d.ts +13 -0
- package/dist/src/utils/formatters/index.js +74 -0
- package/dist/src/utils/formatters/oxfmt.d.ts +32 -0
- package/dist/src/utils/formatters/oxfmt.js +764 -0
- package/dist/src/utils/formatters/prettier.d.ts +26 -0
- package/dist/src/utils/formatters/prettier.js +201 -0
- package/dist/src/utils/formatters/shared.d.ts +5 -0
- package/dist/src/utils/formatters/shared.js +8 -0
- package/dist/src/utils/git-utils.d.ts +38 -2
- package/dist/src/utils/git-utils.js +422 -19
- package/dist/src/utils/has-nx-js-plugin.d.ts +1 -1
- package/dist/src/utils/has-nx-js-plugin.js +1 -1
- package/dist/src/utils/ignore.d.ts +47 -5
- package/dist/src/utils/ignore.js +93 -11
- package/dist/src/utils/kill-child-on-host-exit.d.ts +7 -0
- package/dist/src/utils/kill-child-on-host-exit.js +42 -0
- package/dist/src/utils/nx-console-prompt.js +3 -6
- package/dist/src/utils/nx-tmp-dir.d.ts +5 -0
- package/dist/src/utils/nx-tmp-dir.js +7 -2
- package/dist/src/utils/output.d.ts +153 -0
- package/dist/src/utils/output.js +289 -5
- package/dist/src/utils/owned-private-dir.d.ts +13 -0
- package/dist/src/utils/owned-private-dir.js +39 -0
- package/dist/src/utils/package-json.d.ts +2 -0
- package/dist/src/utils/package-manager.js +17 -7
- package/dist/src/utils/params.d.ts +7 -1
- package/dist/src/utils/params.js +64 -6
- package/dist/src/utils/permission-errors.d.ts +11 -0
- package/dist/src/utils/permission-errors.js +17 -0
- package/dist/src/utils/plugins/core-plugins.js +4 -0
- package/dist/src/utils/prompt-helpers.d.ts +53 -0
- package/dist/src/utils/prompt-helpers.js +111 -0
- package/dist/src/utils/socket-refused-exit-code.d.ts +15 -0
- package/dist/src/utils/socket-refused-exit-code.js +18 -0
- package/dist/src/utils/write-formatted-json-file.d.ts +3 -2
- package/dist/src/utils/write-formatted-json-file.js +5 -4
- package/package.json +33 -24
- package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +0 -88
- package/dist/src/utils/is-using-prettier.d.ts +0 -3
- package/dist/src/utils/is-using-prettier.js +0 -62
|
@@ -148,11 +148,15 @@ async function runSingleMigration(workspacePath, migration, configuration) {
|
|
|
148
148
|
if (result.type === 'error') {
|
|
149
149
|
throw new Error(result.message);
|
|
150
150
|
}
|
|
151
|
-
const { fileChanges, gitRefAfter, nextSteps } = result;
|
|
151
|
+
const { fileChanges, gitRefAfter, nextSteps, skipAgentic } = result;
|
|
152
152
|
modifyMigrationsJsonMetadata(workspacePath, addSuccessfulMigration(migration.id, fileChanges.map((change) => ({
|
|
153
153
|
path: change.path,
|
|
154
154
|
type: change.type,
|
|
155
|
-
})), gitRefAfter, nextSteps
|
|
155
|
+
})), gitRefAfter, nextSteps,
|
|
156
|
+
// Only a hybrid has a prompt phase to waive. A generator-only
|
|
157
|
+
// migration has no prompt affordance in the UI, so recording it there
|
|
158
|
+
// would mark a state the UI never shows.
|
|
159
|
+
skipAgentic === true && (0, migrate_1.isHybridMigration)(migration)));
|
|
156
160
|
if (gitRefBefore !== gitRefAfter) {
|
|
157
161
|
try {
|
|
158
162
|
(0, child_process_1.execSync)('git add migrations.json', {
|
|
@@ -225,17 +229,21 @@ function modifyMigrationsJsonMetadata(workspacePath, modify) {
|
|
|
225
229
|
migrationsJson['nx-console'] = modify(migrationsJson['nx-console']);
|
|
226
230
|
(0, fs_1.writeFileSync)(migrationsJsonPath, JSON.stringify(migrationsJson, null, 2));
|
|
227
231
|
}
|
|
228
|
-
function addSuccessfulMigration(id, fileChanges, ref, nextSteps) {
|
|
232
|
+
function addSuccessfulMigration(id, fileChanges, ref, nextSteps, skipAgentic = false) {
|
|
229
233
|
return (migrationsJsonMetadata) => {
|
|
230
234
|
const copied = { ...migrationsJsonMetadata };
|
|
231
235
|
if (!copied.completedMigrations) {
|
|
232
236
|
copied.completedMigrations = {};
|
|
233
237
|
}
|
|
234
|
-
// Carry
|
|
235
|
-
//
|
|
236
|
-
//
|
|
238
|
+
// A rerun re-records the same id. Carry an ack forward only off a record
|
|
239
|
+
// that carries no waiver: once a waiving run writes one it is
|
|
240
|
+
// byte-identical to a user's, so a rerun that owes the prompt again re-asks
|
|
241
|
+
// rather than trust it. Waiving sets the ack because nothing is owed.
|
|
237
242
|
const existing = copied.completedMigrations[id];
|
|
238
|
-
const acknowledgedPrompt =
|
|
243
|
+
const acknowledgedPrompt = skipAgentic ||
|
|
244
|
+
(existing?.type === 'successful' &&
|
|
245
|
+
existing.acknowledgedPrompt &&
|
|
246
|
+
!existing.skipAgentic);
|
|
239
247
|
copied.completedMigrations = {
|
|
240
248
|
...copied.completedMigrations,
|
|
241
249
|
[id]: {
|
|
@@ -245,6 +253,7 @@ function addSuccessfulMigration(id, fileChanges, ref, nextSteps) {
|
|
|
245
253
|
ref,
|
|
246
254
|
nextSteps,
|
|
247
255
|
...(acknowledgedPrompt && { acknowledgedPrompt: true }),
|
|
256
|
+
...(skipAgentic && { skipAgentic: true }),
|
|
248
257
|
},
|
|
249
258
|
};
|
|
250
259
|
return copied;
|
|
@@ -5,10 +5,12 @@ import { PackageManagerCommands } from '../../utils/package-manager';
|
|
|
5
5
|
import { type MigrateFetchStats, type MigrateMultiMajorChoice } from './migrate-analytics';
|
|
6
6
|
import { type MultiMajorMode } from './multi-major';
|
|
7
7
|
import type { AgenticArg } from './agentic/select';
|
|
8
|
+
import { MigrateArgs } from './command-object';
|
|
8
9
|
import type { ResolvedAgentic } from './agentic/types';
|
|
9
|
-
import { isHybridMigration, isPromptOnlyMigration } from './migration-shape';
|
|
10
|
+
import { isHybridMigration, isPromptOnlyMigration, type PlannedMigration } from './migration-shape';
|
|
10
11
|
import { filterDowngradedUpdates } from './update-filters';
|
|
11
12
|
import { normalizeVersion } from './version-utils';
|
|
13
|
+
import { type StepAction } from './step-actions';
|
|
12
14
|
export * from './execute-migration';
|
|
13
15
|
export { normalizeVersion };
|
|
14
16
|
export interface ResolvedMigrationConfiguration extends MigrationsJson {
|
|
@@ -170,75 +172,43 @@ type RunMigrations = {
|
|
|
170
172
|
validate?: boolean;
|
|
171
173
|
interactive?: boolean;
|
|
172
174
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
type RunSingleMigration = {
|
|
176
|
+
type: 'runSingleMigration';
|
|
177
|
+
runMigration: string;
|
|
178
|
+
runId?: string;
|
|
179
|
+
agentic: AgenticArg;
|
|
180
|
+
validate?: boolean;
|
|
181
|
+
interactive?: boolean;
|
|
182
|
+
};
|
|
183
|
+
type OrchestratorReconcile = {
|
|
184
|
+
type: 'orchestratorReconcile';
|
|
185
|
+
runId: string;
|
|
186
|
+
stepAction?: StepAction;
|
|
187
|
+
};
|
|
188
|
+
export declare function parseMigrationsOptions(options: MigrateArgs, fetch?: MigratorOptions['fetch']): Promise<GenerateMigrations | RunMigrations | RunSingleMigration | OrchestratorReconcile>;
|
|
176
189
|
export declare function createFetcher(pmc: PackageManagerCommands): ((pkg: string, version: string) => Promise<ResolvedMigrationConfiguration>) & {
|
|
177
190
|
stats?: MigrateFetchStats;
|
|
178
191
|
};
|
|
179
192
|
export { filterDowngradedUpdates };
|
|
180
193
|
export declare function generateMigrationsJsonAndUpdatePackageJson(root: string, opts: GenerateMigrations, fetch?: MigratorOptions['fetch']): Promise<void>;
|
|
181
|
-
type ExecutableMigration = {
|
|
182
|
-
package: string;
|
|
183
|
-
name: string;
|
|
184
|
-
description?: string;
|
|
185
|
-
version: string;
|
|
186
|
-
implementation?: string;
|
|
187
|
-
factory?: string;
|
|
188
|
-
prompt?: string;
|
|
189
|
-
documentation?: string;
|
|
190
|
-
};
|
|
191
194
|
export { isPromptOnlyMigration, isHybridMigration };
|
|
192
|
-
export declare function
|
|
193
|
-
export declare function
|
|
194
|
-
|
|
195
|
-
* Resolves the effective `--create-commits` state once the agentic flow has
|
|
196
|
-
* been resolved. The agent's outer prompt only embeds the impl-phase file list
|
|
197
|
-
* when per-migration commits isolate each migration's diff, so the diff-context
|
|
198
|
-
* flag returned here gates that section.
|
|
199
|
-
*/
|
|
200
|
-
export declare function resolveCreateCommits(args: {
|
|
201
|
-
createCommits: boolean | undefined;
|
|
202
|
-
agenticKind: ResolvedAgentic['kind'];
|
|
203
|
-
isGitRepo: boolean;
|
|
204
|
-
/**
|
|
205
|
-
* Whether `--commit-prefix` was given a non-default value. When commits
|
|
206
|
-
* end up disabled, the prefix has no effect — the warning copy below
|
|
207
|
-
* surfaces that so the user isn't silently misled.
|
|
208
|
-
*/
|
|
209
|
-
commitPrefixIsCustom?: boolean;
|
|
210
|
-
}): {
|
|
211
|
-
effective: boolean;
|
|
212
|
-
agenticHasDiffContext: boolean;
|
|
213
|
-
warning?: string;
|
|
214
|
-
error?: string;
|
|
215
|
-
};
|
|
216
|
-
/**
|
|
217
|
-
* Resolves whether the framework-owned generic-validation agent step should run
|
|
218
|
-
* after generator-only migrations.
|
|
219
|
-
*
|
|
220
|
-
* Default-on when the agentic flow resolved to `enabled`; silently ignored
|
|
221
|
-
* otherwise (no warning emitted) — `--validate` requires an active agent
|
|
222
|
-
* session by definition. An explicit `--no-validate` (`validate === false`)
|
|
223
|
-
* opts out even when agentic is enabled.
|
|
224
|
-
*/
|
|
225
|
-
export declare function resolveShouldRunValidation(args: {
|
|
226
|
-
validate: boolean | undefined;
|
|
227
|
-
agenticKind: ResolvedAgentic['kind'];
|
|
228
|
-
}): boolean;
|
|
229
|
-
export declare function executeMigrations(root: string, migrations: ExecutableMigration[], isVerbose: boolean, shouldCreateCommits: boolean, commitPrefix: string, shouldSkipInstall?: boolean, agentic?: ResolvedAgentic, agenticHasDiffContext?: boolean, shouldRunValidation?: boolean): Promise<{
|
|
230
|
-
migrationsWithNoChanges: ExecutableMigration[];
|
|
195
|
+
export declare function formatSkippedPromptsNextStep(skipped: PlannedMigration[]): string;
|
|
196
|
+
export declare function executeMigrations(root: string, migrations: PlannedMigration[], isVerbose: boolean, shouldCreateCommits: boolean, commitPrefix: string, shouldSkipInstall?: boolean, agentic?: ResolvedAgentic, agenticHasDiffContext?: boolean, shouldRunValidation?: boolean): Promise<{
|
|
197
|
+
migrationsWithNoChanges: PlannedMigration[];
|
|
231
198
|
skippedPromptsCount: number;
|
|
232
199
|
notRunMigrationsCount: number;
|
|
233
200
|
nextSteps: string[];
|
|
234
|
-
skippedPrompts:
|
|
201
|
+
skippedPrompts: PlannedMigration[];
|
|
235
202
|
migrationEmittedNextSteps: string[];
|
|
236
203
|
committedShasCount: number;
|
|
204
|
+
waivedAgenticStepsCount: number;
|
|
237
205
|
retainedAtSuccess: string[];
|
|
238
206
|
}>;
|
|
207
|
+
export declare function isRunPhaseInvocation(args: Pick<MigrateArgs, 'runMigration' | 'runId' | 'stepAction'>): boolean;
|
|
239
208
|
export declare function migrate(root: string, args: {
|
|
240
209
|
[k: string]: any;
|
|
241
210
|
}, rawArgs: string[]): Promise<number>;
|
|
211
|
+
export declare function readLocalNxVersion(root: string): string | undefined;
|
|
242
212
|
export declare function runMigration(): Promise<number>;
|
|
243
213
|
/**
|
|
244
214
|
* Resolves a migration's collection once and derives everything the run loop
|
|
@@ -269,5 +239,4 @@ export declare function resolveMigrationForRun(root: string, migration: {
|
|
|
269
239
|
};
|
|
270
240
|
documentationPath?: string;
|
|
271
241
|
};
|
|
272
|
-
export declare function resolveDocumentationFileToWorkspacePath(root: string, migrationsDir: string, documentation: string): string | undefined;
|
|
273
242
|
export declare function nxCliPath(nxWorkspaceRoot?: string): Promise<string>;
|