@stacksjs/launchpad
Version:
Like Homebrew, but faster.
52 lines • 1.45 kB
TypeScript
export declare interface PHPStrategy {
name: string
priority: number
detect: () => Promise<boolean>
install: () => Promise<PHPInstallResult>
getExecutablePath: () => string
getDatabaseSupport: () => DatabaseSupport
}
export declare interface PHPInstallResult {
success: boolean
phpPath: string
version: string
extensions: string[]
databaseSupport: DatabaseSupport
libraryIssues: string[]
recommendations: string[]
}
export declare interface DatabaseSupport {
sqlite: boolean
mysql: boolean
postgresql: boolean
extensions: {
pdo_sqlite?: boolean
pdo_mysql?: boolean
pdo_pgsql?: boolean
mysqli?: boolean
pgsql?: boolean
}
}
/**
* Source Build PHP Strategy (Only Strategy)
* Always builds PHP from source using Homebrew-style approach
*/
export declare class SourceBuildPHPStrategy implements PHPStrategy {
name: any;
priority: any;
private installedVersion: string | null;
detect(): Promise<boolean>;
install(): Promise<PHPInstallResult>;
getExecutablePath(): string;
getDatabaseSupport(): DatabaseSupport;
private testPHPInstallation(phpPath: string): Promise<{ success: boolean, version?: string, extensions?: string[] }>;
}
/**
* Simplified PHP Strategy Manager
* Uses only the source build strategy
*/
export declare class PHPStrategyManager {
private strategy: PHPStrategy;
setupPHP(): Promise<PHPInstallResult>;
getOptimalStrategy(): Promise<PHPStrategy>;
}