#!/usr/bin/env node /** * Interactive Configuration Wizard (v0.10.0) * * Unified setup wizard that orchestrates: * 1. Catalog discovery and confirmation * 2. Stack query for infrastructure details * 3. Context display and flow decision * 4. Parameter collection (only when needed) * 5. Execution (update secrets, enable/disable integration, deploy) * * Architecture: * - Context first, then targeted questions * - Parameter collection is deferred until required * - Integrated and standalone paths share execution helpers * * @module commands/setup-wizard * @version 0.10.0 */ import type { XDGBase } from "../../lib/xdg-base"; import { ProfileConfig } from "../../lib/types/config"; /** * Setup wizard options */ export interface SetupWizardOptions { /** Configuration profile name */ profile?: string; /** Whether --profile was explicitly provided on the CLI */ explicitProfile?: boolean; /** Inherit from another profile (legacy, unused in phase-based wizard) */ inheritFrom?: string; /** Non-interactive mode (use defaults/CLI args) */ yes?: boolean; /** Skip validation checks */ skipValidation?: boolean; /** AWS profile to use */ awsProfile?: string; /** AWS region to use */ awsRegion?: string; /** Setup only (don't prompt for deployment) */ setupOnly?: boolean; /** Part of install command (suppress next steps) */ isPartOfInstall?: boolean; /** Config storage implementation (for testing) */ configStorage?: XDGBase; /** Allow direct stack mutation instead of requiring IaC-managed changes */ force?: boolean; catalogUrl?: string; benchlingTenant?: string; benchlingClientId?: string; benchlingClientSecret?: string; benchlingAppDefinitionId?: string; userBucket?: string; pkgPrefix?: string; pkgKey?: string; workflow?: string; autoPackaging?: boolean; logLevel?: string; webhookAllowList?: string; } /** * Setup wizard result */ export interface SetupWizardResult { success: boolean; profile: string; config: ProfileConfig; /** Whether deployment decision was already handled by the wizard (standalone mode only) */ deploymentHandled?: boolean; } /** * Main setup wizard orchestrator * * This function orchestrates the 7 phases of the setup wizard in sequence. * Each phase is isolated and testable. The flow is enforced by the code * structure - integrated mode explicitly returns, preventing fall-through * to deployment. * * Flow: * 1. Phase 1: Catalog Discovery (local config only, no AWS) * 2. Phase 2: Stack Query (query CloudFormation for confirmed catalog) * 3. Phase 3: Parameter Collection (collect user inputs) * 4. Phase 4: Validation (validate all parameters) * 5. Phase 5: Mode Decision (choose integrated vs standalone) * 6a. Phase 6: Integrated Mode (update secret, EXIT) OR * 6b. Phase 7: Standalone Mode (create secret, optionally deploy, EXIT) * * The orchestrator prints step headers before each phase to ensure * consistent numbering regardless of execution path. * * @param options - Setup wizard options * @returns Setup wizard result */ export declare function runSetupWizard(options?: SetupWizardOptions): Promise; /** * Setup wizard command handler * * Wraps runSetupWizard with error handling for graceful user cancellation. * * @param options - Wizard options * @returns Promise that resolves with setup result */ export declare function setupWizardCommand(options?: SetupWizardOptions): Promise; //# sourceMappingURL=setup-wizard.d.ts.map