UNPKG

n8n-nodes-google-pagespeed

Version:

n8n community node for Google PageSpeed Insights API with comprehensive performance, accessibility, and SEO analysis

60 lines 2.25 kB
import { IExecuteFunctions } from 'n8n-workflow'; import { ContentValidation } from '../interfaces'; /** * Bulletproof URL normalization that guarantees a valid HTTPS URL * @param inputUrl - Raw URL input from user * @returns Normalized HTTPS URL * @throws Error with user-friendly message if URL cannot be fixed */ export declare function normalizeUrl(inputUrl: string): string; /** * Extract URL from various input sources with intelligent fallback * @param context - n8n execution context * @param itemIndex - Item index in the execution * @returns Raw URL string from parameter or input data */ export declare function extractUrlFromInput(context: IExecuteFunctions, itemIndex: number): string; /** * Check if URL is likely to return XML content instead of HTML * @param url - URL to check * @returns True if URL appears to be XML/API endpoint */ export declare function isLikelyXmlUrl(url: string): boolean; /** * Validate that URL returns HTML content suitable for PageSpeed analysis * @param context - n8n execution context * @param url - URL to validate * @returns Content validation result */ export declare function validateUrlContentType(context: IExecuteFunctions, url: string): Promise<ContentValidation>; /** * Batch process URLs with intelligent URL fixing * @param rawUrls - Array of raw URL strings * @returns Array of URL pairs with original and normalized versions */ export declare function batchNormalizeUrls(rawUrls: string[]): Array<{ original: string; normalized: string; error?: string; }>; /** * Extract domain from URL for categorization * @param url - URL to extract domain from * @returns Domain string */ export declare function extractDomain(url: string): string; /** * Check if URL is on the same domain * @param url1 - First URL * @param url2 - Second URL * @returns True if both URLs are on the same domain */ export declare function isSameDomain(url1: string, url2: string): boolean; /** * Generate a short URL for display purposes * @param url - Full URL * @param maxLength - Maximum length for display * @returns Shortened URL string */ export declare function shortenUrlForDisplay(url: string, maxLength?: number): string; //# sourceMappingURL=urlUtils.d.ts.map