@capgo/cli
Version:
A CLI to upload to capgo servers
28 lines (27 loc) • 1.13 kB
TypeScript
/**
* Platform Path Helpers
*
* Used by cloud build packaging to resolve custom Capacitor native project paths
* (e.g. android.path / ios.path) in monorepos.
*/
/**
* Normalize a user-configured relative path:
* - Converts Windows separators to forward slashes
* - Strips a leading "./"
* - Strips trailing slashes
* - Returns "" for "." / "./" / empty
*/
export declare function normalizeRelPath(input: string): string;
/**
* Get the platform directory to use inside the project zip based on Capacitor config.
* Falls back to the default platform directory ("ios" or "android") when not configured
* or when configured as ".".
*/
export declare function getPlatformDirFromCapacitorConfig(capConfig: any, platform: 'ios' | 'android'): string;
/**
* Normalize Windows path separators inside native dependency path literals.
* Capacitor CLI on Windows writes backslashes into SPM Package.swift, CocoaPods
* Podfiles, and Gradle settings — Swift treats `\` as escape sequences and SPM
* resolution fails on macOS builders.
*/
export declare function normalizeNativeDependencyPathsInText(content: string): string;