UNPKG

2.89 kBTypeScriptView Raw
1import { ExpoConfig } from '@expo/config';
2import { ProjectSettings } from './internal';
3interface URLOptions extends ProjectSettings.ProjectSettings {
4 urlType: null | 'exp' | 'http' | 'no-protocol' | 'redirect' | 'custom';
5}
6interface MetroQueryOptions {
7 dev?: boolean;
8 strict?: boolean;
9 minify?: boolean;
10}
11export declare function constructBundleUrlAsync(projectRoot: string, opts: Partial<URLOptions>, requestHostname?: string): Promise<string>;
12export declare function constructDeepLinkAsync(projectRoot: string, opts?: Partial<URLOptions>, requestHostname?: string): Promise<string>;
13export declare function constructManifestUrlAsync(projectRoot: string, opts?: Partial<URLOptions>, requestHostname?: string): Promise<string>;
14export declare function constructDevClientUrlAsync(projectRoot: string, opts?: Partial<URLOptions>, requestHostname?: string): Promise<string>;
15export declare function constructHostUriAsync(projectRoot: string, requestHostname?: string): Promise<string>;
16export declare function constructLogUrlAsync(projectRoot: string, requestHostname?: string): Promise<string>;
17export declare function constructLoadingUrlAsync(projectRoot: string, platform: 'ios' | 'android' | null, requestHostname?: string): Promise<string>;
18export declare function constructUrlWithExtensionAsync(projectRoot: string, entryPoint: string, ext: string, requestHostname?: string, metroQueryOptions?: MetroQueryOptions): Promise<string>;
19export declare function constructPublishUrlAsync(projectRoot: string, entryPoint: string, requestHostname?: string, metroQueryOptions?: MetroQueryOptions): Promise<string>;
20export declare function constructSourceMapUrlAsync(projectRoot: string, entryPoint: string, requestHostname?: string): Promise<string>;
21export declare function constructAssetsUrlAsync(projectRoot: string, entryPoint: string, requestHostname?: string): Promise<string>;
22export declare function constructDebuggerHostAsync(projectRoot: string, requestHostname?: string): Promise<string>;
23export declare function constructBundleQueryParams(projectRoot: string, opts: MetroQueryOptions): string;
24export declare function constructBundleQueryParamsWithConfig(projectRoot: string, opts: MetroQueryOptions, exp: Pick<ExpoConfig, 'sdkVersion'>): string;
25export declare function constructWebAppUrlAsync(projectRoot: string, options?: {
26 hostType?: 'localhost' | 'lan' | 'tunnel';
27}): Promise<string | null>;
28export declare function constructUrlAsync(projectRoot: string, incomingOpts: Partial<URLOptions> | null, isPackager: boolean, requestHostname?: string): Promise<string>;
29export declare function stripJSExtension(entryPoint: string): string;
30export declare function isHttps(urlString: string): boolean;
31export declare function isURL(urlString: string, { protocols, requireProtocol }: {
32 protocols?: string[];
33 requireProtocol?: boolean;
34}): boolean;
35export {};