import type { ServiceContract } from '../contracts.js'; export interface AppConfig { name: string; command: string; cwd: string; envFile: string; label: string; } /** * Extract PM2 app configs from contracts that explicitly opt in via: * - target.type: "pm2" (preferred), or * - top-level `dev` field (legacy, still supported) * * Contracts with only `location` (env file output) are NOT auto-added. * Pure env contracts (datadog, observability extensions, etc.) shouldn't * spawn a process just because they declare an env file destination. */ export declare function extractApps(contracts: Map, projectRoot: string, profile: string): AppConfig[]; /** * Generate a PM2 ecosystem config object from app configs. * * Uses `script: 'bash'` with `args: '-c "command"'` so arbitrary * shell commands like "pnpm dev" work without needing a wrapper script. * * The generated ecosystem.config.cjs reads each app's .env file * at startup and injects vars via PM2's `env` field, avoiding * any dependency on PM2 Plus for env_file support. */ export declare function generateEcosystem(apps: AppConfig[]): object; /** * Serialize ecosystem config to a self-contained CommonJS module. * * The generated file reads .env files at load time and injects * parsed vars into each app's `env` field, so PM2 free edition * gets full env support without PM2 Plus. */ export declare function serializeEcosystem(config: { apps: Array>; }): string; //# sourceMappingURL=ecosystem.d.ts.map