[jest] Update mocks and fix all related sdk checks failures

This commit is contained in:
Tomasz Sapeta
2022-12-30 12:07:26 +01:00
parent 2f78e85be4
commit ffb3727555
15 changed files with 526 additions and 185 deletions

View File

@@ -1,5 +1,4 @@
import mux from '@expo/mux';
import { getNativeModuleIfExists } from 'expo';
import Constants from 'expo-constants';
import getInstallationIdAsync from 'expo/build/environment/getInstallationIdAsync';
import React from 'react';
@@ -81,7 +80,7 @@ async function _getExpoModuleSpecsAsync() {
const expoModuleNames = moduleNames.filter((moduleName) => whitelist.test(moduleName)).sort();
const specPromises = {};
for (const moduleName of expoModuleNames) {
specPromises[moduleName] = _getModuleSpecAsync(moduleName, getNativeModuleIfExists(moduleName));
specPromises[moduleName] = _getModuleSpecAsync(moduleName, NativeModules[moduleName]);
}
return await mux(specPromises);
}

View File

@@ -2,8 +2,6 @@
exports[`Skip valid requires 1`] = `
"const foo = require('bar');
require('bar');
require.resolve('bar');"
`;

View File

@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
<ViewManagerAdapter_ExpoBarCodeScannerView
<ViewManagerAdapter_ExpoBarCodeScanner
onBarCodeScanned={[Function]}
proxiedProperties={
Object {

View File

@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
<ViewManagerAdapter_ExpoBarCodeScannerView
<ViewManagerAdapter_ExpoBarCodeScanner
onBarCodeScanned={[Function]}
proxiedProperties={
Object {

View File

@@ -1 +1 @@
{"version":3,"file":"ExpoCellular.web.d.ts","sourceRoot":"","sources":["../src/ExpoCellular.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;;;;;;;kCAkBhB,QAAQ,kBAAkB,CAAC;uBAoBtC,QAAQ,OAAO,GAAG,IAAI,CAAC;8BAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;2BAGzB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGtB,QAAQ,MAAM,GAAG,IAAI,CAAC;;AAhD3D,wBAmDE"}
{"version":3,"file":"ExpoCellular.web.d.ts","sourceRoot":"","sources":["../src/ExpoCellular.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;;;;;;;kCAkBhB,QAAQ,kBAAkB,CAAC;uBAqBtC,QAAQ,OAAO,GAAG,IAAI,CAAC;8BAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;2BAGzB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGtB,QAAQ,MAAM,GAAG,IAAI,CAAC;;AAjD3D,wBAoDE"}

View File

@@ -16,7 +16,9 @@ export default {
return null;
},
async getCellularGenerationAsync() {
const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;
const connection =
// @ts-expect-error
navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;
if (connection !== null) {
switch (connection.effectiveType) {
case 'slow-2g':

View File

@@ -1 +1 @@
{"version":3,"file":"ExpoCellular.web.js","sourceRoot":"","sources":["../src/ExpoCellular.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAe;IACb,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,0BAA0B;QAC9B,MAAM,UAAU,GACd,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,gBAAgB,IAAI,IAAI,CAAC;QACxF,IAAI,UAAU,KAAK,IAAI,EAAE;YACvB,QAAQ,UAAU,CAAC,aAAa,EAAE;gBAChC,KAAK,SAAS,CAAC;gBACf,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC;oBACE,OAAO,kBAAkB,CAAC,OAAO,CAAC;aACrC;SACF;aAAM;YACL,OAAO,kBAAkB,CAAC,OAAO,CAAC;SACnC;IACH,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,sBAAsB;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,mBAAmB;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,yBAAyB;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,yBAAyB;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC","sourcesContent":["import { CellularGeneration } from './Cellular.types';\n\nexport default {\n get allowsVoip(): null {\n return null;\n },\n get carrier(): null {\n return null;\n },\n get isoCountryCode(): null {\n return null;\n },\n get mobileCountryCode(): null {\n return null;\n },\n get mobileNetworkCode(): null {\n return null;\n },\n async getCellularGenerationAsync(): Promise<CellularGeneration> {\n const connection =\n navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;\n if (connection !== null) {\n switch (connection.effectiveType) {\n case 'slow-2g':\n case '2g':\n return CellularGeneration.CELLULAR_2G;\n case '3g':\n return CellularGeneration.CELLULAR_3G;\n case '4g':\n return CellularGeneration.CELLULAR_4G;\n default:\n return CellularGeneration.UNKNOWN;\n }\n } else {\n return CellularGeneration.UNKNOWN;\n }\n },\n\n async allowsVoipAsync(): Promise<boolean | null> {\n return null;\n },\n async getIsoCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getCarrierNameAsync(): Promise<string | null> {\n return null;\n },\n async getMobileCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getMobileNetworkCodeAsync(): Promise<string | null> {\n return null;\n },\n};\n"]}
{"version":3,"file":"ExpoCellular.web.js","sourceRoot":"","sources":["../src/ExpoCellular.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAe;IACb,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,0BAA0B;QAC9B,MAAM,UAAU;QACd,mBAAmB;QACnB,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,gBAAgB,IAAI,IAAI,CAAC;QACxF,IAAI,UAAU,KAAK,IAAI,EAAE;YACvB,QAAQ,UAAU,CAAC,aAAa,EAAE;gBAChC,KAAK,SAAS,CAAC;gBACf,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC;oBACE,OAAO,kBAAkB,CAAC,OAAO,CAAC;aACrC;SACF;aAAM;YACL,OAAO,kBAAkB,CAAC,OAAO,CAAC;SACnC;IACH,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,sBAAsB;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,mBAAmB;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,yBAAyB;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,yBAAyB;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC","sourcesContent":["import { CellularGeneration } from './Cellular.types';\n\nexport default {\n get allowsVoip(): null {\n return null;\n },\n get carrier(): null {\n return null;\n },\n get isoCountryCode(): null {\n return null;\n },\n get mobileCountryCode(): null {\n return null;\n },\n get mobileNetworkCode(): null {\n return null;\n },\n async getCellularGenerationAsync(): Promise<CellularGeneration> {\n const connection =\n // @ts-expect-error\n navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;\n if (connection !== null) {\n switch (connection.effectiveType) {\n case 'slow-2g':\n case '2g':\n return CellularGeneration.CELLULAR_2G;\n case '3g':\n return CellularGeneration.CELLULAR_3G;\n case '4g':\n return CellularGeneration.CELLULAR_4G;\n default:\n return CellularGeneration.UNKNOWN;\n }\n } else {\n return CellularGeneration.UNKNOWN;\n }\n },\n\n async allowsVoipAsync(): Promise<boolean | null> {\n return null;\n },\n async getIsoCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getCarrierNameAsync(): Promise<string | null> {\n return null;\n },\n async getMobileCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getMobileNetworkCodeAsync(): Promise<string | null> {\n return null;\n },\n};\n"]}

View File

@@ -18,6 +18,7 @@ export default {
},
async getCellularGenerationAsync(): Promise<CellularGeneration> {
const connection =
// @ts-expect-error
navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;
if (connection !== null) {
switch (connection.effectiveType) {

View File

@@ -1,6 +1,6 @@
import { ExpoConfig } from 'expo/config';
import { ConfigPlugin } from 'expo/config-plugins';
export declare type IosProps = {
export type IosProps = {
/**
* Sets the `com.apple.developer.icloud-container-environment` entitlement which is read by EAS CLI to set
* the `iCloudContainerEnvironment` in the `xcodebuild` `exportOptionsPlist`.

View File

@@ -1,5 +1,5 @@
import { ConfigPlugin, InfoPlist } from '@expo/config-plugins';
declare type Props = {
type Props = {
photosPermission?: string | false;
cameraPermission?: string | false;
microphonePermission?: string | false;

View File

@@ -1,7 +1,7 @@
import { NavigationBarVisibility, NavigationBarBehavior, NavigationBarPosition, NavigationBarButtonStyle } from 'expo-navigation-bar';
import { ExpoConfig } from 'expo/config';
import { ConfigPlugin, AndroidConfig } from 'expo/config-plugins';
export declare type Props = {
export type Props = {
borderColor?: string;
backgroundColor?: string | null;
barStyle?: NavigationBarButtonStyle | null;

View File

@@ -1,5 +1,5 @@
import { ConfigPlugin } from 'expo/config-plugins';
export declare type NotificationsPluginProps = {
export type NotificationsPluginProps = {
/**
* Local path to an image to use as the icon for push notifications.
* 96x96 all-white png with transparency. We recommend following

View File

@@ -1,8 +1,8 @@
import { ExpoConfig } from 'expo/config';
import { AndroidConfig, ConfigPlugin } from 'expo/config-plugins';
import { NotificationsPluginProps } from './withNotifications';
declare type DPIString = 'mdpi' | 'hdpi' | 'xhdpi' | 'xxhdpi' | 'xxxhdpi';
declare type dpiMap = Record<DPIString, {
type DPIString = 'mdpi' | 'hdpi' | 'xhdpi' | 'xxhdpi' | 'xxxhdpi';
type dpiMap = Record<DPIString, {
folderName: string;
scale: number;
}>;

View File

@@ -11,7 +11,7 @@ declare const OrientationLock: {
LANDSCAPE_LEFT: string;
LANDSCAPE_RIGHT: string;
};
declare type OrientationMasks = keyof typeof OrientationLock;
type OrientationMasks = keyof typeof OrientationLock;
interface ExpoConfigWithInitialOrientation extends ExpoConfig {
initialOrientation?: OrientationMasks;
}

View File

@@ -146,39 +146,52 @@ module.exports = {
{ name: 'setBadgeCountAsync', argumentsCount: 1, key: 0 },
{ name: 'getBadgeCountAsync', argumentsCount: 0, key: 1 },
],
ExpoBarCodeScannerModule: [
{ name: 'getPermissionsAsync', argumentsCount: 0, key: 0 },
{ name: 'scanFromURLAsync', argumentsCount: 2, key: 1 },
{ name: 'requestPermissionsAsync', argumentsCount: 0, key: 2 },
ExpoBarCodeScanner: [
{ key: 'requestPermissionsAsync', name: 'requestPermissionsAsync', argumentsCount: 0 },
{ argumentsCount: 0, key: 'getPermissionsAsync', name: 'getPermissionsAsync' },
{ name: 'scanFromURLAsync', argumentsCount: 2, key: 'scanFromURLAsync' },
],
ExpoBarCodeScannerView: [],
ExpoBarometer: [
{ name: 'isAvailableAsync', argumentsCount: 0, key: 0 },
{ name: 'setUpdateInterval', argumentsCount: 1, key: 1 },
],
ExpoBattery: [
{ key: 'getBatteryLevelAsync', argumentsCount: 0, name: 'getBatteryLevelAsync' },
{ key: 'stopObserving', name: 'stopObserving', argumentsCount: 0 },
{
key: 'isLowPowerModeEnabledAsync',
argumentsCount: 0,
name: 'isLowPowerModeEnabledAsync',
key: 'isLowPowerModeEnabledAsync',
},
{ key: 'startObserving', name: 'startObserving', argumentsCount: 0 },
{ argumentsCount: 0, key: 'stopObserving', name: 'stopObserving' },
{ name: 'getBatteryStateAsync', key: 'getBatteryStateAsync', argumentsCount: 0 },
{ argumentsCount: 0, key: 'startObserving', name: 'startObserving' },
{ argumentsCount: 0, key: 'getBatteryLevelAsync', name: 'getBatteryLevelAsync' },
{ argumentsCount: 0, name: 'getBatteryStateAsync', key: 'getBatteryStateAsync' },
],
ExpoBlurViewManager: [{ name: 'setNativeProps', argumentsCount: 2, key: 0 }],
ExpoBlurView: [{ argumentsCount: 2, key: 'setNativeProps', name: 'setNativeProps' }],
ExpoBrightness: [
{ name: 'getPermissionsAsync', argumentsCount: 0, key: 0 },
{ name: 'getSystemBrightnessAsync', argumentsCount: 0, key: 1 },
{ name: 'setSystemBrightnessAsync', argumentsCount: 0, key: 2 },
{ name: 'useSystemBrightnessAsync', argumentsCount: 0, key: 3 },
{ name: 'isUsingSystemBrightnessAsync', argumentsCount: 0, key: 4 },
{ name: 'getSystemBrightnessModeAsync', argumentsCount: 0, key: 5 },
{ name: 'requestPermissionsAsync', argumentsCount: 0, key: 6 },
{ name: 'setBrightnessAsync', argumentsCount: 1, key: 7 },
{ name: 'getBrightnessAsync', argumentsCount: 0, key: 8 },
{ name: 'setSystemBrightnessModeAsync', argumentsCount: 0, key: 9 },
{
key: 'isUsingSystemBrightnessAsync',
name: 'isUsingSystemBrightnessAsync',
argumentsCount: 0,
},
{ name: 'startObserving', argumentsCount: 0, key: 'startObserving' },
{ key: 'useSystemBrightnessAsync', argumentsCount: 0, name: 'useSystemBrightnessAsync' },
{
argumentsCount: 0,
key: 'getSystemBrightnessModeAsync',
name: 'getSystemBrightnessModeAsync',
},
{
key: 'setSystemBrightnessModeAsync',
name: 'setSystemBrightnessModeAsync',
argumentsCount: 0,
},
{ argumentsCount: 0, key: 'setSystemBrightnessAsync', name: 'setSystemBrightnessAsync' },
{ name: 'getSystemBrightnessAsync', key: 'getSystemBrightnessAsync', argumentsCount: 0 },
{ name: 'setBrightnessAsync', argumentsCount: 1, key: 'setBrightnessAsync' },
{ name: 'getPermissionsAsync', argumentsCount: 0, key: 'getPermissionsAsync' },
{ name: 'requestPermissionsAsync', key: 'requestPermissionsAsync', argumentsCount: 0 },
{ name: 'stopObserving', argumentsCount: 0, key: 'stopObserving' },
{ key: 'getBrightnessAsync', argumentsCount: 0, name: 'getBrightnessAsync' },
],
ExpoCalendar: [
{ name: 'deleteCalendarAsync', argumentsCount: 1, key: 0 },
@@ -203,36 +216,36 @@ module.exports = {
],
ExpoCellular: [
{
key: 'getCellularGenerationAsync',
name: 'getCellularGenerationAsync',
argumentsCount: 0,
key: 'getCellularGenerationAsync',
},
{ key: 'getIsoCountryCodeAsync', name: 'getIsoCountryCodeAsync', argumentsCount: 0 },
{
name: 'getMobileCountryCodeAsync',
argumentsCount: 0,
key: 'getMobileCountryCodeAsync',
},
{
key: 'getMobileNetworkCodeAsync',
name: 'getMobileNetworkCodeAsync',
key: 'getMobileNetworkCodeAsync',
argumentsCount: 0,
},
{ argumentsCount: 0, key: 'getCarrierNameAsync', name: 'getCarrierNameAsync' },
{ key: 'getIsoCountryCodeAsync', argumentsCount: 0, name: 'getIsoCountryCodeAsync' },
{ name: 'allowsVoipAsync', argumentsCount: 0, key: 'allowsVoipAsync' },
{ name: 'getCarrierNameAsync', key: 'getCarrierNameAsync', argumentsCount: 0 },
],
ExpoClipboard: [
{ argumentsCount: 0, key: 'hasImageAsync', name: 'hasImageAsync' },
{ name: 'hasUrlAsync', argumentsCount: 0, key: 'hasUrlAsync' },
{ name: 'startObserving', key: 'startObserving', argumentsCount: 0 },
{ name: 'setStringAsync', argumentsCount: 2, key: 'setStringAsync' },
{ name: 'stopObserving', argumentsCount: 0, key: 'stopObserving' },
{ key: 'getUrlAsync', name: 'getUrlAsync', argumentsCount: 0 },
{ argumentsCount: 1, name: 'getStringAsync', key: 'getStringAsync' },
{ argumentsCount: 1, key: 'setImageAsync', name: 'setImageAsync' },
{ name: 'getImageAsync', key: 'getImageAsync', argumentsCount: 1 },
{ argumentsCount: 0, name: 'hasStringAsync', key: 'hasStringAsync' },
{ argumentsCount: 1, key: 'setUrlAsync', name: 'setUrlAsync' },
{ name: 'setStringAsync', key: 'setStringAsync', argumentsCount: 2 },
{ argumentsCount: 1, name: 'getImageAsync', key: 'getImageAsync' },
{ name: 'getUrlAsync', key: 'getUrlAsync', argumentsCount: 0 },
{ argumentsCount: 0, name: 'hasUrlAsync', key: 'hasUrlAsync' },
{ name: 'setImageAsync', argumentsCount: 1, key: 'setImageAsync' },
{ key: 'hasStringAsync', argumentsCount: 0, name: 'hasStringAsync' },
{ name: 'getStringAsync', argumentsCount: 1, key: 'getStringAsync' },
{ argumentsCount: 0, name: 'hasImageAsync', key: 'hasImageAsync' },
{ key: 'setUrlAsync', name: 'setUrlAsync', argumentsCount: 1 },
{ name: 'stopObserving', key: 'stopObserving', argumentsCount: 0 },
{ key: 'startObserving', argumentsCount: 0, name: 'startObserving' },
],
ExpoContacts: [
{ name: 'getDefaultContainerIdentifierAsync', argumentsCount: 0, key: 0 },
@@ -255,19 +268,25 @@ module.exports = {
{ name: 'dismissFormAsync', argumentsCount: 0, key: 17 },
],
ExpoCrypto: [
{ name: 'digestString', argumentsCount: 3, key: 'digestString' },
{ name: 'digestStringAsync', key: 'digestStringAsync', argumentsCount: 3 },
{ name: 'getRandomBase64String', key: 'getRandomBase64String', argumentsCount: 1 },
{
name: 'getRandomBase64StringAsync',
key: 'getRandomBase64StringAsync',
argumentsCount: 1,
key: 'getRandomBase64StringAsync',
},
{ argumentsCount: 3, key: 'digestString', name: 'digestString' },
{ argumentsCount: 1, key: 'getRandomBase64String', name: 'getRandomBase64String' },
{ argumentsCount: 1, key: 'getRandomValues', name: 'getRandomValues' },
{ name: 'randomUUID', argumentsCount: 0, key: 'randomUUID' },
{ key: 'digestStringAsync', name: 'digestStringAsync', argumentsCount: 3 },
],
ExpoDevice: [
{ name: 'getDeviceTypeAsync', argumentsCount: 0, key: 0 },
{ name: 'isRootedExperimentalAsync', argumentsCount: 0, key: 1 },
{ name: 'getUptimeAsync', argumentsCount: 0, key: 2 },
{
key: 'isRootedExperimentalAsync',
argumentsCount: 0,
name: 'isRootedExperimentalAsync',
},
{ key: 'getDeviceTypeAsync', name: 'getDeviceTypeAsync', argumentsCount: 0 },
{ argumentsCount: 0, key: 'getUptimeAsync', name: 'getUptimeAsync' },
],
ExpoDocumentPicker: [{ name: 'getDocumentAsync', argumentsCount: 1, key: 0 }],
ExpoErrorRecovery: [{ name: 'saveRecoveryProps', argumentsCount: 1, key: 0 }],
@@ -283,30 +302,34 @@ module.exports = {
ExpoFirebaseCore: [],
ExpoFontLoader: [{ name: 'loadAsync', argumentsCount: 2, key: 0 }],
ExpoHaptics: [
{ name: 'selectionAsync', key: 'selectionAsync', argumentsCount: 0 },
{ key: 'notificationAsync', name: 'notificationAsync', argumentsCount: 1 },
{ name: 'selectionAsync', argumentsCount: 0, key: 'selectionAsync' },
{ argumentsCount: 1, key: 'notificationAsync', name: 'notificationAsync' },
{ name: 'impactAsync', argumentsCount: 1, key: 'impactAsync' },
],
ExpoImageManipulator: [
{ key: 'manipulateAsync', name: 'manipulateAsync', argumentsCount: 3 },
{ name: 'manipulateAsync', argumentsCount: 3, key: 'manipulateAsync' },
],
ExpoKeepAwake: [
{ argumentsCount: 1, name: 'deactivate', key: 'deactivate' },
{ argumentsCount: 0, name: 'isActivated', key: 'isActivated' },
{ argumentsCount: 1, name: 'activate', key: 'activate' },
{ name: 'activate', argumentsCount: 1, key: 'activate' },
{ name: 'deactivate', argumentsCount: 1, key: 'deactivate' },
{ name: 'isActivated', argumentsCount: 0, key: 'isActivated' },
],
ExpoLinearGradient: [],
ExpoLocalAuthentication: [
{ name: 'supportedAuthenticationTypesAsync', argumentsCount: 0, key: 0 },
{ name: 'isEnrolledAsync', argumentsCount: 0, key: 1 },
{ name: 'getEnrolledLevelAsync', argumentsCount: 0, key: 2 },
{ name: 'hasHardwareAsync', argumentsCount: 0, key: 3 },
{ name: 'authenticateAsync', argumentsCount: 1, key: 4 },
{
argumentsCount: 0,
key: 'supportedAuthenticationTypesAsync',
name: 'supportedAuthenticationTypesAsync',
},
{ argumentsCount: 0, key: 'getEnrolledLevelAsync', name: 'getEnrolledLevelAsync' },
{ key: 'isEnrolledAsync', name: 'isEnrolledAsync', argumentsCount: 0 },
{ name: 'hasHardwareAsync', key: 'hasHardwareAsync', argumentsCount: 0 },
{ key: 'authenticateAsync', argumentsCount: 1, name: 'authenticateAsync' },
],
ExpoLocalization: [
{ name: 'getLocalizationAsync', argumentsCount: 0, key: 'getLocalizationAsync' },
{ name: 'getCalendars', argumentsCount: 0, key: 'getCalendars' },
{ name: 'getLocales', argumentsCount: 0, key: 'getLocales' },
{ key: 'getCalendars', name: 'getCalendars', argumentsCount: 0 },
{ key: 'getLocalizationAsync', argumentsCount: 0, name: 'getLocalizationAsync' },
],
ExpoLocation: [
{ name: 'watchPositionImplAsync', argumentsCount: 2, key: 0 },
@@ -332,12 +355,29 @@ module.exports = {
{ name: 'requestBackgroundPermissionsAsync', argumentsCount: 0, key: 20 },
],
ExpoMailComposer: [
{ argumentsCount: 1, key: 'composeAsync', name: 'composeAsync' },
{ key: 'isAvailableAsync', argumentsCount: 0, name: 'isAvailableAsync' },
{ argumentsCount: 0, name: 'isAvailableAsync', key: 'isAvailableAsync' },
{ argumentsCount: 1, name: 'composeAsync', key: 'composeAsync' },
],
ExpoMediaLibrary: [
{ name: 'createAssetAsync', argumentsCount: 1, key: 0 },
{ name: 'deleteAssetsAsync', argumentsCount: 1, key: 1 },
{ name: 'getPermissionsAsync', argumentsCount: 1, key: 2 },
{ name: 'removeAssetsFromAlbumAsync', argumentsCount: 2, key: 3 },
{ name: 'saveToLibraryAsync', argumentsCount: 1, key: 4 },
{ name: 'requestPermissionsAsync', argumentsCount: 1, key: 5 },
{ name: 'getAlbumsAsync', argumentsCount: 1, key: 6 },
{ name: 'getAssetsAsync', argumentsCount: 1, key: 7 },
{ name: 'createAlbumAsync', argumentsCount: 2, key: 8 },
{ name: 'deleteAlbumsAsync', argumentsCount: 2, key: 9 },
{ name: 'getMomentsAsync', argumentsCount: 0, key: 10 },
{ name: 'presentPermissionsPickerAsync', argumentsCount: 0, key: 11 },
{ name: 'addAssetsToAlbumAsync', argumentsCount: 2, key: 12 },
{ name: 'getAssetInfoAsync', argumentsCount: 2, key: 13 },
{ name: 'getAlbumAsync', argumentsCount: 1, key: 14 },
],
ExpoNetwork: [
{ name: 'getIpAddressAsync', argumentsCount: 0, key: 0 },
{ name: 'getNetworkStateAsync', argumentsCount: 0, key: 1 },
{ argumentsCount: 0, name: 'getNetworkStateAsync', key: 'getNetworkStateAsync' },
{ key: 'getIpAddressAsync', name: 'getIpAddressAsync', argumentsCount: 0 },
],
ExpoNotificationCategoriesModule: [
{ name: 'deleteNotificationCategoryAsync', argumentsCount: 1, key: 0 },
@@ -376,7 +416,7 @@ module.exports = {
{ name: 'unregisterForNotificationsAsync', argumentsCount: 0, key: 1 },
],
ExpoRandom: [
{ name: 'getRandomBase64String', argumentsCount: 1, key: 'getRandomBase64String' },
{ argumentsCount: 1, name: 'getRandomBase64String', key: 'getRandomBase64String' },
{
name: 'getRandomBase64StringAsync',
key: 'getRandomBase64StringAsync',
@@ -384,8 +424,8 @@ module.exports = {
},
],
ExpoSMS: [
{ name: 'isAvailableAsync', argumentsCount: 0, key: 0 },
{ name: 'sendSMSAsync', argumentsCount: 3, key: 1 },
{ name: 'sendSMSAsync', key: 'sendSMSAsync', argumentsCount: 3 },
{ argumentsCount: 0, name: 'isAvailableAsync', key: 'isAvailableAsync' },
],
ExpoScreenCapture: [
{ name: 'preventScreenCapture', argumentsCount: 0, key: 0 },
@@ -410,12 +450,12 @@ module.exports = {
{ name: 'preventAutoHideAsync', argumentsCount: 0, key: 1 },
],
ExpoStoreReview: [
{ name: 'requestReview', key: 'requestReview', argumentsCount: 0 },
{ name: 'isAvailableAsync', key: 'isAvailableAsync', argumentsCount: 0 },
{ argumentsCount: 0, name: 'requestReview', key: 'requestReview' },
{ key: 'isAvailableAsync', name: 'isAvailableAsync', argumentsCount: 0 },
],
ExpoSystemUI: [
{ argumentsCount: 0, key: 'getBackgroundColorAsync', name: 'getBackgroundColorAsync' },
{ argumentsCount: 1, name: 'setBackgroundColorAsync', key: 'setBackgroundColorAsync' },
{ name: 'setBackgroundColorAsync', key: 'setBackgroundColorAsync', argumentsCount: 1 },
{ name: 'getBackgroundColorAsync', key: 'getBackgroundColorAsync', argumentsCount: 0 },
],
ExpoTaskManager: [
{ name: 'isAvailableAsync', argumentsCount: 0, key: 0 },
@@ -427,8 +467,8 @@ module.exports = {
{ name: 'getRegisteredTasksAsync', argumentsCount: 0, key: 6 },
],
ExpoTrackingTransparency: [
{ argumentsCount: 0, key: 'getPermissionsAsync', name: 'getPermissionsAsync' },
{ argumentsCount: 0, key: 'requestPermissionsAsync', name: 'requestPermissionsAsync' },
{ name: 'requestPermissionsAsync', key: 'requestPermissionsAsync', argumentsCount: 0 },
{ name: 'getPermissionsAsync', key: 'getPermissionsAsync', argumentsCount: 0 },
],
ExpoUpdates: [
{ name: 'readLogEntriesAsync', argumentsCount: 1, key: 0 },
@@ -437,21 +477,21 @@ module.exports = {
{ name: 'clearLogEntriesAsync', argumentsCount: 0, key: 3 },
{ name: 'reload', argumentsCount: 0, key: 4 },
],
ExpoVideoThumbnails: [{ name: 'getThumbnail', argumentsCount: 2, key: 0 }],
ExpoVideoThumbnails: [{ key: 'getThumbnail', name: 'getThumbnail', argumentsCount: 2 }],
ExpoVideoView: [{ name: 'setFullscreen', key: 'setFullscreen', argumentsCount: 2 }],
ExpoWebBrowser: [
{ name: 'openAuthSessionAsync', key: 'openAuthSessionAsync', argumentsCount: 3 },
{ key: 'warmUpAsync', name: 'warmUpAsync', argumentsCount: 0 },
{ argumentsCount: 0, name: 'dismissBrowser', key: 'dismissBrowser' },
{ argumentsCount: 0, key: 'mayInitWithUrlAsync', name: 'mayInitWithUrlAsync' },
{
argumentsCount: 0,
name: 'getCustomTabsSupportingBrowsers',
argumentsCount: 0,
key: 'getCustomTabsSupportingBrowsers',
},
{ name: 'openBrowserAsync', argumentsCount: 2, key: 'openBrowserAsync' },
{ key: 'dismissBrowser', name: 'dismissBrowser', argumentsCount: 0 },
{ key: 'warmUpAsync', argumentsCount: 0, name: 'warmUpAsync' },
{ argumentsCount: 3, name: 'openAuthSessionAsync', key: 'openAuthSessionAsync' },
{ key: 'coolDownAsync', argumentsCount: 0, name: 'coolDownAsync' },
{ argumentsCount: 0, key: 'dismissAuthSession', name: 'dismissAuthSession' },
{ name: 'dismissAuthSession', argumentsCount: 0, key: 'dismissAuthSession' },
{ name: 'coolDownAsync', key: 'coolDownAsync', argumentsCount: 0 },
],
ExponentAV: [
{ name: 'getStatusForVideo', argumentsCount: 1, key: 0 },
@@ -483,41 +523,43 @@ module.exports = {
{ name: 'setUpdateInterval', argumentsCount: 1, key: 1 },
],
ExponentCamera: [
{ name: 'requestPermissionsAsync', argumentsCount: 0, key: 'requestPermissionsAsync' },
{
name: 'requestCameraPermissionsAsync',
argumentsCount: 0,
key: 'requestCameraPermissionsAsync',
},
{ key: 'getPermissionsAsync', argumentsCount: 0, name: 'getPermissionsAsync' },
{
key: 'requestMicrophonePermissionsAsync',
argumentsCount: 0,
name: 'requestMicrophonePermissionsAsync',
},
{ argumentsCount: 1, name: 'stopRecording', key: 'stopRecording' },
{
key: 'getAvailableVideoCodecsAsync',
argumentsCount: 0,
name: 'getAvailableVideoCodecsAsync',
},
{ key: 'resumePreview', argumentsCount: 1, name: 'resumePreview' },
{ argumentsCount: 2, key: 'takePicture', name: 'takePicture' },
{ key: 'getAvailablePictureSizes', name: 'getAvailablePictureSizes', argumentsCount: 2 },
{ name: 'pausePreview', key: 'pausePreview', argumentsCount: 1 },
{
name: 'getCameraPermissionsAsync',
argumentsCount: 0,
key: 'getCameraPermissionsAsync',
},
{
name: 'getAvailableVideoCodecsAsync',
argumentsCount: 0,
key: 'getAvailableVideoCodecsAsync',
},
{
key: 'getMicrophonePermissionsAsync',
name: 'getMicrophonePermissionsAsync',
argumentsCount: 0,
key: 'getMicrophonePermissionsAsync',
},
{ argumentsCount: 1, key: 'pausePreview', name: 'pausePreview' },
{ name: 'requestPermissionsAsync', argumentsCount: 0, key: 'requestPermissionsAsync' },
{ key: 'resumePreview', name: 'resumePreview', argumentsCount: 1 },
{
key: 'requestMicrophonePermissionsAsync',
name: 'requestMicrophonePermissionsAsync',
argumentsCount: 0,
},
{ key: 'getAvailablePictureSizes', name: 'getAvailablePictureSizes', argumentsCount: 2 },
{ key: 'getPermissionsAsync', name: 'getPermissionsAsync', argumentsCount: 0 },
{ name: 'takePicture', key: 'takePicture', argumentsCount: 2 },
{ name: 'record', argumentsCount: 2, key: 'record' },
{
name: 'requestCameraPermissionsAsync',
argumentsCount: 0,
key: 'requestCameraPermissionsAsync',
},
{ argumentsCount: 2, key: 'record', name: 'record' },
],
ExponentConstants: [
{ name: 'getWebViewUserAgentAsync', key: 'getWebViewUserAgentAsync', argumentsCount: 0 },
],
ExponentConstants: [{ name: 'getWebViewUserAgentAsync', argumentsCount: 0, key: 0 }],
ExponentDeviceMotion: [
{ name: 'isAvailableAsync', argumentsCount: 0, key: 0 },
{ name: 'setUpdateInterval', argumentsCount: 1, key: 1 },
@@ -547,34 +589,34 @@ module.exports = {
{ name: 'createCameraTextureAsync', argumentsCount: 2, key: 3 },
{ name: 'takeSnapshotAsync', argumentsCount: 2, key: 4 },
],
ExponentGLViewManager: [],
ExponentGLView: [],
ExponentGyroscope: [
{ name: 'isAvailableAsync', argumentsCount: 0, key: 0 },
{ name: 'setUpdateInterval', argumentsCount: 1, key: 1 },
],
ExponentImagePicker: [
{
argumentsCount: 1,
key: 'requestMediaLibraryPermissionsAsync',
name: 'requestMediaLibraryPermissionsAsync',
},
{
argumentsCount: 0,
key: 'getCameraPermissionsAsync',
name: 'getCameraPermissionsAsync',
argumentsCount: 0,
},
{
argumentsCount: 0,
name: 'requestCameraPermissionsAsync',
key: 'requestCameraPermissionsAsync',
},
{ name: 'launchCameraAsync', argumentsCount: 1, key: 'launchCameraAsync' },
{ name: 'launchImageLibraryAsync', argumentsCount: 1, key: 'launchImageLibraryAsync' },
{
name: 'getMediaLibraryPermissionsAsync',
argumentsCount: 1,
key: 'getMediaLibraryPermissionsAsync',
},
{
name: 'requestCameraPermissionsAsync',
argumentsCount: 0,
key: 'requestCameraPermissionsAsync',
},
{ argumentsCount: 1, name: 'launchCameraAsync', key: 'launchCameraAsync' },
{
name: 'requestMediaLibraryPermissionsAsync',
key: 'requestMediaLibraryPermissionsAsync',
argumentsCount: 1,
},
],
ExponentMagnetometer: [
{ name: 'isAvailableAsync', argumentsCount: 0, key: 0 },
@@ -584,23 +626,6 @@ module.exports = {
{ name: 'isAvailableAsync', argumentsCount: 0, key: 0 },
{ name: 'setUpdateInterval', argumentsCount: 1, key: 1 },
],
ExpoMediaLibrary: [
{ name: 'createAssetAsync', argumentsCount: 1, key: 0 },
{ name: 'deleteAssetsAsync', argumentsCount: 1, key: 1 },
{ name: 'getPermissionsAsync', argumentsCount: 1, key: 2 },
{ name: 'removeAssetsFromAlbumAsync', argumentsCount: 2, key: 3 },
{ name: 'saveToLibraryAsync', argumentsCount: 1, key: 4 },
{ name: 'requestPermissionsAsync', argumentsCount: 1, key: 5 },
{ name: 'getAlbumsAsync', argumentsCount: 1, key: 6 },
{ name: 'getAssetsAsync', argumentsCount: 1, key: 7 },
{ name: 'createAlbumAsync', argumentsCount: 2, key: 8 },
{ name: 'deleteAlbumsAsync', argumentsCount: 2, key: 9 },
{ name: 'getMomentsAsync', argumentsCount: 0, key: 10 },
{ name: 'presentPermissionsPickerAsync', argumentsCount: 0, key: 11 },
{ name: 'addAssetsToAlbumAsync', argumentsCount: 2, key: 12 },
{ name: 'getAssetInfoAsync', argumentsCount: 2, key: 13 },
{ name: 'getAlbumAsync', argumentsCount: 1, key: 14 },
],
ExponentPedometer: [
{ name: 'requestPermissionsAsync', argumentsCount: 0, key: 0 },
{ name: 'getPermissionsAsync', argumentsCount: 0, key: 1 },
@@ -625,7 +650,7 @@ module.exports = {
{ name: 'isSpeaking', argumentsCount: 0, key: 4 },
{ name: 'getVoices', argumentsCount: 0, key: 5 },
],
NativeModulesProxy: [{ key: 'callMethod', name: 'callMethod', argumentsCount: 3 }],
NativeModulesProxy: [{ name: 'callMethod', argumentsCount: 3, key: 'callMethod' }],
NotificationsServerRegistrationModule: [
{ name: 'getRegistrationInfoAsync', argumentsCount: 0, key: 0 },
{ name: 'setRegistrationInfoAsync', argumentsCount: 1, key: 1 },
@@ -637,30 +662,113 @@ module.exports = {
modulesConstants: {
type: 'mock',
mockDefinition: {
EASClient: { clientID: { type: 'string' } },
EASClient: {
addListener: { type: 'function' },
clientID: { type: 'string' },
removeListeners: { type: 'function' },
},
ExpoApplication: {
addListener: { type: 'function' },
applicationId: { type: 'string' },
applicationName: { type: 'string' },
getApplicationReleaseTypeAsync: { type: 'function' },
getInstallationTimeAsync: { type: 'function' },
getIosIdForVendorAsync: { type: 'function' },
getPushNotificationServiceEnvironmentAsync: { type: 'function' },
nativeApplicationVersion: { type: 'string' },
nativeBuildVersion: { type: 'string' },
removeListeners: { type: 'function' },
},
ExpoBarCodeScanner: {
BarCodeType: { type: 'object' },
Type: { type: 'object' },
addListener: { type: 'function' },
getPermissionsAsync: { type: 'function' },
removeListeners: { type: 'function' },
requestPermissionsAsync: { type: 'function' },
scanFromURLAsync: { type: 'function' },
},
ExpoBattery: {
addListener: { type: 'function' },
getBatteryLevelAsync: { type: 'function' },
getBatteryStateAsync: { type: 'function' },
isLowPowerModeEnabledAsync: { type: 'function' },
isSupported: { type: 'boolean', mock: false },
removeListeners: { type: 'function' },
startObserving: { type: 'function' },
stopObserving: { type: 'function' },
},
ExpoBlurView: {
addListener: { type: 'function' },
removeListeners: { type: 'function' },
setNativeProps: { type: 'function' },
},
ExpoBrightness: {
addListener: { type: 'function' },
getBrightnessAsync: { type: 'function' },
getPermissionsAsync: { type: 'function' },
getSystemBrightnessAsync: { type: 'function' },
getSystemBrightnessModeAsync: { type: 'function' },
isUsingSystemBrightnessAsync: { type: 'function' },
removeListeners: { type: 'function' },
requestPermissionsAsync: { type: 'function' },
setBrightnessAsync: { type: 'function' },
setSystemBrightnessAsync: { type: 'function' },
setSystemBrightnessModeAsync: { type: 'function' },
startObserving: { type: 'function' },
stopObserving: { type: 'function' },
useSystemBrightnessAsync: { type: 'function' },
},
ExpoBarCodeScannerModule: { BarCodeType: { type: 'object' }, Type: { type: 'object' } },
ExpoBattery: { isSupported: { type: 'boolean', mock: true } },
ExpoCellular: {
allowsVoip: { type: 'boolean', mock: true },
carrier: { type: 'string' },
addListener: { type: 'function' },
allowsVoip: { type: 'object', mock: null },
allowsVoipAsync: { type: 'function' },
carrier: { type: 'object', mock: null },
generation: { type: 'number', mock: 0 },
getCarrierNameAsync: { type: 'function' },
getCellularGenerationAsync: { type: 'function' },
getIsoCountryCodeAsync: { type: 'function' },
getMobileCountryCodeAsync: { type: 'function' },
getMobileNetworkCodeAsync: { type: 'function' },
isoCountryCode: { type: 'object', mock: null },
mobileCountryCode: { type: 'object', mock: null },
mobileNetworkCode: { type: 'object', mock: null },
removeListeners: { type: 'function' },
},
ExpoClipboard: {
addListener: { type: 'function' },
getImageAsync: { type: 'function' },
getStringAsync: { type: 'function' },
getUrlAsync: { type: 'function' },
hasImageAsync: { type: 'function' },
hasStringAsync: { type: 'function' },
hasUrlAsync: { type: 'function' },
removeListeners: { type: 'function' },
setImageAsync: { type: 'function' },
setStringAsync: { type: 'function' },
setUrlAsync: { type: 'function' },
startObserving: { type: 'function' },
stopObserving: { type: 'function' },
},
ExpoCrypto: {
addListener: { type: 'function' },
digestString: { type: 'function' },
digestStringAsync: { type: 'function' },
getRandomBase64String: { type: 'function' },
getRandomBase64StringAsync: { type: 'function' },
getRandomValues: { type: 'function' },
randomUUID: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoClipboard: {},
ExpoCrypto: {},
ExpoDevice: {
addListener: { type: 'function' },
brand: { type: 'string' },
deviceName: { type: 'string' },
deviceYearClass: { type: 'number', mock: 2021 },
isDevice: { type: 'boolean', mock: true },
deviceYearClass: { type: 'number', mock: 2022 },
getDeviceTypeAsync: { type: 'function' },
getUptimeAsync: { type: 'function' },
isDevice: { type: 'boolean', mock: false },
isRootedExperimentalAsync: { type: 'function' },
manufacturer: { type: 'string' },
modelId: { type: 'string' },
modelName: { type: 'string' },
@@ -668,34 +776,124 @@ module.exports = {
osInternalBuildId: { type: 'string' },
osName: { type: 'string' },
osVersion: { type: 'string' },
removeListeners: { type: 'function' },
supportedCpuArchitectures: { type: 'array' },
totalMemory: { type: 'number', mock: 3824369664 },
totalMemory: { type: 'number', mock: 8589934592 },
},
ExpoErrorRecovery: {
addListener: { type: 'function' },
recoveredProps: { type: 'object', mock: null },
removeListeners: { type: 'function' },
saveRecoveryProps: { type: 'function' },
},
ExpoErrorRecovery: { recoveredProps: { type: 'object', mock: null } },
ExpoFaceDetector: {
Classifications: { type: 'object' },
Landmarks: { type: 'object' },
Mode: { type: 'object' },
addListener: { type: 'function' },
detectFaces: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoFirebaseCore: {
DEFAULT_APP_NAME: { type: 'string' },
addListener: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoHaptics: {
addListener: { type: 'function' },
impactAsync: { type: 'function' },
notificationAsync: { type: 'function' },
removeListeners: { type: 'function' },
selectionAsync: { type: 'function' },
},
ExpoImageManipulator: {
addListener: { type: 'function' },
manipulateAsync: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoKeepAwake: {
activate: { type: 'function' },
addListener: { type: 'function' },
deactivate: { type: 'function' },
isActivated: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoLinearGradient: {
addListener: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoLocalAuthentication: {
addListener: { type: 'function' },
authenticateAsync: { type: 'function' },
getEnrolledLevelAsync: { type: 'function' },
hasHardwareAsync: { type: 'function' },
isEnrolledAsync: { type: 'function' },
removeListeners: { type: 'function' },
supportedAuthenticationTypesAsync: { type: 'function' },
},
ExpoFirebaseCore: { DEFAULT_APP_NAME: { type: 'string' } },
ExpoHaptics: {},
ExpoImageManipulator: {},
ExpoKeepAwake: {},
ExpoLinearGradient: {},
ExpoLocalization: {
addListener: { type: 'function' },
currency: { type: 'string' },
decimalSeparator: { type: 'string' },
digitGroupingSeparator: { type: 'string' },
isMetric: { type: 'boolean', mock: true },
getCalendars: { type: 'function' },
getLocales: { type: 'function' },
getLocalizationAsync: { type: 'function' },
isMetric: { type: 'boolean', mock: false },
isRTL: { type: 'boolean', mock: false },
isoCurrencyCodes: { type: 'array' },
locale: { type: 'string' },
locales: { type: 'array' },
region: { type: 'string' },
removeListeners: { type: 'function' },
timezone: { type: 'string' },
},
ExpoMailComposer: {},
ExpoRandom: {},
ExpoMailComposer: {
addListener: { type: 'function' },
composeAsync: { type: 'function' },
isAvailableAsync: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoMediaLibrary: {
CHANGE_LISTENER_NAME: { type: 'string' },
MediaType: { type: 'object' },
SortBy: { type: 'object' },
addAssetsToAlbumAsync: { type: 'function' },
addListener: { type: 'function' },
createAlbumAsync: { type: 'function' },
createAssetAsync: { type: 'function' },
deleteAlbumsAsync: { type: 'function' },
deleteAssetsAsync: { type: 'function' },
getAlbumAsync: { type: 'function' },
getAlbumsAsync: { type: 'function' },
getAssetInfoAsync: { type: 'function' },
getAssetsAsync: { type: 'function' },
getMomentsAsync: { type: 'function' },
getPermissionsAsync: { type: 'function' },
presentPermissionsPickerAsync: { type: 'function' },
removeAssetsFromAlbumAsync: { type: 'function' },
removeListeners: { type: 'function' },
requestPermissionsAsync: { type: 'function' },
saveToLibraryAsync: { type: 'function' },
},
ExpoNetwork: {
addListener: { type: 'function' },
getIpAddressAsync: { type: 'function' },
getNetworkStateAsync: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoRandom: {
addListener: { type: 'function' },
getRandomBase64String: { type: 'function' },
getRandomBase64StringAsync: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoSMS: {
addListener: { type: 'function' },
isAvailableAsync: { type: 'function' },
removeListeners: { type: 'function' },
sendSMSAsync: { type: 'function' },
},
ExpoSecureStore: {
AFTER_FIRST_UNLOCK: { type: 'number', mock: 0 },
AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY: { type: 'number', mock: 1 },
@@ -704,26 +902,111 @@ module.exports = {
WHEN_PASSCODE_SET_THIS_DEVICE_ONLY: { type: 'number', mock: 3 },
WHEN_UNLOCKED: { type: 'number', mock: 5 },
WHEN_UNLOCKED_THIS_DEVICE_ONLY: { type: 'number', mock: 6 },
addListener: { type: 'function' },
deleteValueWithKeyAsync: { type: 'function' },
getValueWithKeyAsync: { type: 'function' },
removeListeners: { type: 'function' },
setValueWithKeyAsync: { type: 'function' },
},
ExpoStoreReview: {
addListener: { type: 'function' },
isAvailableAsync: { type: 'function' },
removeListeners: { type: 'function' },
requestReview: { type: 'function' },
},
ExpoSystemUI: {
addListener: { type: 'function' },
getBackgroundColorAsync: { type: 'function' },
removeListeners: { type: 'function' },
setBackgroundColorAsync: { type: 'function' },
},
ExpoTaskManager: {
EVENT_NAME: { type: 'string' },
addListener: { type: 'function' },
getRegisteredTasksAsync: { type: 'function' },
getTaskOptionsAsync: { type: 'function' },
isAvailableAsync: { type: 'function' },
isTaskRegisteredAsync: { type: 'function' },
notifyTaskFinishedAsync: { type: 'function' },
removeListeners: { type: 'function' },
unregisterAllTasksAsync: { type: 'function' },
unregisterTaskAsync: { type: 'function' },
},
ExpoTrackingTransparency: {
addListener: { type: 'function' },
getPermissionsAsync: { type: 'function' },
removeListeners: { type: 'function' },
requestPermissionsAsync: { type: 'function' },
},
ExpoStoreReview: {},
ExpoSystemUI: {},
ExpoTaskManager: { EVENT_NAME: { type: 'string' } },
ExpoTrackingTransparency: {},
ExpoUpdates: {
addListener: { type: 'function' },
channel: { type: 'string' },
checkForUpdateAsync: { type: 'function' },
clearLogEntriesAsync: { type: 'function' },
fetchUpdateAsync: { type: 'function' },
isEmbeddedLaunch: { type: 'boolean', mock: false },
isEnabled: { type: 'boolean', mock: false },
isMissingRuntimeVersion: { type: 'boolean', mock: false },
readLogEntriesAsync: { type: 'function' },
releaseChannel: { type: 'string' },
reload: { type: 'function' },
removeListeners: { type: 'function' },
runtimeVersion: { type: 'string' },
},
ExpoVideoThumbnails: {
addListener: { type: 'function' },
getThumbnail: { type: 'function' },
removeListeners: { type: 'function' },
},
ExpoVideoView: {
ScaleAspectFill: { type: 'string' },
ScaleAspectFit: { type: 'string' },
ScaleNone: { type: 'string' },
ScaleToFill: { type: 'string' },
addListener: { type: 'function' },
removeListeners: { type: 'function' },
setFullscreen: { type: 'function' },
},
ExpoWebBrowser: {
addListener: { type: 'function' },
coolDownAsync: { type: 'function' },
dismissAuthSession: { type: 'function' },
dismissBrowser: { type: 'function' },
getCustomTabsSupportingBrowsers: { type: 'function' },
mayInitWithUrlAsync: { type: 'function' },
openAuthSessionAsync: { type: 'function' },
openBrowserAsync: { type: 'function' },
removeListeners: { type: 'function' },
warmUpAsync: { type: 'function' },
},
ExponentAV: {
Qualities: { type: 'object' },
addListener: { type: 'function' },
getAudioRecordingStatus: { type: 'function' },
getAvailableInputs: { type: 'function' },
getCurrentInput: { type: 'function' },
getPermissionsAsync: { type: 'function' },
getStatusForSound: { type: 'function' },
getStatusForVideo: { type: 'function' },
loadForSound: { type: 'function' },
loadForVideo: { type: 'function' },
pauseAudioRecording: { type: 'function' },
prepareAudioRecorder: { type: 'function' },
removeListeners: { type: 'function' },
replaySound: { type: 'function' },
replayVideo: { type: 'function' },
requestPermissionsAsync: { type: 'function' },
setAudioIsEnabled: { type: 'function' },
setAudioMode: { type: 'function' },
setInput: { type: 'function' },
setStatusForSound: { type: 'function' },
setStatusForVideo: { type: 'function' },
startAudioRecording: { type: 'function' },
stopAudioRecording: { type: 'function' },
unloadAudioRecorder: { type: 'function' },
unloadForSound: { type: 'function' },
unloadForVideo: { type: 'function' },
},
ExpoWebBrowser: {},
ExponentAV: { Qualities: { type: 'object' } },
ExponentCamera: {
AutoFocus: { type: 'object' },
FlashMode: { type: 'object' },
@@ -732,8 +1015,24 @@ module.exports = {
VideoQuality: { type: 'object' },
VideoStabilization: { type: 'object' },
WhiteBalance: { type: 'object' },
addListener: { type: 'function' },
getAvailablePictureSizes: { type: 'function' },
getAvailableVideoCodecsAsync: { type: 'function' },
getCameraPermissionsAsync: { type: 'function' },
getMicrophonePermissionsAsync: { type: 'function' },
getPermissionsAsync: { type: 'function' },
pausePreview: { type: 'function' },
record: { type: 'function' },
removeListeners: { type: 'function' },
requestCameraPermissionsAsync: { type: 'function' },
requestMicrophonePermissionsAsync: { type: 'function' },
requestPermissionsAsync: { type: 'function' },
resumePreview: { type: 'function' },
stopRecording: { type: 'function' },
takePicture: { type: 'function' },
},
ExponentConstants: {
addListener: { type: 'function' },
appOwnership: { type: 'string' },
debugMode: { type: 'boolean', mock: true },
deviceName: { type: 'string' },
@@ -742,50 +1041,91 @@ module.exports = {
experienceUrl: { type: 'string' },
expoRuntimeVersion: { type: 'string' },
expoVersion: { type: 'string' },
getWebViewUserAgentAsync: { type: 'function' },
installationId: { type: 'string' },
isDetached: { type: 'boolean', mock: false },
isDevice: { type: 'boolean', mock: true },
isDevice: { type: 'boolean', mock: false },
isHeadless: { type: 'boolean', mock: false },
linkingUri: { type: 'string' },
manifest: { type: 'object' },
nativeAppVersion: { type: 'string' },
nativeBuildVersion: { type: 'string' },
platform: { type: 'object' },
removeListeners: { type: 'function' },
sessionId: { type: 'string' },
statusBarHeight: { type: 'number', mock: 20 },
statusBarHeight: { type: 'number', mock: 54 },
supportedExpoSdks: { type: 'array' },
systemFonts: { type: 'array' },
},
ExponentDeviceMotion: { Gravity: { type: 'number', mock: 9.8100004196167 } },
ExponentDeviceMotion: {
Gravity: { type: 'number', mock: 9.8100004196167 },
addListener: { type: 'function' },
isAvailableAsync: { type: 'function' },
removeListeners: { type: 'function' },
setUpdateInterval: { type: 'function' },
},
ExponentFileSystem: {
addListener: { type: 'function' },
bundleDirectory: { type: 'object', mock: null },
bundledAssets: { type: 'object', mock: null },
cacheDirectory: { type: 'string' },
copyAsync: { type: 'function' },
deleteAsync: { type: 'function' },
documentDirectory: { type: 'string' },
downloadAsync: { type: 'function' },
downloadResumablePauseAsync: { type: 'function' },
downloadResumableStartAsync: { type: 'function' },
getFreeDiskStorageAsync: { type: 'function' },
getInfoAsync: { type: 'function' },
getTotalDiskCapacityAsync: { type: 'function' },
makeDirectoryAsync: { type: 'function' },
moveAsync: { type: 'function' },
networkTaskCancelAsync: { type: 'function' },
readAsStringAsync: { type: 'function' },
readDirectoryAsync: { type: 'function' },
removeListeners: { type: 'function' },
uploadAsync: { type: 'function' },
uploadTaskStartAsync: { type: 'function' },
writeAsStringAsync: { type: 'function' },
},
ExponentImagePicker: {},
ExpoMediaLibrary: {
CHANGE_LISTENER_NAME: { type: 'string' },
MediaType: { type: 'object' },
SortBy: { type: 'object' },
ExponentGLView: {
addListener: { type: 'function' },
removeListeners: { type: 'function' },
},
ExponentImagePicker: {
addListener: { type: 'function' },
getCameraPermissionsAsync: { type: 'function' },
getMediaLibraryPermissionsAsync: { type: 'function' },
launchCameraAsync: { type: 'function' },
launchImageLibraryAsync: { type: 'function' },
removeListeners: { type: 'function' },
requestCameraPermissionsAsync: { type: 'function' },
requestMediaLibraryPermissionsAsync: { type: 'function' },
},
ExponentPrint: {
Orientation: { type: 'object' },
addListener: { type: 'function' },
print: { type: 'function' },
printToFileAsync: { type: 'function' },
removeListeners: { type: 'function' },
selectPrinter: { type: 'function' },
},
ExponentPrint: { Orientation: { type: 'object' } },
},
},
viewManagersMetadata: {
type: 'object',
mock: {
ExpoBarCodeScannerView: { propsNames: ['type', 'barCodeTypes'] },
ExpoBlurView: { propsNames: ['tint', 'intensity'] },
ExpoBarCodeScanner: { propsNames: ['type', 'barCodeTypes'] },
ExpoAppleAuthenticationButtonContinueWhite: { propsNames: ['cornerRadius'] },
ExpoBlurView: { propsNames: ['intensity', 'tint'] },
ExpoLinearGradient: { propsNames: ['colors', 'startPoint', 'endPoint', 'locations'] },
ExpoAppleAuthenticationButtonContinueWhiteOutline: { propsNames: ['cornerRadius'] },
ExpoAppleAuthenticationButtonSignInWhiteOutline: { propsNames: ['cornerRadius'] },
ExponentGLView: { propsNames: ['msaaSamples'] },
ExpoAppleAuthenticationButtonContinueBlack: { propsNames: ['cornerRadius'] },
ExpoAppleAuthenticationButtonSignUpWhiteOutline: { propsNames: ['cornerRadius'] },
ExpoAppleAuthenticationButtonSignUpBlack: { propsNames: ['cornerRadius'] },
ExpoVideoView: { propsNames: ['status', 'useNativeControls', 'source', 'resizeMode'] },
ExponentGLView: { propsNames: ['msaaSamples'] },
ExpoAppleAuthenticationButtonSignInWhiteOutline: { propsNames: ['cornerRadius'] },
ExpoAppleAuthenticationButtonSignInWhite: { propsNames: ['cornerRadius'] },
ExpoAppleAuthenticationButtonSignUpWhite: { propsNames: ['cornerRadius'] },
ExpoAppleAuthenticationButtonSignInBlack: { propsNames: ['cornerRadius'] },
@@ -879,6 +1219,7 @@ module.exports = {
getCurrentState: { type: 'function', functionType: 'promise' },
removeListeners: { type: 'function', functionType: 'async' },
},
RNCPickerManager: {},
RNCSafeAreaContext: {
getConstants: { type: 'function' },
initialWindowMetrics: { type: 'object' },