import { type Declarable } from "../declarable.js"; /** * Collects all declarable entities from imported modules. * CompositeInstance exports are expanded into individual entities * with `{exportName}_{memberName}` naming. * LexiconOutput exports are also collected so that build() can * extract them and pass them to the serializer. * * A bare entity name must be unique *within a single stack directory*, not * across the whole project. A multi-stack project (independently-deployed * sibling stacks under one root — e.g. `src/loom-backend/`, `src/loom-agents/`) * legitimately reuses conventional cross-stack `Parameter` names like * `pArtifactBucket`/`pImageUri` across siblings, because each directory is its * own CloudFormation template where that name is the real, deployed logical id. * When the same bare name is declared (as distinct objects) in two different * directories, each is disambiguated by a stack prefix derived from its * directory ({@link stackPrefix}) rather than throwing — so an unscoped * whole-project build / `chant lifecycle snapshot|diff` no longer collides * (#932). A per-stack scoped build (`chant build `) has a single directory * relative to its root, so nothing is prefixed and the deployed logical ids are * unchanged. A genuine *same-directory* duplicate is still an error. * * @param modules - Array of module records with their exports * @param buildRoot - The build root the discovery ran against; stack prefixes * are derived relative to it so keys stay portable across machines. * @returns Map of export name to Declarable entity * @throws {DiscoveryError} with type "resolution" if a name is duplicated within one directory */ export declare function collectEntities(modules: Array<{ file: string; exports: Record; }>, buildRoot?: string): Map; //# sourceMappingURL=collect.d.ts.map