/** * Forge coordinate, clone URL, and browser URL grammar. * * Probing and acquisition stay with source resolution; the model owns the * strings and URLs that identify each forge repository. * * @experimental This API is unstable and may change without notice. * @packageDocumentation */ import * as Option from "effect/Option"; import * as Result from "effect/Result"; /** @experimental */ export declare const FORGE_PREFIXES: readonly ["github", "gitlab", "bitbucket", "azurerepos"]; /** @experimental */ export type ForgePrefix = (typeof FORGE_PREFIXES)[number]; /** @experimental */ export declare const isForgePrefix: (value: string) => value is ForgePrefix; /** @experimental */ export interface ForgeCoordinate { readonly forge: ForgePrefix; readonly repository: string; readonly ref: Option.Option; readonly subPath: Option.Option; } interface BrowserPath { readonly repository: string; readonly ref?: string; readonly subPath?: string; } /** @experimental */ export interface Forge { readonly prefix: ForgePrefix; readonly hostname: string; readonly repositorySegments: (count: number) => boolean; readonly cloneUrl: (repository: string) => URL; readonly repositoryFromCloneUrl: (pathname: string) => string | undefined; readonly parseBrowserPath: (pathname: string) => BrowserPath | undefined; } /** @experimental */ export declare const FORGES: Record; /** @experimental */ export declare const forgeForHostname: (hostname: string) => Forge | undefined; /** @experimental */ export declare const parseForgeCoordinate: (forge: ForgePrefix, body: string) => Result.Result; /** @experimental */ export declare const printForgeCoordinateBody: (coordinate: ForgeCoordinate) => string; /** @experimental */ export declare const printForgeCoordinate: (coordinate: ForgeCoordinate) => string; /** @experimental */ export declare const forgeCloneUrl: (coordinate: ForgeCoordinate) => URL; /** @experimental */ export declare const forgeCoordinateFromGitUrl: (url: URL, ref: Option.Option, subPath: Option.Option) => Option.Option; /** @experimental */ export declare const parseForgeBrowserUrl: (url: URL) => Option.Option; export {}; //# sourceMappingURL=forge-grammar.d.ts.map