/** * Where each module publishes, resolved. * * The cascade is per module, because a workspace may declare a base per subtree: * the entry's `registry:` → the `release:` block's → `--registry` → * `TELO_OCI_REGISTRY` → the base that module's own ledger entry recorded. * * **The ledger is last, and that is a change.** It used to win over the flag and * the variable, and a disagreement threw before any evidence was collected. A * workspace that authors its destination has said where it publishes, and a * cache of a past answer must not outrank it — so the ledger keeps its rung as a * record for a workspace that authors nothing, and a disagreement between the * two is reported per module by the planner rather than aborting the run. */ import { type Ledger, type ModuleKey, type ReleaseDiagnostic } from "@telorun/analyzer"; import type { ModulePayloadBuilder } from "../bundle/module-payload.js"; import type { ModuleTarget } from "./evidence.js"; import type { DiscoveredModule, Workspace } from "./workspace.js"; export interface RegistryRungs { /** `--registry`. */ readonly flag?: string; /** `TELO_OCI_REGISTRY`. */ readonly env?: string; } export interface ResolvedTargets { readonly targets: ReadonlyMap; readonly diagnostics: readonly ReleaseDiagnostic[]; } /** * A module's publish destination: its registry base plus its own directory name. * * Identity is the ref, never `metadata.name` — this is the same rule the release * job has always applied, lifted out of a shell script. * * This is the ROOT destination, which is a policy rather than a derivation: * nothing in the graph can say which repo a module publishes to. The payload * builder derives a SIBLING's from it instead of re-applying this rule, so the * ref an artifact carries and the destination its dependency is pushed to are * the same string by construction — and where those two answers disagree, * `checkImportDestinations` says so before a payload is built. */ export declare function destinationFor(registry: string, module: DiscoveredModule): string; export declare function resolveTargets(workspace: Workspace, ledger: Ledger, rungs: RegistryRungs): ResolvedTargets; export interface ImportGraph { /** In-repo modules each module imports by relative path. */ readonly imports: ReadonlyMap; readonly diagnostics: readonly ReleaseDiagnostic[]; } /** * The in-repo import edges, and whether every one of them agrees about where its * target publishes. * * Reads manifest TEXT and nothing else — no payload, no claim on the shared * builder. Both properties are load-bearing rather than incidental: the claim is * what the payload builder refuses on, so a check that ran after one would never * be reached, and its message speaks about a manifest published to two places * rather than about the workspace file that said so. */ export declare function readImportGraph(workspace: Workspace, targets: ReadonlyMap, builder: ModulePayloadBuilder): Promise; //# sourceMappingURL=targets.d.ts.map