@expo/config-plugins 5.0.4 → 6.0.1

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 (190) hide show
  1. package/build/Plugin.types.d.ts +7 -7
  2. package/build/Plugin.types.js +0 -9
  3. package/build/Plugin.types.js.map +1 -1
  4. package/build/android/AllowBackup.js +0 -15
  5. package/build/android/AllowBackup.js.map +1 -1
  6. package/build/android/BuildProperties.js +2 -16
  7. package/build/android/BuildProperties.js.map +1 -1
  8. package/build/android/Colors.js +3 -25
  9. package/build/android/Colors.js.map +1 -1
  10. package/build/android/EasBuild.js +2 -22
  11. package/build/android/EasBuild.js.map +1 -1
  12. package/build/android/EasBuildGradleScript.js.map +1 -1
  13. package/build/android/GoogleMapsApiKey.js +0 -12
  14. package/build/android/GoogleMapsApiKey.js.map +1 -1
  15. package/build/android/GoogleServices.js +10 -48
  16. package/build/android/GoogleServices.js.map +1 -1
  17. package/build/android/IntentFilters.d.ts +1 -1
  18. package/build/android/IntentFilters.js +8 -24
  19. package/build/android/IntentFilters.js.map +1 -1
  20. package/build/android/Manifest.d.ts +19 -19
  21. package/build/android/Manifest.js +7 -66
  22. package/build/android/Manifest.js.map +1 -1
  23. package/build/android/Name.js +6 -27
  24. package/build/android/Name.js.map +1 -1
  25. package/build/android/Orientation.js +2 -12
  26. package/build/android/Orientation.js.map +1 -1
  27. package/build/android/Package.js +26 -111
  28. package/build/android/Package.js.map +1 -1
  29. package/build/android/Paths.d.ts +2 -2
  30. package/build/android/Paths.js +0 -47
  31. package/build/android/Paths.js.map +1 -1
  32. package/build/android/Permissions.js +8 -52
  33. package/build/android/Permissions.js.map +1 -1
  34. package/build/android/PrimaryColor.js +0 -18
  35. package/build/android/PrimaryColor.js.map +1 -1
  36. package/build/android/Properties.d.ts +1 -1
  37. package/build/android/Properties.js +0 -9
  38. package/build/android/Properties.js.map +1 -1
  39. package/build/android/Resources.d.ts +4 -4
  40. package/build/android/Resources.js +9 -29
  41. package/build/android/Resources.js.map +1 -1
  42. package/build/android/Scheme.d.ts +1 -1
  43. package/build/android/Scheme.js +13 -66
  44. package/build/android/Scheme.js.map +1 -1
  45. package/build/android/StatusBar.js +5 -33
  46. package/build/android/StatusBar.js.map +1 -1
  47. package/build/android/Strings.js +0 -14
  48. package/build/android/Strings.js.map +1 -1
  49. package/build/android/Styles.js +7 -34
  50. package/build/android/Styles.js.map +1 -1
  51. package/build/android/Updates.d.ts +2 -0
  52. package/build/android/Updates.js +50 -47
  53. package/build/android/Updates.js.map +1 -1
  54. package/build/android/Version.js +3 -29
  55. package/build/android/Version.js.map +1 -1
  56. package/build/android/WindowSoftInputMode.js +0 -14
  57. package/build/android/WindowSoftInputMode.js.map +1 -1
  58. package/build/android/codeMod.js +6 -22
  59. package/build/android/codeMod.js.map +1 -1
  60. package/build/android/index.js +0 -94
  61. package/build/android/index.js.map +1 -1
  62. package/build/index.js +2 -65
  63. package/build/index.js.map +1 -1
  64. package/build/ios/Bitcode.d.ts +1 -1
  65. package/build/ios/Bitcode.js +8 -28
  66. package/build/ios/Bitcode.js.map +1 -1
  67. package/build/ios/BuildProperties.js +2 -14
  68. package/build/ios/BuildProperties.js.map +1 -1
  69. package/build/ios/BuildScheme.js +2 -34
  70. package/build/ios/BuildScheme.js.map +1 -1
  71. package/build/ios/BundleIdentifier.js +13 -72
  72. package/build/ios/BundleIdentifier.js.map +1 -1
  73. package/build/ios/DeviceFamily.js +6 -24
  74. package/build/ios/DeviceFamily.js.map +1 -1
  75. package/build/ios/Entitlements.js +4 -45
  76. package/build/ios/Entitlements.js.map +1 -1
  77. package/build/ios/Google.d.ts +2 -2
  78. package/build/ios/Google.js +11 -66
  79. package/build/ios/Google.js.map +1 -1
  80. package/build/ios/IosConfig.types.d.ts +6 -11
  81. package/build/ios/IosConfig.types.js.map +1 -1
  82. package/build/ios/Locales.d.ts +3 -3
  83. package/build/ios/Locales.js +12 -43
  84. package/build/ios/Locales.js.map +1 -1
  85. package/build/ios/Maps.js +16 -56
  86. package/build/ios/Maps.js.map +1 -1
  87. package/build/ios/Name.js +7 -31
  88. package/build/ios/Name.js.map +1 -1
  89. package/build/ios/Orientation.js +2 -10
  90. package/build/ios/Orientation.js.map +1 -1
  91. package/build/ios/Paths.d.ts +2 -2
  92. package/build/ios/Paths.js +8 -73
  93. package/build/ios/Paths.js.map +1 -1
  94. package/build/ios/Permissions.js +1 -16
  95. package/build/ios/Permissions.js.map +1 -1
  96. package/build/ios/ProvisioningProfile.d.ts +1 -1
  97. package/build/ios/ProvisioningProfile.js +0 -18
  98. package/build/ios/ProvisioningProfile.js.map +1 -1
  99. package/build/ios/RequiresFullScreen.js +19 -31
  100. package/build/ios/RequiresFullScreen.js.map +1 -1
  101. package/build/ios/Scheme.js +10 -32
  102. package/build/ios/Scheme.js.map +1 -1
  103. package/build/ios/Swift.js +16 -50
  104. package/build/ios/Swift.js.map +1 -1
  105. package/build/ios/Target.js +0 -30
  106. package/build/ios/Target.js.map +1 -1
  107. package/build/ios/Updates.js +10 -49
  108. package/build/ios/Updates.js.map +1 -1
  109. package/build/ios/UsesNonExemptEncryption.js +4 -10
  110. package/build/ios/UsesNonExemptEncryption.js.map +1 -1
  111. package/build/ios/Version.js +4 -11
  112. package/build/ios/Version.js.map +1 -1
  113. package/build/ios/XcodeProjectFile.js +5 -23
  114. package/build/ios/XcodeProjectFile.js.map +1 -1
  115. package/build/ios/codeMod.js +19 -60
  116. package/build/ios/codeMod.js.map +1 -1
  117. package/build/ios/index.js +0 -97
  118. package/build/ios/index.js.map +1 -1
  119. package/build/ios/utils/Xcodeproj.d.ts +6 -6
  120. package/build/ios/utils/Xcodeproj.js +15 -101
  121. package/build/ios/utils/Xcodeproj.js.map +1 -1
  122. package/build/ios/utils/getInfoPlistPath.js +2 -15
  123. package/build/ios/utils/getInfoPlistPath.js.map +1 -1
  124. package/build/ios/utils/string.js +0 -1
  125. package/build/ios/utils/string.js.map +1 -1
  126. package/build/plugins/android-plugins.d.ts +2 -2
  127. package/build/plugins/android-plugins.js +11 -42
  128. package/build/plugins/android-plugins.js.map +1 -1
  129. package/build/plugins/createBaseMod.d.ts +3 -3
  130. package/build/plugins/createBaseMod.js +8 -25
  131. package/build/plugins/createBaseMod.js.map +1 -1
  132. package/build/plugins/ios-plugins.d.ts +2 -2
  133. package/build/plugins/ios-plugins.js +8 -48
  134. package/build/plugins/ios-plugins.js.map +1 -1
  135. package/build/plugins/mod-compiler.js +21 -72
  136. package/build/plugins/mod-compiler.js.map +1 -1
  137. package/build/plugins/withAndroidBaseMods.d.ts +1 -1
  138. package/build/plugins/withAndroidBaseMods.js +4 -89
  139. package/build/plugins/withAndroidBaseMods.js.map +1 -1
  140. package/build/plugins/withDangerousMod.js +0 -5
  141. package/build/plugins/withDangerousMod.js.map +1 -1
  142. package/build/plugins/withIosBaseMods.d.ts +1 -1
  143. package/build/plugins/withIosBaseMods.js +26 -118
  144. package/build/plugins/withIosBaseMods.js.map +1 -1
  145. package/build/plugins/withMod.d.ts +1 -1
  146. package/build/plugins/withMod.js +24 -59
  147. package/build/plugins/withMod.js.map +1 -1
  148. package/build/plugins/withPlugins.js +0 -9
  149. package/build/plugins/withPlugins.js.map +1 -1
  150. package/build/plugins/withRunOnce.js +3 -9
  151. package/build/plugins/withRunOnce.js.map +1 -1
  152. package/build/plugins/withStaticPlugin.js +21 -43
  153. package/build/plugins/withStaticPlugin.js.map +1 -1
  154. package/build/utils/BuildProperties.types.d.ts +2 -2
  155. package/build/utils/BuildProperties.types.js.map +1 -1
  156. package/build/utils/Updates.d.ts +3 -1
  157. package/build/utils/Updates.js +18 -77
  158. package/build/utils/Updates.js.map +1 -1
  159. package/build/utils/XML.d.ts +1 -1
  160. package/build/utils/XML.js +7 -44
  161. package/build/utils/XML.js.map +1 -1
  162. package/build/utils/commonCodeMod.js +2 -10
  163. package/build/utils/commonCodeMod.js.map +1 -1
  164. package/build/utils/errors.d.ts +1 -1
  165. package/build/utils/errors.js +3 -11
  166. package/build/utils/errors.js.map +1 -1
  167. package/build/utils/fs.js +1 -12
  168. package/build/utils/fs.js.map +1 -1
  169. package/build/utils/generateCode.d.ts +1 -1
  170. package/build/utils/generateCode.js +8 -25
  171. package/build/utils/generateCode.js.map +1 -1
  172. package/build/utils/history.d.ts +1 -1
  173. package/build/utils/history.js +0 -6
  174. package/build/utils/history.js.map +1 -1
  175. package/build/utils/matchBrackets.d.ts +3 -3
  176. package/build/utils/matchBrackets.js +2 -17
  177. package/build/utils/matchBrackets.js.map +1 -1
  178. package/build/utils/modules.js +0 -10
  179. package/build/utils/modules.js.map +1 -1
  180. package/build/utils/obj.js +0 -4
  181. package/build/utils/obj.js.map +1 -1
  182. package/build/utils/plugin-resolver.js +25 -69
  183. package/build/utils/plugin-resolver.js.map +1 -1
  184. package/build/utils/sortObject.js +4 -10
  185. package/build/utils/sortObject.js.map +1 -1
  186. package/build/utils/versions.js +0 -10
  187. package/build/utils/versions.js.map +1 -1
  188. package/build/utils/warnings.js +1 -9
  189. package/build/utils/warnings.js.map +1 -1
  190. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"GoogleMapsApiKey.js","names":["META_API_KEY","LIB_HTTP","withGoogleMapsApiKey","createAndroidManifestPlugin","setGoogleMapsApiKey","getGoogleMapsApiKey","config","android","googleMaps","apiKey","androidManifest","mainApplication","getMainApplicationOrThrow","addMetaDataItemToMainApplication","addUsesLibraryItemToMainApplication","name","required","removeMetaDataItemFromMainApplication","removeUsesLibraryItemFromMainApplication"],"sources":["../../src/android/GoogleMapsApiKey.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createAndroidManifestPlugin } from '../plugins/android-plugins';\nimport {\n addMetaDataItemToMainApplication,\n addUsesLibraryItemToMainApplication,\n AndroidManifest,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n removeUsesLibraryItemFromMainApplication,\n} from './Manifest';\n\nconst META_API_KEY = 'com.google.android.geo.API_KEY';\nconst LIB_HTTP = 'org.apache.http.legacy';\n\nexport const withGoogleMapsApiKey = createAndroidManifestPlugin(\n setGoogleMapsApiKey,\n 'withGoogleMapsApiKey'\n);\n\nexport function getGoogleMapsApiKey(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMaps?.apiKey ?? null;\n}\n\nexport function setGoogleMapsApiKey(\n config: Pick<ExpoConfig, 'android'>,\n androidManifest: AndroidManifest\n) {\n const apiKey = getGoogleMapsApiKey(config);\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (apiKey) {\n // If the item exists, add it back\n addMetaDataItemToMainApplication(mainApplication, META_API_KEY, apiKey);\n addUsesLibraryItemToMainApplication(mainApplication, {\n name: LIB_HTTP,\n required: false,\n });\n } else {\n // Remove any existing item\n removeMetaDataItemFromMainApplication(mainApplication, META_API_KEY);\n removeUsesLibraryItemFromMainApplication(mainApplication, LIB_HTTP);\n }\n\n return androidManifest;\n}\n"],"mappings":";;;;;;;;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AASA,MAAMA,YAAY,GAAG,gCAArB;AACA,MAAMC,QAAQ,GAAG,wBAAjB;AAEO,MAAMC,oBAAoB,GAAG,IAAAC,6CAAA,EAClCC,mBADkC,EAElC,sBAFkC,CAA7B;;;AAKA,SAASC,mBAAT,CAA6BC,MAA7B,EAAkE;EAAA;;EACvE,mDAAOA,MAAM,CAACC,OAAd,8EAAO,gBAAgBD,MAAvB,qFAAO,uBAAwBE,UAA/B,2DAAO,uBAAoCC,MAA3C,yEAAqD,IAArD;AACD;;AAEM,SAASL,mBAAT,CACLE,MADK,EAELI,eAFK,EAGL;EACA,MAAMD,MAAM,GAAGJ,mBAAmB,CAACC,MAAD,CAAlC;EACA,MAAMK,eAAe,GAAG,IAAAC,qCAAA,EAA0BF,eAA1B,CAAxB;;EAEA,IAAID,MAAJ,EAAY;IACV;IACA,IAAAI,4CAAA,EAAiCF,eAAjC,EAAkDX,YAAlD,EAAgES,MAAhE;IACA,IAAAK,+CAAA,EAAoCH,eAApC,EAAqD;MACnDI,IAAI,EAAEd,QAD6C;MAEnDe,QAAQ,EAAE;IAFyC,CAArD;EAID,CAPD,MAOO;IACL;IACA,IAAAC,iDAAA,EAAsCN,eAAtC,EAAuDX,YAAvD;IACA,IAAAkB,oDAAA,EAAyCP,eAAzC,EAA0DV,QAA1D;EACD;;EAED,OAAOS,eAAP;AACD"}
1
+ {"version":3,"file":"GoogleMapsApiKey.js","names":["META_API_KEY","LIB_HTTP","withGoogleMapsApiKey","createAndroidManifestPlugin","setGoogleMapsApiKey","getGoogleMapsApiKey","config","android","googleMaps","apiKey","androidManifest","mainApplication","getMainApplicationOrThrow","addMetaDataItemToMainApplication","addUsesLibraryItemToMainApplication","name","required","removeMetaDataItemFromMainApplication","removeUsesLibraryItemFromMainApplication"],"sources":["../../src/android/GoogleMapsApiKey.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createAndroidManifestPlugin } from '../plugins/android-plugins';\nimport {\n addMetaDataItemToMainApplication,\n addUsesLibraryItemToMainApplication,\n AndroidManifest,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n removeUsesLibraryItemFromMainApplication,\n} from './Manifest';\n\nconst META_API_KEY = 'com.google.android.geo.API_KEY';\nconst LIB_HTTP = 'org.apache.http.legacy';\n\nexport const withGoogleMapsApiKey = createAndroidManifestPlugin(\n setGoogleMapsApiKey,\n 'withGoogleMapsApiKey'\n);\n\nexport function getGoogleMapsApiKey(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.config?.googleMaps?.apiKey ?? null;\n}\n\nexport function setGoogleMapsApiKey(\n config: Pick<ExpoConfig, 'android'>,\n androidManifest: AndroidManifest\n) {\n const apiKey = getGoogleMapsApiKey(config);\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (apiKey) {\n // If the item exists, add it back\n addMetaDataItemToMainApplication(mainApplication, META_API_KEY, apiKey);\n addUsesLibraryItemToMainApplication(mainApplication, {\n name: LIB_HTTP,\n required: false,\n });\n } else {\n // Remove any existing item\n removeMetaDataItemFromMainApplication(mainApplication, META_API_KEY);\n removeUsesLibraryItemFromMainApplication(mainApplication, LIB_HTTP);\n }\n\n return androidManifest;\n}\n"],"mappings":";;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AASA,MAAMA,YAAY,GAAG,gCAAgC;AACrD,MAAMC,QAAQ,GAAG,wBAAwB;AAElC,MAAMC,oBAAoB,GAAG,IAAAC,6CAA2B,EAC7DC,mBAAmB,EACnB,sBAAsB,CACvB;AAAC;AAEK,SAASC,mBAAmB,CAACC,MAAmC,EAAE;EAAA;EACvE,mDAAOA,MAAM,CAACC,OAAO,8EAAd,gBAAgBD,MAAM,qFAAtB,uBAAwBE,UAAU,2DAAlC,uBAAoCC,MAAM,yEAAI,IAAI;AAC3D;AAEO,SAASL,mBAAmB,CACjCE,MAAmC,EACnCI,eAAgC,EAChC;EACA,MAAMD,MAAM,GAAGJ,mBAAmB,CAACC,MAAM,CAAC;EAC1C,MAAMK,eAAe,GAAG,IAAAC,qCAAyB,EAACF,eAAe,CAAC;EAElE,IAAID,MAAM,EAAE;IACV;IACA,IAAAI,4CAAgC,EAACF,eAAe,EAAEX,YAAY,EAAES,MAAM,CAAC;IACvE,IAAAK,+CAAmC,EAACH,eAAe,EAAE;MACnDI,IAAI,EAAEd,QAAQ;MACde,QAAQ,EAAE;IACZ,CAAC,CAAC;EACJ,CAAC,MAAM;IACL;IACA,IAAAC,iDAAqC,EAACN,eAAe,EAAEX,YAAY,CAAC;IACpE,IAAAkB,oDAAwC,EAACP,eAAe,EAAEV,QAAQ,CAAC;EACrE;EAEA,OAAOS,eAAe;AACxB"}
@@ -8,65 +8,48 @@ exports.getGoogleServicesFilePath = getGoogleServicesFilePath;
8
8
  exports.setClassPath = setClassPath;
9
9
  exports.setGoogleServicesFile = setGoogleServicesFile;
10
10
  exports.withGoogleServicesFile = exports.withClassPath = exports.withApplyPlugin = void 0;
11
-
12
11
  function _path() {
13
12
  const data = _interopRequireDefault(require("path"));
14
-
15
13
  _path = function () {
16
14
  return data;
17
15
  };
18
-
19
16
  return data;
20
17
  }
21
-
22
18
  function _androidPlugins() {
23
19
  const data = require("../plugins/android-plugins");
24
-
25
20
  _androidPlugins = function () {
26
21
  return data;
27
22
  };
28
-
29
23
  return data;
30
24
  }
31
-
32
25
  function _withDangerousMod() {
33
26
  const data = require("../plugins/withDangerousMod");
34
-
35
27
  _withDangerousMod = function () {
36
28
  return data;
37
29
  };
38
-
39
30
  return data;
40
31
  }
41
-
42
32
  function _fs() {
43
33
  const data = require("../utils/fs");
44
-
45
34
  _fs = function () {
46
35
  return data;
47
36
  };
48
-
49
37
  return data;
50
38
  }
51
-
52
39
  function _warnings() {
53
40
  const data = require("../utils/warnings");
54
-
55
41
  _warnings = function () {
56
42
  return data;
57
43
  };
58
-
59
44
  return data;
60
45
  }
61
-
62
46
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63
-
64
47
  const DEFAULT_TARGET_PATH = './android/app/google-services.json';
65
48
  const googleServicesClassPath = 'com.google.gms:google-services';
66
- const googleServicesPlugin = 'com.google.gms.google-services'; // NOTE(brentvatne): This may be annoying to keep up to date...
49
+ const googleServicesPlugin = 'com.google.gms.google-services';
67
50
 
51
+ // NOTE(brentvatne): This may be annoying to keep up to date...
68
52
  const googleServicesVersion = '4.3.3';
69
-
70
53
  const withClassPath = config => {
71
54
  return (0, _androidPlugins().withProjectBuildGradle)(config, config => {
72
55
  if (config.modResults.language === 'groovy') {
@@ -74,13 +57,10 @@ const withClassPath = config => {
74
57
  } else {
75
58
  (0, _warnings().addWarningAndroid)('android.googleServicesFile', `Cannot automatically configure project build.gradle if it's not groovy`);
76
59
  }
77
-
78
60
  return config;
79
61
  });
80
62
  };
81
-
82
63
  exports.withClassPath = withClassPath;
83
-
84
64
  const withApplyPlugin = config => {
85
65
  return (0, _androidPlugins().withAppBuildGradle)(config, config => {
86
66
  if (config.modResults.language === 'groovy') {
@@ -88,90 +68,72 @@ const withApplyPlugin = config => {
88
68
  } else {
89
69
  (0, _warnings().addWarningAndroid)('android.googleServicesFile', `Cannot automatically configure app build.gradle if it's not groovy`);
90
70
  }
91
-
92
71
  return config;
93
72
  });
94
73
  };
74
+
95
75
  /**
96
76
  * Add `google-services.json` to project
97
77
  */
98
-
99
-
100
78
  exports.withApplyPlugin = withApplyPlugin;
101
-
102
79
  const withGoogleServicesFile = config => {
103
80
  return (0, _withDangerousMod().withDangerousMod)(config, ['android', async config => {
104
81
  await setGoogleServicesFile(config, config.modRequest.projectRoot);
105
82
  return config;
106
83
  }]);
107
84
  };
108
-
109
85
  exports.withGoogleServicesFile = withGoogleServicesFile;
110
-
111
86
  function getGoogleServicesFilePath(config) {
112
87
  var _config$android$googl, _config$android;
113
-
114
88
  return (_config$android$googl = (_config$android = config.android) === null || _config$android === void 0 ? void 0 : _config$android.googleServicesFile) !== null && _config$android$googl !== void 0 ? _config$android$googl : null;
115
89
  }
116
-
117
90
  async function setGoogleServicesFile(config, projectRoot, targetPath = DEFAULT_TARGET_PATH) {
118
91
  const partialSourcePath = getGoogleServicesFilePath(config);
119
-
120
92
  if (!partialSourcePath) {
121
93
  return false;
122
94
  }
123
-
124
95
  const completeSourcePath = _path().default.resolve(projectRoot, partialSourcePath);
125
-
126
96
  const destinationPath = _path().default.resolve(projectRoot, targetPath);
127
-
128
97
  try {
129
98
  await (0, _fs().copyFilePathToPathAsync)(completeSourcePath, destinationPath);
130
99
  } catch (e) {
131
100
  console.log(e);
132
101
  throw new Error(`Cannot copy google-services.json from ${completeSourcePath} to ${destinationPath}. Please make sure the source and destination paths exist.`);
133
102
  }
134
-
135
103
  return true;
136
104
  }
105
+
137
106
  /**
138
107
  * Adding the Google Services plugin
139
108
  * NOTE(brentvatne): string replacement is a fragile approach! we need a
140
109
  * better solution than this.
141
110
  */
142
-
143
-
144
111
  function setClassPath(config, buildGradle) {
145
112
  const googleServicesFile = getGoogleServicesFilePath(config);
146
-
147
113
  if (!googleServicesFile) {
148
114
  return buildGradle;
149
115
  }
150
-
151
116
  if (buildGradle.includes(googleServicesClassPath)) {
152
117
  return buildGradle;
153
- } //
154
-
118
+ }
155
119
 
120
+ //
156
121
  return buildGradle.replace(/dependencies\s?{/, `dependencies {
157
122
  classpath '${googleServicesClassPath}:${googleServicesVersion}'`);
158
123
  }
159
-
160
124
  function applyPlugin(config, appBuildGradle) {
161
125
  const googleServicesFile = getGoogleServicesFilePath(config);
162
-
163
126
  if (!googleServicesFile) {
164
127
  return appBuildGradle;
165
- } // Make sure the project does not have the plugin already
166
-
128
+ }
167
129
 
130
+ // Make sure the project does not have the plugin already
168
131
  const pattern = new RegExp(`apply\\s+plugin:\\s+['"]${googleServicesPlugin}['"]`);
169
-
170
132
  if (appBuildGradle.match(pattern)) {
171
133
  return appBuildGradle;
172
- } // Add it to the end of the file
173
-
134
+ }
174
135
 
136
+ // Add it to the end of the file
175
137
  return appBuildGradle + `\napply plugin: '${googleServicesPlugin}'`;
176
138
  }
177
139
  //# sourceMappingURL=GoogleServices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GoogleServices.js","names":["DEFAULT_TARGET_PATH","googleServicesClassPath","googleServicesPlugin","googleServicesVersion","withClassPath","config","withProjectBuildGradle","modResults","language","contents","setClassPath","addWarningAndroid","withApplyPlugin","withAppBuildGradle","applyPlugin","withGoogleServicesFile","withDangerousMod","setGoogleServicesFile","modRequest","projectRoot","getGoogleServicesFilePath","android","googleServicesFile","targetPath","partialSourcePath","completeSourcePath","path","resolve","destinationPath","copyFilePathToPathAsync","e","console","log","Error","buildGradle","includes","replace","appBuildGradle","pattern","RegExp","match"],"sources":["../../src/android/GoogleServices.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport path from 'path';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withAppBuildGradle, withProjectBuildGradle } from '../plugins/android-plugins';\nimport { withDangerousMod } from '../plugins/withDangerousMod';\nimport { copyFilePathToPathAsync } from '../utils/fs';\nimport { addWarningAndroid } from '../utils/warnings';\n\nconst DEFAULT_TARGET_PATH = './android/app/google-services.json';\n\nconst googleServicesClassPath = 'com.google.gms:google-services';\nconst googleServicesPlugin = 'com.google.gms.google-services';\n\n// NOTE(brentvatne): This may be annoying to keep up to date...\nconst googleServicesVersion = '4.3.3';\n\nexport const withClassPath: ConfigPlugin = (config) => {\n return withProjectBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = setClassPath(config, config.modResults.contents);\n } else {\n addWarningAndroid(\n 'android.googleServicesFile',\n `Cannot automatically configure project build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\nexport const withApplyPlugin: ConfigPlugin = (config) => {\n return withAppBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = applyPlugin(config, config.modResults.contents);\n } else {\n addWarningAndroid(\n 'android.googleServicesFile',\n `Cannot automatically configure app build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\n/**\n * Add `google-services.json` to project\n */\nexport const withGoogleServicesFile: ConfigPlugin = (config) => {\n return withDangerousMod(config, [\n 'android',\n async (config) => {\n await setGoogleServicesFile(config, config.modRequest.projectRoot);\n return config;\n },\n ]);\n};\n\nexport function getGoogleServicesFilePath(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.googleServicesFile ?? null;\n}\n\nexport async function setGoogleServicesFile(\n config: Pick<ExpoConfig, 'android'>,\n projectRoot: string,\n targetPath: string = DEFAULT_TARGET_PATH\n) {\n const partialSourcePath = getGoogleServicesFilePath(config);\n if (!partialSourcePath) {\n return false;\n }\n\n const completeSourcePath = path.resolve(projectRoot, partialSourcePath);\n const destinationPath = path.resolve(projectRoot, targetPath);\n\n try {\n await copyFilePathToPathAsync(completeSourcePath, destinationPath);\n } catch (e) {\n console.log(e);\n throw new Error(\n `Cannot copy google-services.json from ${completeSourcePath} to ${destinationPath}. Please make sure the source and destination paths exist.`\n );\n }\n return true;\n}\n\n/**\n * Adding the Google Services plugin\n * NOTE(brentvatne): string replacement is a fragile approach! we need a\n * better solution than this.\n */\nexport function setClassPath(config: Pick<ExpoConfig, 'android'>, buildGradle: string) {\n const googleServicesFile = getGoogleServicesFilePath(config);\n if (!googleServicesFile) {\n return buildGradle;\n }\n\n if (buildGradle.includes(googleServicesClassPath)) {\n return buildGradle;\n }\n\n //\n return buildGradle.replace(\n /dependencies\\s?{/,\n `dependencies {\n classpath '${googleServicesClassPath}:${googleServicesVersion}'`\n );\n}\n\nexport function applyPlugin(config: Pick<ExpoConfig, 'android'>, appBuildGradle: string) {\n const googleServicesFile = getGoogleServicesFilePath(config);\n if (!googleServicesFile) {\n return appBuildGradle;\n }\n\n // Make sure the project does not have the plugin already\n const pattern = new RegExp(`apply\\\\s+plugin:\\\\s+['\"]${googleServicesPlugin}['\"]`);\n if (appBuildGradle.match(pattern)) {\n return appBuildGradle;\n }\n\n // Add it to the end of the file\n return appBuildGradle + `\\napply plugin: '${googleServicesPlugin}'`;\n}\n"],"mappings":";;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEA,MAAMA,mBAAmB,GAAG,oCAA5B;AAEA,MAAMC,uBAAuB,GAAG,gCAAhC;AACA,MAAMC,oBAAoB,GAAG,gCAA7B,C,CAEA;;AACA,MAAMC,qBAAqB,GAAG,OAA9B;;AAEO,MAAMC,aAA2B,GAAIC,MAAD,IAAY;EACrD,OAAO,IAAAC,wCAAA,EAAuBD,MAAvB,EAAgCA,MAAD,IAAY;IAChD,IAAIA,MAAM,CAACE,UAAP,CA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AAP;EACD,CAVsF,CAYvF;;;EACA,OAAOA,cAAc,GAAI,oBAAmBnC,oBAAqB,GAAjE;AACD"}
1
+ {"version":3,"file":"GoogleServices.js","names":["DEFAULT_TARGET_PATH","googleServicesClassPath","googleServicesPlugin","googleServicesVersion","withClassPath","config","withProjectBuildGradle","modResults","language","contents","setClassPath","addWarningAndroid","withApplyPlugin","withAppBuildGradle","applyPlugin","withGoogleServicesFile","withDangerousMod","setGoogleServicesFile","modRequest","projectRoot","getGoogleServicesFilePath","android","googleServicesFile","targetPath","partialSourcePath","completeSourcePath","path","resolve","destinationPath","copyFilePathToPathAsync","e","console","log","Error","buildGradle","includes","replace","appBuildGradle","pattern","RegExp","match"],"sources":["../../src/android/GoogleServices.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport path from 'path';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withAppBuildGradle, withProjectBuildGradle } from '../plugins/android-plugins';\nimport { withDangerousMod } from '../plugins/withDangerousMod';\nimport { copyFilePathToPathAsync } from '../utils/fs';\nimport { addWarningAndroid } from '../utils/warnings';\n\nconst DEFAULT_TARGET_PATH = './android/app/google-services.json';\n\nconst googleServicesClassPath = 'com.google.gms:google-services';\nconst googleServicesPlugin = 'com.google.gms.google-services';\n\n// NOTE(brentvatne): This may be annoying to keep up to date...\nconst googleServicesVersion = '4.3.3';\n\nexport const withClassPath: ConfigPlugin = (config) => {\n return withProjectBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = setClassPath(config, config.modResults.contents);\n } else {\n addWarningAndroid(\n 'android.googleServicesFile',\n `Cannot automatically configure project build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\nexport const withApplyPlugin: ConfigPlugin = (config) => {\n return withAppBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = applyPlugin(config, config.modResults.contents);\n } else {\n addWarningAndroid(\n 'android.googleServicesFile',\n `Cannot automatically configure app build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\n/**\n * Add `google-services.json` to project\n */\nexport const withGoogleServicesFile: ConfigPlugin = (config) => {\n return withDangerousMod(config, [\n 'android',\n async (config) => {\n await setGoogleServicesFile(config, config.modRequest.projectRoot);\n return config;\n },\n ]);\n};\n\nexport function getGoogleServicesFilePath(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.googleServicesFile ?? null;\n}\n\nexport async function setGoogleServicesFile(\n config: Pick<ExpoConfig, 'android'>,\n projectRoot: string,\n targetPath: string = DEFAULT_TARGET_PATH\n) {\n const partialSourcePath = getGoogleServicesFilePath(config);\n if (!partialSourcePath) {\n return false;\n }\n\n const completeSourcePath = path.resolve(projectRoot, partialSourcePath);\n const destinationPath = path.resolve(projectRoot, targetPath);\n\n try {\n await copyFilePathToPathAsync(completeSourcePath, destinationPath);\n } catch (e) {\n console.log(e);\n throw new Error(\n `Cannot copy google-services.json from ${completeSourcePath} to ${destinationPath}. Please make sure the source and destination paths exist.`\n );\n }\n return true;\n}\n\n/**\n * Adding the Google Services plugin\n * NOTE(brentvatne): string replacement is a fragile approach! we need a\n * better solution than this.\n */\nexport function setClassPath(config: Pick<ExpoConfig, 'android'>, buildGradle: string) {\n const googleServicesFile = getGoogleServicesFilePath(config);\n if (!googleServicesFile) {\n return buildGradle;\n }\n\n if (buildGradle.includes(googleServicesClassPath)) {\n return buildGradle;\n }\n\n //\n return buildGradle.replace(\n /dependencies\\s?{/,\n `dependencies {\n classpath '${googleServicesClassPath}:${googleServicesVersion}'`\n );\n}\n\nexport function applyPlugin(config: Pick<ExpoConfig, 'android'>, appBuildGradle: string) {\n const googleServicesFile = getGoogleServicesFilePath(config);\n if (!googleServicesFile) {\n return appBuildGradle;\n }\n\n // Make sure the project does not have the plugin already\n const pattern = new RegExp(`apply\\\\s+plugin:\\\\s+['\"]${googleServicesPlugin}['\"]`);\n if (appBuildGradle.match(pattern)) {\n return appBuildGradle;\n }\n\n // Add it to the end of the file\n return appBuildGradle + `\\napply pl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,QAAQ,CAAClC,uBAAuB,CAAC,EAAE;IACjD,OAAOiC,WAAW;EACpB;;EAEA;EACA,OAAOA,WAAW,CAACE,OAAO,CACxB,kBAAkB,EACjB;AACL,qBAAqBnC,uBAAwB,IAAGE,qBAAsB,GAAE,CACrE;AACH;AAEO,SAASW,WAAW,CAACT,MAAmC,EAAEgC,cAAsB,EAAE;EACvF,MAAMf,kBAAkB,GAAGF,yBAAyB,CAACf,MAAM,CAAC;EAC5D,IAAI,CAACiB,kBAAkB,EAAE;IACvB,OAAOe,cAAc;EACvB;;EAEA;EACA,MAAMC,OAAO,GAAG,IAAIC,MAAM,CAAE,2BAA0BrC,oBAAqB,MAAK,CAAC;EACjF,IAAImC,cAAc,CAACG,KAAK,CAACF,OAAO,CAAC,EAAE;IACjC,OAAOD,cAAc;EACvB;;EAEA;EACA,OAAOA,cAAc,GAAI,oBAAmBnC,oBAAqB,GAAE;AACrE"}
@@ -1,6 +1,6 @@
1
1
  import { Android, ExpoConfig } from '@expo/config-types';
2
2
  import { AndroidManifest, ManifestIntentFilter } from './Manifest';
3
- declare type AndroidIntentFilters = NonNullable<Android['intentFilters']>;
3
+ type AndroidIntentFilters = NonNullable<Android['intentFilters']>;
4
4
  export declare const withAndroidIntentFilters: import("..").ConfigPlugin<void>;
5
5
  export declare function getIntentFilters(config: Pick<ExpoConfig, 'android'>): AndroidIntentFilters;
6
6
  export declare function setAndroidIntentFilters(config: Pick<ExpoConfig, 'android'>, androidManifest: AndroidManifest): AndroidManifest;
@@ -7,61 +7,45 @@ exports.default = renderIntentFilters;
7
7
  exports.getIntentFilters = getIntentFilters;
8
8
  exports.setAndroidIntentFilters = setAndroidIntentFilters;
9
9
  exports.withAndroidIntentFilters = void 0;
10
-
11
10
  function _androidPlugins() {
12
11
  const data = require("../plugins/android-plugins");
13
-
14
12
  _androidPlugins = function () {
15
13
  return data;
16
14
  };
17
-
18
15
  return data;
19
16
  }
20
-
21
17
  function _Manifest() {
22
18
  const data = require("./Manifest");
23
-
24
19
  _Manifest = function () {
25
20
  return data;
26
21
  };
27
-
28
22
  return data;
29
23
  }
30
-
31
24
  const GENERATED_TAG = 'data-generated';
32
25
  const withAndroidIntentFilters = (0, _androidPlugins().createAndroidManifestPlugin)(setAndroidIntentFilters, 'withAndroidIntentFilters');
33
26
  exports.withAndroidIntentFilters = withAndroidIntentFilters;
34
-
35
27
  function getIntentFilters(config) {
36
28
  var _config$android$inten, _config$android;
37
-
38
29
  return (_config$android$inten = (_config$android = config.android) === null || _config$android === void 0 ? void 0 : _config$android.intentFilters) !== null && _config$android$inten !== void 0 ? _config$android$inten : [];
39
30
  }
40
-
41
31
  function setAndroidIntentFilters(config, androidManifest) {
42
32
  var _mainActivity$intent, _mainActivity$intent2;
43
-
44
33
  // Always ensure old tags are removed.
45
- const mainActivity = (0, _Manifest().getMainActivityOrThrow)(androidManifest); // Remove all generated tags from previous runs...
46
-
34
+ const mainActivity = (0, _Manifest().getMainActivityOrThrow)(androidManifest);
35
+ // Remove all generated tags from previous runs...
47
36
  if ((_mainActivity$intent = mainActivity['intent-filter']) !== null && _mainActivity$intent !== void 0 && _mainActivity$intent.length) {
48
37
  mainActivity['intent-filter'] = mainActivity['intent-filter'].filter(value => {
49
38
  var _value$$;
50
-
51
39
  return ((_value$$ = value.$) === null || _value$$ === void 0 ? void 0 : _value$$[GENERATED_TAG]) !== 'true';
52
40
  });
53
41
  }
54
-
55
42
  const intentFilters = getIntentFilters(config);
56
-
57
43
  if (!intentFilters.length) {
58
44
  return androidManifest;
59
45
  }
60
-
61
46
  mainActivity['intent-filter'] = (_mainActivity$intent2 = mainActivity['intent-filter']) === null || _mainActivity$intent2 === void 0 ? void 0 : _mainActivity$intent2.concat(renderIntentFilters(intentFilters));
62
47
  return androidManifest;
63
48
  }
64
-
65
49
  function renderIntentFilters(intentFilters) {
66
50
  return intentFilters.map(intentFilter => {
67
51
  // <intent-filter>
@@ -71,7 +55,8 @@ function renderIntentFilters(intentFilters) {
71
55
  // Add a custom "generated" tag that we can query later to remove.
72
56
  [GENERATED_TAG]: 'true'
73
57
  },
74
- action: [// <action android:name="android.intent.action.VIEW"/>
58
+ action: [
59
+ // <action android:name="android.intent.action.VIEW"/>
75
60
  {
76
61
  $: {
77
62
  'android:name': `android.intent.action.${intentFilter.action}`
@@ -82,19 +67,18 @@ function renderIntentFilters(intentFilters) {
82
67
  };
83
68
  });
84
69
  }
85
- /** Like `<data android:scheme="exp"/>` */
86
-
87
70
 
71
+ /** Like `<data android:scheme="exp"/>` */
88
72
  function renderIntentFilterData(data) {
89
73
  return (Array.isArray(data) ? data : [data]).filter(Boolean).map(datum => ({
90
- $: Object.entries(datum !== null && datum !== void 0 ? datum : {}).reduce((prev, [key, value]) => ({ ...prev,
74
+ $: Object.entries(datum !== null && datum !== void 0 ? datum : {}).reduce((prev, [key, value]) => ({
75
+ ...prev,
91
76
  [`android:${key}`]: value
92
77
  }), {})
93
78
  }));
94
79
  }
95
- /** Like `<category android:name="android.intent.category.DEFAULT"/>` */
96
-
97
80
 
81
+ /** Like `<category android:name="android.intent.category.DEFAULT"/>` */
98
82
  function renderIntentFilterCategory(category) {
99
83
  return (Array.isArray(category) ? category : [category]).filter(Boolean).map(cat => ({
100
84
  $: {
@@ -1 +1 @@
1
- {"version":3,"file":"IntentFilters.js","names":["GENERATED_TAG","withAndroidIntentFilters","createAndroidManifestPlugin","setAndroidIntentFilters","getIntentFilters","config","android","intentFilters","androidManifest","mainActivity","getMainActivityOrThrow","length","filter","value","$","concat","renderIntentFilters","map","intentFilter","autoVerify","undefined","action","data","renderIntentFilterData","category","renderIntentFilterCategory","Array","isArray","Boolean","datum","Object","entries","reduce","prev","key","cat"],"sources":["../../src/android/IntentFilters.ts"],"sourcesContent":["import { Android, AndroidIntentFiltersData, ExpoConfig } from '@expo/config-types';\n\nimport { createAndroidManifestPlugin } from '../plugins/android-plugins';\nimport { AndroidManifest, getMainActivityOrThrow, ManifestIntentFilter } from './Manifest';\n\ntype AndroidIntentFilters = NonNullable<Android['intentFilters']>;\n\nconst GENERATED_TAG = 'data-generated';\n\nexport const withAndroidIntentFilters = createAndroidManifestPlugin(\n setAndroidIntentFilters,\n 'withAndroidIntentFilters'\n);\n\nexport function getIntentFilters(config: Pick<ExpoConfig, 'android'>): AndroidIntentFilters {\n return config.android?.intentFilters ?? [];\n}\n\nexport function setAndroidIntentFilters(\n config: Pick<ExpoConfig, 'android'>,\n androidManifest: AndroidManifest\n): AndroidManifest {\n // Always ensure old tags are removed.\n const mainActivity = getMainActivityOrThrow(androidManifest);\n // Remove all generated tags from previous runs...\n if (mainActivity['intent-filter']?.length) {\n mainActivity['intent-filter'] = mainActivity['intent-filter'].filter(\n (value) => value.$?.[GENERATED_TAG] !== 'true'\n );\n }\n\n const intentFilters = getIntentFilters(config);\n if (!intentFilters.length) {\n return androidManifest;\n }\n\n mainActivity['intent-filter'] = mainActivity['intent-filter']?.concat(\n renderIntentFilters(intentFilters)\n );\n\n return androidManifest;\n}\n\nexport default function renderIntentFilters(\n intentFilters: AndroidIntentFilters\n): ManifestIntentFilter[] {\n return intentFilters.map((intentFilter) => {\n // <intent-filter>\n return {\n $: {\n 'android:autoVerify': intentFilter.autoVerify ? 'true' : undefined,\n // Add a custom \"generated\" tag that we can query later to remove.\n [GENERATED_TAG]: 'true',\n },\n action: [\n // <action android:name=\"android.intent.action.VIEW\"/>\n {\n $: {\n 'android:name': `android.intent.action.${intentFilter.action}`,\n },\n },\n ],\n data: renderIntentFilterData(intentFilter.data),\n category: renderIntentFilterCategory(intentFilter.category),\n };\n });\n}\n\n/** Like `<data android:scheme=\"exp\"/>` */\nfunction renderIntentFilterData(data?: AndroidIntentFiltersData | AndroidIntentFiltersData[]) {\n return (Array.isArray(data) ? data : [data]).filter(Boolean).map((datum) => ({\n $: Object.entries(datum ?? {}).reduce(\n (prev, [key, value]) => ({ ...prev, [`android:${key}`]: value }),\n {}\n ),\n }));\n}\n\n/** Like `<category android:name=\"android.intent.category.DEFAULT\"/>` */\nfunction renderIntentFilterCategory(category?: string | string[]) {\n return (Array.isArray(category) ? category : [category]).filter(Boolean).map((cat) => ({\n $: {\n 'android:name': `android.intent.category.${cat}`,\n },\n }));\n}\n"],"mappings":";;;;;;;;;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIA,MAAMA,aAAa,GAAG,gBAAtB;AAEO,MAAMC,wBAAwB,GAAG,IAAAC,6CAAA,EACtCC,uBADsC,EAEtC,0BAFsC,CAAjC;;;AAKA,SAASC,gBAAT,CAA0BC,MAA1B,EAAqF;EAAA;;EAC1F,mDAAOA,MAAM,CAACC,OAAd,oDAAO,gBAAgBC,aAAvB,yEAAwC,EAAxC;AACD;;AAEM,SAASJ,uBAAT,CACLE,MADK,EAELG,eAFK,EAGY;EAAA;;EACjB;EACA,MAAMC,YAAY,GAAG,IAAAC,kCAAA,EAAuBF,eAAvB,CAArB,CAFiB,CAGjB;;EACA,4BAAIC,YAAY,CAAC,eAAD,CAAhB,iDAAI,qBAA+BE,MAAnC,EAA2C;IACzCF,YAAY,CAAC,eAAD,CAAZ,GAAgCA,YAAY,CAAC,eAAD,CAAZ,CAA8BG,MAA9B,CAC7BC,KAAD;MAAA;;MAAA,OAAW,aAAAA,KAAK,CAACC,CAAN,sDAAUd,aAAV,OAA6B,MAAxC;IAAA,CAD8B,CAAhC;EAGD;;EAED,MAAMO,aAAa,GAAGH,gBAAgB,CAACC,MAAD,CAAtC;;EACA,IAAI,CAACE,aAAa,CAACI,MAAnB,EAA2B;IACzB,OAAOH,eAAP;EACD;;EAEDC,YAAY,CAAC,eAAD,CAAZ,4BAAgCA,YAAY,CAAC,eAAD,CAA5C,0DAAgC,sBAA+BM,MAA/B,CAC9BC,mBAAmB,CAACT,aAAD,CADW,CAAhC;EAIA,OAAOC,eAAP;AACD;;AAEc,SAASQ,mBAAT,CACbT,aADa,EAEW;EACxB,OAAOA,aAAa,CAACU,GAAd,CAAmBC,YAA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"version":3,"file":"IntentFilters.js","names":["GENERATED_TAG","withAndroidIntentFilters","createAndroidManifestPlugin","setAndroidIntentFilters","getIntentFilters","config","android","intentFilters","androidManifest","mainActivity","getMainActivityOrThrow","length","filter","value","$","concat","renderIntentFilters","map","intentFilter","autoVerify","undefined","action","data","renderIntentFilterData","category","renderIntentFilterCategory","Array","isArray","Boolean","datum","Object","entries","reduce","prev","key","cat"],"sources":["../../src/android/IntentFilters.ts"],"sourcesContent":["import { Android, AndroidIntentFiltersData, ExpoConfig } from '@expo/config-types';\n\nimport { createAndroidManifestPlugin } from '../plugins/android-plugins';\nimport { AndroidManifest, getMainActivityOrThrow, ManifestIntentFilter } from './Manifest';\n\ntype AndroidIntentFilters = NonNullable<Android['intentFilters']>;\n\nconst GENERATED_TAG = 'data-generated';\n\nexport const withAndroidIntentFilters = createAndroidManifestPlugin(\n setAndroidIntentFilters,\n 'withAndroidIntentFilters'\n);\n\nexport function getIntentFilters(config: Pick<ExpoConfig, 'android'>): AndroidIntentFilters {\n return config.android?.intentFilters ?? [];\n}\n\nexport function setAndroidIntentFilters(\n config: Pick<ExpoConfig, 'android'>,\n androidManifest: AndroidManifest\n): AndroidManifest {\n // Always ensure old tags are removed.\n const mainActivity = getMainActivityOrThrow(androidManifest);\n // Remove all generated tags from previous runs...\n if (mainActivity['intent-filter']?.length) {\n mainActivity['intent-filter'] = mainActivity['intent-filter'].filter(\n (value) => value.$?.[GENERATED_TAG] !== 'true'\n );\n }\n\n const intentFilters = getIntentFilters(config);\n if (!intentFilters.length) {\n return androidManifest;\n }\n\n mainActivity['intent-filter'] = mainActivity['intent-filter']?.concat(\n renderIntentFilters(intentFilters)\n );\n\n return androidManifest;\n}\n\nexport default function renderIntentFilters(\n intentFilters: AndroidIntentFilters\n): ManifestIntentFilter[] {\n return intentFilters.map((intentFilter) => {\n // <intent-filter>\n return {\n $: {\n 'android:autoVerify': intentFilter.autoVerify ? 'true' : undefined,\n // Add a custom \"generated\" tag that we can query later to remove.\n [GENERATED_TAG]: 'true',\n },\n action: [\n // <action android:name=\"android.intent.action.VIEW\"/>\n {\n $: {\n 'android:name': `android.intent.action.${intentFilter.action}`,\n },\n },\n ],\n data: renderIntentFilterData(intentFilter.data),\n category: renderIntentFilterCategory(intentFilter.category),\n };\n });\n}\n\n/** Like `<data android:scheme=\"exp\"/>` */\nfunction renderIntentFilterData(data?: AndroidIntentFiltersData | AndroidIntentFiltersData[]) {\n return (Array.isArray(data) ? data : [data]).filter(Boolean).map((datum) => ({\n $: Object.entries(datum ?? {}).reduce(\n (prev, [key, value]) => ({ ...prev, [`android:${key}`]: value }),\n {}\n ),\n }));\n}\n\n/** Like `<category android:name=\"android.intent.category.DEFAULT\"/>` */\nfunction renderIntentFilterCategory(category?: string | string[]) {\n return (Array.isArray(category) ? category : [category]).filter(Boolean).map((cat) => ({\n $: {\n 'android:name': `android.intent.category.${cat}`,\n },\n }));\n}\n"],"mappings":";;;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA,MAAMA,aAAa,GAAG,gBAAgB;AAE/B,MAAMC,wBAAwB,GAAG,IAAAC,6CAA2B,EACjEC,uBAAuB,EACvB,0BAA0B,CAC3B;AAAC;AAEK,SAASC,gBAAgB,CAACC,MAAmC,EAAwB;EAAA;EAC1F,mDAAOA,MAAM,CAACC,OAAO,oDAAd,gBAAgBC,aAAa,yEAAI,EAAE;AAC5C;AAEO,SAASJ,uBAAuB,CACrCE,MAAmC,EACnCG,eAAgC,EACf;EAAA;EACjB;EACA,MAAMC,YAAY,GAAG,IAAAC,kCAAsB,EAACF,eAAe,CAAC;EAC5D;EACA,4BAAIC,YAAY,CAAC,eAAe,CAAC,iDAA7B,qBAA+BE,MAAM,EAAE;IACzCF,YAAY,CAAC,eAAe,CAAC,GAAGA,YAAY,CAAC,eAAe,CAAC,CAACG,MAAM,CACjEC,KAAK;MAAA;MAAA,OAAK,aAAAA,KAAK,C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AAI;MAAE,CAAE,WAAUC,GAAI,EAAC,GAAGrB;IAAM,CAAC,CAAC,EAChE,CAAC,CAAC;EAEN,CAAC,CAAC,CAAC;AACL;;AAEA;AACA,SAASY,0BAA0B,CAACD,QAA4B,EAAE;EAChE,OAAO,CAACE,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,GAAGA,QAAQ,GAAG,CAACA,QAAQ,CAAC,EAAEZ,MAAM,CAACgB,OAAO,CAAC,CAACX,GAAG,CAAEkB,GAAG,KAAM;IACrFrB,CAAC,EAAE;MACD,cAAc,EAAG,2BAA0BqB,GAAI;IACjD;EACF,CAAC,CAAC,CAAC;AACL"}
@@ -1,19 +1,19 @@
1
- export declare type StringBoolean = 'true' | 'false';
2
- declare type ManifestMetaDataAttributes = AndroidManifestAttributes & {
1
+ export type StringBoolean = 'true' | 'false';
2
+ type ManifestMetaDataAttributes = AndroidManifestAttributes & {
3
3
  'android:value'?: string;
4
4
  'android:resource'?: string;
5
5
  };
6
- declare type AndroidManifestAttributes = {
6
+ type AndroidManifestAttributes = {
7
7
  'android:name': string | 'android.intent.action.VIEW';
8
8
  'tools:node'?: string | 'remove';
9
9
  };
10
- declare type ManifestAction = {
10
+ type ManifestAction = {
11
11
  $: AndroidManifestAttributes;
12
12
  };
13
- declare type ManifestCategory = {
13
+ type ManifestCategory = {
14
14
  $: AndroidManifestAttributes;
15
15
  };
16
- declare type ManifestData = {
16
+ type ManifestData = {
17
17
  $: {
18
18
  [key: string]: string | undefined;
19
19
  'android:host'?: string;
@@ -21,14 +21,14 @@ declare type ManifestData = {
21
21
  'android:scheme'?: string;
22
22
  };
23
23
  };
24
- declare type ManifestReceiver = {
24
+ type ManifestReceiver = {
25
25
  $: AndroidManifestAttributes & {
26
26
  'android:exported'?: StringBoolean;
27
27
  'android:enabled'?: StringBoolean;
28
28
  };
29
29
  'intent-filter'?: ManifestIntentFilter[];
30
30
  };
31
- export declare type ManifestIntentFilter = {
31
+ export type ManifestIntentFilter = {
32
32
  $?: {
33
33
  'android:autoVerify'?: StringBoolean;
34
34
  'data-generated'?: StringBoolean;
@@ -37,19 +37,19 @@ export declare type ManifestIntentFilter = {
37
37
  data?: ManifestData[];
38
38
  category?: ManifestCategory[];
39
39
  };
40
- export declare type ManifestMetaData = {
40
+ export type ManifestMetaData = {
41
41
  $: ManifestMetaDataAttributes;
42
42
  };
43
- declare type ManifestServiceAttributes = AndroidManifestAttributes & {
43
+ type ManifestServiceAttributes = AndroidManifestAttributes & {
44
44
  'android:enabled'?: StringBoolean;
45
45
  'android:exported'?: StringBoolean;
46
46
  'android:permission'?: string;
47
47
  };
48
- declare type ManifestService = {
48
+ type ManifestService = {
49
49
  $: ManifestServiceAttributes;
50
50
  'intent-filter'?: ManifestIntentFilter[];
51
51
  };
52
- declare type ManifestApplicationAttributes = {
52
+ type ManifestApplicationAttributes = {
53
53
  'android:name': string | '.MainApplication';
54
54
  'android:icon'?: string;
55
55
  'android:roundIcon'?: string;
@@ -60,7 +60,7 @@ declare type ManifestApplicationAttributes = {
60
60
  'android:usesCleartextTraffic'?: StringBoolean;
61
61
  [key: string]: string | undefined;
62
62
  };
63
- export declare type ManifestActivity = {
63
+ export type ManifestActivity = {
64
64
  $: ManifestApplicationAttributes & {
65
65
  'android:exported'?: StringBoolean;
66
66
  'android:launchMode'?: string;
@@ -70,12 +70,12 @@ export declare type ManifestActivity = {
70
70
  };
71
71
  'intent-filter'?: ManifestIntentFilter[];
72
72
  };
73
- export declare type ManifestUsesLibrary = {
73
+ export type ManifestUsesLibrary = {
74
74
  $: AndroidManifestAttributes & {
75
75
  'android:required'?: StringBoolean;
76
76
  };
77
77
  };
78
- export declare type ManifestApplication = {
78
+ export type ManifestApplication = {
79
79
  $: ManifestApplicationAttributes;
80
80
  activity?: ManifestActivity[];
81
81
  service?: ManifestService[];
@@ -83,21 +83,21 @@ export declare type ManifestApplication = {
83
83
  'meta-data'?: ManifestMetaData[];
84
84
  'uses-library'?: ManifestUsesLibrary[];
85
85
  };
86
- declare type ManifestPermission = {
86
+ type ManifestPermission = {
87
87
  $: AndroidManifestAttributes & {
88
88
  'android:protectionLevel'?: string | 'signature';
89
89
  };
90
90
  };
91
- export declare type ManifestUsesPermission = {
91
+ export type ManifestUsesPermission = {
92
92
  $: AndroidManifestAttributes;
93
93
  };
94
- declare type ManifestUsesFeature = {
94
+ type ManifestUsesFeature = {
95
95
  $: AndroidManifestAttributes & {
96
96
  'android:glEsVersion'?: string;
97
97
  'android:required': StringBoolean;
98
98
  };
99
99
  };
100
- export declare type AndroidManifest = {
100
+ export type AndroidManifest = {
101
101
  manifest: {
102
102
  $: {
103
103
  'xmlns:android': string;