import semver from 'semver'; import { BitId, BitIds } from '../bit-id'; import Component from './component'; import { Scope, ComponentWithDependencies } from '../scope'; import BitMap from './bit-map/bit-map'; import DirStructure from './dir-structure/dir-structure'; import { ModelComponent, Version } from '../scope/models'; import CompilerExtension from '../legacy-extensions/compiler-extension'; import TesterExtension from '../legacy-extensions/tester-extension'; import { PathOsBased, PathRelative, PathAbsolute, PathOsBasedAbsolute, PathOsBasedRelative } from '../utils/path'; import { InvalidComponent } from './component/consumer-component'; import { BitIdStr } from '../bit-id/bit-id'; import ComponentLoader from './component/component-loader'; import EnvExtension from '../legacy-extensions/env-extension'; import { AutoTagResult } from '../scope/component-ops/auto-tag'; import { EnvType } from '../legacy-extensions/env-extension-types'; import { WorkspaceConfigProps } from './config/workspace-config'; import { ILegacyWorkspaceConfig } from './config'; import { ComponentStatusLoader, ComponentStatusResult, ComponentStatus } from './component-ops/component-status-loader'; declare type ConsumerProps = { projectPath: string; config: ILegacyWorkspaceConfig; scope: Scope; created?: boolean; isolated?: boolean; bitMap: BitMap; addedGitHooks?: string[] | undefined; existingGitHooks: string[] | undefined; }; export default class Consumer { projectPath: PathOsBased; created: boolean; config: ILegacyWorkspaceConfig; scope: Scope; bitMap: BitMap; isolated: boolean; addedGitHooks: string[] | undefined; existingGitHooks: string[] | undefined; _dirStructure: DirStructure; _componentsStatusCache: Record; packageManagerArgs: string[]; componentLoader: ComponentLoader; componentStatusLoader: ComponentStatusLoader; packageJson: any; constructor({ projectPath, config, scope, created, isolated, bitMap, addedGitHooks, existingGitHooks }: ConsumerProps); get compiler(): Promise; get tester(): Promise; get dirStructure(): DirStructure; get bitmapIds(): BitIds; getEnv(envType: EnvType, context: Record | undefined): Promise; getTmpFolder(fullPath?: boolean): PathOsBased; cleanTmpFolder(): Promise; migrate(verbose: any): Record; write(): Promise; getPath(): PathOsBased; toAbsolutePath(pathStr: PathRelative): PathOsBasedAbsolute; getPathRelativeToConsumer(pathToCheck: PathRelative | PathAbsolute): PathOsBasedRelative; getParsedId(id: BitIdStr): BitId; getParsedIdIfExist(id: BitIdStr): BitId | undefined; loadComponentFromModel(id: BitId): Promise; loadComponentFromModelIfExist(id: BitId): Promise; loadAllVersionsOfComponentFromModel(id: BitId): Promise; loadComponentWithDependenciesFromModel(id: BitId, throwIfNotExist?: boolean): Promise; loadComponent(id: BitId): Promise; loadComponentForCapsule(id: BitId): Promise; loadComponents(ids: BitIds, throwOnFailure?: boolean): Promise<{ components: Component[]; invalidComponents: InvalidComponent[]; }>; importEnvironment(bitId: BitId, verbose: boolean | undefined, dontPrintEnvMsg: boolean): Promise; importComponents(ids: BitIds, withAllVersions: boolean, saveDependenciesAsComponents?: boolean): Promise; shouldDependenciesSavedAsComponents(bitIds: BitId[], saveDependenciesAsComponents?: boolean): Promise<{ id: BitId; saveDependenciesAsComponents: boolean; }[]>; shouldDistsBeInsideTheComponent(): boolean; potentialComponentsForAutoTagging(modifiedComponents: BitIds): BitIds; listComponentsForAutoTagging(modifiedComponents: BitIds): Promise; isComponentModified(componentFromModel: Version, componentFromFileSystem: Component): Promise; getManyComponentsStatuses(ids: BitId[]): Promise; getComponentStatusById(id: BitId): Promise; tag(ids: BitIds, message: string, exactVersion: string | undefined, releaseType: semver.ReleaseType, force: boolean | undefined, verbose: boolean | undefined, ignoreUnresolvedDependencies: boolean | undefined, ignoreNewestVersion: boolean, skipTests: boolean | undefined, skipAutoTag: boolean): Promise<{ taggedComponents: Component[]; autoTaggedResults: AutoTagResult[]; }>; _loadComponentsForTag(ids: BitIds): Promise; updateComponentsVersions(components: Array): Promise; getComponentIdFromNodeModulesPath(requirePath: string, bindingPrefix: string): BitId; composeRelativeComponentPath(bitId: BitId): string; composeComponentPath(bitId: BitId): PathOsBasedAbsolute; composeRelativeDependencyPath(bitId: BitId): PathOsBased; composeDependencyPath(bitId: BitId): PathOsBased; static create(projectPath: PathOsBasedAbsolute, noGit?: boolean, workspaceConfigProps?: WorkspaceConfigProps): Promise; static _getScopePath(projectPath: PathOsBasedAbsolute, noGit: boolean): PathOsBasedAbsolute; static ensure(projectPath: PathOsBasedAbsolute, standAlone?: boolean, workspaceConfigProps?: WorkspaceConfigProps): Promise; static reset(projectPath: PathOsBasedAbsolute, resetHard: boolean, noGit?: boolean): Promise; static createIsolatedWithExistingScope(consumerPath: PathOsBased, scope: Scope): Promise; static locateProjectScope(projectPath: string): string | undefined; static load(currentPath: PathOsBasedAbsolute): Promise; get isLegacy(): boolean; cleanFromBitMap(componentsToRemoveFromFs: BitIds, removedDependencies: BitIds): Promise; addRemoteAndLocalVersionsToDependencies(component: Component, loadedFromFileSystem: boolean): Promise; getAuthoredAndImportedDependentsIdsOf(components: Component[]): Promise; getAuthoredAndImportedDependentsComponentsOf(components: Component[]): Promise; ejectConf(componentId: BitId): Promise; injectConf(componentId: BitId, force: boolean): Promise; _getEnvProps(envType: EnvType, context: Record | undefined): { name: string; consumerPath: string; scopePath: string; rawConfig: Record; files: string[]; bitJsonPath: string; options: import("../legacy-extensions/base-extension").BaseExtensionOptions; envType: EnvType; context: Record | undefined; } | undefined; onDestroy(): Promise; } export {};