eas-cli
Version:
EAS command line tool
47 lines (46 loc) • 2.17 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import { GzipOptions } from 'minizlib';
import { HashOptions } from 'node:crypto';
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
import { EnvironmentVariableEnvironment } from '../graphql/generated';
interface AssetMapOptions {
hashOptions?: HashOptions;
}
/** Mapping of normalized file paths to a SHA512 hash */
export type AssetMap = Record<string, string>;
/** Creates an asset map of a given target path */
declare function createAssetMapAsync(assetPath?: string, options?: AssetMapOptions): Promise<AssetMap>;
export interface Manifest {
env: Record<string, string | undefined>;
}
export interface CreateManifestResult {
conflictingVariableNames: string[] | undefined;
manifest: Manifest;
}
interface CreateManifestParams {
projectId: string;
projectDir: string;
environment?: EnvironmentVariableEnvironment;
}
/** Creates a manifest configuration sent up for deployment */
export declare function createManifestAsync(params: CreateManifestParams, graphqlClient: ExpoGraphqlClient): Promise<CreateManifestResult>;
interface WorkerFileEntry {
normalizedPath: string;
path: string;
data: Buffer | string;
}
/** Reads worker files while normalizing sourcemaps and providing normalized paths */
declare function listWorkerFilesAsync(workerPath: string): AsyncGenerator<WorkerFileEntry>;
interface AssetFileEntry {
normalizedPath: string;
sha512: string;
path: string;
}
/** Reads files of an asset maps and enumerates normalized paths and data */
declare function listAssetMapFilesAsync(assetPath: string, assetMap: AssetMap): AsyncGenerator<AssetFileEntry>;
/** Entry of a normalized (gzip-safe) path and file data */
export type FileEntry = readonly [normalizedPath: string, data: Buffer | string];
/** Packs file entries into a tar.gz file (path to tgz returned) */
declare function packFilesIterableAsync(iterable: Iterable<FileEntry> | AsyncIterable<FileEntry>, options?: GzipOptions): Promise<string>;
export { createAssetMapAsync, listWorkerFilesAsync, listAssetMapFilesAsync, packFilesIterableAsync, };