@expo/prebuild-config 5.0.7 → 6.0.0

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 (113) hide show
  1. package/build/getAutolinkedPackages.js +3 -13
  2. package/build/getAutolinkedPackages.js.map +1 -1
  3. package/build/getPrebuildConfig.js +9 -24
  4. package/build/getPrebuildConfig.js.map +1 -1
  5. package/build/importExpoModulesAutolinking.d.ts +3 -3
  6. package/build/importExpoModulesAutolinking.js +0 -5
  7. package/build/importExpoModulesAutolinking.js.map +1 -1
  8. package/build/index.js +0 -5
  9. package/build/index.js.map +1 -1
  10. package/build/plugins/icons/AssetContents.d.ts +3 -3
  11. package/build/plugins/icons/AssetContents.js +1 -10
  12. package/build/plugins/icons/AssetContents.js.map +1 -1
  13. package/build/plugins/icons/withAndroidIcons.d.ts +7 -5
  14. package/build/plugins/icons/withAndroidIcons.js +52 -71
  15. package/build/plugins/icons/withAndroidIcons.js.map +1 -1
  16. package/build/plugins/icons/withAndroidManifestIcons.js +0 -10
  17. package/build/plugins/icons/withAndroidManifestIcons.js.map +1 -1
  18. package/build/plugins/icons/withIosIcons.js +24 -48
  19. package/build/plugins/icons/withIosIcons.js.map +1 -1
  20. package/build/plugins/unversioned/createLegacyPlugin.js +0 -11
  21. package/build/plugins/unversioned/createLegacyPlugin.js.map +1 -1
  22. package/build/plugins/unversioned/expo-ads-admob/expo-ads-admob.js +0 -11
  23. package/build/plugins/unversioned/expo-ads-admob/expo-ads-admob.js.map +1 -1
  24. package/build/plugins/unversioned/expo-ads-admob/withAndroidAdMob.js +0 -14
  25. package/build/plugins/unversioned/expo-ads-admob/withAndroidAdMob.js.map +1 -1
  26. package/build/plugins/unversioned/expo-ads-admob/withIosAdMob.js +5 -14
  27. package/build/plugins/unversioned/expo-ads-admob/withIosAdMob.js.map +1 -1
  28. package/build/plugins/unversioned/expo-apple-authentication.js +0 -11
  29. package/build/plugins/unversioned/expo-apple-authentication.js.map +1 -1
  30. package/build/plugins/unversioned/expo-branch/expo-branch.js +4 -13
  31. package/build/plugins/unversioned/expo-branch/expo-branch.js.map +1 -1
  32. package/build/plugins/unversioned/expo-branch/withAndroidBranch.js +0 -12
  33. package/build/plugins/unversioned/expo-branch/withAndroidBranch.js.map +1 -1
  34. package/build/plugins/unversioned/expo-branch/withIosBranch.js +2 -11
  35. package/build/plugins/unversioned/expo-branch/withIosBranch.js.map +1 -1
  36. package/build/plugins/unversioned/expo-contacts.js +2 -13
  37. package/build/plugins/unversioned/expo-contacts.js.map +1 -1
  38. package/build/plugins/unversioned/expo-document-picker.js +2 -12
  39. package/build/plugins/unversioned/expo-document-picker.js.map +1 -1
  40. package/build/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.js +2 -9
  41. package/build/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.js.map +1 -1
  42. package/build/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.js +0 -20
  43. package/build/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.js.map +1 -1
  44. package/build/plugins/unversioned/expo-notifications/expo-notifications.js +4 -14
  45. package/build/plugins/unversioned/expo-notifications/expo-notifications.js.map +1 -1
  46. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.d.ts +1 -1
  47. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js +1 -44
  48. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js.map +1 -1
  49. package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.d.ts +20 -20
  50. package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.js +14 -33
  51. package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.js.map +1 -1
  52. package/build/plugins/unversioned/expo-splash-screen/expo-splash-screen.js +0 -11
  53. package/build/plugins/unversioned/expo-splash-screen/expo-splash-screen.js.map +1 -1
  54. package/build/plugins/unversioned/expo-splash-screen/getAndroidSplashConfig.d.ts +1 -1
  55. package/build/plugins/unversioned/expo-splash-screen/getAndroidSplashConfig.js +2 -11
  56. package/build/plugins/unversioned/expo-splash-screen/getAndroidSplashConfig.js.map +1 -1
  57. package/build/plugins/unversioned/expo-splash-screen/getIosSplashConfig.d.ts +1 -2
  58. package/build/plugins/unversioned/expo-splash-screen/getIosSplashConfig.js +0 -26
  59. package/build/plugins/unversioned/expo-splash-screen/getIosSplashConfig.js.map +1 -1
  60. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashDrawables.js +4 -9
  61. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashDrawables.js.map +1 -1
  62. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js +9 -36
  63. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js.map +1 -1
  64. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js +13 -34
  65. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js.map +1 -1
  66. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashScreen.js +4 -46
  67. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashScreen.js.map +1 -1
  68. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStrings.js +0 -13
  69. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStrings.js.map +1 -1
  70. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStyles.js +2 -23
  71. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStyles.js.map +1 -1
  72. package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js +16 -54
  73. package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js.map +1 -1
  74. package/build/plugins/unversioned/expo-splash-screen/withIosSplashInfoPlist.js +6 -22
  75. package/build/plugins/unversioned/expo-splash-screen/withIosSplashInfoPlist.js.map +1 -1
  76. package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreen.js +7 -35
  77. package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreen.js.map +1 -1
  78. package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreenStoryboard.js +9 -33
  79. package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreenStoryboard.js.map +1 -1
  80. package/build/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.js +1 -18
  81. package/build/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.js.map +1 -1
  82. package/build/plugins/unversioned/expo-splash-screen/wtihIosSplashScreenStoryboardImage.js +2 -15
  83. package/build/plugins/unversioned/expo-splash-screen/wtihIosSplashScreenStoryboardImage.js.map +1 -1
  84. package/build/plugins/unversioned/expo-system-ui/expo-system-ui.js +0 -17
  85. package/build/plugins/unversioned/expo-system-ui/expo-system-ui.js.map +1 -1
  86. package/build/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.js +0 -14
  87. package/build/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.js.map +1 -1
  88. package/build/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.js +2 -9
  89. package/build/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.js.map +1 -1
  90. package/build/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.js +2 -27
  91. package/build/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.js.map +1 -1
  92. package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.js +2 -14
  93. package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.js.map +1 -1
  94. package/build/plugins/unversioned/expo-updates.js +1 -8
  95. package/build/plugins/unversioned/expo-updates.js.map +1 -1
  96. package/build/plugins/unversioned/react-native-maps.js +4 -19
  97. package/build/plugins/unversioned/react-native-maps.js.map +1 -1
  98. package/build/plugins/withDefaultPlugins.d.ts +2 -2
  99. package/build/plugins/withDefaultPlugins.js +41 -94
  100. package/build/plugins/withDefaultPlugins.js.map +1 -1
  101. package/package.json +6 -6
  102. package/build/plugins/unversioned/expo-facebook/expo-facebook.d.ts +0 -2
  103. package/build/plugins/unversioned/expo-facebook/expo-facebook.js +0 -57
  104. package/build/plugins/unversioned/expo-facebook/expo-facebook.js.map +0 -1
  105. package/build/plugins/unversioned/expo-facebook/withAndroidFacebook.d.ts +0 -13
  106. package/build/plugins/unversioned/expo-facebook/withAndroidFacebook.js +0 -235
  107. package/build/plugins/unversioned/expo-facebook/withAndroidFacebook.js.map +0 -1
  108. package/build/plugins/unversioned/expo-facebook/withIosFacebook.d.ts +0 -26
  109. package/build/plugins/unversioned/expo-facebook/withIosFacebook.js +0 -233
  110. package/build/plugins/unversioned/expo-facebook/withIosFacebook.js.map +0 -1
  111. package/build/plugins/unversioned/expo-facebook/withSKAdNetworkIdentifiers.d.ts +0 -9
  112. package/build/plugins/unversioned/expo-facebook/withSKAdNetworkIdentifiers.js +0 -69
  113. package/build/plugins/unversioned/expo-facebook/withSKAdNetworkIdentifiers.js.map +0 -1
@@ -6,17 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getAutolinkedPackagesAsync = getAutolinkedPackagesAsync;
7
7
  exports.resolvePackagesList = resolvePackagesList;
8
8
  exports.shouldSkipAutoPlugin = shouldSkipAutoPlugin;
9
-
10
9
  function _importExpoModulesAutolinking() {
11
10
  const data = require("./importExpoModulesAutolinking");
12
-
13
11
  _importExpoModulesAutolinking = function () {
14
12
  return data;
15
13
  };
16
-
17
14
  return data;
18
15
  }
19
-
20
16
  /**
21
17
  * Returns a list of packages that are autolinked to a project.
22
18
  *
@@ -34,38 +30,32 @@ async function getAutolinkedPackagesAsync(projectRoot, platforms = ['ios', 'andr
34
30
  })));
35
31
  return resolvePackagesList(platformPaths);
36
32
  }
37
-
38
33
  function resolvePackagesList(platformPaths) {
39
34
  const allPlatformPaths = platformPaths.map(paths => Object.keys(paths)).flat();
40
35
  const uniquePaths = [...new Set(allPlatformPaths)];
41
36
  return uniquePaths.sort();
42
37
  }
43
-
44
38
  function shouldSkipAutoPlugin(config, plugin) {
45
39
  var _config$_internal;
46
-
47
40
  // Hack workaround because expo-dev-client doesn't use expo modules.
48
41
  if (plugin === 'expo-dev-client') {
49
42
  return false;
50
- } // Only perform the check if `autolinkedModules` is defined, otherwise we assume
51
- // this is a legacy runner which doesn't support autolinking.
52
-
43
+ }
53
44
 
45
+ // Only perform the check if `autolinkedModules` is defined, otherwise we assume
46
+ // this is a legacy runner which doesn't support autolinking.
54
47
  if (Array.isArray((_config$_internal = config._internal) === null || _config$_internal === void 0 ? void 0 : _config$_internal.autolinkedModules)) {
55
48
  // Resolve the pluginId as a string.
56
49
  const pluginId = Array.isArray(plugin) ? plugin[0] : plugin;
57
-
58
50
  if (typeof pluginId === 'string') {
59
51
  // Determine if the autolinked modules list includes our moduleId
60
52
  const isIncluded = config._internal.autolinkedModules.includes(pluginId);
61
-
62
53
  if (!isIncluded) {
63
54
  // If it doesn't then we know that any potential plugin shouldn't be applied automatically.
64
55
  return true;
65
56
  }
66
57
  }
67
58
  }
68
-
69
59
  return false;
70
60
  }
71
61
  //# sourceMappingURL=getAutolinkedPackages.js.map
@@ -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,0BAAf,CACLC,WADK,EAELC,SAAwB,GAAG,CAAC,KAAD,EAAQ,SAAR,CAFtB,EAGL;EACA,MAAMC,WAAW,GAAG,IAAAC,4DAAA,EAA6BH,WAA7B,CAApB;EACA,MAAMI,WAAW,GAAG,MAAMF,WAAW,CAACG,uBAAZ,CAAoC,IAApC,EAA0CL,WAA1C,CAA1B;EAEA,MAAMM,aAAa,GAAG,MAAMC,OAAO,CAACC,GAAR,CAC1BP,SAAS,CAACQ,GAAV,CAAeC,QAAD,IACZR,WAAW,CAACS,gBAAZ,CAA6B;IAC3BD,QAD2B;IAE3BN,WAF2B;IAG3BQ,MAAM,EAAE;EAHmB,CAA7B,CADF,CAD0B,CAA5B;EAUA,OAAOC,mBAAmB,CAACP,aAAD,CAA1B;AACD;;AAEM,SAASO,mBAAT,CAA6BP,aAA7B,EAAmE;EACxE,MAAMQ,gBAAgB,GAAGR,aAAa,CAACG,GAAd,CAAmBM,KAAD,IAAWC,MAAM,CAACC,IAAP,CAAYF,KAAZ,CAA7B,EAAiDG,IAAjD,EAAzB;EAEA,MAAMC,WAAW,GAAG,CAAC,GAAG,IAAIC,GAAJ,CAAQN,gBAAR,CAAJ,CAApB;EAEA,OAAOK,WAAW,CAACE,IAAZ,EAAP;AACD;;AAEM,SAASC,oBAAT,CACLC,MADK,EAELC,MAFK,EAGL;EAAA;;EACA;EACA,IAAIA,MAAM,KAAK,iBAAf,EAAkC;IAChC,OAAO,KAAP;EACD,CAJD,CAMA;EACA;;;EACA,IAAIC,KAAK,CAACC,OAAN,sBAAcH,MAAM,CAACI,SAArB,sDAAc,kBAAkBC,iBAAhC,CAAJ,EAAwD;IACtD;IACA,MAAMC,QAAQ,GAAGJ,KAAK,CAACC,OAAN,CAAcF,MAAd,IAAwBA,MAAM,CAAC,CAAD,CAA9B,GAAoCA,MAArD;;IACA,IAAI,OAAOK,QAAP,KAAoB,QAAxB,EAAkC;MAChC;MACA,MAAMC,UAAU,GAAGP,MAAM,CAACI,SAAP,CAAkBC,iBAAlB,CAAoCG,QAApC,CAA6CF,QAA7C,CAAnB;;MACA,IAAI,CAACC,UAAL,EAAiB;QACf;QACA,OAAO,IAAP;MACD;IACF;EACF;;EACD,OAAO,KAAP;AACD"}
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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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"}
@@ -4,44 +4,34 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getPrebuildConfigAsync = getPrebuildConfigAsync;
7
-
8
7
  function _config() {
9
8
  const data = require("@expo/config");
10
-
11
9
  _config = function () {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  function _getAutolinkedPackages() {
19
15
  const data = require("./getAutolinkedPackages");
20
-
21
16
  _getAutolinkedPackages = function () {
22
17
  return data;
23
18
  };
24
-
25
19
  return data;
26
20
  }
27
-
28
21
  function _withDefaultPlugins() {
29
22
  const data = require("./plugins/withDefaultPlugins");
30
-
31
23
  _withDefaultPlugins = function () {
32
24
  return data;
33
25
  };
34
-
35
26
  return data;
36
27
  }
37
-
38
28
  async function getPrebuildConfigAsync(projectRoot, props) {
39
29
  const autolinkedModules = await (0, _getAutolinkedPackages().getAutolinkedPackagesAsync)(projectRoot, props.platforms);
40
- return getPrebuildConfig(projectRoot, { ...props,
30
+ return getPrebuildConfig(projectRoot, {
31
+ ...props,
41
32
  autolinkedModules
42
33
  });
43
34
  }
44
-
45
35
  function getPrebuildConfig(projectRoot, {
46
36
  platforms,
47
37
  bundleIdentifier,
@@ -57,46 +47,41 @@ function getPrebuildConfig(projectRoot, {
57
47
  skipSDKVersionRequirement: true,
58
48
  isModdedConfig: true
59
49
  });
60
-
61
50
  if (autolinkedModules) {
62
51
  if (!config._internal) {
63
52
  config._internal = {};
64
53
  }
65
-
66
54
  config._internal.autolinkedModules = autolinkedModules;
67
55
  }
68
-
69
56
  const resolvedExpoUsername = typeof expoUsername === 'function' ? expoUsername(config) : // If the user didn't pass a username then fallback on the static cached username.
70
- expoUsername !== null && expoUsername !== void 0 ? expoUsername : (0, _config().getAccountUsername)(config); // Add all built-in plugins first because they should take
71
- // priority over the unversioned plugins.
57
+ expoUsername !== null && expoUsername !== void 0 ? expoUsername : (0, _config().getAccountUsername)(config);
72
58
 
59
+ // Add all built-in plugins first because they should take
60
+ // priority over the unversioned plugins.
73
61
  config = (0, _withDefaultPlugins().withVersionedExpoSDKPlugins)(config, {
74
62
  expoUsername: resolvedExpoUsername
75
63
  });
76
64
  config = (0, _withDefaultPlugins().withLegacyExpoPlugins)(config);
77
-
78
65
  if (platforms.includes('ios')) {
79
66
  var _ref;
80
-
81
67
  if (!config.ios) config.ios = {};
82
- config.ios.bundleIdentifier = (_ref = bundleIdentifier !== null && bundleIdentifier !== void 0 ? bundleIdentifier : config.ios.bundleIdentifier) !== null && _ref !== void 0 ? _ref : `com.placeholder.appid`; // Add all built-in plugins
68
+ config.ios.bundleIdentifier = (_ref = bundleIdentifier !== null && bundleIdentifier !== void 0 ? bundleIdentifier : config.ios.bundleIdentifier) !== null && _ref !== void 0 ? _ref : `com.placeholder.appid`;
83
69
 
70
+ // Add all built-in plugins
84
71
  config = (0, _withDefaultPlugins().withIosExpoPlugins)(config, {
85
72
  bundleIdentifier: config.ios.bundleIdentifier
86
73
  });
87
74
  }
88
-
89
75
  if (platforms.includes('android')) {
90
76
  var _ref2;
91
-
92
77
  if (!config.android) config.android = {};
93
- config.android.package = (_ref2 = packageName !== null && packageName !== void 0 ? packageName : config.android.package) !== null && _ref2 !== void 0 ? _ref2 : `com.placeholder.appid`; // Add all built-in plugins
78
+ config.android.package = (_ref2 = packageName !== null && packageName !== void 0 ? packageName : config.android.package) !== null && _ref2 !== void 0 ? _ref2 : `com.placeholder.appid`;
94
79
 
80
+ // Add all built-in plugins
95
81
  config = (0, _withDefaultPlugins().withAndroidExpoPlugins)(config, {
96
82
  package: config.android.package
97
83
  });
98
84
  }
99
-
100
85
  return {
101
86
  exp: config,
102
87
  ...rest
@@ -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,sBAAf,CACLC,WADK,EAELC,KAFK,EAQkC;EACvC,MAAMC,iBAAiB,GAAG,MAAM,IAAAC,mDAAA,EAA2BH,WAA3B,EAAwCC,KAAK,CAACG,SAA9C,CAAhC;EAEA,OAAOC,iBAAiB,CAACL,WAAD,EAAc,EACpC,GAAGC,KADiC;IAEpCC;EAFoC,CAAd,CAAxB;AAID;;AAED,SAASG,iBAAT,CACEL,WADF,EAEE;EACEI,SADF;EAEEE,gBAFF;EAGEC,WAHF;EAIEL,iBAJF;EAKEM;AALF,CAFF,EAeE;EACA;EACA,IAAI;IAAEC,GAAG,EAAEC,MAAP;IAAe,GAAGC;EAAlB,IAA2B,IAAAC,mBAAA,EAAUZ,WAAV,EAAuB;IACpDa,yBAAyB,EAAE,IADyB;IAEpDC,cAAc,EAAE;EAFoC,CAAvB,CAA/B;;EAKA,IAAIZ,iBAAJ,EAAuB;IACrB,IAAI,CAACQ,MAAM,CAACK,SAAZ,EAAuB;MACrBL,MAAM,CAACK,SAAP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EAAEd,MAAM,CAACa,OAAP,CAAeC;IADc,CAA/B,CAAT;EAGD;;EAED,OAAO;IAAEf,GAAG,EAAEC,MAAP;IAAe,GAAGC;EAAlB,CAAP;AACD"}
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;IACpD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ACa,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,12 +1,12 @@
1
- export declare type SearchResults = {
1
+ export type SearchResults = {
2
2
  [moduleName: string]: object;
3
3
  };
4
- export declare type SearchOptions = {
4
+ export type SearchOptions = {
5
5
  searchPaths: string[];
6
6
  platform: 'ios' | 'android' | 'web';
7
7
  silent?: boolean;
8
8
  };
9
- export declare type AutolinkingModule = {
9
+ export type AutolinkingModule = {
10
10
  resolveSearchPathsAsync(searchPaths: string[] | null, cwd: string): Promise<string[]>;
11
11
  findModulesAsync(providedOptions: SearchOptions): Promise<SearchResults>;
12
12
  };
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.importExpoModulesAutolinking = importExpoModulesAutolinking;
7
-
8
7
  // NOTE: Keep these types in-sync with expo-modules-autolinking
9
8
 
10
9
  /**
@@ -15,24 +14,20 @@ function importExpoModulesAutolinking(projectRoot) {
15
14
  assertAutolinkingCompatibility(autolinking);
16
15
  return autolinking;
17
16
  }
18
-
19
17
  function tryRequireExpoModulesAutolinking(projectRoot) {
20
18
  try {
21
19
  const resolvedAutolinkingPath = require.resolve('expo-modules-autolinking/build/autolinking', {
22
20
  paths: [projectRoot]
23
21
  });
24
-
25
22
  return require(resolvedAutolinkingPath);
26
23
  } catch {
27
24
  throw new Error("Cannot find 'expo-modules-autolinking' package in your project, make sure that you have 'expo' package installed");
28
25
  }
29
26
  }
30
-
31
27
  function assertAutolinkingCompatibility(autolinking) {
32
28
  if ('resolveSearchPathsAsync' in autolinking && 'findModulesAsync' in autolinking) {
33
29
  return;
34
30
  }
35
-
36
31
  throw new Error("The 'expo-modules-autolinking' package has been found, but it seems to be incompatible with '@expo/prebuild-config'");
37
32
  }
38
33
  //# sourceMappingURL=importExpoModulesAutolinking.js.map
@@ -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,4BAAT,CAAsCC,WAAtC,EAA8E;EACnF,MAAMC,WAAW,GAAGC,gCAAgC,CAACF,WAAD,CAApD;EACAG,8BAA8B,CAACF,WAAD,CAA9B;EACA,OAAOA,WAAP;AACD;;AAED,SAASC,gCAAT,CAA0CF,WAA1C,EAAkF;EAChF,IAAI;IACF,MAAMI,uBAAuB,GAAGC,OAAO,CAACC,OAAR,CAAgB,4CAAhB,EAA8D;MAC5FC,KAAK,EAAE,CAACP,WAAD;IADqF,CAA9D,CAAhC;;IAGA,OAAOK,OAAO,CAACD,uBAAD,CAAd;EACD,CALD,CAKE,MAAM;IACN,MAAM,IAAII,KAAJ,CACJ,kHADI,CAAN;EAGD;AACF;;AAED,SAASL,8BAAT,CAAwCF,WAAxC,EAA8E;EAC5E,IAAI,6BAA6BA,WAA7B,IAA4C,sBAAsBA,WAAtE,EAAmF;IACjF;EACD;;EACD,MAAM,IAAIO,KAAJ,CACJ,qHADI,CAAN;AAGD"}
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"}
package/build/index.js CHANGED
@@ -12,19 +12,14 @@ Object.defineProperty(exports, "getPrebuildConfigAsync", {
12
12
  return _getPrebuildConfig().getPrebuildConfigAsync;
13
13
  }
14
14
  });
15
-
16
15
  function _getPrebuildConfig() {
17
16
  const data = require("./getPrebuildConfig");
18
-
19
17
  _getPrebuildConfig = function () {
20
18
  return data;
21
19
  };
22
-
23
20
  return data;
24
21
  }
25
-
26
22
  var _withDefaultPlugins = require("./plugins/withDefaultPlugins");
27
-
28
23
  Object.keys(_withDefaultPlugins).forEach(function (key) {
29
24
  if (key === "default" || key === "__esModule") return;
30
25
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -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":[],"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,9 +1,9 @@
1
- export declare type ContentsJsonImageIdiom = 'iphone' | 'ipad' | 'ios-marketing' | 'universal';
2
- export declare type ContentsJsonImageAppearance = {
1
+ export type ContentsJsonImageIdiom = 'iphone' | 'ipad' | 'ios-marketing' | 'universal';
2
+ export type ContentsJsonImageAppearance = {
3
3
  appearance: 'luminosity';
4
4
  value: 'dark';
5
5
  };
6
- export declare type ContentsJsonImageScale = '1x' | '2x' | '3x';
6
+ export type ContentsJsonImageScale = '1x' | '2x' | '3x';
7
7
  export interface ContentsJsonImage {
8
8
  appearances?: ContentsJsonImageAppearance[];
9
9
  idiom: ContentsJsonImageIdiom;
@@ -5,40 +5,31 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.createContentsJsonItem = createContentsJsonItem;
7
7
  exports.writeContentsJsonAsync = writeContentsJsonAsync;
8
-
9
8
  function _fsExtra() {
10
9
  const data = _interopRequireDefault(require("fs-extra"));
11
-
12
10
  _fsExtra = function () {
13
11
  return data;
14
12
  };
15
-
16
13
  return data;
17
14
  }
18
-
19
15
  function _path() {
20
16
  const data = require("path");
21
-
22
17
  _path = function () {
23
18
  return data;
24
19
  };
25
-
26
20
  return data;
27
21
  }
28
-
29
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
-
31
23
  function createContentsJsonItem(item) {
32
24
  return item;
33
25
  }
26
+
34
27
  /**
35
28
  * Writes the Config.json which is used to assign images to their respective platform, dpi, and idiom.
36
29
  *
37
30
  * @param directory path to add the Contents.json to.
38
31
  * @param contents image json data
39
32
  */
40
-
41
-
42
33
  async function writeContentsJsonAsync(directory, {
43
34
  images
44
35
  }) {
@@ -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;;;;AA2BO,SAASA,sBAAT,CAAgCC,IAAhC,EAA4E;EACjF,OAAOA,IAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;;;AACO,eAAeC,sBAAf,CACLC,SADK,EAEL;EAAEC;AAAF,CAFK,EAGU;EACf,MAAMC,kBAAA,CAAGC,SAAH,CAAaH,SAAb,CAAN;EAEA,MAAME,kBAAA,CAAGE,SAAH,CACJ,IAAAC,YAAA,EAAKL,SAAL,EAAgB,eAAhB,CADI,EAEJM,IAAI,CAACC,SAAL,CACE;IACEN,MADF;IAEEO,IAAI,EAAE;MACJC,OAAO,EAAE,CADL;MAEJ;MACAC,MAAM,EAAE;IAHJ;EAFR,CADF,EASE,IATF,EAUE,CAVF,CAFI,CAAN;AAeD"}
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,7 +1,7 @@
1
1
  import { AndroidConfig, ConfigPlugin } from '@expo/config-plugins';
2
2
  import { ExpoConfig } from '@expo/config-types';
3
- declare type DPIString = 'mdpi' | 'hdpi' | 'xhdpi' | 'xxhdpi' | 'xxxhdpi';
4
- declare type dpiMap = Record<DPIString, {
3
+ type DPIString = 'mdpi' | 'hdpi' | 'xhdpi' | 'xxhdpi' | 'xxxhdpi';
4
+ type dpiMap = Record<DPIString, {
5
5
  folderName: string;
6
6
  scale: number;
7
7
  }>;
@@ -14,16 +14,18 @@ export declare function getAdaptiveIcon(config: ExpoConfig): {
14
14
  foregroundImage: string | null;
15
15
  backgroundColor: string | null;
16
16
  backgroundImage: string | null;
17
+ monochromeImage: string | null;
17
18
  };
18
19
  /**
19
20
  * Resizes the user-provided icon to create a set of legacy icon files in
20
21
  * their respective "mipmap" directories for <= Android 7, and creates a set of adaptive
21
22
  * icon files for > Android 7 from the adaptive icon files (if provided).
22
23
  */
23
- export declare function setIconAsync(projectRoot: string, { icon, backgroundColor, backgroundImage, isAdaptive, }: {
24
+ export declare function setIconAsync(projectRoot: string, { icon, backgroundColor, backgroundImage, monochromeImage, isAdaptive, }: {
24
25
  icon: string | null;
25
26
  backgroundColor: string | null;
26
27
  backgroundImage: string | null;
28
+ monochromeImage: string | null;
27
29
  isAdaptive: boolean;
28
30
  }): Promise<true | null>;
29
31
  /**
@@ -32,6 +34,6 @@ export declare function setIconAsync(projectRoot: string, { icon, backgroundColo
32
34
  * - A backgroundImage is provided, or
33
35
  * - A backgroundColor was specified
34
36
  */
35
- export declare function configureAdaptiveIconAsync(projectRoot: string, foregroundImage: string, backgroundImage: string | null, isAdaptive: boolean): Promise<void>;
36
- export declare const createAdaptiveIconXmlString: (backgroundImage: string | null) => string;
37
+ export declare function configureAdaptiveIconAsync(projectRoot: string, foregroundImage: string, backgroundImage: string | null, monochromeImage: string | null, isAdaptive: boolean): Promise<void>;
38
+ export declare const createAdaptiveIconXmlString: (backgroundImage: string | null, monochromeImage: string | null) => string;
37
39
  export {};