/** * Pipeline Plugin Interface * * Base class for all pipeline plugins (GitHub Actions, GitLab CI, etc.) * Pipelines handle CI/CD workflows and must implement canReach() to * declare how they access each stage. */ import type { FactiiiConfig, Stage, Reachability, Fix, DeployResult, DeployOptions } from '../../types/index.js'; /** * Abstract base class for pipeline plugins */ export declare abstract class PipelinePlugin { static readonly id: string; static readonly name: string; static readonly category: 'pipeline'; static readonly version: string; static readonly fixes: Fix[]; static readonly requiredEnvVars: string[]; static readonly configSchema: Record; static readonly autoConfigSchema: Record; protected config: FactiiiConfig; constructor(config: FactiiiConfig); /** * Check if this pipeline can reach a specific stage from current environment * * @param stage - 'dev' | 'staging' | 'prod' * @param config - stack.yml config * @returns Reachability result */ static canReach(_stage: Stage, _config: FactiiiConfig): Reachability; /** * Determine if this plugin should be loaded for this project * @param rootDir - Project root directory * @param config - Loaded config */ static shouldLoad(_rootDir: string, _config: FactiiiConfig): Promise; /** * Auto-detect pipeline configuration * @param rootDir - Project root directory */ static detectConfig(_rootDir: string): Promise>; /** * Generate workflow files in the target repository * @param rootDir - Project root directory */ static generateWorkflows(_rootDir: string): Promise; /** * Trigger a workflow * @param workflowName - Name of workflow to trigger * @param inputs - Workflow inputs */ static triggerWorkflow(_workflowName: string, _inputs?: Record): Promise; /** * Deploy to a stage - handles routing based on canReach() * * This is the main entry point for deployments. The pipeline plugin * checks canReach() to determine how to reach the stage: * - 'local': Execute deployment directly * - 'workflow': Trigger a workflow (e.g., GitHub Actions) * - Not reachable: Return error with reason * * @param stage - The stage to deploy to ('dev' | 'staging' | 'prod') * @param options - Deployment options * @returns Deployment result */ abstract deployStage(stage: Stage, options: DeployOptions): Promise; /** * Deploy to an environment (called when running locally or on-server) * @deprecated Use deployStage() which handles routing */ abstract deploy(config: FactiiiConfig, environment: string): Promise; /** * Undeploy from an environment */ abstract undeploy(config: FactiiiConfig, environment: string): Promise; } export default PipelinePlugin; //# sourceMappingURL=pipeline.d.ts.map