@capgo/cli
Version:
A CLI to upload to capgo servers
34 lines (33 loc) • 1.2 kB
TypeScript
export interface AppIconImage {
idiom?: string;
size?: string;
scale?: string;
filename?: string;
platform?: string;
role?: string;
}
export interface AssetContents {
images?: AppIconImage[];
info?: {
version?: number;
author?: string;
};
}
/**
* Parse an asset-catalog Contents.json. Returns null on a missing file OR a
* parse error — the asset catalog is the one place an invalid hand-edit can
* crash a naive reader, so this is the shared safety net for the appicon checks.
* Never throws.
*/
export declare function readContentsJson(path: string): AssetContents | null;
/**
* Absolute path to the project's `<IconName>.appiconset` directory. The icon
* name comes from the pbxproj ASSETCATALOG_COMPILER_APPICON_NAME build setting
* (Release-preferred) and defaults to `AppIcon` for standard Capacitor layouts.
*/
export declare function appIconSetDir(projectDir: string, pbxContent?: string): string;
/**
* Whether the icon set declares the App Store marketing icon: a `1024x1024`
* size (whitespace-trimmed) or an image whose `role` is `marketing`.
*/
export declare function hasMarketingIcon(c: AssetContents | null): boolean;