apple-hig-mcp
Version:
High-performance MCP server providing instant access to Apple's Human Interface Guidelines via hybrid static/dynamic content delivery
119 lines • 4.19 kB
TypeScript
#!/usr/bin/env node
/**
* Content Generator
* Follows SOLID principles with proper separation of concerns and semantic search capabilities
*/
import { HIGCache } from '../cache.js';
import { CrawleeHIGService } from '../services/crawlee-hig.service.js';
import { HIGContentExtractor } from '../services/hig-content-extractor.service.js';
import type { IFileSystemService, IContentProcessor, ISearchIndexer, ICrossReferenceGenerator, ContentGenerationConfig } from '../interfaces/content-interfaces.js';
/**
* Main Content Generator Class
* Single Responsibility: Orchestrate the content generation process
*/
export declare class ContentGenerator {
private config;
private fileSystem;
private contentProcessor;
private searchIndexer;
private crossReferenceGenerator;
private crawleeService;
private contentExtractor;
private cache;
private sections;
private readonly startTime;
private extractionStats;
private qualityValidator;
private comprehensiveDiscovery;
constructor(config: ContentGenerationConfig, fileSystem: IFileSystemService, contentProcessor: IContentProcessor, searchIndexer: ISearchIndexer, crossReferenceGenerator: ICrossReferenceGenerator, crawleeService: CrawleeHIGService, contentExtractor: HIGContentExtractor, cache: HIGCache);
/**
* Main generation process - orchestrates all steps
*/
generate(): Promise<void>;
/**
* Discover all HIG sections from Apple's website using dynamic discovery
*/
private discoverSections;
/**
* Get comprehensive static list of all major HIG sections
* This serves as a reliable fallback when dynamic discovery fails
* and provides much better coverage than the previous 14 sections
*/
private getStaticSections;
/**
* Generate basic content for a section (used for static sections)
*/
private generateBasicContentForSection;
/**
* Get the file path for a topic based on topic-first organization
*/
private getTopicFilePath;
/**
* Determine if a topic should be treated as universal
*/
private isUniversalTopic;
/**
* Create necessary directory structure (topic-first organization)
*/
private createDirectoryStructure;
/**
* Generate content for all sections
*/
private generateContent;
/**
* Process a single section with enhanced quality monitoring
*/
private processSection;
/**
* Update extraction statistics
*/
private updateExtractionStats;
/**
* Generate structured markdown with enhanced front matter and organized content
*/
private generateStructuredMarkdown;
/**
* Generate enhanced markdown with quality metadata (legacy method)
*/
private generateEnhancedMarkdown;
/**
* Generate final markdown with front matter and attribution (legacy method)
*/
private generateFinalMarkdown;
/**
* Generate table of contents for content
*/
private generateTableOfContents;
/**
* Generate metadata files with extraction statistics
*/
private generateMetadata;
/**
* Log extraction results and SLA compliance
*/
private logExtractionResults;
/**
* Log clean quality validation summary
*/
private logQualityReport;
private generateFilename;
private chunkArray;
private delay;
private groupByPlatform;
private groupByCategory;
private getHighQualityButtonContent;
private getHighQualityNavigationContent;
private getHighQualityTabBarContent;
private getHighQualityAlertContent;
private getHighQualityActionSheetContent;
private getHighQualityMenuContent;
private getHighQualityToolbarContent;
private getHighQualityColorContent;
private getHighQualityTypographyContent;
private getHighQualityLayoutContent;
private getHighQualityAccessibilityContent;
private getHighQualityComplicationsContent;
private getHighQualityFocusContent;
}
export declare function createContentGenerator(config?: Partial<ContentGenerationConfig>): ContentGenerator;
//# sourceMappingURL=content-generator.d.ts.map