@expo/config-plugins 57.0.1 → 57.0.3

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 (175) hide show
  1. package/build/Plugin.types.js +3 -9
  2. package/build/Plugin.types.js.map +1 -1
  3. package/build/android/AllowBackup.js +1 -3
  4. package/build/android/AllowBackup.js.map +1 -1
  5. package/build/android/BuildProperties.js +1 -3
  6. package/build/android/BuildProperties.js.map +1 -1
  7. package/build/android/Colors.js +1 -3
  8. package/build/android/Colors.js.map +1 -1
  9. package/build/android/EasBuild.js +1 -3
  10. package/build/android/EasBuild.js.map +1 -1
  11. package/build/android/EasBuildGradleScript.js +1 -3
  12. package/build/android/EasBuildGradleScript.js.map +1 -1
  13. package/build/android/GoogleMapsApiKey.js +1 -3
  14. package/build/android/GoogleMapsApiKey.js.map +1 -1
  15. package/build/android/GoogleServices.js +1 -3
  16. package/build/android/GoogleServices.js.map +1 -1
  17. package/build/android/IntentFilters.js +1 -3
  18. package/build/android/IntentFilters.js.map +1 -1
  19. package/build/android/Locales.js +13 -8
  20. package/build/android/Locales.js.map +1 -1
  21. package/build/android/Manifest.js +1 -3
  22. package/build/android/Manifest.js.map +1 -1
  23. package/build/android/Name.js +1 -3
  24. package/build/android/Name.js.map +1 -1
  25. package/build/android/Orientation.js +1 -3
  26. package/build/android/Orientation.js.map +1 -1
  27. package/build/android/Package.js +1 -3
  28. package/build/android/Package.js.map +1 -1
  29. package/build/android/Paths.js +1 -3
  30. package/build/android/Paths.js.map +1 -1
  31. package/build/android/Permissions.js +1 -3
  32. package/build/android/Permissions.js.map +1 -1
  33. package/build/android/PredictiveBackGesture.js +1 -3
  34. package/build/android/PredictiveBackGesture.js.map +1 -1
  35. package/build/android/PrimaryColor.js +1 -3
  36. package/build/android/PrimaryColor.js.map +1 -1
  37. package/build/android/Properties.js +1 -3
  38. package/build/android/Properties.js.map +1 -1
  39. package/build/android/Resources.js +1 -3
  40. package/build/android/Resources.js.map +1 -1
  41. package/build/android/Scheme.js +1 -3
  42. package/build/android/Scheme.js.map +1 -1
  43. package/build/android/Strings.js +1 -3
  44. package/build/android/Strings.js.map +1 -1
  45. package/build/android/Styles.js +1 -3
  46. package/build/android/Styles.js.map +1 -1
  47. package/build/android/SystemBars.js +1 -3
  48. package/build/android/SystemBars.js.map +1 -1
  49. package/build/android/Updates.js +1 -3
  50. package/build/android/Updates.js.map +1 -1
  51. package/build/android/Version.js +1 -3
  52. package/build/android/Version.js.map +1 -1
  53. package/build/android/WindowSoftInputMode.js +1 -3
  54. package/build/android/WindowSoftInputMode.js.map +1 -1
  55. package/build/android/codeMod.js +1 -3
  56. package/build/android/codeMod.js.map +1 -1
  57. package/build/android/index.js +1 -3
  58. package/build/android/index.js.map +1 -1
  59. package/build/index.js +44 -212
  60. package/build/index.js.map +1 -1
  61. package/build/ios/Bitcode.js +1 -3
  62. package/build/ios/Bitcode.js.map +1 -1
  63. package/build/ios/BuildProperties.js +1 -3
  64. package/build/ios/BuildProperties.js.map +1 -1
  65. package/build/ios/BuildScheme.js +1 -3
  66. package/build/ios/BuildScheme.js.map +1 -1
  67. package/build/ios/BundleIdentifier.js +1 -3
  68. package/build/ios/BundleIdentifier.js.map +1 -1
  69. package/build/ios/DeploymentTarget.js +1 -3
  70. package/build/ios/DeploymentTarget.js.map +1 -1
  71. package/build/ios/DevelopmentTeam.js +1 -3
  72. package/build/ios/DevelopmentTeam.js.map +1 -1
  73. package/build/ios/DeviceFamily.js +1 -3
  74. package/build/ios/DeviceFamily.js.map +1 -1
  75. package/build/ios/Entitlements.js +1 -3
  76. package/build/ios/Entitlements.js.map +1 -1
  77. package/build/ios/Google.js +1 -3
  78. package/build/ios/Google.js.map +1 -1
  79. package/build/ios/Locales.js +1 -3
  80. package/build/ios/Locales.js.map +1 -1
  81. package/build/ios/Maps.js +1 -3
  82. package/build/ios/Maps.js.map +1 -1
  83. package/build/ios/Name.js +1 -3
  84. package/build/ios/Name.js.map +1 -1
  85. package/build/ios/Orientation.js +1 -3
  86. package/build/ios/Orientation.js.map +1 -1
  87. package/build/ios/Paths.js +1 -3
  88. package/build/ios/Paths.js.map +1 -1
  89. package/build/ios/Permissions.js +1 -3
  90. package/build/ios/Permissions.js.map +1 -1
  91. package/build/ios/PrivacyInfo.js +1 -3
  92. package/build/ios/PrivacyInfo.js.map +1 -1
  93. package/build/ios/ProvisioningProfile.js +1 -3
  94. package/build/ios/ProvisioningProfile.js.map +1 -1
  95. package/build/ios/RequiresFullScreen.js +1 -3
  96. package/build/ios/RequiresFullScreen.js.map +1 -1
  97. package/build/ios/Scheme.js +1 -3
  98. package/build/ios/Scheme.js.map +1 -1
  99. package/build/ios/Target.js +1 -3
  100. package/build/ios/Target.js.map +1 -1
  101. package/build/ios/Updates.js +1 -3
  102. package/build/ios/Updates.js.map +1 -1
  103. package/build/ios/UsesNonExemptEncryption.js +1 -3
  104. package/build/ios/UsesNonExemptEncryption.js.map +1 -1
  105. package/build/ios/Version.js +1 -3
  106. package/build/ios/Version.js.map +1 -1
  107. package/build/ios/XcodeProjectFile.js +1 -3
  108. package/build/ios/XcodeProjectFile.js.map +1 -1
  109. package/build/ios/codeMod.js +1 -3
  110. package/build/ios/codeMod.js.map +1 -1
  111. package/build/ios/index.js +1 -3
  112. package/build/ios/utils/Xcodeproj.js +1 -3
  113. package/build/ios/utils/Xcodeproj.js.map +1 -1
  114. package/build/ios/utils/getInfoPlistPath.js +1 -3
  115. package/build/ios/utils/getInfoPlistPath.js.map +1 -1
  116. package/build/ios/utils/string.js +1 -3
  117. package/build/ios/utils/string.js.map +1 -1
  118. package/build/plugins/android-plugins.js +1 -3
  119. package/build/plugins/android-plugins.js.map +1 -1
  120. package/build/plugins/createBaseMod.js +1 -3
  121. package/build/plugins/createBaseMod.js.map +1 -1
  122. package/build/plugins/ios-plugins.js +1 -3
  123. package/build/plugins/ios-plugins.js.map +1 -1
  124. package/build/plugins/mod-compiler.js +1 -3
  125. package/build/plugins/mod-compiler.js.map +1 -1
  126. package/build/plugins/withAndroidBaseMods.js +1 -3
  127. package/build/plugins/withAndroidBaseMods.js.map +1 -1
  128. package/build/plugins/withDangerousMod.js +1 -3
  129. package/build/plugins/withDangerousMod.js.map +1 -1
  130. package/build/plugins/withFinalizedMod.js +1 -3
  131. package/build/plugins/withFinalizedMod.js.map +1 -1
  132. package/build/plugins/withIosBaseMods.js +1 -3
  133. package/build/plugins/withIosBaseMods.js.map +1 -1
  134. package/build/plugins/withMod.js +1 -3
  135. package/build/plugins/withMod.js.map +1 -1
  136. package/build/plugins/withPlugins.js +1 -3
  137. package/build/plugins/withPlugins.js.map +1 -1
  138. package/build/plugins/withRunOnce.js +1 -3
  139. package/build/plugins/withRunOnce.js.map +1 -1
  140. package/build/plugins/withStaticPlugin.js +1 -3
  141. package/build/plugins/withStaticPlugin.js.map +1 -1
  142. package/build/utils/Updates.d.ts +10 -7
  143. package/build/utils/Updates.js +11 -6
  144. package/build/utils/Updates.js.map +1 -1
  145. package/build/utils/XML.js +1 -3
  146. package/build/utils/XML.js.map +1 -1
  147. package/build/utils/commonCodeMod.js +1 -3
  148. package/build/utils/commonCodeMod.js.map +1 -1
  149. package/build/utils/errors.js +1 -3
  150. package/build/utils/errors.js.map +1 -1
  151. package/build/utils/fs.js +1 -3
  152. package/build/utils/fs.js.map +1 -1
  153. package/build/utils/generateCode.js +1 -3
  154. package/build/utils/generateCode.js.map +1 -1
  155. package/build/utils/glob.js +1 -3
  156. package/build/utils/glob.js.map +1 -1
  157. package/build/utils/history.js +1 -3
  158. package/build/utils/history.js.map +1 -1
  159. package/build/utils/locales.js +1 -3
  160. package/build/utils/locales.js.map +1 -1
  161. package/build/utils/matchBrackets.js +1 -3
  162. package/build/utils/matchBrackets.js.map +1 -1
  163. package/build/utils/modules.js +1 -3
  164. package/build/utils/modules.js.map +1 -1
  165. package/build/utils/obj.js +1 -3
  166. package/build/utils/obj.js.map +1 -1
  167. package/build/utils/plugin-resolver.js +1 -3
  168. package/build/utils/plugin-resolver.js.map +1 -1
  169. package/build/utils/sortObject.js +1 -3
  170. package/build/utils/sortObject.js.map +1 -1
  171. package/build/utils/validations.js +1 -3
  172. package/build/utils/validations.js.map +1 -1
  173. package/build/utils/warnings.js +1 -3
  174. package/build/utils/warnings.js.map +1 -1
  175. package/package.json +3 -3
package/build/index.js CHANGED
@@ -1,17 +1,7 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  var _exportNames = {
7
- BaseMods: true,
8
- AndroidConfig: true,
9
- IOSConfig: true,
10
- XML: true,
11
- CodeGenerator: true,
12
- History: true,
13
- WarningAggregator: true,
14
- Updates: true,
15
5
  withPlugins: true,
16
6
  withRunOnce: true,
17
7
  createRunOncePlugin: true,
@@ -43,202 +33,17 @@ var _exportNames = {
43
33
  compileModsAsync: true,
44
34
  withDefaultBaseMods: true,
45
35
  evalModsAsync: true,
46
- PluginError: true
36
+ PluginError: true,
37
+ BaseMods: true,
38
+ AndroidConfig: true,
39
+ IOSConfig: true,
40
+ XML: true,
41
+ CodeGenerator: true,
42
+ History: true,
43
+ WarningAggregator: true,
44
+ Updates: true
47
45
  };
48
- exports.IOSConfig = exports.History = exports.CodeGenerator = exports.BaseMods = exports.AndroidConfig = void 0;
49
- Object.defineProperty(exports, "PluginError", {
50
- enumerable: true,
51
- get: function () {
52
- return _errors().PluginError;
53
- }
54
- });
55
- exports.XML = exports.WarningAggregator = exports.Updates = void 0;
56
- Object.defineProperty(exports, "assertValidAndroidAssetName", {
57
- enumerable: true,
58
- get: function () {
59
- return _validations().assertValidAndroidAssetName;
60
- }
61
- });
62
- Object.defineProperty(exports, "compileModsAsync", {
63
- enumerable: true,
64
- get: function () {
65
- return _modCompiler().compileModsAsync;
66
- }
67
- });
68
- Object.defineProperty(exports, "createRunOncePlugin", {
69
- enumerable: true,
70
- get: function () {
71
- return _withRunOnce().createRunOncePlugin;
72
- }
73
- });
74
- Object.defineProperty(exports, "evalModsAsync", {
75
- enumerable: true,
76
- get: function () {
77
- return _modCompiler().evalModsAsync;
78
- }
79
- });
80
- Object.defineProperty(exports, "isValidAndroidAssetName", {
81
- enumerable: true,
82
- get: function () {
83
- return _validations().isValidAndroidAssetName;
84
- }
85
- });
86
- Object.defineProperty(exports, "withAndroidColors", {
87
- enumerable: true,
88
- get: function () {
89
- return _androidPlugins().withAndroidColors;
90
- }
91
- });
92
- Object.defineProperty(exports, "withAndroidColorsNight", {
93
- enumerable: true,
94
- get: function () {
95
- return _androidPlugins().withAndroidColorsNight;
96
- }
97
- });
98
- Object.defineProperty(exports, "withAndroidManifest", {
99
- enumerable: true,
100
- get: function () {
101
- return _androidPlugins().withAndroidManifest;
102
- }
103
- });
104
- Object.defineProperty(exports, "withAndroidStyles", {
105
- enumerable: true,
106
- get: function () {
107
- return _androidPlugins().withAndroidStyles;
108
- }
109
- });
110
- Object.defineProperty(exports, "withAppBuildGradle", {
111
- enumerable: true,
112
- get: function () {
113
- return _androidPlugins().withAppBuildGradle;
114
- }
115
- });
116
- Object.defineProperty(exports, "withAppDelegate", {
117
- enumerable: true,
118
- get: function () {
119
- return _iosPlugins().withAppDelegate;
120
- }
121
- });
122
- Object.defineProperty(exports, "withBaseMod", {
123
- enumerable: true,
124
- get: function () {
125
- return _withMod().withBaseMod;
126
- }
127
- });
128
- Object.defineProperty(exports, "withDangerousMod", {
129
- enumerable: true,
130
- get: function () {
131
- return _withDangerousMod().withDangerousMod;
132
- }
133
- });
134
- Object.defineProperty(exports, "withDefaultBaseMods", {
135
- enumerable: true,
136
- get: function () {
137
- return _modCompiler().withDefaultBaseMods;
138
- }
139
- });
140
- Object.defineProperty(exports, "withEntitlementsPlist", {
141
- enumerable: true,
142
- get: function () {
143
- return _iosPlugins().withEntitlementsPlist;
144
- }
145
- });
146
- Object.defineProperty(exports, "withExpoPlist", {
147
- enumerable: true,
148
- get: function () {
149
- return _iosPlugins().withExpoPlist;
150
- }
151
- });
152
- Object.defineProperty(exports, "withFinalizedMod", {
153
- enumerable: true,
154
- get: function () {
155
- return _withFinalizedMod().withFinalizedMod;
156
- }
157
- });
158
- Object.defineProperty(exports, "withGradleProperties", {
159
- enumerable: true,
160
- get: function () {
161
- return _androidPlugins().withGradleProperties;
162
- }
163
- });
164
- Object.defineProperty(exports, "withInfoPlist", {
165
- enumerable: true,
166
- get: function () {
167
- return _iosPlugins().withInfoPlist;
168
- }
169
- });
170
- Object.defineProperty(exports, "withMainActivity", {
171
- enumerable: true,
172
- get: function () {
173
- return _androidPlugins().withMainActivity;
174
- }
175
- });
176
- Object.defineProperty(exports, "withMainApplication", {
177
- enumerable: true,
178
- get: function () {
179
- return _androidPlugins().withMainApplication;
180
- }
181
- });
182
- Object.defineProperty(exports, "withMod", {
183
- enumerable: true,
184
- get: function () {
185
- return _withMod().withMod;
186
- }
187
- });
188
- Object.defineProperty(exports, "withPlugins", {
189
- enumerable: true,
190
- get: function () {
191
- return _withPlugins().withPlugins;
192
- }
193
- });
194
- Object.defineProperty(exports, "withPodfile", {
195
- enumerable: true,
196
- get: function () {
197
- return _iosPlugins().withPodfile;
198
- }
199
- });
200
- Object.defineProperty(exports, "withPodfileProperties", {
201
- enumerable: true,
202
- get: function () {
203
- return _iosPlugins().withPodfileProperties;
204
- }
205
- });
206
- Object.defineProperty(exports, "withProjectBuildGradle", {
207
- enumerable: true,
208
- get: function () {
209
- return _androidPlugins().withProjectBuildGradle;
210
- }
211
- });
212
- Object.defineProperty(exports, "withRunOnce", {
213
- enumerable: true,
214
- get: function () {
215
- return _withRunOnce().withRunOnce;
216
- }
217
- });
218
- Object.defineProperty(exports, "withSettingsGradle", {
219
- enumerable: true,
220
- get: function () {
221
- return _androidPlugins().withSettingsGradle;
222
- }
223
- });
224
- Object.defineProperty(exports, "withStaticPlugin", {
225
- enumerable: true,
226
- get: function () {
227
- return _withStaticPlugin().withStaticPlugin;
228
- }
229
- });
230
- Object.defineProperty(exports, "withStringsXml", {
231
- enumerable: true,
232
- get: function () {
233
- return _androidPlugins().withStringsXml;
234
- }
235
- });
236
- Object.defineProperty(exports, "withXcodeProject", {
237
- enumerable: true,
238
- get: function () {
239
- return _iosPlugins().withXcodeProject;
240
- }
241
- });
46
+ exports.withXcodeProject = exports.withStringsXml = exports.withStaticPlugin = exports.withSettingsGradle = exports.withRunOnce = exports.withProjectBuildGradle = exports.withPodfileProperties = exports.withPodfile = exports.withPlugins = exports.withMod = exports.withMainApplication = exports.withMainActivity = exports.withInfoPlist = exports.withGradleProperties = exports.withFinalizedMod = exports.withExpoPlist = exports.withEntitlementsPlist = exports.withDefaultBaseMods = exports.withDangerousMod = exports.withBaseMod = exports.withAppDelegate = exports.withAppBuildGradle = exports.withAndroidStyles = exports.withAndroidManifest = exports.withAndroidColorsNight = exports.withAndroidColors = exports.isValidAndroidAssetName = exports.evalModsAsync = exports.createRunOncePlugin = exports.compileModsAsync = exports.assertValidAndroidAssetName = exports.XML = exports.WarningAggregator = exports.Updates = exports.PluginError = exports.IOSConfig = exports.History = exports.CodeGenerator = exports.BaseMods = exports.AndroidConfig = void 0;
242
47
  function AndroidConfig() {
243
48
  const data = _interopRequireWildcard(require("./android"));
244
49
  AndroidConfig = function () {
@@ -356,12 +161,7 @@ Object.keys(_Plugin).forEach(function (key) {
356
161
  if (key === "default" || key === "__esModule") return;
357
162
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
358
163
  if (key in exports && exports[key] === _Plugin[key]) return;
359
- Object.defineProperty(exports, key, {
360
- enumerable: true,
361
- get: function () {
362
- return _Plugin[key];
363
- }
364
- });
164
+ exports[key] = _Plugin[key];
365
165
  });
366
166
  function _withPlugins() {
367
167
  const data = require("./plugins/withPlugins");
@@ -370,6 +170,7 @@ function _withPlugins() {
370
170
  };
371
171
  return data;
372
172
  }
173
+ exports.withPlugins = _withPlugins().withPlugins;
373
174
  function _withRunOnce() {
374
175
  const data = require("./plugins/withRunOnce");
375
176
  _withRunOnce = function () {
@@ -377,6 +178,8 @@ function _withRunOnce() {
377
178
  };
378
179
  return data;
379
180
  }
181
+ exports.withRunOnce = _withRunOnce().withRunOnce;
182
+ exports.createRunOncePlugin = _withRunOnce().createRunOncePlugin;
380
183
  function _withDangerousMod() {
381
184
  const data = require("./plugins/withDangerousMod");
382
185
  _withDangerousMod = function () {
@@ -384,6 +187,7 @@ function _withDangerousMod() {
384
187
  };
385
188
  return data;
386
189
  }
190
+ exports.withDangerousMod = _withDangerousMod().withDangerousMod;
387
191
  function _withFinalizedMod() {
388
192
  const data = require("./plugins/withFinalizedMod");
389
193
  _withFinalizedMod = function () {
@@ -391,6 +195,7 @@ function _withFinalizedMod() {
391
195
  };
392
196
  return data;
393
197
  }
198
+ exports.withFinalizedMod = _withFinalizedMod().withFinalizedMod;
394
199
  function _withMod() {
395
200
  const data = require("./plugins/withMod");
396
201
  _withMod = function () {
@@ -398,6 +203,8 @@ function _withMod() {
398
203
  };
399
204
  return data;
400
205
  }
206
+ exports.withMod = _withMod().withMod;
207
+ exports.withBaseMod = _withMod().withBaseMod;
401
208
  function _iosPlugins() {
402
209
  const data = require("./plugins/ios-plugins");
403
210
  _iosPlugins = function () {
@@ -405,6 +212,13 @@ function _iosPlugins() {
405
212
  };
406
213
  return data;
407
214
  }
215
+ exports.withAppDelegate = _iosPlugins().withAppDelegate;
216
+ exports.withInfoPlist = _iosPlugins().withInfoPlist;
217
+ exports.withEntitlementsPlist = _iosPlugins().withEntitlementsPlist;
218
+ exports.withExpoPlist = _iosPlugins().withExpoPlist;
219
+ exports.withXcodeProject = _iosPlugins().withXcodeProject;
220
+ exports.withPodfile = _iosPlugins().withPodfile;
221
+ exports.withPodfileProperties = _iosPlugins().withPodfileProperties;
408
222
  function _androidPlugins() {
409
223
  const data = require("./plugins/android-plugins");
410
224
  _androidPlugins = function () {
@@ -412,6 +226,17 @@ function _androidPlugins() {
412
226
  };
413
227
  return data;
414
228
  }
229
+ exports.withAndroidManifest = _androidPlugins().withAndroidManifest;
230
+ exports.withStringsXml = _androidPlugins().withStringsXml;
231
+ exports.withAndroidColors = _androidPlugins().withAndroidColors;
232
+ exports.withAndroidColorsNight = _androidPlugins().withAndroidColorsNight;
233
+ exports.withAndroidStyles = _androidPlugins().withAndroidStyles;
234
+ exports.withMainActivity = _androidPlugins().withMainActivity;
235
+ exports.withMainApplication = _androidPlugins().withMainApplication;
236
+ exports.withProjectBuildGradle = _androidPlugins().withProjectBuildGradle;
237
+ exports.withAppBuildGradle = _androidPlugins().withAppBuildGradle;
238
+ exports.withSettingsGradle = _androidPlugins().withSettingsGradle;
239
+ exports.withGradleProperties = _androidPlugins().withGradleProperties;
415
240
  function _validations() {
416
241
  const data = require("./utils/validations");
417
242
  _validations = function () {
@@ -419,6 +244,8 @@ function _validations() {
419
244
  };
420
245
  return data;
421
246
  }
247
+ exports.isValidAndroidAssetName = _validations().isValidAndroidAssetName;
248
+ exports.assertValidAndroidAssetName = _validations().assertValidAndroidAssetName;
422
249
  function _withStaticPlugin() {
423
250
  const data = require("./plugins/withStaticPlugin");
424
251
  _withStaticPlugin = function () {
@@ -426,6 +253,7 @@ function _withStaticPlugin() {
426
253
  };
427
254
  return data;
428
255
  }
256
+ exports.withStaticPlugin = _withStaticPlugin().withStaticPlugin;
429
257
  function _modCompiler() {
430
258
  const data = require("./plugins/mod-compiler");
431
259
  _modCompiler = function () {
@@ -433,6 +261,9 @@ function _modCompiler() {
433
261
  };
434
262
  return data;
435
263
  }
264
+ exports.compileModsAsync = _modCompiler().compileModsAsync;
265
+ exports.withDefaultBaseMods = _modCompiler().withDefaultBaseMods;
266
+ exports.evalModsAsync = _modCompiler().evalModsAsync;
436
267
  function _errors() {
437
268
  const data = require("./utils/errors");
438
269
  _errors = function () {
@@ -440,6 +271,7 @@ function _errors() {
440
271
  };
441
272
  return data;
442
273
  }
274
+ exports.PluginError = _errors().PluginError;
443
275
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (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 (const 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); }
444
276
  /**
445
277
  * For internal use in Expo CLI
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["AndroidConfig","data","_interopRequireWildcard","require","Object","defineProperty","exports","enumerable","get","IOSConfig","_createBaseMod","_withAndroidBaseMods","_withIosBaseMods","XML","CodeGenerator","History","WarningAggregator","_Updates","_Plugin","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","_withPlugins","_withRunOnce","_withDangerousMod","_withFinalizedMod","_withMod","_iosPlugins","_androidPlugins","_validations","_withStaticPlugin","_modCompiler","_errors","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor","BaseMods","withGeneratedBaseMods","provider","withAndroidBaseMods","getAndroidModFileProviders","withIosBaseMods","getIosModFileProviders"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * For internal use in Expo CLI\n */\nimport * as AndroidConfig from './android';\nimport * as IOSConfig from './ios';\nimport { provider, withGeneratedBaseMods } from './plugins/createBaseMod';\nimport { getAndroidModFileProviders, withAndroidBaseMods } from './plugins/withAndroidBaseMods';\nimport { getIosModFileProviders, withIosBaseMods } from './plugins/withIosBaseMods';\nimport * as XML from './utils/XML';\nimport * as CodeGenerator from './utils/generateCode';\nimport * as History from './utils/history';\nimport * as WarningAggregator from './utils/warnings';\n\n// TODO: Remove\nexport * as Updates from './utils/Updates';\n\nexport { IOSConfig, AndroidConfig };\n\nexport { WarningAggregator, CodeGenerator, History, XML };\n\n/**\n * These are the \"config-plugins\"\n */\n\nexport * from './Plugin.types';\n\nexport { withPlugins } from './plugins/withPlugins';\n\nexport { withRunOnce, createRunOncePlugin } from './plugins/withRunOnce';\n\nexport { withDangerousMod } from './plugins/withDangerousMod';\nexport { withFinalizedMod } from './plugins/withFinalizedMod';\nexport { withMod, withBaseMod } from './plugins/withMod';\n\nexport {\n withAppDelegate,\n withInfoPlist,\n withEntitlementsPlist,\n withExpoPlist,\n withXcodeProject,\n withPodfile,\n withPodfileProperties,\n} from './plugins/ios-plugins';\n\nexport {\n withAndroidManifest,\n withStringsXml,\n withAndroidColors,\n withAndroidColorsNight,\n withAndroidStyles,\n withMainActivity,\n withMainApplication,\n withProjectBuildGradle,\n withAppBuildGradle,\n withSettingsGradle,\n withGradleProperties,\n} from './plugins/android-plugins';\n\nexport { isValidAndroidAssetName, assertValidAndroidAssetName } from './utils/validations';\n\nexport { withStaticPlugin } from './plugins/withStaticPlugin';\n\nexport { compileModsAsync, withDefaultBaseMods, evalModsAsync } from './plugins/mod-compiler';\n\nexport { PluginError } from './utils/errors';\n\nexport const BaseMods = {\n withGeneratedBaseMods,\n provider,\n withAndroidBaseMods,\n getAndroidModFileProviders,\n withIosBaseMods,\n getIosModFileProviders,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2CG,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAR,aAAA;EAAA;AAAA;AAC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BA,sCAAqB;EACrBC,QAAQ,EAARA,yBAAQ;EACRC,mBAAmB,EAAnBA,0CAAmB;EACnBC,0BAA0B,EAA1BA,iDAA0B;EAC1BC,eAAe,EAAfA,kCAAe;EACfC,sBAAsB,EAAtBA;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["AndroidConfig","data","_interopRequireWildcard","require","Object","defineProperty","exports","enumerable","get","IOSConfig","_createBaseMod","_withAndroidBaseMods","_withIosBaseMods","XML","CodeGenerator","History","WarningAggregator","_Updates","_Plugin","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","_withPlugins","withPlugins","_withRunOnce","withRunOnce","createRunOncePlugin","_withDangerousMod","withDangerousMod","_withFinalizedMod","withFinalizedMod","_withMod","withMod","withBaseMod","_iosPlugins","withAppDelegate","withInfoPlist","withEntitlementsPlist","withExpoPlist","withXcodeProject","withPodfile","withPodfileProperties","_androidPlugins","withAndroidManifest","withStringsXml","withAndroidColors","withAndroidColorsNight","withAndroidStyles","withMainActivity","withMainApplication","withProjectBuildGradle","withAppBuildGradle","withSettingsGradle","withGradleProperties","_validations","isValidAndroidAssetName","assertValidAndroidAssetName","_withStaticPlugin","withStaticPlugin","_modCompiler","compileModsAsync","withDefaultBaseMods","evalModsAsync","_errors","PluginError","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor","BaseMods","withGeneratedBaseMods","provider","withAndroidBaseMods","getAndroidModFileProviders","withIosBaseMods","getIosModFileProviders"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * For internal use in Expo CLI\n */\nimport * as AndroidConfig from './android';\nimport * as IOSConfig from './ios';\nimport { provider, withGeneratedBaseMods } from './plugins/createBaseMod';\nimport { getAndroidModFileProviders, withAndroidBaseMods } from './plugins/withAndroidBaseMods';\nimport { getIosModFileProviders, withIosBaseMods } from './plugins/withIosBaseMods';\nimport * as XML from './utils/XML';\nimport * as CodeGenerator from './utils/generateCode';\nimport * as History from './utils/history';\nimport * as WarningAggregator from './utils/warnings';\n\n// TODO: Remove\nexport * as Updates from './utils/Updates';\n\nexport { IOSConfig, AndroidConfig };\n\nexport { WarningAggregator, CodeGenerator, History, XML };\n\n/**\n * These are the \"config-plugins\"\n */\n\nexport * from './Plugin.types';\n\nexport { withPlugins } from './plugins/withPlugins';\n\nexport { withRunOnce, createRunOncePlugin } from './plugins/withRunOnce';\n\nexport { withDangerousMod } from './plugins/withDangerousMod';\nexport { withFinalizedMod } from './plugins/withFinalizedMod';\nexport { withMod, withBaseMod } from './plugins/withMod';\n\nexport {\n withAppDelegate,\n withInfoPlist,\n withEntitlementsPlist,\n withExpoPlist,\n withXcodeProject,\n withPodfile,\n withPodfileProperties,\n} from './plugins/ios-plugins';\n\nexport {\n withAndroidManifest,\n withStringsXml,\n withAndroidColors,\n withAndroidColorsNight,\n withAndroidStyles,\n withMainActivity,\n withMainApplication,\n withProjectBuildGradle,\n withAppBuildGradle,\n withSettingsGradle,\n withGradleProperties,\n} from './plugins/android-plugins';\n\nexport { isValidAndroidAssetName, assertValidAndroidAssetName } from './utils/validations';\n\nexport { withStaticPlugin } from './plugins/withStaticPlugin';\n\nexport { compileModsAsync, withDefaultBaseMods, evalModsAsync } from './plugins/mod-compiler';\n\nexport { PluginError } from './utils/errors';\n\nexport const BaseMods = {\n withGeneratedBaseMods,\n provider,\n withAndroidBaseMods,\n getAndroidModFileProviders,\n withIosBaseMods,\n getIosModFileProviders,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2CG,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAR,aAAA;EAAA;AAAA;AAC3C,SAAAS,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A,gBAAAC,CAAA,OAAA/C,cAAA,CAAAC,IAAA,CAAA6C,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAvE,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAA8E,wBAAA,CAAAb,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAApE,GAAA,IAAAoE,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAhE7C;AACA;AACA;;AAWA;;AAOA;AACA;AACA;;AA4CO,MAAMa,QAAQ,GAAA7E,OAAA,CAAA6E,QAAA,GAAG;EACtBC,qBAAqB,EAArBA,sCAAqB;EACrBC,QAAQ,EAARA,yBAAQ;EACRC,mBAAmB,EAAnBA,0CAAmB;EACnBC,0BAA0B,EAA1BA,iDAA0B;EAC1BC,eAAe,EAAfA,kCAAe;EACfC,sBAAsB,EAAtBA;AACF,CAAC","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getBitcode = getBitcode;
7
5
  exports.setBitcode = setBitcode;
8
6
  exports.setBitcodeWithConfig = setBitcodeWithConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"Bitcode.js","names":["_Xcodeproj","data","require","_iosPlugins","_warnings","withBitcode","config","withXcodeProject","modResults","setBitcodeWithConfig","project","exports","withCustomBitcode","bitcode","setBitcode","getBitcode","ios","isDefaultBehavior","targetName","undefined","isBitcodeEnabled","configs","Object","entries","pbxXCBuildConfigurationSection","filter","isNotComment","hasConfiguration","find","configuration","name","addBuildProperty","names","Set","map","sort","addWarningIOS","join"],"sources":["../../src/ios/Bitcode.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport type { XcodeProject } from 'xcode';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { isNotComment } from './utils/Xcodeproj';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\n\ntype Bitcode = NonNullable<ExpoConfig['ios']>['bitcode'];\n\n/**\n * Plugin to set a bitcode preference for the Xcode project\n * based on the project's Expo config `ios.bitcode` value.\n */\nexport const withBitcode: ConfigPlugin = (config) => {\n return withXcodeProject(config, async (config) => {\n config.modResults = await setBitcodeWithConfig(config, {\n project: config.modResults,\n });\n return config;\n });\n};\n\n/**\n * Plugin to set a custom bitcode preference for the Xcode project.\n * Does not read from the Expo config `ios.bitcode`.\n *\n * @param bitcode custom bitcode setting.\n */\nexport const withCustomBitcode: ConfigPlugin<Bitcode> = (config, bitcode) => {\n return withXcodeProject(config, async (config) => {\n config.modResults = await setBitcode(bitcode, {\n project: config.modResults,\n });\n return config;\n });\n};\n\n/**\n * Get the bitcode preference from the Expo config.\n */\nexport function getBitcode(config: Pick<ExpoConfig, 'ios'>): Bitcode {\n return config.ios?.bitcode;\n}\n\n/**\n * Enable or disable the `ENABLE_BITCODE` property of the project configurations.\n */\nexport function setBitcodeWithConfig(\n config: Pick<ExpoConfig, 'ios'>,\n { project }: { project: XcodeProject }\n): XcodeProject {\n const bitcode = getBitcode(config);\n return setBitcode(bitcode, { project });\n}\n\n/**\n * Enable or disable the `ENABLE_BITCODE` property.\n */\nexport function setBitcode(bitcode: Bitcode, { project }: { project: XcodeProject }): XcodeProject {\n const isDefaultBehavior = bitcode == null;\n // If the value is undefined, then do nothing.\n if (isDefaultBehavior) {\n return project;\n }\n\n const targetName = typeof bitcode === 'string' ? bitcode : undefined;\n const isBitcodeEnabled = !!bitcode;\n if (targetName) {\n // Assert if missing\n const configs = Object.entries(project.pbxXCBuildConfigurationSection()).filter(isNotComment);\n const hasConfiguration = configs.find(([, configuration]) => configuration.name === targetName);\n if (hasConfiguration) {\n // If targetName is defined then disable bitcode everywhere.\n project.addBuildProperty('ENABLE_BITCODE', 'NO');\n } else {\n const names = [\n // Remove duplicates, wrap in double quotes, and sort alphabetically.\n ...new Set(configs.map(([, configuration]) => `\"${configuration.name}\"`)),\n ].sort();\n addWarningIOS(\n 'ios.bitcode',\n `No configuration named \"${targetName}\". Expected one of: ${names.join(', ')}.`\n );\n }\n }\n\n project.addBuildProperty('ENABLE_BITCODE', isBitcodeEnabled ? 'YES' : 'NO', targetName);\n\n return project;\n}\n"],"mappings":";;;;;;;;;AAIA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA;AACA;AACA;AACA;AACO,MAAMI,WAAyB,GAAIC,MAAM,IAAK;EACnD,OAAO,IAAAC,8BAAgB,EAACD,MAAM,EAAE,MAAOA,MAAM,IAAK;IAChDA,MAAM,CAACE,UAAU,GAAG,MAAMC,oBAAoB,CAACH,MAAM,EAAE;MACrDI,OAAO,EAAEJ,MAAM,CAACE;IAClB,CAAC,CAAC;IACF,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AALAK,OAAA,CAAAN,WAAA,GAAAA,WAAA;AAMO,MAAMO,iBAAwC,GAAGA,CAACN,MAAM,EAAEO,OAAO,KAAK;EAC3E,OAAO,IAAAN,8BAAgB,EAACD,MAAM,EAAE,MAAOA,MAAM,IAAK;IAChDA,MAAM,CAACE,UAAU,GAAG,MAAMM,UAAU,CAACD,OAAO,EAAE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AG,CAAC,CAAC,GAAGL,aAAa,CAAC,KAAK,IAAIA,aAAa,CAACC,IAAI,GAAG,CAAC,CAAC,CAC1E,CAACK,IAAI,CAAC,CAAC;MACR,IAAAC,yBAAa,EACX,aAAa,EACb,2BAA2BlB,UAAU,uBAAuBc,KAAK,CAACK,IAAI,CAAC,IAAI,CAAC,GAC9E,CAAC;IACH;EACF;EAEA3B,OAAO,CAACqB,gBAAgB,CAAC,gBAAgB,EAAEX,gBAAgB,GAAG,KAAK,GAAG,IAAI,EAAEF,UAAU,CAAC;EAEvF,OAAOR,OAAO;AAChB","ignoreList":[]}
1
+ {"version":3,"file":"Bitcode.js","names":["_Xcodeproj","data","require","_iosPlugins","_warnings","withBitcode","config","withXcodeProject","modResults","setBitcodeWithConfig","project","exports","withCustomBitcode","bitcode","setBitcode","getBitcode","ios","isDefaultBehavior","targetName","undefined","isBitcodeEnabled","configs","Object","entries","pbxXCBuildConfigurationSection","filter","isNotComment","hasConfiguration","find","configuration","name","addBuildProperty","names","Set","map","sort","addWarningIOS","join"],"sources":["../../src/ios/Bitcode.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport type { XcodeProject } from 'xcode';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { isNotComment } from './utils/Xcodeproj';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\n\ntype Bitcode = NonNullable<ExpoConfig['ios']>['bitcode'];\n\n/**\n * Plugin to set a bitcode preference for the Xcode project\n * based on the project's Expo config `ios.bitcode` value.\n */\nexport const withBitcode: ConfigPlugin = (config) => {\n return withXcodeProject(config, async (config) => {\n config.modResults = await setBitcodeWithConfig(config, {\n project: config.modResults,\n });\n return config;\n });\n};\n\n/**\n * Plugin to set a custom bitcode preference for the Xcode project.\n * Does not read from the Expo config `ios.bitcode`.\n *\n * @param bitcode custom bitcode setting.\n */\nexport const withCustomBitcode: ConfigPlugin<Bitcode> = (config, bitcode) => {\n return withXcodeProject(config, async (config) => {\n config.modResults = await setBitcode(bitcode, {\n project: config.modResults,\n });\n return config;\n });\n};\n\n/**\n * Get the bitcode preference from the Expo config.\n */\nexport function getBitcode(config: Pick<ExpoConfig, 'ios'>): Bitcode {\n return config.ios?.bitcode;\n}\n\n/**\n * Enable or disable the `ENABLE_BITCODE` property of the project configurations.\n */\nexport function setBitcodeWithConfig(\n config: Pick<ExpoConfig, 'ios'>,\n { project }: { project: XcodeProject }\n): XcodeProject {\n const bitcode = getBitcode(config);\n return setBitcode(bitcode, { project });\n}\n\n/**\n * Enable or disable the `ENABLE_BITCODE` property.\n */\nexport function setBitcode(bitcode: Bitcode, { project }: { project: XcodeProject }): XcodeProject {\n const isDefaultBehavior = bitcode == null;\n // If the value is undefined, then do nothing.\n if (isDefaultBehavior) {\n return project;\n }\n\n const targetName = typeof bitcode === 'string' ? bitcode : undefined;\n const isBitcodeEnabled = !!bitcode;\n if (targetName) {\n // Assert if missing\n const configs = Object.entries(project.pbxXCBuildConfigurationSection()).filter(isNotComment);\n const hasConfiguration = configs.find(([, configuration]) => configuration.name === targetName);\n if (hasConfiguration) {\n // If targetName is defined then disable bitcode everywhere.\n project.addBuildProperty('ENABLE_BITCODE', 'NO');\n } else {\n const names = [\n // Remove duplicates, wrap in double quotes, and sort alphabetically.\n ...new Set(configs.map(([, configuration]) => `\"${configuration.name}\"`)),\n ].sort();\n addWarningIOS(\n 'ios.bitcode',\n `No configuration named \"${targetName}\". Expected one of: ${names.join(', ')}.`\n );\n }\n }\n\n project.addBuildProperty('ENABLE_BITCODE', isBitcodeEnabled ? 'YES' : 'NO', targetName);\n\n return project;\n}\n"],"mappings":";;;;;;;AAIA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAA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E;EAAEH;AAAmC,CAAC,EAAgB;EACjG,MAAMO,iBAAiB,GAAGJ,OAAO,IAAI,IAAI;EACzC;EACA,IAAII,iBAAiB,EAAE;IACrB,OAAOP,OAAO;EAChB;EAEA,MAAMQ,UAAU,GAAG,OAAOL,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAGM,SAAS;EACpE,MAAMC,gBAAgB,GAAG,CAAC,CAACP,OAAO;EAClC,IAAIK,UAAU,EAAE;IACd;IACA,MAAMG,OAAO,GAAGC,MAAM,CAACC,OAAO,CAACb,OAAO,CAACc,8BAA8B,CAAC,CAAC,CAAC,CAACC,MAAM,CAACC,yBAAY,CAAC;IAC7F,MAAMC,gBAAgB,GAAGN,OAAO,CAACO,IAAI,CAAC,CAAC,GAAGC,aAAa,CAAC,KAAKA,aAAa,CAACC,IAAI,KAAKZ,UAAU,CAAC;IAC/F,IAAIS,gBAAgB,EAAE;MACpB;MACAjB,OAAO,CAACqB,gBAAgB,CAAC,gBAAgB,EAAE,IAAI,CAAC;IAClD,CAAC,MAAM;MACL,MAAMC,KAAK,GAAG;MACZ;MACA,GAAG,IAAIC,GAAG,CAACZ,OAAO,CAACa,GAAG,CAAC,CAAC,GAAGL,aAAa,CAAC,KAAK,IAAIA,aAAa,CAACC,IAAI,GAAG,CAAC,CAAC,CAC1E,CAACK,IAAI,CAAC,CAAC;MACR,IAAAC,yBAAa,EACX,aAAa,EACb,2BAA2BlB,UAAU,uBAAuBc,KAAK,CAACK,IAAI,CAAC,IAAI,CAAC,GAC9E,CAAC;IACH;EACF;EAEA3B,OAAO,CAACqB,gBAAgB,CAAC,gBAAgB,EAAEX,gBAAgB,GAAG,KAAK,GAAG,IAAI,EAAEF,UAAU,CAAC;EAEvF,OAAOR,OAAO;AAChB","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.createBuildPodfilePropsConfigPlugin = createBuildPodfilePropsConfigPlugin;
7
5
  exports.updateIosBuildPropertiesFromConfig = updateIosBuildPropertiesFromConfig;
8
6
  exports.updateIosBuildProperty = updateIosBuildProperty;
@@ -1 +1 @@
1
- {"version":3,"file":"BuildProperties.js","names":["_iosPlugins","data","require","createBuildPodfilePropsConfigPlugin","configToPropertyRules","name","withUnknown","config","sourceConfig","withPodfileProperties","modResults","updateIosBuildPropertiesFromConfig","Object","defineProperty","value","withJsEnginePodfileProps","exports","propName","propValueGetter","ios","jsEngine","podfileProperties","configToProperty","updateIosBuildProperty","options","removePropWhenValueIsNull"],"sources":["../../src/ios/BuildProperties.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { withPodfileProperties } from '../plugins/ios-plugins';\nimport type {\n BuildPropertiesConfig,\n ConfigToPropertyRuleType,\n} from '../utils/BuildProperties.types';\n\n/**\n * Creates a `withPodfileProperties` config-plugin based on given config to property mapping rules.\n *\n * The factory supports two modes from generic type inference\n * ```ts\n * // config-plugin without `props`, it will implicitly use the expo config as source config.\n * createBuildPodfilePropsConfigPlugin<ExpoConfig>(): ConfigPlugin<void>;\n *\n * // config-plugin with a parameter `props: CustomType`, it will use the `props` as source config.\n * createBuildPodfilePropsConfigPlugin<CustomType>(): ConfigPlugin<CustomType>;\n * ```\n *\n * @param configToPropertyRules config to property mapping rules\n * @param name the config plugin name\n */\nexport function createBuildPodfilePropsConfigPlugin<SourceConfigType extends BuildPropertiesConfig>(\n configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[],\n name?: string\n) {\n const withUnknown: ConfigPlugin<SourceConfigType extends ExpoConfig ? void : SourceConfigType> = (\n config,\n sourceConfig\n ) =>\n withPodfileProperties(config, (config) => {\n config.modResults = updateIosBuildPropertiesFromConfig(\n (sourceConfig ?? config) as SourceConfigType,\n config.modResults,\n configToPropertyRules\n );\n return config;\n });\n if (name) {\n Object.defineProperty(withUnknown, 'name', {\n value: name,\n });\n }\n return withUnknown;\n}\n\n/**\n * A config-plugin to update `ios/Podfile.properties.json` from the `jsEngine` in expo config\n */\nexport const withJsEnginePodfileProps = createBuildPodfilePropsConfigPlugin<ExpoConfig>(\n [\n {\n propName: 'expo.jsEngine',\n propValueGetter: (config) =>\n (config.ios as any)?.jsEngine ?? (config as any).jsEngine ?? 'hermes',\n },\n ],\n 'withJsEnginePodfileProps'\n);\n\nexport function updateIosBuildPropertiesFromConfig<SourceConfigType extends BuildPropertiesConfig>(\n config: SourceConfigType,\n podfileProperties: Record<string, string>,\n configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[]\n) {\n for (const configToProperty of configToPropertyRules) {\n const value = configToProperty.propValueGetter(config);\n updateIosBuildProperty(podfileProperties, configToProperty.propName, value);\n }\n return podfileProperties;\n}\n\nexport function updateIosBuildProperty(\n podfileProperties: Record<string, string>,\n name: string,\n value: string | null | undefined,\n options?: { removePropWhenValueIsNull?: boolean }\n) {\n if (value) {\n podfileProperties[name] = value;\n } else if (options?.removePropWhenValueIsNull) {\n delete podfileProperties[name];\n }\n return podfileProperties;\n}\n"],"mappings":";;;;;;;;;AAGA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,mCAAmCA,CACjDC,qBAAmE,EACnEC,IAAa,EACb;EACA,MAAMC,WAAwF,GAAGA,CAC/FC,MAAM,EACNC,YAAY,KAEZ,IAAAC,mCAAqB,EAACF,MAAM,EAAGA,MAAM,IAAK;IACxCA,MAAM,CAACG,UAAU,GAAGC,kCAAkC,CACnDH,YAAY,IAAID,MAAM,EACvBA,MAAM,CAACG,UAAU,EACjBN,qBACF,CAAC;IACD,OAAOG,MAAM;EACf,CAAC,CAAC;EACJ,IAAIF,IAAI,EAAE;IACRO,MAAM,CAACC,cAAc,CAACP,WAAW,EAAE,MAAM,EAAE;MACzCQ,KAAK,EAAET;IACT,CAAC,CAAC;EACJ;EACA,OAAOC,WAAW;AACpB;;AAEA;AACA;AACA;AACO,MAAMS,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAGZ,mCAAmC,CACzE,CACE;EACEc,QAAQ,EAAE,eAAe;EACzBC,eAAe,EAAGX,MAAM,IACrBA,MAAM,CAACY,GAAG,EAAUC,QAAQ,IAAKb,MAAM,CAASa,QAAQ,IAAI;AACjE,CAAC,CACF,EACD,0BACF,CAAC;AAEM,SAAST,kCAAkCA,CAChDJ,MAAwB,EACxBc,iBAAyC,EACzCjB,qBAAmE,EACnE;EACA,KAAK,MAAMkB,gBAAgB,IAAIlB,qBAAqB,EAAE;IACpD,MAAMU,KAAK,GAAGQ,gBAAgB,CAACJ,eAAe,CAACX,MAAM,CAAC;IACtDgB,sBAAsB,CAACF,iBAAiB,EAAEC,gBAAgB,CAACL,QAAQ,EAAEH,KAAK,CAAC;EAC7E;EACA,OAAOO,iBAAiB;AAC1B;AAEO,SAASE,sBAAsBA,CACpCF,iBAAyC,EACzChB,IAAY,EACZS,KAAgC,EAChCU,OAAiD,EACjD;EACA,IAAIV,KAAK,EAAE;IACTO,iBAAiB,CAAChB,IAAI,CAAC,GAAGS,KAAK;EACjC,CAAC,MAAM,IAAIU,OAAO,EAAEC,yBAAyB,EAAE;IAC7C,OAAOJ,iBAAiB,CAAChB,IAAI,CAAC;EAChC;EACA,OAAOgB,iBAAiB;AAC1B","ignoreList":[]}
1
+ {"version":3,"file":"BuildProperties.js","names":["_iosPlugins","data","require","createBuildPodfilePropsConfigPlugin","configToPropertyRules","name","withUnknown","config","sourceConfig","withPodfileProperties","modResults","updateIosBuildPropertiesFromConfig","Object","defineProperty","value","withJsEnginePodfileProps","exports","propName","propValueGetter","ios","jsEngine","podfileProperties","configToProperty","updateIosBuildProperty","options","removePropWhenValueIsNull"],"sources":["../../src/ios/BuildProperties.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { withPodfileProperties } from '../plugins/ios-plugins';\nimport type {\n BuildPropertiesConfig,\n ConfigToPropertyRuleType,\n} from '../utils/BuildProperties.types';\n\n/**\n * Creates a `withPodfileProperties` config-plugin based on given config to property mapping rules.\n *\n * The factory supports two modes from generic type inference\n * ```ts\n * // config-plugin without `props`, it will implicitly use the expo config as source config.\n * createBuildPodfilePropsConfigPlugin<ExpoConfig>(): ConfigPlugin<void>;\n *\n * // config-plugin with a parameter `props: CustomType`, it will use the `props` as source config.\n * createBuildPodfilePropsConfigPlugin<CustomType>(): ConfigPlugin<CustomType>;\n * ```\n *\n * @param configToPropertyRules config to property mapping rules\n * @param name the config plugin name\n */\nexport function createBuildPodfilePropsConfigPlugin<SourceConfigType extends BuildPropertiesConfig>(\n configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[],\n name?: string\n) {\n const withUnknown: ConfigPlugin<SourceConfigType extends ExpoConfig ? void : SourceConfigType> = (\n config,\n sourceConfig\n ) =>\n withPodfileProperties(config, (config) => {\n config.modResults = updateIosBuildPropertiesFromConfig(\n (sourceConfig ?? config) as SourceConfigType,\n config.modResults,\n configToPropertyRules\n );\n return config;\n });\n if (name) {\n Object.defineProperty(withUnknown, 'name', {\n value: name,\n });\n }\n return withUnknown;\n}\n\n/**\n * A config-plugin to update `ios/Podfile.properties.json` from the `jsEngine` in expo config\n */\nexport const withJsEnginePodfileProps = createBuildPodfilePropsConfigPlugin<ExpoConfig>(\n [\n {\n propName: 'expo.jsEngine',\n propValueGetter: (config) =>\n (config.ios as any)?.jsEngine ?? (config as any).jsEngine ?? 'hermes',\n },\n ],\n 'withJsEnginePodfileProps'\n);\n\nexport function updateIosBuildPropertiesFromConfig<SourceConfigType extends BuildPropertiesConfig>(\n config: SourceConfigType,\n podfileProperties: Record<string, string>,\n configToPropertyRules: ConfigToPropertyRuleType<SourceConfigType>[]\n) {\n for (const configToProperty of configToPropertyRules) {\n const value = configToProperty.propValueGetter(config);\n updateIosBuildProperty(podfileProperties, configToProperty.propName, value);\n }\n return podfileProperties;\n}\n\nexport function updateIosBuildProperty(\n podfileProperties: Record<string, string>,\n name: string,\n value: string | null | undefined,\n options?: { removePropWhenValueIsNull?: boolean }\n) {\n if (value) {\n podfileProperties[name] = value;\n } else if (options?.removePropWhenValueIsNull) {\n delete podfileProperties[name];\n }\n return podfileProperties;\n}\n"],"mappings":";;;;;;;AAGA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,mCAAmCA,CACjDC,qBAAmE,EACnEC,IAAa,EACb;EACA,MAAMC,WAAwF,GAAGA,CAC/FC,MAAM,EACNC,YAAY,KAEZ,IAAAC,mCAAqB,EAACF,MAAM,EAAGA,MAAM,IAAK;IACxCA,MAAM,CAACG,UAAU,GAAGC,kCAAkC,CACnDH,YAAY,IAAID,MAAM,EACvBA,MAAM,CAACG,UAAU,EACjBN,qBACF,CAAC;IACD,OAAOG,MAAM;EACf,CAAC,CAAC;EACJ,IAAIF,IAAI,EAAE;IACRO,MAAM,CAACC,cAAc,CAACP,WAAW,EAAE,MAAM,EAAE;MACzCQ,KAAK,EAAET;IACT,CAAC,CAAC;EACJ;EACA,OAAOC,WAAW;AACpB;;AAEA;AACA;AACA;AACO,MAAMS,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAGZ,mCAAmC,CACzE,CACE;EACEc,QAAQ,EAAE,eAAe;EACzBC,eAAe,EAAGX,MAAM,IACrBA,MAAM,CAACY,GAAG,EAAUC,QAAQ,IAAKb,MAAM,CAASa,QAAQ,IAAI;AACjE,CAAC,CACF,EACD,0BACF,CAAC;AAEM,SAAST,kCAAkCA,CAChDJ,MAAwB,EACxBc,iBAAyC,EACzCjB,qBAAmE,EACnE;EACA,KAAK,MAAMkB,gBAAgB,IAAIlB,qBAAqB,EAAE;IACpD,MAAMU,KAAK,GAAGQ,gBAAgB,CAACJ,eAAe,CAACX,MAAM,CAAC;IACtDgB,sBAAsB,CAACF,iBAAiB,EAAEC,gBAAgB,CAACL,QAAQ,EAAEH,KAAK,CAAC;EAC7E;EACA,OAAOO,iBAAiB;AAC1B;AAEO,SAASE,sBAAsBA,CACpCF,iBAAyC,EACzChB,IAAY,EACZS,KAAgC,EAChCU,OAAiD,EACjD;EACA,IAAIV,KAAK,EAAE;IACTO,iBAAiB,CAAChB,IAAI,CAAC,GAAGS,KAAK;EACjC,CAAC,MAAM,IAAIU,OAAO,EAAEC,yBAAyB,EAAE;IAC7C,OAAOJ,iBAAiB,CAAChB,IAAI,CAAC;EAChC;EACA,OAAOgB,iBAAiB;AAC1B","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getApplicationTargetNameForSchemeAsync = getApplicationTargetNameForSchemeAsync;
7
5
  exports.getArchiveBuildConfigurationForSchemeAsync = getArchiveBuildConfigurationForSchemeAsync;
8
6
  exports.getRunnableSchemesFromXcodeproj = getRunnableSchemesFromXcodeproj;
@@ -1 +1 @@
1
- {"version":3,"file":"BuildScheme.js","names":["_Paths","data","require","_Target","_Xcodeproj","_XML","getSchemesFromXcodeproj","projectRoot","findSchemeNames","getRunnableSchemesFromXcodeproj","configuration","project","getPbxproj","findSignableTargets","map","target","osType","type","unquote","productType","TargetType","WATCH","startsWith","APPLICATION","xcConfigurationList","hash","objects","XCConfigurationList","buildConfigurationList","buildConfiguration","buildConfigurations","find","value","comment","xcBuildConfiguration","XCBuildConfiguration","buildSdkRoot","buildSettings","SDKROOT","name","readSchemeAsync","scheme","allSchemePaths","findSchemePaths","re","RegExp","schemePath","i","exec","readXMLAsync","path","Error","getApplicationTargetNameForSchemeAsync","schemeXML","buildActionEntry","Scheme","BuildAction","BuildActionEntries","BuildActionEntry","targetName","length","getBlueprintName","entry","BuildableReference","BuildableName","endsWith","getArchiveBuildConfigurationForSchemeAsync","ArchiveAction","BlueprintName"],"sources":["../../src/ios/BuildScheme.ts"],"sourcesContent":["import { findSchemeNames, findSchemePaths } from './Paths';\nimport { findSignableTargets, TargetType } from './Target';\nimport { getPbxproj, unquote } from './utils/Xcodeproj';\nimport { readXMLAsync } from '../utils/XML';\n\ninterface SchemeXML {\n Scheme?: {\n BuildAction?: {\n BuildActionEntries?: {\n BuildActionEntry?: BuildActionEntryType[];\n }[];\n }[];\n ArchiveAction?: {\n $?: {\n buildConfiguration?: string;\n };\n }[];\n };\n}\n\ninterface BuildActionEntryType {\n BuildableReference?: {\n $?: {\n BlueprintName?: string;\n BuildableName?: string;\n };\n }[];\n}\n\nexport function getSchemesFromXcodeproj(projectRoot: string): string[] {\n return findSchemeNames(projectRoot);\n}\n\nexport function getRunnableSchemesFromXcodeproj(\n projectRoot: string,\n { configuration = 'Debug' }: { configuration?: 'Debug' | 'Release' } = {}\n): { name: string; osType: string; type: string }[] {\n const project = getPbxproj(projectRoot);\n\n return findSignableTargets(project).map(([, target]) => {\n let osType = 'iOS';\n const type = unquote(target.productType);\n\n if (type === TargetType.WATCH) {\n osType = 'watchOS';\n } else if (\n // (apps) com.apple.product-type.application\n // (app clips) com.apple.product-type.application.on-demand-install-capable\n // NOTE(EvanBacon): This matches against `watchOS` as well so we check for watch first.\n type.startsWith(TargetType.APPLICATION)\n ) {\n // Attempt to resolve the platform SDK for each target so we can filter devices.\n const xcConfigurationList =\n project.hash.project.objects.XCConfigurationList[target.buildConfigurationList];\n\n if (xcConfigurationList) {\n const buildConfiguration =\n xcConfigurationList.buildConfigurations.find(\n (value: { comment: string; value: string }) => value.comment === configuration\n ) || xcConfigurationList.buildConfigurations[0];\n if (buildConfiguration?.value) {\n const xcBuildConfiguration =\n project.hash.project.objects.XCBuildConfiguration?.[buildConfiguration.value];\n\n const buildSdkRoot = xcBuildConfiguration?.buildSettings.SDKROOT;\n if (\n buildSdkRoot === 'appletvos' ||\n 'TVOS_DEPLOYMENT_TARGET' in xcBuildConfiguration?.buildSettings\n ) {\n // Is a TV app...\n osType = 'tvOS';\n } else if (buildSdkRoot === 'iphoneos') {\n osType = 'iOS';\n }\n }\n }\n }\n\n return {\n name: unquote(target.name),\n osType,\n type: unquote(target.productType),\n };\n });\n}\n\nasync function readSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<SchemeXML | undefined> {\n const allSchemePaths = findSchemePaths(projectRoot);\n // NOTE(cedric): test on POSIX or UNIX separators, where UNIX needs to be double-escaped in the template literal and regex\n const re = new RegExp(`[\\\\\\\\/]${scheme}.xcscheme`, 'i');\n const schemePath = allSchemePaths.find((i) => re.exec(i));\n if (schemePath) {\n return (await readXMLAsync({ path: schemePath })) as unknown as SchemeXML | undefined;\n } else {\n throw new Error(`scheme '${scheme}' does not exist, make sure it's marked as shared`);\n }\n}\n\nexport async function getApplicationTargetNameForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildActionEntry =\n schemeXML?.Scheme?.BuildAction?.[0]?.BuildActionEntries?.[0]?.BuildActionEntry;\n const targetName =\n buildActionEntry?.length === 1\n ? getBlueprintName(buildActionEntry[0])\n : getBlueprintName(\n buildActionEntry?.find((entry) => {\n return entry.BuildableReference?.[0]?.['$']?.BuildableName?.endsWith('.app');\n })\n );\n if (!targetName) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return targetName;\n}\n\nexport async function getArchiveBuildConfigurationForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildConfiguration = schemeXML?.Scheme?.ArchiveAction?.[0]?.['$']?.buildConfiguration;\n if (!buildConfiguration) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return buildConfiguration;\n}\n\nfunction getBlueprintName(entry?: BuildActionEntryType): string | undefined {\n return entry?.BuildableReference?.[0]?.['$']?.BlueprintName;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AA0BO,SAASK,uBAAuBA,CAACC,WAAmB,EAAY;EACrE,OAAO,IAAAC,wBAAe,EAACD,WAAW,CAAC;AACrC;AAEO,SAASE,+BAA+BA,CAC7CF,WAAmB,EACnB;EAAEG,aAAa,GAAG;AAAiD,CAAC,GAAG,CAAC,CAAC,EACvB;EAClD,MAAMC,OAAO,GAAG,IAAAC,uBAAU,EAACL,WAAW,CAAC;EAEvC,OAAO,IAAAM,6BAAmB,EAACF,OAAO,CAAC,CAACG,GAAG,CAAC,CAAC,GAAGC,MAAM,CAAC,KAAK;IACtD,IAAIC,MAAM,GAAG,KAAK;IAClB,MAAMC,IAAI,GAAG,IAAAC,oBAAO,EAACH,MAAM,CAACI,WAAW,CAAC;IAExC,IAAIF,IAAI,KAAKG,oBAAU,CAACC,KAAK,EAAE;MAC7BL,MAAM,GAAG,SAAS;IACpB,CA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EtC,kBAAkB;EAC3F,IAAI,CAACA,kBAAkB,EAAE;IACvB,MAAM,IAAIsB,KAAK,CAAC,GAAGV,MAAM,iCAAiC,CAAC;EAC7D;EACA,OAAOZ,kBAAkB;AAC3B;AAEA,SAASgC,gBAAgBA,CAACC,KAA4B,EAAsB;EAC1E,OAAOA,KAAK,EAAEC,kBAAkB,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAEK,aAAa;AAC7D","ignoreList":[]}
1
+ {"version":3,"file":"BuildScheme.js","names":["_Paths","data","require","_Target","_Xcodeproj","_XML","getSchemesFromXcodeproj","projectRoot","findSchemeNames","getRunnableSchemesFromXcodeproj","configuration","project","getPbxproj","findSignableTargets","map","target","osType","type","unquote","productType","TargetType","WATCH","startsWith","APPLICATION","xcConfigurationList","hash","objects","XCConfigurationList","buildConfigurationList","buildConfiguration","buildConfigurations","find","value","comment","xcBuildConfiguration","XCBuildConfiguration","buildSdkRoot","buildSettings","SDKROOT","name","readSchemeAsync","scheme","allSchemePaths","findSchemePaths","re","RegExp","schemePath","i","exec","readXMLAsync","path","Error","getApplicationTargetNameForSchemeAsync","schemeXML","buildActionEntry","Scheme","BuildAction","BuildActionEntries","BuildActionEntry","targetName","length","getBlueprintName","entry","BuildableReference","BuildableName","endsWith","getArchiveBuildConfigurationForSchemeAsync","ArchiveAction","BlueprintName"],"sources":["../../src/ios/BuildScheme.ts"],"sourcesContent":["import { findSchemeNames, findSchemePaths } from './Paths';\nimport { findSignableTargets, TargetType } from './Target';\nimport { getPbxproj, unquote } from './utils/Xcodeproj';\nimport { readXMLAsync } from '../utils/XML';\n\ninterface SchemeXML {\n Scheme?: {\n BuildAction?: {\n BuildActionEntries?: {\n BuildActionEntry?: BuildActionEntryType[];\n }[];\n }[];\n ArchiveAction?: {\n $?: {\n buildConfiguration?: string;\n };\n }[];\n };\n}\n\ninterface BuildActionEntryType {\n BuildableReference?: {\n $?: {\n BlueprintName?: string;\n BuildableName?: string;\n };\n }[];\n}\n\nexport function getSchemesFromXcodeproj(projectRoot: string): string[] {\n return findSchemeNames(projectRoot);\n}\n\nexport function getRunnableSchemesFromXcodeproj(\n projectRoot: string,\n { configuration = 'Debug' }: { configuration?: 'Debug' | 'Release' } = {}\n): { name: string; osType: string; type: string }[] {\n const project = getPbxproj(projectRoot);\n\n return findSignableTargets(project).map(([, target]) => {\n let osType = 'iOS';\n const type = unquote(target.productType);\n\n if (type === TargetType.WATCH) {\n osType = 'watchOS';\n } else if (\n // (apps) com.apple.product-type.application\n // (app clips) com.apple.product-type.application.on-demand-install-capable\n // NOTE(EvanBacon): This matches against `watchOS` as well so we check for watch first.\n type.startsWith(TargetType.APPLICATION)\n ) {\n // Attempt to resolve the platform SDK for each target so we can filter devices.\n const xcConfigurationList =\n project.hash.project.objects.XCConfigurationList[target.buildConfigurationList];\n\n if (xcConfigurationList) {\n const buildConfiguration =\n xcConfigurationList.buildConfigurations.find(\n (value: { comment: string; value: string }) => value.comment === configuration\n ) || xcConfigurationList.buildConfigurations[0];\n if (buildConfiguration?.value) {\n const xcBuildConfiguration =\n project.hash.project.objects.XCBuildConfiguration?.[buildConfiguration.value];\n\n const buildSdkRoot = xcBuildConfiguration?.buildSettings.SDKROOT;\n if (\n buildSdkRoot === 'appletvos' ||\n 'TVOS_DEPLOYMENT_TARGET' in xcBuildConfiguration?.buildSettings\n ) {\n // Is a TV app...\n osType = 'tvOS';\n } else if (buildSdkRoot === 'iphoneos') {\n osType = 'iOS';\n }\n }\n }\n }\n\n return {\n name: unquote(target.name),\n osType,\n type: unquote(target.productType),\n };\n });\n}\n\nasync function readSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<SchemeXML | undefined> {\n const allSchemePaths = findSchemePaths(projectRoot);\n // NOTE(cedric): test on POSIX or UNIX separators, where UNIX needs to be double-escaped in the template literal and regex\n const re = new RegExp(`[\\\\\\\\/]${scheme}.xcscheme`, 'i');\n const schemePath = allSchemePaths.find((i) => re.exec(i));\n if (schemePath) {\n return (await readXMLAsync({ path: schemePath })) as unknown as SchemeXML | undefined;\n } else {\n throw new Error(`scheme '${scheme}' does not exist, make sure it's marked as shared`);\n }\n}\n\nexport async function getApplicationTargetNameForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildActionEntry =\n schemeXML?.Scheme?.BuildAction?.[0]?.BuildActionEntries?.[0]?.BuildActionEntry;\n const targetName =\n buildActionEntry?.length === 1\n ? getBlueprintName(buildActionEntry[0])\n : getBlueprintName(\n buildActionEntry?.find((entry) => {\n return entry.BuildableReference?.[0]?.['$']?.BuildableName?.endsWith('.app');\n })\n );\n if (!targetName) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return targetName;\n}\n\nexport async function getArchiveBuildConfigurationForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildConfiguration = schemeXML?.Scheme?.ArchiveAction?.[0]?.['$']?.buildConfiguration;\n if (!buildConfiguration) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return buildConfiguration;\n}\n\nfunction getBlueprintName(entry?: BuildActionEntryType): string | undefined {\n return entry?.BuildableReference?.[0]?.['$']?.BlueprintName;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GA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K,CAAC,GAC1BC,gBAAgB,CAACP,gBAAgB,CAAC,CAAC,CAAC,CAAC,GACrCO,gBAAgB,CACdP,gBAAgB,EAAEvB,IAAI,CAAE+B,KAAK,IAAK;IAChC,OAAOA,KAAK,CAACC,kBAAkB,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAEC,aAAa,EAAEC,QAAQ,CAAC,MAAM,CAAC;EAC9E,CAAC,CACH,CAAC;EACP,IAAI,CAACN,UAAU,EAAE;IACf,MAAM,IAAIR,KAAK,CAAC,GAAGV,MAAM,iCAAiC,CAAC;EAC7D;EACA,OAAOkB,UAAU;AACnB;AAEO,eAAeO,0CAA0CA,CAC9D3D,WAAmB,EACnBkC,MAAc,EACG;EACjB,MAAMY,SAAS,GAAG,MAAMb,eAAe,CAACjC,WAAW,EAAEkC,MAAM,CAAC;EAC5D,MAAMZ,kBAAkB,GAAGwB,SAAS,EAAEE,MAAM,EAAEY,aAAa,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAEtC,kBAAkB;EAC3F,IAAI,CAACA,kBAAkB,EAAE;IACvB,MAAM,IAAIsB,KAAK,CAAC,GAAGV,MAAM,iCAAiC,CAAC;EAC7D;EACA,OAAOZ,kBAAkB;AAC3B;AAEA,SAASgC,gBAAgBA,CAACC,KAA4B,EAAsB;EAC1E,OAAOA,KAAK,EAAEC,kBAAkB,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAEK,aAAa;AAC7D","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getBundleIdentifier = getBundleIdentifier;
7
5
  exports.getBundleIdentifierFromPbxproj = getBundleIdentifierFromPbxproj;
8
6
  exports.resetAllPlistBundleIdentifiers = resetAllPlistBundleIdentifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"BundleIdentifier.js","names":["_plist","data","_interopRequireDefault","require","_assert","_fs","_xcode","_Paths","_Target","_Xcodeproj","_string","_iosPlugins","e","__esModule","default","withBundleIdentifier","config","bundleIdentifier","withXcodeProject","bundleId","ios","assert","modResults","updateBundleIdentifierForPbxprojObject","exports","getBundleIdentifier","setBundleIdentifier","infoPlist","CFBundleIdentifier","getBundleIdentifierFromPbxproj","projectRoot","targetName","buildConfiguration","pbxprojPath","getPBXProjectPath","project","xcode","parseSync","xcBuildConfiguration","getXCBuildConfigurationFromPbxproj","getProductBundleIdentifierFromBuildConfiguration","bundleIdentifierRaw","buildSettings","PRODUCT_BUNDLE_IDENTIFIER","trimQuotes","resolveXcodeBuildSetting","setting","updateBundleIdentifierForPbxproj","updateProductName","fs","writeFileSync","writeSync","nativeTarget","findFirstNativeTarget","getBuildConfigurationsForListId","buildConfigurationList","forEach","item","productName","split","pop","includes","PRODUCT_NAME","setBundleIdentifierForPbxproj","pbxprojPaths","getAllPBXProjectPaths","defaultBundleId","resetAllPlistBundleIdentifiers","infoPlistPaths","getAllInfoPlistPaths","plistPath","resetPlistBundleIdentifier","rawPlist","readFileSync","plistObject","plist","parse","format","pretty","indent","xml","build"],"sources":["../../src/ios/BundleIdentifier.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport type { PlistObject } from '@expo/plist';\nimport plist from '@expo/plist';\nimport assert from 'assert';\nimport fs from 'fs';\nimport type { XCBuildConfiguration } from 'xcode';\nimport xcode from 'xcode';\n\nimport type { InfoPlist } from './IosConfig.types';\nimport { getAllInfoPlistPaths, getAllPBXProjectPaths, getPBXProjectPath } from './Paths';\nimport { findFirstNativeTarget, getXCBuildConfigurationFromPbxproj } from './Target';\nimport type { ConfigPlugin, XcodeProject } from '../Plugin.types';\nimport type { ConfigurationSectionEntry } from './utils/Xcodeproj';\nimport { getBuildConfigurationsForListId, resolveXcodeBuildSetting } from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\nimport { withXcodeProject } from '../plugins/ios-plugins';\n\nexport const withBundleIdentifier: ConfigPlugin<{ bundleIdentifier?: string }> = (\n config,\n { bundleIdentifier }\n) => {\n return withXcodeProject(config, async (config) => {\n const bundleId = bundleIdentifier ?? config.ios?.bundleIdentifier;\n // Should never happen.\n assert(\n bundleId,\n '`bundleIdentifier` must be defined in the app config (`ios.bundleIdentifier`) or passed to the plugin `withBundleIdentifier`.'\n );\n\n config.modResults = updateBundleIdentifierForPbxprojObject(config.modResults, bundleId, false);\n\n return config;\n });\n};\n\nfunction getBundleIdentifier(config: Pick<ExpoConfig, 'ios'>): string | null {\n return config.ios?.bundleIdentifier ?? null;\n}\n\n/**\n * In Turtle v1 we set the bundleIdentifier directly on Info.plist rather\n * than in pbxproj\n */\nfunction setBundleIdentifier(config: ExpoConfig, infoPlist: InfoPlist): InfoPlist {\n const bundleIdentifier = getBundleIdentifier(config);\n\n if (!bundleIdentifier) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleIdentifier: bundleIdentifier,\n };\n}\n\n/**\n * Gets the bundle identifier defined in the Xcode project found in the project directory.\n *\n * A bundle identifier is stored as a value in XCBuildConfiguration entry.\n * Those entries exist for every pair (build target, build configuration).\n * Unless target name is passed, the first target defined in the pbxproj is used\n * (to keep compatibility with the inaccurate legacy implementation of this function).\n * The build configuration is usually 'Release' or 'Debug'. However, it could be any arbitrary string.\n * Defaults to 'Release'.\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} targetName Target name\n * @param {string} buildConfiguration Build configuration. Defaults to 'Release'.\n * @returns {string | null} bundle identifier of the Xcode project or null if the project is not configured\n */\nfunction getBundleIdentifierFromPbxproj(\n projectRoot: string,\n {\n targetName,\n buildConfiguration = 'Release',\n }: { targetName?: string; buildConfiguration?: string } = {}\n): string | null {\n let pbxprojPath: string;\n try {\n pbxprojPath = getPBXProjectPath(projectRoot);\n } catch {\n return null;\n }\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n\n const xcBuildConfiguration = getXCBuildConfigurationFromPbxproj(project, {\n targetName,\n buildConfiguration,\n });\n if (!xcBuildConfiguration) {\n return null;\n }\n return getProductBundleIdentifierFromBuildConfiguration(xcBuildConfiguration);\n}\n\nfunction getProductBundleIdentifierFromBuildConfiguration(\n xcBuildConfiguration: XCBuildConfiguration\n): string | null {\n const bundleIdentifierRaw = xcBuildConfiguration.buildSettings.PRODUCT_BUNDLE_IDENTIFIER;\n if (bundleIdentifierRaw) {\n const bundleIdentifier = trimQuotes(bundleIdentifierRaw);\n return resolveXcodeBuildSetting(\n bundleIdentifier,\n (setting) => xcBuildConfiguration.buildSettings[setting] as string | undefined\n );\n } else {\n return null;\n }\n}\n\n/**\n * Updates the bundle identifier for a given pbxproj\n *\n * @param {string} pbxprojPath Path to pbxproj file\n * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction updateBundleIdentifierForPbxproj(\n pbxprojPath: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n fs.writeFileSync(\n pbxprojPath,\n updateBundleIdentifierForPbxprojObject(project, bundleIdentifier, updateProductName).writeSync()\n );\n}\n\n/**\n * Updates the bundle identifier for a given pbxproj\n *\n * @param {string} project pbxproj file\n * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction updateBundleIdentifierForPbxprojObject(\n project: XcodeProject,\n bundleIdentifier: string,\n updateProductName: boolean = true\n) {\n const [, nativeTarget] = findFirstNativeTarget(project);\n\n getBuildConfigurationsForListId(project, nativeTarget.buildConfigurationList).forEach(\n ([, item]: ConfigurationSectionEntry) => {\n if (item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER === bundleIdentifier) {\n return;\n }\n\n item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER = `\"${bundleIdentifier}\"`;\n\n if (updateProductName) {\n const productName = bundleIdentifier.split('.').pop();\n if (!productName?.includes('$')) {\n item.buildSettings.PRODUCT_NAME = productName;\n }\n }\n }\n );\n return project;\n}\n\n/**\n * Updates the bundle identifier for pbx projects inside the ios directory of the given project root\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} bundleIdentifier Desired bundle identifier\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction setBundleIdentifierForPbxproj(\n projectRoot: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n // Get all pbx projects in the ${projectRoot}/ios directory\n let pbxprojPaths: string[] = [];\n try {\n pbxprojPaths = getAllPBXProjectPaths(projectRoot);\n } catch {}\n\n for (const pbxprojPath of pbxprojPaths) {\n updateBundleIdentifierForPbxproj(pbxprojPath, bundleIdentifier, updateProductName);\n }\n}\n\n/**\n * Reset bundle identifier field in Info.plist to use PRODUCT_BUNDLE_IDENTIFIER, as recommended by Apple.\n */\n\nconst defaultBundleId = '$(PRODUCT_BUNDLE_IDENTIFIER)';\n\nfunction resetAllPlistBundleIdentifiers(projectRoot: string): void {\n const infoPlistPaths = getAllInfoPlistPaths(projectRoot);\n\n for (const plistPath of infoPlistPaths) {\n resetPlistBundleIdentifier(plistPath);\n }\n}\n\nfunction resetPlistBundleIdentifier(plistPath: string): void {\n const rawPlist = fs.readFileSync(plistPath, 'utf8');\n const plistObject = plist.parse(rawPlist) as PlistObject;\n\n if (plistObject.CFBundleIdentifier) {\n if (plistObject.CFBundleIdentifier === defaultBundleId) return;\n\n // attempt to match default Info.plist format\n const format = { pretty: true, indent: `\\t` };\n\n const xml = plist.build(\n {\n ...plistObject,\n CFBundleIdentifier: defaultBundleId,\n },\n format\n );\n\n if (xml !== rawPlist) {\n fs.writeFileSync(plistPath, xml);\n }\n }\n}\n\nexport {\n getBundleIdentifier,\n setBundleIdentifier,\n getBundleIdentifierFromPbxproj,\n updateBundleIdentifierForPbxproj,\n setBundleIdentifierForPbxproj,\n resetAllPlistBundleIdentifiers,\n resetPlistBundleIdentifier,\n};\n"],"mappings":";;;;;;;;;;;;;AA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AC3D,MAAME,QAAQ,GAAGvB,aAAE,CAACwB,YAAY,CAACH,SAAS,EAAE,MAAM,CAAC;EACnD,MAAMI,WAAW,GAAGC,gBAAK,CAACC,KAAK,CAACJ,QAAQ,CAAgB;EAExD,IAAIE,WAAW,CAAC9C,kBAAkB,EAAE;IAClC,IAAI8C,WAAW,CAAC9C,kBAAkB,KAAKsC,eAAe,EAAE;;IAExD;IACA,MAAMW,MAAM,GAAG;MAAEC,MAAM,EAAE,IAAI;MAAEC,MAAM,EAAE;IAAK,CAAC;IAE7C,MAAMC,GAAG,GAAGL,gBAAK,CAACM,KAAK,CACrB;MACE,GAAGP,WAAW;MACd9C,kBAAkB,EAAEsC;IACtB,CAAC,EACDW,MACF,CAAC;IAED,IAAIG,GAAG,KAAKR,QAAQ,EAAE;MACpBvB,aAAE,CAACC,aAAa,CAACoB,SAAS,EAAEU,GAAG,CAAC;IAClC;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"BundleIdentifier.js","names":["_plist","data","_interopRequireDefault","require","_assert","_fs","_xcode","_Paths","_Target","_Xcodeproj","_string","_iosPlugins","e","__esModule","default","withBundleIdentifier","config","bundleIdentifier","withXcodeProject","bundleId","ios","assert","modResults","updateBundleIdentifierForPbxprojObject","exports","getBundleIdentifier","setBundleIdentifier","infoPlist","CFBundleIdentifier","getBundleIdentifierFromPbxproj","projectRoot","targetName","buildConfiguration","pbxprojPath","getPBXProjectPath","project","xcode","parseSync","xcBuildConfiguration","getXCBuildConfigurationFromPbxproj","getProductBundleIdentifierFromBuildConfiguration","bundleIdentifierRaw","buildSettings","PRODUCT_BUNDLE_IDENTIFIER","trimQuotes","resolveXcodeBuildSetting","setting","updateBundleIdentifierForPbxproj","updateProductName","fs","writeFileSync","writeSync","nativeTarget","findFirstNativeTarget","getBuildConfigurationsForListId","buildConfigurationList","forEach","item","productName","split","pop","includes","PRODUCT_NAME","setBundleIdentifierForPbxproj","pbxprojPaths","getAllPBXProjectPaths","defaultBundleId","resetAllPlistBundleIdentifiers","infoPlistPaths","getAllInfoPlistPaths","plistPath","resetPlistBundleIdentifier","rawPlist","readFileSync","plistObject","plist","parse","format","pretty","indent","xml","build"],"sources":["../../src/ios/BundleIdentifier.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport type { PlistObject } from '@expo/plist';\nimport plist from '@expo/plist';\nimport assert from 'assert';\nimport fs from 'fs';\nimport type { XCBuildConfiguration } from 'xcode';\nimport xcode from 'xcode';\n\nimport type { InfoPlist } from './IosConfig.types';\nimport { getAllInfoPlistPaths, getAllPBXProjectPaths, getPBXProjectPath } from './Paths';\nimport { findFirstNativeTarget, getXCBuildConfigurationFromPbxproj } from './Target';\nimport type { ConfigPlugin, XcodeProject } from '../Plugin.types';\nimport type { ConfigurationSectionEntry } from './utils/Xcodeproj';\nimport { getBuildConfigurationsForListId, resolveXcodeBuildSetting } from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\nimport { withXcodeProject } from '../plugins/ios-plugins';\n\nexport const withBundleIdentifier: ConfigPlugin<{ bundleIdentifier?: string }> = (\n config,\n { bundleIdentifier }\n) => {\n return withXcodeProject(config, async (config) => {\n const bundleId = bundleIdentifier ?? config.ios?.bundleIdentifier;\n // Should never happen.\n assert(\n bundleId,\n '`bundleIdentifier` must be defined in the app config (`ios.bundleIdentifier`) or passed to the plugin `withBundleIdentifier`.'\n );\n\n config.modResults = updateBundleIdentifierForPbxprojObject(config.modResults, bundleId, false);\n\n return config;\n });\n};\n\nfunction getBundleIdentifier(config: Pick<ExpoConfig, 'ios'>): string | null {\n return config.ios?.bundleIdentifier ?? null;\n}\n\n/**\n * In Turtle v1 we set the bundleIdentifier directly on Info.plist rather\n * than in pbxproj\n */\nfunction setBundleIdentifier(config: ExpoConfig, infoPlist: InfoPlist): InfoPlist {\n const bundleIdentifier = getBundleIdentifier(config);\n\n if (!bundleIdentifier) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleIdentifier: bundleIdentifier,\n };\n}\n\n/**\n * Gets the bundle identifier defined in the Xcode project found in the project directory.\n *\n * A bundle identifier is stored as a value in XCBuildConfiguration entry.\n * Those entries exist for every pair (build target, build configuration).\n * Unless target name is passed, the first target defined in the pbxproj is used\n * (to keep compatibility with the inaccurate legacy implementation of this function).\n * The build configuration is usually 'Release' or 'Debug'. However, it could be any arbitrary string.\n * Defaults to 'Release'.\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} targetName Target name\n * @param {string} buildConfiguration Build configuration. Defaults to 'Release'.\n * @returns {string | null} bundle identifier of the Xcode project or null if the project is not configured\n */\nfunction getBundleIdentifierFromPbxproj(\n projectRoot: string,\n {\n targetName,\n buildConfiguration = 'Release',\n }: { targetName?: string; buildConfiguration?: string } = {}\n): string | null {\n let pbxprojPath: string;\n try {\n pbxprojPath = getPBXProjectPath(projectRoot);\n } catch {\n return null;\n }\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n\n const xcBuildConfiguration = getXCBuildConfigurationFromPbxproj(project, {\n targetName,\n buildConfiguration,\n });\n if (!xcBuildConfiguration) {\n return null;\n }\n return getProductBundleIdentifierFromBuildConfiguration(xcBuildConfiguration);\n}\n\nfunction getProductBundleIdentifierFromBuildConfiguration(\n xcBuildConfiguration: XCBuildConfiguration\n): string | null {\n const bundleIdentifierRaw = xcBuildConfiguration.buildSettings.PRODUCT_BUNDLE_IDENTIFIER;\n if (bundleIdentifierRaw) {\n const bundleIdentifier = trimQuotes(bundleIdentifierRaw);\n return resolveXcodeBuildSetting(\n bundleIdentifier,\n (setting) => xcBuildConfiguration.buildSettings[setting] as string | undefined\n );\n } else {\n return null;\n }\n}\n\n/**\n * Updates the bundle identifier for a given pbxproj\n *\n * @param {string} pbxprojPath Path to pbxproj file\n * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction updateBundleIdentifierForPbxproj(\n pbxprojPath: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n fs.writeFileSync(\n pbxprojPath,\n updateBundleIdentifierForPbxprojObject(project, bundleIdentifier, updateProductName).writeSync()\n );\n}\n\n/**\n * Updates the bundle identifier for a given pbxproj\n *\n * @param {string} project pbxproj file\n * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction updateBundleIdentifierForPbxprojObject(\n project: XcodeProject,\n bundleIdentifier: string,\n updateProductName: boolean = true\n) {\n const [, nativeTarget] = findFirstNativeTarget(project);\n\n getBuildConfigurationsForListId(project, nativeTarget.buildConfigurationList).forEach(\n ([, item]: ConfigurationSectionEntry) => {\n if (item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER === bundleIdentifier) {\n return;\n }\n\n item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER = `\"${bundleIdentifier}\"`;\n\n if (updateProductName) {\n const productName = bundleIdentifier.split('.').pop();\n if (!productName?.includes('$')) {\n item.buildSettings.PRODUCT_NAME = productName;\n }\n }\n }\n );\n return project;\n}\n\n/**\n * Updates the bundle identifier for pbx projects inside the ios directory of the given project root\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} bundleIdentifier Desired bundle identifier\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction setBundleIdentifierForPbxproj(\n projectRoot: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n // Get all pbx projects in the ${projectRoot}/ios directory\n let pbxprojPaths: string[] = [];\n try {\n pbxprojPaths = getAllPBXProjectPaths(projectRoot);\n } catch {}\n\n for (const pbxprojPath of pbxprojPaths) {\n updateBundleIdentifierForPbxproj(pbxprojPath, bundleIdentifier, updateProductName);\n }\n}\n\n/**\n * Reset bundle identifier field in Info.plist to use PRODUCT_BUNDLE_IDENTIFIER, as recommended by Apple.\n */\n\nconst defaultBundleId = '$(PRODUCT_BUNDLE_IDENTIFIER)';\n\nfunction resetAllPlistBundleIdentifiers(projectRoot: string): void {\n const infoPlistPaths = getAllInfoPlistPaths(projectRoot);\n\n for (const plistPath of infoPlistPaths) {\n resetPlistBundleIdentifier(plistPath);\n }\n}\n\nfunction resetPlistBundleIdentifier(plistPath: string): void {\n const rawPlist = fs.readFileSync(plistPath, 'utf8');\n const plistObject = plist.parse(rawPlist) as PlistObject;\n\n if (plistObject.CFBundleIdentifier) {\n if (plistObject.CFBundleIdentifier === defaultBundleId) return;\n\n // attempt to match default Info.plist format\n const format = { pretty: true, indent: `\\t` };\n\n const xml = plist.build(\n {\n ...plistObject,\n CFBundleIdentifier: defaultBundleId,\n },\n format\n );\n\n if (xml !== rawPlist) {\n fs.writeFileSync(plistPath, xml);\n }\n }\n}\n\nexport {\n getBundleIdentifier,\n setBundleIdentifier,\n getBundleIdentifierFromPbxproj,\n updateBundleIdentifierForPbxproj,\n setBundleIdentifierForPbxproj,\n resetAllPlistBundleIdentifiers,\n resetPlistBundleIdentifier,\n};\n"],"mappings":";;;;;;;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,OAA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,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getDeploymentTarget = getDeploymentTarget;
7
5
  exports.setDeploymentTargetForBuildConfiguration = setDeploymentTargetForBuildConfiguration;
8
6
  exports.updateDeploymentTargetForPbxproj = updateDeploymentTargetForPbxproj;