@callstack/react-native-brownfield 3.1.0-rc.2 → 3.3.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 (97) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/ios/ExpoHostRuntime.swift +22 -7
  3. package/lib/commonjs/expo-config-plugin/android/index.js +1 -1
  4. package/lib/commonjs/expo-config-plugin/android/utils/constants.js.map +1 -0
  5. package/lib/commonjs/expo-config-plugin/android/utils/gradleHelpers.js +2 -0
  6. package/lib/commonjs/expo-config-plugin/android/utils/gradleHelpers.js.map +1 -0
  7. package/lib/commonjs/expo-config-plugin/android/utils/hermes.js +2 -0
  8. package/lib/commonjs/expo-config-plugin/android/utils/hermes.js.map +1 -0
  9. package/lib/commonjs/expo-config-plugin/android/withAndroidModuleFiles.js +1 -1
  10. package/lib/commonjs/expo-config-plugin/android/withAndroidModuleFiles.js.map +1 -1
  11. package/lib/commonjs/expo-config-plugin/android/withBrownfieldAndroid.js +1 -1
  12. package/lib/commonjs/expo-config-plugin/android/withBrownfieldAndroid.js.map +1 -1
  13. package/lib/commonjs/expo-config-plugin/expoUtils.js +2 -0
  14. package/lib/commonjs/expo-config-plugin/expoUtils.js.map +1 -0
  15. package/lib/commonjs/expo-config-plugin/ios/podfileHelpers.js +16 -2
  16. package/lib/commonjs/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
  17. package/lib/commonjs/expo-config-plugin/ios/withBrownfieldIos.js +1 -1
  18. package/lib/commonjs/expo-config-plugin/ios/withBrownfieldIos.js.map +1 -1
  19. package/lib/commonjs/expo-config-plugin/template/android/ReactNativeHostManager.post55.kt +32 -0
  20. package/lib/commonjs/expo-config-plugin/template/android/build.gradle.kts +1 -1
  21. package/lib/module/expo-config-plugin/android/index.js +1 -1
  22. package/lib/module/expo-config-plugin/android/utils/constants.js.map +1 -0
  23. package/lib/module/expo-config-plugin/android/utils/gradleHelpers.js +2 -0
  24. package/lib/module/expo-config-plugin/android/utils/gradleHelpers.js.map +1 -0
  25. package/lib/module/expo-config-plugin/android/utils/hermes.js +2 -0
  26. package/lib/module/expo-config-plugin/android/utils/hermes.js.map +1 -0
  27. package/lib/module/expo-config-plugin/android/withAndroidModuleFiles.js +1 -1
  28. package/lib/module/expo-config-plugin/android/withAndroidModuleFiles.js.map +1 -1
  29. package/lib/module/expo-config-plugin/android/withBrownfieldAndroid.js +1 -1
  30. package/lib/module/expo-config-plugin/android/withBrownfieldAndroid.js.map +1 -1
  31. package/lib/module/expo-config-plugin/expoUtils.js +2 -0
  32. package/lib/module/expo-config-plugin/expoUtils.js.map +1 -0
  33. package/lib/module/expo-config-plugin/ios/podfileHelpers.js +16 -2
  34. package/lib/module/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
  35. package/lib/module/expo-config-plugin/ios/withBrownfieldIos.js +1 -1
  36. package/lib/module/expo-config-plugin/ios/withBrownfieldIos.js.map +1 -1
  37. package/lib/module/expo-config-plugin/template/android/ReactNativeHostManager.post55.kt +32 -0
  38. package/lib/module/expo-config-plugin/template/android/build.gradle.kts +1 -1
  39. package/lib/typescript/commonjs/src/expo-config-plugin/android/index.d.ts +1 -1
  40. package/lib/typescript/commonjs/src/expo-config-plugin/android/index.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/constants.d.ts.map +1 -0
  42. package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/gradleHelpers.d.ts.map +1 -0
  43. package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/hermes.d.ts +6 -0
  44. package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/hermes.d.ts.map +1 -0
  45. package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts +5 -1
  46. package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
  47. package/lib/typescript/commonjs/src/expo-config-plugin/android/withBrownfieldAndroid.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/src/expo-config-plugin/expoUtils.d.ts +6 -0
  49. package/lib/typescript/commonjs/src/expo-config-plugin/expoUtils.d.ts.map +1 -0
  50. package/lib/typescript/commonjs/src/expo-config-plugin/ios/podfileHelpers.d.ts +2 -1
  51. package/lib/typescript/commonjs/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
  52. package/lib/typescript/commonjs/src/expo-config-plugin/ios/withBrownfieldIos.d.ts.map +1 -1
  53. package/lib/typescript/module/src/expo-config-plugin/android/index.d.ts +1 -1
  54. package/lib/typescript/module/src/expo-config-plugin/android/index.d.ts.map +1 -1
  55. package/lib/typescript/module/src/expo-config-plugin/android/utils/constants.d.ts.map +1 -0
  56. package/lib/typescript/module/src/expo-config-plugin/android/utils/gradleHelpers.d.ts.map +1 -0
  57. package/lib/typescript/module/src/expo-config-plugin/android/utils/hermes.d.ts +6 -0
  58. package/lib/typescript/module/src/expo-config-plugin/android/utils/hermes.d.ts.map +1 -0
  59. package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts +5 -1
  60. package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
  61. package/lib/typescript/module/src/expo-config-plugin/android/withBrownfieldAndroid.d.ts.map +1 -1
  62. package/lib/typescript/module/src/expo-config-plugin/expoUtils.d.ts +6 -0
  63. package/lib/typescript/module/src/expo-config-plugin/expoUtils.d.ts.map +1 -0
  64. package/lib/typescript/module/src/expo-config-plugin/ios/podfileHelpers.d.ts +2 -1
  65. package/lib/typescript/module/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
  66. package/lib/typescript/module/src/expo-config-plugin/ios/withBrownfieldIos.d.ts.map +1 -1
  67. package/package.json +7 -4
  68. package/src/expo-config-plugin/android/index.ts +4 -1
  69. package/src/expo-config-plugin/android/{gradleHelpers.ts → utils/gradleHelpers.ts} +1 -1
  70. package/src/expo-config-plugin/android/utils/hermes.ts +83 -0
  71. package/src/expo-config-plugin/android/withAndroidModuleFiles.ts +26 -3
  72. package/src/expo-config-plugin/android/withBrownfieldAndroid.ts +4 -1
  73. package/src/expo-config-plugin/expoUtils.ts +12 -0
  74. package/src/expo-config-plugin/ios/podfileHelpers.ts +45 -2
  75. package/src/expo-config-plugin/ios/withBrownfieldIos.ts +4 -5
  76. package/src/expo-config-plugin/template/android/ReactNativeHostManager.post55.kt +32 -0
  77. package/src/expo-config-plugin/template/android/build.gradle.kts +1 -1
  78. package/lib/commonjs/expo-config-plugin/android/constants.js.map +0 -1
  79. package/lib/commonjs/expo-config-plugin/android/gradleHelpers.js +0 -2
  80. package/lib/commonjs/expo-config-plugin/android/gradleHelpers.js.map +0 -1
  81. package/lib/module/expo-config-plugin/android/constants.js.map +0 -1
  82. package/lib/module/expo-config-plugin/android/gradleHelpers.js +0 -2
  83. package/lib/module/expo-config-plugin/android/gradleHelpers.js.map +0 -1
  84. package/lib/typescript/commonjs/src/expo-config-plugin/android/constants.d.ts.map +0 -1
  85. package/lib/typescript/commonjs/src/expo-config-plugin/android/gradleHelpers.d.ts.map +0 -1
  86. package/lib/typescript/module/src/expo-config-plugin/android/constants.d.ts.map +0 -1
  87. package/lib/typescript/module/src/expo-config-plugin/android/gradleHelpers.d.ts.map +0 -1
  88. /package/lib/commonjs/expo-config-plugin/android/{constants.js → utils/constants.js} +0 -0
  89. /package/lib/commonjs/expo-config-plugin/template/android/{ReactNativeHostManager.kt → ReactNativeHostManager.pre55.kt} +0 -0
  90. /package/lib/module/expo-config-plugin/android/{constants.js → utils/constants.js} +0 -0
  91. /package/lib/module/expo-config-plugin/template/android/{ReactNativeHostManager.kt → ReactNativeHostManager.pre55.kt} +0 -0
  92. /package/lib/typescript/commonjs/src/expo-config-plugin/android/{constants.d.ts → utils/constants.d.ts} +0 -0
  93. /package/lib/typescript/commonjs/src/expo-config-plugin/android/{gradleHelpers.d.ts → utils/gradleHelpers.d.ts} +0 -0
  94. /package/lib/typescript/module/src/expo-config-plugin/android/{constants.d.ts → utils/constants.d.ts} +0 -0
  95. /package/lib/typescript/module/src/expo-config-plugin/android/{gradleHelpers.d.ts → utils/gradleHelpers.d.ts} +0 -0
  96. /package/src/expo-config-plugin/android/{constants.ts → utils/constants.ts} +0 -0
  97. /package/src/expo-config-plugin/template/android/{ReactNativeHostManager.kt → ReactNativeHostManager.pre55.kt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @callstack/react-native-brownfield
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#248](https://github.com/callstack/react-native-brownfield/pull/248) [`b0a6f41`](https://github.com/callstack/react-native-brownfield/commit/b0a6f4185aad4e8759b90ccaf9867be493a979ec) Thanks [@artus9033](https://github.com/artus9033)! - feat: support Expo 55
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`b0a6f41`](https://github.com/callstack/react-native-brownfield/commit/b0a6f4185aad4e8759b90ccaf9867be493a979ec)]:
12
+ - @callstack/brownfield-cli@3.3.0
13
+
14
+ ## 3.2.1
15
+
16
+ ### Patch Changes
17
+
18
+ - [#265](https://github.com/callstack/react-native-brownfield/pull/265) [`7e114e6`](https://github.com/callstack/react-native-brownfield/commit/7e114e676fc290a54912b4d99bd22952b2f7380d) Thanks [@hurali97](https://github.com/hurali97)! - version bump
19
+
20
+ - Updated dependencies [[`7e114e6`](https://github.com/callstack/react-native-brownfield/commit/7e114e676fc290a54912b4d99bd22952b2f7380d)]:
21
+ - @callstack/brownfield-cli@3.2.1
22
+
23
+ ## 3.2.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [#263](https://github.com/callstack/react-native-brownfield/pull/263) [`b7dfa7e`](https://github.com/callstack/react-native-brownfield/commit/b7dfa7e30e1a921bb7ac0952e23481ee081fb9ed) Thanks [@hurali97](https://github.com/hurali97)! - version bump for release
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [[`b7dfa7e`](https://github.com/callstack/react-native-brownfield/commit/b7dfa7e30e1a921bb7ac0952e23481ee081fb9ed)]:
32
+ - @callstack/brownfield-cli@3.2.0
33
+
34
+ ## 3.1.0
35
+
36
+ ### Minor Changes
37
+
38
+ - [#252](https://github.com/callstack/react-native-brownfield/pull/252) [`d5c8609`](https://github.com/callstack/react-native-brownfield/commit/d5c8609485b072eb73be0158d49908fa399d8950) Thanks [@artus9033](https://github.com/artus9033)! - feat: added postMessage API
39
+
40
+ - [#236](https://github.com/callstack/react-native-brownfield/pull/236) [`3e33b89`](https://github.com/callstack/react-native-brownfield/commit/3e33b890e6f647f6bbebe32f8068a38b1ed85ea0) Thanks [@hurali97](https://github.com/hurali97)! - add brownfield navigation
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies [[`3e33b89`](https://github.com/callstack/react-native-brownfield/commit/3e33b890e6f647f6bbebe32f8068a38b1ed85ea0)]:
45
+ - @callstack/brownfield-cli@3.1.0
46
+
3
47
  ## 3.0.0
4
48
 
5
49
  ### Patch Changes
@@ -34,7 +34,11 @@ final class ExpoHostRuntime {
34
34
  reactNativeFactory = factory
35
35
 
36
36
  let appDelegate = ExpoAppDelegate()
37
- appDelegate.bindReactNativeFactory(factory)
37
+ // below: https://github.com/expo/expo/pull/39418/changes/5abd332b55b2ee7daee848284ed5f7fe1639452e
38
+ // has removed bindReactNativeFactory method from ExpoAppDelegate
39
+ #if !EXPO_SDK_GTE_55 // this define comes from the Brownfield Expo config plugin
40
+ appDelegate.bindReactNativeFactory(factory)
41
+ #endif
38
42
  expoDelegate = appDelegate
39
43
 
40
44
  if let onBundleLoaded {
@@ -99,12 +103,23 @@ final class ExpoHostRuntime {
99
103
  ) -> UIView? {
100
104
  let bundleURL = delegate.bundleURL()
101
105
 
102
- return expoDelegate?.recreateRootView(
103
- withBundleURL: bundleURL,
104
- moduleName: moduleName,
105
- initialProps: initialProps,
106
- launchOptions: launchOptions
107
- )
106
+ // below: https://github.com/expo/expo/commit/2013760c46cde1404872d181a691da72fbf207a4
107
+ // has moved the recreateRootView method to ExpoReactNativeFactory
108
+ #if EXPO_SDK_GTE_55 // this define comes from the Brownfield Expo config plugin
109
+ return (reactNativeFactory as? ExpoReactNativeFactory)?.recreateRootView(
110
+ withBundleURL: bundleURL,
111
+ moduleName: moduleName,
112
+ initialProps: initialProps,
113
+ launchOptions: launchOptions
114
+ )
115
+ #else
116
+ return expoDelegate?.recreateRootView(
117
+ withBundleURL: bundleURL,
118
+ moduleName: moduleName,
119
+ initialProps: initialProps,
120
+ launchOptions: launchOptions
121
+ )
122
+ #endif
108
123
  }
109
124
  }
110
125
 
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"createAndroidModule",{enumerable:true,get:function get(){return _withAndroidModuleFiles.createAndroidModule;}});Object.defineProperty(exports,"modifyRootBuildGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifyRootBuildGradle;}});Object.defineProperty(exports,"modifySettingsGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifySettingsGradle;}});Object.defineProperty(exports,"withAndroidModuleFiles",{enumerable:true,get:function get(){return _withAndroidModuleFiles.withAndroidModuleFiles;}});Object.defineProperty(exports,"withBrownfieldAndroid",{enumerable:true,get:function get(){return _withBrownfieldAndroid.withBrownfieldAndroid;}});var _withBrownfieldAndroid=require("./withBrownfieldAndroid");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var _gradleHelpers=require("./gradleHelpers");
1
+ Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"createAndroidModule",{enumerable:true,get:function get(){return _withAndroidModuleFiles.createAndroidModule;}});Object.defineProperty(exports,"modifyRootBuildGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifyRootBuildGradle;}});Object.defineProperty(exports,"modifySettingsGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifySettingsGradle;}});Object.defineProperty(exports,"withAndroidModuleFiles",{enumerable:true,get:function get(){return _withAndroidModuleFiles.withAndroidModuleFiles;}});Object.defineProperty(exports,"withBrownfieldAndroid",{enumerable:true,get:function get(){return _withBrownfieldAndroid.withBrownfieldAndroid;}});var _withBrownfieldAndroid=require("./withBrownfieldAndroid");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var _gradleHelpers=require("./utils/gradleHelpers");
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BROWNFIELD_PLUGIN_VERSION","exports","brownfieldGradlePluginDependency"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/constants.ts"],"mappings":"2IAAO,GAAM,CAAAA,yBAAyB,CAAAC,OAAA,CAAAD,yBAAA,CAAG,OAAO,CACzC,GAAM,CAAAE,gCAAgC,CAAAD,OAAA,CAAAC,gCAAA,CAAG,2DAA2DF,yBAAyB,IAAI","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.modifyRootBuildGradle=modifyRootBuildGradle;exports.modifySettingsGradle=modifySettingsGradle;var _constants=require("./constants");var _logging=require("../../logging");function modifyRootBuildGradle(contents){if(contents.includes('brownfield-gradle-plugin')){_logging.Logger.logDebug('Brownfield Gradle plugin already in root build.gradle, skipping');return contents;}_logging.Logger.logDebug(`Modifying root build.gradle to add the Gradle Brownfield plugin`);var buildscriptDepsRegex=/(buildscript\s*\{[\s\S]*?dependencies\s*\{[\s\S]*?)(})/m;var match=contents.match(buildscriptDepsRegex);if(!match){throw new Error('Could not locate buildscript block in root build.gradle');}var insertion=`\t${_constants.brownfieldGradlePluginDependency}\n\t`;var modifiedContents=contents.replace(buildscriptDepsRegex,`$1${insertion}$2`);_logging.Logger.logDebug('Added Brownfield Gradle plugin to root build.gradle');return modifiedContents;}function modifySettingsGradle(contents,moduleName){var includeStatement=`include ':${moduleName}'`;if(contents.includes(includeStatement)){_logging.Logger.logDebug(`Module "${moduleName}" already in settings.gradle, skipping`);return contents;}_logging.Logger.logDebug(`Modifying settings.gradle to include module "${moduleName}"`);var modifiedContents=contents+`\n${includeStatement}\n`;_logging.Logger.logDebug(`Added module "${moduleName}" to settings.gradle`);return modifiedContents;}
2
+ //# sourceMappingURL=gradleHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_constants","require","_logging","modifyRootBuildGradle","contents","includes","Logger","logDebug","buildscriptDepsRegex","match","Error","insertion","brownfieldGradlePluginDependency","modifiedContents","replace","modifySettingsGradle","moduleName","includeStatement"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/gradleHelpers.ts"],"mappings":"+JAAA,IAAAA,UAAA,CAAAC,OAAA,gBACA,IAAAC,QAAA,CAAAD,OAAA,kBAOO,QAAS,CAAAE,qBAAqBA,CAACC,QAAgB,CAAU,CAE9D,GAAIA,QAAQ,CAACC,QAAQ,CAAC,0BAA0B,CAAC,CAAE,CACjDC,eAAM,CAACC,QAAQ,CACb,iEACF,CAAC,CACD,MAAO,CAAAH,QAAQ,CACjB,CAEAE,eAAM,CAACC,QAAQ,CACb,iEACF,CAAC,CAGD,GAAM,CAAAC,oBAAoB,CACxB,yDAAyD,CAC3D,GAAM,CAAAC,KAAK,CAAGL,QAAQ,CAACK,KAAK,CAACD,oBAAoB,CAAC,CAElD,GAAI,CAACC,KAAK,CAAE,CACV,KAAM,IAAI,CAAAC,KAAK,CAAC,yDAAyD,CAAC,CAC5E,CAGA,GAAM,CAAAC,SAAS,CAAG,KAAKC,2CAAgC,MAAM,CAC7D,GAAM,CAAAC,gBAAgB,CAAGT,QAAQ,CAACU,OAAO,CACvCN,oBAAoB,CACpB,KAAKG,SAAS,IAChB,CAAC,CAEDL,eAAM,CAACC,QAAQ,CAAC,qDAAqD,CAAC,CACtE,MAAO,CAAAM,gBAAgB,CACzB,CAQO,QAAS,CAAAE,oBAAoBA,CAClCX,QAAgB,CAChBY,UAAkB,CACV,CACR,GAAM,CAAAC,gBAAgB,CAAG,aAAaD,UAAU,GAAG,CAGnD,GAAIZ,QAAQ,CAACC,QAAQ,CAACY,gBAAgB,CAAC,CAAE,CACvCX,eAAM,CAACC,QAAQ,CACb,WAAWS,UAAU,wCACvB,CAAC,CACD,MAAO,CAAAZ,QAAQ,CACjB,CAEAE,eAAM,CAACC,QAAQ,CACb,gDAAgDS,UAAU,GAC5D,CAAC,CAGD,GAAM,CAAAH,gBAAgB,CAAGT,QAAQ,CAAG,KAAKa,gBAAgB,IAAI,CAE7DX,eAAM,CAACC,QAAQ,CAAC,iBAAiBS,UAAU,sBAAsB,CAAC,CAElE,MAAO,CAAAH,gBAAgB,CACzB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getHermesArtifact=getHermesArtifact;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _logging=require("../../logging");function getHermesArtifact(rnVersion){var _rnPatchVersionString,_rnPatchVersionString2;var _ref=rnVersion.split('.'),_ref2=(0,_slicedToArray2.default)(_ref,3),rnMajorVersionString=_ref2[0],rnMinorVersionString=_ref2[1],rnPatchVersionString=_ref2[2];var rnMajorVersion=Number(rnMajorVersionString);var rnMinorVersion=Number(rnMinorVersionString);if((_rnPatchVersionString=rnPatchVersionString)!=null&&_rnPatchVersionString.includes('-')||(_rnPatchVersionString2=rnPatchVersionString)!=null&&_rnPatchVersionString2.includes('+')){rnPatchVersionString=rnPatchVersionString.split('-')[0].split('+')[0];}var rnPatchVersion=Number(rnPatchVersionString);if(Number.isNaN(rnMajorVersion)||Number.isNaN(rnMinorVersion)||Number.isNaN(rnPatchVersion)){throw new Error(`Failed to parse React Native version from '${rnVersion}' - resolved components are: ${rnMajorVersion}.${rnMinorVersion}.${rnPatchVersion}`);}if(rnMajorVersion!==0){throw new Error(`Unsupported React Native major version '${rnMajorVersion}' in '${rnVersion}'`);}if(rnMinorVersion>=84){return{groupId:'com.facebook.hermes',artifactId:'hermes-android',version:'0.15.1'};}if(rnMinorVersion===83){var version;switch(rnPatchVersion){case 0:case 1:version='0.14.0';break;case 2:case 3:case 4:version='0.14.1';break;default:version='0.14.1';_logging.Logger.logWarning(`This React Native patch version '${rnVersion}' (in ${rnMajorVersion}.${rnMinorVersion}.${rnPatchVersion}) has not been tested with the Brownfield plugin yet - please consider reporting this on GitHub: https://github.com/callstack/react-native-brownfield/. Using the latest version of Hermes that Brownfield has been tested with (0.14.1).`);break;}return{groupId:'com.facebook.hermes',artifactId:'hermes-android',version:version};}return{groupId:'com.facebook.react',artifactId:'hermes-android',version:rnVersion};}
2
+ //# sourceMappingURL=hermes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_logging","require","getHermesArtifact","rnVersion","_rnPatchVersionString","_rnPatchVersionString2","_ref","split","_ref2","_slicedToArray2","default","rnMajorVersionString","rnMinorVersionString","rnPatchVersionString","rnMajorVersion","Number","rnMinorVersion","includes","rnPatchVersion","isNaN","Error","groupId","artifactId","version","Logger","logWarning"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/hermes.ts"],"mappings":"oRAAA,IAAAA,QAAA,CAAAC,OAAA,kBAEO,QAAS,CAAAC,iBAAiBA,CAACC,SAAiB,CAAE,KAAAC,qBAAA,CAAAC,sBAAA,CACnD,IAAAC,IAAA,CACEH,SAAS,CAACI,KAAK,CAAC,GAAG,CAAC,CAAAC,KAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,IAAA,IADjBK,oBAAoB,CAAAH,KAAA,IAAEI,oBAAoB,CAAAJ,KAAA,IAAEK,oBAAoB,CAAAL,KAAA,IAGrE,GAAM,CAAAM,cAAc,CAAGC,MAAM,CAACJ,oBAAoB,CAAC,CACnD,GAAM,CAAAK,cAAc,CAAGD,MAAM,CAACH,oBAAoB,CAAC,CAEnD,GACE,CAAAR,qBAAA,CAAAS,oBAAoB,SAApBT,qBAAA,CAAsBa,QAAQ,CAAC,GAAG,CAAC,GAAAZ,sBAAA,CACnCQ,oBAAoB,SAApBR,sBAAA,CAAsBY,QAAQ,CAAC,GAAG,CAAC,CACnC,CACAJ,oBAAoB,CAAGA,oBAAoB,C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C,OAAO,CAAEpB,SACX,CAAC,CACH","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.createAndroidModule=createAndroidModule;exports.withAndroidModuleFiles=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var fs=_interopRequireWildcard(require("node:fs"));var path=_interopRequireWildcard(require("node:path"));var _configPlugins=require("@expo/config-plugins");var _logging=require("../logging");var _engine=require("../template/engine");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function createAndroidModule(_ref){var androidDir=_ref.androidDir,config=_ref.config,rnVersion=_ref.rnVersion;var android=config.android;var moduleDir=path.join(androidDir,android.moduleName);_logging.Logger.logDebug(`Creating Android module in: ${androidDir}`);var files=[{relativePath:'build.gradle.kts',content:(0,_engine.renderTemplate)('android','build.gradle.kts',{'{{PACKAGE_NAME}}':android.packageName,'{{MIN_SDK_VERSION}}':android.minSdkVersion.toString(),'{{COMPILE_SDK_VERSION}}':android.compileSdkVersion.toString(),'{{GROUP_ID}}':android.groupId,'{{ARTIFACT_ID}}':android.artifactId,'{{ARTIFACT_VERSION}}':android.version,'{{RN_VERSION}}':rnVersion})},{relativePath:'gradle.properties',content:(0,_engine.renderTemplate)('android','gradle.properties',{})},{relativePath:'src/main/AndroidManifest.xml',content:(0,_engine.renderTemplate)('android','AndroidManifest.xml',{})},{relativePath:`src/main/java/${config.android.packageName.replace(/\./g,'/')}/ReactNativeHostManager.kt`,content:(0,_engine.renderTemplate)('android','ReactNativeHostManager.kt',{'{{PACKAGE_NAME}}':android.packageName})},{relativePath:'consumer-rules.pro',content:(0,_engine.renderTemplate)('android','consumer-rules.pro',{})},{relativePath:'proguard-rules.pro',content:(0,_engine.renderTemplate)('android','proguard-rules.pro',{})}];for(var file of files){var filePath=path.join(moduleDir,file.relativePath);var fileDir=path.dirname(filePath);if(!fs.existsSync(fileDir)){fs.mkdirSync(fileDir,{recursive:true});}fs.writeFileSync(filePath,file.content,'utf8');_logging.Logger.logDebug(`Created file: ${filePath}`);}_logging.Logger.logDebug(`Android module "${android.moduleName}" created at ${moduleDir}`);}var withAndroidModuleFiles=exports.withAndroidModuleFiles=function withAndroidModuleFiles(config,props){return(0,_configPlugins.withDangerousMod)(config,['android',(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(dangerousConfig){var androidDir=path.join(dangerousConfig.modRequest.projectRoot,'android');var rnVersion;try{var rnPkgPath=require.resolve('react-native/package.json',{paths:[dangerousConfig.modRequest.projectRoot]});var rnPkg=require(rnPkgPath);rnVersion=rnPkg.version;_logging.Logger.logDebug(`Resolved react-native version: ${rnVersion}`);}catch(_unused){throw new Error('Could not resolve react-native package version. Please ensure you have installed dependencies.');}createAndroidModule({androidDir:androidDir,config:props,rnVersion:rnVersion});return dangerousConfig;});return function(_x){return _ref2.apply(this,arguments);};}())]);};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.createAndroidModule=createAndroidModule;exports.withAndroidModuleFiles=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var fs=_interopRequireWildcard(require("node:fs"));var path=_interopRequireWildcard(require("node:path"));var _configPlugins=require("@expo/config-plugins");var _logging=require("../logging");var _engine=require("../template/engine");var _expoUtils=require("../expoUtils");var _hermes=require("./utils/hermes");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function createAndroidModule(_ref){var androidDir=_ref.androidDir,config=_ref.config,rnVersion=_ref.rnVersion,isExpoPre55=_ref.isExpoPre55;var android=config.android;var moduleDir=path.join(androidDir,android.moduleName);_logging.Logger.logDebug(`Creating Android module in: ${androidDir}`);var hermesArtifact=(0,_hermes.getHermesArtifact)(rnVersion);_logging.Logger.logDebug(`Resolved Hermes artifact: ${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`);var files=[{relativePath:'build.gradle.kts',content:(0,_engine.renderTemplate)('android','build.gradle.kts',{'{{PACKAGE_NAME}}':android.packageName,'{{MIN_SDK_VERSION}}':android.minSdkVersion.toString(),'{{COMPILE_SDK_VERSION}}':android.compileSdkVersion.toString(),'{{GROUP_ID}}':android.groupId,'{{ARTIFACT_ID}}':android.artifactId,'{{ARTIFACT_VERSION}}':android.version,'{{RN_VERSION}}':rnVersion,'{{HERMES_ARTIFACT}}':`${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`})},{relativePath:'gradle.properties',content:(0,_engine.renderTemplate)('android','gradle.properties',{})},{relativePath:'src/main/AndroidManifest.xml',content:(0,_engine.renderTemplate)('android','AndroidManifest.xml',{})},{relativePath:`src/main/java/${config.android.packageName.replace(/\./g,'/')}/ReactNativeHostManager.kt`,content:(0,_engine.renderTemplate)('android',isExpoPre55?'ReactNativeHostManager.pre55.kt':'ReactNativeHostManager.post55.kt',{'{{PACKAGE_NAME}}':android.packageName})},{relativePath:'consumer-rules.pro',content:(0,_engine.renderTemplate)('android','consumer-rules.pro',{})},{relativePath:'proguard-rules.pro',content:(0,_engine.renderTemplate)('android','proguard-rules.pro',{})}];for(var file of files){var filePath=path.join(moduleDir,file.relativePath);var fileDir=path.dirname(filePath);if(!fs.existsSync(fileDir)){fs.mkdirSync(fileDir,{recursive:true});}fs.writeFileSync(filePath,file.content,'utf8');_logging.Logger.logDebug(`Created file: ${filePath}`);}_logging.Logger.logDebug(`Android module "${android.moduleName}" created at ${moduleDir}`);}var withAndroidModuleFiles=exports.withAndroidModuleFiles=function withAndroidModuleFiles(config,props){return(0,_configPlugins.withDangerousMod)(config,['android',(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(dangerousConfig){var androidDir=path.join(dangerousConfig.modRequest.projectRoot,'android');var rnVersion;try{var rnPkgPath=require.resolve('react-native/package.json',{paths:[dangerousConfig.modRequest.projectRoot]});var rnPkg=require(rnPkgPath);rnVersion=rnPkg.version;_logging.Logger.logDebug(`Resolved react-native version: ${rnVersion}`);}catch(_unused){throw new Error('Could not resolve react-native package version. Please ensure you have installed dependencies.');}var _getExpoInfo=(0,_expoUtils.getExpoInfo)(config),isExpoPre55=_getExpoInfo.isExpoPre55;createAndroidModule({androidDir:androidDir,config:props,rnVersion:rnVersion,isExpoPre55:isExpoPre55});return dangerousConfig;});return function(_x){return _ref2.apply(this,arguments);};}())]);};
2
2
  //# sourceMappingURL=withAndroidModuleFiles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fs","_interopRequireWildcard","require","path","_configPlugins","_logging","_engine","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","createAndroidModule","_ref","androidDir","config","rnVersion","android","moduleDir","join","moduleName","Logger","logDebug","files","relativePath","content","renderTemplate","packageName","minSdkVersion","toString","compileSdkVersion","groupId","artifactId","version","replace","file","filePath","fileDir","dirname","existsSync","mkdirSync","recursive","writeFileSync","withAndroidModuleFiles","exports","props","withDangerousMod","_ref2","_asyncToGenerator2","dangerousConfig","modRequest","projectRoot","rnPkgPath","resolve","paths","rnPkg","_unused","Error","_x","apply","arguments"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withAndroidModuleFiles.ts"],"mappings":"oUAAA,IAAAA,EAAA,CAAAC,uBAAA,CAAAC,OAAA,aACA,IAAAC,IAAA,CAAAF,uBAAA,CAAAC,OAAA,eAEA,IAAAE,cAAA,CAAAF,OAAA,yBAMA,IAAAG,QAAA,CAAAH,OAAA,eACA,IAAAI,OAAA,CAAAJ,OAAA,uBAAoD,SAAAD,wBAAAM,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAR,uBAAA,UAAAA,wBAAAM,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,CAAAc,EAAA,KAAAP,CAAA,CAAAK,GAAA,EAAAL,CAAA,CAAAM,GAAA,EAAAP,CAAA,CAAAE,CA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K,CACrB,MAAO,GAAAC,+BAAgB,EAAC/B,MAAM,CAAE,CAC9B,SAAS,iBAAAgC,KAAA,IAAAC,kBAAA,CAAA9C,OAAA,EACT,UAAO+C,eAAe,CAAK,CACzB,GAAM,CAAAnC,UAAU,CAAG1B,IAAI,CAAC+B,IAAI,CAC1B8B,eAAe,CAACC,UAAU,CAACC,WAAW,CACtC,SACF,CAAC,CAED,GAAI,CAAAnC,SAAiB,CACrB,GAAI,CACF,GAAM,CAAAoC,SAAS,CAAGjE,OAAO,CAACkE,OAAO,CAAC,2BAA2B,CAAE,CAC7DC,KAAK,CAAE,CAACL,eAAe,CAACC,UAAU,CAACC,WAAW,CAChD,CAAC,CAAC,CAEF,GAAM,CAAAI,KAAK,CAAGpE,OAAO,CAACiE,SAAS,CAAC,CAEhCpC,SAAS,CAAGuC,KAAK,CAACtB,OAAO,CAEzBZ,eAAM,CAACC,QAAQ,CAAC,kCAAkCN,SAAS,EAAE,CAAC,CAChE,CAAE,MAAAwC,OAAA,CAAM,CACN,KAAM,IAAI,CAAAC,KAAK,CACb,gGACF,CAAC,CACH,CAEA7C,mBAAmB,CAAC,CAClBE,UAAU,CAAVA,UAAU,CACVC,MAAM,CAAE8B,KAAK,CACb7B,SAAS,CAATA,SACF,CAAC,CAAC,CAEF,MAAO,CAAAiC,eAAe,CACxB,CAAC,kBAAAS,EAAA,SAAAX,KAAA,CAAAY,KAAA,MAAAC,SAAA,SACF,CAAC,CACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["fs","_interopRequireWildcard","require","path","_configPlugins","_logging","_engine","_expoUtils","_hermes","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","createAndroidModule","_ref","androidDir","config","rnVersion","isExpoPre55","android","moduleDir","join","moduleName","Logger","logDebug","hermesArtifact","getHermesArtifact","groupId","artifactId","version","files","relativePath","content","renderTemplate","packageName","minSdkVersion","toString","compileSdkVersion","replace","file","filePath","fileDir","dirname","existsSync","mkdirSync","recursive","writeFileSync","withAndroidModuleFiles","exports","props","withDangerousMod","_ref2","_asyncToGenerator2","dangerousConfig","modRequest","projectRoot","rnPkgPath","resolve","paths","rnPkg","_unused","Error","_getExpoInfo","getExpoInfo","_x","apply","arguments"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withAndroidModuleFiles.ts"],"mappings":"oUAAA,IAAAA,EAAA,CAAAC,uBAAA,CAAAC,OAAA,aACA,IAAAC,IAAA,CAAAF,uBAAA,CAAAC,OAAA,eAEA,IAAAE,cAAA,CAAAF,OAAA,yBAMA,IAAAG,QAAA,CAAAH,OAAA,eACA,IAAAI,OAAA,CAAAJ,OAAA,uBACA,IAAAK,UAAA,CAAAL,OAAA,iBACA,IAAAM,OAAA,CAAAN,OAAA,mBAAmD,SAAAD,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAV,uBAAA,UAAAA,wBAAAQ,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,CAAAE,wBA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CAAX5C,WAAW,CAEnBL,mBAAmB,CAAC,CAClBE,UAAU,CAAVA,UAAU,CACVC,MAAM,CAAEiC,KAAK,CACbhC,SAAS,CAATA,SAAS,CACTC,WAAW,CAAXA,WACF,CAAC,CAAC,CAEF,MAAO,CAAAmC,eAAe,CACxB,CAAC,kBAAAW,EAAA,SAAAb,KAAA,CAAAc,KAAA,MAAAC,SAAA,SACF,CAAC,CACJ,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldAndroid=void 0;var _configPlugins=require("@expo/config-plugins");var _gradleHelpers=require("./gradleHelpers");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var withBrownfieldAndroid=exports.withBrownfieldAndroid=function withBrownfieldAndroid(config,props){var androidConfig=props.android;config=(0,_configPlugins.withProjectBuildGradle)(config,function(gradleConfig){gradleConfig.modResults.contents=(0,_gradleHelpers.modifyRootBuildGradle)(gradleConfig.modResults.contents);return gradleConfig;});config=(0,_configPlugins.withSettingsGradle)(config,function(settingsConfig){settingsConfig.modResults.contents=(0,_gradleHelpers.modifySettingsGradle)(settingsConfig.modResults.contents,androidConfig.moduleName);return settingsConfig;});config=(0,_withAndroidModuleFiles.withAndroidModuleFiles)(config,props);return config;};
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldAndroid=void 0;var _configPlugins=require("@expo/config-plugins");var _gradleHelpers=require("./utils/gradleHelpers");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var withBrownfieldAndroid=exports.withBrownfieldAndroid=function withBrownfieldAndroid(config,props){var androidConfig=props.android;config=(0,_configPlugins.withProjectBuildGradle)(config,function(gradleConfig){gradleConfig.modResults.contents=(0,_gradleHelpers.modifyRootBuildGradle)(gradleConfig.modResults.contents);return gradleConfig;});config=(0,_configPlugins.withSettingsGradle)(config,function(settingsConfig){settingsConfig.modResults.contents=(0,_gradleHelpers.modifySettingsGradle)(settingsConfig.modResults.contents,androidConfig.moduleName);return settingsConfig;});config=(0,_withAndroidModuleFiles.withAndroidModuleFiles)(config,props);return config;};
2
2
  //# sourceMappingURL=withBrownfieldAndroid.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_configPlugins","require","_gradleHelpers","_withAndroidModuleFiles","withBrownfieldAndroid","exports","config","props","androidConfig","android","withProjectBuildGradle","gradleConfig","modResults","contents","modifyRootBuildGradle","withSettingsGradle","settingsConfig","modifySettingsGradle","moduleName","withAndroidModuleFiles"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withBrownfieldAndroid.ts"],"mappings":"8FAAA,IAAAA,cAAA,CAAAC,OAAA,yBAMA,IAAAC,cAAA,CAAAD,OAAA,oBACA,IAAAE,uBAAA,CAAAF,OAAA,6BAYO,GAAM,CAAAG,qBAEZ,CAAAC,OAAA,CAAAD,qBAAA,CAAG,QAFS,CAAAA,qBAEZA,CAAIE,MAAM,CAAEC,KAAK,CAAK,CACrB,GAAM,CAAAC,aAAa,CAAGD,KAAK,CAACE,OAAO,CAGnCH,MAAM,CAAG,GAAAI,qCAAsB,EAACJ,MAAM,CAAE,SAACK,YAAY,CAAK,CACxDA,YAAY,CAACC,UAAU,CAACC,QAAQ,CAAG,GAAAC,oCAAqB,EACtDH,YAAY,CAACC,UAAU,CAACC,QAC1B,CAAC,CAED,MAAO,CAAAF,YAAY,CACrB,CAAC,CAAC,CAGFL,MAAM,CAAG,GAAAS,iCAAkB,EAACT,MAAM,CAAE,SAACU,cAAc,CAAK,CACtDA,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAAG,GAAAI,mCAAoB,EACvDD,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAClCL,aAAa,CAACU,UAChB,CAAC,CAED,MAAO,CAAAF,cAAc,CACvB,CAAC,CAAC,CAGFV,MAAM,CAAG,GAAAa,8CAAsB,EAACb,MAAM,CAAEC,KAAK,CAAC,CAE9C,MAAO,CAAAD,MAAM,CACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_configPlugins","require","_gradleHelpers","_withAndroidModuleFiles","withBrownfieldAndroid","exports","config","props","androidConfig","android","withProjectBuildGradle","gradleConfig","modResults","contents","modifyRootBuildGradle","withSettingsGradle","settingsConfig","modifySettingsGradle","moduleName","withAndroidModuleFiles"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withBrownfieldAndroid.ts"],"mappings":"8FAAA,IAAAA,cAAA,CAAAC,OAAA,yBAMA,IAAAC,cAAA,CAAAD,OAAA,0BAIA,IAAAE,uBAAA,CAAAF,OAAA,6BAYO,GAAM,CAAAG,qBAEZ,CAAAC,OAAA,CAAAD,qBAAA,CAAG,QAFS,CAAAA,qBAEZA,CAAIE,MAAM,CAAEC,KAAK,CAAK,CACrB,GAAM,CAAAC,aAAa,CAAGD,KAAK,CAACE,OAAO,CAGnCH,MAAM,CAAG,GAAAI,qCAAsB,EAACJ,MAAM,CAAE,SAACK,YAAY,CAAK,CACxDA,YAAY,CAACC,UAAU,CAACC,QAAQ,CAAG,GAAAC,oCAAqB,EACtDH,YAAY,CAACC,UAAU,CAACC,QAC1B,CAAC,CAED,MAAO,CAAAF,YAAY,CACrB,CAAC,CAAC,CAGFL,MAAM,CAAG,GAAAS,iCAAkB,EAACT,MAAM,CAAE,SAACU,cAAc,CAAK,CACtDA,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAAG,GAAAI,mCAAoB,EACvDD,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAClCL,aAAa,CAACU,UAChB,CAAC,CAED,MAAO,CAAAF,cAAc,CACvB,CAAC,CAAC,CAGFV,MAAM,CAAG,GAAAa,8CAAsB,EAACb,MAAM,CAAEC,KAAK,CAAC,CAE9C,MAAO,CAAAD,MAAM,CACf,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.getExpoInfo=getExpoInfo;function getExpoInfo(config){var expoMajor=config.sdkVersion?parseInt(config.sdkVersion.split('.')[0],10):-1;var isExpoPre55=expoMajor<55;return{expoMajor:expoMajor,isExpoPre55:isExpoPre55};}
2
+ //# sourceMappingURL=expoUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getExpoInfo","config","expoMajor","sdkVersion","parseInt","split","isExpoPre55"],"sourceRoot":"../../../src","sources":["expo-config-plugin/expoUtils.ts"],"mappings":"yFAEO,QAAS,CAAAA,WAAWA,CAACC,MAAkB,CAAE,CAC9C,GAAM,CAAAC,SAAS,CAAGD,MAAM,CAACE,UAAU,CAC/BC,QAAQ,CAACH,MAAM,CAACE,UAAU,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,CAC7C,CAAC,CAAC,CACN,GAAM,CAAAC,WAAW,CAAGJ,SAAS,CAAG,EAAE,CAClC,MAAO,CACLA,SAAS,CAATA,SAAS,CACTI,WAAW,CAAXA,WACF,CAAC,CACH","ignoreList":[]}
@@ -1,8 +1,22 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var BROWNFIELD_POD_HOOK_MARKER_START='# >>> react-native-brownfield expo phase ordering >>>';var BROWNFIELD_POD_HOOK_MARKER_END='# <<< react-native-brownfield expo phase ordering <<<';var BROWNFIELD_POST_INTEGRATE_REQUIRE=`require File.join(File.dirname(\`node --print "require.resolve('@callstack/react-native-brownfield/package.json')"\`), "scripts/react_native_brownfield_post_integrate")`;var REACT_NATIVE_PODS_REQUIRE_REGEX=/^require File\.join\(File\.dirname\(`node --print "require\.resolve\('react-native\/package\.json'\)"`\), "scripts\/react_native_pods"\)\s*$/m;function ensureBrownfieldPostIntegrateRequire(podfile){if(podfile.includes('scripts/react_native_brownfield_post_integrate')){return podfile;}var reactNativePodsRequireMatch=podfile.match(REACT_NATIVE_PODS_REQUIRE_REGEX);if(reactNativePodsRequireMatch){var requireLine=reactNativePodsRequireMatch[0];return podfile.replace(requireLine,`${requireLine}\n${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n`);}return`${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n\n${podfile}`;}function ensureExpoPhaseOrderingHook(podfile){var modifiedPodfile=ensureBrownfieldPostIntegrateRequire(podfile);if(modifiedPodfile.includes(BROWNFIELD_POD_HOOK_MARKER_START)){return modifiedPodfile;}var hook=`
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var BROWNFIELD_POD_HOOK_MARKER_START='# >>> react-native-brownfield expo phase ordering >>>';var BROWNFIELD_POD_HOOK_MARKER_END='# <<< react-native-brownfield expo phase ordering <<<';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START='# >>> react-native-brownfield Expo SDK 55+ swift defines >>>';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END='# <<< react-native-brownfield Expo SDK 55+ swift defines <<<';var BROWNFIELD_POST_INTEGRATE_REQUIRE=`require File.join(File.dirname(\`node --print "require.resolve('@callstack/react-native-brownfield/package.json')"\`), "scripts/react_native_brownfield_post_integrate")`;var REACT_NATIVE_PODS_REQUIRE_REGEX=/^require File\.join\(File\.dirname\(`node --print "require\.resolve\('react-native\/package\.json'\)"`\), "scripts\/react_native_pods"\)\s*$/m;function ensureBrownfieldPostIntegrateRequire(podfile){if(podfile.includes('scripts/react_native_brownfield_post_integrate')){return podfile;}var reactNativePodsRequireMatch=podfile.match(REACT_NATIVE_PODS_REQUIRE_REGEX);if(reactNativePodsRequireMatch){var requireLine=reactNativePodsRequireMatch[0];return podfile.replace(requireLine,`${requireLine}\n${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n`);}return`${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n\n${podfile}`;}function ensureExpoPhaseOrderingHook(podfile){var modifiedPodfile=ensureBrownfieldPostIntegrateRequire(podfile);if(modifiedPodfile.includes(BROWNFIELD_POD_HOOK_MARKER_START)){return modifiedPodfile;}var hook=`
2
2
  ${BROWNFIELD_POD_HOOK_MARKER_START}
3
3
  post_integrate do |installer|
4
4
  react_native_brownfield_post_integrate(installer)
5
5
  end
6
6
  ${BROWNFIELD_POD_HOOK_MARKER_END}
7
- `;modifiedPodfile=`${modifiedPodfile.trimEnd()}\n\n${hook}\n`;return modifiedPodfile;}function modifyPodfile(podfile,frameworkName,isExpoPre55){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(isExpoPre55){modifiedPodfile=ensureExpoPhaseOrderingHook(modifiedPodfile);}return modifiedPodfile;}
7
+ `;modifiedPodfile=`${modifiedPodfile.trimEnd()}\n\n${hook}\n`;return modifiedPodfile;}function ensureExpoDefinesForSDK55AndAbove(podfile){if(podfile.includes(BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START)){return podfile;}var hook=`
8
+ ${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START}
9
+ installer.pods_project.targets.each do |target|
10
+ if target.name == 'ReactBrownfield'
11
+ puts "[Brownfield] Adding definition of EXPO_SDK_GTE_55 to target: #{target.name}"
12
+
13
+ target.build_configurations.each do |config|
14
+ conditions = config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] || '$(inherited)'
15
+ conditions = conditions.to_s
16
+ config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = "#{conditions} EXPO_SDK_GTE_55"
17
+ end
18
+ end
19
+ end
20
+ ${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END}
21
+ `;var postInstallMatch=podfile.match(/(post_install\s+do\s+\|installer\|\s*\n)((?:(?!^\s*end\s*$)[\s\S])*)(^\s*end\s*$)/m);if(postInstallMatch){var _postInstallMatch=(0,_slicedToArray2.default)(postInstallMatch,4),whole=_postInstallMatch[0],start=_postInstallMatch[1],content=_postInstallMatch[2],end=_postInstallMatch[3];var updated=`${start}${content.trimEnd()}\n${hook}\n${end}`;return podfile.replace(whole,updated);}return`${podfile.trimEnd()}\n\npost_install do |installer|\n${hook}\nend\n`;}function modifyPodfile(podfile,frameworkName,expoMajor){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(expoMajor<55){modifiedPodfile=ensureExpoPhaseOrderingHook(modifiedPodfile);}else{modifiedPodfile=ensureExpoDefinesForSDK55AndAbove(modifiedPodfile);}return modifiedPodfile;}
8
22
  //# sourceMappingURL=podfileHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_SourceModificationError","require","_logging","_engine","BROWNFIELD_POD_HOOK_MARKER_START","BROWNFIELD_POD_HOOK_MARKER_END","BROWNFIELD_POST_INTEGRATE_REQUIRE","REACT_NATIVE_PODS_REQUIRE_REGEX","ensureBrownfieldPostIntegrateRequire","podfile","includes","reactNativePodsRequireMatch","match","requireLine","replace","ensureExpoPhaseOrderingHook","modifiedPodfile","hook","trimEnd","modifyPodfile","frameworkName","isExpoPre55","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","_slicedToArray2","default","targetStart","targetContent","insertIndex","indexOf","length","slice"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/podfileHelpers.ts"],"mappings":"4QAAA,IAAAA,wBAAA,CAAAC,OAAA,sCACA,IAAAC,QAAA,CAAAD,OAAA,eACA,IAAAE,OAAA,CAAAF,OAAA,uBAEA,GAAM,CAAAG,gCAAgC,CACpC,uDAAuD,CACzD,GAAM,CAAAC,8BAA8B,CAClC,uDAAuD,CACzD,GAAM,CAAAC,iCAAiC,CAAG,0KAA0K,CACpN,GAAM,CAAAC,+BAA+B,CACnC,+IAA+I,CAEjJ,QAAS,CAAAC,oCAAoCA,CAACC,OAAe,CAAU,CACrE,GAAIA,OAAO,CAACC,QAAQ,CAAC,gDAAgD,CAAC,CAAE,CACtE,MAAO,CAAAD,OA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c,eAAe,CAAE,CACpB,KAAM,IAAI,CAAAC,gDAAuB,CAC/B,kFACF,CAAC,CACH,CAEA,IAAAC,gBAAA,IAAAC,eAAA,CAAAC,OAAA,EAAuCJ,eAAe,IAA7CK,WAAW,CAAAH,gBAAA,IAAEI,aAAa,CAAAJ,gBAAA,IACnC,GAAM,CAAAK,WAAW,CACfxB,OAAO,CAACyB,OAAO,CAACR,eAAe,CAAC,CAAC,CAAC,CAAC,CACnCK,WAAW,CAACI,MAAM,CAClBH,aAAa,CAACG,MAAM,CAEtB,GAAI,CAAAnB,eAAe,CACjBP,OAAO,CAAC2B,KAAK,CAAC,CAAC,CAAEH,WAAW,CAAC,CAC7BT,oBAAoB,CACpBf,OAAO,CAAC2B,KAAK,CAACH,WAAW,CAAC,CAE5BX,eAAM,CAACC,QAAQ,CAAC,2BAA2BH,aAAa,cAAc,CAAC,CAEvE,GAAIC,WAAW,CAAE,CACfL,eAAe,CAAGD,2BAA2B,CAACC,eAAe,CAAC,CAChE,CAEA,MAAO,CAAAA,eAAe,CACxB","ignoreList":[]}
1
+ {"version":3,"names":["_SourceModificationError","require","_logging","_engine","BROWNFIELD_POD_HOOK_MARKER_START","BROWNFIELD_POD_HOOK_MARKER_END","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END","BROWNFIELD_POST_INTEGRATE_REQUIRE","REACT_NATIVE_PODS_REQUIRE_REGEX","ensureBrownfieldPostIntegrateRequire","podfile","includes","reactNativePodsRequireMatch","match","requireLine","replace","ensureExpoPhaseOrderingHook","modifiedPodfile","hook","trimEnd","ensureExpoDefinesForSDK55AndAbove","postInstallMatch","_postInstallMatch","_slicedToArray2","default","whole","start","content","end","updated","modifyPodfile","frameworkName","expoMajor","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","targetStart","targetContent","insertIndex","indexOf","length","slice"],"sourceRoot":"../../../../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oBAAoB,CAAEL,aACxB,CAAC,CAAC,CAGF,GAAM,CAAAM,eAAe,CAAG3B,OAAO,CAACG,KAAK,CACnC,0DACF,CAAC,CAED,GAAI,CAACwB,eAAe,CAAE,CACpB,KAAM,IAAI,CAAAC,gDAAuB,CAC/B,kFACF,CAAC,CACH,CAEA,IAAAC,gBAAA,IAAAhB,eAAA,CAAAC,OAAA,EAAuCa,eAAe,IAA7CG,WAAW,CAAAD,gBAAA,IAAEE,aAAa,CAAAF,gBAAA,IACnC,GAAM,CAAAG,WAAW,CACfhC,OAAO,CAACiC,OAAO,CAACN,eAAe,CAAC,CAAC,CAAC,CAAC,CACnCG,WAAW,CAACI,MAAM,CAClBH,aAAa,CAACG,MAAM,CAEtB,GAAI,CAAA3B,eAAe,CACjBP,OAAO,CAACmC,KAAK,CAAC,CAAC,CAAEH,WAAW,CAAC,CAC7BP,oBAAoB,CACpBzB,OAAO,CAACmC,KAAK,CAACH,WAAW,CAAC,CAE5BT,eAAM,CAACC,QAAQ,CAAC,2BAA2BH,aAAa,cAAc,CAAC,CAEvE,GAAIC,SAAS,CAAG,EAAE,CAAE,CAClBf,eAAe,CAAGD,2BAA2B,CAACC,eAAe,CAAC,CAChE,CAAC,IAAM,CAELA,eAAe,CAAGG,iCAAiC,CAACH,eAAe,CAAC,CACtE,CAEA,MAAO,CAAAA,eAAe,CACxB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldIos=void 0;var _configPlugins=require("@expo/config-plugins");var _xcodeHelpers=require("./xcodeHelpers");var _podfileHelpers=require("./podfileHelpers");var _withIosFrameworkFiles=require("./withIosFrameworkFiles");var _logging=require("../logging");var withBrownfieldIos=exports.withBrownfieldIos=function withBrownfieldIos(config,props){var expoMajor=config.sdkVersion?parseInt(config.sdkVersion.split('.')[0],10):-1;var isExpoPre55=expoMajor<55;config=(0,_configPlugins.withXcodeProject)(config,function(xcodeConfig){var project=xcodeConfig.modResults,modRequest=xcodeConfig.modRequest;var _addFrameworkTarget=(0,_xcodeHelpers.addFrameworkTarget)(project,modRequest,props.ios),frameworkTargetUUID=_addFrameworkTarget.frameworkTargetUUID,targetAlreadyExists=_addFrameworkTarget.targetAlreadyExists;if(targetAlreadyExists){_logging.Logger.logDebug(`Skipping further Xcode modifications as framework target was already present`);return xcodeConfig;}(0,_xcodeHelpers.copyBundleReactNativePhase)(project,frameworkTargetUUID);if(isExpoPre55){_logging.Logger.logDebug(`Adding ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);(0,_xcodeHelpers.addExpoPre55ShellPatchScriptPhase)(modRequest,project,{frameworkName:props.ios.frameworkName,frameworkTargetUUID:frameworkTargetUUID});}else{_logging.Logger.logDebug(`Skipping ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);}(0,_xcodeHelpers.addSourceFilesBuildPhase)(project,frameworkTargetUUID,props.ios);return xcodeConfig;});config=(0,_configPlugins.withPodfile)(config,function(podfileConfig){var frameworkName=props.ios.frameworkName;podfileConfig.modResults.contents=(0,_podfileHelpers.modifyPodfile)(podfileConfig.modResults.contents,frameworkName,isExpoPre55);return podfileConfig;});config=(0,_withIosFrameworkFiles.withIosFrameworkFiles)(config,props);return config;};
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldIos=void 0;var _configPlugins=require("@expo/config-plugins");var _xcodeHelpers=require("./xcodeHelpers");var _podfileHelpers=require("./podfileHelpers");var _withIosFrameworkFiles=require("./withIosFrameworkFiles");var _logging=require("../logging");var _expoUtils=require("../expoUtils");var withBrownfieldIos=exports.withBrownfieldIos=function withBrownfieldIos(config,props){var _getExpoInfo=(0,_expoUtils.getExpoInfo)(config),isExpoPre55=_getExpoInfo.isExpoPre55,expoMajor=_getExpoInfo.expoMajor;config=(0,_configPlugins.withXcodeProject)(config,function(xcodeConfig){var project=xcodeConfig.modResults,modRequest=xcodeConfig.modRequest;var _addFrameworkTarget=(0,_xcodeHelpers.addFrameworkTarget)(project,modRequest,props.ios),frameworkTargetUUID=_addFrameworkTarget.frameworkTargetUUID,targetAlreadyExists=_addFrameworkTarget.targetAlreadyExists;if(targetAlreadyExists){_logging.Logger.logDebug(`Skipping further Xcode modifications as framework target was already present`);return xcodeConfig;}(0,_xcodeHelpers.copyBundleReactNativePhase)(project,frameworkTargetUUID);if(isExpoPre55){_logging.Logger.logDebug(`Adding ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);(0,_xcodeHelpers.addExpoPre55ShellPatchScriptPhase)(modRequest,project,{frameworkName:props.ios.frameworkName,frameworkTargetUUID:frameworkTargetUUID});}else{_logging.Logger.logDebug(`Skipping ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);}(0,_xcodeHelpers.addSourceFilesBuildPhase)(project,frameworkTargetUUID,props.ios);return xcodeConfig;});config=(0,_configPlugins.withPodfile)(config,function(podfileConfig){var frameworkName=props.ios.frameworkName;podfileConfig.modResults.contents=(0,_podfileHelpers.modifyPodfile)(podfileConfig.modResults.contents,frameworkName,expoMajor);return podfileConfig;});config=(0,_withIosFrameworkFiles.withIosFrameworkFiles)(config,props);return config;};
2
2
  //# sourceMappingURL=withBrownfieldIos.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_configPlugins","require","_xcodeHelpers","_podfileHelpers","_withIosFrameworkFiles","_logging","withBrownfieldIos","exports","config","props","expoMajor","sdkVersion","parseInt","split","isExpoPre55","withXcodeProject","xcodeConfig","project","modResults","modRequest","_addFrameworkTarget","addFrameworkTarget","ios","frameworkTargetUUID","targetAlreadyExists","Logger","logDebug","copyBundleReactNativePhase","addExpoPre55ShellPatchScriptPhase","frameworkName","addSourceFilesBuildPhase","withPodfile","podfileConfig","contents","modifyPodfile","withIosFrameworkFiles"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/withBrownfieldIos.ts"],"mappings":"0FAAA,IAAAA,cAAA,CAAAC,OAAA,yBAMA,IAAAC,aAAA,CAAAD,OAAA,mBAMA,IAAAE,eAAA,CA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CACb,yDAAyDlB,MAAM,CAACG,UAAU,EAC5E,CAAC,CACH,CAEA,GAAAmB,sCAAwB,EAACb,OAAO,CAAEM,mBAAmB,CAAEd,KAAK,CAACa,GAAG,CAAC,CAEjE,MAAO,CAAAN,WAAW,CACpB,CAAC,CAAC,CAGFR,MAAM,CAAG,GAAAuB,0BAAW,EAACvB,MAAM,CAAE,SAACwB,aAAa,CAAK,CAC9C,GAAQ,CAAAH,aAAa,CAAKpB,KAAK,CAACa,GAAG,CAA3BO,aAAa,CAErBG,aAAa,CAACd,UAAU,CAACe,QAAQ,CAAG,GAAAC,6BAAa,EAC/CF,aAAa,CAACd,UAAU,CAACe,QAAQ,CACjCJ,aAAa,CACbf,WACF,CAAC,CAED,MAAO,CAAAkB,aAAa,CACtB,CAAC,CAAC,CAGFxB,MAAM,CAAG,GAAA2B,4CAAqB,EAAC3B,MAAM,CAAEC,KAAK,CAAC,CAE7C,MAAO,CAAAD,MAAM,CACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_configPlugins","require","_xcodeHelpers","_podfileHelpers","_withIosFrameworkFiles","_logging","_expoUtils","withBrownfieldIos","exports","config","props","_getExpoInfo","getExpoInfo","isExpoPre55","expoMajor","withXcodeProject","xcodeConfig","project","modResults","modRequest","_addFrameworkTarget","addFrameworkTarget","ios","frameworkTargetUUID","targetAlreadyExists","Logger","logDebug","copyBundleReactNativePhase","sdkVersion","addExpoPre55ShellPatchScriptPhase","frameworkName","addSourceFilesBuildPhase","withPodfile","podfileConfig","contents","modifyPodfile","withIosFrameworkFiles"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/withBrownfieldIos.ts"],"mappings":"0FAAA,IAAAA,cAAA,CAAAC,OAAA,yBAMA,IAAAC,aAAA,CAAAD,OAAA,mBAMA,IAAAE,eAAA,CAAAF,OAAA,qBACA,IAAAG,sBAAA,CAAAH,OAAA,4BAEA,IAAAI,QAAA,CAAAJ,OAAA,eACA,IAAAK,UAAA,CAAAL,OAAA,iBAY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,CAAC,CAGFP,MAAM,CAAG,GAAAuB,0BAAW,EAACvB,MAAM,CAAE,SAACwB,aAAa,CAAK,CAC9C,GAAQ,CAAAH,aAAa,CAAKpB,KAAK,CAACY,GAAG,CAA3BQ,aAAa,CAErBG,aAAa,CAACf,UAAU,CAACgB,QAAQ,CAAG,GAAAC,6BAAa,EAC/CF,aAAa,CAACf,UAAU,CAACgB,QAAQ,CACjCJ,aAAa,CACbhB,SACF,CAAC,CAED,MAAO,CAAAmB,aAAa,CACtB,CAAC,CAAC,CAGFxB,MAAM,CAAG,GAAA2B,4CAAqB,EAAC3B,MAAM,CAAEC,KAAK,CAAC,CAE7C,MAAO,CAAAD,MAAM,CACf,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ package {{PACKAGE_NAME}}
2
+
3
+ import android.app.Application
4
+ import android.content.res.Configuration
5
+ import com.callstack.reactnativebrownfield.OnJSBundleLoaded
6
+ import com.callstack.reactnativebrownfield.ReactNativeBrownfield
7
+ import com.facebook.react.PackageList
8
+ import com.facebook.react.ReactHost
9
+ import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
10
+ import expo.modules.ApplicationLifecycleDispatcher
11
+ import expo.modules.ExpoReactHostFactory
12
+
13
+ object ReactNativeHostManager {
14
+ fun initialize(application: Application, onJSBundleLoaded: OnJSBundleLoaded? = null) {
15
+ loadReactNative(application)
16
+
17
+ ApplicationLifecycleDispatcher.onApplicationCreate(application)
18
+
19
+ val reactHost: ReactHost by lazy {
20
+ ExpoReactHostFactory.getDefaultReactHost(
21
+ context = application.applicationContext,
22
+ packageList = PackageList(application).packages,
23
+ )
24
+ }
25
+
26
+ ReactNativeBrownfield.initialize(application, reactHost, onJSBundleLoaded)
27
+ }
28
+
29
+ fun onConfigurationChanged(application: Application, newConfig: Configuration) {
30
+ ApplicationLifecycleDispatcher.onConfigurationChanged(application, newConfig)
31
+ }
32
+ }
@@ -83,7 +83,7 @@ android {
83
83
 
84
84
  dependencies {
85
85
  api("com.facebook.react:react-android:{{RN_VERSION}}")
86
- api("com.facebook.react:hermes-android:{{RN_VERSION}}")
86
+ api("{{HERMES_ARTIFACT}}")
87
87
 
88
88
  api("io.coil-kt.coil3:coil-compose:3.2.0")
89
89
  api("io.coil-kt.coil3:coil-network-okhttp:3.2.0")
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"createAndroidModule",{enumerable:true,get:function get(){return _withAndroidModuleFiles.createAndroidModule;}});Object.defineProperty(exports,"modifyRootBuildGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifyRootBuildGradle;}});Object.defineProperty(exports,"modifySettingsGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifySettingsGradle;}});Object.defineProperty(exports,"withAndroidModuleFiles",{enumerable:true,get:function get(){return _withAndroidModuleFiles.withAndroidModuleFiles;}});Object.defineProperty(exports,"withBrownfieldAndroid",{enumerable:true,get:function get(){return _withBrownfieldAndroid.withBrownfieldAndroid;}});var _withBrownfieldAndroid=require("./withBrownfieldAndroid");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var _gradleHelpers=require("./gradleHelpers");
1
+ Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"createAndroidModule",{enumerable:true,get:function get(){return _withAndroidModuleFiles.createAndroidModule;}});Object.defineProperty(exports,"modifyRootBuildGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifyRootBuildGradle;}});Object.defineProperty(exports,"modifySettingsGradle",{enumerable:true,get:function get(){return _gradleHelpers.modifySettingsGradle;}});Object.defineProperty(exports,"withAndroidModuleFiles",{enumerable:true,get:function get(){return _withAndroidModuleFiles.withAndroidModuleFiles;}});Object.defineProperty(exports,"withBrownfieldAndroid",{enumerable:true,get:function get(){return _withBrownfieldAndroid.withBrownfieldAndroid;}});var _withBrownfieldAndroid=require("./withBrownfieldAndroid");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var _gradleHelpers=require("./utils/gradleHelpers");
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BROWNFIELD_PLUGIN_VERSION","exports","brownfieldGradlePluginDependency"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/constants.ts"],"mappings":"2IAAO,GAAM,CAAAA,yBAAyB,CAAAC,OAAA,CAAAD,yBAAA,CAAG,OAAO,CACzC,GAAM,CAAAE,gCAAgC,CAAAD,OAAA,CAAAC,gCAAA,CAAG,2DAA2DF,yBAAyB,IAAI","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.modifyRootBuildGradle=modifyRootBuildGradle;exports.modifySettingsGradle=modifySettingsGradle;var _constants=require("./constants");var _logging=require("../../logging");function modifyRootBuildGradle(contents){if(contents.includes('brownfield-gradle-plugin')){_logging.Logger.logDebug('Brownfield Gradle plugin already in root build.gradle, skipping');return contents;}_logging.Logger.logDebug(`Modifying root build.gradle to add the Gradle Brownfield plugin`);var buildscriptDepsRegex=/(buildscript\s*\{[\s\S]*?dependencies\s*\{[\s\S]*?)(})/m;var match=contents.match(buildscriptDepsRegex);if(!match){throw new Error('Could not locate buildscript block in root build.gradle');}var insertion=`\t${_constants.brownfieldGradlePluginDependency}\n\t`;var modifiedContents=contents.replace(buildscriptDepsRegex,`$1${insertion}$2`);_logging.Logger.logDebug('Added Brownfield Gradle plugin to root build.gradle');return modifiedContents;}function modifySettingsGradle(contents,moduleName){var includeStatement=`include ':${moduleName}'`;if(contents.includes(includeStatement)){_logging.Logger.logDebug(`Module "${moduleName}" already in settings.gradle, skipping`);return contents;}_logging.Logger.logDebug(`Modifying settings.gradle to include module "${moduleName}"`);var modifiedContents=contents+`\n${includeStatement}\n`;_logging.Logger.logDebug(`Added module "${moduleName}" to settings.gradle`);return modifiedContents;}
2
+ //# sourceMappingURL=gradleHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_constants","require","_logging","modifyRootBuildGradle","contents","includes","Logger","logDebug","buildscriptDepsRegex","match","Error","insertion","brownfieldGradlePluginDependency","modifiedContents","replace","modifySettingsGradle","moduleName","includeStatement"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/gradleHelpers.ts"],"mappings":"+JAAA,IAAAA,UAAA,CAAAC,OAAA,gBACA,IAAAC,QAAA,CAAAD,OAAA,kBAOO,QAAS,CAAAE,qBAAqBA,CAACC,QAAgB,CAAU,CAE9D,GAAIA,QAAQ,CAACC,QAAQ,CAAC,0BAA0B,CAAC,CAAE,CACjDC,eAAM,CAACC,QAAQ,CACb,iEACF,CAAC,CACD,MAAO,CAAAH,QAAQ,CACjB,CAEAE,eAAM,CAACC,QAAQ,CACb,iEACF,CAAC,CAGD,GAAM,CAAAC,oBAAoB,CACxB,yDAAyD,CAC3D,GAAM,CAAAC,KAAK,CAAGL,QAAQ,CAACK,KAAK,CAACD,oBAAoB,CAAC,CAElD,GAAI,CAACC,KAAK,CAAE,CACV,KAAM,IAAI,CAAAC,KAAK,CAAC,yDAAyD,CAAC,CAC5E,CAGA,GAAM,CAAAC,SAAS,CAAG,KAAKC,2CAAgC,MAAM,CAC7D,GAAM,CAAAC,gBAAgB,CAAGT,QAAQ,CAACU,OAAO,CACvCN,oBAAoB,CACpB,KAAKG,SAAS,IAChB,CAAC,CAEDL,eAAM,CAACC,QAAQ,CAAC,qDAAqD,CAAC,CACtE,MAAO,CAAAM,gBAAgB,CACzB,CAQO,QAAS,CAAAE,oBAAoBA,CAClCX,QAAgB,CAChBY,UAAkB,CACV,CACR,GAAM,CAAAC,gBAAgB,CAAG,aAAaD,UAAU,GAAG,CAGnD,GAAIZ,QAAQ,CAACC,QAAQ,CAACY,gBAAgB,CAAC,CAAE,CACvCX,eAAM,CAACC,QAAQ,CACb,WAAWS,UAAU,wCACvB,CAAC,CACD,MAAO,CAAAZ,QAAQ,CACjB,CAEAE,eAAM,CAACC,QAAQ,CACb,gDAAgDS,UAAU,GAC5D,CAAC,CAGD,GAAM,CAAAH,gBAAgB,CAAGT,QAAQ,CAAG,KAAKa,gBAAgB,IAAI,CAE7DX,eAAM,CAACC,QAAQ,CAAC,iBAAiBS,UAAU,sBAAsB,CAAC,CAElE,MAAO,CAAAH,gBAAgB,CACzB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getHermesArtifact=getHermesArtifact;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _logging=require("../../logging");function getHermesArtifact(rnVersion){var _rnPatchVersionString,_rnPatchVersionString2;var _ref=rnVersion.split('.'),_ref2=(0,_slicedToArray2.default)(_ref,3),rnMajorVersionString=_ref2[0],rnMinorVersionString=_ref2[1],rnPatchVersionString=_ref2[2];var rnMajorVersion=Number(rnMajorVersionString);var rnMinorVersion=Number(rnMinorVersionString);if((_rnPatchVersionString=rnPatchVersionString)!=null&&_rnPatchVersionString.includes('-')||(_rnPatchVersionString2=rnPatchVersionString)!=null&&_rnPatchVersionString2.includes('+')){rnPatchVersionString=rnPatchVersionString.split('-')[0].split('+')[0];}var rnPatchVersion=Number(rnPatchVersionString);if(Number.isNaN(rnMajorVersion)||Number.isNaN(rnMinorVersion)||Number.isNaN(rnPatchVersion)){throw new Error(`Failed to parse React Native version from '${rnVersion}' - resolved components are: ${rnMajorVersion}.${rnMinorVersion}.${rnPatchVersion}`);}if(rnMajorVersion!==0){throw new Error(`Unsupported React Native major version '${rnMajorVersion}' in '${rnVersion}'`);}if(rnMinorVersion>=84){return{groupId:'com.facebook.hermes',artifactId:'hermes-android',version:'0.15.1'};}if(rnMinorVersion===83){var version;switch(rnPatchVersion){case 0:case 1:version='0.14.0';break;case 2:case 3:case 4:version='0.14.1';break;default:version='0.14.1';_logging.Logger.logWarning(`This React Native patch version '${rnVersion}' (in ${rnMajorVersion}.${rnMinorVersion}.${rnPatchVersion}) has not been tested with the Brownfield plugin yet - please consider reporting this on GitHub: https://github.com/callstack/react-native-brownfield/. Using the latest version of Hermes that Brownfield has been tested with (0.14.1).`);break;}return{groupId:'com.facebook.hermes',artifactId:'hermes-android',version:version};}return{groupId:'com.facebook.react',artifactId:'hermes-android',version:rnVersion};}
2
+ //# sourceMappingURL=hermes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_logging","require","getHermesArtifact","rnVersion","_rnPatchVersionString","_rnPatchVersionString2","_ref","split","_ref2","_slicedToArray2","default","rnMajorVersionString","rnMinorVersionString","rnPatchVersionString","rnMajorVersion","Number","rnMinorVersion","includes","rnPatchVersion","isNaN","Error","groupId","artifactId","version","Logger","logWarning"],"sourceRoot":"../../../../../src","sources":["expo-config-plugin/android/utils/hermes.ts"],"mappings":"oRAAA,IAAAA,QAAA,CAAAC,OAAA,kBAEO,QAAS,CAAAC,iBAAiBA,CAACC,SAAiB,CAAE,KAAAC,qBAAA,CAAAC,sBAAA,CACnD,IAAAC,IAAA,CACEH,SAAS,CAACI,KAAK,CAAC,GAAG,CAAC,CAAAC,KAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,IAAA,IADjBK,oBAAoB,CAAAH,KAAA,IAAEI,oBAAoB,CAAAJ,KAAA,IAAEK,oBAAoB,CAAAL,KAAA,IAGrE,GAAM,CAAAM,cAAc,CAAGC,MAAM,CAACJ,oBAAoB,CAAC,CACnD,GAAM,CAAAK,cAAc,CAAGD,MAAM,CAACH,oBAAoB,CAAC,CAEnD,GACE,CAAAR,qBAAA,CAAAS,oBAAoB,SAApBT,qBAAA,CAAsBa,QAAQ,CAAC,GAAG,CAAC,GAAAZ,sBAAA,CACnCQ,oBAAoB,SAApBR,sBAAA,CAAsBY,QAAQ,CAAC,GAAG,CAAC,CACnC,CACAJ,oBAAoB,CAAGA,oBAAoB,CAACN,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAACA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACzE,CAEA,GAAM,CAAAW,cAAc,CAAGH,MAAM,CAACF,oBAAoB,CAAC,CAEnD,GACEE,MAAM,CAACI,KAAK,CAACL,cAAc,CAAC,EAC5BC,MAAM,CAACI,KAAK,CAACH,cAAc,CAAC,EAC5BD,MAAM,CAACI,KAAK,CAACD,cAAc,CAAC,CAC5B,CACA,KAAM,IAAI,CAAAE,KAAK,CACb,8CAA8CjB,SAAS,gCAAgCW,cAAc,IAAIE,cAAc,IAAIE,cAAc,EAC3I,CAAC,CACH,CAEA,GAAIJ,cAAc,GAAK,CAAC,CAAE,CACxB,KAAM,IAAI,CAAAM,KAAK,CACb,2CAA2CN,cAAc,SAASX,SAAS,GAC7E,CAAC,CACH,CAGA,GAAIa,cAAc,EAAI,EAAE,CAAE,CACxB,MAAO,CACLK,OAAO,CAAE,qBAAqB,CAC9BC,UAAU,CAAE,gBAAgB,CAC5BC,OAAO,CAAE,QACX,CAAC,CACH,CAGA,GAAIP,cAAc,GAAK,EAAE,CAAE,CACzB,GAAI,CAAAO,OAAe,CAEnB,OAAQL,cAAc,EAEpB,IAAK,EAAC,CACN,IAAK,EAAC,CACJK,OAAO,CAAG,QAAQ,CAClB,MAGF,IAAK,EAAC,CACN,IAAK,EAAC,CACN,IAAK,EAAC,CACJA,OAAO,CAAG,QAAQ,CAClB,MAEF,QACEA,OAAO,CAAG,QAAQ,CAClBC,eAAM,CAACC,UAAU,CACf,oCAAoCtB,SAAS,SAASW,cAAc,IAAIE,cAAc,IAAIE,cAAc,2OAC1G,CAAC,CACD,MACJ,CAEA,MAAO,CACLG,OAAO,CAAE,qBAAqB,CAC9BC,UAAU,CAAE,gBAAgB,CAC5BC,OAAO,CAAPA,OACF,CAAC,CACH,CAGA,MAAO,CACLF,OAAO,CAAE,oBAAoB,CAC7BC,UAAU,CAAE,gBAAgB,CAC5BC,OAAO,CAAEpB,SACX,CAAC,CACH","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.createAndroidModule=createAndroidModule;exports.withAndroidModuleFiles=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var fs=_interopRequireWildcard(require("node:fs"));var path=_interopRequireWildcard(require("node:path"));var _configPlugins=require("@expo/config-plugins");var _logging=require("../logging");var _engine=require("../template/engine");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function createAndroidModule(_ref){var androidDir=_ref.androidDir,config=_ref.config,rnVersion=_ref.rnVersion;var android=config.android;var moduleDir=path.join(androidDir,android.moduleName);_logging.Logger.logDebug(`Creating Android module in: ${androidDir}`);var files=[{relativePath:'build.gradle.kts',content:(0,_engine.renderTemplate)('android','build.gradle.kts',{'{{PACKAGE_NAME}}':android.packageName,'{{MIN_SDK_VERSION}}':android.minSdkVersion.toString(),'{{COMPILE_SDK_VERSION}}':android.compileSdkVersion.toString(),'{{GROUP_ID}}':android.groupId,'{{ARTIFACT_ID}}':android.artifactId,'{{ARTIFACT_VERSION}}':android.version,'{{RN_VERSION}}':rnVersion})},{relativePath:'gradle.properties',content:(0,_engine.renderTemplate)('android','gradle.properties',{})},{relativePath:'src/main/AndroidManifest.xml',content:(0,_engine.renderTemplate)('android','AndroidManifest.xml',{})},{relativePath:`src/main/java/${config.android.packageName.replace(/\./g,'/')}/ReactNativeHostManager.kt`,content:(0,_engine.renderTemplate)('android','ReactNativeHostManager.kt',{'{{PACKAGE_NAME}}':android.packageName})},{relativePath:'consumer-rules.pro',content:(0,_engine.renderTemplate)('android','consumer-rules.pro',{})},{relativePath:'proguard-rules.pro',content:(0,_engine.renderTemplate)('android','proguard-rules.pro',{})}];for(var file of files){var filePath=path.join(moduleDir,file.relativePath);var fileDir=path.dirname(filePath);if(!fs.existsSync(fileDir)){fs.mkdirSync(fileDir,{recursive:true});}fs.writeFileSync(filePath,file.content,'utf8');_logging.Logger.logDebug(`Created file: ${filePath}`);}_logging.Logger.logDebug(`Android module "${android.moduleName}" created at ${moduleDir}`);}var withAndroidModuleFiles=exports.withAndroidModuleFiles=function withAndroidModuleFiles(config,props){return(0,_configPlugins.withDangerousMod)(config,['android',(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(dangerousConfig){var androidDir=path.join(dangerousConfig.modRequest.projectRoot,'android');var rnVersion;try{var rnPkgPath=require.resolve('react-native/package.json',{paths:[dangerousConfig.modRequest.projectRoot]});var rnPkg=require(rnPkgPath);rnVersion=rnPkg.version;_logging.Logger.logDebug(`Resolved react-native version: ${rnVersion}`);}catch(_unused){throw new Error('Could not resolve react-native package version. Please ensure you have installed dependencies.');}createAndroidModule({androidDir:androidDir,config:props,rnVersion:rnVersion});return dangerousConfig;});return function(_x){return _ref2.apply(this,arguments);};}())]);};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.createAndroidModule=createAndroidModule;exports.withAndroidModuleFiles=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var fs=_interopRequireWildcard(require("node:fs"));var path=_interopRequireWildcard(require("node:path"));var _configPlugins=require("@expo/config-plugins");var _logging=require("../logging");var _engine=require("../template/engine");var _expoUtils=require("../expoUtils");var _hermes=require("./utils/hermes");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function createAndroidModule(_ref){var androidDir=_ref.androidDir,config=_ref.config,rnVersion=_ref.rnVersion,isExpoPre55=_ref.isExpoPre55;var android=config.android;var moduleDir=path.join(androidDir,android.moduleName);_logging.Logger.logDebug(`Creating Android module in: ${androidDir}`);var hermesArtifact=(0,_hermes.getHermesArtifact)(rnVersion);_logging.Logger.logDebug(`Resolved Hermes artifact: ${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`);var files=[{relativePath:'build.gradle.kts',content:(0,_engine.renderTemplate)('android','build.gradle.kts',{'{{PACKAGE_NAME}}':android.packageName,'{{MIN_SDK_VERSION}}':android.minSdkVersion.toString(),'{{COMPILE_SDK_VERSION}}':android.compileSdkVersion.toString(),'{{GROUP_ID}}':android.groupId,'{{ARTIFACT_ID}}':android.artifactId,'{{ARTIFACT_VERSION}}':android.version,'{{RN_VERSION}}':rnVersion,'{{HERMES_ARTIFACT}}':`${hermesArtifact.groupId}:${hermesArtifact.artifactId}:${hermesArtifact.version}`})},{relativePath:'gradle.properties',content:(0,_engine.renderTemplate)('android','gradle.properties',{})},{relativePath:'src/main/AndroidManifest.xml',content:(0,_engine.renderTemplate)('android','AndroidManifest.xml',{})},{relativePath:`src/main/java/${config.android.packageName.replace(/\./g,'/')}/ReactNativeHostManager.kt`,content:(0,_engine.renderTemplate)('android',isExpoPre55?'ReactNativeHostManager.pre55.kt':'ReactNativeHostManager.post55.kt',{'{{PACKAGE_NAME}}':android.packageName})},{relativePath:'consumer-rules.pro',content:(0,_engine.renderTemplate)('android','consumer-rules.pro',{})},{relativePath:'proguard-rules.pro',content:(0,_engine.renderTemplate)('android','proguard-rules.pro',{})}];for(var file of files){var filePath=path.join(moduleDir,file.relativePath);var fileDir=path.dirname(filePath);if(!fs.existsSync(fileDir)){fs.mkdirSync(fileDir,{recursive:true});}fs.writeFileSync(filePath,file.content,'utf8');_logging.Logger.logDebug(`Created file: ${filePath}`);}_logging.Logger.logDebug(`Android module "${android.moduleName}" created at ${moduleDir}`);}var withAndroidModuleFiles=exports.withAndroidModuleFiles=function withAndroidModuleFiles(config,props){return(0,_configPlugins.withDangerousMod)(config,['android',(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(dangerousConfig){var androidDir=path.join(dangerousConfig.modRequest.projectRoot,'android');var rnVersion;try{var rnPkgPath=require.resolve('react-native/package.json',{paths:[dangerousConfig.modRequest.projectRoot]});var rnPkg=require(rnPkgPath);rnVersion=rnPkg.version;_logging.Logger.logDebug(`Resolved react-native version: ${rnVersion}`);}catch(_unused){throw new Error('Could not resolve react-native package version. Please ensure you have installed dependencies.');}var _getExpoInfo=(0,_expoUtils.getExpoInfo)(config),isExpoPre55=_getExpoInfo.isExpoPre55;createAndroidModule({androidDir:androidDir,config:props,rnVersion:rnVersion,isExpoPre55:isExpoPre55});return dangerousConfig;});return function(_x){return _ref2.apply(this,arguments);};}())]);};
2
2
  //# sourceMappingURL=withAndroidModuleFiles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fs","_interopRequireWildcard","require","path","_configPlugins","_logging","_engine","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","createAndroidModule","_ref","androidDir","config","rnVersion","android","moduleDir","join","moduleName","Logger","logDebug","files","relativePath","content","renderTemplate","packageName","minSdkVersion","toString","compileSdkVersion","groupId","artifactId","version","replace","file","filePath","fileDir","dirname","existsSync","mkdirSync","recursive","writeFileSync","withAndroidModuleFiles","exports","props","withDangerousMod","_ref2","_asyncToGenerator2","dangerousConfig","modRequest","projectRoot","rnPkgPath","resolve","paths","rnPkg","_unused","Error","_x","ap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AAM,CAAAnC,UAAU,CAAG1B,IAAI,CAAC+B,IAAI,CAC1B8B,eAAe,CAACC,UAAU,CAACC,WAAW,CACtC,SACF,CAAC,CAED,GAAI,CAAAnC,SAAiB,CACrB,GAAI,CACF,GAAM,CAAAoC,SAAS,CAAGjE,OAAO,CAACkE,OAAO,CAAC,2BAA2B,CAAE,CAC7DC,KAAK,CAAE,CAACL,eAAe,CAACC,UAAU,CAACC,WAAW,CAChD,CAAC,CAAC,CAEF,GAAM,CAAAI,KAAK,CAAGpE,OAAO,CAACiE,SAAS,CAAC,CAEhCpC,SAAS,CAAGuC,KAAK,CAACtB,OAAO,CAEzBZ,eAAM,CAACC,QAAQ,CAAC,kCAAkCN,SAAS,EAAE,CAAC,CAChE,CAAE,MAAAwC,OAAA,CAAM,CACN,KAAM,IAAI,CAAAC,KAAK,CACb,gGACF,CAAC,CACH,CAEA7C,mBAAmB,CAAC,CAClBE,UAAU,CAAVA,UAAU,CACVC,MAAM,CAAE8B,KAAK,CACb7B,SAAS,CAATA,SACF,CAAC,CAAC,CAEF,MAAO,CAAAiC,eAAe,CACxB,CAAC,kBAAAS,EAAA,SAAAX,KAAA,CAAAY,KAAA,MAAAC,SAAA,SACF,CAAC,CACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["fs","_interopRequireWildcard","require","path","_configPlugins","_logging","_engine","_expoUtils","_hermes","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","createAndroidModule","_ref","androidDir","config","rnVersion","isExpoPre55","android","moduleDir","join","moduleName","Logger","logDebug","hermesArtifact","getHermesArtifact","groupId","artifactId","version","files","relativePath","content","renderTemplate","packageName","minSdkVersion","toString","compileSdkVersion","replace","file","filePath","fileDir","dirname","existsSync","mkdirSync","recursive","writeFileSync","withAndroidModuleFiles","exports","props","withDangerousMod","_ref2","_asyncToGenerator2","dangerousConfig","modRequest","projectRoot","rnPkgPath","resolve","paths","r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AAC,CAAC,CAEF,MAAO,CAAAmC,eAAe,CACxB,CAAC,kBAAAW,EAAA,SAAAb,KAAA,CAAAc,KAAA,MAAAC,SAAA,SACF,CAAC,CACJ,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldAndroid=void 0;var _configPlugins=require("@expo/config-plugins");var _gradleHelpers=require("./gradleHelpers");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var withBrownfieldAndroid=exports.withBrownfieldAndroid=function withBrownfieldAndroid(config,props){var androidConfig=props.android;config=(0,_configPlugins.withProjectBuildGradle)(config,function(gradleConfig){gradleConfig.modResults.contents=(0,_gradleHelpers.modifyRootBuildGradle)(gradleConfig.modResults.contents);return gradleConfig;});config=(0,_configPlugins.withSettingsGradle)(config,function(settingsConfig){settingsConfig.modResults.contents=(0,_gradleHelpers.modifySettingsGradle)(settingsConfig.modResults.contents,androidConfig.moduleName);return settingsConfig;});config=(0,_withAndroidModuleFiles.withAndroidModuleFiles)(config,props);return config;};
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldAndroid=void 0;var _configPlugins=require("@expo/config-plugins");var _gradleHelpers=require("./utils/gradleHelpers");var _withAndroidModuleFiles=require("./withAndroidModuleFiles");var withBrownfieldAndroid=exports.withBrownfieldAndroid=function withBrownfieldAndroid(config,props){var androidConfig=props.android;config=(0,_configPlugins.withProjectBuildGradle)(config,function(gradleConfig){gradleConfig.modResults.contents=(0,_gradleHelpers.modifyRootBuildGradle)(gradleConfig.modResults.contents);return gradleConfig;});config=(0,_configPlugins.withSettingsGradle)(config,function(settingsConfig){settingsConfig.modResults.contents=(0,_gradleHelpers.modifySettingsGradle)(settingsConfig.modResults.contents,androidConfig.moduleName);return settingsConfig;});config=(0,_withAndroidModuleFiles.withAndroidModuleFiles)(config,props);return config;};
2
2
  //# sourceMappingURL=withBrownfieldAndroid.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_configPlugins","require","_gradleHelpers","_withAndroidModuleFiles","withBrownfieldAndroid","exports","config","props","androidConfig","android","withProjectBuildGradle","gradleConfig","modResults","contents","modifyRootBuildGradle","withSettingsGradle","settingsConfig","modifySettingsGradle","moduleName","withAndroidModuleFiles"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withBrownfieldAndroid.ts"],"mappings":"8FAAA,IAAAA,cAAA,CAAAC,OAAA,yBAMA,IAAAC,cAAA,CAAAD,OAAA,oBACA,IAAAE,uBAAA,CAAAF,OAAA,6BAYO,GAAM,CAAAG,qBAEZ,CAAAC,OAAA,CAAAD,qBAAA,CAAG,QAFS,CAAAA,qBAEZA,CAAIE,MAAM,CAAEC,KAAK,CAAK,CACrB,GAAM,CAAAC,aAAa,CAAGD,KAAK,CAACE,OAAO,CAGnCH,MAAM,CAAG,GAAAI,qCAAsB,EAACJ,MAAM,CAAE,SAACK,YAAY,CAAK,CACxDA,YAAY,CAACC,UAAU,CAACC,QAAQ,CAAG,GAAAC,oCAAqB,EACtDH,YAAY,CAACC,UAAU,CAACC,QAC1B,CAAC,CAED,MAAO,CAAAF,YAAY,CACrB,CAAC,CAAC,CAGFL,MAAM,CAAG,GAAAS,iCAAkB,EAACT,MAAM,CAAE,SAACU,cAAc,CAAK,CACtDA,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAAG,GAAAI,mCAAoB,EACvDD,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAClCL,aAAa,CAACU,UAChB,CAAC,CAED,MAAO,CAAAF,cAAc,CACvB,CAAC,CAAC,CAGFV,MAAM,CAAG,GAAAa,8CAAsB,EAACb,MAAM,CAAEC,KAAK,CAAC,CAE9C,MAAO,CAAAD,MAAM,CACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_configPlugins","require","_gradleHelpers","_withAndroidModuleFiles","withBrownfieldAndroid","exports","config","props","androidConfig","android","withProjectBuildGradle","gradleConfig","modResults","contents","modifyRootBuildGradle","withSettingsGradle","settingsConfig","modifySettingsGradle","moduleName","withAndroidModuleFiles"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/android/withBrownfieldAndroid.ts"],"mappings":"8FAAA,IAAAA,cAAA,CAAAC,OAAA,yBAMA,IAAAC,cAAA,CAAAD,OAAA,0BAIA,IAAAE,uBAAA,CAAAF,OAAA,6BAYO,GAAM,CAAAG,qBAEZ,CAAAC,OAAA,CAAAD,qBAAA,CAAG,QAFS,CAAAA,qBAEZA,CAAIE,MAAM,CAAEC,KAAK,CAAK,CACrB,GAAM,CAAAC,aAAa,CAAGD,KAAK,CAACE,OAAO,CAGnCH,MAAM,CAAG,GAAAI,qCAAsB,EAACJ,MAAM,CAAE,SAACK,YAAY,CAAK,CACxDA,YAAY,CAACC,UAAU,CAACC,QAAQ,CAAG,GAAAC,oCAAqB,EACtDH,YAAY,CAACC,UAAU,CAACC,QAC1B,CAAC,CAED,MAAO,CAAAF,YAAY,CACrB,CAAC,CAAC,CAGFL,MAAM,CAAG,GAAAS,iCAAkB,EAACT,MAAM,CAAE,SAACU,cAAc,CAAK,CACtDA,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAAG,GAAAI,mCAAoB,EACvDD,cAAc,CAACJ,UAAU,CAACC,QAAQ,CAClCL,aAAa,CAACU,UAChB,CAAC,CAED,MAAO,CAAAF,cAAc,CACvB,CAAC,CAAC,CAGFV,MAAM,CAAG,GAAAa,8CAAsB,EAACb,MAAM,CAAEC,KAAK,CAAC,CAE9C,MAAO,CAAAD,MAAM,CACf,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.getExpoInfo=getExpoInfo;function getExpoInfo(config){var expoMajor=config.sdkVersion?parseInt(config.sdkVersion.split('.')[0],10):-1;var isExpoPre55=expoMajor<55;return{expoMajor:expoMajor,isExpoPre55:isExpoPre55};}
2
+ //# sourceMappingURL=expoUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getExpoInfo","config","expoMajor","sdkVersion","parseInt","split","isExpoPre55"],"sourceRoot":"../../../src","sources":["expo-config-plugin/expoUtils.ts"],"mappings":"yFAEO,QAAS,CAAAA,WAAWA,CAACC,MAAkB,CAAE,CAC9C,GAAM,CAAAC,SAAS,CAAGD,MAAM,CAACE,UAAU,CAC/BC,QAAQ,CAACH,MAAM,CAACE,UAAU,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,CAC7C,CAAC,CAAC,CACN,GAAM,CAAAC,WAAW,CAAGJ,SAAS,CAAG,EAAE,CAClC,MAAO,CACLA,SAAS,CAATA,SAAS,CACTI,WAAW,CAAXA,WACF,CAAC,CACH","ignoreList":[]}
@@ -1,8 +1,22 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var BROWNFIELD_POD_HOOK_MARKER_START='# >>> react-native-brownfield expo phase ordering >>>';var BROWNFIELD_POD_HOOK_MARKER_END='# <<< react-native-brownfield expo phase ordering <<<';var BROWNFIELD_POST_INTEGRATE_REQUIRE=`require File.join(File.dirname(\`node --print "require.resolve('@callstack/react-native-brownfield/package.json')"\`), "scripts/react_native_brownfield_post_integrate")`;var REACT_NATIVE_PODS_REQUIRE_REGEX=/^require File\.join\(File\.dirname\(`node --print "require\.resolve\('react-native\/package\.json'\)"`\), "scripts\/react_native_pods"\)\s*$/m;function ensureBrownfieldPostIntegrateRequire(podfile){if(podfile.includes('scripts/react_native_brownfield_post_integrate')){return podfile;}var reactNativePodsRequireMatch=podfile.match(REACT_NATIVE_PODS_REQUIRE_REGEX);if(reactNativePodsRequireMatch){var requireLine=reactNativePodsRequireMatch[0];return podfile.replace(requireLine,`${requireLine}\n${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n`);}return`${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n\n${podfile}`;}function ensureExpoPhaseOrderingHook(podfile){var modifiedPodfile=ensureBrownfieldPostIntegrateRequire(podfile);if(modifiedPodfile.includes(BROWNFIELD_POD_HOOK_MARKER_START)){return modifiedPodfile;}var hook=`
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var BROWNFIELD_POD_HOOK_MARKER_START='# >>> react-native-brownfield expo phase ordering >>>';var BROWNFIELD_POD_HOOK_MARKER_END='# <<< react-native-brownfield expo phase ordering <<<';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START='# >>> react-native-brownfield Expo SDK 55+ swift defines >>>';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END='# <<< react-native-brownfield Expo SDK 55+ swift defines <<<';var BROWNFIELD_POST_INTEGRATE_REQUIRE=`require File.join(File.dirname(\`node --print "require.resolve('@callstack/react-native-brownfield/package.json')"\`), "scripts/react_native_brownfield_post_integrate")`;var REACT_NATIVE_PODS_REQUIRE_REGEX=/^require File\.join\(File\.dirname\(`node --print "require\.resolve\('react-native\/package\.json'\)"`\), "scripts\/react_native_pods"\)\s*$/m;function ensureBrownfieldPostIntegrateRequire(podfile){if(podfile.includes('scripts/react_native_brownfield_post_integrate')){return podfile;}var reactNativePodsRequireMatch=podfile.match(REACT_NATIVE_PODS_REQUIRE_REGEX);if(reactNativePodsRequireMatch){var requireLine=reactNativePodsRequireMatch[0];return podfile.replace(requireLine,`${requireLine}\n${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n`);}return`${BROWNFIELD_POST_INTEGRATE_REQUIRE}\n\n${podfile}`;}function ensureExpoPhaseOrderingHook(podfile){var modifiedPodfile=ensureBrownfieldPostIntegrateRequire(podfile);if(modifiedPodfile.includes(BROWNFIELD_POD_HOOK_MARKER_START)){return modifiedPodfile;}var hook=`
2
2
  ${BROWNFIELD_POD_HOOK_MARKER_START}
3
3
  post_integrate do |installer|
4
4
  react_native_brownfield_post_integrate(installer)
5
5
  end
6
6
  ${BROWNFIELD_POD_HOOK_MARKER_END}
7
- `;modifiedPodfile=`${modifiedPodfile.trimEnd()}\n\n${hook}\n`;return modifiedPodfile;}function modifyPodfile(podfile,frameworkName,isExpoPre55){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(isExpoPre55){modifiedPodfile=ensureExpoPhaseOrderingHook(modifiedPodfile);}return modifiedPodfile;}
7
+ `;modifiedPodfile=`${modifiedPodfile.trimEnd()}\n\n${hook}\n`;return modifiedPodfile;}function ensureExpoDefinesForSDK55AndAbove(podfile){if(podfile.includes(BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START)){return podfile;}var hook=`
8
+ ${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START}
9
+ installer.pods_project.targets.each do |target|
10
+ if target.name == 'ReactBrownfield'
11
+ puts "[Brownfield] Adding definition of EXPO_SDK_GTE_55 to target: #{target.name}"
12
+
13
+ target.build_configurations.each do |config|
14
+ conditions = config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] || '$(inherited)'
15
+ conditions = conditions.to_s
16
+ config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = "#{conditions} EXPO_SDK_GTE_55"
17
+ end
18
+ end
19
+ end
20
+ ${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END}
21
+ `;var postInstallMatch=podfile.match(/(post_install\s+do\s+\|installer\|\s*\n)((?:(?!^\s*end\s*$)[\s\S])*)(^\s*end\s*$)/m);if(postInstallMatch){var _postInstallMatch=(0,_slicedToArray2.default)(postInstallMatch,4),whole=_postInstallMatch[0],start=_postInstallMatch[1],content=_postInstallMatch[2],end=_postInstallMatch[3];var updated=`${start}${content.trimEnd()}\n${hook}\n${end}`;return podfile.replace(whole,updated);}return`${podfile.trimEnd()}\n\npost_install do |installer|\n${hook}\nend\n`;}function modifyPodfile(podfile,frameworkName,expoMajor){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(expoMajor<55){modifiedPodfile=ensureExpoPhaseOrderingHook(modifiedPodfile);}else{modifiedPodfile=ensureExpoDefinesForSDK55AndAbove(modifiedPodfile);}return modifiedPodfile;}
8
22
  //# sourceMappingURL=podfileHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_SourceModificationError","require","_logging","_engine","BROWNFIELD_POD_HOOK_MARKER_START","BROWNFIELD_POD_HOOK_MARKER_END","BROWNFIELD_POST_INTEGRATE_REQUIRE","REACT_NATIVE_PODS_REQUIRE_REGEX","ensureBrownfieldPostIntegrateRequire","podfile","includes","reactNativePodsRequireMatch","match","requireLine","replace","ensureExpoPhaseOrderingHook","modifiedPodfile","hook","trimEnd","modifyPodfile","frameworkName","isExpoPre55","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","_slicedToArray2","default","targetStart","targetContent","insertIndex","indexOf","length","slice"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/podfileHelpers.ts"],"mappings":"4QAAA,IAAAA,wBAAA,CAAAC,OAAA,sCACA,IAAAC,QAAA,CAAAD,OAAA,eACA,IAAAE,OAAA,CAAAF,OAAA,uBAEA,GAAM,CAAAG,gCAAgC,CACpC,uDAAuD,CACzD,GAAM,CAAAC,8BAA8B,CAClC,uDAAuD,CACzD,GAAM,CAAAC,iCAAiC,CAAG,0KAA0K,CACpN,GAAM,CAAAC,+BAA+B,CACnC,+IAA+I,CAEjJ,QAAS,CAAAC,oCAAoCA,CAACC,OAAe,CAAU,CACrE,GAAIA,OAAO,CAACC,QAAQ,CAAC,gDAAgD,CAAC,CAAE,CACtE,MAAO,CAAAD,OAAO,CAChB,CAEA,GAAM,CAAAE,2BAA2B,CAAGF,OAAO,CAACG,KAAK,CAC/CL,+BACF,CAAC,CACD,GAAII,2BAA2B,CAAE,CAC/B,GAAM,CAAAE,WAAW,CAAGF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K,WAAW,CAAAH,gBAAA,IAAEI,aAAa,CAAAJ,gBAAA,IACnC,GAAM,CAAAK,WAAW,CACfxB,OAAO,CAACyB,OAAO,CAACR,eAAe,CAAC,CAAC,CAAC,CAAC,CACnCK,WAAW,CAACI,MAAM,CAClBH,aAAa,CAACG,MAAM,CAEtB,GAAI,CAAAnB,eAAe,CACjBP,OAAO,CAAC2B,KAAK,CAAC,CAAC,CAAEH,WAAW,CAAC,CAC7BT,oBAAoB,CACpBf,OAAO,CAAC2B,KAAK,CAACH,WAAW,CAAC,CAE5BX,eAAM,CAACC,QAAQ,CAAC,2BAA2BH,aAAa,cAAc,CAAC,CAEvE,GAAIC,WAAW,CAAE,CACfL,eAAe,CAAGD,2BAA2B,CAACC,eAAe,CAAC,CAChE,CAEA,MAAO,CAAAA,eAAe,CACxB","ignoreList":[]}
1
+ {"version":3,"names":["_SourceModificationError","require","_logging","_engine","BROWNFIELD_POD_HOOK_MARKER_START","BROWNFIELD_POD_HOOK_MARKER_END","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END","BROWNFIELD_POST_INTEGRATE_REQUIRE","REACT_NATIVE_PODS_REQUIRE_REGEX","ensureBrownfieldPostIntegrateRequire","podfile","includes","reactNativePodsRequireMatch","match","requireLine","replace","ensureExpoPhaseOrderingHook","modifiedPodfile","hook","trimEnd","ensureExpoDefinesForSDK55AndAbove","postInstallMatch","_postInstallMatch","_slicedToArray2","default","whole","start","content","end","updated","modifyPodfile","frameworkName","expoMajor","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","targetStart","targetContent","insertIndex","indexOf","length","slice"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/podfileHelpers.ts"],"mappings":"4QAAA,IAAAA,wBAAA,CAAAC,OAAA,sCACA,IAAAC,QAAA,CAAAD,OAAA,eACA,IAAAE,OAAA,CAAAF,OAAA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AAM,IAAI,CAAAC,gDAAuB,CAC/B,kFACF,CAAC,CACH,CAEA,IAAAC,gBAAA,IAAAhB,eAAA,CAAAC,OAAA,EAAuCa,eAAe,IAA7CG,WAAW,CAAAD,gBAAA,IAAEE,aAAa,CAAAF,gBAAA,IACnC,GAAM,CAAAG,WAAW,CACfhC,OAAO,CAACiC,OAAO,CAACN,eAAe,CAAC,CAAC,CAAC,CAAC,CACnCG,WAAW,CAACI,MAAM,CAClBH,aAAa,CAACG,MAAM,CAEtB,GAAI,CAAA3B,eAAe,CACjBP,OAAO,CAACmC,KAAK,CAAC,CAAC,CAAEH,WAAW,CAAC,CAC7BP,oBAAoB,CACpBzB,OAAO,CAACmC,KAAK,CAACH,WAAW,CAAC,CAE5BT,eAAM,CAACC,QAAQ,CAAC,2BAA2BH,aAAa,cAAc,CAAC,CAEvE,GAAIC,SAAS,CAAG,EAAE,CAAE,CAClBf,eAAe,CAAGD,2BAA2B,CAACC,eAAe,CAAC,CAChE,CAAC,IAAM,CAELA,eAAe,CAAGG,iCAAiC,CAACH,eAAe,CAAC,CACtE,CAEA,MAAO,CAAAA,eAAe,CACxB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldIos=void 0;var _configPlugins=require("@expo/config-plugins");var _xcodeHelpers=require("./xcodeHelpers");var _podfileHelpers=require("./podfileHelpers");var _withIosFrameworkFiles=require("./withIosFrameworkFiles");var _logging=require("../logging");var withBrownfieldIos=exports.withBrownfieldIos=function withBrownfieldIos(config,props){var expoMajor=config.sdkVersion?parseInt(config.sdkVersion.split('.')[0],10):-1;var isExpoPre55=expoMajor<55;config=(0,_configPlugins.withXcodeProject)(config,function(xcodeConfig){var project=xcodeConfig.modResults,modRequest=xcodeConfig.modRequest;var _addFrameworkTarget=(0,_xcodeHelpers.addFrameworkTarget)(project,modRequest,props.ios),frameworkTargetUUID=_addFrameworkTarget.frameworkTargetUUID,targetAlreadyExists=_addFrameworkTarget.targetAlreadyExists;if(targetAlreadyExists){_logging.Logger.logDebug(`Skipping further Xcode modifications as framework target was already present`);return xcodeConfig;}(0,_xcodeHelpers.copyBundleReactNativePhase)(project,frameworkTargetUUID);if(isExpoPre55){_logging.Logger.logDebug(`Adding ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);(0,_xcodeHelpers.addExpoPre55ShellPatchScriptPhase)(modRequest,project,{frameworkName:props.ios.frameworkName,frameworkTargetUUID:frameworkTargetUUID});}else{_logging.Logger.logDebug(`Skipping ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);}(0,_xcodeHelpers.addSourceFilesBuildPhase)(project,frameworkTargetUUID,props.ios);return xcodeConfig;});config=(0,_configPlugins.withPodfile)(config,function(podfileConfig){var frameworkName=props.ios.frameworkName;podfileConfig.modResults.contents=(0,_podfileHelpers.modifyPodfile)(podfileConfig.modResults.contents,frameworkName,isExpoPre55);return podfileConfig;});config=(0,_withIosFrameworkFiles.withIosFrameworkFiles)(config,props);return config;};
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.withBrownfieldIos=void 0;var _configPlugins=require("@expo/config-plugins");var _xcodeHelpers=require("./xcodeHelpers");var _podfileHelpers=require("./podfileHelpers");var _withIosFrameworkFiles=require("./withIosFrameworkFiles");var _logging=require("../logging");var _expoUtils=require("../expoUtils");var withBrownfieldIos=exports.withBrownfieldIos=function withBrownfieldIos(config,props){var _getExpoInfo=(0,_expoUtils.getExpoInfo)(config),isExpoPre55=_getExpoInfo.isExpoPre55,expoMajor=_getExpoInfo.expoMajor;config=(0,_configPlugins.withXcodeProject)(config,function(xcodeConfig){var project=xcodeConfig.modResults,modRequest=xcodeConfig.modRequest;var _addFrameworkTarget=(0,_xcodeHelpers.addFrameworkTarget)(project,modRequest,props.ios),frameworkTargetUUID=_addFrameworkTarget.frameworkTargetUUID,targetAlreadyExists=_addFrameworkTarget.targetAlreadyExists;if(targetAlreadyExists){_logging.Logger.logDebug(`Skipping further Xcode modifications as framework target was already present`);return xcodeConfig;}(0,_xcodeHelpers.copyBundleReactNativePhase)(project,frameworkTargetUUID);if(isExpoPre55){_logging.Logger.logDebug(`Adding ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);(0,_xcodeHelpers.addExpoPre55ShellPatchScriptPhase)(modRequest,project,{frameworkName:props.ios.frameworkName,frameworkTargetUUID:frameworkTargetUUID});}else{_logging.Logger.logDebug(`Skipping ExpoModulesProvider patch phase for Expo SDK ${config.sdkVersion}`);}(0,_xcodeHelpers.addSourceFilesBuildPhase)(project,frameworkTargetUUID,props.ios);return xcodeConfig;});config=(0,_configPlugins.withPodfile)(config,function(podfileConfig){var frameworkName=props.ios.frameworkName;podfileConfig.modResults.contents=(0,_podfileHelpers.modifyPodfile)(podfileConfig.modResults.contents,frameworkName,expoMajor);return podfileConfig;});config=(0,_withIosFrameworkFiles.withIosFrameworkFiles)(config,props);return config;};
2
2
  //# sourceMappingURL=withBrownfieldIos.js.map