all-package-names
Version:
Fast lookup and iteration over all NPM package names
44 lines • 1.23 kB
TypeScript
import type { BootstrapRelease, SyncProgress } from "./registry.ts";
/**
* Options for syncing a custom package-name store.
*/
export type SyncOptions = {
namesPath?: string;
manifestPath?: string;
onProgress?: (progress: SyncProgress) => void;
};
/**
* Summary returned after applying replication changes to the local store.
*/
export type SyncResult = {
since: number;
count: number;
added: number;
removed: number;
processedChanges: number;
};
/**
* Options for restoring a custom package-name store from the latest release.
*/
export type BootstrapOptions = {
namesPath?: string;
manifestPath?: string;
release?: BootstrapRelease;
};
/**
* Summary returned after restoring the local store from the latest release.
*/
export type BootstrapResult = {
version: string;
since: number;
count: number;
};
/**
* Restores the local store from the latest published GitHub release.
*/
export declare function bootstrapNames(options?: BootstrapOptions): Promise<BootstrapResult>;
/**
* Synchronizes the local store files with the npm replication feed.
*/
export declare function syncNames(options?: SyncOptions): Promise<SyncResult>;
//# sourceMappingURL=index.d.ts.map