UNPKG

@capgo/cli

Version:
41 lines (40 loc) 1.86 kB
import type { PbxTarget } from '../pbxproj-parser'; export interface BuildConfig { name: string; settings: Record<string, string>; isProjectLevel: boolean; } export interface TargetConfigs { target: PbxTarget; configs: { name: string; settings: Record<string, string>; }[]; } /** * Per-config build settings (Debug/Release/...) plus an isProjectLevel flag for * the configs referenced by the PBXProject configuration list. */ export declare function readBuildConfigs(pbxContent: string): BuildConfig[]; /** * Release-preferred scalar lookup across every build config. Returns the value * from a config named Release if one carries the key, else the first config * that carries it (fallback), else null. SCALAR keys only. */ export declare function readBuildSetting(pbxContent: string, name: string): string | null; /** * If rawValue is EXACTLY one `$(VAR)` or `${VAR}` reference, substitute it via * readBuildSetting(VAR); otherwise return rawValue unchanged. When the variable * has no pbxproj match the raw `$()` string is returned so callers can treat a * still-unresolved reference as "skip / cannot judge". A value that merely * contains a `$()` among other text is left untouched (not a clean reference). */ export declare function resolvePlistValue(rawValue: string, pbxContent: string): string; /** * Per signable target, the full scalar settings dict of each of its configs. * Reuses findSignableTargets for the target identity and re-walks the native * target blocks to associate each target name with its configuration list. */ export declare function readTargetConfigs(pbxContent: string): TargetConfigs[]; /** Lowest explicit iOS deployment target across linked project and application configs. */ export declare function readMinimumIosDeploymentTarget(pbxContent: string): number | null;