Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@expo/config

Package Overview
Dependencies
Maintainers
19
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/config - npm Package Compare versions

Comparing version 2.5.2 to 2.5.3

build/Errors.d.ts

44

build/Config.d.ts

@@ -1,6 +0,4 @@

import { JSONObject } from '@expo/json-file';
import { AppJSONConfig, BareAppConfig, ExpRc, ExpoConfig, PackageJSONConfig, Platform, ProjectConfig } from './Config.types';
export declare function isUsingYarn(projectRoot: string): boolean;
export declare function fileExistsAsync(file: string): Promise<boolean>;
export declare function fileExists(file: string): boolean;
import { ExpRc, ProjectConfig } from './Config.types';
export declare function readConfigJson(projectRoot: string, skipValidation?: boolean, skipNativeValidation?: boolean): ProjectConfig;
export declare function readConfigJsonAsync(projectRoot: string, skipValidation?: boolean, skipNativeValidation?: boolean): Promise<ProjectConfig>;
export declare function findConfigFile(projectRoot: string): {

@@ -14,38 +12,2 @@ configPath: string;

export declare function setCustomConfigPath(projectRoot: string, configPath: string): void;
export declare function createEnvironmentConstants(appManifest: ExpoConfig, pwaManifestLocation: string): {
name: any;
/**
* Omit app.json properties that get removed during the native turtle build
*
* `facebookScheme`
* `facebookAppId`
* `facebookDisplayName`
*/
facebookScheme: undefined;
facebookAppId: undefined;
facebookDisplayName: undefined;
ios: undefined;
android: undefined;
web: JSONObject;
slug?: string | undefined;
description?: string | undefined;
sdkVersion?: string | undefined;
platforms?: Platform[] | undefined;
nodeModulesPath?: string | undefined;
};
export declare function getConfigForPWA(projectRoot: string, getAbsolutePath: (...pathComponents: string[]) => string, options: object): ExpoConfig;
export declare function getNameFromConfig(exp?: ExpoConfig): {
appName: string;
webName: string;
};
export declare function validateShortName(shortName: string): Promise<void>;
export declare function getWebOutputPath(config?: {
[key: string]: any;
}): string;
export declare function ensurePWAConfig(appJSON: AppJSONConfig | ExpoConfig, getAbsolutePath: ((...pathComponents: string[]) => string) | undefined, options: object): ExpoConfig;
export declare function readConfigJson(projectRoot: string, skipValidation?: boolean, skipNativeValidation?: boolean): ProjectConfig;
export declare function readConfigJsonAsync(projectRoot: string, skipValidation?: boolean, skipNativeValidation?: boolean): Promise<ProjectConfig>;
export declare function getExpoSDKVersion(projectRoot: string, exp: ExpoConfig): string;
export declare function writeConfigJsonAsync(projectRoot: string, options: Object): Promise<ProjectConfig>;
export { PackageJSONConfig, ProjectConfig, AppJSONConfig, BareAppConfig, ExpoConfig, ExpRc, Platform, };
export * from './Modules';

@@ -11,5 +11,2 @@ "use strict";

};
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -20,59 +17,37 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const json_file_1 = __importDefault(require("@expo/json-file"));
const find_yarn_workspace_root_1 = __importDefault(require("find-yarn-workspace-root"));
const fs_extra_1 = __importDefault(require("fs-extra"));
const path_1 = __importDefault(require("path"));
const slugify_1 = __importDefault(require("slugify"));
const Modules_1 = require("./Modules");
const APP_JSON_FILE_NAME = 'app.json';
// To work with the iPhone X "notch" add `viewport-fit=cover` to the `viewport` meta tag.
const DEFAULT_VIEWPORT = 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover';
// Use root to work better with create-react-app
const DEFAULT_ROOT_ID = `root`;
const DEFAULT_BUILD_PATH = `web-build`;
const DEFAULT_LANGUAGE_ISO_CODE = `en`;
const DEFAULT_NO_JS_MESSAGE = `Oh no! It looks like JavaScript is not enabled in your browser.`;
const DEFAULT_NAME = 'Expo App';
const DEFAULT_THEME_COLOR = '#4630EB';
const DEFAULT_DESCRIPTION = 'A Neat Expo App';
const DEFAULT_BACKGROUND_COLOR = '#ffffff';
const DEFAULT_START_URL = '.';
const DEFAULT_DISPLAY = 'standalone';
// Enable full-screen iOS PWAs
const DEFAULT_STATUS_BAR = 'black-translucent';
const DEFAULT_LANG_DIR = 'auto';
const DEFAULT_ORIENTATION = 'any';
const ICON_SIZES = [192, 512];
const MAX_SHORT_NAME_LENGTH = 12;
const DEFAULT_PREFER_RELATED_APPLICATIONS = true;
function isUsingYarn(projectRoot) {
const workspaceRoot = find_yarn_workspace_root_1.default(projectRoot);
if (workspaceRoot) {
return fs_extra_1.default.existsSync(path_1.default.join(workspaceRoot, 'yarn.lock'));
const Errors_1 = require("./Errors");
const Project_1 = require("./Project");
function readConfigJson(projectRoot, skipValidation = false, skipNativeValidation = false) {
const { configPath } = findConfigFile(projectRoot);
let rawConfig = null;
try {
rawConfig = json_file_1.default.read(configPath, { json5: true });
}
else {
return fs_extra_1.default.existsSync(path_1.default.join(projectRoot, 'yarn.lock'));
}
catch (_) { }
const { rootConfig, exp } = parseAndValidateRootConfig(rawConfig, skipValidation);
const packageJsonPath = getRootPackageJsonPath(projectRoot, exp);
const pkg = json_file_1.default.read(packageJsonPath);
return Object.assign(Object.assign({}, ensureConfigHasDefaultValues(projectRoot, exp, pkg, skipNativeValidation)), { rootConfig: rootConfig });
}
exports.isUsingYarn = isUsingYarn;
function fileExistsAsync(file) {
exports.readConfigJson = readConfigJson;
function readConfigJsonAsync(projectRoot, skipValidation = false, skipNativeValidation = false) {
return __awaiter(this, void 0, void 0, function* () {
const { configPath } = findConfigFile(projectRoot);
let rawConfig = null;
try {
return (yield fs_extra_1.default.stat(file)).isFile();
rawConfig = yield json_file_1.default.readAsync(configPath, { json5: true });
}
catch (e) {
return false;
}
catch (_) { }
const { rootConfig, exp } = parseAndValidateRootConfig(rawConfig, skipValidation);
const packageJsonPath = getRootPackageJsonPath(projectRoot, exp);
const pkg = yield json_file_1.default.readAsync(packageJsonPath);
return Object.assign(Object.assign({}, ensureConfigHasDefaultValues(projectRoot, exp, pkg, skipNativeValidation)), { rootConfig: rootConfig });
});
}
exports.fileExistsAsync = fileExistsAsync;
function fileExists(file) {
try {
return fs_extra_1.default.statSync(file).isFile();
}
catch (e) {
return false;
}
}
exports.fileExists = fileExists;
exports.readConfigJsonAsync = readConfigJsonAsync;
function findConfigFile(projectRoot) {
const APP_JSON_FILE_NAME = 'app.json';
let configPath;

@@ -104,247 +79,2 @@ if (customConfigPaths[projectRoot]) {

exports.setCustomConfigPath = setCustomConfigPath;
function createEnvironmentConstants(appManifest, pwaManifestLocation) {
let web;
try {
web = json_file_1.default.read(pwaManifestLocation);
}
catch (e) {
web = {};
}
return Object.assign(Object.assign({}, appManifest), { name: appManifest.displayName || appManifest.name,
/**
* Omit app.json properties that get removed during the native turtle build
*
* `facebookScheme`
* `facebookAppId`
* `facebookDisplayName`
*/
facebookScheme: undefined, facebookAppId: undefined, facebookDisplayName: undefined,
// Remove iOS and Android.
ios: undefined, android: undefined,
// Use the PWA `manifest.json` as the native web manifest.
web });
}
exports.createEnvironmentConstants = createEnvironmentConstants;
function sanitizePublicPath(publicPath) {
if (typeof publicPath !== 'string' || !publicPath.length) {
return '/';
}
if (publicPath.endsWith('/')) {
return publicPath;
}
return publicPath + '/';
}
function getConfigForPWA(projectRoot, getAbsolutePath, options) {
const { exp } = readConfigJson(projectRoot, true, true);
return ensurePWAConfig(exp, getAbsolutePath, options);
}
exports.getConfigForPWA = getConfigForPWA;
function getNameFromConfig(exp = {}) {
// For RN CLI support
const appManifest = exp.expo || exp;
const { web = {} } = appManifest;
// rn-cli apps use a displayName value as well.
const appName = exp.displayName || appManifest.displayName || appManifest.name || DEFAULT_NAME;
const webName = web.name || appName;
return {
appName,
webName,
};
}
exports.getNameFromConfig = getNameFromConfig;
function validateShortName(shortName) {
return __awaiter(this, void 0, void 0, function* () {
// Validate short name
if (shortName.length > MAX_SHORT_NAME_LENGTH) {
console.warn(`PWA short name should be 12 characters or less, otherwise it'll be curtailed on the mobile device homepage. You should define web.shortName in your ${APP_JSON_FILE_NAME} as a string that is ${MAX_SHORT_NAME_LENGTH} or less characters.`);
}
});
}
exports.validateShortName = validateShortName;
// Convert expo value to PWA value
function ensurePWAorientation(orientation) {
if (orientation && typeof orientation === 'string') {
let webOrientation = orientation.toLowerCase();
if (webOrientation !== 'default') {
return webOrientation;
}
}
return DEFAULT_ORIENTATION;
}
function getWebManifestFromConfig(config = {}) {
const appManifest = config.expo || config || {};
return appManifest.web || {};
}
function getWebOutputPath(config = {}) {
if (process.env.WEBPACK_BUILD_OUTPUT_PATH) {
return process.env.WEBPACK_BUILD_OUTPUT_PATH;
}
const web = getWebManifestFromConfig(config);
const { build = {} } = web;
return build.output || DEFAULT_BUILD_PATH;
}
exports.getWebOutputPath = getWebOutputPath;
function applyWebDefaults(appJSON) {
// For RN CLI support
const appManifest = appJSON.expo || appJSON || {};
const { web: webManifest = {}, splash = {}, ios = {}, android = {} } = appManifest;
const { build: webBuild = {}, webDangerous = {}, meta = {} } = webManifest;
const { apple = {} } = meta;
// rn-cli apps use a displayName value as well.
const { appName, webName } = getNameFromConfig(appJSON);
const languageISOCode = webManifest.lang || DEFAULT_LANGUAGE_ISO_CODE;
const noJavaScriptMessage = webDangerous.noJavaScriptMessage || DEFAULT_NO_JS_MESSAGE;
const rootId = webBuild.rootId || DEFAULT_ROOT_ID;
const buildOutputPath = getWebOutputPath(appJSON);
const publicPath = sanitizePublicPath(webManifest.publicPath);
const primaryColor = appManifest.primaryColor || DEFAULT_THEME_COLOR;
const description = appManifest.description || DEFAULT_DESCRIPTION;
// The theme_color sets the color of the tool bar, and may be reflected in the app's preview in task switchers.
const webThemeColor = webManifest.themeColor || primaryColor;
const dir = webManifest.dir || DEFAULT_LANG_DIR;
const shortName = webManifest.shortName || webName;
const display = webManifest.display || DEFAULT_DISPLAY;
const startUrl = webManifest.startUrl || DEFAULT_START_URL;
const webViewport = meta.viewport || DEFAULT_VIEWPORT;
const { scope, crossorigin } = webManifest;
const barStyle = apple.barStyle || webManifest.barStyle || DEFAULT_STATUS_BAR;
const orientation = ensurePWAorientation(webManifest.orientation || appManifest.orientation);
/**
* **Splash screen background color**
* `https://developers.google.com/web/fundamentals/web-app-manifest/#splash-screen`
* The background_color should be the same color as the load page,
* to provide a smooth transition from the splash screen to your app.
*/
const backgroundColor = webManifest.backgroundColor || splash.backgroundColor || DEFAULT_BACKGROUND_COLOR; // No default background color
/**
*
* https://developer.mozilla.org/en-US/docs/Web/Manifest#prefer_related_applications
* Specifies a boolean value that hints for the user agent to indicate
* to the user that the specified native applications (see below) are recommended over the website.
* This should only be used if the related native apps really do offer something that the website can't... like Expo ;)
*
* >> The banner won't show up if the app is already installed:
* https://github.com/GoogleChrome/samples/issues/384#issuecomment-326387680
*/
const preferRelatedApplications = webManifest.preferRelatedApplications || DEFAULT_PREFER_RELATED_APPLICATIONS;
const relatedApplications = inferWebRelatedApplicationsFromConfig(appManifest);
return Object.assign(Object.assign({}, appManifest), { name: appName, description,
primaryColor,
// Ensure these objects exist
ios: Object.assign({}, ios), android: Object.assign({}, android), web: Object.assign(Object.assign({}, webManifest), { meta: Object.assign(Object.assign({}, meta), { apple: Object.assign(Object.assign({}, apple), { formatDetection: apple.formatDetection || 'telephone=no', mobileWebAppCapable: apple.mobileWebAppCapable || 'yes', touchFullscreen: apple.touchFullscreen || 'yes', barStyle }), viewport: webViewport }), build: Object.assign(Object.assign({}, webBuild), { output: buildOutputPath, rootId,
publicPath }), dangerous: Object.assign(Object.assign({}, webDangerous), { noJavaScriptMessage }), scope,
crossorigin,
description,
preferRelatedApplications,
relatedApplications,
startUrl,
shortName,
display,
orientation,
dir,
barStyle,
backgroundColor, themeColor: webThemeColor, lang: languageISOCode, name: webName }) });
}
/**
* https://developer.mozilla.org/en-US/docs/Web/Manifest#related_applications
* An array of native applications that are installable by, or accessible to, the underlying platform
* for example, a native Android application obtainable through the Google Play Store.
* Such applications are intended to be alternatives to the
* website that provides similar/equivalent functionality — like the native app version of the website.
*/
function inferWebRelatedApplicationsFromConfig({ web = {}, ios = {}, android = {} }) {
const relatedApplications = web.relatedApplications || [];
const { bundleIdentifier, appStoreUrl } = ios;
if (bundleIdentifier) {
const PLATFORM_ITUNES = 'itunes';
let iosApp = relatedApplications.some(({ platform }) => platform === PLATFORM_ITUNES);
if (!iosApp) {
relatedApplications.push({
platform: PLATFORM_ITUNES,
url: appStoreUrl,
id: bundleIdentifier,
});
}
}
const { package: androidPackage, playStoreUrl } = android;
if (androidPackage) {
const PLATFORM_PLAY = 'play';
const alreadyHasAndroidApp = relatedApplications.some(({ platform }) => platform === PLATFORM_PLAY);
if (!alreadyHasAndroidApp) {
relatedApplications.push({
platform: PLATFORM_PLAY,
url: playStoreUrl || `http://play.google.com/store/apps/details?id=${androidPackage}`,
id: androidPackage,
});
}
}
return relatedApplications;
}
function inferWebHomescreenIcons(config = {}, getAbsolutePath, options) {
const { web = {}, ios = {} } = config;
if (Array.isArray(web.icons)) {
return web.icons;
}
let icons = [];
let icon;
if (web.icon || config.icon) {
icon = getAbsolutePath(web.icon || config.icon);
}
else {
// Use template icon
icon = options.templateIcon;
}
const destination = `apple/icons`;
icons.push({ src: icon, size: ICON_SIZES, destination });
const iOSIcon = config.icon || ios.icon;
if (iOSIcon) {
const iOSIconPath = getAbsolutePath(iOSIcon);
icons.push({
ios: true,
sizes: 180,
src: iOSIconPath,
destination,
});
}
return icons;
}
function inferWebStartupImages(config, getAbsolutePath, options) {
const { icon, web = {}, splash = {}, primaryColor } = config;
if (Array.isArray(web.startupImages)) {
return web.startupImages;
}
const { splash: webSplash = {} } = web;
let startupImages = [];
let splashImageSource;
const possibleIconSrc = webSplash.image || splash.image || icon;
if (possibleIconSrc) {
const resizeMode = webSplash.resizeMode || splash.resizeMode || 'contain';
const backgroundColor = webSplash.backgroundColor || splash.backgroundColor || primaryColor || '#ffffff';
splashImageSource = getAbsolutePath(possibleIconSrc);
startupImages.push({
resizeMode,
color: backgroundColor,
src: splashImageSource,
supportsTablet: webSplash.supportsTablet === undefined ? true : webSplash.supportsTablet,
orientation: web.orientation,
destination: `apple/splash`,
});
}
return startupImages;
}
function ensurePWAConfig(appJSON, getAbsolutePath, options) {
const config = applyWebDefaults(appJSON);
if (getAbsolutePath) {
config.web.icons = inferWebHomescreenIcons(config, getAbsolutePath, options);
config.web.startupImages = inferWebStartupImages(config, getAbsolutePath, options);
}
return config;
}
exports.ensurePWAConfig = ensurePWAConfig;
class ConfigError extends Error {
constructor(message, code) {
super(message);
this.code = code;
}
}
const APP_JSON_EXAMPLE = JSON.stringify({

@@ -364,3 +94,3 @@ expo: {

else {
throw new ConfigError('app.json must include a JSON object.', 'NOT_OBJECT');
throw new Errors_1.ConfigError('app.json must include a JSON object.', 'NOT_OBJECT');
}

@@ -370,3 +100,3 @@ }

if (exp === null || typeof exp !== 'object') {
throw new ConfigError(`Property 'expo' in app.json is not an object. Please make sure app.json includes a managed Expo app config like this: ${APP_JSON_EXAMPLE}`, 'NO_EXPO');
throw new Errors_1.ConfigError(`Property 'expo' in app.json is not an object. Please make sure app.json includes a managed Expo app config like this: ${APP_JSON_EXAMPLE}`, 'NO_EXPO');
}

@@ -383,50 +113,6 @@ return {

if (!fs_extra_1.default.existsSync(packageJsonPath)) {
throw new ConfigError(`The expected package.json path: ${packageJsonPath} does not exist`, 'MODULE_NOT_FOUND');
throw new Errors_1.ConfigError(`The expected package.json path: ${packageJsonPath} does not exist`, 'MODULE_NOT_FOUND');
}
return packageJsonPath;
}
function readConfigJson(projectRoot, skipValidation = false, skipNativeValidation = false) {
const { configPath } = findConfigFile(projectRoot);
let rawConfig = null;
try {
rawConfig = json_file_1.default.read(configPath, { json5: true });
}
catch (_) { }
const { rootConfig, exp } = parseAndValidateRootConfig(rawConfig, skipValidation);
const packageJsonPath = getRootPackageJsonPath(projectRoot, exp);
const pkg = json_file_1.default.read(packageJsonPath);
return Object.assign(Object.assign({}, ensureConfigHasDefaultValues(projectRoot, exp, pkg, skipNativeValidation)), { rootConfig: rootConfig });
}
exports.readConfigJson = readConfigJson;
function readConfigJsonAsync(projectRoot, skipValidation = false, skipNativeValidation = false) {
return __awaiter(this, void 0, void 0, function* () {
const { configPath } = findConfigFile(projectRoot);
let rawConfig = null;
try {
rawConfig = yield json_file_1.default.readAsync(configPath, { json5: true });
}
catch (_) { }
const { rootConfig, exp } = parseAndValidateRootConfig(rawConfig, skipValidation);
const packageJsonPath = getRootPackageJsonPath(projectRoot, exp);
const pkg = yield json_file_1.default.readAsync(packageJsonPath);
return Object.assign(Object.assign({}, ensureConfigHasDefaultValues(projectRoot, exp, pkg, skipNativeValidation)), { rootConfig: rootConfig });
});
}
exports.readConfigJsonAsync = readConfigJsonAsync;
function getExpoSDKVersion(projectRoot, exp) {
if (exp && exp.sdkVersion) {
return exp.sdkVersion;
}
const packageJsonPath = Modules_1.projectHasModule('expo/package.json', projectRoot, exp);
if (packageJsonPath) {
const expoPackageJson = json_file_1.default.read(packageJsonPath, { json5: true });
const { version: packageVersion } = expoPackageJson;
if (typeof packageVersion === 'string') {
const majorVersion = packageVersion.split('.').shift();
return `${majorVersion}.0.0`;
}
}
throw new ConfigError(`Cannot determine which native SDK version your project uses because the module \`expo\` is not installed. Please install it with \`yarn add expo\` and try again.`, 'MODULE_NOT_FOUND');
}
exports.getExpoSDKVersion = getExpoSDKVersion;
function ensureConfigHasDefaultValues(projectRoot, exp, pkg, skipNativeValidation = false) {

@@ -444,3 +130,3 @@ if (!exp)

}
if (!exp.version) {
if (!exp.version && typeof pkg.version === 'string') {
exp.version = pkg.version;

@@ -452,3 +138,3 @@ }

try {
exp.sdkVersion = getExpoSDKVersion(projectRoot, exp);
exp.sdkVersion = Project_1.getExpoSDKVersion(projectRoot, exp);
}

@@ -479,3 +165,2 @@ catch (error) {

exports.writeConfigJsonAsync = writeConfigJsonAsync;
__export(require("./Modules"));
//# sourceMappingURL=Config.js.map

@@ -18,9 +18,803 @@ export declare type PackageJSONConfig = {

};
declare type ExpoOrientation = 'default' | 'portrait' | 'landscape';
declare type ExpoPrivacy = 'public' | 'unlisted';
declare type SplashResizeMode = 'cover' | 'contain';
/**
* 6 character long hex color string, eg: `'#000000'`
* @pattern ^#|(&#x23;)\\d{6}$
*/
declare type Color = string;
declare type AndroidMode = 'default' | 'collapse';
declare type AndroidBarStyle = 'light-content' | 'dark-content';
export declare type IntentFilter = {
action: string;
category?: string[];
autoVerify?: boolean;
data?: {
scheme?: string;
host?: string;
port?: string;
path?: string;
pathPattern?: string;
pathPrefix?: string;
mimeType?: string;
};
};
declare type WebAppleBarStyle = 'default' | 'black' | 'black-translucent';
/**
* Configuration for loading and splash screen for standalone apps.
*/
declare type Splash = {
/**
* Color to fill the loading screen background
*/
backgroundColor?: Color;
/**
* Determines how the `image` will be displayed in the splash loading screen.
*/
resizeMode?: SplashResizeMode;
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
image?: Image;
};
/**
* Local path or remote url to an image to use as an image.
* {
* asset: true
* contentTypePattern: "^image/png$"
* contentTypeHuman: ".png image"
* }
*/
declare type Image = string;
/**
* Local path or remote url to an image to use as an icon.
* {
* asset: true
* contentTypePattern: "^image/png$"
* contentTypeHuman: ".png image"
* square: true
* }
*/
declare type Icon = string;
declare type AndroidAdaptiveIcon = {
/**
* Local path or remote url to an image to use for your app's icon on Android. If specified, this overrides the top-level `icon` and the `android.icon` keys. Should follow the guidelines specified at https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive. This icon will appear on the home screen.
*/
foregroundImage?: Icon;
/**
* Local path or remote url to a background image for your app's Adaptive Icon on Android. If specified, this overrides the `backgroundColor` key. Should follow the guidelines specified at https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive.
*/
backgroundImage?: Icon;
/**
* Color to use as the background for your app's Adaptive Icon on Android.
*/
backgroundColor?: Color;
};
export declare type AndroidPlatformConfig = {
/**
* @autogenerated
*/
publishSourceMapPath?: string;
/**
* The manifest for the Android version of your app will be written to this path during publish.
* {
* autogenerated: true
* }
*/
publishManifestPath?: string;
/**
* The bundle for the Android version of your app will be written to this path during publish.
* {
* autogenerated: true
* }
*/
publishBundlePath?: string;
/**
* The package name for your Android standalone app. You make it up, but it needs to be unique on the Play Store. See [this StackOverflow question](http://stackoverflow.com/questions/6273892/android-package-name-convention).
* @pattern ^[a-zA-Z][a-zA-Z0-9\\_]*(\\.[a-zA-Z][a-zA-Z0-9\\_]*)+$
* @regexHuman Reverse DNS notation unique name for your app. For example, host.exp.exponent, where exp.host is our domain and Expo is our app. The name may only contain lowercase and uppercase letters (a-z, A-Z), numbers (0-9) and underscores (_). Each component of the name should start with a lowercase letter.
*/
package?: string;
/**
* Version number required by Google Play. Increment by one for each release. Must be an integer. https://developer.android.com/studio/publish/versioning.html
*/
versionCode?: number;
/**
* Local path or remote url to an image to use for your app's icon on Android. If specified, this overrides the top-level `icon` key. We recommend that you use a 1024x1024 png file (transparency is recommended for the Google Play Store). This icon will appear on the home screen and within the Expo app.
*/
icon?: Icon;
adaptiveIcon?: AndroidAdaptiveIcon;
/**
* URL to your app on the Google Play Store, if you have deployed it there. This is used to link to your store page from your Expo project page if your app is public.
* @pattern ^https://play\\.google\\.com/
* @example https://play.google.com/store/apps/details?id=host.exp.exponent
*/
playStoreUrl?: string;
/**
* List of permissions used by the standalone app. Remove the field to use the default list of permissions.\n\n Example: `[ \"CAMERA\", \"ACCESS_FINE_LOCATION\" ]`.\n\n You can specify the following permissions depending on what you need:\n\n- `ACCESS_COARSE_LOCATION`\n- `ACCESS_FINE_LOCATION`\n- `CAMERA`\n- `MANAGE_DOCUMENTS`\n- `READ_CONTACTS`\n- `READ_EXTERNAL_STORAGE`\n- `READ_INTERNAL_STORAGE`\n- `READ_PHONE_STATE`\n- `RECORD_AUDIO`\n- `USE_FINGERPRINT`\n- `VIBRATE`\n- `WAKE_LOCK`\n- `WRITE_EXTERNAL_STORAGE`\n- `com.anddoes.launcher.permission.UPDATE_COUNT`\n- `com.android.launcher.permission.INSTALL_SHORTCUT`\n- `com.google.android.c2dm.permission.RECEIVE`\n- `com.google.android.gms.permission.ACTIVITY_RECOGNITION`\n- `com.google.android.providers.gsf.permission.READ_GSERVICES`\n- `com.htc.launcher.permission.READ_SETTINGS`\n- `com.htc.launcher.permission.UPDATE_SHORTCUT`\n- `com.majeur.launcher.permission.UPDATE_BADGE`\n- `com.sec.android.provider.badge.permission.READ`\n- `com.sec.android.provider.badge.permission.WRITE`\n- `com.sonyericsson.home.permission.BROADCAST_BADGE`
*/
permissions?: string[];
/**
* [Firebase Configuration File](https://support.google.com/firebase/answer/7015592) google-services.json file for configuring Firebase.
*/
googleServicesFile?: string;
config?: {
/**
* [Branch](https://branch.io/) key to hook up Branch linking services.
*/
branch?: {
/**
* Your Branch API key
*/
apiKey?: string;
};
/**
* [Google Developers Fabric](https://get.fabric.io/) keys to hook up Crashlytics and other services.
*/
fabric?: {
/**
* Your Fabric API key
*/
apiKey?: string;
/**
* Your Fabric build secret
*/
buildSecret?: string;
};
/**
* [Google Maps Android SDK](https://developers.google.com/maps/documentation/android-api/signup) key for your standalone app.
*/
googleMaps?: {
/**
* Your Google Maps Android SDK API key
*/
apiKey: string;
};
/**
* [Google Mobile Ads App ID](https://support.google.com/admob/answer/6232340) Google AdMob App ID.
*/
googleMobileAdsAppId?: string;
/**
* [Google Sign-In Android SDK](https://developers.google.com/identity/sign-in/android/start-integrating) keys for your standalone app.
*/
googleSignIn?: {
/**
* The Android API key. Can be found in the credentials section of the developer console or in `google-services.json`.
*/
apiKey: string;
/**
* The SHA-1 hash of the signing certificate used to build the apk without any separator `:`. Can be found in `google-services.json`. https://developers.google.com/android/guides/client-auth
*/
certificateHash: string;
};
};
/**
* Configuration for loading and splash screen for standalone Android apps.
*/
splash?: {
/**
* Color to fill the loading screen background
*/
backgroundColor?: Color;
/**
* Determines how the `image` will be displayed in the splash loading screen. Must be one of `cover`, `contain` or `native`, defaults to `contain`.
*/
resizeMode?: 'cover' | 'contain' | 'native';
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
mdpi?: Image;
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
hdpi?: Image;
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
xhdpi?: Image;
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
xxhdpi?: Image;
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
xxxhdpi?: Image;
};
/**
* An array of intent filters.
* @uniqueItems
* @example [{
"autoVerify": true,
"action": "VIEW",
"data": {
"scheme": "https",
"host": "*.expo.io"
},
"category": [
"BROWSABLE",
"DEFAULT"
]
}]
*/
intentFilters?: IntentFilter | IntentFilter[];
};
declare type Devtool = 'eval' | 'inline-source-map' | 'cheap-eval-source-map' | 'cheap-source-map' | 'cheap-module-eval-source-map' | 'cheap-module-source-map' | 'eval-source-map' | 'source-map' | 'nosources-source-map' | 'hidden-source-map' | 'nosources-source-map' | 'inline-cheap-source-map' | 'inline-cheap-module-source-map' | '@eval' | '@inline-source-map' | '@cheap-eval-source-map' | '@cheap-source-map' | '@cheap-module-eval-source-map' | '@cheap-module-source-map' | '@eval-source-map' | '@source-map' | '@nosources-source-map' | '@hidden-source-map' | '@nosources-source-map' | '#eval' | '#inline-source-map' | '#cheap-eval-source-map' | '#cheap-source-map' | '#cheap-module-eval-source-map' | '#cheap-module-source-map' | '#eval-source-map' | '#source-map' | '#nosources-source-map' | '#hidden-source-map' | '#nosources-source-map' | '#@eval' | '#@inline-source-map' | '#@cheap-eval-source-map' | '#@cheap-source-map' | '#@cheap-module-eval-source-map' | '#@cheap-module-source-map' | '#@eval-source-map' | '#@source-map' | '#@nosources-source-map' | '#@hidden-source-map' | '#@nosources-source-map' | boolean;
/**
* Web platform specific configuration
*/
export declare type WebPlatformConfig = {
[key: string]: any;
/**
* Relative path of an image to use for your app's favicon.
*/
favicon?: string;
/**
* Defines the title of the document, defaults to the outer level name
* @pwa name
* @metatag title
*/
name?: string;
/**
* A short version of the app's name, 12 characters or fewer. Used in app launcher and new tab pages. Maps to `short_name` in the PWA manifest.json. Defaults to the `name` property.
* @pwa short_name
* @regexHuman Maximum 12 characters long
*/
shortName?: string;
/**
* Specifies the primary language for the values in the name and short_name members. This value is a string containing a single language tag.
* @fallback 'en'
* @pwa lang
*/
lang?: string;
/**
* Defines the navigation scope of this website's context. This restricts what web pages can be viewed while the manifest is applied. If the user navigates outside the scope, it returns to a normal web page inside a browser tab/window. If the scope is a relative URL, the base URL will be the URL of the manifest.
* @pwa scope
*/
scope?: string;
/**
* Defines the color of the Android tool bar, and may be reflected in the app's preview in task switchers.
* @fallback 'expo.primaryColor', '#4630EB'
* @pwa theme_color
* @metatag theme-color
*/
themeColor?: Color;
/**
* Provides a general description of what the pinned website does.
* @fallback 'expo.description', "'A Neat Expo App'"
* @pwa description
*/
description?: string;
/**
* Specifies the primary text direction for the name, short_name, and description members. Together with the lang member, it helps the correct display of right-to-left languages.
* @fallback auto
* @pwa dir
*
*/
dir?: 'auto' | 'ltr' | 'rtl';
/**
* Defines the developers’ preferred display mode for the website.
* @fallback standalone
* @pwa display
*/
display?: 'fullscreen' | 'standalone' | 'minimal-ui' | 'browser';
/**
* The URL that loads when a user launches the application (e.g. when added to home screen), typically the index. Note that this has to be a relative URL, relative to the manifest URL.
* @pwa start_url
*/
startUrl?: string;
/**
* Defines the default orientation for all the website's top level browsing contexts.
* @pwa orientation
*/
orientation?: 'any' | 'natural' | 'landscape' | 'landscape-primary' | 'landscape-secondary' | 'portrait' | 'portrait-primary' | 'portrait-secondary';
/**
* Defines the expected “background color” for the website. This value repeats what is already available in the site’s CSS, but can be used by browsers to draw the background color of a shortcut when the manifest is available before the stylesheet has loaded. This creates a smooth transition between launching the web application and loading the site's content.
* @pwa background_color
* @fallback 'expo.splash.backgroundColor', '#ffffff'
*/
backgroundColor?: Color;
/**
* If content is set to default, the status bar appears normal. If set to black, the status bar has a black background. If set to black-translucent, the status bar is black and translucent. If set to default or black, the web content is displayed below the status bar. If set to black-translucent, the web content is displayed on the entire screen, partially obscured by the status bar.
*
* @fallback black-translucent
* @metatag apple-mobile-web-app-status-bar-style
*/
barStyle?: WebAppleBarStyle;
/**
* Hints for the user agent to indicate to the user that the specified native applications (defined in expo.ios and expo.android) are recommended over the website.
* @pwa prefer_related_applications
*/
preferRelatedApplications?: boolean;
/**
* Basic customization options for configuring the default webpack config
*/
build?: {
[key: string]: any;
/**
* ID of the root DOM element in your index.html. By default this is "root".
* @fallback root
*/
rootId?: string;
/**
* Choose a custom style of source mapping to enhance the debugging process. These values can affect build and rebuild speed dramatically.
*/
devtool?: Devtool;
/**
* Allows you to specify the base path for all the assets within your application.
* @deprecated
*/
publicPath?: string;
/**
* Configuration for customizing webpack report. See `HtmlWebpackPlugin.Options` from `html-webpack-plugin`.
*/
minifyHTML?: {
[option: string]: any;
};
/**
* Configuration for enabling webpack report and `stats.json`. See `BundleAnalyzerPlugin.Options` from `webpack-bundle-analyzer`.
* @deprecated
*/
report?: {
[option: string]: any;
};
/**
* Configuration for customizing the service worker. See `GenerateSWOptions` from `workbox-webpack-plugin`.
*/
serviceWorker?: {
[options: string]: any;
};
};
/**
* Defines the meta tag elements that will be added to the head element of your index.html.
*/
meta?: {
[key: string]: any;
/**
* ID provided by the Google Site Verification API: https://developers.google.com/site-verification/
*/
googleSiteVerification?: string;
/**
* Apple PWA-specific meta elements. By default these values will be inferred from fields in the scope above, but you can override them here.
*/
apple?: {
[key: string]: any;
/**
* Enables PWA functionality on iOS devices.
* @fallback 'yes'
* @metatag 'apple-mobile-web-app-capable'
*/
mobileWebAppCapable?: string;
/**
* If content is set to default, the status bar appears normal. If set to black, the status bar has a black background. If set to black-translucent, the status bar is black and translucent. If set to default or black, the web content is displayed below the status bar. If set to black-translucent, the web content is displayed on the entire screen, partially obscured by the status bar.
*
* @deprecated use web.barStyle instead
* @fallback black-translucent
* @metatag apple-mobile-web-app-status-bar-style
*/
barStyle?: WebAppleBarStyle;
};
/**
* [Twitter card protocol](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup.html)
*/
twitter?: {
[key: string]: any;
};
/**
* [The Open Graph protocol](http://ogp.me/)
*/
openGraph?: {
[key: string]: any;
};
/**
* X-UA protocol
*/
microsoft?: {
[key: string]: any;
};
};
/**
* Experimental features. These will break without deprecation notice.
*/
dangerous?: {
[key: string]: any;
/**
* Viewport meta tag for your index.html. By default this is optimized for mobile usage, disabling zooming, and resizing for iPhone X.
*/
viewport?: string;
/**
* Message that is rendered when the browser using your page doesn't have JS enabled.
* @fallback Oh no! It looks like JavaScript is not enabled in your browser.
*/
noJavaScriptMessage?: string;
};
/**
* Configuration for PWA splash screens.
*/
splash?: WebSplashScreen;
};
/**
* Configuration for PWA splash screens.
*/
export declare type WebSplashScreen = {
/**
* Color to fill the loading screen background
*/
backgroundColor?: Color;
/**
* Determines how the `image` will be displayed in the splash loading screen. Must be one of `cover` or `contain`, defaults to `contain`.
*/
resizeMode?: 'cover' | 'contain';
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
image: Image;
/**
* Whether your standalone iOS app supports tablet screen sizes. Defaults to `false`.
*/
supportsTablet?: boolean;
};
export declare type IosPlatformConfig = {
/**
* @autogenerated
*/
publishSourceMapPath?: string;
/**
* The manifest for the Android version of your app will be written to this path during publish.
* @autogenerated
*/
publishManifestPath?: string;
/**
* The bundle for the Android version of your app will be written to this path during publish.
* @autogenerated
*/
publishBundlePath?: string;
/**
* The bundle identifier for your iOS standalone app. You make it up, but it needs to be unique on the App Store. See [this StackOverflow question](http://stackoverflow.com/questions/11347470/what-does-bundle-identifier-mean-in-the-ios-project).
* @pattern ^[a-zA-Z][a-zA-Z0-9\\-\\.]+$
* @regexHuman "iOS bundle identifier notation unique name for your app. For example, host.exp.exponent, where exp.host is our domain and Expo is our app."
*/
bundleIdentifier?: string;
/**
* Build number for your iOS standalone app. Must be a string that matches Apple's [format for CFBundleVersion](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364).
* @pattern ^[A-Za-z0-9\\.]+$
*/
buildNumber?: string;
/**
* Local path or remote URL to an image to use for your app's icon on iOS. If specified, this overrides the top-level `icon` key. Use a 1024x1024 icon which follows Apple's interface guidelines for icons, including color profile and transparency. Expo will generate the other required sizes. This icon will appear on the home screen and within the Expo app.
*/
icon?: Icon;
/**
* Merchant ID for use with Apple Pay in your standalone app.
*/
merchantId?: string;
/**
* URL to your app on the Apple App Store, if you have deployed it there. This is used to link to your store page from your Expo project page if your app is public.
* @pattern ^https://itunes\\.apple\\.com/.*?\\d+
* @example https://itunes.apple.com/us/app/expo-client/id982107779
*/
appStoreUrl?: string;
config?: {
/**
* [Branch](https://branch.io/) key to hook up Branch linking services.
*/
branch?: {
/**
* Your Branch API key
*/
apiKey: string;
};
/**
* Sets `ITSAppUsesNonExemptEncryption` in the standalone ipa's Info.plist to the given boolean value.
*/
usesNonExemptEncryption?: boolean;
/**
* [Google Maps iOS SDK](https://developers.google.com/maps/documentation/ios-sdk/start) key for your standalone app.
*/
googleMapsApiKey?: string;
/**
* [Google Mobile Ads App ID](https://support.google.com/admob/answer/6232340) Google AdMob App ID.
*/
googleMobileAdsAppId?: string;
/**
* [Google Sign-In iOS SDK](https://developers.google.com/identity/sign-in/ios/start-integrating) keys for your standalone app.
*/
googleSignIn?: {
/**
* The reserved client ID URL scheme. Can be found in `GoogeService-Info.plist`.
*/
reservedClientId?: string;
};
};
/**
* [Firebase Configuration File](https://support.google.com/firebase/answer/7015592) GoogleService-Info.plist file for configuring Firebase.
*/
googleServicesFile?: string;
/**
* Whether your standalone iOS app supports tablet screen sizes. Defaults to `false`.
*/
supportsTablet?: boolean;
/**
* If true, indicates that your standalone iOS app does not support handsets, and only supports tablets.
*/
isTabletOnly?: boolean;
/**
* If true, indicates that your standalone iOS app does not support Slide Over and Split View on iPad. Defaults to `true` currently, but will change to `false` in a future SDK version.
*/
requireFullScreen?: boolean;
/**
* Configuration to force the app to always use the light or dark user-interface appearance, such as \"dark mode\", or make it automatically adapt to the system preferences. If not provided, defaults to `light`.
* @fallback light
*/
userInterfaceStyle?: 'light' | 'dark' | 'automatic';
/**
* Dictionary of arbitrary configuration to add to your standalone app's native Info.plist. Applied prior to all other Expo-specific configuration. No other validation is performed, so use this at your own risk of rejection from the App Store.
*/
infoPlist?: {
[key: string]: any;
};
/**
* An array that contains Associated Domains for the standalone app.
*/
associatedDomains?: string[];
/**
* A boolean indicating if the app uses iCloud Storage for DocumentPicker. See DocumentPicker docs for details.
*/
usesIcloudStorage?: boolean;
/**
* A boolean indicating if the app uses Apple Sign-In. See AppleAuthentication docs for details.
* @fallback false
*/
usesAppleSignIn?: boolean;
/**
* Configuration for loading and splash screen for standalone iOS apps.
*/
splash?: {
/**
* Local path to a XIB file as the loading screen. It overrides other loading screen options.
* {
* "asset": true,
* "contentTypePattern": "^text/xml$",
* "contentTypeHuman": ".xib interface builder document"
* }
*/
xib?: string;
/**
* Color to fill the loading screen background
*/
backgroundColor?: Color;
/**
* Determines how the `image` will be displayed in the splash loading screen. Must be one of `cover` or `contain`, defaults to `contain`.
*/
resizeMode?: SplashResizeMode;
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
image: Image;
/**
* Local path or remote url to an image to fill the background of the loading screen. Image size and aspect ratio are up to you. Must be a .png.
*/
tabletImage?: Image;
};
};
export declare type ExpoConfig = {
/**
* The name of your app as it appears both within Expo and on your home screen as a standalone app.
*/
name?: string;
/**
* A short description of what your app is and why it is great.
*/
description?: string;
/**
* The friendly url name for publishing. eg: `expo.io/@your-username/slug`.
* @pattern ^[a-zA-Z0-9_\\-]+$
*/
slug?: string;
description?: string;
/**
* The username of the account under which this app is published. If not specified, the app is published as the currently signed-in user.
*/
owner?: string;
/**
* Either `public` or `unlisted`. If not provided, defaults to `unlisted`. In the future `private` will be supported. `unlisted` hides the experience from search results.
*/
privacy?: ExpoPrivacy;
/**
* The Expo sdkVersion to run the project on. This should line up with the version specified in your package.json.
* @pattern ^(\\d+\\.\\d+\\.\\d+)|(UNVERSIONED)$
*/
sdkVersion?: string;
platforms?: Array<Platform>;
/**
* Your app version, use whatever versioning scheme that you like.
*/
version?: string;
/**
* Platforms that your project explicitly supports. If not specified, it defaults to `[\"ios\", \"android\"]`.
*/
platforms?: Platform[];
/**
* If you would like to share the source code of your app on Github, enter the URL for the repository here and it will be linked to from your Expo project page.
* @pattern ^https://github\\.com/
*/
githubUrl?: string;
/**
* Lock your app to a specific orientation with `portrait` or `landscape`. Defaults to no lock.
*/
orientation?: ExpoOrientation;
/**
* On Android, this will determine the color of your app in the multitasker. Currently this is not used on iOS, but it may be used for other purposes in the future.
*/
primaryColor?: Color;
/**
* Local path or remote url to an image to use for your app's icon. We recommend that you use a 1024x1024 png file. This icon will appear on the home screen and within the Expo app.
*/
icon?: Icon;
/**
* Configuration for remote (push) notifications.
*/
notification?: {
/**
* Local path or remote url to an image to use as the icon for push notifications. 96x96 png grayscale with transparency.
*/
icon?: Icon;
/**
* Tint color for the push notification image when it appears in the notification tray.
*/
color?: Color;
/**
* Display the notification when the app is in foreground on iOS.
*/
iosDisplayInForeground?: boolean;
/**
* Show each push notification individually (`default`) or collapse into one (`collapse`).
*/
androidMode?: AndroidMode;
/**
* If `androidMode` is set to `collapse`, this title is used for the collapsed notification message. eg: `'#{unread_notifications} new interactions'`.
*/
androidCollapsedTitle?: string;
};
/**
* By default, Expo looks for the application registered with the AppRegistry as `main`. If you would like to change this, you can specify the name in this property.
*/
appKey?: string;
/**
* Configuration for the status bar on Android.
*/
androidStatusBar?: {
/**
* Configures the status bar icons to have a light or dark color.
*/
barStyle?: AndroidBarStyle;
/**
* Specifies the background color of the status bar.
*/
backgroundColor?: Color;
};
/**
* Configuration for the bottom navigation bar on Android.
*/
androidNavigationBar?: {
/**
* Determines whether to show or hide the bottom navigation bar. When set to `false`, both the navigation bar and the status bar are hidden by enabling full-screen mode, as recommended by the Android documentation.
*/
visible?: boolean;
/**
* Configure the navigation bar icons to have a light or dark color. Supported on Android Oreo and newer.
*/
barStyle?: AndroidBarStyle;
/**
* Specifies the background color of the navigation bar.
*/
backgroundColor?: Color;
};
/**
* Adds a notification to your standalone app with refresh button and debug info.
*/
androidShowExponentNotificationInShellApp?: boolean;
/**
* URL scheme to link into your app. For example, if we set this to `'demo'`, then demo:// URLs would open your app when tapped.
* @pattern ^[a-z][a-z0-9+.-]*$
* @regexHuman String beginning with a lowercase letter followed by any combination of lowercase letters, digits, \"+\", \".\" or \"-\"
* @standaloneOnly
*/
scheme?: string;
/**
* The relative path to your main JavaScript file.
*/
entryPoint?: string;
/**
* Any extra fields you want to pass to your experience. Values are accessible via `Expo.Constants.manifest.extra` ([read more](../sdk/constants.html#expoconstantsmanifest))
*/
extra?: {
[key: string]: any;
};
rnCliPath?: string;
packagerOpts?: {
[key: string]: any;
};
ignoreNodeModulesValidation?: boolean;
nodeModulesPath?: string;
/**
* Configuration for how and when the app should request OTA JavaScript updates
*/
updates?: {
/**
* If set to false, your standalone app will never download any code, and will only use code bundled locally on the device. In that case, all updates to your app must be submitted through Apple review. Defaults to true. (Note that this will not work out of the box with ExpoKit projects)
*/
enabled?: boolean;
/**
* By default, Expo will check for updates every time the app is loaded. Set this to `'ON_ERROR_RECOVERY'` to disable automatic checking unless recovering from an error.
*/
checkAutomatically?: 'ON_ERROR_RECOVERY' | 'ON_LOAD';
/**
* How long (in ms) to allow for fetching OTA updates before falling back to a cached version of the app. Defaults to 30000 (30 sec).
* minimum: 0,
* maximum: 300000
*/
fallbackToCacheTimeout?: number;
};
/**
* Provide overrides by locale for System Dialog prompts like Permissions Boxes
*/
locales?: {
[key: string]: any;
};
/**
* iOS standalone app specific configuration
* @standaloneOnly
*/
ios?: IosPlatformConfig;
/**
* Android standalone app specific configuration
* @standaloneOnly
*/
android?: AndroidPlatformConfig;
/**
* Web platform specific configuration
*/
web?: WebPlatformConfig;
/**
* Used for all Facebook libraries. Set up your Facebook App ID at https://developers.facebook.com.
* @pattern ^[0-9]+$
*/
facebookAppId?: string;
/**
* Used for native Facebook login.
*/
facebookDisplayName?: string;
/**
* Used for Facebook native login. Starts with 'fb' and followed by a string of digits, like 'fb1234567890'. You can find your scheme at https://developers.facebook.com/docs/facebook-login/ios in the 'Configuring Your info.plist' section.
*/
facebookScheme?: string;
/**
* Is app detached
* @generated
*/
isDetached?: boolean;
/**
* Extra fields needed by detached apps
* @generated
*/
detach?: {
scheme?: string;
iosExpoViewUrl?: string;
androidExpoViewUrl?: string;
[key: string]: any;
};
/**
* Configuration for loading and splash screen for standalone apps.
*/
splash?: Splash;
/**
* Configuration for scripts to run to hook into the publish process
*/
hooks?: {
postPublish?: string[];
};
/**
* An array of file glob strings which point to assets that will be bundled within your standalone app binary. Read more in the [Offline Support guide](https://docs.expo.io/versions/latest/guides/offline-support.html)
*/
assetBundlePatterns?: string[];
[key: string]: any;

@@ -32,1 +826,3 @@ };

export declare type Platform = 'android' | 'ios' | 'web';
export declare type ConfigErrorCode = 'NO_APP_JSON' | 'NOT_OBJECT' | 'NO_EXPO' | 'MODULE_NOT_FOUND';
export {};

@@ -5,1 +5,3 @@ import { ExpoConfig } from './Config.types';

export declare function moduleNameFromPath(modulePath: string): string;
export declare function fileExistsAsync(file: string): Promise<boolean>;
export declare function fileExists(file: string): boolean;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -7,2 +16,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const resolve_from_1 = __importDefault(require("resolve-from"));
const fs_extra_1 = require("fs-extra");
function resolveModule(request, projectRoot, exp) {

@@ -30,2 +40,22 @@ const fromDir = exp.nodeModulesPath ? exp.nodeModulesPath : projectRoot;

exports.moduleNameFromPath = moduleNameFromPath;
function fileExistsAsync(file) {
return __awaiter(this, void 0, void 0, function* () {
try {
return (yield fs_extra_1.stat(file)).isFile();
}
catch (e) {
return false;
}
});
}
exports.fileExistsAsync = fileExistsAsync;
function fileExists(file) {
try {
return fs_extra_1.statSync(file).isFile();
}
catch (e) {
return false;
}
}
exports.fileExists = fileExists;
//# sourceMappingURL=Modules.js.map

@@ -11,2 +11,3 @@ "use strict";

const Config_1 = require("../Config");
const Modules_1 = require("../Modules");
const extensions_1 = require("./extensions");

@@ -96,3 +97,3 @@ // https://github.com/facebook/create-react-app/blob/9750738cce89a967cc71f28390daf5d4311b193c/packages/react-scripts/config/paths.js#L22

// TODO(Bacon): We may want to do a check against `./App` and `expo` in the `package.json` `dependencies` as we can more accurately ensure that the project is expo-min without needing the modules installed.
return Config_1.resolveModule('expo/AppEntry', projectRoot, exp);
return Modules_1.resolveModule('expo/AppEntry', projectRoot, exp);
}

@@ -99,0 +100,0 @@ catch (_) {

{
"name": "@expo/config",
"version": "2.5.2",
"version": "2.5.3",
"description": "A library for interacting with the app.json",
"main": "build/Config.js",
"main": "build/index.js",
"scripts": {

@@ -47,3 +47,3 @@ "watch": "tsc --watch",

"dependencies": {
"@expo/json-file": "^8.2.2",
"@expo/json-file": "^8.2.3",
"@types/invariant": "^2.2.30",

@@ -57,3 +57,3 @@ "find-yarn-workspace-root": "^1.2.1",

"devDependencies": {
"@expo/babel-preset-cli": "^0.2.2",
"@expo/babel-preset-cli": "^0.2.3",
"memfs": "^2.15.5"

@@ -60,0 +60,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc