@capgo/cli
Version:
A CLI to upload to capgo servers
42 lines (41 loc) • 1.7 kB
TypeScript
import type { SavedCredentials } from '../schemas/build';
import { link, mkdtemp, open, rmdir, unlink } from 'node:fs/promises';
type Platform = 'ios' | 'android';
type Store = 'local' | 'global';
type CredentialsExportOptions = {
appId?: string;
platform?: string;
local?: boolean;
global?: boolean;
file?: string;
raw?: boolean;
decodeBase64?: boolean;
};
type CredentialsExportStores = Record<Store, SavedCredentials | null>;
type ResolvedCredentialsExport = {
value: string;
source: Store;
platforms: Platform[];
};
type FileValue = {
data: string | Buffer;
decoded: boolean;
warnLiteral: boolean;
};
type FileWriterDependencies = {
mkdtemp?: typeof mkdtemp;
open?: typeof open;
link?: typeof link;
unlink?: typeof unlink;
rmdir?: typeof rmdir;
};
export declare function isCredentialsExportInvocation(argv: readonly string[]): boolean;
export declare function resolveCredentialsExport(variable: string, options: CredentialsExportOptions, savedStores: CredentialsExportStores): ResolvedCredentialsExport;
export declare function resolveCredentialsFileValue(variable: string, value: string, { decodeBase64, interactive, promptDecode }: {
decodeBase64?: boolean;
interactive: boolean;
promptDecode: () => Promise<boolean | symbol>;
}): Promise<FileValue>;
export declare function writeCredentialsExportFile(path: string, data: string | Buffer, { mkdtemp: makeTemp, open: openFile, link: publish, unlink: removeFile, rmdir: removeDir }?: FileWriterDependencies): Promise<void>;
export declare function exportCredentialsCommand(variable: string | undefined, options: CredentialsExportOptions): Promise<void>;
export {};