UNPKG

native-update

Version:

Foundation package for building a comprehensive update system for Capacitor apps. Provides architecture and interfaces but requires backend implementation.

83 lines (82 loc) 2.18 kB
import { ConfigManager } from './config'; import { Logger } from './logger'; import { SecurityValidator } from './security'; import { BundleManager } from '../live-update/bundle-manager'; import { DownloadManager } from '../live-update/download-manager'; import { VersionManager } from '../live-update/version-manager'; import { AppUpdateManager } from '../app-update/app-update-manager'; import { EventEmitter } from './event-emitter'; import { PluginInitConfig } from '../definitions'; /** * Central manager for all plugin components */ export declare class PluginManager { private static instance; private readonly configManager; private readonly logger; private readonly securityValidator; private readonly eventEmitter; private bundleManager; private downloadManager; private versionManager; private appUpdateManager; private initialized; private constructor(); static getInstance(): PluginManager; /** * Initialize the plugin with configuration */ initialize(config: PluginInitConfig): Promise<void>; /** * Check if plugin is initialized */ isInitialized(): boolean; /** * Ensure plugin is initialized */ private ensureInitialized; /** * Get bundle manager */ getBundleManager(): BundleManager; /** * Get download manager */ getDownloadManager(): DownloadManager; /** * Get version manager */ getVersionManager(): VersionManager; /** * Get configuration manager */ getConfigManager(): ConfigManager; /** * Get logger */ getLogger(): Logger; /** * Get security validator */ getSecurityValidator(): SecurityValidator; /** * Get app update manager */ getAppUpdateManager(): AppUpdateManager; /** * Get event emitter */ getEventEmitter(): EventEmitter; /** * Reset plugin state */ reset(): Promise<void>; /** * Clean up resources */ cleanup(): Promise<void>; /** * Setup event bridge between AppUpdateManager and central EventEmitter */ private setupAppUpdateEventBridge; }