UNPKG

@socketsecurity/lib

Version:

Core utilities and infrastructure for Socket.dev security tools

29 lines (28 loc) 899 B
/** * Extract user and project from GitHub repository URL. */ /*@__NO_SIDE_EFFECTS__*/ export declare function getRepoUrlDetails(repoUrl?: string): { user: string; project: string; }; /** * Generate GitHub API URL for a tag reference. */ /*@__NO_SIDE_EFFECTS__*/ export declare function gitHubTagRefUrl(user: string, project: string, tag: string): string; /** * Generate GitHub tarball download URL for a commit SHA. */ /*@__NO_SIDE_EFFECTS__*/ export declare function gitHubTgzUrl(user: string, project: string, sha: string): string; /** * Check if a package specifier is a GitHub tarball URL. */ /*@__NO_SIDE_EFFECTS__*/ export declare function isGitHubTgzSpec(spec: unknown, where?: string): boolean; /** * Check if a package specifier is a GitHub URL with committish. */ /*@__NO_SIDE_EFFECTS__*/ export declare function isGitHubUrlSpec(spec: unknown, where?: string): boolean;