import type { LinkedSource } from "./config-store/local"; import type { GrowContext } from "./context"; export type ExternalSourceType = "project" | "action"; export type LinkedSourcesConfigKey = "linkedProjectSources" | "linkedActionSources"; /** * A remote source dir name has the format 'source-name--HASH_OF_REPO_URL' * so that we can detect if the repo url has changed */ export declare function getRemoteSourceDirname({ name, url }: { name: string; url: string; }): string; /** * Return the absolute path to the directory where remote sources are cloned to, for the given source type. */ export declare function getRemoteSourcesPath({ type, growMetadataDirPath, }: { type: ExternalSourceType; growMetadataDirPath: string; }): string; /** * Return the absolute local path of the given remote source, i.e. where it should be cloned to. */ export declare function getRemoteSourceLocalPath(params: { name: string; url: string; type: ExternalSourceType; growMetadataDirPath: string; }): string; export declare function hashRepoUrl(url: string): string; export declare function getConfigKey(type: ExternalSourceType): LinkedSourcesConfigKey; /** * Returns an array of linked sources by type, as read from the local config store. * Returns all linked sources if typed not specified. */ export declare function getLinkedSources(grow: GrowContext, type?: ExternalSourceType): Promise; export declare function addLinkedSources({ grow, sourceType, sources, }: { grow: GrowContext; sourceType: ExternalSourceType; sources: LinkedSource[]; }): Promise; export declare function removeLinkedSources({ grow, sourceType, names, }: { grow: GrowContext; sourceType: ExternalSourceType; names: string[]; }): Promise;