@launchql/migrate
Version:
PostgreSQL Migration Tools
38 lines (37 loc) • 1.36 kB
TypeScript
import { ModuleMap } from './modules';
export interface ExtensionInfo {
extname: string;
packageDir: string;
version: string;
Makefile: string;
controlFile: string;
sqlFile: string;
}
/**
* Get the list of available extensions, including predefined core extensions.
*/
export declare const getAvailableExtensions: (modules: ModuleMap) => string[];
/**
* Parse the sqitch.plan file to get the extension name.
*/
export declare const getExtensionName: (packageDir: string) => string;
/**
* Get detailed information about an extension in the specified directory.
*/
export declare const getExtensionInfo: (packageDir: string) => ExtensionInfo;
/**
* Get a list of extensions required by an extension from its control file.
*/
export declare const getInstalledExtensions: (controlFilePath: string) => string[];
/**
* Write the Makefile for the extension.
*/
export declare const writeExtensionMakefile: (outputPath: string, extname: string, version: string) => void;
/**
* Write the control file for the extension.
*/
export declare const writeExtensionControlFile: (outputPath: string, extname: string, extensions: string[], version: string) => void;
/**
* Write control and Makefile for the extension with given data.
*/
export declare const writeExtensions: (packageDir: string, extensions: string[]) => Promise<void>;