netlify-cli
Version:
Netlify command line tool
33 lines • 1.18 kB
TypeScript
export declare const FILE_NAME = "netlify-development.mdc";
export declare const NETLIFY_PROVIDER = "netlify";
export declare const downloadFile: (cliVersion: string) => Promise<{
contents: string;
minimumCLIVersion: string | undefined;
} | null>;
interface ParsedContextFile {
contents: string;
innerContents?: string;
overrides?: {
contents?: string;
innerContents?: string;
};
provider?: string;
version?: string;
}
/**
* Parses the `<ProviderContext>` and `<ProviderContextOverrides>` blocks in
* a context file.
*/
export declare const parseContextFile: (contents: string) => ParsedContextFile;
/**
* Takes a context file (a template) and injects a string in an overrides block
* if one is found. Returns the resulting context file.
*/
export declare const applyOverrides: (template: string, overrides?: string) => string;
/**
* Reads a file on disk and tries to parse it as a context file.
*/
export declare const getExistingContext: (path: string) => Promise<ParsedContextFile | null>;
export declare const writeFile: (path: string, contents: string) => Promise<void>;
export {};
//# sourceMappingURL=context.d.ts.map