/** * Ubuntu Server Plugin * * Handles Ubuntu-specific package management and commands. * Used for deploying to Ubuntu servers (EC2, DigitalOcean, Linode, etc.) * * ============================================================ * 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 UbuntuPlugin { static readonly id = "ubuntu"; static readonly name = "Ubuntu Server"; static readonly category: 'server'; static readonly version = "1.0.0"; /** The OS this server plugin handles */ static readonly os: ServerOS; /** Package manager for Ubuntu */ static readonly packageManager: PackageManager; /** Service manager for Ubuntu */ 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: 'ubuntu' */ 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 Ubuntu 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 Ubuntu */ static getDockerInstallCommand(): string; /** * Get the command to install Node.js on Ubuntu */ static getNodeInstallCommand(): string; /** * Get the command to install git on Ubuntu */ static getGitInstallCommand(): string; private _config; constructor(config: FactiiiConfig); /** * Ensure server is ready for deployment. * Staging-type envs delegate to the Mac plugin's helpers (which install * Node/git/pnpm, clone the repo, checkout, and pnpm install). For prod, * AWS pipeline + factiii pipeline take over. */ ensureServerReady(config: FactiiiConfig, environment: string, options?: EnsureServerReadyOptions): Promise; /** * Deploy to an environment. * Staging delegates to Mac's deployStaging (regenerate compose, run migrations, * docker compose up). Prod is handled upstream by the AWS pipeline path. */ deploy(config: FactiiiConfig, environment: string): Promise; /** * Undeploy from an environment */ undeploy(config: FactiiiConfig, environment: string): Promise; } export default UbuntuPlugin; //# sourceMappingURL=index.d.ts.map