import type { DomainInfo } from './diag-domain-config.types.js'; /** * Extracts `hostname`, `pathname`, `isWildcard` from a given `domain` */ export declare function parseDomain(domain: string): { hostname: string; pathname: string; isWildcard: boolean; }; export declare class DomainParseError extends Error { code: 'empty' | 'invalid-wildcard' | 'invalid-format'; cause?: unknown; constructor(code: 'empty' | 'invalid-wildcard' | 'invalid-format', message: string, cause?: unknown); } /** * If isWildcard is `true`, returns `*.${hostname}` * else returns the `hostname` untouched */ export declare function getHostWithWildcard(hostname: string, isWildcard: boolean): string; export declare function getDomainUrl(hostname: string, pathPrefix: string, isWildcard: boolean, isHttpOnly: boolean): string; /** * Parses a `domainWithPath` and builds its browsable URL in one step. * * The scheme is derived from the domain: test subdomains (e.g. `sub.app.cleverapps.io`) * are HTTP only, everything else uses HTTPS. */ export declare function domainToUrl(domainWithPath: string): string; export declare function isTestDomain(hostname: string): boolean; /** * Checks if the domain is a `cleverapps.io` domain and if it contains a subdomain. * For instance `subdomain.main.cleverapps.io` is HTTP only. * * @returns whether the domain is a `cleverapps.io` is HTTP only or not */ export declare function isTestDomainWithSubdomain(domain: string): boolean; export declare function sortDomains(domainA: Pick, domainB: Pick): number; //# sourceMappingURL=domains.d.ts.map