/** * How far behind an emulator's pinned image is (#1345, generalizing #808 T2). * * This began as `lexicons/fly/src/emulator-freshness.ts`, checking fly's two * pins against their GitHub releases. The other three emulators — Floci for aws, * floci-az, floci-gcp — ran `:latest`, so there was nothing to be behind and * nothing to check: an image could change underneath a passing local test suite * with no record in the repo of what moved. * * With the pin and its upstream declared on {@link EmulatorSpec}, the check * covers every emulator any lexicon ships, and a new one is included by * declaring `upstream` rather than by editing a list here. * * Advisory, never gating. Per the bump policy (#808) a pin moves when a * consuming test needs the newer emulator, not because a release happened. */ import type { EmulatorSpec } from "./emulator-lifecycle.js"; export interface FreshnessResult { /** The emulator's container name, e.g. `chant-mudflaps`. */ name: string; /** Pinned version, no leading `v`. */ pinned: string; /** Latest released version, no leading `v`. */ latest: string; /** True when the latest release is newer than the pin. */ behind: boolean; } /** The version tag of an image ref (`ghcr.io/x/mudflaps:0.3.1` → `0.3.1`). */ export declare function parseVersion(image: string): string; /** Compare pinned against latest as dotted numeric versions. */ export declare function compare(name: string, pinned: string, latest: string): FreshnessResult; /** The latest release tag for a repo, via the GitHub REST API. */ export declare function latestRelease(repo: string, fetchImpl?: typeof fetch): Promise; /** * Check every spec that declares an upstream. A spec without one is skipped * rather than reported — an emulator built from a local image has no release * feed to be behind. */ export declare function checkFreshness(specs: readonly EmulatorSpec[], fetchImpl?: typeof fetch): Promise; /** One-line human summary of a result. */ export declare function formatResult(r: FreshnessResult): string; /** Emulator images that carry no version tag — `:latest` or none at all. */ export declare function unpinned(specs: readonly EmulatorSpec[]): EmulatorSpec[]; //# sourceMappingURL=emulator-freshness.d.ts.map