export interface Forge { /** Which family the URL shape came from; "unknown" means the convention was assumed. */ kind: "github" | "gitlab" | "bitbucket" | "azure" | "unknown"; /** The host, shown so a person can see where a link goes before clicking it. */ host: string; /** Web URL of the repository, no trailing slash. */ repoUrl: string; } /** * A remote URL in any of the forms git accepts, as a web URL. * * Returns null for a remote nothing can be built from: a local path, a file:// * clone, an empty string. A project cloned from a directory has no web home, * and inventing one would produce a link to nowhere. */ export declare function parseRemote(remote: string): Forge | null; /** Where that commit is browsable, in whichever shape this host uses. */ export declare function commitUrl(forge: Forge, sha: string): string | null; /** * The remote to link against: `origin` when there is one, else whatever the * repository's first remote is, because a checkout with one differently-named * remote is still a checkout with a web home. */ export declare function readRemote(cwd: string): Promise; export declare function forgeOf(cwd: string): Promise; /** Drop the memo, for tests and for a ui server that has been repointed. */ export declare function forgetForges(): void;