/** * Mac Server Plugin * * Handles macOS-specific package management and commands. * Used for deploying to Mac servers or local Mac development. * * ============================================================ * 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 * - Files group related fixes together (docker, node, git, containers, config) * - All fixes are combined in the main plugin class * * **Environment-specific files** - Operations for each environment * - dev.ts - Dev environment operations (deployDev) * - staging.ts - Staging operations (deployStaging, ensureServerReady) * - Only create files if they have content (no blank files) * * **index.ts** - Main plugin class * - Static metadata (id, name, category, version, os, packageManager, serviceManager) * - shouldLoad() - Determines if plugin should load * - Imports and combines all scanfix arrays * - Imports and uses environment-specific methods * - Maintains public API compatibility * * **When each environment file is used:** * - dev.ts: When deploying to local dev environment * - staging.ts: When deploying to staging server or preparing staging server * * **How scanfix files are organized:** * - docker.ts: Docker installation, running status, autostart (dev + staging) * - node.ts: Node.js and pnpm installation (staging) * - git.ts: Git installation (staging) * - containers.ts: Container management and cleanup (staging) * - config.ts: Configuration checks and file validation (dev + staging) * ============================================================ */ import type { FactiiiConfig, EnvironmentConfig, DeployResult, EnsureServerReadyOptions, ServerOS, PackageManager, ServiceManager } from '../../../types/index.js'; declare class MacPlugin { static readonly id = "mac"; static readonly name = "Mac Server"; static readonly category: 'server'; static readonly version = "1.0.0"; /** The OS this server plugin handles */ static readonly os: ServerOS; /** Package manager for macOS */ static readonly packageManager: PackageManager; /** Service manager for macOS */ 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: 'mac' */ 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 macOS 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; private _config; constructor(config: FactiiiConfig); /** * Ensure server is ready for deployment * Installs Node.js, git, pnpm, clones repo, checks out commit */ 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 MacPlugin; //# sourceMappingURL=index.d.ts.map