UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

37 lines (36 loc) 1.21 kB
import BitId from '../../bit-id/bit-id'; import { BitObject, Ref } from '.'; declare type IndexItem = { id: { scope: string | null | undefined; name: string; }; isSymlink: boolean; hash: string; }; export default class ComponentsIndex { indexPath: string; index: IndexItem[]; constructor(indexPath: string, index?: IndexItem[]); static load(basePath: string): Promise<ComponentsIndex>; static create(basePath: string): ComponentsIndex; static reset(basePath: string): Promise<void>; write(): Promise<void>; getIds(): BitId[]; getIdsIncludesSymlinks(): BitId[]; getIdByHash(hash: string): BitId | null | undefined; getHashes(): string[]; getHashesIncludeSymlinks(): string[]; indexItemToBitId(indexItem: IndexItem): BitId; addMany(bitObjects: BitObject[]): boolean; addOne(bitObject: BitObject): boolean; removeMany(refs: Ref[]): boolean; removeOne(hash: string): boolean; deleteFile(): Promise<void>; getPath(): string; isFileOnBitHub(): boolean; _find(hash: string): IndexItem | null | undefined; _exist(hash: string): boolean; static _composePath(basePath: string): string; } export {};