import Consumer from '../../../consumer/consumer'; import BitMap from '../../../consumer/bit-map'; import { BitId } from '../../../bit-id'; import { BitIdStr } from '../../../bit-id/bit-id'; import { ComponentMapFile, ComponentOrigin } from '../../bit-map/component-map'; import ComponentMap from '../../bit-map/component-map'; import { PathLinux, PathOsBased } from '../../../utils/path'; import { ModelComponent } from '../../../scope/models'; export declare type AddResult = { id: string; files: ComponentMapFile[]; }; declare type Warnings = { alreadyUsed: Record; emptyDirectory: string[]; existInScope: BitId[]; }; export declare type AddActionResults = { addedComponents: AddResult[]; warnings: Warnings; }; export declare type PathOrDSL = PathOsBased | string; declare type PathsStats = {}; export declare type AddedComponent = { componentId: BitId; files: ComponentMapFile[]; mainFile?: PathOsBased | null | undefined; trackDir?: PathOsBased; idFromPath: { name: string; namespace: string; } | null | undefined; immediateDir?: string; }; export declare type AddProps = { componentPaths: PathOsBased[]; id?: string; main?: PathOsBased; namespace?: string; tests?: PathOrDSL[]; exclude?: PathOrDSL[]; override: boolean; trackDirFeature?: boolean; origin?: ComponentOrigin; }; export declare type AddContext = { consumer: Consumer; alternateCwd?: string; }; export default class AddComponents { consumer: Consumer; bitMap: BitMap; componentPaths: PathOsBased[]; id: string | null | undefined; main: PathOsBased | null | undefined; namespace: string | null | undefined; tests: PathOrDSL[]; exclude: PathOrDSL[]; override: boolean; trackDirFeature: boolean | null | undefined; warnings: Warnings; ignoreList: string[]; gitIgnore: any; origin: ComponentOrigin; alternateCwd: string | null | undefined; addedComponents: AddResult[]; constructor(context: AddContext, addProps: AddProps); joinConsumerPathIfNeeded(paths: PathOrDSL[]): PathOrDSL[]; getFilesAccordingToDsl(files: PathLinux[], filesWithPotentialDsl: PathOrDSL[]): Promise; _isGeneratedForUnsupportedFiles(fileRelativePath: PathLinux, componentId: BitId, componentMap: ComponentMap): Promise; _isPackageJsonOnRootDir(pathRelativeToConsumerRoot: PathLinux, componentMap: ComponentMap): boolean; _isOutsideOfWrapDir(pathRelativeToConsumerRoot: PathLinux, componentMap: ComponentMap): boolean; addOrUpdateComponentInBitMap(component: AddedComponent): Promise; _updateFilesAccordingToExistingRootDir(foundComponentFromBitMap: ComponentMap, componentFiles: ComponentMapFile[], component: AddedComponent): void; _mergeFilesWithExistingComponentMapFiles(componentFiles: ComponentMapFile[], existingComponentMapFile: ComponentMapFile[]): any; _updateFilesWithCurrentLetterCases(currentComponentMap: ComponentMap, newFiles: ComponentMapFile[]): void; _getComponentFromScopeIfExist(id: BitId): Promise; removeExcludedFiles(componentsWithFiles: AddedComponent[]): Promise; _getIdAccordingToExistingComponent(currentId: BitIdStr): BitId; _getIdAccordingToTrackDir(dir: PathOsBased): BitId | null | undefined; _addMainFileToFiles(files: ComponentMapFile[]): PathOsBased | null | undefined; _findMainFileInFiles(mainFile: string, files: ComponentMapFile[]): ComponentMapFile | undefined; _mergeTestFilesWithFiles(files: ComponentMapFile[]): Promise; addOneComponent(componentPathsStats: PathsStats): Promise; getIgnoreList(): Promise; add(): Promise; addMultipleComponents(componentPathsStats: PathsStats): Promise; _removeDirectoriesWhenTheirFilesAreAdded(componentPathsStats: PathsStats): void; _addMultipleToBitMap(added: AddedComponent[]): Promise; _removeNamespaceIfNotNeeded(addedComponents: AddedComponent[]): void; _tryAddingMultiple(componentPathsStats: PathsStats): Promise; _throwForOutsideConsumer(relativeToConsumerPath: PathOsBased): void; } export {};