import type { CompPathExtendingHashMap, EnvCompsDirsMap } from './workspace-config-files.main.runtime'; import type { ExtendingConfigFilesMap } from './writers'; export type DedupedPaths = Array<{ fileHash: string; paths: string[]; }>; export declare function buildCompPathExtendingHashMap(extendingConfigFilesMap: ExtendingConfigFilesMap, envCompsDirsMap: EnvCompsDirsMap): CompPathExtendingHashMap; /** * easier to understand by an example: * input: * [ * { fileHash: hash1, paths: [ui/button, ui/form] }, * { fileHash: hash2, paths: [p/a1, p/a2] }, * { fileHash: hash3, paths: [p/n1] }, * ] * * output: * [ * { fileHash: hash1, paths: [ui] }, * { fileHash: hash2, paths: [p] }, * { fileHash: hash3, paths: [p/n1] }, * ] * * the goal is to minimize the amount of files to write per env if possible. * when multiple components of the same env share a root-dir, then, it's enough to write a file in that shared dir. * if in a shared-dir, some components using env1 and some env2, it finds the env that has the max number of * components, this env will be optimized. other components, will have the files written inside their dirs. */ export declare function dedupePaths(extendingConfigFilesMap: ExtendingConfigFilesMap, envCompsDirsMap: EnvCompsDirsMap, componentsRootDir: string | undefined): DedupedPaths;