UNPKG

valor-interview

Version:

CLI tool for downloading Valor interview challenges

48 lines 2 kB
import type { Challenge, CopyOptions } from '../types'; /** * Gets the challenges directory path within a cloned repository * @param repoPath - Root path of the cloned repository * @returns Full path to the challenges directory */ export declare const getChallengesDirectory: (repoPath: string) => string; /** * Scans for challenges using GitHub API (fast, no cloning required) * @param repoUrl - GitHub repository URL * @returns Array of available challenges * @throws {Error} If the repository is not a GitHub repository */ export declare const scanChallengesFromAPI: (repoUrl: string) => Promise<Challenge[]>; /** * Scans for challenges from filesystem (requires cloned repository) * @param challengesDir - Path to the challenges directory * @returns Array of available challenges * @throws {Error} If the challenges directory doesn't exist */ export declare const scanChallengesFromFilesystem: (challengesDir: string) => Promise<Challenge[]>; /** * Scans for available challenges (GitHub API preferred) * @param repoUrl - Repository URL * @returns Array of available challenges * @throws {Error} If the repository is not supported */ export declare const scanChallenges: (repoUrl: string) => Promise<Challenge[]>; /** * Copies a challenge to the specified destination * @param options - Copy configuration options * @returns Path to the copied challenge * @throws {Error} If the copy operation fails */ export declare const copyChallenge: ({ source, destination, overwrite, }: CopyOptions) => Promise<string>; /** * Validates if a path string is not empty * @param path - Path string to validate * @returns True if the path is valid (not empty) */ export declare const validatePath: (path: string) => boolean; /** * Resolves a path string to an absolute path * @param path - Path string to resolve * @returns Absolute path (defaults to current working directory if empty) */ export declare const resolvePath: (path: string) => string; //# sourceMappingURL=file.d.ts.map