UNPKG

@capgo/cli

Version:
59 lines (58 loc) 2.7 kB
import type { FC } from 'react'; import type { OnboardingResult, Platform } from '../types.js'; import type { OnboardingBeforeExit } from './exit.js'; export declare function useTerminalSize(): { cols: number; rows: number; }; export interface OnboardingShellProps { appId: string; /** * iOS-side bundle id default — sourced from `config.appId` (top-level), which * is what `cap sync` writes into `PRODUCT_BUNDLE_IDENTIFIER`. Distinct from * `appId` above, which `getAppId()` may resolve to * `config.plugins.CapacitorUpdater.appId` (a Capgo lookup key — wrong for * Apple signing). Threaded down to the iOS OnboardingApp; the Android app * ignores it. */ iosBundleIdInitial: string; iosDir: string; androidDir: string; /** * Whether guided ASC-key creation may be offered (macOS + signed helper * installed + signature/team verified — see the probe in command.ts). * Threaded into the iOS OnboardingApp; the Android app ignores it. */ guidedHelperUsable: boolean; apikey?: string; supaHost?: string; /** Correlation id for this onboarding run; threaded into every analytics event the apps emit. */ journeyId: string; /** Pre-resolved platform (--platform flag or the single existing native dir); skips the picker. */ initialPlatform?: Platform; /** * Set when a newer @capgo/cli is published. Drives the self-update prompt * shown as the FIRST wizard screen (before platform selection / auto-load). * Undefined → up to date → no prompt. */ updateInfo?: { currentVersion: string; latestVersion: string; }; /** Shows the terminal replay/analytics opt-out notice on the first shell screen. */ analyticsNotice?: boolean; /** Called once a platform is chosen so the caller can print the completion breadcrumb. */ onResolvePlatform?: (platform: Platform) => void; /** Called by the mounted app on every step transition, so the caller can record * where the user dropped off for the quit event. */ onStep?: (step: string) => void; /** Called by the mounted app when it reaches the build-complete screen, so the * caller prints the accurate post-exit message + durable summary. If the wizard * exits any other way (cancel / missing platform), this never fires and the * caller treats it as cancelled. */ onResult?: (result: OnboardingResult) => void; /** Awaited immediately before Ink exits so replay can capture the alt-screen frame. */ onBeforeExit?: OnboardingBeforeExit; } declare const OnboardingShell: FC<OnboardingShellProps>; export default OnboardingShell;