import { NxJsonConfiguration } from '../../config/nx-json'; import { ProjectGraphExternalNode } from '../../config/project-graph'; import { ProjectConfiguration } from '../../config/workspace-json-project-json'; import { AggregateCreateNodesError, MergeNodesError, MultipleProjectsWithSameNameError, ProjectsWithNoNameError, WorkspaceValidityError } from '../error-types'; import type { LoadedNxPlugin } from '../plugins/loaded-nx-plugin'; import { CreateNodesResult } from '../plugins/public-api'; import type { ConfigurationSourceMaps } from './project-configuration/source-maps'; export { mergeTargetConfigurations } from './project-configuration/target-merging'; export { readTargetDefaultsForTarget } from './project-configuration/target-defaults'; export type ConfigurationResult = { /** * A map of project configurations, keyed by project root. */ projects: { [projectRoot: string]: ProjectConfiguration; }; /** * Node Name -> Node info */ externalNodes: Record; /** * Project Root -> Project Name */ projectRootMap: Record; sourceMaps: ConfigurationSourceMaps; /** * The list of files that were used to create project configurations */ matchingProjectFiles: string[]; }; /** * Transforms a list of project paths into a map of project configurations. * * Plugins are run in parallel, then results are merged in a single ordered pass: * specified plugins → synthetic target defaults → default plugins * * This ordering ensures '...' spread tokens in default plugin configs * (project.json, package.json) expand against accumulated values from * specified plugins and target defaults. * * @param root The workspace root * @param nxJson The NxJson configuration * @param projectFiles Plugin config files, separated by plugin set * @param plugins The plugins separated into specified and default sets */ export declare function createProjectConfigurationsWithPlugins(root: string, nxJson: NxJsonConfiguration, projectFiles: { specifiedPluginFiles: string[][]; defaultPluginFiles: string[][]; }, plugins: { specifiedPlugins: LoadedNxPlugin[]; defaultPlugins: LoadedNxPlugin[]; }): Promise; export type CreateNodesResultEntry = readonly [ plugin: string, file: string, result: CreateNodesResult, pluginIndex?: number ]; export type MergeError = AggregateCreateNodesError | MergeNodesError | ProjectsWithNoNameError | MultipleProjectsWithSameNameError | WorkspaceValidityError; /** * Merges create nodes results into a single rootMap. * * Specified plugin results are merged once into the manager. Default * plugin results are first staged into an intermediate rootMap (with * `'...'` spreads deferred) so that synthesis can read each layer's * contribution without re-running the merge. The synthetic result from * `createTargetDefaultsResults` is then merged into the manager, and * the staged intermediate is replayed on top — that replay is where * deferred spreads expand against the final (specified + synth) base. * * Synthesis itself doesn't materialize a second rootMap. Per * (root, target) it does an on-the-fly merge of the two layered * contributions to learn the eventual executor/command, then matches * defaults against that merged shape. This keeps specified-plugin * merge work to a single pass. */ export declare function mergeCreateNodesResults(specifiedResults: CreateNodesResultEntry[][], defaultResults: CreateNodesResultEntry[][], nxJsonConfiguration: NxJsonConfiguration, workspaceRoot: string, errors: MergeError[]): { projectRootMap: Record; externalNodes: Record; rootMap: Record; configurationSourceMaps: ConfigurationSourceMaps; }; export declare function findMatchingConfigFiles(projectFiles: string[], include: string[], exclude: string[]): string[];