@expo/config-plugins 5.0.3 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +12 -34
- 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
package/build/index.js
CHANGED
|
@@ -210,141 +210,106 @@ Object.defineProperty(exports, "withXcodeProject", {
|
|
|
210
210
|
return _iosPlugins().withXcodeProject;
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
|
-
|
|
214
213
|
function AndroidConfig() {
|
|
215
214
|
const data = _interopRequireWildcard(require("./android"));
|
|
216
|
-
|
|
217
215
|
AndroidConfig = function () {
|
|
218
216
|
return data;
|
|
219
217
|
};
|
|
220
|
-
|
|
221
218
|
return data;
|
|
222
219
|
}
|
|
223
|
-
|
|
224
220
|
Object.defineProperty(exports, "AndroidConfig", {
|
|
225
221
|
enumerable: true,
|
|
226
222
|
get: function () {
|
|
227
223
|
return AndroidConfig();
|
|
228
224
|
}
|
|
229
225
|
});
|
|
230
|
-
|
|
231
226
|
function IOSConfig() {
|
|
232
227
|
const data = _interopRequireWildcard(require("./ios"));
|
|
233
|
-
|
|
234
228
|
IOSConfig = function () {
|
|
235
229
|
return data;
|
|
236
230
|
};
|
|
237
|
-
|
|
238
231
|
return data;
|
|
239
232
|
}
|
|
240
|
-
|
|
241
233
|
Object.defineProperty(exports, "IOSConfig", {
|
|
242
234
|
enumerable: true,
|
|
243
235
|
get: function () {
|
|
244
236
|
return IOSConfig();
|
|
245
237
|
}
|
|
246
238
|
});
|
|
247
|
-
|
|
248
239
|
function _createBaseMod() {
|
|
249
240
|
const data = require("./plugins/createBaseMod");
|
|
250
|
-
|
|
251
241
|
_createBaseMod = function () {
|
|
252
242
|
return data;
|
|
253
243
|
};
|
|
254
|
-
|
|
255
244
|
return data;
|
|
256
245
|
}
|
|
257
|
-
|
|
258
246
|
function _withAndroidBaseMods() {
|
|
259
247
|
const data = require("./plugins/withAndroidBaseMods");
|
|
260
|
-
|
|
261
248
|
_withAndroidBaseMods = function () {
|
|
262
249
|
return data;
|
|
263
250
|
};
|
|
264
|
-
|
|
265
251
|
return data;
|
|
266
252
|
}
|
|
267
|
-
|
|
268
253
|
function _withIosBaseMods() {
|
|
269
254
|
const data = require("./plugins/withIosBaseMods");
|
|
270
|
-
|
|
271
255
|
_withIosBaseMods = function () {
|
|
272
256
|
return data;
|
|
273
257
|
};
|
|
274
|
-
|
|
275
258
|
return data;
|
|
276
259
|
}
|
|
277
|
-
|
|
278
260
|
function XML() {
|
|
279
261
|
const data = _interopRequireWildcard(require("./utils/XML"));
|
|
280
|
-
|
|
281
262
|
XML = function () {
|
|
282
263
|
return data;
|
|
283
264
|
};
|
|
284
|
-
|
|
285
265
|
return data;
|
|
286
266
|
}
|
|
287
|
-
|
|
288
267
|
Object.defineProperty(exports, "XML", {
|
|
289
268
|
enumerable: true,
|
|
290
269
|
get: function () {
|
|
291
270
|
return XML();
|
|
292
271
|
}
|
|
293
272
|
});
|
|
294
|
-
|
|
295
273
|
function History() {
|
|
296
274
|
const data = _interopRequireWildcard(require("./utils/history"));
|
|
297
|
-
|
|
298
275
|
History = function () {
|
|
299
276
|
return data;
|
|
300
277
|
};
|
|
301
|
-
|
|
302
278
|
return data;
|
|
303
279
|
}
|
|
304
|
-
|
|
305
280
|
Object.defineProperty(exports, "History", {
|
|
306
281
|
enumerable: true,
|
|
307
282
|
get: function () {
|
|
308
283
|
return History();
|
|
309
284
|
}
|
|
310
285
|
});
|
|
311
|
-
|
|
312
286
|
function WarningAggregator() {
|
|
313
287
|
const data = _interopRequireWildcard(require("./utils/warnings"));
|
|
314
|
-
|
|
315
288
|
WarningAggregator = function () {
|
|
316
289
|
return data;
|
|
317
290
|
};
|
|
318
|
-
|
|
319
291
|
return data;
|
|
320
292
|
}
|
|
321
|
-
|
|
322
293
|
Object.defineProperty(exports, "WarningAggregator", {
|
|
323
294
|
enumerable: true,
|
|
324
295
|
get: function () {
|
|
325
296
|
return WarningAggregator();
|
|
326
297
|
}
|
|
327
298
|
});
|
|
328
|
-
|
|
329
299
|
function _Updates() {
|
|
330
300
|
const data = _interopRequireWildcard(require("./utils/Updates"));
|
|
331
|
-
|
|
332
301
|
_Updates = function () {
|
|
333
302
|
return data;
|
|
334
303
|
};
|
|
335
|
-
|
|
336
304
|
return data;
|
|
337
305
|
}
|
|
338
|
-
|
|
339
306
|
Object.defineProperty(exports, "Updates", {
|
|
340
307
|
enumerable: true,
|
|
341
308
|
get: function () {
|
|
342
309
|
return _Updates();
|
|
343
310
|
}
|
|
344
311
|
});
|
|
345
|
-
|
|
346
312
|
var _Plugin = require("./Plugin.types");
|
|
347
|
-
|
|
348
313
|
Object.keys(_Plugin).forEach(function (key) {
|
|
349
314
|
if (key === "default" || key === "__esModule") return;
|
|
350
315
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -356,109 +321,81 @@ Object.keys(_Plugin).forEach(function (key) {
|
|
|
356
321
|
}
|
|
357
322
|
});
|
|
358
323
|
});
|
|
359
|
-
|
|
360
324
|
function _withPlugins() {
|
|
361
325
|
const data = require("./plugins/withPlugins");
|
|
362
|
-
|
|
363
326
|
_withPlugins = function () {
|
|
364
327
|
return data;
|
|
365
328
|
};
|
|
366
|
-
|
|
367
329
|
return data;
|
|
368
330
|
}
|
|
369
|
-
|
|
370
331
|
function _withRunOnce() {
|
|
371
332
|
const data = require("./plugins/withRunOnce");
|
|
372
|
-
|
|
373
333
|
_withRunOnce = function () {
|
|
374
334
|
return data;
|
|
375
335
|
};
|
|
376
|
-
|
|
377
336
|
return data;
|
|
378
337
|
}
|
|
379
|
-
|
|
380
338
|
function _withDangerousMod() {
|
|
381
339
|
const data = require("./plugins/withDangerousMod");
|
|
382
|
-
|
|
383
340
|
_withDangerousMod = function () {
|
|
384
341
|
return data;
|
|
385
342
|
};
|
|
386
|
-
|
|
387
343
|
return data;
|
|
388
344
|
}
|
|
389
|
-
|
|
390
345
|
function _withMod() {
|
|
391
346
|
const data = require("./plugins/withMod");
|
|
392
|
-
|
|
393
347
|
_withMod = function () {
|
|
394
348
|
return data;
|
|
395
349
|
};
|
|
396
|
-
|
|
397
350
|
return data;
|
|
398
351
|
}
|
|
399
|
-
|
|
400
352
|
function _iosPlugins() {
|
|
401
353
|
const data = require("./plugins/ios-plugins");
|
|
402
|
-
|
|
403
354
|
_iosPlugins = function () {
|
|
404
355
|
return data;
|
|
405
356
|
};
|
|
406
|
-
|
|
407
357
|
return data;
|
|
408
358
|
}
|
|
409
|
-
|
|
410
359
|
function _androidPlugins() {
|
|
411
360
|
const data = require("./plugins/android-plugins");
|
|
412
|
-
|
|
413
361
|
_androidPlugins = function () {
|
|
414
362
|
return data;
|
|
415
363
|
};
|
|
416
|
-
|
|
417
364
|
return data;
|
|
418
365
|
}
|
|
419
|
-
|
|
420
366
|
function _withStaticPlugin() {
|
|
421
367
|
const data = require("./plugins/withStaticPlugin");
|
|
422
|
-
|
|
423
368
|
_withStaticPlugin = function () {
|
|
424
369
|
return data;
|
|
425
370
|
};
|
|
426
|
-
|
|
427
371
|
return data;
|
|
428
372
|
}
|
|
429
|
-
|
|
430
373
|
function _modCompiler() {
|
|
431
374
|
const data = require("./plugins/mod-compiler");
|
|
432
|
-
|
|
433
375
|
_modCompiler = function () {
|
|
434
376
|
return data;
|
|
435
377
|
};
|
|
436
|
-
|
|
437
378
|
return data;
|
|
438
379
|
}
|
|
439
|
-
|
|
440
380
|
function _errors() {
|
|
441
381
|
const data = require("./utils/errors");
|
|
442
|
-
|
|
443
382
|
_errors = function () {
|
|
444
383
|
return data;
|
|
445
384
|
};
|
|
446
|
-
|
|
447
385
|
return data;
|
|
448
386
|
}
|
|
449
|
-
|
|
450
387
|
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); }
|
|
451
|
-
|
|
452
388
|
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; }
|
|
453
|
-
|
|
454
389
|
/**
|
|
455
390
|
* For internal use in Expo CLI
|
|
456
391
|
*/
|
|
392
|
+
|
|
457
393
|
// TODO: Remove
|
|
458
394
|
|
|
459
395
|
/**
|
|
460
396
|
* These are the "config-plugins"
|
|
461
397
|
*/
|
|
398
|
+
|
|
462
399
|
const BaseMods = {
|
|
463
400
|
withGeneratedBaseMods: _createBaseMod().withGeneratedBaseMods,
|
|
464
401
|
provider: _createBaseMod().provider,
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["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 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, 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 { withMod, withBaseMod } from './plugins/withMod';\n\nexport {\n withAppDelegate,\n withInfoPlist,\n withEntitlementsPlist,\n withExpoPlist,\n withXcodeProject,\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 { 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":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["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 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, 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 { withMod, withBaseMod } from './plugins/withMod';\n\nexport {\n withAppDelegate,\n withInfoPlist,\n withEntitlementsPlist,\n withExpoPlist,\n withXcodeProject,\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 { 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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA2C;EAAA;EAAA;IAAA;EAAA;AAAA;AAC3C;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAmC;EAAA;EAAA;IAAA;EAAA;AAAA;AACnC;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;AAAmC;EAAA;EAAA;IAAA;EAAA;AAAA;AACnC;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA2C;EAAA;EAAA;IAAA;EAAA;AAAA;AAC3C;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAsD;EAAA;EAAA;IAAA;EAAA;AAAA;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAA;EAAA;EAAA;IAAA;EAAA;AAAA;AAatD;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AASA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAcA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA6C;AAAA;AA3D7C;AACA;AACA;;AAUA;;AAOA;AACA;AACA;;AAwCO,MAAMA,QAAQ,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;AAAC"}
|
package/build/ios/Bitcode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { XcodeProject } from 'xcode';
|
|
3
3
|
import { ConfigPlugin } from '../Plugin.types';
|
|
4
|
-
|
|
4
|
+
type Bitcode = NonNullable<ExpoConfig['ios']>['bitcode'];
|
|
5
5
|
/**
|
|
6
6
|
* Plugin to set a bitcode preference for the Xcode project
|
|
7
7
|
* based on the project's Expo config `ios.bitcode` value.
|
package/build/ios/Bitcode.js
CHANGED
|
@@ -7,37 +7,27 @@ exports.getBitcode = getBitcode;
|
|
|
7
7
|
exports.setBitcode = setBitcode;
|
|
8
8
|
exports.setBitcodeWithConfig = setBitcodeWithConfig;
|
|
9
9
|
exports.withCustomBitcode = exports.withBitcode = void 0;
|
|
10
|
-
|
|
11
10
|
function _iosPlugins() {
|
|
12
11
|
const data = require("../plugins/ios-plugins");
|
|
13
|
-
|
|
14
12
|
_iosPlugins = function () {
|
|
15
13
|
return data;
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
return data;
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
function _warnings() {
|
|
22
18
|
const data = require("../utils/warnings");
|
|
23
|
-
|
|
24
19
|
_warnings = function () {
|
|
25
20
|
return data;
|
|
26
21
|
};
|
|
27
|
-
|
|
28
22
|
return data;
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
function _Xcodeproj() {
|
|
32
25
|
const data = require("./utils/Xcodeproj");
|
|
33
|
-
|
|
34
26
|
_Xcodeproj = function () {
|
|
35
27
|
return data;
|
|
36
28
|
};
|
|
37
|
-
|
|
38
29
|
return data;
|
|
39
30
|
}
|
|
40
|
-
|
|
41
31
|
/**
|
|
42
32
|
* Plugin to set a bitcode preference for the Xcode project
|
|
43
33
|
* based on the project's Expo config `ios.bitcode` value.
|
|
@@ -50,16 +40,14 @@ const withBitcode = config => {
|
|
|
50
40
|
return config;
|
|
51
41
|
});
|
|
52
42
|
};
|
|
43
|
+
|
|
53
44
|
/**
|
|
54
45
|
* Plugin to set a custom bitcode preference for the Xcode project.
|
|
55
46
|
* Does not read from the Expo config `ios.bitcode`.
|
|
56
47
|
*
|
|
57
48
|
* @param bitcode custom bitcode setting.
|
|
58
49
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
50
|
exports.withBitcode = withBitcode;
|
|
62
|
-
|
|
63
51
|
const withCustomBitcode = (config, bitcode) => {
|
|
64
52
|
return (0, _iosPlugins().withXcodeProject)(config, async config => {
|
|
65
53
|
config.modResults = await setBitcode(bitcode, {
|
|
@@ -68,23 +56,19 @@ const withCustomBitcode = (config, bitcode) => {
|
|
|
68
56
|
return config;
|
|
69
57
|
});
|
|
70
58
|
};
|
|
59
|
+
|
|
71
60
|
/**
|
|
72
61
|
* Get the bitcode preference from the Expo config.
|
|
73
62
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
76
63
|
exports.withCustomBitcode = withCustomBitcode;
|
|
77
|
-
|
|
78
64
|
function getBitcode(config) {
|
|
79
65
|
var _config$ios;
|
|
80
|
-
|
|
81
66
|
return (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.bitcode;
|
|
82
67
|
}
|
|
68
|
+
|
|
83
69
|
/**
|
|
84
70
|
* Enable or disable the `ENABLE_BITCODE` property of the project configurations.
|
|
85
71
|
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
72
|
function setBitcodeWithConfig(config, {
|
|
89
73
|
project
|
|
90
74
|
}) {
|
|
@@ -93,38 +77,34 @@ function setBitcodeWithConfig(config, {
|
|
|
93
77
|
project
|
|
94
78
|
});
|
|
95
79
|
}
|
|
80
|
+
|
|
96
81
|
/**
|
|
97
82
|
* Enable or disable the `ENABLE_BITCODE` property.
|
|
98
83
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
84
|
function setBitcode(bitcode, {
|
|
102
85
|
project
|
|
103
86
|
}) {
|
|
104
|
-
const isDefaultBehavior = bitcode == null;
|
|
105
|
-
|
|
87
|
+
const isDefaultBehavior = bitcode == null;
|
|
88
|
+
// If the value is undefined, then do nothing.
|
|
106
89
|
if (isDefaultBehavior) {
|
|
107
90
|
return project;
|
|
108
91
|
}
|
|
109
|
-
|
|
110
92
|
const targetName = typeof bitcode === 'string' ? bitcode : undefined;
|
|
111
93
|
const isBitcodeEnabled = !!bitcode;
|
|
112
|
-
|
|
113
94
|
if (targetName) {
|
|
114
95
|
// Assert if missing
|
|
115
96
|
const configs = Object.entries(project.pbxXCBuildConfigurationSection()).filter(_Xcodeproj().isNotComment);
|
|
116
97
|
const hasConfiguration = configs.find(([, configuration]) => configuration.name === targetName);
|
|
117
|
-
|
|
118
98
|
if (hasConfiguration) {
|
|
119
99
|
// If targetName is defined then disable bitcode everywhere.
|
|
120
100
|
project.addBuildProperty('ENABLE_BITCODE', 'NO');
|
|
121
101
|
} else {
|
|
122
|
-
const names = [
|
|
102
|
+
const names = [
|
|
103
|
+
// Remove duplicates, wrap in double quotes, and sort alphabetically.
|
|
123
104
|
...new Set(configs.map(([, configuration]) => `"${configuration.name}"`))].sort();
|
|
124
105
|
(0, _warnings().addWarningIOS)('ios.bitcode', `No configuration named "${targetName}". Expected one of: ${names.join(', ')}.`);
|
|
125
106
|
}
|
|
126
107
|
}
|
|
127
|
-
|
|
128
108
|
project.addBuildProperty('ENABLE_BITCODE', isBitcodeEnabled ? 'YES' : 'NO', targetName);
|
|
129
109
|
return project;
|
|
130
110
|
}
|
package/build/ios/Bitcode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bitcode.js","names":["withBitcode","config","withXcodeProject","modResults","setBitcodeWithConfig","project","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 { ExpoConfig } from '@expo/config-types';\nimport { XcodeProject } from 'xcode';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\nimport { isNotComment } from './utils/Xcodeproj';\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":"
|
|
1
|
+
{"version":3,"file":"Bitcode.js","names":["withBitcode","config","withXcodeProject","modResults","setBitcodeWithConfig","project","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 { ExpoConfig } from '@expo/config-types';\nimport { XcodeProject } from 'xcode';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withXcodeProject } from '../plugins/ios-plugins';\nimport { addWarningIOS } from '../utils/warnings';\nimport { isNotComment } from './utils/Xcodeproj';\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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;AACA;AACA;AACA;AACO,MAAMA,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;AALA;AAMO,MAAMK,iBAAwC,GAAG,CAACL,MAAM,EAAEM,OAAO,KAAK;EAC3E,OAAO,IAAAL,8BAAgB,EAACD,MAAM,EAAE,MAAOA,MAAM,IAAK;IAChDA,MAAM,CAACE,UAAU,GAAG,MAAMK,UAAU,CAACD,OAAO,EAAE;MAC5CF,OAAO,EAAEJ,MAAM,CAACE;IAClB,CAAC,CAAC;IACF,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AAFA;AAGO,SAASQ,UAAU,CAACR,MAA+B,EAAW;EAAA;EACnE,sBAAOA,MAAM,CAACS,GAAG,gDAAV,YAAYH,OAAO;AAC5B;;AAEA;AACA;AACA;AACO,SAASH,oBAAoB,CAClCH,MAA+B,EAC/B;EAAEI;AAAmC,CAAC,EACxB;EACd,MAAME,OAAO,GAAGE,UAAU,CAACR,MAAM,CAAC;EAClC,OAAOO,UAAU,CAACD,OAAO,EAAE;IAAEF;EAAQ,CAAC,CAAC;AACzC;;AAEA;AACA;AACA;AACO,SAASG,UAAU,CAACD,OAAgB,EAAE;EAAEF;AAAmC,CAAC,EAAgB;EACjG,MAAMM,iBAAiB,GAAGJ,OAAO,IAAI,IAAI;EACzC;EACA,IAAII,iBAAiB,EAAE;IACrB,OAAON,OAAO;EAChB;EAEA,MAAMO,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,CAACZ,OAAO,CAACa,8BAA8B,EAAE,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;MACAhB,OAAO,CAACoB,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,KAAM,IAAGA,aAAa,CAACC,IAAK,GAAE,CAAC,CAAC,CAC1E,CAACK,IAAI,EAAE;MACR,IAAAC,yBAAa,EACX,aAAa,EACZ,2BAA0BlB,UAAW,uBAAsBc,KAAK,CAACK,IAAI,CAAC,IAAI,CAAE,GAAE,CAChF;IACH;EACF;EAEA1B,OAAO,CAACoB,gBAAgB,CAAC,gBAAgB,EAAEX,gBAAgB,GAAG,KAAK,GAAG,IAAI,EAAEF,UAAU,CAAC;EAEvF,OAAOP,OAAO;AAChB"}
|
|
@@ -7,17 +7,13 @@ exports.createBuildPodfilePropsConfigPlugin = createBuildPodfilePropsConfigPlugi
|
|
|
7
7
|
exports.updateIosBuildPropertiesFromConfig = updateIosBuildPropertiesFromConfig;
|
|
8
8
|
exports.updateIosBuildProperty = updateIosBuildProperty;
|
|
9
9
|
exports.withJsEnginePodfileProps = void 0;
|
|
10
|
-
|
|
11
10
|
function _iosPlugins() {
|
|
12
11
|
const data = require("../plugins/ios-plugins");
|
|
13
|
-
|
|
14
12
|
_iosPlugins = function () {
|
|
15
13
|
return data;
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
return data;
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
/**
|
|
22
18
|
* Creates a `withPodfileProperties` config-plugin based on given config to property mapping rules.
|
|
23
19
|
*
|
|
@@ -38,46 +34,38 @@ function createBuildPodfilePropsConfigPlugin(configToPropertyRules, name) {
|
|
|
38
34
|
config.modResults = updateIosBuildPropertiesFromConfig(sourceConfig !== null && sourceConfig !== void 0 ? sourceConfig : config, config.modResults, configToPropertyRules);
|
|
39
35
|
return config;
|
|
40
36
|
});
|
|
41
|
-
|
|
42
37
|
if (name) {
|
|
43
38
|
Object.defineProperty(withUnknown, 'name', {
|
|
44
39
|
value: name
|
|
45
40
|
});
|
|
46
41
|
}
|
|
47
|
-
|
|
48
42
|
return withUnknown;
|
|
49
43
|
}
|
|
44
|
+
|
|
50
45
|
/**
|
|
51
46
|
* A config-plugin to update `ios/Podfile.properties.json` from the `jsEngine` in expo config
|
|
52
47
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
48
|
const withJsEnginePodfileProps = createBuildPodfilePropsConfigPlugin([{
|
|
56
49
|
propName: 'expo.jsEngine',
|
|
57
50
|
propValueGetter: config => {
|
|
58
51
|
var _ref, _config$ios$jsEngine, _config$ios;
|
|
59
|
-
|
|
60
|
-
return (_ref = (_config$ios$jsEngine = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.jsEngine) !== null && _config$ios$jsEngine !== void 0 ? _config$ios$jsEngine : config.jsEngine) !== null && _ref !== void 0 ? _ref : 'jsc';
|
|
52
|
+
return (_ref = (_config$ios$jsEngine = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.jsEngine) !== null && _config$ios$jsEngine !== void 0 ? _config$ios$jsEngine : config.jsEngine) !== null && _ref !== void 0 ? _ref : 'hermes';
|
|
61
53
|
}
|
|
62
54
|
}], 'withJsEnginePodfileProps');
|
|
63
55
|
exports.withJsEnginePodfileProps = withJsEnginePodfileProps;
|
|
64
|
-
|
|
65
56
|
function updateIosBuildPropertiesFromConfig(config, podfileProperties, configToPropertyRules) {
|
|
66
57
|
for (const configToProperty of configToPropertyRules) {
|
|
67
58
|
const value = configToProperty.propValueGetter(config);
|
|
68
59
|
updateIosBuildProperty(podfileProperties, configToProperty.propName, value);
|
|
69
60
|
}
|
|
70
|
-
|
|
71
61
|
return podfileProperties;
|
|
72
62
|
}
|
|
73
|
-
|
|
74
63
|
function updateIosBuildProperty(podfileProperties, name, value, options) {
|
|
75
64
|
if (value) {
|
|
76
65
|
podfileProperties[name] = value;
|
|
77
66
|
} else if (options !== null && options !== void 0 && options.removePropWhenValueIsNull) {
|
|
78
67
|
delete podfileProperties[name];
|
|
79
68
|
}
|
|
80
|
-
|
|
81
69
|
return podfileProperties;
|
|
82
70
|
}
|
|
83
71
|
//# sourceMappingURL=BuildProperties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildProperties.js","names":["createBuildPodfilePropsConfigPlugin","configToPropertyRules","name","withUnknown","config","sourceConfig","withPodfileProperties","modResults","updateIosBuildPropertiesFromConfig","Object","defineProperty","value","withJsEnginePodfileProps","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 { BuildPropertiesConfig, ConfigToPropertyRuleType } 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) => config.ios?.jsEngine ?? config.jsEngine ?? '
|
|
1
|
+
{"version":3,"file":"BuildProperties.js","names":["createBuildPodfilePropsConfigPlugin","configToPropertyRules","name","withUnknown","config","sourceConfig","withPodfileProperties","modResults","updateIosBuildPropertiesFromConfig","Object","defineProperty","value","withJsEnginePodfileProps","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 { BuildPropertiesConfig, ConfigToPropertyRuleType } 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) => config.ios?.jsEngine ?? config.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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mCAAmC,CACjDC,qBAAmE,EACnEC,IAAa,EACb;EACA,MAAMC,WAAwF,GAAG,CAC/FC,MAAM,EACNC,YAAY,KAEZ,IAAAC,mCAAqB,EAACF,MAAM,EAAGA,MAAM,IAAK;IACxCA,MAAM,CAACG,UAAU,GAAGC,kCAAkC,CACnDH,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAID,MAAM,EACvBA,MAAM,CAACG,UAAU,EACjBN,qBAAqB,CACtB;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,GAAGZ,mCAAmC,CACzE,CACE;EACEa,QAAQ,EAAE,eAAe;EACzBC,eAAe,EAAGV,MAAM;IAAA;IAAA,sDAAKA,MAAM,CAACW,GAAG,gDAAV,YAAYC,QAAQ,uEAAIZ,MAAM,CAACY,QAAQ,uCAAI,QAAQ;EAAA;AAClF,CAAC,CACF,EACD,0BAA0B,CAC3B;AAAC;AAEK,SAASR,kCAAkC,CAChDJ,MAAwB,EACxBa,iBAAyC,EACzChB,qBAAmE,EACnE;EACA,KAAK,MAAMiB,gBAAgB,IAAIjB,qBAAqB,EAAE;IACpD,MAAMU,KAAK,GAAGO,gBAAgB,CAACJ,eAAe,CAACV,MAAM,CAAC;IACtDe,sBAAsB,CAACF,iBAAiB,EAAEC,gBAAgB,CAACL,QAAQ,EAAEF,KAAK,CAAC;EAC7E;EACA,OAAOM,iBAAiB;AAC1B;AAEO,SAASE,sBAAsB,CACpCF,iBAAyC,EACzCf,IAAY,EACZS,KAAgC,EAChCS,OAAiD,EACjD;EACA,IAAIT,KAAK,EAAE;IACTM,iBAAiB,CAACf,IAAI,CAAC,GAAGS,KAAK;EACjC,CAAC,MAAM,IAAIS,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEC,yBAAyB,EAAE;IAC7C,OAAOJ,iBAAiB,CAACf,IAAI,CAAC;EAChC;EACA,OAAOe,iBAAiB;AAC1B"}
|