@expo/config-plugins 5.0.4 → 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.
- package/build/Plugin.types.d.ts +7 -7
- package/build/Plugin.types.js +0 -9
- package/build/Plugin.types.js.map +1 -1
- package/build/android/AllowBackup.js +0 -15
- package/build/android/AllowBackup.js.map +1 -1
- package/build/android/BuildProperties.js +2 -16
- package/build/android/BuildProperties.js.map +1 -1
- package/build/android/Colors.js +3 -25
- package/build/android/Colors.js.map +1 -1
- package/build/android/EasBuild.js +2 -22
- package/build/android/EasBuild.js.map +1 -1
- package/build/android/EasBuildGradleScript.js.map +1 -1
- package/build/android/GoogleMapsApiKey.js +0 -12
- package/build/android/GoogleMapsApiKey.js.map +1 -1
- package/build/android/GoogleServices.js +10 -48
- package/build/android/GoogleServices.js.map +1 -1
- package/build/android/IntentFilters.d.ts +1 -1
- package/build/android/IntentFilters.js +8 -24
- package/build/android/IntentFilters.js.map +1 -1
- package/build/android/Manifest.d.ts +19 -19
- package/build/android/Manifest.js +7 -66
- package/build/android/Manifest.js.map +1 -1
- package/build/android/Name.js +6 -27
- package/build/android/Name.js.map +1 -1
- package/build/android/Orientation.js +2 -12
- package/build/android/Orientation.js.map +1 -1
- package/build/android/Package.js +26 -111
- package/build/android/Package.js.map +1 -1
- package/build/android/Paths.d.ts +2 -2
- package/build/android/Paths.js +0 -47
- package/build/android/Paths.js.map +1 -1
- package/build/android/Permissions.js +8 -52
- package/build/android/Permissions.js.map +1 -1
- package/build/android/PrimaryColor.js +0 -18
- package/build/android/PrimaryColor.js.map +1 -1
- package/build/android/Properties.d.ts +1 -1
- package/build/android/Properties.js +0 -9
- package/build/android/Properties.js.map +1 -1
- package/build/android/Resources.d.ts +4 -4
- package/build/android/Resources.js +9 -29
- package/build/android/Resources.js.map +1 -1
- package/build/android/Scheme.d.ts +1 -1
- package/build/android/Scheme.js +13 -66
- package/build/android/Scheme.js.map +1 -1
- package/build/android/StatusBar.js +5 -33
- package/build/android/StatusBar.js.map +1 -1
- package/build/android/Strings.js +0 -14
- package/build/android/Strings.js.map +1 -1
- package/build/android/Styles.js +7 -34
- package/build/android/Styles.js.map +1 -1
- package/build/android/Updates.d.ts +2 -0
- package/build/android/Updates.js +50 -47
- package/build/android/Updates.js.map +1 -1
- package/build/android/Version.js +3 -29
- package/build/android/Version.js.map +1 -1
- package/build/android/WindowSoftInputMode.js +0 -14
- package/build/android/WindowSoftInputMode.js.map +1 -1
- package/build/android/codeMod.js +6 -22
- package/build/android/codeMod.js.map +1 -1
- package/build/android/index.js +0 -94
- package/build/android/index.js.map +1 -1
- package/build/index.js +2 -65
- package/build/index.js.map +1 -1
- package/build/ios/Bitcode.d.ts +1 -1
- package/build/ios/Bitcode.js +8 -28
- package/build/ios/Bitcode.js.map +1 -1
- package/build/ios/BuildProperties.js +2 -14
- package/build/ios/BuildProperties.js.map +1 -1
- package/build/ios/BuildScheme.js +2 -34
- package/build/ios/BuildScheme.js.map +1 -1
- package/build/ios/BundleIdentifier.js +13 -72
- package/build/ios/BundleIdentifier.js.map +1 -1
- package/build/ios/DeviceFamily.js +6 -24
- package/build/ios/DeviceFamily.js.map +1 -1
- package/build/ios/Entitlements.js +4 -45
- package/build/ios/Entitlements.js.map +1 -1
- package/build/ios/Google.d.ts +2 -2
- package/build/ios/Google.js +11 -66
- package/build/ios/Google.js.map +1 -1
- package/build/ios/IosConfig.types.d.ts +6 -11
- package/build/ios/IosConfig.types.js.map +1 -1
- package/build/ios/Locales.d.ts +3 -3
- package/build/ios/Locales.js +12 -43
- package/build/ios/Locales.js.map +1 -1
- package/build/ios/Maps.js +15 -53
- package/build/ios/Maps.js.map +1 -1
- package/build/ios/Name.js +7 -31
- package/build/ios/Name.js.map +1 -1
- package/build/ios/Orientation.js +2 -10
- package/build/ios/Orientation.js.map +1 -1
- package/build/ios/Paths.d.ts +2 -2
- package/build/ios/Paths.js +8 -73
- package/build/ios/Paths.js.map +1 -1
- package/build/ios/Permissions.js +1 -16
- package/build/ios/Permissions.js.map +1 -1
- package/build/ios/ProvisioningProfile.d.ts +1 -1
- package/build/ios/ProvisioningProfile.js +0 -18
- package/build/ios/ProvisioningProfile.js.map +1 -1
- package/build/ios/RequiresFullScreen.js +19 -31
- package/build/ios/RequiresFullScreen.js.map +1 -1
- package/build/ios/Scheme.js +10 -32
- package/build/ios/Scheme.js.map +1 -1
- package/build/ios/Swift.js +16 -50
- package/build/ios/Swift.js.map +1 -1
- package/build/ios/Target.js +0 -30
- package/build/ios/Target.js.map +1 -1
- package/build/ios/Updates.js +10 -49
- package/build/ios/Updates.js.map +1 -1
- package/build/ios/UsesNonExemptEncryption.js +4 -10
- package/build/ios/UsesNonExemptEncryption.js.map +1 -1
- package/build/ios/Version.js +4 -11
- package/build/ios/Version.js.map +1 -1
- package/build/ios/XcodeProjectFile.js +5 -23
- package/build/ios/XcodeProjectFile.js.map +1 -1
- package/build/ios/codeMod.js +19 -60
- package/build/ios/codeMod.js.map +1 -1
- package/build/ios/index.js +0 -97
- package/build/ios/index.js.map +1 -1
- package/build/ios/utils/Xcodeproj.d.ts +6 -6
- package/build/ios/utils/Xcodeproj.js +15 -101
- package/build/ios/utils/Xcodeproj.js.map +1 -1
- package/build/ios/utils/getInfoPlistPath.js +2 -15
- package/build/ios/utils/getInfoPlistPath.js.map +1 -1
- package/build/ios/utils/string.js +0 -1
- package/build/ios/utils/string.js.map +1 -1
- package/build/plugins/android-plugins.d.ts +2 -2
- package/build/plugins/android-plugins.js +11 -42
- package/build/plugins/android-plugins.js.map +1 -1
- package/build/plugins/createBaseMod.d.ts +3 -3
- package/build/plugins/createBaseMod.js +8 -25
- package/build/plugins/createBaseMod.js.map +1 -1
- package/build/plugins/ios-plugins.d.ts +2 -2
- package/build/plugins/ios-plugins.js +8 -48
- package/build/plugins/ios-plugins.js.map +1 -1
- package/build/plugins/mod-compiler.js +21 -72
- package/build/plugins/mod-compiler.js.map +1 -1
- package/build/plugins/withAndroidBaseMods.d.ts +1 -1
- package/build/plugins/withAndroidBaseMods.js +4 -89
- package/build/plugins/withAndroidBaseMods.js.map +1 -1
- package/build/plugins/withDangerousMod.js +0 -5
- package/build/plugins/withDangerousMod.js.map +1 -1
- package/build/plugins/withIosBaseMods.d.ts +1 -1
- package/build/plugins/withIosBaseMods.js +26 -118
- package/build/plugins/withIosBaseMods.js.map +1 -1
- package/build/plugins/withMod.d.ts +1 -1
- package/build/plugins/withMod.js +24 -59
- package/build/plugins/withMod.js.map +1 -1
- package/build/plugins/withPlugins.js +0 -9
- package/build/plugins/withPlugins.js.map +1 -1
- package/build/plugins/withRunOnce.js +3 -9
- package/build/plugins/withRunOnce.js.map +1 -1
- package/build/plugins/withStaticPlugin.js +21 -43
- package/build/plugins/withStaticPlugin.js.map +1 -1
- package/build/utils/BuildProperties.types.d.ts +2 -2
- package/build/utils/BuildProperties.types.js.map +1 -1
- package/build/utils/Updates.d.ts +3 -1
- package/build/utils/Updates.js +18 -77
- package/build/utils/Updates.js.map +1 -1
- package/build/utils/XML.d.ts +1 -1
- package/build/utils/XML.js +7 -44
- package/build/utils/XML.js.map +1 -1
- package/build/utils/commonCodeMod.js +2 -10
- package/build/utils/commonCodeMod.js.map +1 -1
- package/build/utils/errors.d.ts +1 -1
- package/build/utils/errors.js +3 -11
- package/build/utils/errors.js.map +1 -1
- package/build/utils/fs.js +1 -12
- package/build/utils/fs.js.map +1 -1
- package/build/utils/generateCode.d.ts +1 -1
- package/build/utils/generateCode.js +8 -25
- package/build/utils/generateCode.js.map +1 -1
- package/build/utils/history.d.ts +1 -1
- package/build/utils/history.js +0 -6
- package/build/utils/history.js.map +1 -1
- package/build/utils/matchBrackets.d.ts +3 -3
- package/build/utils/matchBrackets.js +2 -17
- package/build/utils/matchBrackets.js.map +1 -1
- package/build/utils/modules.js +0 -10
- package/build/utils/modules.js.map +1 -1
- package/build/utils/obj.js +0 -4
- package/build/utils/obj.js.map +1 -1
- package/build/utils/plugin-resolver.js +25 -69
- package/build/utils/plugin-resolver.js.map +1 -1
- package/build/utils/sortObject.js +4 -10
- package/build/utils/sortObject.js.map +1 -1
- package/build/utils/versions.js +0 -10
- package/build/utils/versions.js.map +1 -1
- package/build/utils/warnings.js +1 -9
- package/build/utils/warnings.js.map +1 -1
- package/package.json +5 -5
|
@@ -5,163 +5,115 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getIosModFileProviders = getIosModFileProviders;
|
|
7
7
|
exports.withIosBaseMods = withIosBaseMods;
|
|
8
|
-
|
|
9
8
|
function _jsonFile() {
|
|
10
9
|
const data = _interopRequireDefault(require("@expo/json-file"));
|
|
11
|
-
|
|
12
10
|
_jsonFile = function () {
|
|
13
11
|
return data;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
return data;
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
function _plist() {
|
|
20
16
|
const data = _interopRequireDefault(require("@expo/plist"));
|
|
21
|
-
|
|
22
17
|
_plist = function () {
|
|
23
18
|
return data;
|
|
24
19
|
};
|
|
25
|
-
|
|
26
20
|
return data;
|
|
27
21
|
}
|
|
28
|
-
|
|
29
22
|
function _assert() {
|
|
30
23
|
const data = _interopRequireDefault(require("assert"));
|
|
31
|
-
|
|
32
24
|
_assert = function () {
|
|
33
25
|
return data;
|
|
34
26
|
};
|
|
35
|
-
|
|
36
27
|
return data;
|
|
37
28
|
}
|
|
38
|
-
|
|
39
29
|
function _fs() {
|
|
40
30
|
const data = _interopRequireWildcard(require("fs"));
|
|
41
|
-
|
|
42
31
|
_fs = function () {
|
|
43
32
|
return data;
|
|
44
33
|
};
|
|
45
|
-
|
|
46
34
|
return data;
|
|
47
35
|
}
|
|
48
|
-
|
|
49
36
|
function _path() {
|
|
50
37
|
const data = _interopRequireDefault(require("path"));
|
|
51
|
-
|
|
52
38
|
_path = function () {
|
|
53
39
|
return data;
|
|
54
40
|
};
|
|
55
|
-
|
|
56
41
|
return data;
|
|
57
42
|
}
|
|
58
|
-
|
|
59
43
|
function _xcode() {
|
|
60
44
|
const data = _interopRequireDefault(require("xcode"));
|
|
61
|
-
|
|
62
45
|
_xcode = function () {
|
|
63
46
|
return data;
|
|
64
47
|
};
|
|
65
|
-
|
|
66
48
|
return data;
|
|
67
49
|
}
|
|
68
|
-
|
|
69
50
|
function _ios() {
|
|
70
51
|
const data = require("../ios");
|
|
71
|
-
|
|
72
52
|
_ios = function () {
|
|
73
53
|
return data;
|
|
74
54
|
};
|
|
75
|
-
|
|
76
55
|
return data;
|
|
77
56
|
}
|
|
78
|
-
|
|
79
57
|
function _Entitlements() {
|
|
80
58
|
const data = require("../ios/Entitlements");
|
|
81
|
-
|
|
82
59
|
_Entitlements = function () {
|
|
83
60
|
return data;
|
|
84
61
|
};
|
|
85
|
-
|
|
86
62
|
return data;
|
|
87
63
|
}
|
|
88
|
-
|
|
89
64
|
function _Xcodeproj() {
|
|
90
65
|
const data = require("../ios/utils/Xcodeproj");
|
|
91
|
-
|
|
92
66
|
_Xcodeproj = function () {
|
|
93
67
|
return data;
|
|
94
68
|
};
|
|
95
|
-
|
|
96
69
|
return data;
|
|
97
70
|
}
|
|
98
|
-
|
|
99
71
|
function _getInfoPlistPath() {
|
|
100
72
|
const data = require("../ios/utils/getInfoPlistPath");
|
|
101
|
-
|
|
102
73
|
_getInfoPlistPath = function () {
|
|
103
74
|
return data;
|
|
104
75
|
};
|
|
105
|
-
|
|
106
76
|
return data;
|
|
107
77
|
}
|
|
108
|
-
|
|
109
78
|
function _modules() {
|
|
110
79
|
const data = require("../utils/modules");
|
|
111
|
-
|
|
112
80
|
_modules = function () {
|
|
113
81
|
return data;
|
|
114
82
|
};
|
|
115
|
-
|
|
116
83
|
return data;
|
|
117
84
|
}
|
|
118
|
-
|
|
119
85
|
function _sortObject() {
|
|
120
86
|
const data = require("../utils/sortObject");
|
|
121
|
-
|
|
122
87
|
_sortObject = function () {
|
|
123
88
|
return data;
|
|
124
89
|
};
|
|
125
|
-
|
|
126
90
|
return data;
|
|
127
91
|
}
|
|
128
|
-
|
|
129
92
|
function _warnings() {
|
|
130
93
|
const data = require("../utils/warnings");
|
|
131
|
-
|
|
132
94
|
_warnings = function () {
|
|
133
95
|
return data;
|
|
134
96
|
};
|
|
135
|
-
|
|
136
97
|
return data;
|
|
137
98
|
}
|
|
138
|
-
|
|
139
99
|
function _createBaseMod() {
|
|
140
100
|
const data = require("./createBaseMod");
|
|
141
|
-
|
|
142
101
|
_createBaseMod = function () {
|
|
143
102
|
return data;
|
|
144
103
|
};
|
|
145
|
-
|
|
146
104
|
return data;
|
|
147
105
|
}
|
|
148
|
-
|
|
149
106
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
150
|
-
|
|
151
107
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
152
|
-
|
|
153
108
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
154
|
-
|
|
155
109
|
const {
|
|
156
110
|
readFile,
|
|
157
111
|
writeFile
|
|
158
112
|
} = _fs().promises;
|
|
159
|
-
|
|
160
113
|
function getEntitlementsPlistTemplate() {
|
|
161
114
|
// TODO: Fetch the versioned template file if possible
|
|
162
115
|
return {};
|
|
163
116
|
}
|
|
164
|
-
|
|
165
117
|
function getInfoPlistTemplate() {
|
|
166
118
|
// TODO: Fetch the versioned template file if possible
|
|
167
119
|
return {
|
|
@@ -187,19 +139,15 @@ function getInfoPlistTemplate() {
|
|
|
187
139
|
UIStatusBarStyle: 'UIStatusBarStyleDefault'
|
|
188
140
|
};
|
|
189
141
|
}
|
|
190
|
-
|
|
191
142
|
const defaultProviders = {
|
|
192
143
|
dangerous: (0, _createBaseMod().provider)({
|
|
193
144
|
getFilePath() {
|
|
194
145
|
return '';
|
|
195
146
|
},
|
|
196
|
-
|
|
197
147
|
async read() {
|
|
198
148
|
return {};
|
|
199
149
|
},
|
|
200
|
-
|
|
201
150
|
async write() {}
|
|
202
|
-
|
|
203
151
|
}),
|
|
204
152
|
// Append a rule to supply AppDelegate data to mods on `mods.ios.appDelegate`
|
|
205
153
|
appDelegate: (0, _createBaseMod().provider)({
|
|
@@ -211,11 +159,9 @@ const defaultProviders = {
|
|
|
211
159
|
// TODO: Get application AppDelegate file from pbxproj.
|
|
212
160
|
return _ios().Paths.getAppDelegateFilePath(projectRoot);
|
|
213
161
|
},
|
|
214
|
-
|
|
215
162
|
async read(filePath) {
|
|
216
163
|
return _ios().Paths.getFileInfo(filePath);
|
|
217
164
|
},
|
|
218
|
-
|
|
219
165
|
async write(filePath, {
|
|
220
166
|
modResults: {
|
|
221
167
|
contents
|
|
@@ -223,12 +169,10 @@ const defaultProviders = {
|
|
|
223
169
|
}) {
|
|
224
170
|
await writeFile(filePath, contents);
|
|
225
171
|
}
|
|
226
|
-
|
|
227
172
|
}),
|
|
228
173
|
// Append a rule to supply Expo.plist data to mods on `mods.ios.expoPlist`
|
|
229
174
|
expoPlist: (0, _createBaseMod().provider)({
|
|
230
175
|
isIntrospective: true,
|
|
231
|
-
|
|
232
176
|
getFilePath({
|
|
233
177
|
modRequest: {
|
|
234
178
|
platformProjectRoot,
|
|
@@ -236,10 +180,8 @@ const defaultProviders = {
|
|
|
236
180
|
}
|
|
237
181
|
}) {
|
|
238
182
|
const supportingDirectory = _path().default.join(platformProjectRoot, projectName, 'Supporting');
|
|
239
|
-
|
|
240
183
|
return _path().default.resolve(supportingDirectory, 'Expo.plist');
|
|
241
184
|
},
|
|
242
|
-
|
|
243
185
|
async read(filePath, {
|
|
244
186
|
modRequest: {
|
|
245
187
|
introspect
|
|
@@ -251,11 +193,9 @@ const defaultProviders = {
|
|
|
251
193
|
if (introspect) {
|
|
252
194
|
return {};
|
|
253
195
|
}
|
|
254
|
-
|
|
255
196
|
throw error;
|
|
256
197
|
}
|
|
257
198
|
},
|
|
258
|
-
|
|
259
199
|
async write(filePath, {
|
|
260
200
|
modResults,
|
|
261
201
|
modRequest: {
|
|
@@ -265,10 +205,8 @@ const defaultProviders = {
|
|
|
265
205
|
if (introspect) {
|
|
266
206
|
return;
|
|
267
207
|
}
|
|
268
|
-
|
|
269
208
|
await writeFile(filePath, _plist().default.build((0, _sortObject().sortObject)(modResults)));
|
|
270
209
|
}
|
|
271
|
-
|
|
272
210
|
}),
|
|
273
211
|
// Append a rule to supply .xcodeproj data to mods on `mods.ios.xcodeproj`
|
|
274
212
|
xcodeproj: (0, _createBaseMod().provider)({
|
|
@@ -279,54 +217,47 @@ const defaultProviders = {
|
|
|
279
217
|
}) {
|
|
280
218
|
return _ios().Paths.getPBXProjectPath(projectRoot);
|
|
281
219
|
},
|
|
282
|
-
|
|
283
220
|
async read(filePath) {
|
|
284
221
|
const project = _xcode().default.project(filePath);
|
|
285
|
-
|
|
286
222
|
project.parseSync();
|
|
287
223
|
return project;
|
|
288
224
|
},
|
|
289
|
-
|
|
290
225
|
async write(filePath, {
|
|
291
226
|
modResults
|
|
292
227
|
}) {
|
|
293
228
|
await writeFile(filePath, modResults.writeSync());
|
|
294
229
|
}
|
|
295
|
-
|
|
296
230
|
}),
|
|
297
231
|
// Append a rule to supply Info.plist data to mods on `mods.ios.infoPlist`
|
|
298
232
|
infoPlist: (0, _createBaseMod().provider)({
|
|
299
233
|
isIntrospective: true,
|
|
300
|
-
|
|
301
234
|
async getFilePath(config) {
|
|
302
235
|
let project = null;
|
|
303
|
-
|
|
304
236
|
try {
|
|
305
237
|
project = (0, _Xcodeproj().getPbxproj)(config.modRequest.projectRoot);
|
|
306
|
-
} catch {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
238
|
+
} catch {
|
|
239
|
+
// noop
|
|
240
|
+
}
|
|
310
241
|
|
|
242
|
+
// Only check / warn if a project actually exists, this'll provide
|
|
243
|
+
// more accurate warning messages for users in managed projects.
|
|
311
244
|
if (project) {
|
|
312
245
|
const infoPlistBuildProperty = (0, _getInfoPlistPath().getInfoPlistPathFromPbxproj)(project);
|
|
313
|
-
|
|
314
246
|
if (infoPlistBuildProperty) {
|
|
315
247
|
//: [root]/myapp/ios/MyApp/Info.plist
|
|
316
|
-
const infoPlistPath = _path().default.join(
|
|
317
|
-
|
|
248
|
+
const infoPlistPath = _path().default.join(
|
|
249
|
+
//: myapp/ios
|
|
250
|
+
config.modRequest.platformProjectRoot,
|
|
251
|
+
//: MyApp/Info.plist
|
|
318
252
|
infoPlistBuildProperty);
|
|
319
|
-
|
|
320
253
|
if ((0, _modules().fileExists)(infoPlistPath)) {
|
|
321
254
|
return infoPlistPath;
|
|
322
255
|
}
|
|
323
|
-
|
|
324
256
|
(0, _warnings().addWarningIOS)('mods.ios.infoPlist', `Info.plist file linked to Xcode project does not exist: ${infoPlistPath}`);
|
|
325
257
|
} else {
|
|
326
258
|
(0, _warnings().addWarningIOS)('mods.ios.infoPlist', 'Failed to find Info.plist linked to Xcode project.');
|
|
327
259
|
}
|
|
328
260
|
}
|
|
329
|
-
|
|
330
261
|
try {
|
|
331
262
|
// Fallback on glob...
|
|
332
263
|
return await _ios().Paths.getInfoPlistPath(config.modRequest.projectRoot);
|
|
@@ -335,18 +266,15 @@ const defaultProviders = {
|
|
|
335
266
|
// fallback to an empty string in introspection mode.
|
|
336
267
|
return '';
|
|
337
268
|
}
|
|
338
|
-
|
|
339
269
|
throw error;
|
|
340
270
|
}
|
|
341
271
|
},
|
|
342
|
-
|
|
343
272
|
async read(filePath, config) {
|
|
344
273
|
// Apply all of the Info.plist values to the expo.ios.infoPlist object
|
|
345
274
|
// TODO: Remove this in favor of just overwriting the Info.plist with the Expo object. This will enable people to actually remove values.
|
|
346
275
|
if (!config.ios) config.ios = {};
|
|
347
276
|
if (!config.ios.infoPlist) config.ios.infoPlist = {};
|
|
348
277
|
let modResults;
|
|
349
|
-
|
|
350
278
|
try {
|
|
351
279
|
const contents = await readFile(filePath, 'utf8');
|
|
352
280
|
(0, _assert().default)(contents, 'Info.plist is empty');
|
|
@@ -355,42 +283,36 @@ const defaultProviders = {
|
|
|
355
283
|
// Throw errors in introspection mode.
|
|
356
284
|
if (!config.modRequest.introspect) {
|
|
357
285
|
throw error;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
|
|
286
|
+
}
|
|
287
|
+
// Fallback to using the infoPlist object from the Expo config.
|
|
361
288
|
modResults = getInfoPlistTemplate();
|
|
362
289
|
}
|
|
363
|
-
|
|
364
|
-
|
|
290
|
+
config.ios.infoPlist = {
|
|
291
|
+
...(modResults || {}),
|
|
365
292
|
...config.ios.infoPlist
|
|
366
293
|
};
|
|
367
294
|
return config.ios.infoPlist;
|
|
368
295
|
},
|
|
369
|
-
|
|
370
296
|
async write(filePath, config) {
|
|
371
297
|
// Update the contents of the static infoPlist object
|
|
372
298
|
if (!config.ios) {
|
|
373
299
|
config.ios = {};
|
|
374
300
|
}
|
|
301
|
+
config.ios.infoPlist = config.modResults;
|
|
375
302
|
|
|
376
|
-
|
|
377
|
-
|
|
303
|
+
// Return early without writing, in introspection mode.
|
|
378
304
|
if (config.modRequest.introspect) {
|
|
379
305
|
return;
|
|
380
306
|
}
|
|
381
|
-
|
|
382
307
|
await writeFile(filePath, _plist().default.build((0, _sortObject().sortObject)(config.modResults)));
|
|
383
308
|
}
|
|
384
|
-
|
|
385
309
|
}),
|
|
386
310
|
// Append a rule to supply .entitlements data to mods on `mods.ios.entitlements`
|
|
387
311
|
entitlements: (0, _createBaseMod().provider)({
|
|
388
312
|
isIntrospective: true,
|
|
389
|
-
|
|
390
313
|
async getFilePath(config) {
|
|
391
314
|
try {
|
|
392
315
|
var _Entitlements$getEnti;
|
|
393
|
-
|
|
394
316
|
(0, _Entitlements().ensureApplicationTargetEntitlementsFileConfigured)(config.modRequest.projectRoot);
|
|
395
317
|
return (_Entitlements$getEnti = _ios().Entitlements.getEntitlementsPath(config.modRequest.projectRoot)) !== null && _Entitlements$getEnti !== void 0 ? _Entitlements$getEnti : '';
|
|
396
318
|
} catch (error) {
|
|
@@ -398,14 +320,11 @@ const defaultProviders = {
|
|
|
398
320
|
// fallback to an empty string in introspection mode.
|
|
399
321
|
return '';
|
|
400
322
|
}
|
|
401
|
-
|
|
402
323
|
throw error;
|
|
403
324
|
}
|
|
404
325
|
},
|
|
405
|
-
|
|
406
326
|
async read(filePath, config) {
|
|
407
327
|
let modResults;
|
|
408
|
-
|
|
409
328
|
try {
|
|
410
329
|
if (_fs().default.existsSync(filePath)) {
|
|
411
330
|
const contents = await readFile(filePath, 'utf8');
|
|
@@ -418,42 +337,38 @@ const defaultProviders = {
|
|
|
418
337
|
// Throw errors in introspection mode.
|
|
419
338
|
if (!config.modRequest.introspect) {
|
|
420
339
|
throw error;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
|
|
340
|
+
}
|
|
341
|
+
// Fallback to using the template file.
|
|
424
342
|
modResults = getEntitlementsPlistTemplate();
|
|
425
|
-
}
|
|
426
|
-
// TODO: Remove this in favor of just overwriting the .entitlements with the Expo object. This will enable people to actually remove values.
|
|
427
|
-
|
|
343
|
+
}
|
|
428
344
|
|
|
345
|
+
// Apply all of the .entitlements values to the expo.ios.entitlements object
|
|
346
|
+
// TODO: Remove this in favor of just overwriting the .entitlements with the Expo object. This will enable people to actually remove values.
|
|
429
347
|
if (!config.ios) config.ios = {};
|
|
430
348
|
if (!config.ios.entitlements) config.ios.entitlements = {};
|
|
431
|
-
config.ios.entitlements = {
|
|
349
|
+
config.ios.entitlements = {
|
|
350
|
+
...(modResults || {}),
|
|
432
351
|
...config.ios.entitlements
|
|
433
352
|
};
|
|
434
353
|
return config.ios.entitlements;
|
|
435
354
|
},
|
|
436
|
-
|
|
437
355
|
async write(filePath, config) {
|
|
438
356
|
// Update the contents of the static entitlements object
|
|
439
357
|
if (!config.ios) {
|
|
440
358
|
config.ios = {};
|
|
441
359
|
}
|
|
360
|
+
config.ios.entitlements = config.modResults;
|
|
442
361
|
|
|
443
|
-
|
|
444
|
-
|
|
362
|
+
// Return early without writing, in introspection mode.
|
|
445
363
|
if (config.modRequest.introspect) {
|
|
446
364
|
return;
|
|
447
365
|
}
|
|
448
|
-
|
|
449
366
|
await writeFile(filePath, _plist().default.build((0, _sortObject().sortObject)(config.modResults)));
|
|
450
367
|
}
|
|
451
|
-
|
|
452
368
|
}),
|
|
453
369
|
// Append a rule to supply Podfile.properties.json data to mods on `mods.ios.podfileProperties`
|
|
454
370
|
podfileProperties: (0, _createBaseMod().provider)({
|
|
455
371
|
isIntrospective: true,
|
|
456
|
-
|
|
457
372
|
getFilePath({
|
|
458
373
|
modRequest: {
|
|
459
374
|
platformProjectRoot
|
|
@@ -461,17 +376,13 @@ const defaultProviders = {
|
|
|
461
376
|
}) {
|
|
462
377
|
return _path().default.resolve(platformProjectRoot, 'Podfile.properties.json');
|
|
463
378
|
},
|
|
464
|
-
|
|
465
379
|
async read(filePath) {
|
|
466
380
|
let results = {};
|
|
467
|
-
|
|
468
381
|
try {
|
|
469
382
|
results = await _jsonFile().default.readAsync(filePath);
|
|
470
383
|
} catch {}
|
|
471
|
-
|
|
472
384
|
return results;
|
|
473
385
|
},
|
|
474
|
-
|
|
475
386
|
async write(filePath, {
|
|
476
387
|
modResults,
|
|
477
388
|
modRequest: {
|
|
@@ -481,23 +392,20 @@ const defaultProviders = {
|
|
|
481
392
|
if (introspect) {
|
|
482
393
|
return;
|
|
483
394
|
}
|
|
484
|
-
|
|
485
395
|
await _jsonFile().default.writeAsync(filePath, modResults);
|
|
486
396
|
}
|
|
487
|
-
|
|
488
397
|
})
|
|
489
398
|
};
|
|
490
|
-
|
|
491
399
|
function withIosBaseMods(config, {
|
|
492
400
|
providers,
|
|
493
401
|
...props
|
|
494
402
|
} = {}) {
|
|
495
|
-
return (0, _createBaseMod().withGeneratedBaseMods)(config, {
|
|
403
|
+
return (0, _createBaseMod().withGeneratedBaseMods)(config, {
|
|
404
|
+
...props,
|
|
496
405
|
platform: 'ios',
|
|
497
406
|
providers: providers !== null && providers !== void 0 ? providers : getIosModFileProviders()
|
|
498
407
|
});
|
|
499
408
|
}
|
|
500
|
-
|
|
501
409
|
function getIosModFileProviders() {
|
|
502
410
|
return defaultProviders;
|
|
503
411
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIosBaseMods.js","names":["readFile","writeFile","promises","getEntitlementsPlistTemplate","getInfoPlistTemplate","CFBundleDevelopmentRegion","CFBundleExecutable","CFBundleIdentifier","CFBundleName","CFBundlePackageType","CFBundleInfoDictionaryVersion","CFBundleSignature","LSRequiresIPhoneOS","NSAppTransportSecurity","NSAllowsArbitraryLoads","NSExceptionDomains","localhost","NSExceptionAllowsInsecureHTTPLoads","UILaunchStoryboardName","UIRequiredDeviceCapabilities","UIViewControllerBasedStatusBarAppearance","UIStatusBarStyle","defaultProviders","dangerous","provider","getFilePath","read","write","appDelegate","modRequest","projectRoot","Paths","getAppDelegateFilePath","filePath","getFileInfo","modResults","contents","expoPlist","isIntrospective","platformProjectRoot","projectName","supportingDirectory","path","join","resolve","introspect","plist","parse","error","build","sortObject","xcodeproj","getPBXProjectPath","project","xcode","parseSync","writeSync","infoPlist","config","getPbxproj","infoPlistBuildProperty","getInfoPlistPathFromPbxproj","infoPlistPath","fileExists","addWarningIOS","getInfoPlistPath","ios","assert","entitlements","ensureApplicationTargetEntitlementsFileConfigured","Entitlements","getEntitlementsPath","fs","existsSync","podfileProperties","results","JsonFile","readAsync","writeAsync","withIosBaseMods","providers","props","withGeneratedBaseMods","platform","getIosModFileProviders"],"sources":["../../src/plugins/withIosBaseMods.ts"],"sourcesContent":["import JsonFile, { JSONObject, JSONValue } from '@expo/json-file';\nimport plist from '@expo/plist';\nimport assert from 'assert';\nimport fs, { promises } from 'fs';\nimport path from 'path';\nimport xcode, { XcodeProject } from 'xcode';\n\nimport { ExportedConfig, ModConfig } from '../Plugin.types';\nimport { Entitlements, Paths } from '../ios';\nimport { ensureApplicationTargetEntitlementsFileConfigured } from '../ios/Entitlements';\nimport { InfoPlist } from '../ios/IosConfig.types';\nimport { getPbxproj } from '../ios/utils/Xcodeproj';\nimport { getInfoPlistPathFromPbxproj } from '../ios/utils/getInfoPlistPath';\nimport { fileExists } from '../utils/modules';\nimport { sortObject } from '../utils/sortObject';\nimport { addWarningIOS } from '../utils/warnings';\nimport { ForwardedBaseModOptions, provider, withGeneratedBaseMods } from './createBaseMod';\n\nconst { readFile, writeFile } = promises;\n\ntype IosModName = keyof Required<ModConfig>['ios'];\n\nfunction getEntitlementsPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {};\n}\n\nfunction getInfoPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {\n CFBundleDevelopmentRegion: '$(DEVELOPMENT_LANGUAGE)',\n CFBundleExecutable: '$(EXECUTABLE_NAME)',\n CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)',\n CFBundleName: '$(PRODUCT_NAME)',\n CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',\n CFBundleInfoDictionaryVersion: '6.0',\n CFBundleSignature: '????',\n LSRequiresIPhoneOS: true,\n NSAppTransportSecurity: {\n NSAllowsArbitraryLoads: true,\n NSExceptionDomains: {\n localhost: {\n NSExceptionAllowsInsecureHTTPLoads: true,\n },\n },\n },\n UILaunchStoryboardName: 'SplashScreen',\n UIRequiredDeviceCapabilities: ['armv7'],\n UIViewControllerBasedStatusBarAppearance: false,\n UIStatusBarStyle: 'UIStatusBarStyleDefault',\n };\n}\n\nconst defaultProviders = {\n dangerous: provider<unknown>({\n getFilePath() {\n return '';\n },\n async read() {\n return {};\n },\n async write() {},\n }),\n // Append a rule to supply AppDelegate data to mods on `mods.ios.appDelegate`\n appDelegate: provider<Paths.AppDelegateProjectFile>({\n getFilePath({ modRequest: { projectRoot } }) {\n // TODO: Get application AppDelegate file from pbxproj.\n return Paths.getAppDelegateFilePath(projectRoot);\n },\n async read(filePath) {\n return Paths.getFileInfo(filePath);\n },\n async write(filePath: string, { modResults: { contents } }) {\n await writeFile(filePath, contents);\n },\n }),\n // Append a rule to supply Expo.plist data to mods on `mods.ios.expoPlist`\n expoPlist: provider<JSONObject>({\n isIntrospective: true,\n getFilePath({ modRequest: { platformProjectRoot, projectName } }) {\n const supportingDirectory = path.join(platformProjectRoot, projectName!, 'Supporting');\n return path.resolve(supportingDirectory, 'Expo.plist');\n },\n async read(filePath, { modRequest: { introspect } }) {\n try {\n return plist.parse(await readFile(filePath, 'utf8'));\n } catch (error) {\n if (introspect) {\n return {};\n }\n throw error;\n }\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await writeFile(filePath, plist.build(sortObject(modResults)));\n },\n }),\n // Append a rule to supply .xcodeproj data to mods on `mods.ios.xcodeproj`\n xcodeproj: provider<XcodeProject>({\n getFilePath({ modRequest: { projectRoot } }) {\n return Paths.getPBXProjectPath(projectRoot);\n },\n async read(filePath) {\n const project = xcode.project(filePath);\n project.parseSync();\n return project;\n },\n async write(filePath, { modResults }) {\n await writeFile(filePath, modResults.writeSync());\n },\n }),\n // Append a rule to supply Info.plist data to mods on `mods.ios.infoPlist`\n infoPlist: provider<InfoPlist, ForwardedBaseModOptions>({\n isIntrospective: true,\n async getFilePath(config) {\n let project: xcode.XcodeProject | null = null;\n try {\n project = getPbxproj(config.modRequest.projectRoot);\n } catch {\n // noop\n }\n\n // Only check / warn if a project actually exists, this'll provide\n // more accurate warning messages for users in managed projects.\n if (project) {\n const infoPlistBuildProperty = getInfoPlistPathFromPbxproj(project);\n\n if (infoPlistBuildProperty) {\n //: [root]/myapp/ios/MyApp/Info.plist\n const infoPlistPath = path.join(\n //: myapp/ios\n config.modRequest.platformProjectRoot,\n //: MyApp/Info.plist\n infoPlistBuildProperty\n );\n if (fileExists(infoPlistPath)) {\n return infoPlistPath;\n }\n addWarningIOS(\n 'mods.ios.infoPlist',\n `Info.plist file linked to Xcode project does not exist: ${infoPlistPath}`\n );\n } else {\n addWarningIOS('mods.ios.infoPlist', 'Failed to find Info.plist linked to Xcode project.');\n }\n }\n try {\n // Fallback on glob...\n return await Paths.getInfoPlistPath(config.modRequest.projectRoot);\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n async read(filePath, config) {\n // Apply all of the Info.plist values to the expo.ios.infoPlist object\n // TODO: Remove this in favor of just overwriting the Info.plist with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.infoPlist) config.ios.infoPlist = {};\n\n let modResults: InfoPlist;\n try {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Info.plist is empty');\n modResults = plist.parse(contents) as InfoPlist;\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the infoPlist object from the Expo config.\n modResults = getInfoPlistTemplate();\n }\n\n config.ios.infoPlist = {\n ...(modResults || {}),\n ...config.ios.infoPlist,\n };\n\n return config.ios.infoPlist!;\n },\n async write(filePath, config) {\n // Update the contents of the static infoPlist object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.infoPlist = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n // Append a rule to supply .entitlements data to mods on `mods.ios.entitlements`\n entitlements: provider<JSONObject, ForwardedBaseModOptions>({\n isIntrospective: true,\n\n async getFilePath(config) {\n try {\n ensureApplicationTargetEntitlementsFileConfigured(config.modRequest.projectRoot);\n return Entitlements.getEntitlementsPath(config.modRequest.projectRoot) ?? '';\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n\n async read(filePath, config) {\n let modResults: JSONObject;\n try {\n if (fs.existsSync(filePath)) {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Entitlements plist is empty');\n modResults = plist.parse(contents);\n } else {\n modResults = getEntitlementsPlistTemplate();\n }\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the template file.\n modResults = getEntitlementsPlistTemplate();\n }\n\n // Apply all of the .entitlements values to the expo.ios.entitlements object\n // TODO: Remove this in favor of just overwriting the .entitlements with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.entitlements) config.ios.entitlements = {};\n\n config.ios.entitlements = {\n ...(modResults || {}),\n ...config.ios.entitlements,\n };\n\n return config.ios.entitlements!;\n },\n\n async write(filePath, config) {\n // Update the contents of the static entitlements object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.entitlements = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n\n // Append a rule to supply Podfile.properties.json data to mods on `mods.ios.podfileProperties`\n podfileProperties: provider<Record<string, JSONValue>>({\n isIntrospective: true,\n\n getFilePath({ modRequest: { platformProjectRoot } }) {\n return path.resolve(platformProjectRoot, 'Podfile.properties.json');\n },\n async read(filePath) {\n let results: Record<string, JSONValue> = {};\n try {\n results = await JsonFile.readAsync(filePath);\n } catch {}\n return results;\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await JsonFile.writeAsync(filePath, modResults);\n },\n }),\n};\n\ntype IosDefaultProviders = typeof defaultProviders;\n\nexport function withIosBaseMods(\n config: ExportedConfig,\n {\n providers,\n ...props\n }: ForwardedBaseModOptions & { providers?: Partial<IosDefaultProviders> } = {}\n): ExportedConfig {\n return withGeneratedBaseMods<IosModName>(config, {\n ...props,\n platform: 'ios',\n providers: providers ?? getIosModFileProviders(),\n });\n}\n\nexport function getIosModFileProviders() {\n return defaultProviders;\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;;;;;AAEA,MAAM;EAAEA,QAAF;EAAYC;AAAZ,IAA0BC,cAAhC;;AAIA,SAASC,4BAAT,GAAwC;EACtC;EACA,OAAO,EAAP;AACD;;AAED,SAASC,oBAAT,GAAgC;EAC9B;EACA,OAAO;IACLC,yBAAyB,EAAE,yBADtB;IAELC,kBAAkB,EAAE,oBAFf;IAGLC,kBAAkB,EAAE,8BAHf;IAILC,YAAY,EAAE,iBAJT;IAKLC,mBAAmB,EAAE,g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AEgB;MAAF;IAA1B,CAAtB,EAAkE;MAChE,IAAIA,UAAJ,EAAgB;QACd;MACD;;MACD,MAAM+B,mBAAA,CAASE,UAAT,CAAoB7C,QAApB,EAA8BE,UAA9B,CAAN;IACD;;EAlBoD,CAApC;AAvNI,CAAzB;;AA+OO,SAAS4C,eAAT,CACLrB,MADK,EAEL;EACEsB,SADF;EAEE,GAAGC;AAFL,IAG4E,EALvE,EAMW;EAChB,OAAO,IAAAC,sCAAA,EAAkCxB,MAAlC,EAA0C,EAC/C,GAAGuB,KAD4C;IAE/CE,QAAQ,EAAE,KAFqC;IAG/CH,SAAS,EAAEA,SAAF,aAAEA,SAAF,cAAEA,SAAF,GAAeI,sBAAsB;EAHC,CAA1C,CAAP;AAKD;;AAEM,SAASA,sBAAT,GAAkC;EACvC,OAAO9D,gBAAP;AACD"}
|
|
1
|
+
{"version":3,"file":"withIosBaseMods.js","names":["readFile","writeFile","promises","getEntitlementsPlistTemplate","getInfoPlistTemplate","CFBundleDevelopmentRegion","CFBundleExecutable","CFBundleIdentifier","CFBundleName","CFBundlePackageType","CFBundleInfoDictionaryVersion","CFBundleSignature","LSRequiresIPhoneOS","NSAppTransportSecurity","NSAllowsArbitraryLoads","NSExceptionDomains","localhost","NSExceptionAllowsInsecureHTTPLoads","UILaunchStoryboardName","UIRequiredDeviceCapabilities","UIViewControllerBasedStatusBarAppearance","UIStatusBarStyle","defaultProviders","dangerous","provider","getFilePath","read","write","appDelegate","modRequest","projectRoot","Paths","getAppDelegateFilePath","filePath","getFileInfo","modResults","contents","expoPlist","isIntrospective","platformProjectRoot","projectName","supportingDirectory","path","join","resolve","introspect","plist","parse","error","build","sortObject","xcodeproj","getPBXProjectPath","project","xcode","parseSync","writeSync","infoPlist","config","getPbxproj","infoPlistBuildProperty","getInfoPlistPathFromPbxproj","infoPlistPath","fileExists","addWarningIOS","getInfoPlistPath","ios","assert","entitlements","ensureApplicationTargetEntitlementsFileConfigured","Entitlements","getEntitlementsPath","fs","existsSync","podfileProperties","results","JsonFile","readAsync","writeAsync","withIosBaseMods","providers","props","withGeneratedBaseMods","platform","getIosModFileProviders"],"sources":["../../src/plugins/withIosBaseMods.ts"],"sourcesContent":["import JsonFile, { JSONObject, JSONValue } from '@expo/json-file';\nimport plist from '@expo/plist';\nimport assert from 'assert';\nimport fs, { promises } from 'fs';\nimport path from 'path';\nimport xcode, { XcodeProject } from 'xcode';\n\nimport { ExportedConfig, ModConfig } from '../Plugin.types';\nimport { Entitlements, Paths } from '../ios';\nimport { ensureApplicationTargetEntitlementsFileConfigured } from '../ios/Entitlements';\nimport { InfoPlist } from '../ios/IosConfig.types';\nimport { getPbxproj } from '../ios/utils/Xcodeproj';\nimport { getInfoPlistPathFromPbxproj } from '../ios/utils/getInfoPlistPath';\nimport { fileExists } from '../utils/modules';\nimport { sortObject } from '../utils/sortObject';\nimport { addWarningIOS } from '../utils/warnings';\nimport { ForwardedBaseModOptions, provider, withGeneratedBaseMods } from './createBaseMod';\n\nconst { readFile, writeFile } = promises;\n\ntype IosModName = keyof Required<ModConfig>['ios'];\n\nfunction getEntitlementsPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {};\n}\n\nfunction getInfoPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {\n CFBundleDevelopmentRegion: '$(DEVELOPMENT_LANGUAGE)',\n CFBundleExecutable: '$(EXECUTABLE_NAME)',\n CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)',\n CFBundleName: '$(PRODUCT_NAME)',\n CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',\n CFBundleInfoDictionaryVersion: '6.0',\n CFBundleSignature: '????',\n LSRequiresIPhoneOS: true,\n NSAppTransportSecurity: {\n NSAllowsArbitraryLoads: true,\n NSExceptionDomains: {\n localhost: {\n NSExceptionAllowsInsecureHTTPLoads: true,\n },\n },\n },\n UILaunchStoryboardName: 'SplashScreen',\n UIRequiredDeviceCapabilities: ['armv7'],\n UIViewControllerBasedStatusBarAppearance: false,\n UIStatusBarStyle: 'UIStatusBarStyleDefault',\n };\n}\n\nconst defaultProviders = {\n dangerous: provider<unknown>({\n getFilePath() {\n return '';\n },\n async read() {\n return {};\n },\n async write() {},\n }),\n // Append a rule to supply AppDelegate data to mods on `mods.ios.appDelegate`\n appDelegate: provider<Paths.AppDelegateProjectFile>({\n getFilePath({ modRequest: { projectRoot } }) {\n // TODO: Get application AppDelegate file from pbxproj.\n return Paths.getAppDelegateFilePath(projectRoot);\n },\n async read(filePath) {\n return Paths.getFileInfo(filePath);\n },\n async write(filePath: string, { modResults: { contents } }) {\n await writeFile(filePath, contents);\n },\n }),\n // Append a rule to supply Expo.plist data to mods on `mods.ios.expoPlist`\n expoPlist: provider<JSONObject>({\n isIntrospective: true,\n getFilePath({ modRequest: { platformProjectRoot, projectName } }) {\n const supportingDirectory = path.join(platformProjectRoot, projectName!, 'Supporting');\n return path.resolve(supportingDirectory, 'Expo.plist');\n },\n async read(filePath, { modRequest: { introspect } }) {\n try {\n return plist.parse(await readFile(filePath, 'utf8'));\n } catch (error) {\n if (introspect) {\n return {};\n }\n throw error;\n }\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await writeFile(filePath, plist.build(sortObject(modResults)));\n },\n }),\n // Append a rule to supply .xcodeproj data to mods on `mods.ios.xcodeproj`\n xcodeproj: provider<XcodeProject>({\n getFilePath({ modRequest: { projectRoot } }) {\n return Paths.getPBXProjectPath(projectRoot);\n },\n async read(filePath) {\n const project = xcode.project(filePath);\n project.parseSync();\n return project;\n },\n async write(filePath, { modResults }) {\n await writeFile(filePath, modResults.writeSync());\n },\n }),\n // Append a rule to supply Info.plist data to mods on `mods.ios.infoPlist`\n infoPlist: provider<InfoPlist, ForwardedBaseModOptions>({\n isIntrospective: true,\n async getFilePath(config) {\n let project: xcode.XcodeProject | null = null;\n try {\n project = getPbxproj(config.modRequest.projectRoot);\n } catch {\n // noop\n }\n\n // Only check / warn if a project actually exists, this'll provide\n // more accurate warning messages for users in managed projects.\n if (project) {\n const infoPlistBuildProperty = getInfoPlistPathFromPbxproj(project);\n\n if (infoPlistBuildProperty) {\n //: [root]/myapp/ios/MyApp/Info.plist\n const infoPlistPath = path.join(\n //: myapp/ios\n config.modRequest.platformProjectRoot,\n //: MyApp/Info.plist\n infoPlistBuildProperty\n );\n if (fileExists(infoPlistPath)) {\n return infoPlistPath;\n }\n addWarningIOS(\n 'mods.ios.infoPlist',\n `Info.plist file linked to Xcode project does not exist: ${infoPlistPath}`\n );\n } else {\n addWarningIOS('mods.ios.infoPlist', 'Failed to find Info.plist linked to Xcode project.');\n }\n }\n try {\n // Fallback on glob...\n return await Paths.getInfoPlistPath(config.modRequest.projectRoot);\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n async read(filePath, config) {\n // Apply all of the Info.plist values to the expo.ios.infoPlist object\n // TODO: Remove this in favor of just overwriting the Info.plist with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.infoPlist) config.ios.infoPlist = {};\n\n let modResults: InfoPlist;\n try {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Info.plist is empty');\n modResults = plist.parse(contents) as InfoPlist;\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the infoPlist object from the Expo config.\n modResults = getInfoPlistTemplate();\n }\n\n config.ios.infoPlist = {\n ...(modResults || {}),\n ...config.ios.infoPlist,\n };\n\n return config.ios.infoPlist!;\n },\n async write(filePath, config) {\n // Update the contents of the static infoPlist object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.infoPlist = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n // Append a rule to supply .entitlements data to mods on `mods.ios.entitlements`\n entitlements: provider<JSONObject, ForwardedBaseModOptions>({\n isIntrospective: true,\n\n async getFilePath(config) {\n try {\n ensureApplicationTargetEntitlementsFileConfigured(config.modRequest.projectRoot);\n return Entitlements.getEntitlementsPath(config.modRequest.projectRoot) ?? '';\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n\n async read(filePath, config) {\n let modResults: JSONObject;\n try {\n if (fs.existsSync(filePath)) {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Entitlements plist is empty');\n modResults = plist.parse(contents);\n } else {\n modResults = getEntitlementsPlistTemplate();\n }\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the template file.\n modResults = getEntitlementsPlistTemplate();\n }\n\n // Apply all of the .entitlements values to the expo.ios.entitlements object\n // TODO: Remove this in favor of just overwriting the .entitlements with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.entitlements) config.ios.entitlements = {};\n\n config.ios.entitlements = {\n ...(modResults || {}),\n ...config.ios.entitlements,\n };\n\n return config.ios.entitlements!;\n },\n\n async write(filePath, config) {\n // Update the contents of the static entitlements object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.entitlements = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n\n // Append a rule to supply Podfile.properties.json data to mods on `mods.ios.podfileProperties`\n podfileProperties: provider<Record<string, JSONValue>>({\n isIntrospective: true,\n\n getFilePath({ modRequest: { platformProjectRoot } }) {\n return path.resolve(platformProjectRoot, 'Podfile.properties.json');\n },\n async read(filePath) {\n let results: Record<string, JSONValue> = {};\n try {\n results = await JsonFile.readAsync(filePath);\n } catch {}\n return results;\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await JsonFile.writeAsync(filePath, modResults);\n },\n }),\n};\n\ntype IosDefaultProviders = typeof defaultProviders;\n\nexport function withIosBaseMods(\n config: ExportedConfig,\n {\n providers,\n ...props\n }: ForwardedBaseModOptions & { providers?: Partial<IosDefaultProviders> } = {}\n): ExportedConfig {\n return withGeneratedBaseMods<IosModName>(config, {\n ...props,\n platform: 'ios',\n providers: providers ?? getIosModFileProviders(),\n });\n}\n\nexport function getIosModFileProviders() {\n return defaultProviders;\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA2F;AAAA;AAAA;AAE3F,MAAM;EAAEA,QAAQ;EAAEC;AAAU,CAAC,GAAGC,cAAQ;AAIxC,SAASC,4BAA4B,GAAG;EACtC;EACA,OAAO,CAAC,CAAC;AACX;AAEA,SAASC,oBAAoB,GAAG;EAC9B;EACA,OAAO;IACLC,yBAAyB,EAAE,yBAAyB;IACpDC,kBAAkB,EAAE,oBAAoB;IACxCC,kBAAkB,EAAE,8BAA8B;IAClDC,YAAY,EAAE,iBAAiB;IAC/BC,mBAAmB,EAAE,gCAAgC;IACrDC,6BAA6B,EAAE,KAAK;IACpCC,iBAAiB,EAAE,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