1{"version":3,"file":"withDefaultPlugins.js","names":["debug","Debug","withIosExpoPlugins","config","bundleIdentifier","ios","withPlugins","IOSConfig","BundleIdentifier","withBundleIdentifier","Swift","withSwiftBridgingHeader","withNoopSwiftFile","Google","withGoogle","Name","withDisplayName","withProductName","Orientation","withOrientation","RequiresFullScreen","withRequiresFullScreen","Scheme","withScheme","UsesNonExemptEncryption","withUsesNonExemptEncryption","Version","withBuildNumber","withVersion","withGoogleServicesFile","BuildProperties","withJsEnginePodfileProps","Entitlements","withAssociatedDomains","DeviceFamily","withDeviceFamily","Bitcode","withBitcode","Locales","withLocales","withIosIcons","withAndroidExpoPlugins","props","android","package","AndroidConfig","withJsEngineGradleProps","withNameSettingsGradle","GoogleServices","withClassPath","withApplyPlugin","Package","withPackageGradle","withPackageManifest","AllowBackup","withAllowBackup","WindowSoftInputMode","withWindowSoftInputMode","IntentFilters","withAndroidIntentFilters","Permissions","withInternalBlockedPermissions","withPermissions","withName","StatusBar","withStatusBar","PrimaryColor","withPrimaryColor","withAndroidIcons","withPackageRefactor","versionedExpoSDKPackages","withVersionedExpoSDKPlugins","expoUsername","withMaps","withAdMob","withAppleAuthentication","withContacts","withNotifications","withUpdates","withBranch","withDocumentPicker","withFacebook","withSystemUI","withSplashScreen","withNavigationBar","getAutoPlugins","concat","legacyExpoPlugins","expoManagedVersionedPlugins","getLegacyExpoPlugins","withOptionalLegacyPlugins","plugins","reduce","prev","plugin","shouldSkipAutoPlugin","withStaticPlugin","_isLegacyPlugin","fallback","withLegacyExpoPlugins","Set"],"sources":["../../src/plugins/withDefaultPlugins.ts"],"sourcesContent":["/**\n * These are the versioned first-party plugins with some of the future third-party plugins mixed in for legacy support.\n */\nimport {\n AndroidConfig,\n ConfigPlugin,\n IOSConfig,\n StaticPlugin,\n withPlugins,\n withStaticPlugin,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\n\nimport { shouldSkipAutoPlugin } from '../getAutolinkedPackages';\nimport { withAndroidIcons } from './icons/withAndroidIcons';\nimport { withIosIcons } from './icons/withIosIcons';\nimport withAdMob from './unversioned/expo-ads-admob/expo-ads-admob';\nimport withAppleAuthentication from './unversioned/expo-apple-authentication';\nimport withBranch from './unversioned/expo-branch/expo-branch';\nimport withContacts from './unversioned/expo-contacts';\nimport withDocumentPicker from './unversioned/expo-document-picker';\nimport withFacebook from './unversioned/expo-facebook/expo-facebook';\nimport withNavigationBar from './unversioned/expo-navigation-bar/expo-navigation-bar';\nimport withNotifications from './unversioned/expo-notifications/expo-notifications';\nimport withSplashScreen from './unversioned/expo-splash-screen/expo-splash-screen';\nimport withSystemUI from './unversioned/expo-system-ui/expo-system-ui';\nimport withUpdates from './unversioned/expo-updates';\nimport withMaps from './unversioned/react-native-maps';\n\nconst debug = Debug('expo:prebuild-config');\n\n/**\n * Config plugin to apply all of the custom Expo iOS config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-facebook, expo-updates, etc...\n */\nexport const withIosExpoPlugins: ConfigPlugin<{\n bundleIdentifier: string;\n}> = (config, { bundleIdentifier }) => {\n // Set the bundle ID ahead of time.\n if (!config.ios) config.ios = {};\n config.ios.bundleIdentifier = bundleIdentifier;\n\n return withPlugins(config, [\n [IOSConfig.BundleIdentifier.withBundleIdentifier, { bundleIdentifier }],\n IOSConfig.Swift.withSwiftBridgingHeader,\n IOSConfig.Swift.withNoopSwiftFile,\n IOSConfig.Google.withGoogle,\n IOSConfig.Name.withDisplayName,\n IOSConfig.Name.withProductName,\n IOSConfig.Orientation.withOrientation,\n IOSConfig.RequiresFullScreen.withRequiresFullScreen,\n IOSConfig.Scheme.withScheme,\n IOSConfig.UsesNonExemptEncryption.withUsesNonExemptEncryption,\n IOSConfig.Version.withBuildNumber,\n IOSConfig.Version.withVersion,\n IOSConfig.Google.withGoogleServicesFile,\n IOSConfig.BuildProperties.withJsEnginePodfileProps,\n // Entitlements\n IOSConfig.Entitlements.withAssociatedDomains,\n // XcodeProject\n IOSConfig.DeviceFamily.withDeviceFamily,\n IOSConfig.Bitcode.withBitcode,\n IOSConfig.Locales.withLocales,\n // Dangerous\n withIosIcons,\n ]);\n};\n\n/**\n * Config plugin to apply all of the custom Expo Android config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-facebook, expo-updates, etc...\n */\nexport const withAndroidExpoPlugins: ConfigPlugin<{\n package: string;\n}> = (config, props) => {\n // Set the package name ahead of time.\n if (!config.android) config.android = {};\n config.android.package = props.package;\n\n return withPlugins(config, [\n // gradle.properties\n AndroidConfig.BuildProperties.withJsEngineGradleProps,\n\n // settings.gradle\n AndroidConfig.Name.withNameSettingsGradle,\n\n // project build.gradle\n AndroidConfig.GoogleServices.withClassPath,\n\n // app/build.gradle\n AndroidConfig.GoogleServices.withApplyPlugin,\n AndroidConfig.Package.withPackageGradle,\n AndroidConfig.Version.withVersion,\n\n // AndroidManifest.xml\n AndroidConfig.Package.withPackageManifest,\n AndroidConfig.AllowBackup.withAllowBackup,\n AndroidConfig.WindowSoftInputMode.withWindowSoftInputMode,\n // Note: The withAndroidIntentFilters plugin must appear before the withScheme\n // plugin or withScheme will override the output of withAndroidIntentFilters.\n AndroidConfig.IntentFilters.withAndroidIntentFilters,\n AndroidConfig.Scheme.withScheme,\n AndroidConfig.Orientation.withOrientation,\n AndroidConfig.Permissions.withInternalBlockedPermissions,\n AndroidConfig.Permissions.withPermissions,\n\n // strings.xml\n AndroidConfig.Name.withName,\n\n // Dangerous -- these plugins run in reverse order.\n AndroidConfig.GoogleServices.withGoogleServicesFile,\n\n // Modify colors.xml and styles.xml\n AndroidConfig.StatusBar.withStatusBar,\n AndroidConfig.PrimaryColor.withPrimaryColor,\n\n withAndroidIcons,\n // If we renamed the package, we should also move it around and rename it in source files\n // Added last to ensure this plugin runs first. Out of tree solutions will mistakenly resolve the package incorrectly otherwise.\n AndroidConfig.Package.withPackageRefactor,\n ]);\n};\n\n// Must keep in sync with `withVersionedExpoSDKPlugins`\nconst versionedExpoSDKPackages: string[] = [\n 'react-native-maps',\n 'expo-ads-admob',\n 'expo-apple-authentication',\n 'expo-contacts',\n 'expo-notifications',\n 'expo-updates',\n 'expo-branch',\n 'expo-navigation-bar',\n 'expo-document-picker',\n 'expo-facebook',\n 'expo-splash-screen',\n 'expo-system-ui',\n];\n\nexport const withVersionedExpoSDKPlugins: ConfigPlugin<{ expoUsername: string | null }> = (\n config,\n { expoUsername }\n) => {\n return withPlugins(config, [\n withMaps,\n withAdMob,\n withAppleAuthentication,\n withContacts,\n withNotifications,\n [withUpdates, { expoUsername }],\n withBranch,\n withDocumentPicker,\n withFacebook,\n // System UI must come before splash screen as they overlap\n // and splash screen will warn about conflicting rules.\n withSystemUI,\n withSplashScreen,\n withNavigationBar,\n ]);\n};\n\nexport function getAutoPlugins() {\n return versionedExpoSDKPackages.concat(legacyExpoPlugins).concat(expoManagedVersionedPlugins);\n}\n\nexport function getLegacyExpoPlugins() {\n return legacyExpoPlugins;\n}\n\n// Expo managed packages that require extra update.\n// These get applied automatically to create parity with expo build in eas build.\nconst legacyExpoPlugins = [\n 'expo-app-auth',\n 'expo-av',\n 'expo-background-fetch',\n 'expo-barcode-scanner',\n 'expo-brightness',\n 'expo-calendar',\n 'expo-camera',\n 'expo-cellular',\n 'expo-dev-menu',\n 'expo-dev-launcher',\n 'expo-dev-client',\n 'expo-image-picker',\n 'expo-file-system',\n 'expo-ads-facebook',\n 'expo-location',\n 'expo-media-library',\n 'expo-screen-orientation',\n 'expo-sensors',\n 'expo-task-manager',\n 'expo-local-authentication',\n];\n\n// Plugins that need to be automatically applied, but also get applied by expo-cli if the versioned plugin isn't available.\n// These are split up because the user doesn't need to be prompted to setup these packages.\nconst expoManagedVersionedPlugins = [\n 'expo-firebase-analytics',\n 'expo-firebase-core',\n 'expo-google-sign-in',\n];\n\nconst withOptionalLegacyPlugins: ConfigPlugin<(StaticPlugin | string)[]> = (config, plugins) => {\n return plugins.reduce((prev, plugin) => {\n if (shouldSkipAutoPlugin(config, plugin)) {\n debug('Skipping unlinked auto plugin:', plugin);\n return prev;\n }\n\n return withStaticPlugin(prev, {\n // hide errors\n _isLegacyPlugin: true,\n plugin,\n // If a plugin doesn't exist, do nothing.\n fallback: (config) => config,\n });\n }, config);\n};\n\nexport function withLegacyExpoPlugins(config: ExpoConfig) {\n return withOptionalLegacyPlugins(config, [\n ...new Set(expoManagedVersionedPlugins.concat(legacyExpoPlugins)),\n ]);\n}\n"],"mappings":";;;;;;;;;;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AASA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AA5BA;AACA;AACA;AA4BA,MAAMA,KAAK,GAAG,IAAAC,gBAAA,EAAM,sBAAN,CAAd;AAEA;AACA;AACA;AACA;;AACO,MAAMC,kBAEX,GAAG,CAACC,MAAD,EAAS;EAAEC;AAAF,CAAT,KAAkC;EACrC;EACA,IAAI,CAACD,M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