/** * Construct-to-topology-group mapping. * * Maps CDK construct IDs (the first segment below the stack in the construct * path) to topology groups. These maps are used to derive which topology node * a resource belongs to based on which CDK construct created it. * * When a new CDK construct is added, add one entry here. * When a new AWS resource type is added, nothing changes. */ /** * Manifest filename + schema version + ResourceMapEntry shape are re-exported * from `./manifest/schemas` (the canonical home for manifest types — that * module is pure and is safe to import from environments that must avoid `fs`, * e.g. the generator). */ export { FJALL_MANIFEST_FILENAME, MANIFEST_SCHEMA_VERSION } from "./manifest/schemas.js"; export type { ResourceMapEntry } from "./manifest/schemas.js"; import type { ResourceMapEntry } from "./manifest/schemas.js"; import type { ResourceCategory } from "./resourceCategorisation.js"; /** * Account stack construct-to-group mapping. * Keys are CDK construct IDs (first segment after stack name in construct path). */ export declare const ACCOUNT_CONSTRUCT_GROUPS: Readonly>; /** * Application stack construct-to-group mapping. * Keys are CDK construct IDs (first segment after stack name in construct path). */ export declare const APP_CONSTRUCT_GROUPS: Readonly>; /** * Derives the topology group from a CDK construct path. * * The construct path format is: ///.../ * We extract the first construct below the stack and look it up in the * construct group maps. * * @param constructPath - Full CDK construct path * @param constructGroups - Map of construct ID → topology group * @returns The topology group or undefined if not mapped */ export declare function deriveGroupFromPath(constructPath: string, constructGroups: Readonly>): ResourceCategory | undefined; /** * Derives a display name from a CDK construct path. * Extracts the most meaningful segment from the path. */ export declare function deriveDisplayName(constructPath: string): string; /** * Builds a construct map from CDK's manifest.json metadata. * * Reads the CDK cloud assembly manifest, inverts the `aws:cdk:logicalId` * metadata entries to `logicalId → { constructPath, group, resourceType }`, * and derives topology groups from the construct path. * * @param cdkOutPath - Path to the cdk.out directory * @param constructGroups - Construct-to-group mapping (Account or Application) * @returns Map of logicalId → ResourceMapEntry */ export declare function buildConstructMap(cdkOutPath: string, constructGroups: Readonly>): Map; /** * Converts a construct map to a plain object for JSON serialisation. */ export declare function constructMapToRecord(map: Map): Record; /** * Converts a plain object back to a construct map. */ export declare function recordToConstructMap(record: Record | undefined): Map; /** * Enriches a resource event with construct map data. * Returns the group, constructPath, and displayName when available. */ export declare function enrichFromConstructMap(logicalId: string, resourceType: string, constructMap: Map | undefined): { group?: string; constructPath?: string; displayName: string; };