@launchql/core
Version:
LaunchQL Package and Migration Tools
88 lines (87 loc) • 2.63 kB
TypeScript
import { ModuleMap } from '../modules';
import { ExtensionInfo } from '../extensions';
export declare enum ProjectContext {
Outside = "outside",
Workspace = "workspace-root",
Module = "module",
ModuleInsideWorkspace = "module-in-workspace"
}
export interface InitModuleOptions {
name: string;
description: string;
author: string;
extensions: string[];
}
export declare class LaunchQLProject {
cwd: string;
workspacePath?: string;
modulePath?: string;
config?: any;
allowedDirs: string[];
private _moduleMap?;
private _moduleInfo?;
constructor(cwd?: string);
resetCwd(cwd: string): void;
private resolveLaunchqlPath;
private resolveSqitchPath;
private loadConfig;
private loadAllowedDirs;
isInsideAllowedDirs(cwd: string): boolean;
private createModuleDirectory;
ensureModule(): void;
ensureWorkspace(): void;
getContext(): ProjectContext;
isInWorkspace(): boolean;
isInModule(): boolean;
getWorkspacePath(): string | undefined;
getModulePath(): string | undefined;
clearCache(): void;
getModules(): Promise<LaunchQLProject[]>;
getModuleMap(): ModuleMap;
getAvailableModules(): string[];
getModuleInfo(): ExtensionInfo;
getModuleName(): string;
getRequiredModules(): string[];
setModuleDependencies(modules: string[]): void;
private initModuleSqitch;
initModule(options: InitModuleOptions): void;
getLatestChange(moduleName: string): string;
getLatestChangeAndVersion(moduleName: string): {
change: string;
version: string;
};
getModuleExtensions(): {
resolved: string[];
external: string[];
};
getModuleDependencies(moduleName: string): {
native: string[];
modules: string[];
};
getModuleDependencyChanges(moduleName: string): {
native: string[];
modules: {
name: string;
latest: string;
version: string;
}[];
};
getModulePlan(): string;
getModuleControlFile(): string;
getModuleMakefile(): string;
getModuleSQL(): string;
generateModulePlan(options: {
uri?: string;
projects?: boolean;
}): string;
writeModulePlan(options: {
uri?: string;
projects?: boolean;
}): void;
publishToDist(distFolder?: string): void;
/**
* Installs an extension npm package into the local skitch extensions directory,
* and automatically adds it to the current module’s package.json dependencies.
*/
installModules(...pkgstrs: string[]): Promise<void>;
}