import { Capsule } from '../extensions/isolator/capsule'; import Consumer from '../consumer/consumer'; import { Scope, ComponentWithDependencies } from '../scope'; import { BitId } from '../bit-id'; import ManyComponentsWriter from '../consumer/component-ops/many-components-writer'; import PackageJsonFile from '../consumer/component/package-json-file'; import BitMap from '../consumer/bit-map'; import { PathOsBased } from '../utils/path'; import { PackageManagerResults } from '../npm-client/npm-client'; export interface IsolateOptions { writeToPath?: PathOsBased; override?: boolean; writePackageJson?: boolean; writeConfig?: boolean; writeBitDependencies?: boolean; createNpmLinkFiles?: boolean; saveDependenciesAsComponents?: boolean; writeDists?: boolean; shouldBuildDependencies?: boolean; installNpmPackages?: boolean; keepExistingCapsule?: boolean; installPeerDependencies?: boolean; installProdPackagesOnly?: boolean; verbose?: boolean; excludeRegistryPrefix?: boolean; silentPackageManagerResult?: boolean; applyExtensionsAddedConfig?: boolean; } export default class Isolator { capsule: Capsule; consumer?: Consumer; scope: Scope; capsuleBitMap: BitMap; capsulePackageJson: PackageJsonFile; componentWithDependencies: ComponentWithDependencies; manyComponentsWriter: ManyComponentsWriter; _npmVersionHasValidated: boolean; componentRootDir: string; dir?: string; constructor(capsule: Capsule, scope: Scope, consumer?: Consumer, dir?: string); static getInstance(containerType: string | undefined, scope: Scope, consumer?: Consumer, dir?: string): Promise; isolate(componentId: BitId, opts: IsolateOptions): Promise; writeComponentsAndDependencies(opts?: { keepExistingCapsule: boolean; }): Promise; installComponentPackages(opts?: { installNpmPackages: boolean; keepExistingCapsule: boolean; }): Promise; writeLinks(opts?: { keepExistingCapsule: boolean; }): Promise; writeLinksOnNodeModules(): Promise; _manipulateDir(): void; _loadComponent(id: BitId): Promise; _loadComponentFromConsumer(id: BitId): Promise; _persistComponentsDataToCapsule(opts?: { keepExistingCapsule: boolean; }): Promise; _addComponentsToRoot(opts?: { keepExistingCapsule: boolean; }): Promise; _writeCapsulePackageJson(opts?: { keepExistingCapsule: boolean; }): Promise; _getNpmVersion(): Promise; installPackagesOnRoot(modules?: string[]): Promise; _throwForOldNpmVersion(): Promise; capsuleExecUsingExeca(pkgManager: string, args: string[], dir?: string): Promise; capsuleExec(cmd: string, options?: Record | null | undefined): Promise; _installWithPeerOption(installPeerDependencies?: boolean): Promise; _getPeerDependencies(): Promise>; _getNpmListOutput(packageManager: string): Promise; }