#!/usr/bin/env bun /** * How a product publishes its docs bundle for the public plane to fetch * (fleet review 03 s3.5 slice 6, product half). Used by * conventions/publish-docs.yml, which every public product repo copies * verbatim. * * Versioned assets behind a moving pointer, all on the ONE `docs-latest` * release. A release per commit would leave hundreds of prereleases on each * product repo; a single clobbered asset would leave nothing to roll back to. * Only the pointer moves, so a rollback is a pointer edit and the ctl site * never reads an asset being overwritten underneath it. * * `manual.html` stays on the same release, clobbered as before: it is what the * current ctl fetcher mounts at /products//, and it keeps working * unchanged while the bundle ingestion is built. */ export interface BundlePointer { /** Short product commit — the bundle's identity. */ version: string; /** The release asset holding that bundle. */ asset: string; /** Full product commit the bundle was built from. */ sha: string; runId?: string; builtAt: string; } export declare const DOCS_RELEASE_TAG = "docs-latest"; export declare const POINTER_ASSET = "latest.json"; export declare function bundleVersion(sha: string): string; export declare function bundleAssetName(version: string): string; export declare function pointerJson(p: BundlePointer): string; export declare function parsePointer(json: string): BundlePointer; /** Which versioned bundles to delete, newest `keep` kept. Only ever names * `bundle-.tar.gz` assets — `manual.html` and the pointer are the * release's fixtures — and never the one the pointer currently names, which * would leave the site fetching a 404. */ export declare function assetsToPrune(assets: readonly { name: string; createdAt: string; }[], keep: number, current: string): string[];