@expo/prebuild-config 6.0.0 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/build/getAutolinkedPackages.js.map +1 -1
  2. package/build/getPrebuildConfig.js.map +1 -1
  3. package/build/importExpoModulesAutolinking.js.map +1 -1
  4. package/build/index.js.map +1 -1
  5. package/build/plugins/icons/AssetContents.js.map +1 -1
  6. package/build/plugins/icons/withAndroidIcons.js +1 -1
  7. package/build/plugins/icons/withAndroidIcons.js.map +1 -1
  8. package/build/plugins/icons/withAndroidManifestIcons.js.map +1 -1
  9. package/build/plugins/icons/withIosIcons.js.map +1 -1
  10. package/build/plugins/unversioned/createLegacyPlugin.js.map +1 -1
  11. package/build/plugins/unversioned/expo-ads-admob/expo-ads-admob.js.map +1 -1
  12. package/build/plugins/unversioned/expo-ads-admob/withAndroidAdMob.js.map +1 -1
  13. package/build/plugins/unversioned/expo-ads-admob/withIosAdMob.js.map +1 -1
  14. package/build/plugins/unversioned/expo-apple-authentication.js.map +1 -1
  15. package/build/plugins/unversioned/expo-branch/expo-branch.js.map +1 -1
  16. package/build/plugins/unversioned/expo-branch/withAndroidBranch.js.map +1 -1
  17. package/build/plugins/unversioned/expo-branch/withIosBranch.js.map +1 -1
  18. package/build/plugins/unversioned/expo-contacts.js.map +1 -1
  19. package/build/plugins/unversioned/expo-document-picker.js.map +1 -1
  20. package/build/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.js.map +1 -1
  21. package/build/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.js.map +1 -1
  22. package/build/plugins/unversioned/expo-notifications/expo-notifications.js.map +1 -1
  23. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js.map +1 -1
  24. package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.js.map +1 -1
  25. package/build/plugins/unversioned/expo-splash-screen/expo-splash-screen.js.map +1 -1
  26. package/build/plugins/unversioned/expo-splash-screen/getAndroidSplashConfig.js.map +1 -1
  27. package/build/plugins/unversioned/expo-splash-screen/getIosSplashConfig.js.map +1 -1
  28. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashDrawables.js.map +1 -1
  29. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js.map +1 -1
  30. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js.map +1 -1
  31. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashScreen.js.map +1 -1
  32. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStrings.js.map +1 -1
  33. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStyles.js.map +1 -1
  34. package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js.map +1 -1
  35. package/build/plugins/unversioned/expo-splash-screen/withIosSplashInfoPlist.js.map +1 -1
  36. package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreen.js.map +1 -1
  37. package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreenStoryboard.js.map +1 -1
  38. package/build/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.js.map +1 -1
  39. package/build/plugins/unversioned/expo-splash-screen/wtihIosSplashScreenStoryboardImage.js.map +1 -1
  40. package/build/plugins/unversioned/expo-system-ui/expo-system-ui.js.map +1 -1
  41. package/build/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.js.map +1 -1
  42. package/build/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.js.map +1 -1
  43. package/build/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.js.map +1 -1
  44. package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.js.map +1 -1
  45. package/build/plugins/unversioned/expo-updates.js.map +1 -1
  46. package/build/plugins/unversioned/react-native-maps.js.map +1 -1
  47. package/build/plugins/withDefaultPlugins.js.map +1 -1
  48. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"getAutolinkedPackages.js","names":["getAutolinkedPackagesAsync","projectRoot","platforms","autolinking","importExpoModulesAutolinking","searchPaths","resolveSearchPathsAsync","platformPaths","Promise","all","map","platform","findModulesAsync","silent","resolvePackagesList","allPlatformPaths","paths","Object","keys","flat","uniquePaths","Set","sort","shouldSkipAutoPlugin","config","plugin","Array","isArray","_internal","autolinkedModules","pluginId","isIncluded","includes"],"sources":["../src/getAutolinkedPackages.ts"],"sourcesContent":["import { ModPlatform, StaticPlugin } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { importExpoModulesAutolinking } from './importExpoModulesAutolinking';\n\n/**\n * Returns a list of packages that are autolinked to a project.\n *\n * @param projectRoot\n * @param platforms platforms to check for\n * @returns list of packages ex: `['expo-camera', 'react-native-screens']`\n */\nexport async function getAutolinkedPackagesAsync(\n projectRoot: string,\n platforms: ModPlatform[] = ['ios', 'android']\n) {\n const autolinking = importExpoModulesAutolinking(projectRoot);\n const searchPaths = await autolinking.resolveSearchPathsAsync(null, projectRoot);\n\n const platformPaths = await Promise.all(\n platforms.map((platform) =>\n autolinking.findModulesAsync({\n platform,\n searchPaths,\n silent: true,\n })\n )\n );\n\n return resolvePackagesList(platformPaths);\n}\n\nexport function resolvePackagesList(platformPaths: Record<string, any>[]) {\n const allPlatformPaths = platformPaths.map((paths) => Object.keys(paths)).flat();\n\n const uniquePaths = [...new Set(allPlatformPaths)];\n\n return uniquePaths.sort();\n}\n\nexport function shouldSkipAutoPlugin(\n config: Pick<ExpoConfig, '_internal'>,\n plugin: StaticPlugin | string\n) {\n // Hack workaround because expo-dev-client doesn't use expo modules.\n if (plugin === 'expo-dev-client') {\n return false;\n }\n\n // Only perform the check if `autolinkedModules` is defined, otherwise we assume\n // this is a legacy runner which doesn't support autolinking.\n if (Array.isArray(config._internal?.autolinkedModules)) {\n // Resolve the pluginId as a string.\n const pluginId = Array.isArray(plugin) ? plugin[0] : plugin;\n if (typeof pluginId === 'string') {\n // Determine if the autolinked modules list includes our moduleId\n const isIncluded = config._internal!.autolinkedModules.includes(pluginId);\n if (!isIncluded) {\n // If it doesn't then we know that any potential plugin shouldn't be applied automatically.\n return true;\n }\n }\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeA,0BAA0B,CAC9CC,WAAmB,EACnBC,SAAwB,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,EAC7C;EACA,MAAMC,WAAW,GAAG,IAAAC,4DAA4B,EAACH,WAAW,CAAC;EAC7D,MAAMI,WAAW,GAAG,MAAMF,WAAW,CAACG,uBAAuB,CAAC,IAAI,EAAEL,WAAW,CAAC;EAEhF,MAAMM,aAAa,GAAG,MAAMC,OAAO,CAACC,GAAG,CACrCP,SAAS,CAACQ,GAAG,CAAEC,QAAQ,IACrBR,WAAW,CAACS,gBAAgB,CAAC;IAC3BD,QAAQ;IACRN,WAAW;IACXQ,MAAM,EAAE;EACV,CAAC,CAAC,CACH,CACF;EAED,OAAOC,mBAAmB,CAACP,aAAa,CAAC;AAC3C;AAEO,SAASO,mBAAmB,CAACP,aAAoC,EAAE;EACxE,MAAMQ,gBAAgB,GAAGR,aAAa,CAACG,GAAG,CAAEM,KAAK,IAAKC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC,CAAC,CAACG,IAAI,EAAE;EAEhF,MAAMC,WAAW,GAAG,CAAC,GAAG,IAAIC,GAAG,CAACN,gBAAgB,CAAC,CAAC;EAElD,OAAOK,WAAW,CAACE,IAAI,EAAE;AAC3B;AAEO,SAASC,oBAAoB,CAClCC,MAAqC,EACrCC,MAA6B,EAC7B;EAAA;EACA;EACA,IAAIA,MAAM,KAAK,iBAAiB,EAAE;IAChC,OAAO,KAAK;EACd;;EAEA;EACA;EACA,IAAIC,KAAK,CAACC,OAAO,sBAACH,MAAM,CAACI,SAAS,sDAAhB,kBAAkBC,iBAAiB,CAAC,EAAE;IACtD;IACA,MAAMC,QAAQ,GAAGJ,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,GAAGA,MAAM,CAAC,CAAC,CAAC,GAAGA,MAAM;IAC3D,IAAI,OAAOK,QAAQ,KAAK,QAAQ,EAAE;MAChC;MACA,MAAMC,UAAU,GAAGP,MAAM,CAACI,SAAS,CAAEC,iBAAiB,CAACG,QAAQ,CAACF,QAAQ,CAAC;MACzE,IAAI,CAACC,UAAU,EAAE;QACf;QACA,OAAO,IAAI;MACb;IACF;EACF;EACA,OAAO,KAAK;AACd"}
1
+ {"version":3,"file":"getAutolinkedPackages.js","names":["_importExpoModulesAutolinking","data","require","getAutolinkedPackagesAsync","projectRoot","platforms","autolinking","importExpoModulesAutolinking","searchPaths","resolveSearchPathsAsync","platformPaths","Promise","all","map","platform","findModulesAsync","silent","resolvePackagesList","allPlatformPaths","paths","Object","keys","flat","uniquePaths","Set","sort","shouldSkipAutoPlugin","config","plugin","_config$_internal","Array","isArray","_internal","autolinkedModules","pluginId","isIncluded","includes"],"sources":["../src/getAutolinkedPackages.ts"],"sourcesContent":["import { ModPlatform, StaticPlugin } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { importExpoModulesAutolinking } from './importExpoModulesAutolinking';\n\n/**\n * Returns a list of packages that are autolinked to a project.\n *\n * @param projectRoot\n * @param platforms platforms to check for\n * @returns list of packages ex: `['expo-camera', 'react-native-screens']`\n */\nexport async function getAutolinkedPackagesAsync(\n projectRoot: string,\n platforms: ModPlatform[] = ['ios', 'android']\n) {\n const autolinking = importExpoModulesAutolinking(projectRoot);\n const searchPaths = await autolinking.resolveSearchPathsAsync(null, projectRoot);\n\n const platformPaths = await Promise.all(\n platforms.map((platform) =>\n autolinking.findModulesAsync({\n platform,\n searchPaths,\n silent: true,\n })\n )\n );\n\n return resolvePackagesList(platformPaths);\n}\n\nexport function resolvePackagesList(platformPaths: Record<string, any>[]) {\n const allPlatformPaths = platformPaths.map((paths) => Object.keys(paths)).flat();\n\n const uniquePaths = [...new Set(allPlatformPaths)];\n\n return uniquePaths.sort();\n}\n\nexport function shouldSkipAutoPlugin(\n config: Pick<ExpoConfig, '_internal'>,\n plugin: StaticPlugin | string\n) {\n // Hack workaround because expo-dev-client doesn't use expo modules.\n if (plugin === 'expo-dev-client') {\n return false;\n }\n\n // Only perform the check if `autolinkedModules` is defined, otherwise we assume\n // this is a legacy runner which doesn't support autolinking.\n if (Array.isArray(config._internal?.autolinkedModules)) {\n // Resolve the pluginId as a string.\n const pluginId = Array.isArray(plugin) ? plugin[0] : plugin;\n if (typeof pluginId === 'string') {\n // Determine if the autolinked modules list includes our moduleId\n const isIncluded = config._internal!.autolinkedModules.includes(pluginId);\n if (!isIncluded) {\n // If it doesn't then we know that any potential plugin shouldn't be applied automatically.\n return true;\n }\n }\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAGA,SAAAA,8BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,6BAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeE,0BAA0BA,CAC9CC,WAAmB,EACnBC,SAAwB,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,EAC7C;EACA,MAAMC,WAAW,GAAG,IAAAC,4DAA4B,EAACH,WAAW,CAAC;EAC7D,MAAMI,WAAW,GAAG,MAAMF,WAAW,CAACG,uBAAuB,CAAC,IAAI,EAAEL,WAAW,CAAC;EAEhF,MAAMM,aAAa,GAAG,MAAMC,OAAO,CAACC,GAAG,CACrCP,SAAS,CAACQ,GAAG,CAAEC,QAAQ,IACrBR,WAAW,CAACS,gBAAgB,CAAC;IAC3BD,QAAQ;IACRN,WAAW;IACXQ,MAAM,EAAE;EACV,CAAC,CAAC,CACH,CACF;EAED,OAAOC,mBAAmB,CAACP,aAAa,CAAC;AAC3C;AAEO,SAASO,mBAAmBA,CAACP,aAAoC,EAAE;EACxE,MAAMQ,gBAAgB,GAAGR,aAAa,CAACG,GAAG,CAAEM,KAAK,IAAKC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC,CAAC,CAACG,IAAI,EAAE;EAEhF,MAAMC,WAAW,GAAG,CAAC,GAAG,IAAIC,GAAG,CAACN,gBAAgB,CAAC,CAAC;EAElD,OAAOK,WAAW,CAACE,IAAI,EAAE;AAC3B;AAEO,SAASC,oBAAoBA,CAClCC,MAAqC,EACrCC,MAA6B,EAC7B;EAAA,IAAAC,iBAAA;EACA;EACA,IAAID,MAAM,KAAK,iBAAiB,EAAE;IAChC,OAAO,KAAK;EACd;;EAEA;EACA;EACA,IAAIE,KAAK,CAACC,OAAO,EAAAF,iBAAA,GAACF,MAAM,CAACK,SAAS,cAAAH,iBAAA,uBAAhBA,iBAAA,CAAkBI,iBAAiB,CAAC,EAAE;IACtD;IACA,MAAMC,QAAQ,GAAGJ,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GAAGA,MAAM,CAAC,CAAC,CAAC,GAAGA,MAAM;IAC3D,IAAI,OAAOM,QAAQ,KAAK,QAAQ,EAAE;MAChC;MACA,MAAMC,UAAU,GAAGR,MAAM,CAACK,SAAS,CAAEC,iBAAiB,CAACG,QAAQ,CAACF,QAAQ,CAAC;MACzE,IAAI,CAACC,UAAU,EAAE;QACf;QACA,OAAO,IAAI;MACb;IACF;EACF;EACA,OAAO,KAAK;AACd"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPrebuildConfig.js","names":["getPrebuildConfigAsync","projectRoot","props","autolinkedModules","getAutolinkedPackagesAsync","platforms","getPrebuildConfig","bundleIdentifier","packageName","expoUsername","exp","config","rest","getConfig","skipSDKVersionRequirement","isModdedConfig","_internal","resolvedExpoUsername","getAccountUsername","withVersionedExpoSDKPlugins","withLegacyExpoPlugins","includes","ios","withIosExpoPlugins","android","package","withAndroidExpoPlugins"],"sources":["../src/getPrebuildConfig.ts"],"sourcesContent":["import { getAccountUsername, getConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { getAutolinkedPackagesAsync } from './getAutolinkedPackages';\nimport {\n withAndroidExpoPlugins,\n withIosExpoPlugins,\n withLegacyExpoPlugins,\n withVersionedExpoSDKPlugins,\n} from './plugins/withDefaultPlugins';\n\nexport async function getPrebuildConfigAsync(\n projectRoot: string,\n props: {\n bundleIdentifier?: string;\n packageName?: string;\n platforms: ModPlatform[];\n expoUsername?: string | ((config: ExpoConfig) => string | null);\n }\n): Promise<ReturnType<typeof getConfig>> {\n const autolinkedModules = await getAutolinkedPackagesAsync(projectRoot, props.platforms);\n\n return getPrebuildConfig(projectRoot, {\n ...props,\n autolinkedModules,\n });\n}\n\nfunction getPrebuildConfig(\n projectRoot: string,\n {\n platforms,\n bundleIdentifier,\n packageName,\n autolinkedModules,\n expoUsername,\n }: {\n bundleIdentifier?: string;\n packageName?: string;\n platforms: ModPlatform[];\n autolinkedModules?: string[];\n expoUsername?: string | ((config: ExpoConfig) => string | null);\n }\n) {\n // let config: ExpoConfig;\n let { exp: config, ...rest } = getConfig(projectRoot, {\n skipSDKVersionRequirement: true,\n isModdedConfig: true,\n });\n\n if (autolinkedModules) {\n if (!config._internal) {\n config._internal = {};\n }\n config._internal.autolinkedModules = autolinkedModules;\n }\n\n const resolvedExpoUsername =\n typeof expoUsername === 'function'\n ? expoUsername(config)\n : // If the user didn't pass a username then fallback on the static cached username.\n expoUsername ?? getAccountUsername(config);\n\n // Add all built-in plugins first because they should take\n // priority over the unversioned plugins.\n config = withVersionedExpoSDKPlugins(config, {\n expoUsername: resolvedExpoUsername,\n });\n config = withLegacyExpoPlugins(config);\n\n if (platforms.includes('ios')) {\n if (!config.ios) config.ios = {};\n config.ios.bundleIdentifier =\n bundleIdentifier ?? config.ios.bundleIdentifier ?? `com.placeholder.appid`;\n\n // Add all built-in plugins\n config = withIosExpoPlugins(config, {\n bundleIdentifier: config.ios.bundleIdentifier,\n });\n }\n\n if (platforms.includes('android')) {\n if (!config.android) config.android = {};\n config.android.package = packageName ?? config.android.package ?? `com.placeholder.appid`;\n\n // Add all built-in plugins\n config = withAndroidExpoPlugins(config, {\n package: config.android.package,\n });\n }\n\n return { exp: config, ...rest };\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAOO,eAAeA,sBAAsB,CAC1CC,WAAmB,EACnBC,KAKC,EACsC;EACvC,MAAMC,iBAAiB,GAAG,MAAM,IAAAC,mDAA0B,EAACH,WAAW,EAAEC,KAAK,CAACG,SAAS,CAAC;EAExF,OAAOC,iBAAiB,CAACL,WAAW,EAAE;IACpC,GAAGC,KAAK;IACRC;EACF,CAAC,CAAC;AACJ;AAEA,SAASG,iBAAiB,CACxBL,WAAmB,EACnB;EACEI,SAAS;EACTE,gBAAgB;EAChBC,WAAW;EACXL,iBAAiB;EACjBM;AAOF,CAAC,EACD;EACA;EACA,IAAI;IAAEC,GAAG,EAAEC,MAAM;IAAE,GAAGC;EAAK,CAAC,GAAG,IAAAC,mBAAS,EAACZ,WAAW,EAAE;IACpDa,yBAAyB,EAAE,IAAI;IAC/BC,cAAc,EAAE;EAClB,CAAC,CAAC;EAEF,IAAIZ,iBAAiB,EAAE;IACrB,IAAI,CAACQ,MAAM,CAACK,SAAS,EAAE;MACrBL,MAAM,CAACK,SAAS,GAAG,CAAC,CAAC;IACvB;IACAL,MAAM,CAACK,SAAS,CAACb,iBAAiB,GAAGA,iBAAiB;EACxD;EAEA,MAAMc,oBAAoB,GACxB,OAAOR,YAAY,KAAK,UAAU,GAC9BA,YAAY,CAACE,MAAM,CAAC,GACpB;EACAF,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAI,IAAAS,4BAAkB,EAACP,MAAM,CAAC;;EAEhD;EACA;EACAA,MAAM,GAAG,IAAAQ,iDAA2B,EAACR,MAAM,EAAE;IAC3CF,YAAY,EAAEQ;EAChB,CAAC,CAAC;EACFN,MAAM,GAAG,IAAAS,2CAAqB,EAACT,MAAM,CAAC;EAEtC,IAAIN,SAAS,CAACgB,QAAQ,CAAC,KAAK,CAAC,EAAE;IAAA;IAC7B,IAAI,CAACV,MAAM,CAACW,GAAG,EAAEX,MAAM,CAACW,GAAG,GAAG,CAAC,CAAC;IAChCX,MAAM,CAACW,GAAG,CAACf,gBAAgB,WACzBA,gBAAgB,aAAhBA,gBAAgB,cAAhBA,gBAAgB,GAAII,MAAM,CAACW,GAAG,CAACf,gBAAgB,uCAAK,uBAAsB;;IAE5E;IACAI,MAAM,GAAG,IAAAY,wCAAkB,EAACZ,MAAM,EAAE;MAClCJ,gBAAgB,EAAEI,MAAM,CAACW,GAAG,CAACf;IAC/B,CAAC,CAAC;EACJ;EAEA,IAAIF,SAAS,CAACgB,QAAQ,CAAC,SAAS,CAAC,EAAE;IAAA;IACjC,IAAI,CAACV,MAAM,CAACa,OAAO,EAAEb,MAAM,CAACa,OAAO,GAAG,CAAC,CAAC;IACxCb,MAAM,CAACa,OAAO,CAACC,OAAO,YAAGjB,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAIG,MAAM,CAACa,OAAO,CAACC,OAAO,yCAAK,uBAAsB;;IAEzF;IACAd,MAAM,GAAG,IAAAe,4CAAsB,EAACf,MAAM,EAAE;MACtCc,OAAO,EAAEd,MAAM,CAACa,OAAO,CAACC;IAC1B,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEf,GAAG,EAAEC,MAAM;IAAE,GAAGC;EAAK,CAAC;AACjC"}
1
+ {"version":3,"file":"getPrebuildConfig.js","names":["_config","data","require","_getAutolinkedPackages","_withDefaultPlugins","getPrebuildConfigAsync","projectRoot","props","autolinkedModules","getAutolinkedPackagesAsync","platforms","getPrebuildConfig","bundleIdentifier","packageName","expoUsername","exp","config","rest","getConfig","skipSDKVersionRequirement","isModdedConfig","_internal","resolvedExpoUsername","getAccountUsername","withVersionedExpoSDKPlugins","withLegacyExpoPlugins","includes","_ref","ios","withIosExpoPlugins","_ref2","android","package","withAndroidExpoPlugins"],"sources":["../src/getPrebuildConfig.ts"],"sourcesContent":["import { getAccountUsername, getConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { getAutolinkedPackagesAsync } from './getAutolinkedPackages';\nimport {\n withAndroidExpoPlugins,\n withIosExpoPlugins,\n withLegacyExpoPlugins,\n withVersionedExpoSDKPlugins,\n} from './plugins/withDefaultPlugins';\n\nexport async function getPrebuildConfigAsync(\n projectRoot: string,\n props: {\n bundleIdentifier?: string;\n packageName?: string;\n platforms: ModPlatform[];\n expoUsername?: string | ((config: ExpoConfig) => string | null);\n }\n): Promise<ReturnType<typeof getConfig>> {\n const autolinkedModules = await getAutolinkedPackagesAsync(projectRoot, props.platforms);\n\n return getPrebuildConfig(projectRoot, {\n ...props,\n autolinkedModules,\n });\n}\n\nfunction getPrebuildConfig(\n projectRoot: string,\n {\n platforms,\n bundleIdentifier,\n packageName,\n autolinkedModules,\n expoUsername,\n }: {\n bundleIdentifier?: string;\n packageName?: string;\n platforms: ModPlatform[];\n autolinkedModules?: string[];\n expoUsername?: string | ((config: ExpoConfig) => string | null);\n }\n) {\n // let config: ExpoConfig;\n let { exp: config, ...rest } = getConfig(projectRoot, {\n skipSDKVersionRequirement: true,\n isModdedConfig: true,\n });\n\n if (autolinkedModules) {\n if (!config._internal) {\n config._internal = {};\n }\n config._internal.autolinkedModules = autolinkedModules;\n }\n\n const resolvedExpoUsername =\n typeof expoUsername === 'function'\n ? expoUsername(config)\n : // If the user didn't pass a username then fallback on the static cached username.\n expoUsername ?? getAccountUsername(config);\n\n // Add all built-in plugins first because they should take\n // priority over the unversioned plugins.\n config = withVersionedExpoSDKPlugins(config, {\n expoUsername: resolvedExpoUsername,\n });\n config = withLegacyExpoPlugins(config);\n\n if (platforms.includes('ios')) {\n if (!config.ios) config.ios = {};\n config.ios.bundleIdentifier =\n bundleIdentifier ?? config.ios.bundleIdentifier ?? `com.placeholder.appid`;\n\n // Add all built-in plugins\n config = withIosExpoPlugins(config, {\n bundleIdentifier: config.ios.bundleIdentifier,\n });\n }\n\n if (platforms.includes('android')) {\n if (!config.android) config.android = {};\n config.android.package = packageName ?? config.android.package ?? `com.placeholder.appid`;\n\n // Add all built-in plugins\n config = withAndroidExpoPlugins(config, {\n package: config.android.package,\n });\n }\n\n return { exp: config, ...rest };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,uBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,sBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,oBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,mBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOO,eAAeI,sBAAsBA,CAC1CC,WAAmB,EACnBC,KAKC,EACsC;EACvC,MAAMC,iBAAiB,GAAG,MAAM,IAAAC,mDAA0B,EAACH,WAAW,EAAEC,KAAK,CAACG,SAAS,CAAC;EAExF,OAAOC,iBAAiB,CAACL,WAAW,EAAE;IACpC,GAAGC,KAAK;IACRC;EACF,CAAC,CAAC;AACJ;AAEA,SAASG,iBAAiBA,CACxBL,WAAmB,EACnB;EACEI,SAAS;EACTE,gBAAgB;EAChBC,WAAW;EACXL,iBAAiB;EACjBM;AAOF,CAAC,EACD;EACA;EACA,IAAI;IAAEC,GAAG,EAAEC,MAAM;IAAE,GAAGC;EAAK,CAAC,GAAG,IAAAC,mBAAS,EAACZ,WAAW,EAAE;IACpDa,yBAAyB,EAAE,IAAI;IAC/BC,cAAc,EAAE;EAClB,CAAC,CAAC;EAEF,IAAI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G,MAAM,CAACe,OAAO,CAACC,OAAO,cAAAF,KAAA,cAAAA,KAAA,GAAK,uBAAsB;;IAEzF;IACAd,MAAM,GAAG,IAAAiB,4CAAsB,EAACjB,MAAM,EAAE;MACtCgB,OAAO,EAAEhB,MAAM,CAACe,OAAO,CAACC;IAC1B,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEjB,GAAG,EAAEC,MAAM;IAAE,GAAGC;EAAK,CAAC;AACjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"importExpoModulesAutolinking.js","names":["importExpoModulesAutolinking","projectRoot","autolinking","tryRequireExpoModulesAutolinking","assertAutolinkingCompatibility","resolvedAutolinkingPath","require","resolve","paths","Error"],"sources":["../src/importExpoModulesAutolinking.ts"],"sourcesContent":["// NOTE: Keep these types in-sync with expo-modules-autolinking\n\nexport type SearchResults = {\n [moduleName: string]: object;\n};\n\nexport type SearchOptions = {\n searchPaths: string[];\n platform: 'ios' | 'android' | 'web';\n silent?: boolean;\n};\n\nexport type AutolinkingModule = {\n resolveSearchPathsAsync(searchPaths: string[] | null, cwd: string): Promise<string[]>;\n findModulesAsync(providedOptions: SearchOptions): Promise<SearchResults>;\n};\n\n/**\n * Imports the `expo-modules-autolinking` package installed in the project at the given path.\n */\nexport function importExpoModulesAutolinking(projectRoot: string): AutolinkingModule {\n const autolinking = tryRequireExpoModulesAutolinking(projectRoot);\n assertAutolinkingCompatibility(autolinking);\n return autolinking;\n}\n\nfunction tryRequireExpoModulesAutolinking(projectRoot: string): AutolinkingModule {\n try {\n const resolvedAutolinkingPath = require.resolve('expo-modules-autolinking/build/autolinking', {\n paths: [projectRoot],\n });\n return require(resolvedAutolinkingPath);\n } catch {\n throw new Error(\n \"Cannot find 'expo-modules-autolinking' package in your project, make sure that you have 'expo' package installed\"\n );\n }\n}\n\nfunction assertAutolinkingCompatibility(autolinking: AutolinkingModule): void {\n if ('resolveSearchPathsAsync' in autolinking && 'findModulesAsync' in autolinking) {\n return;\n }\n throw new Error(\n \"The 'expo-modules-autolinking' package has been found, but it seems to be incompatible with '@expo/prebuild-config'\"\n );\n}\n"],"mappings":";;;;;;AAAA;;AAiBA;AACA;AACA;AACO,SAASA,4BAA4B,CAACC,WAAmB,EAAqB;EACnF,MAAMC,WAAW,GAAGC,gCAAgC,CAACF,WAAW,CAAC;EACjEG,8BAA8B,CAACF,WAAW,CAAC;EAC3C,OAAOA,WAAW;AACpB;AAEA,SAASC,gCAAgC,CAACF,WAAmB,EAAqB;EAChF,IAAI;IACF,MAAMI,uBAAuB,GAAGC,OAAO,CAACC,OAAO,CAAC,4CAA4C,EAAE;MAC5FC,KAAK,EAAE,CAACP,WAAW;IACrB,CAAC,CAAC;IACF,OAAOK,OAAO,CAACD,uBAAuB,CAAC;EACzC,CAAC,CAAC,MAAM;IACN,MAAM,IAAII,KAAK,CACb,kHAAkH,CACnH;EACH;AACF;AAEA,SAASL,8BAA8B,CAACF,WAA8B,EAAQ;EAC5E,IAAI,yBAAyB,IAAIA,WAAW,IAAI,kBAAkB,IAAIA,WAAW,EAAE;IACjF;EACF;EACA,MAAM,IAAIO,KAAK,CACb,qHAAqH,CACtH;AACH"}
1
+ {"version":3,"file":"importExpoModulesAutolinking.js","names":["importExpoModulesAutolinking","projectRoot","autolinking","tryRequireExpoModulesAutolinking","assertAutolinkingCompatibility","resolvedAutolinkingPath","require","resolve","paths","Error"],"sources":["../src/importExpoModulesAutolinking.ts"],"sourcesContent":["// NOTE: Keep these types in-sync with expo-modules-autolinking\n\nexport type SearchResults = {\n [moduleName: string]: object;\n};\n\nexport type SearchOptions = {\n searchPaths: string[];\n platform: 'ios' | 'android' | 'web';\n silent?: boolean;\n};\n\nexport type AutolinkingModule = {\n resolveSearchPathsAsync(searchPaths: string[] | null, cwd: string): Promise<string[]>;\n findModulesAsync(providedOptions: SearchOptions): Promise<SearchResults>;\n};\n\n/**\n * Imports the `expo-modules-autolinking` package installed in the project at the given path.\n */\nexport function importExpoModulesAutolinking(projectRoot: string): AutolinkingModule {\n const autolinking = tryRequireExpoModulesAutolinking(projectRoot);\n assertAutolinkingCompatibility(autolinking);\n return autolinking;\n}\n\nfunction tryRequireExpoModulesAutolinking(projectRoot: string): AutolinkingModule {\n try {\n const resolvedAutolinkingPath = require.resolve('expo-modules-autolinking/build/autolinking', {\n paths: [projectRoot],\n });\n return require(resolvedAutolinkingPath);\n } catch {\n throw new Error(\n \"Cannot find 'expo-modules-autolinking' package in your project, make sure that you have 'expo' package installed\"\n );\n }\n}\n\nfunction assertAutolinkingCompatibility(autolinking: AutolinkingModule): void {\n if ('resolveSearchPathsAsync' in autolinking && 'findModulesAsync' in autolinking) {\n return;\n }\n throw new Error(\n \"The 'expo-modules-autolinking' package has been found, but it seems to be incompatible with '@expo/prebuild-config'\"\n );\n}\n"],"mappings":";;;;;;AAAA;;AAiBA;AACA;AACA;AACO,SAASA,4BAA4BA,CAACC,WAAmB,EAAqB;EACnF,MAAMC,WAAW,GAAGC,gCAAgC,CAACF,WAAW,CAAC;EACjEG,8BAA8B,CAACF,WAAW,CAAC;EAC3C,OAAOA,WAAW;AACpB;AAEA,SAASC,gCAAgCA,CAACF,WAAmB,EAAqB;EAChF,IAAI;IACF,MAAMI,uBAAuB,GAAGC,OAAO,CAACC,OAAO,CAAC,4CAA4C,EAAE;MAC5FC,KAAK,EAAE,CAACP,WAAW;IACrB,CAAC,CAAC;IACF,OAAOK,OAAO,CAACD,uBAAuB,CAAC;EACzC,CAAC,CAAC,MAAM;IACN,MAAM,IAAII,KAAK,CACb,kHAAkH,CACnH;EACH;AACF;AAEA,SAASL,8BAA8BA,CAACF,WAA8B,EAAQ;EAC5E,IAAI,yBAAyB,IAAIA,WAAW,IAAI,kBAAkB,IAAIA,WAAW,EAAE;IACjF;EACF;EACA,MAAM,IAAIO,KAAK,CACb,qHAAqH,CACtH;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable import/export */\n\nexport { getPrebuildConfigAsync } from './getPrebuildConfig';\nexport * from './plugins/withDefaultPlugins';\n"],"mappings":";;;;;;;;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_getPrebuildConfig","data","require","_withDefaultPlugins","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable import/export */\n\nexport { getPrebuildConfigAsync } from './getPrebuildConfig';\nexport * from './plugins/withDefaultPlugins';\n"],"mappings":";;;;;;;;;;;;;;AAEA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,mBAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,mBAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,mBAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,mBAAA,CAAAI,GAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssetContents.js","names":["createContentsJsonItem","item","writeContentsJsonAsync","directory","images","fs","ensureDir","writeFile","join","JSON","stringify","info","version","author"],"sources":["../../../src/plugins/icons/AssetContents.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { join } from 'path';\n\nexport type ContentsJsonImageIdiom = 'iphone' | 'ipad' | 'ios-marketing' | 'universal';\n\nexport type ContentsJsonImageAppearance = {\n appearance: 'luminosity';\n value: 'dark';\n};\n\nexport type ContentsJsonImageScale = '1x' | '2x' | '3x';\n\nexport interface ContentsJsonImage {\n appearances?: ContentsJsonImageAppearance[];\n idiom: ContentsJsonImageIdiom;\n size?: string;\n scale: ContentsJsonImageScale;\n filename?: string;\n}\n\nexport interface ContentsJson {\n images: ContentsJsonImage[];\n info: {\n version: number;\n author: string;\n };\n}\n\nexport function createContentsJsonItem(item: ContentsJsonImage): ContentsJsonImage {\n return item;\n}\n\n/**\n * Writes the Config.json which is used to assign images to their respective platform, dpi, and idiom.\n *\n * @param directory path to add the Contents.json to.\n * @param contents image json data\n */\nexport async function writeContentsJsonAsync(\n directory: string,\n { images }: Pick<ContentsJson, 'images'>\n): Promise<void> {\n await fs.ensureDir(directory);\n\n await fs.writeFile(\n join(directory, 'Contents.json'),\n JSON.stringify(\n {\n images,\n info: {\n version: 1,\n // common practice is for the tool that generated the icons to be the \"author\"\n author: 'expo',\n },\n },\n null,\n 2\n )\n );\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA4B;AA2BrB,SAASA,sBAAsB,CAACC,IAAuB,EAAqB;EACjF,OAAOA,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeC,sBAAsB,CAC1CC,SAAiB,EACjB;EAAEC;AAAqC,CAAC,EACzB;EACf,MAAMC,kBAAE,CAACC,SAAS,CAACH,SAAS,CAAC;EAE7B,MAAME,kBAAE,CAACE,SAAS,CAChB,IAAAC,YAAI,EAACL,SAAS,EAAE,eAAe,CAAC,EAChCM,IAAI,CAACC,SAAS,CACZ;IACEN,MAAM;IACNO,IAAI,EAAE;MACJC,OAAO,EAAE,CAAC;MACV;MACAC,MAAM,EAAE;IACV;EACF,CAAC,EACD,IAAI,EACJ,CAAC,CACF,CACF;AACH"}
1
+ {"version":3,"file":"AssetContents.js","names":["_fsExtra","data","_interopRequireDefault","require","_path","obj","__esModule","default","createContentsJsonItem","item","writeContentsJsonAsync","directory","images","fs","ensureDir","writeFile","join","JSON","stringify","info","version","author"],"sources":["../../../src/plugins/icons/AssetContents.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { join } from 'path';\n\nexport type ContentsJsonImageIdiom = 'iphone' | 'ipad' | 'ios-marketing' | 'universal';\n\nexport type ContentsJsonImageAppearance = {\n appearance: 'luminosity';\n value: 'dark';\n};\n\nexport type ContentsJsonImageScale = '1x' | '2x' | '3x';\n\nexport interface ContentsJsonImage {\n appearances?: ContentsJsonImageAppearance[];\n idiom: ContentsJsonImageIdiom;\n size?: string;\n scale: ContentsJsonImageScale;\n filename?: string;\n}\n\nexport interface ContentsJson {\n images: ContentsJsonImage[];\n info: {\n version: number;\n author: string;\n };\n}\n\nexport function createContentsJsonItem(item: ContentsJsonImage): ContentsJsonImage {\n return item;\n}\n\n/**\n * Writes the Config.json which is used to assign images to their respective platform, dpi, and idiom.\n *\n * @param directory path to add the Contents.json to.\n * @param contents image json data\n */\nexport async function writeContentsJsonAsync(\n directory: string,\n { images }: Pick<ContentsJson, 'images'>\n): Promise<void> {\n await fs.ensureDir(directory);\n\n await fs.writeFile(\n join(directory, 'Contents.json'),\n JSON.stringify(\n {\n images,\n info: {\n version: 1,\n // common practice is for the tool that generated the icons to be the \"author\"\n author: 'expo',\n },\n },\n null,\n 2\n )\n );\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA4B,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AA2BrB,SAASG,sBAAsBA,CAACC,IAAuB,EAAqB;EACjF,OAAOA,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeC,sBAAsBA,CAC1CC,SAAiB,EACjB;EAAEC;AAAqC,CAAC,EACzB;EACf,MAAMC,kBAAE,CAACC,SAAS,CAACH,SAAS,CAAC;EAE7B,MAAME,kBAAE,CAACE,SAAS,CAChB,IAAAC,YAAI,EAACL,SAAS,EAAE,eAAe,CAAC,EAChCM,IAAI,CAACC,SAAS,CACZ;IACEN,MAAM;IACNO,IAAI,EAAE;MACJC,OAAO,EAAE,CAAC;MACV;MACAC,MAAM,EAAE;IACV;EACF,CAAC,EACD,IAAI,EACJ,CAAC,CACF,CACF;AACH"}
@@ -316,7 +316,7 @@ async function generateMonochromeImageAsync(projectRoot, {
316
316
  dpiFolder,
317
317
  scale
318
318
  }) => {
319
- const monochromeIcon = generateIconAsync(projectRoot, {
319
+ const monochromeIcon = await generateIconAsync(projectRoot, {
320
320
  cacheType: imageCacheFolder,
321
321
  src: icon,
322
322
  scale,
@@ -1 +1 @@
1
- {"version":3,"file":"withAndroidIcons.js","names":["Colors","AndroidConfig","dpiValues","mdpi","folderName","scale","hdpi","xhdpi","xxhdpi","xxxhdpi","BASELINE_PIXEL_SIZE","ANDROID_RES_PATH","MIPMAP_ANYDPI_V26","ICON_BACKGROUND","IC_LAUNCHER_PNG","IC_LAUNCHER_ROUND_PNG","IC_LAUNCHER_BACKGROUND_PNG","IC_LAUNCHER_FOREGROUND_PNG","IC_LAUNCHER_MONOCHROME_PNG","IC_LAUNCHER_XML","IC_LAUNCHER_ROUND_XML","withAndroidIcons","config","foregroundImage","backgroundColor","backgroundImage","monochromeImage","getAdaptiveIcon","icon","getIcon","withAndroidManifestIcons","withAndroidAdaptiveIconColors","withDangerousMod","setIconAsync","modRequest","projectRoot","isAdaptive","android","adaptiveIcon","setRoundIconManifest","manifest","application","Manifest","getMainApplicationOrThrow","$","withAndroidColors","modResults","setBackgroundColor","configureLegacyIconAsync","generateRoundIconAsync","deleteIconNamedAsync","configureAdaptiveIconAsync","generateMultiLayerImageAsync","outputImageFileName","imageCacheFolder","backgroundImageCacheFolder","borderRadiusRatio","generateMonochromeImageAsync","backgroundImageFileName","icLauncherXmlString","createAdaptiveIconXmlString","createAdaptiveIconXmlFiles","colors","assignColorValue","value","name","background","iconElements","push","join","add","anyDpiV26Directory","path","resolve","fs","ensureDir","launcherPath","launcherRoundPath","Promise","all","writeFile","map","existsSync","remove","iterateDpiValues","dpiFolder","iconLayer","generateIconAsync","cacheType","src","backgroundLayer","compositeImagesAsync","foreground","monochromeIcon","callback","Object","values","iconSizePx","generateImageAsync","width","height","resizeMode","borderRadius","undefined","source"],"sources":["../../../src/plugins/icons/withAndroidIcons.ts"],"sourcesContent":["import {\n AndroidConfig,\n ConfigPlugin,\n withAndroidColors,\n withDangerousMod,\n} from '@expo/config-plugins';\nimport { ResourceXML } from '@expo/config-plugins/build/android/Resources';\nimport { ExpoConfig } from '@expo/config-types';\nimport { compositeImagesAsync, generateImageAsync } from '@expo/image-utils';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nimport { withAndroidManifestIcons } from './withAndroidManifestIcons';\n\nconst { Colors } = AndroidConfig;\n\ntype DPIString = 'mdpi' | 'hdpi' | 'xhdpi' | 'xxhdpi' | 'xxxhdpi';\ntype dpiMap = Record<DPIString, { folderName: string; scale: number }>;\n\nexport const dpiValues: dpiMap = {\n mdpi: { folderName: 'mipmap-mdpi', scale: 1 },\n hdpi: { folderName: 'mipmap-hdpi', scale: 1.5 },\n xhdpi: { folderName: 'mipmap-xhdpi', scale: 2 },\n xxhdpi: { folderName: 'mipmap-xxhdpi', scale: 3 },\n xxxhdpi: { folderName: 'mipmap-xxxhdpi', scale: 4 },\n};\nconst BASELINE_PIXEL_SIZE = 108;\nexport const ANDROID_RES_PATH = 'android/app/src/main/res/';\nconst MIPMAP_ANYDPI_V26 = 'mipmap-anydpi-v26';\nconst ICON_BACKGROUND = 'iconBackground';\nconst IC_LAUNCHER_PNG = 'ic_launcher.png';\nconst IC_LAUNCHER_ROUND_PNG = 'ic_launcher_round.png';\nconst IC_LAUNCHER_BACKGROUND_PNG = 'ic_launcher_background.png';\nconst IC_LAUNCHER_FOREGROUND_PNG = 'ic_launcher_foreground.png';\nconst IC_LAUNCHER_MONOCHROME_PNG = 'ic_launcher_monochrome.png';\nconst IC_LAUNCHER_XML = 'ic_launcher.xml';\nconst IC_LAUNCHER_ROUND_XML = 'ic_launcher_round.xml';\n\nexport const withAndroidIcons: ConfigPlugin = (config) => {\n const { foregroundImage, backgroundColor, backgroundImage, monochromeImage } =\n getAdaptiveIcon(config);\n const icon = foregroundImage ?? getIcon(config);\n\n if (!icon) {\n return config;\n }\n\n config = withAndroidManifestIcons(config);\n // Apply colors.xml changes\n config = withAndroidAdaptiveIconColors(config, backgroundColor);\n return withDangerousMod(config, [\n 'android',\n async (config) => {\n await setIconAsync(config.modRequest.projectRoot, {\n icon,\n backgroundColor,\n backgroundImage,\n monochromeImage,\n isAdaptive: !!config.android?.adaptiveIcon,\n });\n return config;\n },\n ]);\n};\n\nexport function setRoundIconManifest(\n config: Pick<ExpoConfig, 'android'>,\n manifest: AndroidConfig.Manifest.AndroidManifest\n): AndroidConfig.Manifest.AndroidManifest {\n const isAdaptive = !!config.android?.adaptiveIcon;\n const application = AndroidConfig.Manifest.getMainApplicationOrThrow(manifest);\n\n if (isAdaptive) {\n application.$['android:roundIcon'] = '@mipmap/ic_launcher_round';\n } else {\n delete application.$['android:roundIcon'];\n }\n return manifest;\n}\n\nconst withAndroidAdaptiveIconColors: ConfigPlugin<string | null> = (config, backgroundColor) => {\n return withAndroidColors(config, (config) => {\n config.modResults = setBackgroundColor(backgroundColor ?? '#FFFFFF', config.modResults);\n return config;\n });\n};\n\nexport function getIcon(config: ExpoConfig) {\n return config.android?.icon || config.icon || null;\n}\n\nexport function getAdaptiveIcon(config: ExpoConfig) {\n return {\n foregroundImage: config.android?.adaptiveIcon?.foregroundImage ?? null,\n backgroundColor: config.android?.adaptiveIcon?.backgroundColor ?? null,\n backgroundImage: config.android?.adaptiveIcon?.backgroundImage ?? null,\n monochromeImage: config.android?.adaptiveIcon?.monochromeImage ?? null,\n };\n}\n\n/**\n * Resizes the user-provided icon to create a set of legacy icon files in\n * their respective \"mipmap\" directories for <= Android 7, and creates a set of adaptive\n * icon files for > Android 7 from the adaptive icon files (if provided).\n */\nexport async function setIconAsync(\n projectRoot: string,\n {\n icon,\n backgroundColor,\n backgroundImage,\n monochromeImage,\n isAdaptive,\n }: {\n icon: string | null;\n backgroundColor: string | null;\n backgroundImage: string | null;\n monochromeImage: string | null;\n isAdaptive: boolean;\n }\n) {\n if (!icon) {\n return null;\n }\n\n await configureLegacyIconAsync(projectRoot, icon, backgroundImage, backgroundColor);\n if (isAdaptive) {\n await generateRoundIconAsync(projectRoot, icon, backgroundImage, backgroundColor);\n } else {\n await deleteIconNamedAsync(projectRoot, IC_LAUNCHER_ROUND_PNG);\n }\n await configureAdaptiveIconAsync(projectRoot, icon, backgroundImage, monochromeImage, isAdaptive);\n\n return true;\n}\n\n/**\n * Configures legacy icon files to be used on Android 7 and earlier. If adaptive icon configuration\n * was provided, we create a pseudo-adaptive icon by layering the provided files (or background\n * color if no backgroundImage is provided. If no backgroundImage and no backgroundColor are provided,\n * the background is set to transparent.)\n */\nasync function configureLegacyIconAsync(\n projectRoot: string,\n icon: string,\n backgroundImage: string | null,\n backgroundColor: string | null\n) {\n return generateMultiLayerImageAsync(projectRoot, {\n icon,\n backgroundImage,\n backgroundColor,\n outputImageFileName: IC_LAUNCHER_PNG,\n imageCacheFolder: 'android-standard-square',\n backgroundImageCacheFolder: 'android-standard-square-background',\n });\n}\n\nasync function generateRoundIconAsync(\n projectRoot: string,\n icon: string,\n backgroundImage: string | null,\n backgroundColor: string | null\n) {\n return generateMultiLayerImageAsync(projectRoot, {\n icon,\n borderRadiusRatio: 0.5,\n outputImageFileName: IC_LAUNCHER_ROUND_PNG,\n backgroundImage,\n backgroundColor,\n imageCacheFolder: 'android-standard-circle',\n backgroundImageCacheFolder: 'android-standard-round-background',\n });\n}\n\n/**\n * Configures adaptive icon files to be used on Android 8 and up. A foreground image must be provided,\n * and will have a transparent background unless:\n * - A backgroundImage is provided, or\n * - A backgroundColor was specified\n */\nexport async function configureAdaptiveIconAsync(\n projectRoot: string,\n foregroundImage: string,\n backgroundImage: string | null,\n monochromeImage: string | null,\n isAdaptive: boolean\n) {\n if (monochromeImage) {\n await generateMonochromeImageAsync(projectRoot, {\n icon: monochromeImage,\n imageCacheFolder: 'android-adaptive-monochrome',\n outputImageFileName: IC_LAUNCHER_MONOCHROME_PNG,\n });\n }\n await generateMultiLayerImageAsync(projectRoot, {\n backgroundColor: 'transparent',\n backgroundImage,\n backgroundImageCacheFolder: 'android-adaptive-background',\n outputImageFileName: IC_LAUNCHER_FOREGROUND_PNG,\n icon: foregroundImage,\n imageCacheFolder: 'android-adaptive-foreground',\n backgroundImageFileName: IC_LAUNCHER_BACKGROUND_PNG,\n });\n\n // create ic_launcher.xml and ic_launcher_round.xml\n const icLauncherXmlString = createAdaptiveIconXmlString(backgroundImage, monochromeImage);\n await createAdaptiveIconXmlFiles(\n projectRoot,\n icLauncherXmlString,\n // If the user only defined icon and not android.adaptiveIcon, then skip enabling the layering system\n // this will scale the image down and present it uncropped.\n isAdaptive\n );\n}\n\nfunction setBackgroundColor(backgroundColor: string | null, colors: ResourceXML) {\n return Colors.assignColorValue(colors, {\n value: backgroundColor,\n name: ICON_BACKGROUND,\n });\n}\n\nexport const createAdaptiveIconXmlString = (\n backgroundImage: string | null,\n monochromeImage: string | null\n) => {\n const background = backgroundImage ? `@mipmap/ic_launcher_background` : `@color/iconBackground`;\n\n const iconElements: string[] = [\n `<background android:drawable=\"${background}\"/>`,\n '<foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>',\n ];\n\n if (monochromeImage) {\n iconElements.push('<monochrome android:drawable=\"@mipmap/ic_launcher_monochrome\"/>');\n }\n\n return `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n ${iconElements.join('\\n ')}\n</adaptive-icon>`;\n};\n\nasync function createAdaptiveIconXmlFiles(\n projectRoot: string,\n icLauncherXmlString: string,\n add: boolean\n) {\n const anyDpiV26Directory = path.resolve(projectRoot, ANDROID_RES_PATH, MIPMAP_ANYDPI_V26);\n await fs.ensureDir(anyDpiV26Directory);\n const launcherPath = path.resolve(anyDpiV26Directory, IC_LAUNCHER_XML);\n const launcherRoundPath = path.resolve(anyDpiV26Directory, IC_LAUNCHER_ROUND_XML);\n if (add) {\n await Promise.all([\n fs.writeFile(launcherPath, icLauncherXmlString),\n fs.writeFile(launcherRoundPath, icLauncherXmlString),\n ]);\n } else {\n // Remove the xml if the icon switches from adaptive to standard.\n await Promise.all(\n [launcherPath, launcherRoundPath].map(async (path) => {\n if (fs.existsSync(path)) {\n return fs.remove(path);\n }\n })\n );\n }\n}\n\nasync function generateMultiLayerImageAsync(\n projectRoot: string,\n {\n icon,\n backgroundColor,\n backgroundImage,\n imageCacheFolder,\n backgroundImageCacheFolder,\n borderRadiusRatio,\n outputImageFileName,\n backgroundImageFileName,\n }: {\n icon: string;\n backgroundImage: string | null;\n backgroundColor: string | null;\n imageCacheFolder: string;\n backgroundImageCacheFolder: string;\n backgroundImageFileName?: string;\n borderRadiusRatio?: number;\n outputImageFileName: string;\n }\n) {\n await iterateDpiValues(projectRoot, async ({ dpiFolder, scale }) => {\n let iconLayer = await generateIconAsync(projectRoot, {\n cacheType: imageCacheFolder,\n src: icon,\n scale,\n // backgroundImage overrides backgroundColor\n backgroundColor: backgroundImage ? 'transparent' : backgroundColor ?? 'transparent',\n borderRadiusRatio,\n });\n\n if (backgroundImage) {\n const backgroundLayer = await generateIconAsync(projectRoot, {\n cacheType: backgroundImageCacheFolder,\n src: backgroundImage,\n scale,\n backgroundColor: 'transparent',\n borderRadiusRatio,\n });\n\n if (backgroundImageFileName) {\n await fs.writeFile(path.resolve(dpiFolder, backgroundImageFileName), backgroundLayer);\n } else {\n iconLayer = await compositeImagesAsync({\n foreground: iconLayer,\n background: backgroundLayer,\n });\n }\n } else if (backgroundImageFileName) {\n // Remove any instances of ic_launcher_background.png that are there from previous icons\n await deleteIconNamedAsync(projectRoot, backgroundImageFileName);\n }\n\n await fs.ensureDir(dpiFolder);\n await fs.writeFile(path.resolve(dpiFolder, outputImageFileName), iconLayer);\n });\n}\n\nasync function generateMonochromeImageAsync(\n projectRoot: string,\n {\n icon,\n imageCacheFolder,\n outputImageFileName,\n }: { icon: string; imageCacheFolder: string; outputImageFileName: string }\n) {\n await iterateDpiValues(projectRoot, async ({ dpiFolder, scale }) => {\n const monochromeIcon = generateIconAsync(projectRoot, {\n cacheType: imageCacheFolder,\n src: icon,\n scale,\n backgroundColor: 'transparent',\n });\n await fs.ensureDir(dpiFolder);\n await fs.writeFile(path.resolve(dpiFolder, outputImageFileName), monochromeIcon);\n });\n}\n\nfunction iterateDpiValues(\n projectRoot: string,\n callback: (value: { dpiFolder: string; folderName: string; scale: number }) => Promise<void>\n) {\n return Promise.all(\n Object.values(dpiValues).map((value) =>\n callback({\n dpiFolder: path.resolve(projectRoot, ANDROID_RES_PATH, value.folderName),\n ...value,\n })\n )\n );\n}\n\nasync function deleteIconNamedAsync(projectRoot: string, name: string) {\n return iterateDpiValues(projectRoot, ({ dpiFolder }) => {\n return fs.remove(path.resolve(dpiFolder, name));\n });\n}\n\nasync function generateIconAsync(\n projectRoot: string,\n {\n cacheType,\n src,\n scale,\n backgroundColor,\n borderRadiusRatio,\n }: {\n cacheType: string;\n src: string;\n scale: number;\n backgroundColor: string;\n borderRadiusRatio?: number;\n }\n) {\n const iconSizePx = BASELINE_PIXEL_SIZE * scale;\n\n return (\n await generateImageAsync(\n { projectRoot, cacheType },\n {\n src,\n width: iconSizePx,\n height: iconSizePx,\n resizeMode: 'cover',\n backgroundColor,\n borderRadius: borderRadiusRatio ? iconSizePx * borderRadiusRatio : undefined,\n }\n )\n ).source;\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAsE;AAEtE,MAAM;EAAEA;AAAO,CAAC,GAAGC,8BAAa;AAKzB,MAAMC,SAAiB,GAAG;EAC/BC,IAAI,EAAE;IAAEC,UAAU,EAAE,aAAa;IAAEC,KAAK,EAAE;EAAE,CAAC;EAC7CC,IAAI,EAAE;IAAEF,UAAU,EAAE,aAAa;IAAEC,KAAK,EAAE;EAAI,CAAC;EAC/CE,KAAK,EAAE;IAAEH,UAAU,EAAE,cAAc;IAAEC,KAAK,EAAE;EAAE,CAAC;EAC/CG,MAAM,EAAE;IAAEJ,UAAU,EAAE,eAAe;IAAEC,KAAK,EAAE;EAAE,CAAC;EACjDI,OAAO,EAAE;IAAEL,UAAU,EAAE,gBAAgB;IAAEC,KAAK,EAAE;EAAE;AACpD,CAAC;AAAC;AACF,MAAMK,mBAAmB,GAAG,GAAG;AACxB,MAAMC,gBAAgB,GAAG,2BAA2B;AAAC;AAC5D,MAAMC,iBAAiB,GAAG,mBAAmB;AAC7C,MAAMC,eAAe,GAAG,gBAAgB;AACxC,MAAMC,eAAe,GAAG,iBAAiB;AACzC,MAAMC,qBAAqB,GAAG,uBAAuB;AACrD,MAAMC,0BAA0B,GAAG,4BAA4B;AAC/D,MAAMC,0BAA0B,GAAG,4BAA4B;AAC/D,MAAMC,0BAA0B,GAAG,4BAA4B;AAC/D,MAAMC,eAAe,GAAG,iBAAiB;AACzC,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CAACC,GAAG,CAChBgB,MAAM,CAACC,MAAM,CAAC9F,SAAS,CAAC,CAAC+E,GAAG,CAAEjB,KAAK,IACjC8B,QAAQ,CAAC;IACPT,SAAS,EAAEb,eAAI,CAACC,OAAO,CAACtC,WAAW,EAAExB,gBAAgB,EAAEqD,KAAK,CAAC5D,UAAU,CAAC;IACxE,GAAG4D;EACL,CAAC,CAAC,CACH,CACF;AACH;AAEA,eAAed,oBAAoB,CAACf,WAAmB,EAAE8B,IAAY,EAAE;EACrE,OAAOmB,gBAAgB,CAACjD,WAAW,EAAE,CAAC;IAAEkD;EAAU,CAAC,KAAK;IACtD,OAAOX,kBAAE,CAACS,MAAM,CAACX,eAAI,CAACC,OAAO,CAACY,SAAS,EAAEpB,IAAI,CAAC,CAAC;EACjD,CAAC,CAAC;AACJ;AAEA,eAAesB,iBAAiB,CAC9BpD,WAAmB,EACnB;EACEqD,SAAS;EACTC,GAAG;EACHpF,KAAK;EACLmB,eAAe;EACfgC;AAOF,CAAC,EACD;EACA,MAAMyC,UAAU,GAAGvF,mBAAmB,GAAGL,KAAK;EAE9C,OAAO,CACL,MAAM,IAAA6F,gCAAkB,EACtB;IAAE/D,WAAW;IAAEqD;EAAU,CAAC,EAC1B;IACEC,GAAG;IACHU,KAAK,EAAEF,UAAU;IACjBG,MAAM,EAAEH,UAAU;IAClBI,UAAU,EAAE,OAAO;IACnB7E,eAAe;IACf8E,YAAY,EAAE9C,iBAAiB,GAAGyC,UAAU,GAAGzC,iBAAiB,GAAG+C;EACrE,CAAC,CACF,EACDC,MAAM;AACV"}
1
+ {"version":3,"file":"withAndroidIcons.js","names":["_configPlugins","data","require","_imageUtils","_fsExtra","_interopRequireDefault","_path","_withAndroidManifestIcons","obj","__esModule","default","Colors","AndroidConfig","dpiValues","mdpi","folderName","scale","hdpi","xhdpi","xxhdpi","xxxhdpi","exports","BASELINE_PIXEL_SIZE","ANDROID_RES_PATH","MIPMAP_ANYDPI_V26","ICON_BACKGROUND","IC_LAUNCHER_PNG","IC_LAUNCHER_ROUND_PNG","IC_LAUNCHER_BACKGROUND_PNG","IC_LAUNCHER_FOREGROUND_PNG","IC_LAUNCHER_MONOCHROME_PNG","IC_LAUNCHER_XML","IC_LAUNCHER_ROUND_XML","withAndroidIcons","config","foregroundImage","backgroundColor","backgroundImage","monochromeImage","getAdaptiveIcon","icon","getIcon","withAndroidManifestIcons","withAndroidAdaptiveIconColors","withDangerousMod","_config$android","setIconAsync","modRequest","projectRoot","isAdaptive","android","adaptiveIcon","setRoundIconManifest","manifest","_config$android2","application","Manifest","getMainApplicationOrThrow","$","withAndroidColors","modResults","setBackgroundColor","_config$android3","_config$android$adapt","_config$android4","_config$android4$adap","_config$android$adapt2","_config$android5","_config$android5$adap","_config$android$adapt3","_config$android6","_config$android6$adap","_config$android$adapt4","_config$android7","_config$android7$adap","configureLegacyIconAsync","generateRoundIconAsync","deleteIconNamedAsync","configureAdaptiveIconAsync","generateMultiLayerImageAsync","outputImageFileName","imageCacheFolder","backgroundImageCacheFolder","borderRadiusRatio","generateMonochromeImageAsync","backgroundImageFileName","icLauncherXmlString","createAdaptiveIconXmlString","createAdaptiveIconXmlFiles","colors","assignColorValue","value","name","background","iconElements","push","join","add","anyDpiV26Directory","path","resolve","fs","ensureDir","launcherPath","launcherRoundPath","Promise","all","writeFile","map","existsSync","remove","iterateDpiValues","dpiFolder","iconLayer","generateIconAsync","cacheType","src","backgroundLayer","compositeImagesAsync","foreground","monochromeIcon","callback","Object","values","iconSizePx","generateImageAsync","width","height","resizeMode","borderRadius","undefined","source"],"sources":["../../../src/plugins/icons/withAndroidIcons.ts"],"sourcesContent":["import {\n AndroidConfig,\n ConfigPlugin,\n withAndroidColors,\n withDangerousMod,\n} from '@expo/config-plugins';\nimport { ResourceXML } from '@expo/config-plugins/build/android/Resources';\nimport { ExpoConfig } from '@expo/config-types';\nimport { compositeImagesAsync, generateImageAsync } from '@expo/image-utils';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nimport { withAndroidManifestIcons } from './withAndroidManifestIcons';\n\nconst { Colors } = AndroidConfig;\n\ntype DPIString = 'mdpi' | 'hdpi' | 'xhdpi' | 'xxhdpi' | 'xxxhdpi';\ntype dpiMap = Record<DPIString, { folderName: string; scale: number }>;\n\nexport const dpiValues: dpiMap = {\n mdpi: { folderName: 'mipmap-mdpi', scale: 1 },\n hdpi: { folderName: 'mipmap-hdpi', scale: 1.5 },\n xhdpi: { folderName: 'mipmap-xhdpi', scale: 2 },\n xxhdpi: { folderName: 'mipmap-xxhdpi', scale: 3 },\n xxxhdpi: { folderName: 'mipmap-xxxhdpi', scale: 4 },\n};\nconst BASELINE_PIXEL_SIZE = 108;\nexport const ANDROID_RES_PATH = 'android/app/src/main/res/';\nconst MIPMAP_ANYDPI_V26 = 'mipmap-anydpi-v26';\nconst ICON_BACKGROUND = 'iconBackground';\nconst IC_LAUNCHER_PNG = 'ic_launcher.png';\nconst IC_LAUNCHER_ROUND_PNG = 'ic_launcher_round.png';\nconst IC_LAUNCHER_BACKGROUND_PNG = 'ic_launcher_background.png';\nconst IC_LAUNCHER_FOREGROUND_PNG = 'ic_launcher_foreground.png';\nconst IC_LAUNCHER_MONOCHROME_PNG = 'ic_launcher_monochrome.png';\nconst IC_LAUNCHER_XML = 'ic_launcher.xml';\nconst IC_LAUNCHER_ROUND_XML = 'ic_launcher_round.xml';\n\nexport const withAndroidIcons: ConfigPlugin = (config) => {\n const { foregroundImage, backgroundColor, backgroundImage, monochromeImage } =\n getAdaptiveIcon(config);\n const icon = foregroundImage ?? getIcon(config);\n\n if (!icon) {\n return config;\n }\n\n config = withAndroidManifestIcons(config);\n // Apply colors.xml changes\n config = withAndroidAdaptiveIconColors(config, backgroundColor);\n return withDangerousMod(config, [\n 'android',\n async (config) => {\n await setIconAsync(config.modRequest.projectRoot, {\n icon,\n backgroundColor,\n backgroundImage,\n monochromeImage,\n isAdaptive: !!config.android?.adaptiveIcon,\n });\n return config;\n },\n ]);\n};\n\nexport function setRoundIconManifest(\n config: Pick<ExpoConfig, 'android'>,\n manifest: AndroidConfig.Manifest.AndroidManifest\n): AndroidConfig.Manifest.AndroidManifest {\n const isAdaptive = !!config.android?.adaptiveIcon;\n const application = AndroidConfig.Manifest.getMainApplicationOrThrow(manifest);\n\n if (isAdaptive) {\n application.$['android:roundIcon'] = '@mipmap/ic_launcher_round';\n } else {\n delete application.$['android:roundIcon'];\n }\n return manifest;\n}\n\nconst withAndroidAdaptiveIconColors: ConfigPlugin<string | null> = (config, backgroundColor) => {\n return withAndroidColors(config, (config) => {\n config.modResults = setBackgroundColor(backgroundColor ?? '#FFFFFF', config.modResults);\n return config;\n });\n};\n\nexport function getIcon(config: ExpoConfig) {\n return config.android?.icon || config.icon || null;\n}\n\nexport function getAdaptiveIcon(config: ExpoConfig) {\n return {\n foregroundImage: config.android?.adaptiveIcon?.foregroundImage ?? null,\n backgroundColor: config.android?.adaptiveIcon?.backgroundColor ?? null,\n backgroundImage: config.android?.adaptiveIcon?.backgroundImage ?? null,\n monochromeImage: config.android?.adaptiveIcon?.monochromeImage ?? null,\n };\n}\n\n/**\n * Resizes the user-provided icon to create a set of legacy icon files in\n * their respective \"mipmap\" directories for <= Android 7, and creates a set of adaptive\n * icon files for > Android 7 from the adaptive icon files (if provided).\n */\nexport async function setIconAsync(\n projectRoot: string,\n {\n icon,\n backgroundColor,\n backgroundImage,\n monochromeImage,\n isAdaptive,\n }: {\n icon: string | null;\n backgroundColor: string | null;\n backgroundImage: string | null;\n monochromeImage: string | null;\n isAdaptive: boolean;\n }\n) {\n if (!icon) {\n return null;\n }\n\n await configureLegacyIconAsync(projectRoot, icon, backgroundImage, backgroundColor);\n if (isAdaptive) {\n await generateRoundIconAsync(projectRoot, icon, backgroundImage, backgroundColor);\n } else {\n await deleteIconNamedAsync(projectRoot, IC_LAUNCHER_ROUND_PNG);\n }\n await configureAdaptiveIconAsync(projectRoot, icon, backgroundImage, monochromeImage, isAdaptive);\n\n return true;\n}\n\n/**\n * Configures legacy icon files to be used on Android 7 and earlier. If adaptive icon configuration\n * was provided, we create a pseudo-adaptive icon by layering the provided files (or background\n * color if no backgroundImage is provided. If no backgroundImage and no backgroundColor are provided,\n * the background is set to transparent.)\n */\nasync function configureLegacyIconAsync(\n projectRoot: string,\n icon: string,\n backgroundImage: string | null,\n backgroundColor: string | null\n) {\n return generateMultiLayerImageAsync(projectRoot, {\n icon,\n backgroundImage,\n backgroundColor,\n outputImageFileName: IC_LAUNCHER_PNG,\n imageCacheFolder: 'android-standard-square',\n backgroundImageCacheFolder: 'android-standard-square-background',\n });\n}\n\nasync function generateRoundIconAsync(\n projectRoot: string,\n icon: string,\n backgroundImage: string | null,\n backgroundColor: string | null\n) {\n return generateMultiLayerImageAsync(projectRoot, {\n icon,\n borderRadiusRatio: 0.5,\n outputImageFileName: IC_LAUNCHER_ROUND_PNG,\n backgroundImage,\n backgroundColor,\n imageCacheFolder: 'android-standard-circle',\n backgroundImageCacheFolder: 'android-standard-round-background',\n });\n}\n\n/**\n * Configures adaptive icon files to be used on Android 8 and up. A foreground image must be provided,\n * and will have a transparent background unless:\n * - A backgroundImage is provided, or\n * - A backgroundColor was specified\n */\nexport async function configureAdaptiveIconAsync(\n projectRoot: string,\n foregroundImage: string,\n backgroundImage: string | null,\n monochromeImage: string | null,\n isAdaptive: boolean\n) {\n if (monochromeImage) {\n await generateMonochromeImageAsync(projectRoot, {\n icon: monochromeImage,\n imageCacheFolder: 'android-adaptive-monochrome',\n outputImageFileName: IC_LAUNCHER_MONOCHROME_PNG,\n });\n }\n await generateMultiLayerImageAsync(projectRoot, {\n backgroundColor: 'transparent',\n backgroundImage,\n backgroundImageCacheFolder: 'android-adaptive-background',\n outputImageFileName: IC_LAUNCHER_FOREGROUND_PNG,\n icon: foregroundImage,\n imageCacheFolder: 'android-adaptive-foreground',\n backgroundImageFileName: IC_LAUNCHER_BACKGROUND_PNG,\n });\n\n // create ic_launcher.xml and ic_launcher_round.xml\n const icLauncherXmlString = createAdaptiveIconXmlString(backgroundImage, monochromeImage);\n await createAdaptiveIconXmlFiles(\n projectRoot,\n icLauncherXmlString,\n // If the user only defined icon and not android.adaptiveIcon, then skip enabling the layering system\n // this will scale the image down and present it uncropped.\n isAdaptive\n );\n}\n\nfunction setBackgroundColor(backgroundColor: string | null, colors: ResourceXML) {\n return Colors.assignColorValue(colors, {\n value: backgroundColor,\n name: ICON_BACKGROUND,\n });\n}\n\nexport const createAdaptiveIconXmlString = (\n backgroundImage: string | null,\n monochromeImage: string | null\n) => {\n const background = backgroundImage ? `@mipmap/ic_launcher_background` : `@color/iconBackground`;\n\n const iconElements: string[] = [\n `<background android:drawable=\"${background}\"/>`,\n '<foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>',\n ];\n\n if (monochromeImage) {\n iconElements.push('<monochrome android:drawable=\"@mipmap/ic_launcher_monochrome\"/>');\n }\n\n return `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n ${iconElements.join('\\n ')}\n</adaptive-icon>`;\n};\n\nasync function createAdaptiveIconXmlFiles(\n projectRoot: string,\n icLauncherXmlString: string,\n add: boolean\n) {\n const anyDpiV26Directory = path.resolve(projectRoot, ANDROID_RES_PATH, MIPMAP_ANYDPI_V26);\n await fs.ensureDir(anyDpiV26Directory);\n const launcherPath = path.resolve(anyDpiV26Directory, IC_LAUNCHER_XML);\n const launcherRoundPath = path.resolve(anyDpiV26Directory, IC_LAUNCHER_ROUND_XML);\n if (add) {\n await Promise.all([\n fs.writeFile(launcherPath, icLauncherXmlString),\n fs.writeFile(launcherRoundPath, icLauncherXmlString),\n ]);\n } else {\n // Remove the xml if the icon switches from adaptive to standard.\n await Promise.all(\n [launcherPath, launcherRoundPath].map(async (path) => {\n if (fs.existsSync(path)) {\n return fs.remove(path);\n }\n })\n );\n }\n}\n\nasync function generateMultiLayerImageAsync(\n projectRoot: string,\n {\n icon,\n backgroundColor,\n backgroundImage,\n imageCacheFolder,\n backgroundImageCacheFolder,\n borderRadiusRatio,\n outputImageFileName,\n backgroundImageFileName,\n }: {\n icon: string;\n backgroundImage: string | null;\n backgroundColor: string | null;\n imageCacheFolder: string;\n backgroundImageCacheFolder: string;\n backgroundImageFileName?: string;\n borderRadiusRatio?: number;\n outputImageFileName: string;\n }\n) {\n await iterateDpiValues(projectRoot, async ({ dpiFolder, scale }) => {\n let iconLayer = await generateIconAsync(projectRoot, {\n cacheType: imageCacheFolder,\n src: icon,\n scale,\n // backgroundImage overrides backgroundColor\n backgroundColor: backgroundImage ? 'transparent' : backgroundColor ?? 'transparent',\n borderRadiusRatio,\n });\n\n if (backgroundImage) {\n const backgroundLayer = await generateIconAsync(projectRoot, {\n cacheType: backgroundImageCacheFolder,\n src: backgroundImage,\n scale,\n backgroundColor: 'transparent',\n borderRadiusRatio,\n });\n\n if (backgroundImageFileName) {\n await fs.writeFile(path.resolve(dpiFolder, backgroundImageFileName), backgroundLayer);\n } else {\n iconLayer = await compositeImagesAsync({\n foreground: iconLayer,\n background: backgroundLayer,\n });\n }\n } else if (backgroundImageFileName) {\n // Remove any instances of ic_launcher_background.png that are there from previous icons\n await deleteIconNamedAsync(projectRoot, backgroundImageFileName);\n }\n\n await fs.ensureDir(dpiFolder);\n await fs.writeFile(path.resolve(dpiFolder, outputImageFileName), iconLayer);\n });\n}\n\nasync function generateMonochromeImageAsync(\n projectRoot: string,\n {\n icon,\n imageCacheFolder,\n outputImageFileName,\n }: { icon: string; imageCacheFolder: string; outputImageFileName: string }\n) {\n await iterateDpiValues(projectRoot, async ({ dpiFolder, scale }) => {\n const monochromeIcon = await generateIconAsync(projectRoot, {\n cacheType: imageCacheFolder,\n src: icon,\n scale,\n backgroundColor: 'transparent',\n });\n await fs.ensureDir(dpiFolder);\n await fs.writeFile(path.resolve(dpiFolder, outputImageFileName), monochromeIcon);\n });\n}\n\nfunction iterateDpiValues(\n projectRoot: string,\n callback: (value: { dpiFolder: string; folderName: string; scale: number }) => Promise<void>\n) {\n return Promise.all(\n Object.values(dpiValues).map((value) =>\n callback({\n dpiFolder: path.resolve(projectRoot, ANDROID_RES_PATH, value.folderName),\n ...value,\n })\n )\n );\n}\n\nasync function deleteIconNamedAsync(projectRoot: string, name: string) {\n return iterateDpiValues(projectRoot, ({ dpiFolder }) => {\n return fs.remove(path.resolve(dpiFolder, name));\n });\n}\n\nasync function generateIconAsync(\n projectRoot: string,\n {\n cacheType,\n src,\n scale,\n backgroundColor,\n borderRadiusRatio,\n }: {\n cacheType: string;\n src: string;\n scale: number;\n backgroundColor: string;\n borderRadiusRatio?: number;\n }\n) {\n const iconSizePx = BASELINE_PIXEL_SIZE * scale;\n\n return (\n await generateImageAsync(\n { projectRoot, cacheType },\n {\n src,\n width: iconSizePx,\n height: iconSizePx,\n resizeMode: 'cover',\n backgroundColor,\n borderRadius: borderRadiusRatio ? iconSizePx * borderRadiusRatio : undefined,\n }\n )\n ).source;\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,0BAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,yBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA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AACJ;AAEA,eAAesB,iBAAiBA,CAC9BlE,WAAmB,EACnB;EACEmE,SAAS;EACTC,GAAG;EACHpG,KAAK;EACLoB,eAAe;EACf+C;AAOF,CAAC,EACD;EACA,MAAMyC,UAAU,GAAGtG,mBAAmB,GAAGN,KAAK;EAE9C,OAAO,CACL,MAAM,IAAA6G,gCAAkB,EACtB;IAAE7E,WAAW;IAAEmE;EAAU,CAAC,EAC1B;IACEC,GAAG;IACHU,KAAK,EAAEF,UAAU;IACjBG,MAAM,EAAEH,UAAU;IAClBI,UAAU,EAAE,OAAO;IACnB5F,eAAe;IACf6F,YAAY,EAAE9C,iBAAiB,GAAGyC,UAAU,GAAGzC,iBAAiB,GAAG+C;EACrE,CAAC,CACF,EACDC,MAAM;AACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"withAndroidManifestIcons.js","names":["withAndroidManifestIcons","config","withAndroidManifest","modResults","setRoundIconManifest","manifest","isAdaptive","android","adaptiveIcon","application","AndroidConfig","Manifest","getMainApplicationOrThrow","$"],"sources":["../../../src/plugins/icons/withAndroidManifestIcons.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withAndroidManifestIcons: ConfigPlugin = (config) =>\n withAndroidManifest(config, (config) => {\n config.modResults = setRoundIconManifest(config, config.modResults);\n return config;\n });\n\nexport function setRoundIconManifest(\n config: Pick<ExpoConfig, 'android'>,\n manifest: AndroidConfig.Manifest.AndroidManifest\n): AndroidConfig.Manifest.AndroidManifest {\n const isAdaptive = !!config.android?.adaptiveIcon;\n const application = AndroidConfig.Manifest.getMainApplicationOrThrow(manifest);\n\n if (isAdaptive) {\n application.$['android:roundIcon'] = '@mipmap/ic_launcher_round';\n } else {\n delete application.$['android:roundIcon'];\n }\n return manifest;\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,wBAAsC,GAAIC,MAAM,IAC3D,IAAAC,oCAAmB,EAACD,MAAM,EAAGA,MAAM,IAAK;EACtCA,MAAM,CAACE,UAAU,GAAGC,oBAAoB,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;EACnE,OAAOF,MAAM;AACf,CAAC,CAAC;AAAC;AAEE,SAASG,oBAAoB,CAClCH,MAAmC,EACnCI,QAAgD,EACR;EAAA;EACxC,MAAMC,UAAU,GAAG,CAAC,qBAACL,MAAM,CAACM,OAAO,4CAAd,gBAAgBC,YAAY;EACjD,MAAMC,WAAW,GAAGC,8BAAa,CAACC,QAAQ,CAACC,yBAAyB,CAACP,QAAQ,CAAC;EAE9E,IAAIC,UAAU,EAAE;IACdG,WAAW,CAACI,CAAC,CAAC,mBAAmB,CAAC,GAAG,2BAA2B;EAClE,CAAC,MAAM;IACL,OAAOJ,WAAW,CAACI,CAAC,CAAC,mBAAmB,CAAC;EAC3C;EACA,OAAOR,QAAQ;AACjB"}
1
+ {"version":3,"file":"withAndroidManifestIcons.js","names":["_configPlugins","data","require","withAndroidManifestIcons","config","withAndroidManifest","modResults","setRoundIconManifest","exports","manifest","_config$android","isAdaptive","android","adaptiveIcon","application","AndroidConfig","Manifest","getMainApplicationOrThrow","$"],"sources":["../../../src/plugins/icons/withAndroidManifestIcons.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withAndroidManifestIcons: ConfigPlugin = (config) =>\n withAndroidManifest(config, (config) => {\n config.modResults = setRoundIconManifest(config, config.modResults);\n return config;\n });\n\nexport function setRoundIconManifest(\n config: Pick<ExpoConfig, 'android'>,\n manifest: AndroidConfig.Manifest.AndroidManifest\n): AndroidConfig.Manifest.AndroidManifest {\n const isAdaptive = !!config.android?.adaptiveIcon;\n const application = AndroidConfig.Manifest.getMainApplicationOrThrow(manifest);\n\n if (isAdaptive) {\n application.$['android:roundIcon'] = '@mipmap/ic_launcher_round';\n } else {\n delete application.$['android:roundIcon'];\n }\n return manifest;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGO,MAAME,wBAAsC,GAAIC,MAAM,IAC3D,IAAAC,oCAAmB,EAACD,MAAM,EAAGA,MAAM,IAAK;EACtCA,MAAM,CAACE,UAAU,GAAGC,oBAAoB,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;EACnE,OAAOF,MAAM;AACf,CAAC,CAAC;AAACI,OAAA,CAAAL,wBAAA,GAAAA,wBAAA;AAEE,SAASI,oBAAoBA,CAClCH,MAAmC,EACnCK,QAAgD,EACR;EAAA,IAAAC,eAAA;EACxC,MAAMC,UAAU,GAAG,CAAC,GAAAD,eAAA,GAACN,MAAM,CAACQ,OAAO,cAAAF,eAAA,eAAdA,eAAA,CAAgBG,YAAY;EACjD,MAAMC,WAAW,GAAGC,8BAAa,CAACC,QAAQ,CAACC,yBAAyB,CAACR,QAAQ,CAAC;EAE9E,IAAIE,UAAU,EAAE;IACdG,WAAW,CAACI,CAAC,CAAC,mBAAmB,CAAC,GAAG,2BAA2B;EAClE,CAAC,MAAM;IACL,OAAOJ,WAAW,CAACI,CAAC,CAAC,mBAAmB,CAAC;EAC3C;EACA,OAAOT,QAAQ;AACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"withIosIcons.js","names":["getProjectName","IOSConfig","XcodeUtils","withIosIcons","config","withDangerousMod","setIconsAsync","modRequest","projectRoot","IMAGE_CACHE_NAME","IMAGESET_PATH","ICON_CONTENTS","idiom","sizes","size","scales","getIcons","ios","icon","WarningAggregator","addWarningIOS","iosNamedProjectRoot","getIosNamedProjectPath","fs","ensureDir","join","imagesJson","generatedIcons","platform","isMarketing","scale","filename","getAppleIconName","iconSizePx","source","generateImageAsync","cacheType","src","name","width","height","removeTransparency","resizeMode","backgroundColor","assetPath","writeFile","push","writeContentsJsonAsync","images","projectName"],"sources":["../../../src/plugins/icons/withIosIcons.ts"],"sourcesContent":["import { ConfigPlugin, IOSConfig, WarningAggregator, withDangerousMod } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport { generateImageAsync } from '@expo/image-utils';\nimport * as fs from 'fs-extra';\nimport { join } from 'path';\n\nimport { ContentsJson, ContentsJsonImageIdiom, writeContentsJsonAsync } from './AssetContents';\n\nconst { getProjectName } = IOSConfig.XcodeUtils;\n\nexport const withIosIcons: ConfigPlugin = (config) => {\n return withDangerousMod(config, [\n 'ios',\n async (config) => {\n await setIconsAsync(config, config.modRequest.projectRoot);\n return config;\n },\n ]);\n};\n\nconst IMAGE_CACHE_NAME = 'icons';\nconst IMAGESET_PATH = 'Images.xcassets/AppIcon.appiconset';\n\n// Hard-coding seemed like the clearest and safest way to implement the sizes.\nexport const ICON_CONTENTS: {\n idiom: ContentsJsonImageIdiom;\n sizes: { size: number; scales: (1 | 2 | 3)[] }[];\n}[] = [\n {\n idiom: 'iphone',\n sizes: [\n {\n size: 20,\n scales: [2, 3],\n },\n {\n size: 29,\n scales: [1, 2, 3],\n },\n {\n size: 40,\n scales: [2, 3],\n },\n {\n size: 60,\n scales: [2, 3],\n },\n // TODO: 76x76@2x seems unused now\n // {\n // size: 76,\n // scales: [2],\n // },\n ],\n },\n {\n idiom: 'ipad',\n sizes: [\n {\n size: 20,\n scales: [1, 2],\n },\n {\n size: 29,\n scales: [1, 2],\n },\n {\n size: 40,\n scales: [1, 2],\n },\n {\n size: 76,\n scales: [1, 2],\n },\n {\n size: 83.5,\n scales: [2],\n },\n ],\n },\n {\n idiom: 'ios-marketing',\n sizes: [\n {\n size: 1024,\n scales: [1],\n },\n ],\n },\n];\n\nexport function getIcons(config: Pick<ExpoConfig, 'icon' | 'ios'>): string | null {\n // No support for empty strings.\n return config.ios?.icon || config.icon || null;\n}\n\nexport async function setIconsAsync(config: ExpoConfig, projectRoot: string) {\n const icon = getIcons(config);\n if (!icon) {\n WarningAggregator.addWarningIOS(\n 'icon',\n 'This is the image that your app uses on your home screen, you will need to configure it manually.'\n );\n return;\n }\n\n // Something like projectRoot/ios/MyApp/\n const iosNamedProjectRoot = getIosNamedProjectPath(projectRoot);\n\n // Ensure the Images.xcassets/AppIcon.appiconset path exists\n await fs.ensureDir(join(iosNamedProjectRoot, IMAGESET_PATH));\n\n // Store the image JSON data for assigning via the Contents.json\n const imagesJson: ContentsJson['images'] = [];\n\n // keep track of icons that have been generated so we can reuse them in the Contents.json\n const generatedIcons: Record<string, boolean> = {};\n\n for (const platform of ICON_CONTENTS) {\n const isMarketing = platform.idiom === 'ios-marketing';\n for (const { size, scales } of platform.sizes) {\n for (const scale of scales) {\n // The marketing icon is special because it makes no sense.\n const filename = isMarketing ? 'ItunesArtwork@2x.png' : getAppleIconName(size, scale);\n // Only create an image that hasn't already been generated.\n if (!(filename in generatedIcons)) {\n const iconSizePx = size * scale;\n\n // Using this method will cache the images in `.expo` based on the properties used to generate them.\n // this method also supports remote URLs and using the global sharp instance.\n const { source } = await generateImageAsync(\n { projectRoot, cacheType: IMAGE_CACHE_NAME },\n {\n src: icon,\n name: filename,\n width: iconSizePx,\n height: iconSizePx,\n removeTransparency: true,\n // The icon should be square, but if it's not then it will be cropped.\n resizeMode: 'cover',\n // Force the background color to solid white to prevent any transparency.\n // TODO: Maybe use a more adaptive option based on the icon color?\n backgroundColor: '#ffffff',\n }\n );\n // Write image buffer to the file system.\n const assetPath = join(iosNamedProjectRoot, IMAGESET_PATH, filename);\n await fs.writeFile(assetPath, source);\n // Save a reference to the generated image so we don't create a duplicate.\n generatedIcons[filename] = true;\n }\n imagesJson.push({\n idiom: platform.idiom,\n size: `${size}x${size}`,\n // @ts-ignore: template types not supported in TS yet\n scale: `${scale}x`,\n filename,\n });\n }\n }\n }\n\n // Finally, write the Config.json\n await writeContentsJsonAsync(join(iosNamedProjectRoot, IMAGESET_PATH), { images: imagesJson });\n}\n\n/**\n * Return the project's named iOS path: ios/MyProject/\n *\n * @param projectRoot Expo project root path.\n */\nfunction getIosNamedProjectPath(projectRoot: string): string {\n const projectName = getProjectName(projectRoot);\n return join(projectRoot, 'ios', projectName);\n}\n\nfunction getAppleIconName(size: number, scale: number): string {\n return `App-Icon-${size}x${size}@${scale}x.png`;\n}\n"],"mappings":";;;;;;;;;AAAA;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;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA+F;AAAA;AAE/F,MAAM;EAAEA;AAAe,CAAC,GAAGC,0BAAS,CAACC,UAAU;AAExC,MAAMC,YAA0B,GAAIC,MAAM,IAAK;EACpD,OAAO,IAAAC,iCAAgB,EAACD,MAAM,EAAE,CAC9B,KAAK,EACL,MAAOA,MAAM,IAAK;IAChB,MAAME,aAAa,CAACF,MAAM,EAAEA,MAAM,CAACG,UAAU,CAACC,WAAW,CAAC;IAC1D,OAAOJ,MAAM;EACf,CAAC,CACF,CAAC;AACJ,CAAC;AAAC;AAEF,MAAMK,gBAAgB,GAAG,OAAO;AAChC,MAAMC,aAAa,GAAG,oCAAoC;;AAE1D;AACO,MAAMC,aAGV,GAAG,CACJ;EACEC,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE,CACL;IACEC,IAAI,EAAE,EAAE;IACRC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;EACf,CAAC,EACD;IACED,IAAI,EAAE,EAAE;IACRC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;EAClB,CAAC,EACD;IACED,IAAI,EAAE,EAAE;IACRC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;EACf,CAAC,EACD;IACED,IAAI,EAAE,EAAE;IACRC,MAAM,EAAE,CAAC,CA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C;MACJ;IACF;EACF;;EAEA;EACA,MAAM,IAAAgB,uCAAsB,EAAC,IAAAtB,YAAI,EAACJ,mBAAmB,EAAEX,aAAa,CAAC,EAAE;IAAEsC,MAAM,EAAEtB;EAAW,CAAC,CAAC;AAChG;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASJ,sBAAsB,CAACd,WAAmB,EAAU;EAC3D,MAAMyC,WAAW,GAAGjD,cAAc,CAACQ,WAAW,CAAC;EAC/C,OAAO,IAAAiB,YAAI,EAACjB,WAAW,EAAE,KAAK,EAAEyC,WAAW,CAAC;AAC9C;AAEA,SAASjB,gBAAgB,CAAClB,IAAY,EAAEgB,KAAa,EAAU;EAC7D,OAAQ,YAAWhB,IAAK,IAAGA,IAAK,IAAGgB,KAAM,OAAM;AACjD"}
1
+ {"version":3,"file":"withIosIcons.js","names":["_configPlugins","data","require","_imageUtils","fs","_interopRequireWildcard","_path","_AssetContents","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getProjectName","IOSConfig","XcodeUtils","withIosIcons","config","withDangerousMod","setIconsAsync","modRequest","projectRoot","exports","IMAGE_CACHE_NAME","IMAGESET_PATH","ICON_CONTENTS","idiom","sizes","size","scales","getIcons","_config$ios","ios","icon","WarningAggregator","addWarningIOS","iosNamedProjectRoot","getIosNamedProjectPath","ensureDir","join","imagesJson","generatedIcons","platform","isMarketing","scale","filename","getAppleIconName","iconSizePx","source","generateImageAsync","cacheType","src","name","width","height","removeTransparency","resizeMode","backgroundColor","assetPath","writeFile","push","writeContentsJsonAsync","images","projectName"],"sources":["../../../src/plugins/icons/withIosIcons.ts"],"sourcesContent":["import { ConfigPlugin, IOSConfig, WarningAggregator, withDangerousMod } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport { generateImageAsync } from '@expo/image-utils';\nimport * as fs from 'fs-extra';\nimport { join } from 'path';\n\nimport { ContentsJson, ContentsJsonImageIdiom, writeContentsJsonAsync } from './AssetContents';\n\nconst { getProjectName } = IOSConfig.XcodeUtils;\n\nexport const withIosIcons: ConfigPlugin = (config) => {\n return withDangerousMod(config, [\n 'ios',\n async (config) => {\n await setIconsAsync(config, config.modRequest.projectRoot);\n return config;\n },\n ]);\n};\n\nconst IMAGE_CACHE_NAME = 'icons';\nconst IMAGESET_PATH = 'Images.xcassets/AppIcon.appiconset';\n\n// Hard-coding seemed like the clearest and safest way to implement the sizes.\nexport const ICON_CONTENTS: {\n idiom: ContentsJsonImageIdiom;\n sizes: { size: number; scales: (1 | 2 | 3)[] }[];\n}[] = [\n {\n idiom: 'iphone',\n sizes: [\n {\n size: 20,\n scales: [2, 3],\n },\n {\n size: 29,\n scales: [1, 2, 3],\n },\n {\n size: 40,\n scales: [2, 3],\n },\n {\n size: 60,\n scales: [2, 3],\n },\n // TODO: 76x76@2x seems unused now\n // {\n // size: 76,\n // scales: [2],\n // },\n ],\n },\n {\n idiom: 'ipad',\n sizes: [\n {\n size: 20,\n scales: [1, 2],\n },\n {\n size: 29,\n scales: [1, 2],\n },\n {\n size: 40,\n scales: [1, 2],\n },\n {\n size: 76,\n scales: [1, 2],\n },\n {\n size: 83.5,\n scales: [2],\n },\n ],\n },\n {\n idiom: 'ios-marketing',\n sizes: [\n {\n size: 1024,\n scales: [1],\n },\n ],\n },\n];\n\nexport function getIcons(config: Pick<ExpoConfig, 'icon' | 'ios'>): string | null {\n // No support for empty strings.\n return config.ios?.icon || config.icon || null;\n}\n\nexport async function setIconsAsync(config: ExpoConfig, projectRoot: string) {\n const icon = getIcons(config);\n if (!icon) {\n WarningAggregator.addWarningIOS(\n 'icon',\n 'This is the image that your app uses on your home screen, you will need to configure it manually.'\n );\n return;\n }\n\n // Something like projectRoot/ios/MyApp/\n const iosNamedProjectRoot = getIosNamedProjectPath(projectRoot);\n\n // Ensure the Images.xcassets/AppIcon.appiconset path exists\n await fs.ensureDir(join(iosNamedProjectRoot, IMAGESET_PATH));\n\n // Store the image JSON data for assigning via the Contents.json\n const imagesJson: ContentsJson['images'] = [];\n\n // keep track of icons that have been generated so we can reuse them in the Contents.json\n const generatedIcons: Record<string, boolean> = {};\n\n for (const platform of ICON_CONTENTS) {\n const isMarketing = platform.idiom === 'ios-marketing';\n for (const { size, scales } of platform.sizes) {\n for (const scale of scales) {\n // The marketing icon is special because it makes no sense.\n const filename = isMarketing ? 'ItunesArtwork@2x.png' : getAppleIconName(size, scale);\n // Only create an image that hasn't already been generated.\n if (!(filename in generatedIcons)) {\n const iconSizePx = size * scale;\n\n // Using this method will cache the images in `.expo` based on the properties used to generate them.\n // this method also supports remote URLs and using the global sharp instance.\n const { source } = await generateImageAsync(\n { projectRoot, cacheType: IMAGE_CACHE_NAME },\n {\n src: icon,\n name: filename,\n width: iconSizePx,\n height: iconSizePx,\n removeTransparency: true,\n // The icon should be square, but if it's not then it will be cropped.\n resizeMode: 'cover',\n // Force the background color to solid white to prevent any transparency.\n // TODO: Maybe use a more adaptive option based on the icon color?\n backgroundColor: '#ffffff',\n }\n );\n // Write image buffer to the file system.\n const assetPath = join(iosNamedProjectRoot, IMAGESET_PATH, filename);\n await fs.writeFile(assetPath, source);\n // Save a reference to the generated image so we don't create a duplicate.\n generatedIcons[filename] = true;\n }\n imagesJson.push({\n idiom: platform.idiom,\n size: `${size}x${size}`,\n // @ts-ignore: template types not supported in TS yet\n scale: `${scale}x`,\n filename,\n });\n }\n }\n }\n\n // Finally, write the Config.json\n await writeContentsJsonAsync(join(iosNamedProjectRoot, IMAGESET_PATH), { images: imagesJson });\n}\n\n/**\n * Return the project's named iOS path: ios/MyProject/\n *\n * @param projectRoot Expo project root path.\n */\nfunction getIosNamedProjectPath(projectRoot: string): string {\n const projectName = getProjectName(projectRoot);\n return join(projectRoot, 'ios', projectName);\n}\n\nfunction getAppleIconName(size: number, scale: number): string {\n return `App-Icon-${size}x${size}@${scale}x.png`;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,IAAI;QACjC;QACAL,UAAU,CAACoB,IAAI,CAAC;UACdlC,KAAK,EAAEgB,QAAQ,CAAChB,KAAK;UACrBE,IAAI,EAAG,GAAEA,IAAK,IAAGA,IAAK,EAAC;UACvB;UACAgB,KAAK,EAAG,GAAEA,KAAM,GAAE;UAClBC;QACF,CAAC,CAAC;MACJ;IACF;EACF;;EAEA;EACA,MAAM,IAAAgB,uCAAsB,EAAC,IAAAtB,YAAI,EAACH,mBAAmB,EAAEZ,aAAa,CAAC,EAAE;IAAEsC,MAAM,EAAEtB;EAAW,CAAC,CAAC;AAChG;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASH,sBAAsBA,CAAChB,WAAmB,EAAU;EAC3D,MAAM0C,WAAW,GAAGlD,cAAc,CAACQ,WAAW,CAAC;EAC/C,OAAO,IAAAkB,YAAI,EAAClB,WAAW,EAAE,KAAK,EAAE0C,WAAW,CAAC;AAC9C;AAEA,SAASjB,gBAAgBA,CAAClB,IAAY,EAAEgB,KAAa,EAAU;EAC7D,OAAQ,YAAWhB,IAAK,IAAGA,IAAK,IAAGgB,KAAM,OAAM;AACjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"createLegacyPlugin.js","names":["toCamelCase","s","replace","x","toUpperCase","isModuleExcluded","config","packageName","_internal","autolinkedModules","includes","createLegacyPlugin","fallback","withFallback","Array","isArray","withPlugins","withUnknown","createRunOncePlugin","withStaticPlugin","_isLegacyPlugin","plugin","methodName","Object","defineProperty","value"],"sources":["../../../src/plugins/unversioned/createLegacyPlugin.ts"],"sourcesContent":["import {\n ConfigPlugin,\n createRunOncePlugin,\n PluginParameters,\n withPlugins,\n withStaticPlugin,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst toCamelCase = (s: string) => s.replace(/-./g, (x) => x.toUpperCase()[1]);\n\nfunction isModuleExcluded(config: Pick<ExpoConfig, '_internal'>, packageName: string): boolean {\n // Skip using the versioned plugin when autolinking is enabled\n // and doesn't link the native module.\n return (\n config._internal?.autolinkedModules && !config._internal.autolinkedModules.includes(packageName)\n );\n}\n\nexport function createLegacyPlugin({\n packageName,\n fallback,\n}: {\n packageName: string;\n fallback: ConfigPlugin | PluginParameters<typeof withPlugins>;\n}): ConfigPlugin {\n let withFallback: ConfigPlugin;\n\n if (Array.isArray(fallback)) {\n withFallback = (config) => withPlugins(config, fallback);\n } else {\n withFallback = fallback;\n }\n\n const withUnknown: ConfigPlugin = (config) => {\n // Skip using the versioned plugin when autolinking is enabled\n // and doesn't link the native module.\n if (isModuleExcluded(config, packageName)) {\n return createRunOncePlugin(withFallback, packageName)(config);\n }\n\n return withStaticPlugin(config, {\n _isLegacyPlugin: true,\n plugin: packageName,\n // If the static plugin isn't found, use the unversioned one.\n fallback: createRunOncePlugin(withFallback, packageName),\n });\n };\n\n const methodName = toCamelCase(`with-${packageName}`);\n Object.defineProperty(withUnknown, 'name', {\n value: methodName,\n });\n\n return withUnknown;\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AASA,MAAMA,WAAW,GAAIC,CAAS,IAAKA,CAAC,CAACC,OAAO,CAAC,KAAK,EAAGC,CAAC,IAAKA,CAAC,CAACC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9E,SAASC,gBAAgB,CAACC,MAAqC,EAAEC,WAAmB,EAAW;EAAA;EAC7F;EACA;EACA,OACE,sBAAAD,MAAM,CAACE,SAAS,sDAAhB,kBAAkBC,iBAAiB,KAAI,CAACH,MAAM,CAACE,SAAS,CAACC,iBAAiB,CAACC,QAAQ,CAACH,WAAW,CAAC;AAEpG;AAEO,SAASI,kBAAkB,CAAC;EACjCJ,WAAW;EACXK;AAIF,CAAC,EAAgB;EACf,IAAIC,YAA0B;EAE9B,IAAIC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,EAAE;IAC3BC,YAAY,GAAIP,MAAM,IAAK,IAAAU,4BAAW,EAACV,MAAM,EAAEM,QAAQ,CAAC;EAC1D,CAAC,MAAM;IACLC,YAAY,GAAGD,QAAQ;EACzB;EAEA,MAAMK,WAAyB,GAAIX,MAAM,IAAK;IAC5C;IACA;IACA,IAAID,gBAAgB,CAACC,MAAM,EAAEC,WAAW,CAAC,EAAE;MACzC,OAAO,IAAAW,oCAAmB,EAACL,YAAY,EAAEN,WAAW,CAAC,CAACD,MAAM,CAAC;IAC/D;IAEA,OAAO,IAAAa,iCAAgB,EAACb,MAAM,EAAE;MAC9Bc,eAAe,EAAE,IAAI;MACrBC,MAAM,EAAEd,WAAW;MACnB;MACAK,QAAQ,EAAE,IAAAM,oCAAmB,EAACL,YAAY,EAAEN,WAAW;IACzD,CAAC,CAAC;EACJ,CAAC;EAED,MAAMe,UAAU,GAAGtB,WAAW,CAAE,QAAOO,WAAY,EAAC,CAAC;EACrDgB,MAAM,CAACC,cAAc,CAACP,WAAW,EAAE,MAAM,EAAE;IACzCQ,KAAK,EAAEH;EACT,CAAC,CAAC;EAEF,OAAOL,WAAW;AACpB"}
1
+ {"version":3,"file":"createLegacyPlugin.js","names":["_configPlugins","data","require","toCamelCase","s","replace","x","toUpperCase","isModuleExcluded","config","packageName","_config$_internal","_internal","autolinkedModules","includes","createLegacyPlugin","fallback","withFallback","Array","isArray","withPlugins","withUnknown","createRunOncePlugin","withStaticPlugin","_isLegacyPlugin","plugin","methodName","Object","defineProperty","value"],"sources":["../../../src/plugins/unversioned/createLegacyPlugin.ts"],"sourcesContent":["import {\n ConfigPlugin,\n createRunOncePlugin,\n PluginParameters,\n withPlugins,\n withStaticPlugin,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst toCamelCase = (s: string) => s.replace(/-./g, (x) => x.toUpperCase()[1]);\n\nfunction isModuleExcluded(config: Pick<ExpoConfig, '_internal'>, packageName: string): boolean {\n // Skip using the versioned plugin when autolinking is enabled\n // and doesn't link the native module.\n return (\n config._internal?.autolinkedModules && !config._internal.autolinkedModules.includes(packageName)\n );\n}\n\nexport function createLegacyPlugin({\n packageName,\n fallback,\n}: {\n packageName: string;\n fallback: ConfigPlugin | PluginParameters<typeof withPlugins>;\n}): ConfigPlugin {\n let withFallback: ConfigPlugin;\n\n if (Array.isArray(fallback)) {\n withFallback = (config) => withPlugins(config, fallback);\n } else {\n withFallback = fallback;\n }\n\n const withUnknown: ConfigPlugin = (config) => {\n // Skip using the versioned plugin when autolinking is enabled\n // and doesn't link the native module.\n if (isModuleExcluded(config, packageName)) {\n return createRunOncePlugin(withFallback, packageName)(config);\n }\n\n return withStaticPlugin(config, {\n _isLegacyPlugin: true,\n plugin: packageName,\n // If the static plugin isn't found, use the unversioned one.\n fallback: createRunOncePlugin(withFallback, packageName),\n });\n };\n\n const methodName = toCamelCase(`with-${packageName}`);\n Object.defineProperty(withUnknown, 'name', {\n value: methodName,\n });\n\n return withUnknown;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AASA,MAAME,WAAW,GAAIC,CAAS,IAAKA,CAAC,CAACC,OAAO,CAAC,KAAK,EAAGC,CAAC,IAAKA,CAAC,CAACC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9E,SAASC,gBAAgBA,CAACC,MAAqC,EAAEC,WAAmB,EAAW;EAAA,IAAAC,iBAAA;EAC7F;EACA;EACA,OACE,EAAAA,iBAAA,GAAAF,MAAM,CAACG,SAAS,cAAAD,iBAAA,uBAAhBA,iBAAA,CAAkBE,iBAAiB,KAAI,CAACJ,MAAM,CAACG,SAAS,CAACC,iBAAiB,CAACC,QAAQ,CAACJ,WAAW,CAAC;AAEpG;AAEO,SAASK,kBAAkBA,CAAC;EACjCL,WAAW;EACXM;AAIF,CAAC,EAAgB;EACf,IAAIC,YAA0B;EAE9B,IAAIC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,EAAE;IAC3BC,YAAY,GAAIR,MAAM,IAAK,IAAAW,4BAAW,EAACX,MAAM,EAAEO,QAAQ,CAAC;EAC1D,CAAC,MAAM;IACLC,YAAY,GAAGD,QAAQ;EACzB;EAEA,MAAMK,WAAyB,GAAIZ,MAAM,IAAK;IAC5C;IACA;IACA,IAAID,gBAAgB,CAACC,MAAM,EAAEC,WAAW,CAAC,EAAE;MACzC,OAAO,IAAAY,oCAAmB,EAACL,YAAY,EAAEP,WAAW,CAAC,CAACD,MAAM,CAAC;IAC/D;IAEA,OAAO,IAAAc,iCAAgB,EAACd,MAAM,EAAE;MAC9Be,eAAe,EAAE,IAAI;MACrBC,MAAM,EAAEf,WAAW;MACnB;MACAM,QAAQ,EAAE,IAAAM,oCAAmB,EAACL,YAAY,EAAEP,WAAW;IACzD,CAAC,CAAC;EACJ,CAAC;EAED,MAAMgB,UAAU,GAAGvB,WAAW,CAAE,QAAOO,WAAY,EAAC,CAAC;EACrDiB,MAAM,CAACC,cAAc,CAACP,WAAW,EAAE,MAAM,EAAE;IACzCQ,KAAK,EAAEH;EACT,CAAC,CAAC;EAEF,OAAOL,WAAW;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"expo-ads-admob.js","names":["createLegacyPlugin","packageName","fallback","withAndroidAdMob","withIosAdMob"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/expo-ads-admob.ts"],"sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport { withAndroidAdMob } from './withAndroidAdMob';\nimport { withIosAdMob } from './withIosAdMob';\n\nexport default createLegacyPlugin({\n packageName: 'expo-ads-admob',\n fallback: [withAndroidAdMob, withIosAdMob],\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA8C,eAE/B,IAAAA,wCAAkB,EAAC;EAChCC,WAAW,EAAE,gBAAgB;EAC7BC,QAAQ,EAAE,CAACC,oCAAgB,EAAEC,4BAAY;AAC3C,CAAC,CAAC;AAAA"}
1
+ {"version":3,"file":"expo-ads-admob.js","names":["_createLegacyPlugin","data","require","_withAndroidAdMob","_withIosAdMob","_default","createLegacyPlugin","packageName","fallback","withAndroidAdMob","withIosAdMob","exports","default"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/expo-ads-admob.ts"],"sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport { withAndroidAdMob } from './withAndroidAdMob';\nimport { withIosAdMob } from './withIosAdMob';\n\nexport default createLegacyPlugin({\n packageName: 'expo-ads-admob',\n fallback: [withAndroidAdMob, withIosAdMob],\n});\n"],"mappings":";;;;;;AAAA,SAAAA,oBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,mBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,kBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,iBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,IAAAI,QAAA,GAE/B,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,gBAAgB;EAC7BC,QAAQ,EAAE,CAACC,oCAAgB,EAAEC,4BAAY;AAC3C,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAP,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"withAndroidAdMob.js","names":["addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","META_APPLICATION_ID","META_DELAY_APP_MEASUREMENT_INIT","withAndroidAdMob","config","withAndroidManifest","modResults","setAdMobConfig","getGoogleMobileAdsAppId","android","googleMobileAdsAppId","getGoogleMobileAdsAutoInit","googleMobileAdsAutoInit","androidManifest","appId","autoInit","mainApplication","String"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/withAndroidAdMob.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst {\n addMetaDataItemToMainApplication,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n} = AndroidConfig.Manifest;\n\nconst META_APPLICATION_ID = 'com.google.android.gms.ads.APPLICATION_ID';\nconst META_DELAY_APP_MEASUREMENT_INIT = 'com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT';\n\nexport const withAndroidAdMob: ConfigPlugin = (config) => {\n return withAndroidManifest(config, (config) => {\n config.modResults = setAdMobConfig(config, config.modResults);\n return config;\n });\n};\n\nexport function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMobileAdsAppId ?? null;\n}\n\nexport function getGoogleMobileAdsAutoInit(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMobileAdsAutoInit ?? false;\n}\n\nexport function setAdMobConfig(\n config: Pick<ExpoConfig, 'android'>,\n androidManifest: AndroidConfig.Manifest.AndroidManifest\n) {\n const appId = getGoogleMobileAdsAppId(config);\n const autoInit = getGoogleMobileAdsAutoInit(config);\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (appId) {\n addMetaDataItemToMainApplication(mainApplication, META_APPLICATION_ID, appId);\n addMetaDataItemToMainApplication(\n mainApplication,\n META_DELAY_APP_MEASUREMENT_INIT,\n String(!autoInit)\n );\n } else {\n removeMetaDataItemFromMainApplication(mainApplication, META_APPLICATION_ID);\n removeMetaDataItemFromMainApplication(mainApplication, META_DELAY_APP_MEASUREMENT_INIT);\n }\n\n return androidManifest;\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA,MAA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Ae;AACxB"}
1
+ {"version":3,"file":"withAndroidAdMob.js","names":["_configPlugins","data","require","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","META_APPLICATION_ID","META_DELAY_APP_MEASUREMENT_INIT","withAndroidAdMob","config","withAndroidManifest","modResults","setAdMobConfig","exports","getGoogleMobileAdsAppId","_config$android$confi","_config$android","_config$android$confi2","android","googleMobileAdsAppId","getGoogleMobileAdsAutoInit","_config$android$confi3","_config$android2","_config$android2$conf","googleMobileAdsAutoInit","androidManifest","appId","autoInit","mainApplication","String"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/withAndroidAdMob.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst {\n addMetaDataItemToMainApplication,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n} = AndroidConfig.Manifest;\n\nconst META_APPLICATION_ID = 'com.google.android.gms.ads.APPLICATION_ID';\nconst META_DELAY_APP_MEASUREMENT_INIT = 'com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT';\n\nexport const withAndroidAdMob: ConfigPlugin = (config) => {\n return withAndroidManifest(config, (config) => {\n config.modResults = setAdMobConfig(config, config.modResults);\n return config;\n });\n};\n\nexport function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMobileAdsAppId ?? null;\n}\n\nexport function getGoogleMobileAdsAutoInit(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMobileAdsAutoInit ?? false;\n}\n\nexport function setAdMobConfig(\n config: Pick<ExpoConfig, 'android'>,\n androidManifest: AndroidConfig.Manifest.AndroidManifest\n) {\n const appId = getGoogleMobileAdsAppId(config);\n const autoInit = getGoogleMobileAdsAutoInit(config);\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (appId) {\n addMetaDataItemToMainApplication(mainApplication, META_APPLICATION_ID, appId);\n addMetaDataItemToMainApplication(\n mainApplication,\n META_DELAY_APP_MEASUREMENT_INIT,\n String(!autoInit)\n );\n } else {\n removeMetaDataItemFromMainApplication(mainApplication, META_APPLICATION_ID);\n removeMetaDataItemFromMainApplication(mainApplication, META_DELAY_APP_MEASUREMENT_INIT);\n }\n\n return androidManifest;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,MAAM;EACJE,gCAAgC;EAChCC,yBAAyB;EACzBC;AACF,CAAC,GAAGC,8BAAa,CAACC,QAAQ;AAE1B,MAAMC,mBAAmB,GAAG,2CAA2C;AACvE,MAAMC,+BAA+B,GAAG,uDAAuD;AAExF,MAAMC,gBAA8B,GAAIC,MAAM,IAAK;EACxD,OAAO,IAAAC,oCAAmB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC7CA,MAAM,CAACE,UAAU,GAAGC,cAAc,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC7D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAL,gBAAA,GAAAA,gBAAA;AAEK,SAASM,uBAAuBA,CAACL,MAAmC,EAAE;EAAA,IAAAM,qBAAA,EAAAC,eAAA,EAAAC,sBAAA;EAC3E,QAAAF,qBAAA,IAAAC,eAAA,GAAOP,MAAM,CAACS,OAAO,cAAAF,eAAA,wBAAAC,sBAAA,GAAdD,eAAA,CAAgBP,MAAM,cAAAQ,sBAAA,uBAAtBA,sBAAA,CAAwBE,oBAAoB,cAAAJ,qBAAA,cAAAA,qBAAA,GAAI,IAAI;AAC7D;AAEO,SAASK,0BAA0BA,CAACX,MAAmC,EAAE;EAAA,IAAAY,sBAAA,EAAAC,gBAAA,EAAAC,qBAAA;EAC9E,QAAAF,sBAAA,IAAAC,gBAAA,GAAOb,MAAM,CAACS,OAAO,cAAAI,gBAAA,wBAAAC,qBAAA,GAAdD,gBAAA,CAAgBb,MAAM,cAAAc,qBAAA,uBAAtBA,qBAAA,CAAwBC,uBAAuB,cAAAH,sBAAA,cAAAA,sBAAA,GAAI,KAAK;AACjE;AAEO,SAAST,cAAcA,CAC5BH,MAAmC,EACnCgB,eAAuD,EACvD;EACA,MAAMC,KAAK,GAAGZ,uBAAuB,CAACL,MAAM,CAAC;EAC7C,MAAMkB,QAAQ,GAAGP,0BAA0B,CAACX,MAAM,CAAC;EACnD,MAAMmB,eAAe,GAAG1B,yBAAyB,CAACuB,eAAe,CAAC;EAElE,IAAIC,KAAK,EAAE;IACTzB,gCAAgC,CAAC2B,eAAe,EAAEtB,mBAAmB,EAAEoB,KAAK,CAAC;IAC7EzB,gCAAgC,CAC9B2B,eAAe,EACfrB,+BAA+B,EAC/BsB,MAAM,CAAC,CAACF,QAAQ,CAAC,CAClB;EACH,CAAC,MAAM;IACLxB,qCAAqC,CAACyB,eAAe,EAAEtB,mBAAmB,CAAC;IAC3EH,qCAAqC,CAACyB,eAAe,EAAErB,+BAA+B,CAAC;EACzF;EAEA,OAAOkB,eAAe;AACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"withIosAdMob.js","names":["withIosAdMob","config","withInfoPlist","modResults","setAdMobConfig","getGoogleMobileAdsAppId","ios","googleMobileAdsAppId","setGoogleMobileAdsAppId","GADApplicationIdentifier","infoPlist","appId"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/withIosAdMob.ts"],"sourcesContent":["import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withIosAdMob: ConfigPlugin = (config) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setAdMobConfig(config, config.modResults);\n return config;\n });\n};\n\n// NOTE(brentvatne): if the developer has installed the google ads sdk and does\n// not provide an app id their app will crash. Standalone apps get around this by\n// providing some default value, we will instead here assume that the user can\n// do the right thing if they have installed the package. This is a slight discrepancy\n// that arises in ejecting because it's possible for the package to be installed and\n// not crashing in the managed workflow, then you eject and the app crashes because\n// you don't have an id to fall back to.\nexport function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.googleMobileAdsAppId ?? null;\n}\n\nexport function setGoogleMobileAdsAppId(\n config: Pick<ExpoConfig, 'ios'>,\n { GADApplicationIdentifier, ...infoPlist }: InfoPlist\n): InfoPlist {\n const appId = getGoogleMobileAdsAppId(config);\n\n if (appId === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n GADApplicationIdentifier: appId,\n };\n}\n\nfunction setAdMobConfig(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n infoPlist = setGoogleMobileAdsAppId(config, infoPlist);\n return infoPlist;\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,YAA0B,GAAIC,MAAM,IAAK;EACpD,OAAO,IAAAC,8BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,GAAGC,cAAc,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC7D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACO,SAASI,uBAAuB,CAACJ,MAA+B,EAAE;EAAA;EACvE,+CAAOA,MAAM,CAACK,GAAG,sEAAV,YAAYL,MAAM,uDAAlB,mBAAoBM,oBAAoB,yEAAI,IAAI;AACzD;AAEO,SAASC,uBAAuB,CACrCP,MAA+B,EAC/B;EAAEQ,wBAAwB;EAAE,GAAGC;AAAqB,CAAC,EAC1C;EACX,MAAMC,KAAK,GAAGN,uBAAuB,CAACJ,MAAM,CAAC;EAE7C,IAAIU,KAAK,KAAK,IAAI,EAAE;IAClB,OAAOD,SAAS;EAClB;EAEA,OAAO;IACL,GAAGA,SAAS;IACZD,wBAAwB,EAAEE;EAC5B,CAAC;AACH;AAEA,SAASP,cAAc,CAACH,MAA+B,EAAES,SAAoB,EAAa;EACxFA,SAAS,GAAGF,uBAAuB,CAACP,MAAM,EAAES,SAAS,CAAC;EACtD,OAAOA,SAAS;AAClB"}
1
+ {"version":3,"file":"withIosAdMob.js","names":["_configPlugins","data","require","withIosAdMob","config","withInfoPlist","modResults","setAdMobConfig","exports","getGoogleMobileAdsAppId","_config$ios$config$go","_config$ios","_config$ios$config","ios","googleMobileAdsAppId","setGoogleMobileAdsAppId","GADApplicationIdentifier","infoPlist","appId"],"sources":["../../../../src/plugins/unversioned/expo-ads-admob/withIosAdMob.ts"],"sourcesContent":["import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withIosAdMob: ConfigPlugin = (config) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setAdMobConfig(config, config.modResults);\n return config;\n });\n};\n\n// NOTE(brentvatne): if the developer has installed the google ads sdk and does\n// not provide an app id their app will crash. Standalone apps get around this by\n// providing some default value, we will instead here assume that the user can\n// do the right thing if they have installed the package. This is a slight discrepancy\n// that arises in ejecting because it's possible for the package to be installed and\n// not crashing in the managed workflow, then you eject and the app crashes because\n// you don't have an id to fall back to.\nexport function getGoogleMobileAdsAppId(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.googleMobileAdsAppId ?? null;\n}\n\nexport function setGoogleMobileAdsAppId(\n config: Pick<ExpoConfig, 'ios'>,\n { GADApplicationIdentifier, ...infoPlist }: InfoPlist\n): InfoPlist {\n const appId = getGoogleMobileAdsAppId(config);\n\n if (appId === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n GADApplicationIdentifier: appId,\n };\n}\n\nfunction setAdMobConfig(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n infoPlist = setGoogleMobileAdsAppId(config, infoPlist);\n return infoPlist;\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","config","withEntitlementsPlist","ios","usesAppleSignIn","WarningAggregator","addWarningIOS","createLegacyPlugin","packageName","fallback"],"sources":["../../../src/plugins/unversioned/expo-apple-authentication.ts"],"sourcesContent":["import { ConfigPlugin, WarningAggregator, withEntitlementsPlist } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst withAppleSignInWarning: ConfigPlugin = (config) => {\n return withEntitlementsPlist(config, (config) => {\n if (config.ios?.usesAppleSignIn) {\n WarningAggregator.addWarningIOS(\n 'ios.usesAppleSignIn',\n 'Install expo-apple-authentication to enable this feature',\n 'https://docs.expo.dev/versions/latest/sdk/apple-authentication/#eas-build'\n );\n }\n\n return config;\n });\n};\n\nexport default createLegacyPlugin({\n packageName: 'expo-apple-authentication',\n fallback: withAppleSignInWarning,\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,sBAAoC,GAAIC,MAAM,IAAK;EACvD,OAAO,IAAAC,sCAAqB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAAA;IAC/C,mBAAIA,MAAM,CAACE,GAAG,wCAAV,YAAYC,eAAe,EAAE;MAC/BC,kCAAiB,CAACC,aAAa,CAC7B,qBAAqB,EACrB,0DAA0D,EAC1D,2EAA2E,CAC5E;IACH;IAEA,OAAOL,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC,eAEa,IAAAM,wCAAkB,EAAC;EAChCC,WAAW,EAAE,2BAA2B;EACxCC,QAAQ,EAAET;AACZ,CAAC,CAAC;AAAA"}
1
+ {"version":3,"file":"expo-apple-authentication.js","names":["_configPlugins","data","require","_createLegacyPlugin","withAppleSignInWarning","config","withEntitlementsPlist","_config$ios","ios","usesAppleSignIn","WarningAggregator","addWarningIOS","_default","createLegacyPlugin","packageName","fallback","exports","default"],"sources":["../../../src/plugins/unversioned/expo-apple-authentication.ts"],"sourcesContent":["import { ConfigPlugin, WarningAggregator, withEntitlementsPlist } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst withAppleSignInWarning: ConfigPlugin = (config) => {\n return withEntitlementsPlist(config, (config) => {\n if (config.ios?.usesAppleSignIn) {\n WarningAggregator.addWarningIOS(\n 'ios.usesAppleSignIn',\n 'Install expo-apple-authentication to enable this feature',\n 'https://docs.expo.dev/versions/latest/sdk/apple-authentication/#eas-build'\n );\n }\n\n return config;\n });\n};\n\nexport default createLegacyPlugin({\n packageName: 'expo-apple-authentication',\n fallback: withAppleSignInWarning,\n});\n"],"mappings":";;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,oBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,mBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAMG,sBAAoC,GAAIC,MAAM,IAAK;EACvD,OAAO,IAAAC,sCAAqB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAAA,IAAAE,WAAA;IAC/C,KAAAA,WAAA,GAAIF,MAAM,CAACG,GAAG,cAAAD,WAAA,eAAVA,WAAA,CAAYE,eAAe,EAAE;MAC/BC,kCAAiB,CAACC,aAAa,CAC7B,qBAAqB,EACrB,0DAA0D,EAC1D,2EAA2E,CAC5E;IACH;IAEA,OAAON,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAO,QAAA,GAEa,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,2BAA2B;EACxCC,QAAQ,EAAEX;AACZ,CAAC,CAAC;AAAAY,OAAA,CAAAC,OAAA,GAAAL,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"expo-branch.js","names":["createLegacyPlugin","packageName","fallback","withAndroidBranch","withIosBranch"],"sources":["../../../../src/plugins/unversioned/expo-branch/expo-branch.ts"],"sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport { withAndroidBranch } from './withAndroidBranch';\nimport { withIosBranch } from './withIosBranch';\n\nexport default createLegacyPlugin({\n packageName: 'expo-branch',\n fallback: [\n // Android\n withAndroidBranch,\n // iOS\n withIosBranch,\n ],\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAgD,eAEjC,IAAAA,wCAAkB,EAAC;EAChCC,WAAW,EAAE,aAAa;EAC1BC,QAAQ,EAAE;EACR;EACAC,sCAAiB;EACjB;EACAC,8BAAa;AAEjB,CAAC,CAAC;AAAA"}
1
+ {"version":3,"file":"expo-branch.js","names":["_createLegacyPlugin","data","require","_withAndroidBranch","_withIosBranch","_default","createLegacyPlugin","packageName","fallback","withAndroidBranch","withIosBranch","exports","default"],"sources":["../../../../src/plugins/unversioned/expo-branch/expo-branch.ts"],"sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport { withAndroidBranch } from './withAndroidBranch';\nimport { withIosBranch } from './withIosBranch';\n\nexport default createLegacyPlugin({\n packageName: 'expo-branch',\n fallback: [\n // Android\n withAndroidBranch,\n // iOS\n withIosBranch,\n ],\n});\n"],"mappings":";;;;;;AAAA,SAAAA,oBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,mBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,mBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,eAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,cAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,IAAAI,QAAA,GAEjC,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,aAAa;EAC1BC,QAAQ,EAAE;EACR;EACAC,sCAAiB;EACjB;EACAC,8BAAa;AAEjB,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAP,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"withAndroidBranch.js","names":["addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","META_BRANCH_KEY","withAndroidBranch","config","withAndroidManifest","modResults","setBranchApiKey","getBranchApiKey","android","branch","apiKey","androidManifest","mainApplication"],"sources":["../../../../src/plugins/unversioned/expo-branch/withAndroidBranch.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst {\n addMetaDataItemToMainApplication,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n} = AndroidConfig.Manifest;\n\nconst META_BRANCH_KEY = 'io.branch.sdk.BranchKey';\n\nexport const withAndroidBranch: ConfigPlugin = (config) => {\n return withAndroidManifest(config, (config) => {\n config.modResults = setBranchApiKey(config, config.modResults);\n return config;\n });\n};\n\nexport function getBranchApiKey(config: ExpoConfig) {\n return config.android?.config?.branch?.apiKey ?? null;\n}\n\nexport function setBranchApiKey(\n config: ExpoConfig,\n androidManifest: AndroidConfig.Manifest.AndroidManifest\n) {\n const apiKey = getBranchApiKey(config);\n\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (apiKey) {\n // If the item exists, add it back\n addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey);\n } else {\n // Remove any existing item\n removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY);\n }\n return androidManifest;\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA,MAAM;EACJA,gCAAgC;EAChCC,yBAAyB;EACzBC;AACF,CAAC,GAAGC,8BAAa,CAACC,QAAQ;AAE1B,MAAMC,eAAe,GAAG,yBAAyB;AAE1C,MAAMC,iBAA+B,GAAIC,MAAM,IAAK;EACzD,OAAO,IAAAC,oCAAmB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC7CA,MAAM,CAACE,UAAU,GAAGC,eAAe,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC9D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC;AAEK,SAASI,eAAe,CAACJ,MAAkB,EAAE;EAAA;EAClD,mDAAOA,MAAM,CAACK,OAAO,8EAAd,gBAAgBL,MAAM,qFAAtB,uBAAwBM,MAAM,2DAA9B,uBAAgCC,MAAM,yEAAI,IAAI;AACvD;AAEO,SAASJ,eAAe,CAC7BH,MAAkB,EAClBQ,eAAuD,EACvD;EACA,MAAMD,MAAM,GAAGH,eAAe,CAACJ,MAAM,CAAC;EAEtC,MAAMS,eAAe,GAAGf,yBAAyB,CAACc,eAAe,CAAC;EAElE,IAAID,MAAM,EAAE;IACV;IACAd,gCAAgC,CAACgB,eAAe,EAAEX,eAAe,EAAES,MAAM,CAAC;EAC5E,CAAC,MAAM;IACL;IACAZ,qCAAqC,CAACc,eAAe,EAAEX,eAAe,CAAC;EACzE;EACA,OAAOU,eAAe;AACxB"}
1
+ {"version":3,"file":"withAndroidBranch.js","names":["_configPlugins","data","require","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","META_BRANCH_KEY","withAndroidBranch","config","withAndroidManifest","modResults","setBranchApiKey","exports","getBranchApiKey","_config$android$confi","_config$android","_config$android$confi2","_config$android$confi3","android","branch","apiKey","androidManifest","mainApplication"],"sources":["../../../../src/plugins/unversioned/expo-branch/withAndroidBranch.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst {\n addMetaDataItemToMainApplication,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n} = AndroidConfig.Manifest;\n\nconst META_BRANCH_KEY = 'io.branch.sdk.BranchKey';\n\nexport const withAndroidBranch: ConfigPlugin = (config) => {\n return withAndroidManifest(config, (config) => {\n config.modResults = setBranchApiKey(config, config.modResults);\n return config;\n });\n};\n\nexport function getBranchApiKey(config: ExpoConfig) {\n return config.android?.config?.branch?.apiKey ?? null;\n}\n\nexport function setBranchApiKey(\n config: ExpoConfig,\n androidManifest: AndroidConfig.Manifest.AndroidManifest\n) {\n const apiKey = getBranchApiKey(config);\n\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (apiKey) {\n // If the item exists, add it back\n addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey);\n } else {\n // Remove any existing item\n removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY);\n }\n return androidManifest;\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,MAAM;EACJE,gCAAgC;EAChCC,yBAAyB;EACzBC;AACF,CAAC,GAAGC,8BAAa,CAACC,QAAQ;AAE1B,MAAMC,eAAe,GAAG,yBAAyB;AAE1C,MAAMC,iBAA+B,GAAIC,MAAM,IAAK;EACzD,OAAO,IAAAC,oCAAmB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC7CA,MAAM,CAACE,UAAU,GAAGC,eAAe,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC9D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAL,iBAAA,GAAAA,iBAAA;AAEK,SAASM,eAAeA,CAACL,MAAkB,EAAE;EAAA,IAAAM,qBAAA,EAAAC,eAAA,EAAAC,sBAAA,EAAAC,sBAAA;EAClD,QAAAH,qBAAA,IAAAC,eAAA,GAAOP,MAAM,CAACU,OAAO,cAAAH,eAAA,wBAAAC,sBAAA,GAAdD,eAAA,CAAgBP,MAAM,cAAAQ,sBAAA,wBAAAC,sBAAA,GAAtBD,sBAAA,CAAwBG,MAAM,cAAAF,sBAAA,uBAA9BA,sBAAA,CAAgCG,MAAM,cAAAN,qBAAA,cAAAA,qBAAA,GAAI,IAAI;AACvD;AAEO,SAASH,eAAeA,CAC7BH,MAAkB,EAClBa,eAAuD,EACvD;EACA,MAAMD,MAAM,GAAGP,eAAe,CAACL,MAAM,CAAC;EAEtC,MAAMc,eAAe,GAAGpB,yBAAyB,CAACmB,eAAe,CAAC;EAElE,IAAID,MAAM,EAAE;IACV;IACAnB,gCAAgC,CAACqB,eAAe,EAAEhB,eAAe,EAAEc,MAAM,CAAC;EAC5E,CAAC,MAAM;IACL;IACAjB,qCAAqC,CAACmB,eAAe,EAAEhB,eAAe,CAAC;EACzE;EACA,OAAOe,eAAe;AACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"withIosBranch.js","names":["withIosBranch","config","withInfoPlist","modResults","setBranchApiKey","getBranchApiKey","ios","branch","apiKey","infoPlist","branch_key","live"],"sources":["../../../../src/plugins/unversioned/expo-branch/withIosBranch.ts"],"sourcesContent":["import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withIosBranch: ConfigPlugin = (config) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setBranchApiKey(config, config.modResults);\n return config;\n });\n};\n\nexport function getBranchApiKey(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.branch?.apiKey ?? null;\n}\n\nexport function setBranchApiKey(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n const apiKey = getBranchApiKey(config);\n\n if (apiKey === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n branch_key: {\n live: apiKey,\n },\n };\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,aAA2B,GAAIC,MAAM,IAAK;EACrD,OAAO,IAAAC,8BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,GAAGC,eAAe,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC9D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC;AAEK,SAASI,eAAe,CAACJ,MAA+B,EAAE;EAAA;EAC/D,+CAAOA,MAAM,CAACK,GAAG,sEAAV,YAAYL,MAAM,iFAAlB,mBAAoBM,MAAM,2DAA1B,uBAA4BC,MAAM,yEAAI,IAAI;AACnD;AAEO,SAASJ,eAAe,CAACH,MAA+B,EAAEQ,SAAoB,EAAa;EAChG,MAAMD,MAAM,GAAGH,eAAe,CAACJ,MAAM,CAAC;EAEtC,IAAIO,MAAM,KAAK,IAAI,EAAE;IACnB,OAAOC,SAAS;EAClB;EAEA,OAAO;IACL,GAAGA,SAAS;IACZC,UAAU,EAAE;MACVC,IAAI,EAAEH;IACR;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"withIosBranch.js","names":["_configPlugins","data","require","withIosBranch","config","withInfoPlist","modResults","setBranchApiKey","exports","getBranchApiKey","_config$ios$config$br","_config$ios","_config$ios$config","_config$ios$config$br2","ios","branch","apiKey","infoPlist","branch_key","live"],"sources":["../../../../src/plugins/unversioned/expo-branch/withIosBranch.ts"],"sourcesContent":["import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withIosBranch: ConfigPlugin = (config) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setBranchApiKey(config, config.modResults);\n return config;\n });\n};\n\nexport function getBranchApiKey(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.branch?.apiKey ?? null;\n}\n\nexport function setBranchApiKey(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n const apiKey = getBranchApiKey(config);\n\n if (apiKey === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n branch_key: {\n live: apiKey,\n },\n };\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGO,MAAME,aAA2B,GAAIC,MAAM,IAAK;EACrD,OAAO,IAAAC,8BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,GAAGC,eAAe,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC9D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAL,aAAA,GAAAA,aAAA;AAEK,SAASM,eAAeA,CAACL,MAA+B,EAAE;EAAA,IAAAM,qBAAA,EAAAC,WAAA,EAAAC,kBAAA,EAAAC,sBAAA;EAC/D,QAAAH,qBAAA,IAAAC,WAAA,GAAOP,MAAM,CAACU,GAAG,cAAAH,WAAA,wBAAAC,kBAAA,GAAVD,WAAA,CAAYP,MAAM,cAAAQ,kBAAA,wBAAAC,sBAAA,GAAlBD,kBAAA,CAAoBG,MAAM,cAAAF,sBAAA,uBAA1BA,sBAAA,CAA4BG,MAAM,cAAAN,qBAAA,cAAAA,qBAAA,GAAI,IAAI;AACnD;AAEO,SAASH,eAAeA,CAACH,MAA+B,EAAEa,SAAoB,EAAa;EAChG,MAAMD,MAAM,GAAGP,eAAe,CAACL,MAAM,CAAC;EAEtC,IAAIY,MAAM,KAAK,IAAI,EAAE;IACnB,OAAOC,SAAS;EAClB;EAEA,OAAO;IACL,GAAGA,SAAS;IACZC,UAAU,EAAE;MACVC,IAAI,EAAEH;IACR;EACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"expo-contacts.js","names":["withAccessesContactNotes","config","withEntitlementsPlist","modResults","setAccessesContactNotes","entitlementsPlist","ios","accessesContactNotes","createLegacyPlugin","packageName","fallback"],"sources":["../../../src/plugins/unversioned/expo-contacts.ts"],"sourcesContent":["import { ConfigPlugin, withEntitlementsPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst withAccessesContactNotes: ConfigPlugin = (config) => {\n return withEntitlementsPlist(config, (config) => {\n config.modResults = setAccessesContactNotes(config, config.modResults);\n return config;\n });\n};\n\nfunction setAccessesContactNotes(config: ExpoConfig, entitlementsPlist: JSONObject): JSONObject {\n if (config.ios?.accessesContactNotes) {\n return {\n ...entitlementsPlist,\n 'com.apple.developer.contacts.notes': true,\n };\n }\n\n return entitlementsPlist;\n}\n\nexport default createLegacyPlugin({\n packageName: 'expo-contacts',\n fallback: withAccessesContactNotes,\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,wBAAsC,GAAIC,MAAM,IAAK;EACzD,OAAO,IAAAC,sCAAqB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC/CA,MAAM,CAACE,UAAU,GAAGC,uBAAuB,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IACtE,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAED,SAASG,uBAAuB,CAACH,MAAkB,EAAEI,iBAA6B,EAAc;EAAA;EAC9F,mBAAIJ,MAAM,CAACK,GAAG,wCAAV,YAAYC,oBAAoB,EAAE;IACpC,OAAO;MACL,GAAGF,iBAAiB;MACpB,oCAAoC,EAAE;IACxC,CAAC;EACH;EAEA,OAAOA,iBAAiB;AAC1B;AAAC,eAEc,IAAAG,wCAAkB,EAAC;EAChCC,WAAW,EAAE,eAAe;EAC5BC,QAAQ,EAAEV;AACZ,CAAC,CAAC;AAAA"}
1
+ {"version":3,"file":"expo-contacts.js","names":["_configPlugins","data","require","_createLegacyPlugin","withAccessesContactNotes","config","withEntitlementsPlist","modResults","setAccessesContactNotes","entitlementsPlist","_config$ios","ios","accessesContactNotes","_default","createLegacyPlugin","packageName","fallback","exports","default"],"sources":["../../../src/plugins/unversioned/expo-contacts.ts"],"sourcesContent":["import { ConfigPlugin, withEntitlementsPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst withAccessesContactNotes: ConfigPlugin = (config) => {\n return withEntitlementsPlist(config, (config) => {\n config.modResults = setAccessesContactNotes(config, config.modResults);\n return config;\n });\n};\n\nfunction setAccessesContactNotes(config: ExpoConfig, entitlementsPlist: JSONObject): JSONObject {\n if (config.ios?.accessesContactNotes) {\n return {\n ...entitlementsPlist,\n 'com.apple.developer.contacts.notes': true,\n };\n }\n\n return entitlementsPlist;\n}\n\nexport default createLegacyPlugin({\n packageName: 'expo-contacts',\n fallback: withAccessesContactNotes,\n});\n"],"mappings":";;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,oBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,mBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAMG,wBAAsC,GAAIC,MAAM,IAAK;EACzD,OAAO,IAAAC,sCAAqB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC/CA,MAAM,CAACE,UAAU,GAAGC,uBAAuB,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IACtE,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAED,SAASG,uBAAuBA,CAACH,MAAkB,EAAEI,iBAA6B,EAAc;EAAA,IAAAC,WAAA;EAC9F,KAAAA,WAAA,GAAIL,MAAM,CAACM,GAAG,cAAAD,WAAA,eAAVA,WAAA,CAAYE,oBAAoB,EAAE;IACpC,OAAO;MACL,GAAGH,iBAAiB;MACpB,oCAAoC,EAAE;IACxC,CAAC;EACH;EAEA,OAAOA,iBAAiB;AAC1B;AAAC,IAAAI,QAAA,GAEc,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,eAAe;EAC5BC,QAAQ,EAAEZ;AACZ,CAAC,CAAC;AAAAa,OAAA,CAAAC,OAAA,GAAAL,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"expo-document-picker.js","names":["createLegacyPlugin","packageName","fallback","config","ios","usesIcloudStorage","WarningAggregator","addWarningIOS"],"sources":["../../../src/plugins/unversioned/expo-document-picker.ts"],"sourcesContent":["import { WarningAggregator } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nexport default createLegacyPlugin({\n packageName: 'expo-document-picker',\n fallback(config) {\n if (config.ios?.usesIcloudStorage) {\n WarningAggregator.addWarningIOS(\n 'ios.usesIcloudStorage',\n 'Install expo-document-picker to enable the ios.usesIcloudStorage feature'\n // TODO: add a link to a docs page with more information on how to do this\n );\n }\n return config;\n },\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA0D,eAE3C,IAAAA,wCAAkB,EAAC;EAChCC,WAAW,EAAE,sBAAsB;EACnCC,QAAQ,CAACC,MAAM,EAAE;IAAA;IACf,mBAAIA,MAAM,CAACC,GAAG,wCAAV,YAAYC,iBAAiB,EAAE;MACjCC,kCAAiB,CAACC,aAAa,CAC7B,uBAAuB,EACvB;MACA;MAAA,CACD;IACH;;IACA,OAAOJ,MAAM;EACf;AACF,CAAC,CAAC;AAAA"}
1
+ {"version":3,"file":"expo-document-picker.js","names":["_configPlugins","data","require","_createLegacyPlugin","_default","createLegacyPlugin","packageName","fallback","config","_config$ios","ios","usesIcloudStorage","WarningAggregator","addWarningIOS","exports","default"],"sources":["../../../src/plugins/unversioned/expo-document-picker.ts"],"sourcesContent":["import { WarningAggregator } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nexport default createLegacyPlugin({\n packageName: 'expo-document-picker',\n fallback(config) {\n if (config.ios?.usesIcloudStorage) {\n WarningAggregator.addWarningIOS(\n 'ios.usesIcloudStorage',\n 'Install expo-document-picker to enable the ios.usesIcloudStorage feature'\n // TODO: add a link to a docs page with more information on how to do this\n );\n }\n return config;\n },\n});\n"],"mappings":";;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,oBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,mBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0D,IAAAG,QAAA,GAE3C,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,sBAAsB;EACnCC,QAAQA,CAACC,MAAM,EAAE;IAAA,IAAAC,WAAA;IACf,KAAAA,WAAA,GAAID,MAAM,CAACE,GAAG,cAAAD,WAAA,eAAVA,WAAA,CAAYE,iBAAiB,EAAE;MACjCC,kCAAiB,CAACC,aAAa,CAC7B,uBAAuB,EACvB;MACA;MAAA,CACD;IACH;;IACA,OAAOL,MAAM;EACf;AACF,CAAC,CAAC;AAAAM,OAAA,CAAAC,OAAA,GAAAX,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"expo-navigation-bar.js","names":["createLegacyPlugin","packageName","fallback","withNavigationBar"],"sources":["../../../../src/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.ts"],"sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport { withNavigationBar } from './withAndroidNavigationBar';\n\nexport default createLegacyPlugin({\n packageName: 'expo-navigation-bar',\n fallback: [\n // Android\n withNavigationBar,\n ],\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA+D,eAEhD,IAAAA,wCAAkB,EAAC;EAChCC,WAAW,EAAE,qBAAqB;EAClCC,QAAQ,EAAE;EACR;EACAC,6CAAiB;AAErB,CAAC,CAAC;AAAA"}
1
+ {"version":3,"file":"expo-navigation-bar.js","names":["_createLegacyPlugin","data","require","_withAndroidNavigationBar","_default","createLegacyPlugin","packageName","fallback","withNavigationBar","exports","default"],"sources":["../../../../src/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.ts"],"sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport { withNavigationBar } from './withAndroidNavigationBar';\n\nexport default createLegacyPlugin({\n packageName: 'expo-navigation-bar',\n fallback: [\n // Android\n withNavigationBar,\n ],\n});\n"],"mappings":";;;;;;AAAA,SAAAA,oBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,mBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,0BAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,yBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+D,IAAAG,QAAA,GAEhD,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,qBAAqB;EAClCC,QAAQ,EAAE;EACR;EACAC,6CAAiB;AAErB,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAN,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"withAndroidNavigationBar.js","names":["NAVIGATION_BAR_COLOR","withNavigationBar","config","immersiveMode","getNavigationBarImmersiveMode","WarningAggregator","addWarningAndroid","withNavigationBarColors","withNavigationBarStyles","withAndroidColors","modResults","setNavigationBarColors","withAndroidStyles","setNavigationBarStyles","colors","hexString","getNavigationBarColor","AndroidConfig","Colors","setColorItem","Resources","buildResourceItem","name","value","styles","Styles","assignStylesValue","add","getNavigationBarStyle","parent","getAppThemeLightNoActionBarGroup","androidNavigationBar","visible","backgroundColor","barStyle"],"sources":["../../../../src/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.ts"],"sourcesContent":["import {\n AndroidConfig,\n ConfigPlugin,\n WarningAggregator,\n withAndroidColors,\n withAndroidStyles,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst NAVIGATION_BAR_COLOR = 'navigationBarColor';\n\nexport const withNavigationBar: ConfigPlugin = (config) => {\n const immersiveMode = getNavigationBarImmersiveMode(config);\n if (immersiveMode) {\n // Immersive mode needs to be set programmatically\n WarningAggregator.addWarningAndroid(\n 'androidNavigationBar.visible',\n 'Property is deprecated in Android 11 (API 30) and will be removed from Expo SDK.',\n 'https://expo.fyi/android-navigation-bar-visible-deprecated'\n );\n }\n\n config = withNavigationBarColors(config);\n config = withNavigationBarStyles(config);\n return config;\n};\n\nconst withNavigationBarColors: ConfigPlugin = (config) => {\n return withAndroidColors(config, (config) => {\n config.modResults = setNavigationBarColors(config, config.modResults);\n return config;\n });\n};\n\nconst withNavigationBarStyles: ConfigPlugin = (config) => {\n return withAndroidStyles(config, (config) => {\n config.modResults = setNavigationBarStyles(config, config.modResults);\n return config;\n });\n};\n\nexport function setNavigationBarColors(\n config: Pick<ExpoConfig, 'androidNavigationBar'>,\n colors: AndroidConfig.Resources.ResourceXML\n): AndroidConfig.Resources.ResourceXML {\n const hexString = getNavigationBarColor(config);\n if (hexString) {\n colors = AndroidConfig.Colors.setColorItem(\n AndroidConfig.Resources.buildResourceItem({\n name: NAVIGATION_BAR_COLOR,\n value: hexString,\n }),\n colors\n );\n }\n return colors;\n}\n\nexport function setNavigationBarStyles(\n config: Pick<ExpoConfig, 'androidNavigationBar'>,\n styles: AndroidConfig.Resources.ResourceXML\n): AndroidConfig.Resources.ResourceXML {\n styles = AndroidConfig.Styles.assignStylesValue(styles, {\n add: getNavigationBarStyle(config) === 'dark-content',\n parent: AndroidConfig.Styles.getAppThemeLightNoActionBarGroup(),\n name: 'android:windowLightNavigationBar',\n value: 'true',\n });\n styles = AndroidConfig.Styles.assignStylesValue(styles, {\n add: !!getNavigationBarColor(config),\n parent: AndroidConfig.Styles.getAppThemeLightNoActionBarGroup(),\n name: `android:${NAVIGATION_BAR_COLOR}`,\n value: `@color/${NAVIGATION_BAR_COLOR}`,\n });\n\n return styles;\n}\n\nexport function getNavigationBarImmersiveMode(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.visible || null;\n}\n\nexport function getNavigationBarColor(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.backgroundColor || null;\n}\n\nexport function getNavigationBarStyle(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.barStyle || 'light-content';\n}\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AASA,MAAMA,oBAAoB,GAAG,oBAAoB;AAE1C,MAAMC,iBAA+B,GAAIC,MAAM,IAAK;EACzD,MAAMC,aAAa,GAAGC,6BAA6B,CAACF,MAAM,CAAC;EAC3D,IAAIC,aAAa,EAAE;IACjB;IACAE,kCAAiB,CAACC,iBAAiB,CACjC,8BAA8B,EAC9B,kFAAkF,EAClF,4DAA4D,CAC7D;EACH;EAEAJ,MAAM,GAAGK,uBAAuB,CAACL,MAAM,CAAC;EACxCA,MAAM,GAAGM,uBAAuB,CAACN,MAAM,CAAC;EACxC,OAAOA,MAAM;AACf,CAAC;AAAC;AAEF,MAAMK,uBAAqC,GAAIL,MAAM,IAAK;EACxD,OA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EZ,8BAAa,CAACQ,MAAM,CAACK,gCAAgC,EAAE;IAC/DR,IAAI,EAAG,WAAUtB,oBAAqB,EAAC;IACvCuB,KAAK,EAAG,UAASvB,oBAAqB;EACxC,CAAC,CAAC;EAEF,OAAOwB,MAAM;AACf;AAEO,SAASpB,6BAA6B,CAACF,MAAgD,EAAE;EAAA;EAC9F,OAAO,0BAAAA,MAAM,CAAC6B,oBAAoB,0DAA3B,sBAA6BC,OAAO,KAAI,IAAI;AACrD;AAEO,SAAShB,qBAAqB,CAACd,MAAgD,EAAE;EAAA;EACtF,OAAO,2BAAAA,MAAM,CAAC6B,oBAAoB,2DAA3B,uBAA6BE,eAAe,KAAI,IAAI;AAC7D;AAEO,SAASL,qBAAqB,CAAC1B,MAAgD,EAAE;EAAA;EACtF,OAAO,2BAAAA,MAAM,CAAC6B,oBAAoB,2DAA3B,uBAA6BG,QAAQ,KAAI,eAAe;AACjE"}
1
+ {"version":3,"file":"withAndroidNavigationBar.js","names":["_configPlugins","data","require","NAVIGATION_BAR_COLOR","withNavigationBar","config","immersiveMode","getNavigationBarImmersiveMode","WarningAggregator","addWarningAndroid","withNavigationBarColors","withNavigationBarStyles","exports","withAndroidColors","modResults","setNavigationBarColors","withAndroidStyles","setNavigationBarStyles","colors","hexString","getNavigationBarColor","AndroidConfig","Colors","setColorItem","Resources","buildResourceItem","name","value","styles","Styles","assignStylesValue","add","getNavigationBarStyle","parent","getAppThemeLightNoActionBarGroup","_config$androidNaviga","androidNavigationBar","visible","_config$androidNaviga2","backgroundColor","_config$androidNaviga3","barStyle"],"sources":["../../../../src/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.ts"],"sourcesContent":["import {\n AndroidConfig,\n ConfigPlugin,\n WarningAggregator,\n withAndroidColors,\n withAndroidStyles,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst NAVIGATION_BAR_COLOR = 'navigationBarColor';\n\nexport const withNavigationBar: ConfigPlugin = (config) => {\n const immersiveMode = getNavigationBarImmersiveMode(config);\n if (immersiveMode) {\n // Immersive mode needs to be set programmatically\n WarningAggregator.addWarningAndroid(\n 'androidNavigationBar.visible',\n 'Property is deprecated in Android 11 (API 30) and will be removed from Expo SDK.',\n 'https://expo.fyi/android-navigation-bar-visible-deprecated'\n );\n }\n\n config = withNavigationBarColors(config);\n config = withNavigationBarStyles(config);\n return config;\n};\n\nconst withNavigationBarColors: ConfigPlugin = (config) => {\n return withAndroidColors(config, (config) => {\n config.modResults = setNavigationBarColors(config, config.modResults);\n return config;\n });\n};\n\nconst withNavigationBarStyles: ConfigPlugin = (config) => {\n return withAndroidStyles(config, (config) => {\n config.modResults = setNavigationBarStyles(config, config.modResults);\n return config;\n });\n};\n\nexport function setNavigationBarColors(\n config: Pick<ExpoConfig, 'androidNavigationBar'>,\n colors: AndroidConfig.Resources.ResourceXML\n): AndroidConfig.Resources.ResourceXML {\n const hexString = getNavigationBarColor(config);\n if (hexString) {\n colors = AndroidConfig.Colors.setColorItem(\n AndroidConfig.Resources.buildResourceItem({\n name: NAVIGATION_BAR_COLOR,\n value: hexString,\n }),\n colors\n );\n }\n return colors;\n}\n\nexport function setNavigationBarStyles(\n config: Pick<ExpoConfig, 'androidNavigationBar'>,\n styles: AndroidConfig.Resources.ResourceXML\n): AndroidConfig.Resources.ResourceXML {\n styles = AndroidConfig.Styles.assignStylesValue(styles, {\n add: getNavigationBarStyle(config) === 'dark-content',\n parent: AndroidConfig.Styles.getAppThemeLightNoActionBarGroup(),\n name: 'android:windowLightNavigationBar',\n value: 'true',\n });\n styles = AndroidConfig.Styles.assignStylesValue(styles, {\n add: !!getNavigationBarColor(config),\n parent: AndroidConfig.Styles.getAppThemeLightNoActionBarGroup(),\n name: `android:${NAVIGATION_BAR_COLOR}`,\n value: `@color/${NAVIGATION_BAR_COLOR}`,\n });\n\n return styles;\n}\n\nexport function getNavigationBarImmersiveMode(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.visible || null;\n}\n\nexport function getNavigationBarColor(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.backgroundColor || null;\n}\n\nexport function getNavigationBarStyle(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.barStyle || 'light-content';\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AASA,MAAME,oBAAoB,GAAG,oBAAoB;AAE1C,MAAMC,iBAA+B,GAAIC,MAAM,IAAK;EACzD,MAAMC,aAAa,GAAGC,6BAA6B,CAACF,MAAM,CAAC;EAC3D,IAAIC,aAAa,EAAE;IACjB;IACAE,kCAAiB,CAACC,iBAAiB,CACjC,8BAA8B,EAC9B,kFAAkF,EAClF,4DAA4D,CAC7D;EACH;EAEAJ,MAAM,GAAGK,uBAAuB,CAACL,MAAM,CAAC;EACxCA,MAAM,GAAGM,uBAAuB,CAACN,MAAM,CAAC;EACxC,OAAOA,MAAM;AACf,CAAC;AAACO,OAAA,CAAAR,iBAAA,GAAAA,iBAAA;AAEF,MAAMM,uBAAqC,GAAIL,MAAM,IAAK;EACxD,OAAO,IAAAQ,kCAAiB,EAACR,MAAM,EAAGA,MAAM,IAAK;IAC3CA,MAAM,CAACS,UAAU,GAAGC,sBAAsB,CAACV,MAAM,EAAEA,MAAM,CAACS,UAAU,CAAC;IACrE,OAAOT,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAED,MAAMM,uBAAqC,GAAIN,MAAM,IAAK;EACxD,OAAO,IAAAW,kCAAiB,EAACX,MAAM,EAAGA,MAAM,IAAK;IAC3CA,MAAM,CAACS,UAAU,GAAGG,sBAAsB,CAACZ,MAAM,EAAEA,MAAM,CAACS,UAAU,CAAC;IACrE,OAAOT,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAEM,SAASU,sBAAsBA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sBAAA,GAAAjC,MAAM,CAAC+B,oBAAoB,cAAAE,sBAAA,uBAA3BA,sBAAA,CAA6BC,eAAe,KAAI,IAAI;AAC7D;AAEO,SAASP,qBAAqBA,CAAC3B,MAAgD,EAAE;EAAA,IAAAmC,sBAAA;EACtF,OAAO,EAAAA,sBAAA,GAAAnC,MAAM,CAAC+B,oBAAoB,cAAAI,sBAAA,uBAA3BA,sBAAA,CAA6BC,QAAQ,KAAI,eAAe;AACjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"expo-notifications.js","names":["withNotificationsEntitlement","config","mode","withEntitlementsPlist","modResults","createLegacyPlugin","packageName","fallback","withNotificationManifest","withNotificationIconColor","withNotificationIcons"],"sources":["../../../../src/plugins/unversioned/expo-notifications/expo-notifications.ts"],"sourcesContent":["import { ConfigPlugin, withEntitlementsPlist } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from '../createLegacyPlugin';\nimport {\n withNotificationIconColor,\n withNotificationIcons,\n withNotificationManifest,\n} from './withAndroidNotifications';\n\nconst withNotificationsEntitlement: ConfigPlugin<'production' | 'development'> = (config, mode) => {\n return withEntitlementsPlist(config, (config) => {\n config.modResults['aps-environment'] = mode;\n return config;\n });\n};\n\nexport default createLegacyPlugin({\n packageName: 'expo-notifications',\n fallback: [\n // Android\n withNotificationManifest,\n withNotificationIconColor,\n withNotificationIcons,\n // iOS\n [withNotificationsEntitlement, 'development'],\n ],\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMA,MAAMA,4BAAwE,GAAG,CAACC,MAAM,EAAEC,IAAI,KAAK;EACjG,OAAO,IAAAC,sCAAqB,EAACF,MAAM,EAAGA,MAAM,IAAK;IAC/CA,MAAM,CAACG,UAAU,CAAC,iBAAiB,CAAC,GAAGF,IAAI;IAC3C,OAAOD,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC,eAEa,IAAAI,wCAAkB,EAAC;EAChCC,WAAW,EAAE,oBAAoB;EACjCC,QAAQ,EAAE;EACR;EACAC,oDAAwB,EACxBC,qDAAyB,EACzBC,iDAAqB;EACrB;EACA,CAACV,4BAA4B,EAAE,aAAa,CAAC;AAEjD,CAAC,CAAC;AAAA"}
1
+ {"version":3,"file":"expo-notifications.js","names":["_configPlugins","data","require","_createLegacyPlugin","_withAndroidNotifications","withNotificationsEntitlement","config","mode","withEntitlementsPlist","modResults","_default","createLegacyPlugin","packageName","fallback","withNotificationManifest","withNotificationIconColor","withNotificationIcons","exports","default"],"sources":["../../../../src/plugins/unversioned/expo-notifications/expo-notifications.ts"],"sourcesContent":["import { ConfigPlugin, withEntitlementsPlist } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from '../createLegacyPlugin';\nimport {\n withNotificationIconColor,\n withNotificationIcons,\n withNotificationManifest,\n} from './withAndroidNotifications';\n\nconst withNotificationsEntitlement: ConfigPlugin<'production' | 'development'> = (config, mode) => {\n return withEntitlementsPlist(config, (config) => {\n config.modResults['aps-environment'] = mode;\n return config;\n });\n};\n\nexport default createLegacyPlugin({\n packageName: 'expo-notifications',\n fallback: [\n // Android\n withNotificationManifest,\n withNotificationIconColor,\n withNotificationIcons,\n // iOS\n [withNotificationsEntitlement, 'development'],\n ],\n});\n"],"mappings":";;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,oBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,mBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,0BAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,yBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,MAAMI,4BAAwE,GAAGA,CAACC,MAAM,EAAEC,IAAI,KAAK;EACjG,OAAO,IAAAC,sCAAqB,EAACF,MAAM,EAAGA,MAAM,IAAK;IAC/CA,MAAM,CAACG,UAAU,CAAC,iBAAiB,CAAC,GAAGF,IAAI;IAC3C,OAAOD,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAI,QAAA,GAEa,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,oBAAoB;EACjCC,QAAQ,EAAE;EACR;EACAC,oDAAwB,EACxBC,qDAAyB,EACzBC,iDAAqB;EACrB;EACA,CAACX,4BAA4B,EAAE,aAAa,CAAC;AAEjD,CAAC,CAAC;AAAAY,OAAA,CAAAC,OAAA,GAAAR,QAAA"}