/** * Amazon Linux Server Plugin * * Handles Amazon Linux-specific package management and commands. * Used for deploying to AWS EC2 instances running Amazon Linux 2023. * * ============================================================ * PLUGIN STRUCTURE STANDARD * ============================================================ * * This plugin follows a standardized structure for clarity and maintainability: * * **scanfix/** - Scan/fix operations organized by concern * - Each file exports an array of Fix[] objects * - All fixes are combined in the main plugin class * * **index.ts** - Main plugin class * - Static metadata (id, name, category, version, os, packageManager, serviceManager) * - shouldLoad() - Determines if plugin should load * - OS-specific installation commands * ============================================================ */ import type { FactiiiConfig, EnvironmentConfig, DeployResult, EnsureServerReadyOptions, ServerOS, PackageManager, ServiceManager } from '../../../types/index.js'; declare class AmazonLinuxPlugin { static readonly id = "amazon-linux"; static readonly name = "Amazon Linux Server"; static readonly category: 'server'; static readonly version = "1.0.0"; /** The OS this server plugin handles */ static readonly os: ServerOS; /** Package manager for Amazon Linux (dnf for AL2023, yum for AL2) */ static readonly packageManager: PackageManager; /** Service manager for Amazon Linux */ static readonly serviceManager: ServiceManager; static readonly requiredEnvVars: string[]; static readonly configSchema: Record; static readonly autoConfigSchema: Record; /** * Determine if this plugin should be loaded for this project * Loads if config has environment with server: 'amazon-linux' */ static shouldLoad(_rootDir: string, config: FactiiiConfig): Promise; static helpText: Record; static readonly fixes: { os: ServerOS; id: string; stage: import("../../../types/plugin.js").Stage; severity: import("../../../types/plugin.js").Severity; description: string; plugin?: string; targetStage?: "staging" | "prod"; blocking?: boolean; requires?: string[]; serializeOn?: string[]; scan: (config: FactiiiConfig, rootDir: string) => Promise; fix?: ((config: FactiiiConfig, rootDir: string) => Promise) | null; manualFix: string; }[]; /** * Auto-detect Amazon Linux configuration */ static detectConfig(_rootDir: string): Promise<{ ssh_user: string; }>; /** * Execute a command on a remote server via SSH */ static sshExec(envConfig: EnvironmentConfig, command: string): Promise; /** * Get the command to install Docker on Amazon Linux 2023 */ static getDockerInstallCommand(): string; /** * Get the command to install Node.js on Amazon Linux */ static getNodeInstallCommand(): string; /** * Get the command to install git on Amazon Linux */ static getGitInstallCommand(): string; private _config; constructor(config: FactiiiConfig); /** * Ensure server is ready for deployment */ ensureServerReady(config: FactiiiConfig, environment: string, options?: EnsureServerReadyOptions): Promise; /** * Deploy to an environment */ deploy(config: FactiiiConfig, environment: string): Promise; /** * Undeploy from an environment */ undeploy(config: FactiiiConfig, environment: string): Promise; } export default AmazonLinuxPlugin; //# sourceMappingURL=index.d.ts.map