UNPKG

@foo-software/lighthouse-persist

Version:

A tool for persisting Lighthouse audit results used for website performance monitoring and analysis.

84 lines (83 loc) 2.76 kB
import config from './config'; interface OpportunitiesInterface { id: string; result: { description: string; details: { headings: { key: string; label: string; valueType: string; }[]; items: { fromProtocol: boolean; isCrossOrigin: boolean; node: any; totalBytes: number; url: string; wastedBytes: number; wastedWebpBytes: number; }[]; overallSavingsMs: number; overallSavingsBytes: number; type: string; }; displayValue: string; id: string; numericUnit: string; numericValue: number; rating: string; score: number; scoreDisplayMode: string; title: string; warnings: string[]; }; weight: number; } interface LoadingExperienceMetricInterface { percentile: number; distributions: { max: number; min: number; proportion: number; }[]; category: string; } interface LoadingExperienceInterface { id: string; initial_url: string; metrics: { CUMULATIVE_LAYOUT_SHIFT_SCORE: LoadingExperienceMetricInterface; FIRST_CONTENTFUL_PAINT_MS: LoadingExperienceMetricInterface; FIRST_INPUT_DELAY_MS: LoadingExperienceMetricInterface; LARGEST_CONTENTFUL_PAINT_MS: LoadingExperienceMetricInterface; }; overall_category: string; } interface LighthousePersistResultInterface { finalScreenshot?: string; loadingExperience?: LoadingExperienceInterface; localReport?: string; originLoadingExperience?: LoadingExperienceInterface; result: any; report?: string; opportunities?: OpportunitiesInterface[]; } declare const _default: ({ awsAccessKeyId: accessKeyId, awsBucket: Bucket, awsRegion: region, awsSecretAccessKey: secretAccessKey, config: customConfig, finalScreenshotAwsBucket, isExperimental, launchedChrome, options: customOptions, outputDirectory, updateReport, psiKey, timeout, url, verbose, }: { awsAccessKeyId?: string | undefined; awsBucket?: string | undefined; awsRegion?: string | undefined; awsSecretAccessKey?: string | undefined; config?: any; finalScreenshotAwsBucket?: string | undefined; isExperimental?: boolean | undefined; launchedChrome?: any; options?: any; outputDirectory?: string | undefined; updateReport?: ((input: any) => void) | undefined; psiKey?: string | undefined; timeout?: number | undefined; url: string; verbose?: boolean | undefined; }) => Promise<LighthousePersistResultInterface>; export default _default;