import ComponentObjects from './component-objects'; import { Symlink, Version, ModelComponent } from './models'; import { ScopeJson } from './scope-json'; import { Tmp } from './repositories'; import { BitId, BitIds } from '../bit-id'; import ComponentVersion from './component-version'; import { Repository, BitObject, BitRawObject } from './objects'; import SourcesRepository from './repositories/sources'; import Consumer from '../consumer/consumer'; import { MigrationResult } from '../migration/migration-helper'; import Component from '../consumer/component/consumer-component'; import RemovedObjects from './removed-components'; import DependencyGraph from './graph/scope-graph'; import Dists from '../consumer/component/sources/dists'; import SpecsResults from '../consumer/specs-results'; import { SpecsResultsWithComponentId } from '../consumer/specs-results/specs-results'; import { PathOsBasedAbsolute } from '../utils/path'; import { BitIdStr } from '../bit-id/bit-id'; import { ComponentLogs } from './models/model-component'; import ScopeComponentsImporter from './component-ops/scope-components-importer'; import VersionDependencies from './version-dependencies'; export declare type ScopeDescriptor = { name: string; }; export declare type ScopeProps = { path: string; scopeJson: ScopeJson; created?: boolean; tmp?: Tmp; sources?: SourcesRepository; objects: Repository; }; export declare type IsolateOptions = { directory: string | null | undefined; write_bit_dependencies: boolean | null | undefined; links: boolean | null | undefined; install_packages: boolean | null | undefined; installPeerDependencies: boolean | null | undefined; no_package_json: boolean | null | undefined; override: boolean | null | undefined; }; export declare type ComponentsAndVersions = { component: ModelComponent; version: Version; versionStr: string; }; export default class Scope { created: boolean; scopeJson: ScopeJson; tmp: Tmp; path: string; scopeImporter: ScopeComponentsImporter; sources: SourcesRepository; objects: Repository; _dependencyGraph: DependencyGraph; constructor(scopeProps: ScopeProps); onTag: Function[]; import(ids: BitIds, cache?: boolean, persist?: boolean): Promise; getDependencyGraph(): Promise; get groupName(): string | null | undefined; get name(): string; getPath(): string; getComponentsPath(): string; static getComponentsRelativePath(): string; static getComponentRelativePath(id: BitId, scopePath?: string): string; getBitPathInComponentsDir(id: BitId): string; migrate(verbose: boolean): Promise; describe(): ScopeDescriptor; toConsumerComponents(components: ModelComponent[]): Promise; list(): Promise; listIncludesSymlinks(): Promise>; listLocal(): Promise; latestVersions(componentIds: BitId[], throwOnFailure?: boolean): Promise; buildMultiple(components: Component[], consumer: Consumer, noCache: boolean, verbose: boolean, dontPrintEnvMsg?: boolean | undefined): Promise<{ component: string; buildResults: Record; }>; injectNodePathIfNeeded(consumer: Consumer, components: Component[]): void; testMultiple({ components, consumer, verbose, dontPrintEnvMsg, rejectOnFailure }: { components: Component[]; consumer: Consumer; verbose: boolean; dontPrintEnvMsg?: boolean; rejectOnFailure?: boolean; }): Promise; writeComponentToModel(componentObjects: ComponentObjects): Promise; writeManyComponentsToModel(componentsObjects: ComponentObjects[], persist?: boolean): Promise; getObject(hash: string): Promise; getRawObject(hash: string): Promise; getModelComponentIfExist(id: BitId): Promise; removeMany(bitIds: BitIds, force: boolean, removeSameOrigin?: boolean, consumer?: Consumer): Promise; findDependentBits(bitIds: BitIds, returnResultsWithVersion?: boolean): Promise<{ [key: string]: BitId[]; }>; filterFoundAndMissingComponents(bitIds: BitIds): Promise<{ missingComponents: BitIds; foundComponents: BitIds; }>; loadLocalComponents(ids: BitIds): Promise; loadComponentLogs(id: BitId): Promise; loadAllVersions(id: BitId): Promise; getModelComponent(id: BitId): Promise; getModelComponentIgnoreScope(id: BitId): Promise; getConsumerComponent(id: BitId): Promise; getManyConsumerComponents(ids: BitId[]): Promise; getConsumerComponentIfExist(id: BitId): Promise; getVersionInstance(id: BitId): Promise; getComponentsAndVersions(ids: BitIds): Promise; getComponentsAndAllLocalUnexportedVersions(ids: BitIds): Promise; createSymlink(id: BitId, remote: string): Repository; ensureDir(): Promise; findDirectDependentComponents(componentsPool: BitIds, potentialDependencies: BitIds): Promise; runComponentSpecs({ bitId, consumer, save, verbose, isolated, directory, keep }: { bitId: BitId; consumer?: Consumer; save?: boolean; verbose?: boolean; isolated?: boolean; directory?: string; keep?: boolean; }): Promise; build({ bitId, save, consumer, verbose, directory, keep, noCache }: { bitId: BitId; save?: boolean; consumer?: Consumer; verbose?: boolean; directory?: string; keep?: boolean; noCache?: boolean; }): Promise; loadModelComponentByIdStr(id: string): Promise; getParsedId(id: BitIdStr): Promise; static ensure(path: PathOsBasedAbsolute, name: string | null | undefined, groupName: string | null | undefined): Promise; static ensureScopeJson(path: PathOsBasedAbsolute, name?: string | null | undefined, groupName?: string | null | undefined): ScopeJson; static scopeCache: { [path: string]: Scope; }; static reset(path: PathOsBasedAbsolute, resetHard: boolean): Promise; static load(absPath: string, useCache?: boolean): Promise; }