@expo/config-plugins 5.0.3 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/build/Plugin.types.d.ts +7 -7
  2. package/build/Plugin.types.js +0 -9
  3. package/build/Plugin.types.js.map +1 -1
  4. package/build/android/AllowBackup.js +0 -15
  5. package/build/android/AllowBackup.js.map +1 -1
  6. package/build/android/BuildProperties.js +2 -16
  7. package/build/android/BuildProperties.js.map +1 -1
  8. package/build/android/Colors.js +3 -25
  9. package/build/android/Colors.js.map +1 -1
  10. package/build/android/EasBuild.js +2 -22
  11. package/build/android/EasBuild.js.map +1 -1
  12. package/build/android/EasBuildGradleScript.js.map +1 -1
  13. package/build/android/GoogleMapsApiKey.js +0 -12
  14. package/build/android/GoogleMapsApiKey.js.map +1 -1
  15. package/build/android/GoogleServices.js +10 -48
  16. package/build/android/GoogleServices.js.map +1 -1
  17. package/build/android/IntentFilters.d.ts +1 -1
  18. package/build/android/IntentFilters.js +8 -24
  19. package/build/android/IntentFilters.js.map +1 -1
  20. package/build/android/Manifest.d.ts +19 -19
  21. package/build/android/Manifest.js +7 -66
  22. package/build/android/Manifest.js.map +1 -1
  23. package/build/android/Name.js +6 -27
  24. package/build/android/Name.js.map +1 -1
  25. package/build/android/Orientation.js +2 -12
  26. package/build/android/Orientation.js.map +1 -1
  27. package/build/android/Package.js +26 -111
  28. package/build/android/Package.js.map +1 -1
  29. package/build/android/Paths.d.ts +2 -2
  30. package/build/android/Paths.js +0 -47
  31. package/build/android/Paths.js.map +1 -1
  32. package/build/android/Permissions.js +8 -52
  33. package/build/android/Permissions.js.map +1 -1
  34. package/build/android/PrimaryColor.js +0 -18
  35. package/build/android/PrimaryColor.js.map +1 -1
  36. package/build/android/Properties.d.ts +1 -1
  37. package/build/android/Properties.js +0 -9
  38. package/build/android/Properties.js.map +1 -1
  39. package/build/android/Resources.d.ts +4 -4
  40. package/build/android/Resources.js +9 -29
  41. package/build/android/Resources.js.map +1 -1
  42. package/build/android/Scheme.d.ts +1 -1
  43. package/build/android/Scheme.js +13 -66
  44. package/build/android/Scheme.js.map +1 -1
  45. package/build/android/StatusBar.js +5 -33
  46. package/build/android/StatusBar.js.map +1 -1
  47. package/build/android/Strings.js +0 -14
  48. package/build/android/Strings.js.map +1 -1
  49. package/build/android/Styles.js +7 -34
  50. package/build/android/Styles.js.map +1 -1
  51. package/build/android/Updates.d.ts +2 -0
  52. package/build/android/Updates.js +50 -47
  53. package/build/android/Updates.js.map +1 -1
  54. package/build/android/Version.js +3 -29
  55. package/build/android/Version.js.map +1 -1
  56. package/build/android/WindowSoftInputMode.js +0 -14
  57. package/build/android/WindowSoftInputMode.js.map +1 -1
  58. package/build/android/codeMod.js +6 -22
  59. package/build/android/codeMod.js.map +1 -1
  60. package/build/android/index.js +0 -94
  61. package/build/android/index.js.map +1 -1
  62. package/build/index.js +2 -65
  63. package/build/index.js.map +1 -1
  64. package/build/ios/Bitcode.d.ts +1 -1
  65. package/build/ios/Bitcode.js +8 -28
  66. package/build/ios/Bitcode.js.map +1 -1
  67. package/build/ios/BuildProperties.js +2 -14
  68. package/build/ios/BuildProperties.js.map +1 -1
  69. package/build/ios/BuildScheme.js +2 -34
  70. package/build/ios/BuildScheme.js.map +1 -1
  71. package/build/ios/BundleIdentifier.js +13 -72
  72. package/build/ios/BundleIdentifier.js.map +1 -1
  73. package/build/ios/DeviceFamily.js +6 -24
  74. package/build/ios/DeviceFamily.js.map +1 -1
  75. package/build/ios/Entitlements.js +4 -45
  76. package/build/ios/Entitlements.js.map +1 -1
  77. package/build/ios/Google.d.ts +2 -2
  78. package/build/ios/Google.js +11 -66
  79. package/build/ios/Google.js.map +1 -1
  80. package/build/ios/IosConfig.types.d.ts +6 -11
  81. package/build/ios/IosConfig.types.js.map +1 -1
  82. package/build/ios/Locales.d.ts +3 -3
  83. package/build/ios/Locales.js +12 -43
  84. package/build/ios/Locales.js.map +1 -1
  85. package/build/ios/Maps.js +15 -53
  86. package/build/ios/Maps.js.map +1 -1
  87. package/build/ios/Name.js +7 -31
  88. package/build/ios/Name.js.map +1 -1
  89. package/build/ios/Orientation.js +2 -10
  90. package/build/ios/Orientation.js.map +1 -1
  91. package/build/ios/Paths.d.ts +2 -2
  92. package/build/ios/Paths.js +8 -73
  93. package/build/ios/Paths.js.map +1 -1
  94. package/build/ios/Permissions.js +1 -16
  95. package/build/ios/Permissions.js.map +1 -1
  96. package/build/ios/ProvisioningProfile.d.ts +1 -1
  97. package/build/ios/ProvisioningProfile.js +0 -18
  98. package/build/ios/ProvisioningProfile.js.map +1 -1
  99. package/build/ios/RequiresFullScreen.js +19 -31
  100. package/build/ios/RequiresFullScreen.js.map +1 -1
  101. package/build/ios/Scheme.js +12 -34
  102. package/build/ios/Scheme.js.map +1 -1
  103. package/build/ios/Swift.js +16 -50
  104. package/build/ios/Swift.js.map +1 -1
  105. package/build/ios/Target.js +0 -30
  106. package/build/ios/Target.js.map +1 -1
  107. package/build/ios/Updates.js +10 -49
  108. package/build/ios/Updates.js.map +1 -1
  109. package/build/ios/UsesNonExemptEncryption.js +4 -10
  110. package/build/ios/UsesNonExemptEncryption.js.map +1 -1
  111. package/build/ios/Version.js +4 -11
  112. package/build/ios/Version.js.map +1 -1
  113. package/build/ios/XcodeProjectFile.js +5 -23
  114. package/build/ios/XcodeProjectFile.js.map +1 -1
  115. package/build/ios/codeMod.js +19 -60
  116. package/build/ios/codeMod.js.map +1 -1
  117. package/build/ios/index.js +0 -97
  118. package/build/ios/index.js.map +1 -1
  119. package/build/ios/utils/Xcodeproj.d.ts +6 -6
  120. package/build/ios/utils/Xcodeproj.js +15 -101
  121. package/build/ios/utils/Xcodeproj.js.map +1 -1
  122. package/build/ios/utils/getInfoPlistPath.js +2 -15
  123. package/build/ios/utils/getInfoPlistPath.js.map +1 -1
  124. package/build/ios/utils/string.js +0 -1
  125. package/build/ios/utils/string.js.map +1 -1
  126. package/build/plugins/android-plugins.d.ts +2 -2
  127. package/build/plugins/android-plugins.js +11 -42
  128. package/build/plugins/android-plugins.js.map +1 -1
  129. package/build/plugins/createBaseMod.d.ts +3 -3
  130. package/build/plugins/createBaseMod.js +8 -25
  131. package/build/plugins/createBaseMod.js.map +1 -1
  132. package/build/plugins/ios-plugins.d.ts +2 -2
  133. package/build/plugins/ios-plugins.js +8 -48
  134. package/build/plugins/ios-plugins.js.map +1 -1
  135. package/build/plugins/mod-compiler.js +21 -72
  136. package/build/plugins/mod-compiler.js.map +1 -1
  137. package/build/plugins/withAndroidBaseMods.d.ts +1 -1
  138. package/build/plugins/withAndroidBaseMods.js +4 -89
  139. package/build/plugins/withAndroidBaseMods.js.map +1 -1
  140. package/build/plugins/withDangerousMod.js +0 -5
  141. package/build/plugins/withDangerousMod.js.map +1 -1
  142. package/build/plugins/withIosBaseMods.d.ts +1 -1
  143. package/build/plugins/withIosBaseMods.js +26 -118
  144. package/build/plugins/withIosBaseMods.js.map +1 -1
  145. package/build/plugins/withMod.d.ts +1 -1
  146. package/build/plugins/withMod.js +24 -59
  147. package/build/plugins/withMod.js.map +1 -1
  148. package/build/plugins/withPlugins.js +0 -9
  149. package/build/plugins/withPlugins.js.map +1 -1
  150. package/build/plugins/withRunOnce.js +3 -9
  151. package/build/plugins/withRunOnce.js.map +1 -1
  152. package/build/plugins/withStaticPlugin.js +21 -43
  153. package/build/plugins/withStaticPlugin.js.map +1 -1
  154. package/build/utils/BuildProperties.types.d.ts +2 -2
  155. package/build/utils/BuildProperties.types.js.map +1 -1
  156. package/build/utils/Updates.d.ts +3 -1
  157. package/build/utils/Updates.js +18 -77
  158. package/build/utils/Updates.js.map +1 -1
  159. package/build/utils/XML.d.ts +1 -1
  160. package/build/utils/XML.js +7 -44
  161. package/build/utils/XML.js.map +1 -1
  162. package/build/utils/commonCodeMod.js +2 -10
  163. package/build/utils/commonCodeMod.js.map +1 -1
  164. package/build/utils/errors.d.ts +1 -1
  165. package/build/utils/errors.js +3 -11
  166. package/build/utils/errors.js.map +1 -1
  167. package/build/utils/fs.js +1 -12
  168. package/build/utils/fs.js.map +1 -1
  169. package/build/utils/generateCode.d.ts +1 -1
  170. package/build/utils/generateCode.js +8 -25
  171. package/build/utils/generateCode.js.map +1 -1
  172. package/build/utils/history.d.ts +1 -1
  173. package/build/utils/history.js +0 -6
  174. package/build/utils/history.js.map +1 -1
  175. package/build/utils/matchBrackets.d.ts +3 -3
  176. package/build/utils/matchBrackets.js +2 -17
  177. package/build/utils/matchBrackets.js.map +1 -1
  178. package/build/utils/modules.js +0 -10
  179. package/build/utils/modules.js.map +1 -1
  180. package/build/utils/obj.js +0 -4
  181. package/build/utils/obj.js.map +1 -1
  182. package/build/utils/plugin-resolver.js +25 -69
  183. package/build/utils/plugin-resolver.js.map +1 -1
  184. package/build/utils/sortObject.js +4 -10
  185. package/build/utils/sortObject.js.map +1 -1
  186. package/build/utils/versions.js +0 -10
  187. package/build/utils/versions.js.map +1 -1
  188. package/build/utils/warnings.js +1 -9
  189. package/build/utils/warnings.js.map +1 -1
  190. package/package.json +5 -5
@@ -6,17 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.createAndroidManifestPlugin = createAndroidManifestPlugin;
7
7
  exports.createStringsXmlPlugin = createStringsXmlPlugin;
8
8
  exports.withStringsXml = exports.withSettingsGradle = exports.withProjectBuildGradle = exports.withMainApplication = exports.withMainActivity = exports.withGradleProperties = exports.withAppBuildGradle = exports.withAndroidStyles = exports.withAndroidManifest = exports.withAndroidColorsNight = exports.withAndroidColors = void 0;
9
-
10
9
  function _withMod() {
11
10
  const data = require("./withMod");
12
-
13
11
  _withMod = function () {
14
12
  return data;
15
13
  };
16
-
17
14
  return data;
18
15
  }
19
-
20
16
  /**
21
17
  * Helper method for creating mods from existing config functions.
22
18
  *
@@ -27,38 +23,32 @@ function createAndroidManifestPlugin(action, name) {
27
23
  config.modResults = await action(config, config.modResults);
28
24
  return config;
29
25
  });
30
-
31
26
  if (name) {
32
27
  Object.defineProperty(withUnknown, 'name', {
33
28
  value: name
34
29
  });
35
30
  }
36
-
37
31
  return withUnknown;
38
32
  }
39
-
40
33
  function createStringsXmlPlugin(action, name) {
41
34
  const withUnknown = config => withStringsXml(config, async config => {
42
35
  config.modResults = await action(config, config.modResults);
43
36
  return config;
44
37
  });
45
-
46
38
  if (name) {
47
39
  Object.defineProperty(withUnknown, 'name', {
48
40
  value: name
49
41
  });
50
42
  }
51
-
52
43
  return withUnknown;
53
44
  }
45
+
54
46
  /**
55
47
  * Provides the AndroidManifest.xml for modification.
56
48
  *
57
49
  * @param config
58
50
  * @param action
59
51
  */
60
-
61
-
62
52
  const withAndroidManifest = (config, action) => {
63
53
  return (0, _withMod().withMod)(config, {
64
54
  platform: 'android',
@@ -66,16 +56,14 @@ const withAndroidManifest = (config, action) => {
66
56
  action
67
57
  });
68
58
  };
59
+
69
60
  /**
70
61
  * Provides the strings.xml for modification.
71
62
  *
72
63
  * @param config
73
64
  * @param action
74
65
  */
75
-
76
-
77
66
  exports.withAndroidManifest = withAndroidManifest;
78
-
79
67
  const withStringsXml = (config, action) => {
80
68
  return (0, _withMod().withMod)(config, {
81
69
  platform: 'android',
@@ -83,16 +71,14 @@ const withStringsXml = (config, action) => {
83
71
  action
84
72
  });
85
73
  };
74
+
86
75
  /**
87
76
  * Provides the `android/app/src/main/res/values/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).
88
77
  *
89
78
  * @param config
90
79
  * @param action
91
80
  */
92
-
93
-
94
81
  exports.withStringsXml = withStringsXml;
95
-
96
82
  const withAndroidColors = (config, action) => {
97
83
  return (0, _withMod().withMod)(config, {
98
84
  platform: 'android',
@@ -100,16 +86,14 @@ const withAndroidColors = (config, action) => {
100
86
  action
101
87
  });
102
88
  };
89
+
103
90
  /**
104
91
  * Provides the `android/app/src/main/res/values-night/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).
105
92
  *
106
93
  * @param config
107
94
  * @param action
108
95
  */
109
-
110
-
111
96
  exports.withAndroidColors = withAndroidColors;
112
-
113
97
  const withAndroidColorsNight = (config, action) => {
114
98
  return (0, _withMod().withMod)(config, {
115
99
  platform: 'android',
@@ -117,16 +101,14 @@ const withAndroidColorsNight = (config, action) => {
117
101
  action
118
102
  });
119
103
  };
104
+
120
105
  /**
121
106
  * Provides the `android/app/src/main/res/values/styles.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).
122
107
  *
123
108
  * @param config
124
109
  * @param action
125
110
  */
126
-
127
-
128
111
  exports.withAndroidColorsNight = withAndroidColorsNight;
129
-
130
112
  const withAndroidStyles = (config, action) => {
131
113
  return (0, _withMod().withMod)(config, {
132
114
  platform: 'android',
@@ -134,16 +116,14 @@ const withAndroidStyles = (config, action) => {
134
116
  action
135
117
  });
136
118
  };
119
+
137
120
  /**
138
121
  * Provides the project MainActivity for modification.
139
122
  *
140
123
  * @param config
141
124
  * @param action
142
125
  */
143
-
144
-
145
126
  exports.withAndroidStyles = withAndroidStyles;
146
-
147
127
  const withMainActivity = (config, action) => {
148
128
  return (0, _withMod().withMod)(config, {
149
129
  platform: 'android',
@@ -151,16 +131,14 @@ const withMainActivity = (config, action) => {
151
131
  action
152
132
  });
153
133
  };
134
+
154
135
  /**
155
136
  * Provides the project MainApplication for modification.
156
137
  *
157
138
  * @param config
158
139
  * @param action
159
140
  */
160
-
161
-
162
141
  exports.withMainActivity = withMainActivity;
163
-
164
142
  const withMainApplication = (config, action) => {
165
143
  return (0, _withMod().withMod)(config, {
166
144
  platform: 'android',
@@ -168,16 +146,14 @@ const withMainApplication = (config, action) => {
168
146
  action
169
147
  });
170
148
  };
149
+
171
150
  /**
172
151
  * Provides the project /build.gradle for modification.
173
152
  *
174
153
  * @param config
175
154
  * @param action
176
155
  */
177
-
178
-
179
156
  exports.withMainApplication = withMainApplication;
180
-
181
157
  const withProjectBuildGradle = (config, action) => {
182
158
  return (0, _withMod().withMod)(config, {
183
159
  platform: 'android',
@@ -185,16 +161,14 @@ const withProjectBuildGradle = (config, action) => {
185
161
  action
186
162
  });
187
163
  };
164
+
188
165
  /**
189
166
  * Provides the app/build.gradle for modification.
190
167
  *
191
168
  * @param config
192
169
  * @param action
193
170
  */
194
-
195
-
196
171
  exports.withProjectBuildGradle = withProjectBuildGradle;
197
-
198
172
  const withAppBuildGradle = (config, action) => {
199
173
  return (0, _withMod().withMod)(config, {
200
174
  platform: 'android',
@@ -202,16 +176,14 @@ const withAppBuildGradle = (config, action) => {
202
176
  action
203
177
  });
204
178
  };
179
+
205
180
  /**
206
181
  * Provides the /settings.gradle for modification.
207
182
  *
208
183
  * @param config
209
184
  * @param action
210
185
  */
211
-
212
-
213
186
  exports.withAppBuildGradle = withAppBuildGradle;
214
-
215
187
  const withSettingsGradle = (config, action) => {
216
188
  return (0, _withMod().withMod)(config, {
217
189
  platform: 'android',
@@ -219,16 +191,14 @@ const withSettingsGradle = (config, action) => {
219
191
  action
220
192
  });
221
193
  };
194
+
222
195
  /**
223
196
  * Provides the /gradle.properties for modification.
224
197
  *
225
198
  * @param config
226
199
  * @param action
227
200
  */
228
-
229
-
230
201
  exports.withSettingsGradle = withSettingsGradle;
231
-
232
202
  const withGradleProperties = (config, action) => {
233
203
  return (0, _withMod().withMod)(config, {
234
204
  platform: 'android',
@@ -236,6 +206,5 @@ const withGradleProperties = (config, action) => {
236
206
  action
237
207
  });
238
208
  };
239
-
240
209
  exports.withGradleProperties = withGradleProperties;
241
210
  //# sourceMappingURL=android-plugins.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"android-plugins.js","names":["createAndroidManifestPlugin","action","name","withUnknown","config","withAndroidManifest","modResults","Object","defineProperty","value","createStringsXmlPlugin","withStringsXml","withMod","platform","mod","withAndroidColors","withAndroidColorsNight","withAndroidStyles","withMainActivity","withMainApplication","withProjectBuildGradle","withAppBuildGradle","withSettingsGradle","withGradleProperties"],"sources":["../../src/plugins/android-plugins.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { ConfigPlugin, Mod } from '../Plugin.types';\nimport { Manifest, Paths, Properties, Resources } from '../android';\nimport { withMod } from './withMod';\n\ntype OptionalPromise<T> = T | Promise<T>;\n\ntype MutateDataAction<T> = (expo: ExpoConfig, data: T) => OptionalPromise<T>;\n\n/**\n * Helper method for creating mods from existing config functions.\n *\n * @param action\n */\nexport function createAndroidManifestPlugin(\n action: MutateDataAction<Manifest.AndroidManifest>,\n name: string\n): ConfigPlugin {\n const withUnknown: ConfigPlugin = (config) =>\n withAndroidManifest(config, async (config) => {\n config.modResults = await action(config, config.modResults);\n return config;\n });\n if (name) {\n Object.defineProperty(withUnknown, 'name', {\n value: name,\n });\n }\n return withUnknown;\n}\n\nexport function createStringsXmlPlugin(\n action: MutateDataAction<Resources.ResourceXML>,\n name: string\n): ConfigPlugin {\n const withUnknown: ConfigPlugin = (config) =>\n withStringsXml(config, async (config) => {\n config.modResults = await action(config, config.modResults);\n return config;\n });\n if (name) {\n Object.defineProperty(withUnknown, 'name', {\n value: name,\n });\n }\n return withUnknown;\n}\n\n/**\n * Provides the AndroidManifest.xml for modification.\n *\n * @param config\n * @param action\n */\nexport const withAndroidManifest: ConfigPlugin<Mod<Manifest.AndroidManifest>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'manifest',\n action,\n });\n};\n\n/**\n * Provides the strings.xml for modification.\n *\n * @param config\n * @param action\n */\nexport const withStringsXml: ConfigPlugin<Mod<Resources.ResourceXML>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'strings',\n action,\n });\n};\n\n/**\n * Provides the `android/app/src/main/res/values/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n *\n * @param config\n * @param action\n */\nexport const withAndroidColors: ConfigPlugin<Mod<Resources.ResourceXML>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'colors',\n action,\n });\n};\n\n/**\n * Provides the `android/app/src/main/res/values-night/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n *\n * @param config\n * @param action\n */\nexport const withAndroidColorsNight: ConfigPlugin<Mod<Resources.ResourceXML>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'colorsNight',\n action,\n });\n};\n\n/**\n * Provides the `android/app/src/main/res/values/styles.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n *\n * @param config\n * @param action\n */\nexport const withAndroidStyles: ConfigPlugin<Mod<Resources.ResourceXML>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'styles',\n action,\n });\n};\n\n/**\n * Provides the project MainActivity for modification.\n *\n * @param config\n * @param action\n */\nexport const withMainActivity: ConfigPlugin<Mod<Paths.ApplicationProjectFile>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'mainActivity',\n action,\n });\n};\n\n/**\n * Provides the project MainApplication for modification.\n *\n * @param config\n * @param action\n */\nexport const withMainApplication: ConfigPlugin<Mod<Paths.ApplicationProjectFile>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'mainApplication',\n action,\n });\n};\n\n/**\n * Provides the project /build.gradle for modification.\n *\n * @param config\n * @param action\n */\nexport const withProjectBuildGradle: ConfigPlugin<Mod<Paths.GradleProjectFile>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'projectBuildGradle',\n action,\n });\n};\n\n/**\n * Provides the app/build.gradle for modification.\n *\n * @param config\n * @param action\n */\nexport const withAppBuildGradle: ConfigPlugin<Mod<Paths.GradleProjectFile>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'appBuildGradle',\n action,\n });\n};\n\n/**\n * Provides the /settings.gradle for modification.\n *\n * @param config\n * @param action\n */\nexport const withSettingsGradle: ConfigPlugin<Mod<Paths.GradleProjectFile>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'settingsGradle',\n action,\n });\n};\n\n/**\n * Provides the /gradle.properties for modification.\n *\n * @param config\n * @param action\n */\nexport const withGradleProperties: ConfigPlugin<Mod<Properties.PropertiesItem[]>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'gradleProperties',\n action,\n });\n};\n"],"mappings":";;;;;;;;;AAIA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAMA;AACA;AACA;AACA;AACA;AACO,SAASA,2BAAT,CACLC,MADK,EAELC,IAFK,EAGS;EACd,MAAMC,WAAyB,GAAIC,MAAD,IAChCC,mBAAmB,CAACD,MAAD,EAAS,MAAOA,MAAP,IAAkB;IAC5CA,MAAM,CAACE,UAAP,GAAoB,MAAML,MAAM,CAACG,MAAD,EAASA,MAAM,CAACE,UAAhB,CAAhC;IACA,OAAOF,MAAP;EACD,CAHkB,CADrB;;EAKA,IAAIF,IAAJ,EAAU;IACRK,MAAM,CAACC,cAAP,CAAsBL,WAAtB,EAAmC,MAAnC,EAA2C;MACzCM,KAAK,EAAEP;IADkC,CAA3C;EAGD;;EACD,OAAOC,WAAP;AACD;;AAEM,SAASO,sBAAT,CACLT,MADK,EAELC,IAFK,EAGS;EACd,MAAMC,WAAyB,GAAIC,MAAD,IAChCO,cAAc,CAACP,MAAD,EAAS,MAAOA,MAAP,IAAkB;IACvCA,MAAM,CAACE,UAAP,GAAoB,MAAML,MAAM,CAACG,MAAD,EAASA,MAAM,CAACE,UAAhB,CAAhC;IACA,OAAOF,MAAP;EACD,CAHa,CADhB;;EAKA,IAAIF,IAAJ,EAAU;IACRK,MAAM,CAACC,cAAP,CAAsBL,WAAtB,EAAmC,MAAnC,EAA2C;MACzCM,KAAK,EAAEP;IADkC,CAA3C;EAGD;;EACD,OAAOC,WAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,mBAAgE,GAAG,CAC9ED,MAD8E,EAE9EH,MAF8E,KAG3E;EACH,OAAO,IAAAW,kBAAA,EAAQR,MAAR,EAAgB;IACrBS,QAAQ,EAAE,SADW;IAErBC,GAAG,EAAE,UAFgB;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A;AACA;AACA;;;;;AACO,MAAMkB,mBAAoE,GAAG,CAClFf,MADkF,EAElFH,MAFkF,KAG/E;EACH,OAAO,IAAAW,kBAAA,EAAQR,MAAR,EAAgB;IACrBS,QAAQ,EAAE,SADW;IAErBC,GAAG,EAAE,iBAFgB;IAGrBb;EAHqB,CAAhB,CAAP;AAKD,CATM;AAWP;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMmB,sBAAkE,GAAG,CAChFhB,MADgF,EAEhFH,MAFgF,KAG7E;EACH,OAAO,IAAAW,kBAAA,EAAQR,MAAR,EAAgB;IACrBS,QAAQ,EAAE,SADW;IAErBC,GAAG,EAAE,oBAFgB;IAGrBb;EAHqB,CAAhB,CAAP;AAKD,CATM;AAWP;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMoB,kBAA8D,GAAG,CAACjB,MAAD,EAASH,MAAT,KAAoB;EAChG,OAAO,IAAAW,kBAAA,EAAQR,MAAR,EAAgB;IACrBS,QAAQ,EAAE,SADW;IAErBC,GAAG,EAAE,gBAFgB;IAGrBb;EAHqB,CAAhB,CAAP;AAKD,CANM;AAQP;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMqB,kBAA8D,GAAG,CAAClB,MAAD,EAASH,MAAT,KAAoB;EAChG,OAAO,IAAAW,kBAAA,EAAQR,MAAR,EAAgB;IACrBS,QAAQ,EAAE,SADW;IAErBC,GAAG,EAAE,gBAFgB;IAGrBb;EAHqB,CAAhB,CAAP;AAKD,CANM;AAQP;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMsB,oBAAoE,GAAG,CAClFnB,MADkF,EAElFH,MAFkF,KAG/E;EACH,OAAO,IAAAW,kBAAA,EAAQR,MAAR,EAAgB;IACrBS,QAAQ,EAAE,SADW;IAErBC,GAAG,EAAE,kBAFgB;IAGrBb;EAHqB,CAAhB,CAAP;AAKD,CATM"}
1
+ {"version":3,"file":"android-plugins.js","names":["createAndroidManifestPlugin","action","name","withUnknown","config","withAndroidManifest","modResults","Object","defineProperty","value","createStringsXmlPlugin","withStringsXml","withMod","platform","mod","withAndroidColors","withAndroidColorsNight","withAndroidStyles","withMainActivity","withMainApplication","withProjectBuildGradle","withAppBuildGradle","withSettingsGradle","withGradleProperties"],"sources":["../../src/plugins/android-plugins.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { ConfigPlugin, Mod } from '../Plugin.types';\nimport { Manifest, Paths, Properties, Resources } from '../android';\nimport { withMod } from './withMod';\n\ntype OptionalPromise<T> = T | Promise<T>;\n\ntype MutateDataAction<T> = (expo: ExpoConfig, data: T) => OptionalPromise<T>;\n\n/**\n * Helper method for creating mods from existing config functions.\n *\n * @param action\n */\nexport function createAndroidManifestPlugin(\n action: MutateDataAction<Manifest.AndroidManifest>,\n name: string\n): ConfigPlugin {\n const withUnknown: ConfigPlugin = (config) =>\n withAndroidManifest(config, async (config) => {\n config.modResults = await action(config, config.modResults);\n return config;\n });\n if (name) {\n Object.defineProperty(withUnknown, 'name', {\n value: name,\n });\n }\n return withUnknown;\n}\n\nexport function createStringsXmlPlugin(\n action: MutateDataAction<Resources.ResourceXML>,\n name: string\n): ConfigPlugin {\n const withUnknown: ConfigPlugin = (config) =>\n withStringsXml(config, async (config) => {\n config.modResults = await action(config, config.modResults);\n return config;\n });\n if (name) {\n Object.defineProperty(withUnknown, 'name', {\n value: name,\n });\n }\n return withUnknown;\n}\n\n/**\n * Provides the AndroidManifest.xml for modification.\n *\n * @param config\n * @param action\n */\nexport const withAndroidManifest: ConfigPlugin<Mod<Manifest.AndroidManifest>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'manifest',\n action,\n });\n};\n\n/**\n * Provides the strings.xml for modification.\n *\n * @param config\n * @param action\n */\nexport const withStringsXml: ConfigPlugin<Mod<Resources.ResourceXML>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'strings',\n action,\n });\n};\n\n/**\n * Provides the `android/app/src/main/res/values/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n *\n * @param config\n * @param action\n */\nexport const withAndroidColors: ConfigPlugin<Mod<Resources.ResourceXML>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'colors',\n action,\n });\n};\n\n/**\n * Provides the `android/app/src/main/res/values-night/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n *\n * @param config\n * @param action\n */\nexport const withAndroidColorsNight: ConfigPlugin<Mod<Resources.ResourceXML>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'colorsNight',\n action,\n });\n};\n\n/**\n * Provides the `android/app/src/main/res/values/styles.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n *\n * @param config\n * @param action\n */\nexport const withAndroidStyles: ConfigPlugin<Mod<Resources.ResourceXML>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'styles',\n action,\n });\n};\n\n/**\n * Provides the project MainActivity for modification.\n *\n * @param config\n * @param action\n */\nexport const withMainActivity: ConfigPlugin<Mod<Paths.ApplicationProjectFile>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'mainActivity',\n action,\n });\n};\n\n/**\n * Provides the project MainApplication for modification.\n *\n * @param config\n * @param action\n */\nexport const withMainApplication: ConfigPlugin<Mod<Paths.ApplicationProjectFile>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'mainApplication',\n action,\n });\n};\n\n/**\n * Provides the project /build.gradle for modification.\n *\n * @param config\n * @param action\n */\nexport const withProjectBuildGradle: ConfigPlugin<Mod<Paths.GradleProjectFile>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'projectBuildGradle',\n action,\n });\n};\n\n/**\n * Provides the app/build.gradle for modification.\n *\n * @param config\n * @param action\n */\nexport const withAppBuildGradle: ConfigPlugin<Mod<Paths.GradleProjectFile>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'appBuildGradle',\n action,\n });\n};\n\n/**\n * Provides the /settings.gradle for modification.\n *\n * @param config\n * @param action\n */\nexport const withSettingsGradle: ConfigPlugin<Mod<Paths.GradleProjectFile>> = (config, action) => {\n return withMod(config, {\n platform: 'android',\n mod: 'settingsGradle',\n action,\n });\n};\n\n/**\n * Provides the /gradle.properties for modification.\n *\n * @param config\n * @param action\n */\nexport const withGradleProperties: ConfigPlugin<Mod<Properties.PropertiesItem[]>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'android',\n mod: 'gradleProperties',\n action,\n });\n};\n"],"mappings":";;;;;;;;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AACO,SAASA,2BAA2B,CACzCC,MAAkD,EAClDC,IAAY,EACE;EACd,MAAMC,WAAyB,GAAIC,MAAM,IACvCC,mBAAmB,CAACD,MAAM,EAAE,MAAOA,MAAM,IAAK;IAC5CA,MAAM,CAACE,UAAU,GAAG,MAAML,MAAM,CAACG,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC3D,OAAOF,MAAM;EACf,CAAC,CAAC;EACJ,IAAIF,IAAI,EAAE;IACRK,MAAM,CAACC,cAAc,CAACL,WAAW,EAAE,MAAM,EAAE;MACzCM,KAAK,EAAEP;IACT,CAAC,CAAC;EACJ;EACA,OAAOC,WAAW;AACpB;AAEO,SAASO,sBAAsB,CACpCT,MAA+C,EAC/CC,IAAY,EACE;EACd,MAAMC,WAAyB,GAAIC,MAAM,IACvCO,cAAc,CAACP,MAAM,EAAE,MAAOA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,GAAG,MAAML,MAAM,CAACG,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC3D,OAAOF,MAAM;EACf,CAAC,CAAC;EACJ,IAAIF,IAAI,EAAE;IACRK,MAAM,CAACC,cAAc,CAACL,WAAW,EAAE,MAAM,EAAE;MACzCM,KAAK,EAAEP;IACT,CAAC,CAAC;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;IACnBC,GAAG,EAAE,kBAAkB;IACvBb;EACF,CAAC,CAAC;AACJ,CAAC;AAAC"}
@@ -1,7 +1,7 @@
1
1
  import { ConfigPlugin, ExportedConfig, ExportedConfigWithProps, ModPlatform } from '../Plugin.types';
2
2
  import { BaseModOptions } from './withMod';
3
- export declare type ForwardedBaseModOptions = Partial<Pick<BaseModOptions, 'saveToInternal' | 'skipEmptyMod'>>;
4
- export declare type BaseModProviderMethods<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions> = {
3
+ export type ForwardedBaseModOptions = Partial<Pick<BaseModOptions, 'saveToInternal' | 'skipEmptyMod'>>;
4
+ export type BaseModProviderMethods<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions> = {
5
5
  getFilePath: (config: ExportedConfigWithProps<ModType>, props: Props) => Promise<string> | string;
6
6
  read: (filePath: string, config: ExportedConfigWithProps<ModType>, props: Props) => Promise<ModType> | ModType;
7
7
  write: (filePath: string, config: ExportedConfigWithProps<ModType>, props: Props) => Promise<void> | void;
@@ -13,7 +13,7 @@ export declare type BaseModProviderMethods<ModType, Props extends ForwardedBaseM
13
13
  */
14
14
  isIntrospective?: boolean;
15
15
  };
16
- export declare type CreateBaseModProps<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions> = {
16
+ export type CreateBaseModProps<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions> = {
17
17
  methodName: string;
18
18
  platform: ModPlatform;
19
19
  modName: string;
@@ -8,31 +8,22 @@ exports.createBaseMod = createBaseMod;
8
8
  exports.createPlatformBaseMod = createPlatformBaseMod;
9
9
  exports.provider = provider;
10
10
  exports.withGeneratedBaseMods = withGeneratedBaseMods;
11
-
12
11
  function _debug() {
13
12
  const data = _interopRequireDefault(require("debug"));
14
-
15
13
  _debug = function () {
16
14
  return data;
17
15
  };
18
-
19
16
  return data;
20
17
  }
21
-
22
18
  function _withMod() {
23
19
  const data = require("./withMod");
24
-
25
20
  _withMod = function () {
26
21
  return data;
27
22
  };
28
-
29
23
  return data;
30
24
  }
31
-
32
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
-
34
26
  const debug = (0, _debug().default)('expo:config-plugins:base-mods');
35
-
36
27
  function createBaseMod({
37
28
  methodName,
38
29
  platform,
@@ -44,7 +35,6 @@ function createBaseMod({
44
35
  }) {
45
36
  const withUnknown = (config, _props) => {
46
37
  var _props$skipEmptyMod, _props$saveToInternal;
47
-
48
38
  const props = _props || {};
49
39
  return (0, _withMod().withBaseMod)(config, {
50
40
  platform,
@@ -53,7 +43,6 @@ function createBaseMod({
53
43
  saveToInternal: (_props$saveToInternal = props.saveToInternal) !== null && _props$saveToInternal !== void 0 ? _props$saveToInternal : false,
54
44
  isProvider: true,
55
45
  isIntrospective,
56
-
57
46
  async action({
58
47
  modRequest: {
59
48
  nextMod,
@@ -62,13 +51,15 @@ function createBaseMod({
62
51
  ...config
63
52
  }) {
64
53
  try {
65
- let results = { ...config,
54
+ let results = {
55
+ ...config,
66
56
  modRequest
67
57
  };
68
58
  const filePath = await getFilePath(results, props);
69
59
  debug(`mods.${platform}.${modName}: file path: ${filePath || '[skipped]'}`);
70
60
  const modResults = await read(filePath, results, props);
71
- results = await nextMod({ ...results,
61
+ results = await nextMod({
62
+ ...results,
72
63
  modResults,
73
64
  modRequest
74
65
  });
@@ -80,35 +71,29 @@ function createBaseMod({
80
71
  throw error;
81
72
  }
82
73
  }
83
-
84
74
  });
85
75
  };
86
-
87
76
  if (methodName) {
88
77
  Object.defineProperty(withUnknown, 'name', {
89
78
  value: methodName
90
79
  });
91
80
  }
92
-
93
81
  return withUnknown;
94
82
  }
95
-
96
83
  function assertModResults(results, platformName, modName) {
97
84
  // If the results came from a mod, they'd be in the form of [config, data].
98
85
  // Ensure the results are an array and omit the data since it should've been written by a data provider plugin.
99
- const ensuredResults = results; // Sanity check to help locate non compliant mods.
86
+ const ensuredResults = results;
100
87
 
88
+ // Sanity check to help locate non compliant mods.
101
89
  if (!ensuredResults || typeof ensuredResults !== 'object' || !(ensuredResults !== null && ensuredResults !== void 0 && ensuredResults.mods)) {
102
90
  throw new Error(`Mod \`mods.${platformName}.${modName}\` evaluated to an object that is not a valid project config. Instead got: ${JSON.stringify(ensuredResults)}`);
103
91
  }
104
-
105
92
  return ensuredResults;
106
93
  }
107
-
108
94
  function upperFirst(name) {
109
95
  return name.charAt(0).toUpperCase() + name.slice(1);
110
96
  }
111
-
112
97
  function createPlatformBaseMod({
113
98
  modName,
114
99
  ...props
@@ -121,15 +106,13 @@ function createPlatformBaseMod({
121
106
  ...props
122
107
  });
123
108
  }
124
- /** A TS wrapper for creating provides */
125
-
126
109
 
110
+ /** A TS wrapper for creating provides */
127
111
  function provider(props) {
128
112
  return props;
129
113
  }
130
- /** Plugin to create and append base mods from file providers */
131
-
132
114
 
115
+ /** Plugin to create and append base mods from file providers */
133
116
  function withGeneratedBaseMods(config, {
134
117
  platform,
135
118
  providers,
@@ -1 +1 @@
1
- {"version":3,"file":"createBaseMod.js","names":["debug","Debug","createBaseMod","methodName","platform","modName","getFilePath","read","write","isIntrospective","withUnknown","config","_props","props","withBaseMod","mod","skipEmptyMod","saveToInternal","isProvider","action","modRequest","nextMod","results","filePath","modResults","assertModResults","error","message","Object","defineProperty","value","platformName","ensuredResults","mods","Error","JSON","stringify","upperFirst","name","charAt","toUpperCase","slice","createPlatformBaseMod","provider","withGeneratedBaseMods","providers","entries","reduce","baseMod"],"sources":["../../src/plugins/createBaseMod.ts"],"sourcesContent":["import Debug from 'debug';\n\nimport {\n ConfigPlugin,\n ExportedConfig,\n ExportedConfigWithProps,\n ModPlatform,\n} from '../Plugin.types';\nimport { BaseModOptions, withBaseMod } from './withMod';\n\nconst debug = Debug('expo:config-plugins:base-mods');\n\nexport type ForwardedBaseModOptions = Partial<\n Pick<BaseModOptions, 'saveToInternal' | 'skipEmptyMod'>\n>;\n\nexport type BaseModProviderMethods<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n> = {\n getFilePath: (config: ExportedConfigWithProps<ModType>, props: Props) => Promise<string> | string;\n read: (\n filePath: string,\n config: ExportedConfigWithProps<ModType>,\n props: Props\n ) => Promise<ModType> | ModType;\n write: (\n filePath: string,\n config: ExportedConfigWithProps<ModType>,\n props: Props\n ) => Promise<void> | void;\n /**\n * If the mod supports introspection, and avoids making any filesystem modifications during compilation.\n * By enabling, this mod, and all of its descendants will be run in introspection mode.\n * This should only be used for static files like JSON or XML, and not for application files that require regexes,\n * or complex static files that require other files to be generated like Xcode `.pbxproj`.\n */\n isIntrospective?: boolean;\n};\n\nexport type CreateBaseModProps<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n> = {\n methodName: string;\n platform: ModPlatform;\n modName: string;\n} & BaseModProviderMethods<ModType, Props>;\n\nexport function createBaseMod<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n>({\n methodName,\n platform,\n modName,\n getFilePath,\n read,\n write,\n isIntrospective,\n}: CreateBaseModProps<ModType, Props>): ConfigPlugin<Props | void> {\n const withUnknown: ConfigPlugin<Props | void> = (config, _props) => {\n const props = _props || ({} as Props);\n return withBaseMod<ModType>(config, {\n platform,\n mod: modName,\n skipEmptyMod: props.skipEmptyMod ?? true,\n saveToInternal: props.saveToInternal ?? false,\n isProvider: true,\n isIntrospective,\n async action({ modRequest: { nextMod, ...modRequest }, ...config }) {\n try {\n let results: ExportedConfigWithProps<ModType> = {\n ...config,\n modRequest,\n };\n\n const filePath = await getFilePath(results, props);\n debug(`mods.${platform}.${modName}: file path: ${filePath || '[skipped]'}`);\n const modResults = await read(filePath, results, props);\n\n results = await nextMod!({\n ...results,\n modResults,\n modRequest,\n });\n\n assertModResults(results, modRequest.platform, modRequest.modName);\n\n await write(filePath, results, props);\n return results;\n } catch (error: any) {\n error.message = `[${platform}.${modName}]: ${methodName}: ${error.message}`;\n throw error;\n }\n },\n });\n };\n\n if (methodName) {\n Object.defineProperty(withUnknown, 'name', {\n value: methodName,\n });\n }\n\n return withUnknown;\n}\n\nexport function assertModResults(results: any, platformName: string, modName: string) {\n // If the results came from a mod, they'd be in the form of [config, data].\n // Ensure the results are an array and omit the data since it should've been written by a data provider plugin.\n const ensuredResults = results;\n\n // Sanity check to help locate non compliant mods.\n if (!ensuredResults || typeof ensuredResults !== 'object' || !ensuredResults?.mods) {\n throw new Error(\n `Mod \\`mods.${platformName}.${modName}\\` evaluated to an object that is not a valid project config. Instead got: ${JSON.stringify(\n ensuredResults\n )}`\n );\n }\n return ensuredResults;\n}\n\nfunction upperFirst(name: string): string {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}\n\nexport function createPlatformBaseMod<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n>({ modName, ...props }: Omit<CreateBaseModProps<ModType, Props>, 'methodName'>) {\n // Generate the function name to ensure it's uniform and also to improve stack traces.\n const methodName = `with${upperFirst(props.platform)}${upperFirst(modName)}BaseMod`;\n return createBaseMod<ModType, Props>({\n methodName,\n modName,\n ...props,\n });\n}\n\n/** A TS wrapper for creating provides */\nexport function provider<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions>(\n props: BaseModProviderMethods<ModType, Props>\n) {\n return props;\n}\n\n/** Plugin to create and append base mods from file providers */\nexport function withGeneratedBaseMods<ModName extends string>(\n config: ExportedConfig,\n {\n platform,\n providers,\n ...props\n }: ForwardedBaseModOptions & {\n platform: ModPlatform;\n providers: Partial<Record<ModName, BaseModProviderMethods<any, any>>>;\n }\n): ExportedConfig {\n return Object.entries(providers).reduce((config, [modName, value]) => {\n const baseMod = createPlatformBaseMod({ platform, modName, ...(value as any) });\n return baseMod(config, props);\n }, config);\n}\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAQA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEA,MAAMA,KAAK,GAAG,IAAAC,gBAAA,EAAM,+BAAN,CAAd;;AAuCO,SA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L;EACA,OAAOA,KAAP;AACD;AAED;;;AACO,SAAS+B,qBAAT,CACLjC,MADK,EAEL;EACEP,QADF;EAEEyC,SAFF;EAGE,GAAGhC;AAHL,CAFK,EAUW;EAChB,OAAOe,MAAM,CAACkB,OAAP,CAAeD,SAAf,EAA0BE,MAA1B,CAAiC,CAACpC,MAAD,EAAS,CAACN,OAAD,EAAUyB,KAAV,CAAT,KAA8B;IACpE,MAAMkB,OAAO,GAAGN,qBAAqB,CAAC;MAAEtC,QAAF;MAAYC,OAAZ;MAAqB,GAAIyB;IAAzB,CAAD,CAArC;IACA,OAAOkB,OAAO,CAACrC,MAAD,EAASE,KAAT,CAAd;EACD,CAHM,EAGJF,MAHI,CAAP;AAID"}
1
+ {"version":3,"file":"createBaseMod.js","names":["debug","Debug","createBaseMod","methodName","platform","modName","getFilePath","read","write","isIntrospective","withUnknown","config","_props","props","withBaseMod","mod","skipEmptyMod","saveToInternal","isProvider","action","modRequest","nextMod","results","filePath","modResults","assertModResults","error","message","Object","defineProperty","value","platformName","ensuredResults","mods","Error","JSON","stringify","upperFirst","name","charAt","toUpperCase","slice","createPlatformBaseMod","provider","withGeneratedBaseMods","providers","entries","reduce","baseMod"],"sources":["../../src/plugins/createBaseMod.ts"],"sourcesContent":["import Debug from 'debug';\n\nimport {\n ConfigPlugin,\n ExportedConfig,\n ExportedConfigWithProps,\n ModPlatform,\n} from '../Plugin.types';\nimport { BaseModOptions, withBaseMod } from './withMod';\n\nconst debug = Debug('expo:config-plugins:base-mods');\n\nexport type ForwardedBaseModOptions = Partial<\n Pick<BaseModOptions, 'saveToInternal' | 'skipEmptyMod'>\n>;\n\nexport type BaseModProviderMethods<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n> = {\n getFilePath: (config: ExportedConfigWithProps<ModType>, props: Props) => Promise<string> | string;\n read: (\n filePath: string,\n config: ExportedConfigWithProps<ModType>,\n props: Props\n ) => Promise<ModType> | ModType;\n write: (\n filePath: string,\n config: ExportedConfigWithProps<ModType>,\n props: Props\n ) => Promise<void> | void;\n /**\n * If the mod supports introspection, and avoids making any filesystem modifications during compilation.\n * By enabling, this mod, and all of its descendants will be run in introspection mode.\n * This should only be used for static files like JSON or XML, and not for application files that require regexes,\n * or complex static files that require other files to be generated like Xcode `.pbxproj`.\n */\n isIntrospective?: boolean;\n};\n\nexport type CreateBaseModProps<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n> = {\n methodName: string;\n platform: ModPlatform;\n modName: string;\n} & BaseModProviderMethods<ModType, Props>;\n\nexport function createBaseMod<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n>({\n methodName,\n platform,\n modName,\n getFilePath,\n read,\n write,\n isIntrospective,\n}: CreateBaseModProps<ModType, Props>): ConfigPlugin<Props | void> {\n const withUnknown: ConfigPlugin<Props | void> = (config, _props) => {\n const props = _props || ({} as Props);\n return withBaseMod<ModType>(config, {\n platform,\n mod: modName,\n skipEmptyMod: props.skipEmptyMod ?? true,\n saveToInternal: props.saveToInternal ?? false,\n isProvider: true,\n isIntrospective,\n async action({ modRequest: { nextMod, ...modRequest }, ...config }) {\n try {\n let results: ExportedConfigWithProps<ModType> = {\n ...config,\n modRequest,\n };\n\n const filePath = await getFilePath(results, props);\n debug(`mods.${platform}.${modName}: file path: ${filePath || '[skipped]'}`);\n const modResults = await read(filePath, results, props);\n\n results = await nextMod!({\n ...results,\n modResults,\n modRequest,\n });\n\n assertModResults(results, modRequest.platform, modRequest.modName);\n\n await write(filePath, results, props);\n return results;\n } catch (error: any) {\n error.message = `[${platform}.${modName}]: ${methodName}: ${error.message}`;\n throw error;\n }\n },\n });\n };\n\n if (methodName) {\n Object.defineProperty(withUnknown, 'name', {\n value: methodName,\n });\n }\n\n return withUnknown;\n}\n\nexport function assertModResults(results: any, platformName: string, modName: string) {\n // If the results came from a mod, they'd be in the form of [config, data].\n // Ensure the results are an array and omit the data since it should've been written by a data provider plugin.\n const ensuredResults = results;\n\n // Sanity check to help locate non compliant mods.\n if (!ensuredResults || typeof ensuredResults !== 'object' || !ensuredResults?.mods) {\n throw new Error(\n `Mod \\`mods.${platformName}.${modName}\\` evaluated to an object that is not a valid project config. Instead got: ${JSON.stringify(\n ensuredResults\n )}`\n );\n }\n return ensuredResults;\n}\n\nfunction upperFirst(name: string): string {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}\n\nexport function createPlatformBaseMod<\n ModType,\n Props extends ForwardedBaseModOptions = ForwardedBaseModOptions\n>({ modName, ...props }: Omit<CreateBaseModProps<ModType, Props>, 'methodName'>) {\n // Generate the function name to ensure it's uniform and also to improve stack traces.\n const methodName = `with${upperFirst(props.platform)}${upperFirst(modName)}BaseMod`;\n return createBaseMod<ModType, Props>({\n methodName,\n modName,\n ...props,\n });\n}\n\n/** A TS wrapper for creating provides */\nexport function provider<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions>(\n props: BaseModProviderMethods<ModType, Props>\n) {\n return props;\n}\n\n/** Plugin to create and append base mods from file providers */\nexport function withGeneratedBaseMods<ModName extends string>(\n config: ExportedConfig,\n {\n platform,\n providers,\n ...props\n }: ForwardedBaseModOptions & {\n platform: ModPlatform;\n providers: Partial<Record<ModName, BaseModProviderMethods<any, any>>>;\n }\n): ExportedConfig {\n return Object.entries(providers).reduce((config, [modName, value]) => {\n const baseMod = createPlatformBaseMod({ platform, modName, ...(value as any) });\n return baseMod(config, props);\n }, config);\n}\n"],"mappings":";;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAwD;AAExD,MAAMA,KAAK,GAAG,IAAAC,gBAAK,EAAC,+BAA+B,CAAC;AAuC7C,SAASC,aAAa,CAG3B;EACAC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC,WAAW;EACXC,IAAI;EACJC,KAAK;EACLC;AACkC,CAAC,EAA8B;EACjE,MAAMC,WAAuC,GAAG,CAACC,MAAM,EA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B,KAAK,CAAC,KAAK;IACpE,MAAMkB,OAAO,GAAGN,qBAAqB,CAAC;MAAEtC,QAAQ;MAAEC,OAAO;MAAE,GAAIyB;IAAc,CAAC,CAAC;IAC/E,OAAOkB,OAAO,CAACrC,MAAM,EAAEE,KAAK,CAAC;EAC/B,CAAC,EAAEF,MAAM,CAAC;AACZ"}
@@ -4,7 +4,7 @@ import type { XcodeProject } from 'xcode';
4
4
  import type { ConfigPlugin, Mod } from '../Plugin.types';
5
5
  import type { ExpoPlist, InfoPlist } from '../ios/IosConfig.types';
6
6
  import type { AppDelegateProjectFile } from '../ios/Paths';
7
- declare type MutateInfoPlistAction = (expo: ExpoConfig, infoPlist: InfoPlist) => Promise<InfoPlist> | InfoPlist;
7
+ type MutateInfoPlistAction = (expo: ExpoConfig, infoPlist: InfoPlist) => Promise<InfoPlist> | InfoPlist;
8
8
  /**
9
9
  * Helper method for creating mods from existing config functions.
10
10
  *
@@ -16,7 +16,7 @@ export declare function createInfoPlistPluginWithPropertyGuard(action: MutateInf
16
16
  expoConfigProperty: string;
17
17
  expoPropertyGetter?: (config: ExpoConfig) => string;
18
18
  }, name?: string): ConfigPlugin;
19
- declare type MutateEntitlementsPlistAction = (expo: ExpoConfig, entitlements: JSONObject) => JSONObject;
19
+ type MutateEntitlementsPlistAction = (expo: ExpoConfig, entitlements: JSONObject) => JSONObject;
20
20
  /**
21
21
  * Helper method for creating mods from existing config functions.
22
22
  *