import { ChecklyConfig, PlaywrightSlimmedProp } from './checkly-config-loader.js'; export interface GitInformation { /** Absent when the repository has no commits yet but a repo URL is known. */ commitId?: string; repoUrl?: string | null; branchName?: string | null; commitOwner?: string | null; commitMessage?: string | null; github?: GitHubActionsInformation; } export interface GitHubActionsInformation { reporting: true; source?: string; githubCheckName?: string; pullRequestNumber?: string; environmentUrl?: string; repository?: string; sha?: string; runId?: string; runAttempt?: string; workflow?: string; job?: string; jobId?: string; eventName?: string; ref?: string; headRef?: string; baseRef?: string; serverUrl?: string; rerun?: string; } export interface CiInformation { environment: string | null; } /** * Turns a git remote URL into a credential-free web URL, e.g. * `git@github.com:acme/app.git` -> `https://github.com/acme/app`. * Returns `undefined` for remotes that have no web URL (local paths, file://, * SSH config aliases, SSH hosts with a different web path layout). */ export declare function normalizeGitRemoteUrl(remote: string): string | undefined; /** * The web URL of the `origin` remote of the git repository at `cwd`, with * credentials stripped. `undefined` when there is no repository, no origin, * or git is not installed. */ export declare function getRepoUrlFromGit(cwd?: string): string | undefined; export declare function findFilesRecursively(directory: string, ignoredPaths?: Array): string[]; /** * @param relPath the path to be converted * @param separator this is for testing purposes only so we can reliably replace the separator on Linux / Darwin */ export declare function pathToPosix(relPath: string, separator?: string): string; export declare function splitConfigFilePath(configFile?: string): { configDirectory: string; configFilenames?: string[]; }; export declare function isFileSync(path: string): boolean; /** * @param repoUrl default repoURL the user can set in their project config. * @param cwd directory to read git information from. */ export declare function getGitInformation(repoUrl?: string, cwd?: string): GitInformation | null; /** * The absolute path of the git repository root the CLI runs in, or * `undefined` outside a repository. Kept separate from GitInformation, which * is sent to the API as `repoInfo` verbatim and must not carry local * filesystem paths. * * Walks up from `startDir` to the nearest `.git` entry rather than using * `git-repo-info`'s `root`: in a linked worktree that library reports the * main checkout, and files would then be attributed relative to the wrong * tree. A `.git` *file* (worktree or submodule) counts as a root just like * a `.git` directory does. */ export declare function getGitRepoRoot(startDir?: string): string | undefined; export declare function getCiInformation(): CiInformation; export declare function escapeValue(value: string | undefined): string; export declare function getEnvs(envFile: string | undefined, envArgs: Array): Promise; export declare function findFilesWithPattern(directory: string, pattern: string | string[], ignorePattern: string[]): Promise; export declare function getDefaultChecklyConfig(directoryName: string, playwrightConfigPath: string, playwrightCheck?: PlaywrightSlimmedProp | null): ChecklyConfig; export declare function writeChecklyConfigFile(dir: string, config: ChecklyConfig): Promise; export declare function getPlaywrightConfigPath(playwrightCheckProps: PlaywrightSlimmedProp, playwrightConfigPath: string | undefined, dir: string): string; export declare function findPlaywrightConfigPath(dir: string): string | undefined;