UNPKG

@capgo/cli

Version:
23 lines (22 loc) • 1.23 kB
import type { ExtConfigPairs } from '../config'; export declare const CAPGO_APP_ID_OPT_IN_MESSAGE = "Create a Capgo app with a random app ID and save it as CapacitorUpdater.appId?"; export interface CapgoAppIdPromptDeps { confirm: (message: string) => Promise<boolean | symbol>; logSuccess: (message: string) => void; logWarn: (message: string) => void; loadConfig: () => Promise<ExtConfigPairs>; writeConfig: (config: ExtConfigPairs) => Promise<void>; findApiKey: () => string | undefined; createApp: (appId: string, apikey: string) => Promise<void>; generateRandomAppId: () => string; } export declare function generateRandomCapgoAppId(): string; export declare function persistCapgoAppIdToCapacitorConfig(appId: string, deps?: Pick<CapgoAppIdPromptDeps, 'loadConfig' | 'writeConfig' | 'logWarn'>): Promise<boolean>; export type OfferCapgoAppIdPromptOutcome = 'skipped' | 'declined' | 'failed' | 'saved'; export interface OfferCapgoAppIdPromptOptions { skip?: boolean; silent?: boolean; interactive?: boolean; deps?: Partial<CapgoAppIdPromptDeps>; } export declare function offerCapgoAppIdPrompt(options?: OfferCapgoAppIdPromptOptions): Promise<OfferCapgoAppIdPromptOutcome>;