UNPKG

@casoon/auditmysite

Version:

Professional website analysis suite with robust accessibility testing, Core Web Vitals performance monitoring, SEO analysis, and content optimization insights. Features isolated browser contexts, retry mechanisms, and comprehensive API endpoints for profe

47 lines 1.55 kB
/** * Smart URL Sampler - Adaptive URL Selection * * This module implements intelligent URL sampling that: * 1. Tests URLs sequentially from the sitemap * 2. Skips URLs that redirect (301, 302) * 3. Continues until the desired number of GOOD pages is found * 4. Handles 404s and other errors appropriately * 5. Provides progress feedback */ import { AccessibilityChecker } from './accessibility/accessibility-checker'; import { TestOptions } from '../types'; export interface SmartSamplerOptions { maxPages: number; maxAttempts?: number; timeout?: number; verbose?: boolean; skipRedirects?: boolean; skip404s?: boolean; testOptions?: TestOptions; } export interface SamplingResult { goodUrls: string[]; skippedUrls: string[]; errorUrls: string[]; totalAttempts: number; samplingTime: number; } export declare class SmartUrlSampler { private checker; private options; constructor(checker: AccessibilityChecker, options: SmartSamplerOptions); /** * Sample URLs from a sitemap to find the desired number of good pages */ sampleGoodUrls(allUrls: string[]): Promise<SamplingResult>; /** * Test a single URL to determine if it's accessible (not redirected, not 404) * MINIMAL CHECK: Only test HTTP status, skip all comprehensive analysis */ private testUrlAccessibility; /** * Get summary statistics from sampling result */ static getSummary(result: SamplingResult): string; } //# sourceMappingURL=smart-url-sampler.d.ts.map