nx 23.0.0-beta.2 → 23.0.0-beta.21
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/dist/bin/init-local.js +11 -20
- package/dist/bin/nx.d.ts +1 -0
- package/dist/bin/nx.js +28 -2
- package/dist/plugins/package-json.js +4 -2
- package/dist/src/adapter/ngcli-adapter.d.ts +2 -1
- package/dist/src/adapter/ngcli-adapter.js +25 -2
- package/dist/src/ai/clone-ai-config-repo.js +20 -3
- package/dist/src/analytics/analytics.js +10 -1
- package/dist/src/command-line/add/completion.d.ts +1 -0
- package/dist/src/command-line/add/completion.js +15 -0
- package/dist/src/command-line/affected/completion.d.ts +1 -0
- package/dist/src/command-line/affected/completion.js +15 -0
- package/dist/src/command-line/completion/argv-layout.d.ts +6 -0
- package/dist/src/command-line/completion/argv-layout.js +19 -0
- package/dist/src/command-line/completion/command-completions.d.ts +19 -0
- package/dist/src/command-line/completion/command-completions.js +120 -0
- package/dist/src/command-line/completion/command-handlers.d.ts +30 -0
- package/dist/src/command-line/completion/command-handlers.js +69 -0
- package/dist/src/command-line/completion/command-object.d.ts +10 -0
- package/dist/src/command-line/completion/command-object.js +95 -0
- package/dist/src/command-line/completion/completion-providers.d.ts +21 -0
- package/dist/src/command-line/completion/completion-providers.js +194 -0
- package/dist/src/command-line/completion/infix-targets.d.ts +1 -0
- package/dist/src/command-line/completion/infix-targets.js +48 -0
- package/dist/src/command-line/completion/metadata.d.ts +22 -0
- package/dist/src/command-line/completion/metadata.js +71 -0
- package/dist/src/command-line/completion/registrations.d.ts +9 -0
- package/dist/src/command-line/completion/registrations.js +16 -0
- package/dist/src/command-line/completion/scripts/bash.sh +51 -0
- package/dist/src/command-line/completion/scripts/fish.fish +47 -0
- package/dist/src/command-line/completion/scripts/powershell.ps1 +52 -0
- package/dist/src/command-line/completion/scripts/zsh.zsh +69 -0
- package/dist/src/command-line/completion/scripts.d.ts +18 -0
- package/dist/src/command-line/completion/scripts.js +140 -0
- package/dist/src/command-line/completion/trigger.d.ts +3 -0
- package/dist/src/command-line/completion/trigger.js +21 -0
- package/dist/src/command-line/completion/value-completions.d.ts +3 -0
- package/dist/src/command-line/completion/value-completions.js +21 -0
- package/dist/src/command-line/examples.js +1 -1
- package/dist/src/command-line/format/format.js +15 -5
- package/dist/src/command-line/generate/completion.d.ts +1 -0
- package/dist/src/command-line/generate/completion.js +9 -0
- package/dist/src/command-line/graph/completion.d.ts +1 -0
- package/dist/src/command-line/graph/completion.js +13 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +14 -18
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +1 -0
- package/dist/src/command-line/init/implementation/utils.d.ts +7 -1
- package/dist/src/command-line/init/implementation/utils.js +51 -14
- package/dist/src/command-line/migrate/agentic/capture-generator-output.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +100 -0
- package/dist/src/command-line/migrate/agentic/cli-args.d.ts +12 -0
- package/dist/src/command-line/migrate/agentic/cli-args.js +38 -0
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +6 -0
- package/dist/src/command-line/migrate/agentic/definitions.js +98 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.d.ts +10 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.js +68 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +87 -0
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +63 -0
- package/dist/src/command-line/migrate/agentic/handoff.js +183 -0
- package/dist/src/command-line/migrate/agentic/inception.d.ts +9 -0
- package/dist/src/command-line/migrate/agentic/inception.js +15 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +50 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +51 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +65 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +44 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +52 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +21 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +26 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +18 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +130 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +88 -0
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +51 -0
- package/dist/src/command-line/migrate/agentic/run-step.js +121 -0
- package/dist/src/command-line/migrate/agentic/runner.d.ts +33 -0
- package/dist/src/command-line/migrate/agentic/runner.js +442 -0
- package/dist/src/command-line/migrate/agentic/select.d.ts +14 -0
- package/dist/src/command-line/migrate/agentic/select.js +150 -0
- package/dist/src/command-line/migrate/agentic/types.d.ts +102 -0
- package/dist/src/command-line/migrate/agentic/types.js +2 -0
- package/dist/src/command-line/migrate/command-object.d.ts +1 -0
- package/dist/src/command-line/migrate/command-object.js +32 -7
- package/dist/src/command-line/migrate/migrate-commits.d.ts +50 -0
- package/dist/src/command-line/migrate/migrate-commits.js +102 -0
- package/dist/src/command-line/migrate/migrate-output.d.ts +180 -0
- package/dist/src/command-line/migrate/migrate-output.js +258 -0
- package/dist/src/command-line/migrate/migrate.d.ts +122 -12
- package/dist/src/command-line/migrate/migrate.js +1036 -217
- package/dist/src/command-line/migrate/migration-shape.d.ts +8 -0
- package/dist/src/command-line/migrate/migration-shape.js +13 -0
- package/dist/src/command-line/migrate/multi-major.d.ts +30 -0
- package/dist/src/command-line/migrate/multi-major.js +185 -0
- package/dist/src/command-line/migrate/prompt-files.d.ts +31 -0
- package/dist/src/command-line/migrate/prompt-files.js +141 -0
- package/dist/src/command-line/migrate/run-migration-process.js +28 -6
- package/dist/src/command-line/migrate/safe-prompt.d.ts +28 -0
- package/dist/src/command-line/migrate/safe-prompt.js +49 -0
- package/dist/src/command-line/migrate/update-filters.d.ts +11 -0
- package/dist/src/command-line/migrate/update-filters.js +44 -0
- package/dist/src/command-line/migrate/version-utils.d.ts +6 -0
- package/dist/src/command-line/migrate/version-utils.js +59 -0
- package/dist/src/command-line/nx-commands.js +9 -0
- package/dist/src/command-line/release/config/config.d.ts +3 -6
- package/dist/src/command-line/release/config/config.js +77 -45
- package/dist/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
- package/dist/src/command-line/release/config/use-legacy-versioning.js +8 -0
- package/dist/src/command-line/release/utils/release-graph.js +2 -3
- package/dist/src/command-line/release/utils/repository-git-tags.js +1 -1
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +7 -19
- package/dist/src/command-line/release/version/resolve-current-version.js +1 -1
- package/dist/src/command-line/release/version/version-actions.js +3 -7
- package/dist/src/command-line/report/report.js +2 -2
- package/dist/src/command-line/run/completion.d.ts +1 -0
- package/dist/src/command-line/run/completion.js +7 -0
- package/dist/src/command-line/run-many/completion.d.ts +1 -0
- package/dist/src/command-line/run-many/completion.js +13 -0
- package/dist/src/command-line/show/completion.d.ts +1 -0
- package/dist/src/command-line/show/completion.js +27 -0
- package/dist/src/command-line/show/show-target/info.d.ts +1 -0
- package/dist/src/command-line/show/show-target/info.js +100 -19
- package/dist/src/command-line/watch/command-object.js +24 -4
- package/dist/src/command-line/watch/completion.d.ts +1 -0
- package/dist/src/command-line/watch/completion.js +10 -0
- package/dist/src/command-line/watch/watch.d.ts +7 -0
- package/dist/src/command-line/watch/watch.js +1 -1
- package/dist/src/config/misc-interfaces.d.ts +25 -2
- package/dist/src/config/nx-json.d.ts +43 -56
- package/dist/src/config/schema-utils.d.ts +21 -0
- package/dist/src/config/schema-utils.js +92 -18
- package/dist/src/config/task-graph.d.ts +4 -107
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/core/graph/styles.css +2 -3
- package/dist/src/core/graph/styles.js +1 -1
- package/dist/src/daemon/client/client.d.ts +1 -1
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +1 -1
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +1 -1
- package/dist/src/daemon/server/file-watching/route-workspace-changes.d.ts +9 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.js +76 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +45 -11
- package/dist/src/daemon/server/server.js +4 -43
- package/dist/src/daemon/server/start.d.ts +1 -1
- package/dist/src/daemon/server/start.js +2 -0
- package/dist/src/devkit-exports.d.ts +2 -2
- package/dist/src/devkit-internals.d.ts +5 -1
- package/dist/src/devkit-internals.js +17 -1
- package/dist/src/executors/run-commands/running-tasks.d.ts +7 -0
- package/dist/src/executors/run-commands/running-tasks.js +178 -105
- package/dist/src/executors/run-script/run-script.impl.js +3 -10
- package/dist/src/executors/utils/convert-nx-executor.js +1 -1
- package/dist/src/hasher/hash-plan-inspector.d.ts +1 -1
- package/dist/src/hasher/task-hasher.js +6 -4
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +0 -3
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +6 -2
- package/dist/src/migrations/update-17-0-0/move-cache-directory.md +31 -0
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +20 -4
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.md +27 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.md +24 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.md +49 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.md +54 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.md +28 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.md +22 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.md +11 -0
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +18 -0
- package/dist/src/migrations/update-23-0-0/convert-target-defaults-to-array.d.ts +35 -0
- package/dist/src/migrations/update-23-0-0/convert-target-defaults-to-array.js +139 -0
- package/dist/src/migrations/update-23-0-0/convert-target-defaults-to-array.md +66 -0
- package/dist/src/native/index.d.ts +79 -2
- package/dist/src/native/native-bindings.js +3 -0
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/plugins/js/lock-file/npm-parser.js +37 -19
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +51 -4
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +12 -4
- package/dist/src/plugins/js/utils/packages.js +1 -1
- package/dist/src/plugins/js/utils/register.d.ts +103 -14
- package/dist/src/plugins/js/utils/register.js +434 -39
- package/dist/src/plugins/js/utils/typescript.d.ts +7 -0
- package/dist/src/plugins/js/utils/typescript.js +39 -0
- package/dist/src/plugins/package-json/create-nodes.d.ts +3 -2
- package/dist/src/plugins/package-json/create-nodes.js +7 -5
- package/dist/src/project-graph/affected/locators/project-glob-changes.js +2 -1
- package/dist/src/project-graph/build-project-graph.d.ts +5 -0
- package/dist/src/project-graph/build-project-graph.js +6 -2
- package/dist/src/project-graph/file-map-utils.d.ts +5 -0
- package/dist/src/project-graph/file-map-utils.js +10 -1
- package/dist/src/project-graph/plugins/get-plugins.d.ts +7 -2
- package/dist/src/project-graph/plugins/get-plugins.js +8 -5
- package/dist/src/project-graph/plugins/isolation/plugin-worker.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +2 -0
- package/dist/src/project-graph/plugins/resolve-plugin.d.ts +7 -4
- package/dist/src/project-graph/plugins/resolve-plugin.js +152 -33
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +4 -2
- package/dist/src/project-graph/plugins/transpiler.d.ts +12 -0
- package/dist/src/project-graph/plugins/transpiler.js +37 -0
- package/dist/src/project-graph/plugins/utils.js +13 -7
- package/dist/src/project-graph/project-graph.js +1 -1
- package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +95 -4
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +515 -68
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +13 -5
- package/dist/src/project-graph/utils/project-configuration-utils.js +14 -6
- package/dist/src/project-graph/utils/retrieve-workspace-files.js +1 -1
- package/dist/src/tasks-runner/create-task-graph.d.ts +4 -4
- package/dist/src/tasks-runner/create-task-graph.js +1 -1
- package/dist/src/tasks-runner/default-tasks-runner.d.ts +0 -2
- package/dist/src/tasks-runner/forked-process-task-runner.d.ts +1 -1
- package/dist/src/tasks-runner/forked-process-task-runner.js +11 -6
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +0 -15
- package/dist/src/tasks-runner/init-tasks-runner.js +0 -63
- package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +18 -0
- package/dist/src/tasks-runner/legacy-depends-on-warning.js +109 -0
- package/dist/src/tasks-runner/life-cycle.d.ts +7 -8
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +6 -6
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +13 -2
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.js +16 -5
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +11 -2
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +1 -1
- package/dist/src/tasks-runner/pseudo-terminal.js +22 -10
- package/dist/src/tasks-runner/run-command.js +8 -11
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +1 -1
- package/dist/src/tasks-runner/running-tasks/batch-process.js +3 -5
- package/dist/src/tasks-runner/running-tasks/node-child-process.d.ts +2 -2
- package/dist/src/tasks-runner/running-tasks/node-child-process.js +5 -7
- package/dist/src/tasks-runner/task-env.d.ts +1 -1
- package/dist/src/tasks-runner/task-env.js +6 -1
- package/dist/src/tasks-runner/task-orchestrator.d.ts +11 -1
- package/dist/src/tasks-runner/task-orchestrator.js +112 -38
- package/dist/src/tasks-runner/tasks-schedule.js +3 -3
- package/dist/src/tasks-runner/utils.d.ts +7 -8
- package/dist/src/tasks-runner/utils.js +23 -27
- package/dist/src/utils/child-process.js +2 -2
- package/dist/src/utils/compile-cache.d.ts +24 -0
- package/dist/src/utils/compile-cache.js +49 -0
- package/dist/src/utils/enable-compile-cache.d.ts +1 -0
- package/dist/src/utils/enable-compile-cache.js +7 -0
- package/dist/src/utils/fileutils.d.ts +0 -8
- package/dist/src/utils/fileutils.js +0 -40
- package/dist/src/utils/git-utils.d.ts +15 -0
- package/dist/src/utils/git-utils.js +138 -0
- package/dist/src/utils/handle-import.d.ts +4 -1
- package/dist/src/utils/handle-import.js +56 -2
- package/dist/src/utils/has-nx-js-plugin.d.ts +9 -0
- package/dist/src/utils/has-nx-js-plugin.js +24 -0
- package/dist/src/utils/installed-nx-version.d.ts +14 -4
- package/dist/src/utils/installed-nx-version.js +54 -7
- package/dist/src/utils/logger.d.ts +12 -1
- package/dist/src/utils/logger.js +57 -36
- package/dist/src/utils/nx-key.d.ts +0 -1
- package/dist/src/utils/nx-key.js +20 -23
- package/dist/src/utils/nx-package-group.d.ts +8 -0
- package/dist/src/utils/nx-package-group.js +15 -0
- package/dist/src/utils/output.d.ts +3 -2
- package/dist/src/utils/output.js +29 -28
- package/dist/src/utils/package-json.d.ts +14 -1
- package/dist/src/utils/package-json.js +20 -21
- package/dist/src/utils/perf-logging.js +3 -1
- package/dist/src/utils/plugin-cache-utils.d.ts +13 -4
- package/dist/src/utils/plugin-cache-utils.js +23 -13
- package/dist/src/utils/plugins/local-plugins.d.ts +18 -0
- package/dist/src/utils/plugins/local-plugins.js +30 -0
- package/dist/src/utils/tar.d.ts +8 -0
- package/dist/src/utils/tar.js +44 -0
- package/migrations.json +16 -0
- package/package.json +28 -28
- package/schemas/nx-schema.json +114 -80
- package/dist/src/plugins/js/project-graph/build-dependencies/strip-source-code.d.ts +0 -7
- package/dist/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +0 -155
- package/dist/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.d.ts +0 -16
- package/dist/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.js +0 -121
|
@@ -3,22 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createNodesFromFiles = createNodesFromFiles;
|
|
4
4
|
const error_types_1 = require("../error-types");
|
|
5
5
|
async function createNodesFromFiles(createNodes, configFiles, options, context) {
|
|
6
|
-
const
|
|
7
|
-
const errors = [];
|
|
8
|
-
await Promise.all(configFiles.map(async (file, idx) => {
|
|
6
|
+
const settled = await Promise.all(configFiles.map(async (file, idx) => {
|
|
9
7
|
try {
|
|
10
8
|
const value = await createNodes(file, options, {
|
|
11
9
|
...context,
|
|
12
10
|
configFiles,
|
|
13
11
|
}, idx);
|
|
14
|
-
|
|
15
|
-
results.push([file, value]);
|
|
16
|
-
}
|
|
12
|
+
return value ? { kind: 'value', file, value } : { kind: 'empty' };
|
|
17
13
|
}
|
|
18
14
|
catch (e) {
|
|
19
|
-
|
|
15
|
+
return { kind: 'error', file, error: e };
|
|
20
16
|
}
|
|
21
17
|
}));
|
|
18
|
+
const results = [];
|
|
19
|
+
const errors = [];
|
|
20
|
+
for (const entry of settled) {
|
|
21
|
+
if (entry.kind === 'value') {
|
|
22
|
+
results.push([entry.file, entry.value]);
|
|
23
|
+
}
|
|
24
|
+
else if (entry.kind === 'error') {
|
|
25
|
+
errors.push([entry.file, entry.error]);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
22
28
|
if (errors.length > 0) {
|
|
23
29
|
throw new error_types_1.AggregateCreateNodesError(errors, results);
|
|
24
30
|
}
|
|
@@ -88,7 +88,7 @@ async function buildProjectGraphAndSourceMapsWithoutDaemon() {
|
|
|
88
88
|
perf_hooks_1.performance.mark('retrieve-project-configurations:start');
|
|
89
89
|
let configurationResult;
|
|
90
90
|
let projectConfigurationsError;
|
|
91
|
-
const separatedPlugins = await (0, get_plugins_1.getPluginsSeparated)();
|
|
91
|
+
const separatedPlugins = await (0, get_plugins_1.getPluginsSeparated)(nxJson);
|
|
92
92
|
const plugins = separatedPlugins.specifiedPlugins.concat(separatedPlugins.defaultPlugins);
|
|
93
93
|
try {
|
|
94
94
|
configurationResult = await (0, retrieve_workspace_files_1.retrieveProjectConfigurations)(separatedPlugins, workspace_root_1.workspaceRoot, nxJson);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { NxJsonConfiguration, TargetDefaults } from '../../../config/nx-json';
|
|
2
|
-
import { ProjectConfiguration } from '../../../config/workspace-json-project-json';
|
|
1
|
+
import { NormalizedTargetDefaults, NxJsonConfiguration, TargetDefaults } from '../../../config/nx-json';
|
|
2
|
+
import { ProjectConfiguration, TargetConfiguration } from '../../../config/workspace-json-project-json';
|
|
3
|
+
import type { ProjectGraphProjectNode } from '../../../config/project-graph';
|
|
3
4
|
import type { CreateNodesResult } from '../../plugins/public-api';
|
|
5
|
+
import { ConfigurationSourceMaps } from './source-maps';
|
|
4
6
|
type CreateNodesResultEntry = readonly [
|
|
5
7
|
plugin: string,
|
|
6
8
|
file: string,
|
|
@@ -10,7 +12,96 @@ type CreateNodesResultEntry = readonly [
|
|
|
10
12
|
/**
|
|
11
13
|
* Builds a synthetic plugin result from nx.json's `targetDefaults`, layered
|
|
12
14
|
* between specified-plugin and default-plugin results during merging.
|
|
15
|
+
*
|
|
16
|
+
* Synthesis sees the two layers separately to avoid re-merging specified
|
|
17
|
+
* results into a parallel rootMap — for each (root, target) where both
|
|
18
|
+
* layers contribute, it computes the eventual executor/command on the
|
|
19
|
+
* fly. That's all the matcher needs; the full target merge happens
|
|
20
|
+
* downstream in the real merge.
|
|
13
21
|
*/
|
|
14
|
-
export declare function createTargetDefaultsResults(specifiedPluginRootMap: Record<string, ProjectConfiguration>, defaultPluginRootMap: Record<string, ProjectConfiguration>, nxJsonConfiguration: NxJsonConfiguration): CreateNodesResultEntry[];
|
|
15
|
-
|
|
22
|
+
export declare function createTargetDefaultsResults(specifiedPluginRootMap: Record<string, ProjectConfiguration>, defaultPluginRootMap: Record<string, ProjectConfiguration>, nxJsonConfiguration: NxJsonConfiguration, specifiedSourceMaps?: ConfigurationSourceMaps, defaultSourceMaps?: ConfigurationSourceMaps): CreateNodesResultEntry[];
|
|
23
|
+
/**
|
|
24
|
+
* Public, backwards-compatible reader that looks up the most-specific
|
|
25
|
+
* target default for a given target. Accepts either the new array shape
|
|
26
|
+
* or the legacy record shape (devkit support).
|
|
27
|
+
*
|
|
28
|
+
* When called without project context, entries that require a `projects`
|
|
29
|
+
* filter or a `plugin` filter are skipped.
|
|
30
|
+
*
|
|
31
|
+
* The normalized entries are cached per `targetDefaults` reference so
|
|
32
|
+
* repeated reads against the same nx.json don't re-normalize (and don't
|
|
33
|
+
* re-fire the legacy-record-shape warning).
|
|
34
|
+
*/
|
|
35
|
+
export declare function readTargetDefaultsForTarget(targetName: string, targetDefaults: TargetDefaults | undefined, executor?: string, opts?: {
|
|
36
|
+
projectName?: string;
|
|
37
|
+
projectNode?: ProjectGraphProjectNode;
|
|
38
|
+
sourcePlugin?: string;
|
|
39
|
+
command?: string;
|
|
40
|
+
}): Partial<TargetConfiguration> | null;
|
|
41
|
+
/**
|
|
42
|
+
* Find the highest-specificity `targetDefaults` entry that applies to the
|
|
43
|
+
* given (target, project, sourcePlugin) tuple. Ties are broken by match
|
|
44
|
+
* kind, then by later array index. Returns the config slice with filter
|
|
45
|
+
* keys (`target`, `projects`, `plugin`) stripped.
|
|
46
|
+
*
|
|
47
|
+
* Tier = (1 if a target/executor locator matched, else 0) + 1 per
|
|
48
|
+
* applied filter (`projects`, `plugin`). So locator-bearing entries:
|
|
49
|
+
* - tier 3: target/executor + projects + plugin
|
|
50
|
+
* - tier 2: target/executor + projects, or target/executor + plugin
|
|
51
|
+
* - tier 1: target/executor alone
|
|
52
|
+
* And filter-only entries (no `target` and no `executor`):
|
|
53
|
+
* - tier 2: projects + plugin
|
|
54
|
+
* - tier 1: projects alone, or plugin alone
|
|
55
|
+
*
|
|
56
|
+
* `executor` matching contributes to matchKind only, not to tier — it's
|
|
57
|
+
* not a filter, it's a refinement of the match. Within the same tier,
|
|
58
|
+
* tie-break order (highest first):
|
|
59
|
+
* targetAndExecutor > executorOnly > exactTarget > globTarget > filterOnly
|
|
60
|
+
*
|
|
61
|
+
* `filterOnly` ranks below every locator-bearing kind, so a filter-only
|
|
62
|
+
* entry can never tie-break ahead of one that names a target or executor
|
|
63
|
+
* at the same tier.
|
|
64
|
+
*
|
|
65
|
+
* `executor` only acts as an "injector" (matches a target with neither
|
|
66
|
+
* executor nor command) when the entry also sets `target`. Executor-only
|
|
67
|
+
* entries require the workspace target to actually have an executor.
|
|
68
|
+
*
|
|
69
|
+
* When `predicate` is provided, ranked candidates are iterated and the
|
|
70
|
+
* first one that satisfies the predicate is returned. This lets synthesis
|
|
71
|
+
* fall back to a less-specific compatible default when the most-specific
|
|
72
|
+
* match would be incompatible with the target it's being applied to.
|
|
73
|
+
* Without a predicate, the highest-ranked candidate is returned directly.
|
|
74
|
+
*/
|
|
75
|
+
export declare function findBestTargetDefault(targetName: string, executor: string | undefined, projectName: string | undefined, projectNode: (Pick<ProjectGraphProjectNode, 'name'> & {
|
|
76
|
+
data: Pick<ProjectConfiguration, 'root' | 'tags'>;
|
|
77
|
+
}) | undefined, sourcePlugin: string | undefined, entries: NormalizedTargetDefaults, targetCommand?: string | undefined, predicate?: (config: Partial<TargetConfiguration>) => boolean): Partial<TargetConfiguration> | null;
|
|
78
|
+
/**
|
|
79
|
+
* Accept either the new array shape or the legacy record shape and return
|
|
80
|
+
* a normalized array. Record entries become `{ target: key, ...value }`
|
|
81
|
+
* — except executor-shaped keys (e.g. `@nx/vite:test`, `nx:run-commands`)
|
|
82
|
+
* which become `{ executor: key, ...value }` so the matcher treats them
|
|
83
|
+
* as executor matches rather than target-name matches.
|
|
84
|
+
*
|
|
85
|
+
* Disambiguation here is purely syntactic — `:` in a record key is
|
|
86
|
+
* genuinely ambiguous (target names can contain `:`). Callers that have
|
|
87
|
+
* access to the workspace's targets (the graph-construction path, the
|
|
88
|
+
* v23 migration) should prefer
|
|
89
|
+
* {@link normalizeTargetDefaultsAgainstRootMaps} or the migration's
|
|
90
|
+
* graph-based classifier so that ambiguous keys get classified by what
|
|
91
|
+
* the workspace actually contains. The warning below points end-users
|
|
92
|
+
* at `nx repair`, which runs the migration that durably resolves the
|
|
93
|
+
* ambiguity in nx.json on disk.
|
|
94
|
+
*/
|
|
95
|
+
export declare function normalizeTargetDefaults(raw: TargetDefaults | undefined): NormalizedTargetDefaults;
|
|
96
|
+
/**
|
|
97
|
+
* Same shape contract as {@link normalizeTargetDefaults}, but classifies
|
|
98
|
+
* `:`-shaped record keys against the targets and executors actually
|
|
99
|
+
* present in the supplied rootMaps. When a key matches a target name in
|
|
100
|
+
* the workspace, it becomes a `target:` entry; when it matches an
|
|
101
|
+
* executor, an `executor:` entry; when it matches both, both entries are
|
|
102
|
+
* emitted (matching the v23 migration's "duplicate rather than guess"
|
|
103
|
+
* behavior so neither side of the match silently drops). Falls back to
|
|
104
|
+
* the syntactic heuristic when there's no evidence either way.
|
|
105
|
+
*/
|
|
106
|
+
export declare function normalizeTargetDefaultsAgainstRootMaps(raw: TargetDefaults | undefined, ...rootMaps: Record<string, ProjectConfiguration>[]): NormalizedTargetDefaults;
|
|
16
107
|
export {};
|