@expo/prebuild-config 3.0.8 → 3.0.9

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.
@@ -25,28 +25,21 @@ function _createLegacyPlugin() {
25
25
  return data;
26
26
  }
27
27
 
28
- const withAppleSignInEntitlement = config => {
28
+ const withAppleSignInWarning = config => {
29
29
  return (0, _configPlugins().withEntitlementsPlist)(config, config => {
30
- config.modResults = setAppleSignInEntitlement(config, config.modResults);
30
+ var _config$ios;
31
+
32
+ if ((_config$ios = config.ios) !== null && _config$ios !== void 0 && _config$ios.usesAppleSignIn) {
33
+ _configPlugins().WarningAggregator.addWarningIOS('ios.usesAppleSignIn', 'Install expo-apple-authentication to enable this feature', 'https://docs.expo.dev/versions/latest/sdk/apple-authentication/#eas-build');
34
+ }
35
+
31
36
  return config;
32
37
  });
33
38
  };
34
39
 
35
- function setAppleSignInEntitlement(config, entitlementsPlist) {
36
- var _config$ios;
37
-
38
- if ((_config$ios = config.ios) !== null && _config$ios !== void 0 && _config$ios.usesAppleSignIn) {
39
- return { ...entitlementsPlist,
40
- 'com.apple.developer.applesignin': ['Default']
41
- };
42
- }
43
-
44
- return entitlementsPlist;
45
- }
46
-
47
40
  var _default = (0, _createLegacyPlugin().createLegacyPlugin)({
48
41
  packageName: 'expo-apple-authentication',
49
- fallback: withAppleSignInEntitlement
42
+ fallback: withAppleSignInWarning
50
43
  });
51
44
 
52
45
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/plugins/unversioned/expo-apple-authentication.ts"],"names":["withAppleSignInEntitlement","config","modResults","setAppleSignInEntitlement","entitlementsPlist","ios","usesAppleSignIn","packageName","fallback"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA,MAAMA,0BAAwC,GAAGC,MAAM,IAAI;AACzD,SAAO,4CAAsBA,MAAtB,EAA8BA,MAAM,IAAI;AAC7CA,IAAAA,MAAM,CAACC,UAAP,GAAoBC,yBAAyB,CAACF,MAAD,EAASA,MAAM,CAACC,UAAhB,CAA7C;AACA,WAAOD,MAAP;AACD,GAHM,CAAP;AAID,CALD;;AAOA,SAASE,yBAAT,CAAmCF,MAAnC,EAAuDG,iBAAvD,EAAkG;AAAA;;AAChG,qBAAIH,MAAM,CAACI,GAAX,wCAAI,YAAYC,eAAhB,EAAiC;AAC/B,WAAO,EACL,GAAGF,iBADE;AAEL,yCAAmC,CAAC,SAAD;AAF9B,KAAP;AAID;;AAED,SAAOA,iBAAP;AACD;;eAEc,8CAAmB;AAChCG,EAAAA,WAAW,EAAE,2BADmB;AAEhCC,EAAAA,QAAQ,EAAER;AAFsB,CAAnB,C","sourcesContent":["import { ConfigPlugin, withEntitlementsPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst withAppleSignInEntitlement: ConfigPlugin = config => {\n return withEntitlementsPlist(config, config => {\n config.modResults = setAppleSignInEntitlement(config, config.modResults);\n return config;\n });\n};\n\nfunction setAppleSignInEntitlement(config: ExpoConfig, entitlementsPlist: JSONObject): JSONObject {\n if (config.ios?.usesAppleSignIn) {\n return {\n ...entitlementsPlist,\n 'com.apple.developer.applesignin': ['Default'],\n };\n }\n\n return entitlementsPlist;\n}\n\nexport default createLegacyPlugin({\n packageName: 'expo-apple-authentication',\n fallback: withAppleSignInEntitlement,\n});\n"],"file":"expo-apple-authentication.js"}
1
+ {"version":3,"sources":["../../../src/plugins/unversioned/expo-apple-authentication.ts"],"names":["withAppleSignInWarning","config","ios","usesAppleSignIn","WarningAggregator","addWarningIOS","packageName","fallback"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA,MAAMA,sBAAoC,GAAGC,MAAM,IAAI;AACrD,SAAO,4CAAsBA,MAAtB,EAA8BA,MAAM,IAAI;AAAA;;AAC7C,uBAAIA,MAAM,CAACC,GAAX,wCAAI,YAAYC,eAAhB,EAAiC;AAC/BC,yCAAkBC,aAAlB,CACE,qBADF,EAEE,0DAFF,EAGE,2EAHF;AAKD;;AAED,WAAOJ,MAAP;AACD,GAVM,CAAP;AAWD,CAZD;;eAce,8CAAmB;AAChCK,EAAAA,WAAW,EAAE,2BADmB;AAEhCC,EAAAA,QAAQ,EAAEP;AAFsB,CAAnB,C","sourcesContent":["import { ConfigPlugin, WarningAggregator, withEntitlementsPlist } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst withAppleSignInWarning: ConfigPlugin = config => {\n return withEntitlementsPlist(config, config => {\n if (config.ios?.usesAppleSignIn) {\n WarningAggregator.addWarningIOS(\n 'ios.usesAppleSignIn',\n 'Install expo-apple-authentication to enable this feature',\n 'https://docs.expo.dev/versions/latest/sdk/apple-authentication/#eas-build'\n );\n }\n\n return config;\n });\n};\n\nexport default createLegacyPlugin({\n packageName: 'expo-apple-authentication',\n fallback: withAppleSignInWarning,\n});\n"],"file":"expo-apple-authentication.js"}
@@ -1,2 +1,3 @@
1
- declare const _default: import("@expo/config-plugins").ConfigPlugin<void>;
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ declare const _default: ConfigPlugin<void>;
2
3
  export default _default;
@@ -5,6 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
+ function _configPlugins() {
9
+ const data = require("@expo/config-plugins");
10
+
11
+ _configPlugins = function () {
12
+ return data;
13
+ };
14
+
15
+ return data;
16
+ }
17
+
8
18
  function _createLegacyPlugin() {
9
19
  const data = require("../createLegacyPlugin");
10
20
 
@@ -25,10 +35,18 @@ function _withAndroidNotifications() {
25
35
  return data;
26
36
  }
27
37
 
38
+ const withNotificationsEntitlement = (config, mode) => {
39
+ return (0, _configPlugins().withEntitlementsPlist)(config, config => {
40
+ config.modResults['aps-environment'] = mode;
41
+ return config;
42
+ });
43
+ };
44
+
28
45
  var _default = (0, _createLegacyPlugin().createLegacyPlugin)({
29
46
  packageName: 'expo-notifications',
30
47
  fallback: [// Android
31
- _withAndroidNotifications().withNotificationManifest, _withAndroidNotifications().withNotificationIconColor, _withAndroidNotifications().withNotificationIcons]
48
+ _withAndroidNotifications().withNotificationManifest, _withAndroidNotifications().withNotificationIconColor, _withAndroidNotifications().withNotificationIcons, // iOS
49
+ [withNotificationsEntitlement, 'development']]
32
50
  });
33
51
 
34
52
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/plugins/unversioned/expo-notifications/expo-notifications.ts"],"names":["packageName","fallback","withNotificationManifest","withNotificationIconColor","withNotificationIcons"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;eAMe,8CAAmB;AAChCA,EAAAA,WAAW,EAAE,oBADmB;AAEhCC,EAAAA,QAAQ,EAAE,CACR;AACAC,sDAFQ,EAGRC,qDAHQ,EAIRC,iDAJQ;AAFsB,CAAnB,C","sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport {\n withNotificationIconColor,\n withNotificationIcons,\n withNotificationManifest,\n} from './withAndroidNotifications';\n\nexport default createLegacyPlugin({\n packageName: 'expo-notifications',\n fallback: [\n // Android\n withNotificationManifest,\n withNotificationIconColor,\n withNotificationIcons,\n ],\n});\n"],"file":"expo-notifications.js"}
1
+ {"version":3,"sources":["../../../../src/plugins/unversioned/expo-notifications/expo-notifications.ts"],"names":["withNotificationsEntitlement","config","mode","modResults","packageName","fallback","withNotificationManifest","withNotificationIconColor","withNotificationIcons"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAMA,MAAMA,4BAAwE,GAAG,CAACC,MAAD,EAASC,IAAT,KAAkB;AACjG,SAAO,4CAAsBD,MAAtB,EAA8BA,MAAM,IAAI;AAC7CA,IAAAA,MAAM,CAACE,UAAP,CAAkB,iBAAlB,IAAuCD,IAAvC;AACA,WAAOD,MAAP;AACD,GAHM,CAAP;AAID,CALD;;eAOe,8CAAmB;AAChCG,EAAAA,WAAW,EAAE,oBADmB;AAEhCC,EAAAA,QAAQ,EAAE,CACR;AACAC,sDAFQ,EAGRC,qDAHQ,EAIRC,iDAJQ,EAKR;AACA,GAACR,4BAAD,EAA+B,aAA/B,CANQ;AAFsB,CAAnB,C","sourcesContent":["import { ConfigPlugin, withEntitlementsPlist } from '@expo/config-plugins';\n\nimport { createLegacyPlugin } from '../createLegacyPlugin';\nimport {\n withNotificationIconColor,\n withNotificationIcons,\n withNotificationManifest,\n} from './withAndroidNotifications';\n\nconst withNotificationsEntitlement: ConfigPlugin<'production' | 'development'> = (config, mode) => {\n return withEntitlementsPlist(config, config => {\n config.modResults['aps-environment'] = mode;\n return config;\n });\n};\n\nexport default createLegacyPlugin({\n packageName: 'expo-notifications',\n fallback: [\n // Android\n withNotificationManifest,\n withNotificationIconColor,\n withNotificationIcons,\n // iOS\n [withNotificationsEntitlement, 'development'],\n ],\n});\n"],"file":"expo-notifications.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/prebuild-config",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "description": "Get the prebuild config",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -35,8 +35,8 @@
35
35
  "@types/xml2js": "^0.4.5"
36
36
  },
37
37
  "dependencies": {
38
- "@expo/config": "6.0.8",
39
- "@expo/config-plugins": "4.0.8",
38
+ "@expo/config": "6.0.9",
39
+ "@expo/config-plugins": "4.0.9",
40
40
  "@expo/config-types": "^43.0.1",
41
41
  "@expo/image-utils": "0.3.18",
42
42
  "@expo/json-file": "8.2.34",