jpglens
Version:
🔍 Universal AI-Powered UI Testing - See your interfaces through the lens of intelligence
193 lines • 4.93 kB
TypeScript
/**
* 🔍 jpglens - Framework Compatibility Layer
* Universal AI-Powered UI Testing
*
* @author Taha Bahrami (Kaito)
* @license MIT
*/
/**
* Version compatibility matrix for supported frameworks
* This ensures jpglens works with both current and legacy versions
*/
export declare const FRAMEWORK_COMPATIBILITY: {
playwright: {
minVersion: string;
maxVersion: string;
currentVersion: string;
features: {
screenshot: {
'1.20.0': {
animations: boolean;
mask: boolean;
};
'1.30.0': {
animations: boolean;
mask: boolean;
};
'1.40.0': {
animations: boolean;
mask: boolean;
clip: boolean;
};
};
viewport: {
'1.20.0': string;
'1.35.0': string;
};
};
};
cypress: {
minVersion: string;
maxVersion: string;
currentVersion: string;
features: {
commands: {
'10.0.0': {
customCommands: boolean;
screenshot: boolean;
};
'12.0.0': {
customCommands: boolean;
screenshot: boolean;
intercept: boolean;
};
};
};
};
selenium: {
minVersion: string;
maxVersion: string;
currentVersion: string;
features: {
screenshot: {
'4.0.0': string;
'4.10.0': string;
};
};
};
storybook: {
minVersion: string;
maxVersion: string;
currentVersion: string;
features: {
testing: {
'6.5.0': string;
'7.0.0': string;
};
interactions: {
'6.5.0': {
play: boolean;
userEvent: string;
};
'7.0.0': {
play: boolean;
userEvent: string;
};
};
};
};
};
/**
* AI Provider API compatibility
*/
export declare const AI_PROVIDER_COMPATIBILITY: {
openrouter: {
apiVersion: string;
endpoint: string;
models: {
vision: string[];
};
imageFormat: string;
maxImageSize: number;
requestFormat: {
messages: boolean;
image_url: boolean;
detail: boolean;
};
};
openai: {
apiVersion: string;
endpoint: string;
models: {
vision: string[];
};
imageFormat: string;
maxImageSize: number;
requestFormat: {
messages: boolean;
image_url: boolean;
detail: boolean;
};
};
anthropic: {
apiVersion: string;
endpoint: string;
models: {
vision: string[];
};
imageFormat: string;
maxImageSize: number;
requestFormat: {
messages: boolean;
image: boolean;
source: boolean;
};
};
};
/**
* Check if a framework version is supported
*/
export declare function isFrameworkSupported(framework: string, version: string): boolean;
/**
* Get feature availability for a framework version
*/
export declare function getFrameworkFeatures(framework: string, version: string): any;
/**
* Auto-detect framework versions at runtime
*/
export declare function detectFrameworkVersion(framework: string): Promise<string | null>;
/**
* Compatibility adapter for different framework versions
*/
export declare class FrameworkAdapter {
private framework;
private version;
private features;
constructor(framework: string, version?: string);
/**
* Get compatible screenshot options for the framework version
*/
getScreenshotOptions(userOptions?: any): any;
/**
* Get compatible viewport method for the framework version
*/
getViewportMethod(): string;
/**
* Check if a specific feature is available
*/
hasFeature(featureName: string): boolean;
}
/**
* Runtime compatibility checker
*/
export declare class CompatibilityChecker {
private warnings;
private errors;
/**
* Check all framework compatibility
*/
checkAll(): Promise<{
warnings: string[];
errors: string[];
compatible: boolean;
}>;
/**
* Check specific framework compatibility
*/
checkFramework(framework: string): Promise<void>;
/**
* Get recommendations for compatibility issues
*/
getRecommendations(): string[];
}
//# sourceMappingURL=compatibility.d.ts.map