import { type Progress } from '@variance-authority/sense'; import { type Help, type HelpOptions, type ImportTargets, type Offering } from '@variance-authority/package/help'; /** How a value is published from an index `variance index` wrote a moment before. */ export type FromIndexOptions = HelpOptions & { readonly index?: string; /** `false` reads the workspace's own index from the working tree, as `variance index --no-git` does. */ readonly packs?: boolean; readonly progress?: Progress; /** When the update of that index began reading the checkout: the read this publish rests on is the caller's. */ readonly readStartedAt: string; }; /** What {@link publishWorkspaceFromIndex} did: the generation it published, or the one it kept. */ export interface IndexPublication { readonly generation: string; /** The value published last was kept, because the index and the manifests are the ones it was published from. */ readonly kept: boolean; } /** * Publish the questions about the workspace at `root` from an index that was * just written, and keep the value published last when that index did not * move. What it published or kept, `undefined` when there is no index to read. * * The manifests are the costliest read before the index on a workspace that * lists thousands of members, so they are read once here. Whether to keep is * read off the store's head and the tree beside it: the store behind the head * holds every export of the repository, and is opened only to publish again. */ export declare function publishWorkspaceFromIndex(root: string, options: FromIndexOptions): Promise; /** What {@link publishHelp} reads and writes. */ export interface HelpPublication { /** The workspace the value answers about. */ readonly workspace: string; /** The repository root whose graph carries that workspace: what every recorded path is relative to. */ readonly root: string; readonly offerings: readonly Offering[]; readonly targets: ImportTargets; /** The index the value is read from: the workspace's own, or the scope's beside it. */ readonly index: string; /** The workspace's own index, beside which the value is published. */ readonly own: string; readonly readStartedAt: string; /** The tree to publish in place of the one the addon draws off the index, such as one a caller's taints joined. */ readonly tree?: Uint8Array; readonly progress?: Progress; } /** * The one producer of the published value: the chain at `index` read by the * addon — the uses, the names each entry hands out and the declarations they * are read from, the export list, the imports by path and the tree — joined * by the addon with the manifests read here and the READMEs into the * documented surface, encoded, and published beside `own`. No name, use or * parse row crosses into JavaScript. * The value as published, and the tree it was published with; `undefined` * when no index was published at `index`. Throws with the first export whose * declaration the chain cannot say. */ export declare function publishHelp(publication: HelpPublication): Promise<{ readonly help: Help; readonly tree: Uint8Array; } | undefined>; /** * The offerings a value is documented from, as a digest: names, declarations, * whether each declares an entry, and openings. The store keeps it in its head, * so a refresh compares manifests without keeping them. */ export declare function packagesDigest(root: string, offerings: readonly Offering[]): string; //# sourceMappingURL=refresh-native.d.ts.map