/** * Git Platform Registry * * Central registry for all supported Git platforms. * Manages platform instances and provides platform selection. * * @module platform-registry */ import type { GitProvider, GitPlatformType, PlatformConfig } from './git-provider.js'; /** * Platform registry entry */ export interface PlatformEntry { /** Platform type identifier */ type: GitPlatformType; /** Display name */ name: string; /** Short description */ description: string; /** Whether platform is fully supported */ supported: boolean; /** Status message (e.g., "Coming Soon", "Beta") */ status?: string; /** Platform configuration */ config: PlatformConfig; } /** * Platform selection option (for prompts) */ export interface PlatformOption { value: GitPlatformType; name: string; description: string; disabled?: boolean | string; } /** * Git Platform Registry * * Singleton registry for all Git hosting platforms. */ export declare class GitPlatformRegistry { private static instance; private platforms; private providers; private constructor(); /** * Get singleton instance */ static getInstance(): GitPlatformRegistry; /** * Register default platforms */ private registerDefaultPlatforms; /** * Register a platform */ registerPlatform(entry: PlatformEntry): void; /** * Register a provider instance * Idempotent: skips if provider already registered (Issue #4 fix) */ registerProvider(type: GitPlatformType, provider: GitProvider): void; /** * Clear all registered providers (for testing/cleanup) * @internal */ clearProviders(): void; /** * Clear all registered platforms (for testing/cleanup) * @internal */ clearPlatforms(): void; /** * Reset the entire registry (for testing only) * @internal */ reset(): void; /** * Get platform entry */ getPlatform(type: GitPlatformType): PlatformEntry | undefined; /** * Get provider instance */ getProvider(type: GitPlatformType): GitProvider | undefined; /** * Get all supported platforms */ getSupportedPlatforms(): PlatformEntry[]; /** * Get all platforms (including unsupported) */ getAllPlatforms(): PlatformEntry[]; /** * Get platform options for user selection * * @param includeUnsupported - Whether to include unsupported platforms * @returns Platform options for prompts */ getPlatformOptions(includeUnsupported?: boolean): PlatformOption[]; /** * Check if a platform is supported */ isSupported(type: GitPlatformType): boolean; /** * Get default platform (GitHub) */ getDefaultPlatform(): GitPlatformType; } /** * Get platform registry instance (convenience function) */ export declare function getPlatformRegistry(): GitPlatformRegistry; //# sourceMappingURL=platform-registry.d.ts.map