import type fsExtra from "fs-extra"; import tmp from "tmp-promise"; import type { Log } from "../logger/log-entry"; import type { VcsHandler } from "../vcs/vcs"; export declare const defaultConfigFilename = "garden.yml"; export declare const configFilenamePattern = "*garden.y*ml"; export declare const fixedProjectExcludes: string[]; /** * Helper function to check whether a given filename is a valid Garden config filename */ export declare function isConfigFilename(filename: string): filename is "Growfile.ts"; /** * Given a directory path returns an array of module paths for the project. * * @param {string} dir The directory to scan */ export declare function findConfigPathsInPath({ vcs, dir, include, exclude, log, }: { vcs: VcsHandler; dir: string; include?: string[]; exclude?: string[]; log: Log; }): Promise; /** * Converts a Windows-style path to a cygwin style path (e.g. C:\some\folder -> /cygdrive/c/some/folder). */ export declare function toCygwinPath(path: string): string; export declare function normalizeLocalRsyncPath(path: string): string; /** * Normalize given path to POSIX-style path relative to `root` */ export declare function normalizeRelativePath(root: string, path: string): string; /** * Joins a POSIX-formatted path with a `basePath` of any format/platform. */ export declare function joinWithPosix(basePath: string, posixRelPath?: string): string; /** * Return a list of all files in directory at `path` */ export declare function listDirectory(path: string, { recursive }?: { recursive?: boolean | undefined; }): Promise; /** * Given a list of `paths`, return a list of paths that match any of the given `patterns` */ export declare function matchGlobs(paths: string[], patterns: string[]): string[]; /** * Check if a path passes through given include/exclude filters. * * @param path A filesystem path * @param include List of globs to match for inclusion, or undefined * @param exclude List of globs to match for exclusion, or undefined */ export declare function matchPath(path: string, include?: string[], exclude?: string[]): boolean; /** * Gets an ID for the current working copy, given the path to the project's `.garden` directory. * We do this by storing a `metadata` file in the directory with an ID. The file is created on demand and a new * ID is set when it is first generated. * * The implication is that removing the `.garden` directory resets the ID, so any remote data attached to the ID * will be orphaned. Which is usually not a big issue, but something to be mindful of. */ export declare function getWorkingCopyId(gardenDirPath: string): Promise; /** * Returns true if the given path is a directory, otherwise false. Throws if the path does not exist. */ export declare function isDirectory(path: string): Promise; export type TempDirectory = tmp.DirectoryResult; /** * Create a temp directory. Make sure to clean it up after use using the `cleanup()` method on the returned object. */ export declare function makeTempDir({ git, initialCommit, }?: { git?: boolean; initialCommit?: boolean; }): Promise; /** * Returns the type of the given fs.Stats object as a string. * * @param stats an fs.Stats instance */ export declare function getStatsType(stats: fsExtra.Stats): "unknown" | "directory" | "block device" | "character device" | "named pipe" | "file" | "socket" | "symbolic link";