/** * Where precompiled iOS xcframeworks are stored, locally and in the remote artifact store. * `et prebuild` writes artifacts with it (`tools/src/prebuilds/Frameworks.ts`, through the * `internal/prebuiltArtifactPaths` subpath), and `prebuiltMetadata.ts` uses it to tell * consumers where to look. `scripts/ios/precompiled_modules.rb` still has its own copy. * * Which base holds an artifact depends on the flavor chosen at build time and on what * exists on disk, so callers get ordered candidate bases plus base-relative suffixes and * do the probing themselves. */ export type PrebuiltFlavor = 'debug' | 'release'; export declare const PREBUILT_FLAVORS: readonly PrebuiltFlavor[]; /** * Returns null when any version is missing. An empty string counts as missing, which is * stricter than Ruby's version_prefix_for_external_package: it would join `''` into the * path and yield a prefix with a trailing empty segment. */ export declare function buildVersionPrefix(packageVersion: string | null | undefined, reactNativeVersion: string | null | undefined, hermesVersion: string | null | undefined): string | null; interface CommonArtifactBaseOptions { npmPackage: string; packageRoot: string; customModulesPath?: string | null; /** Laid out like `customModulesPath`: `/output/...` and `.spm-deps/`. */ localBuildsPath?: string | null; } export type ArtifactBaseOptions = (CommonArtifactBaseOptions & { type: 'internal'; versionPrefix?: never; }) | (CommonArtifactBaseOptions & { type: 'external'; versionPrefix?: string | null; }); export declare function getArtifactBase(buildPath: string, versionPrefix?: string | null): string; /** Ordered candidate base directories. Callers probe them in order. */ export declare function getArtifactBases({ type, npmPackage, packageRoot, customModulesPath, localBuildsPath, versionPrefix, }: ArtifactBaseOptions): string[]; export interface ArtifactSuffixes { dir: string; framework: string; tarball: string; } export declare function getArtifactDirSuffix(flavor: PrebuiltFlavor): string; /** Base-relative. Join against an entry from getArtifactBases(). */ export declare function getArtifactSuffixes(productName: string, flavor: PrebuiltFlavor): ArtifactSuffixes; /** * Key of a product tarball within the remote artifact store and its local mirror. * Unlike the suffixes above this is not base-relative: it starts at the package * name, and it stays slash-separated because it is also a URL path. * * The version prefix is included even when the artifact was found in an unversioned * base, because the remote store is always written with versioned paths. */ export declare function getRemoteArtifactKey(npmPackage: string, versionPrefix: string | null | undefined, productName: string, flavor: PrebuiltFlavor): string; export interface SharedSpmDepBaseOptions { packageRoot?: string | null; customModulesPath?: string | null; /** Laid out like `customModulesPath`: `/output/...` and `.spm-deps/`. */ localBuildsPath?: string | null; } /** * Ordered candidate base directories for a shared SPM dependency. A custom * modules path adds a candidate here instead of replacing the local builds one, so * that a partial override cannot hide a complete build. */ export declare function getSharedSpmDepBases(depName: string, { packageRoot, customModulesPath, localBuildsPath }: SharedSpmDepBaseOptions): string[]; /** Base-relative, and deliberately not the product grammar: no 'xcframeworks' segment. */ export declare function getSharedSpmDepSuffix(depName: string, flavor: PrebuiltFlavor): string; export {};