@expo/prebuild-config 6.5.0 → 6.7.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/getAutolinkedPackages.js +1 -0
- package/build/getAutolinkedPackages.js.map +1 -1
- package/build/importExpoModulesAutolinking.d.ts +2 -4
- package/build/importExpoModulesAutolinking.js +12 -7
- package/build/importExpoModulesAutolinking.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js.map +1 -1
- package/build/plugins/withDefaultPlugins.js +2 -9
- package/build/plugins/withDefaultPlugins.js.map +1 -1
- package/package.json +12 -10
- package/build/plugins/unversioned/expo-branch/expo-branch.d.ts +0 -2
- package/build/plugins/unversioned/expo-branch/expo-branch.js +0 -37
- package/build/plugins/unversioned/expo-branch/expo-branch.js.map +0 -1
- package/build/plugins/unversioned/expo-branch/withAndroidBranch.d.ts +0 -5
- package/build/plugins/unversioned/expo-branch/withAndroidBranch.js +0 -45
- package/build/plugins/unversioned/expo-branch/withAndroidBranch.js.map +0 -1
- package/build/plugins/unversioned/expo-branch/withIosBranch.d.ts +0 -5
- package/build/plugins/unversioned/expo-branch/withIosBranch.js +0 -39
- package/build/plugins/unversioned/expo-branch/withIosBranch.js.map +0 -1
|
@@ -24,6 +24,7 @@ async function getAutolinkedPackagesAsync(projectRoot, platforms = ['ios', 'andr
|
|
|
24
24
|
const autolinking = (0, _importExpoModulesAutolinking().importExpoModulesAutolinking)(projectRoot);
|
|
25
25
|
const searchPaths = await autolinking.resolveSearchPathsAsync(null, projectRoot);
|
|
26
26
|
const platformPaths = await Promise.all(platforms.map(platform => autolinking.findModulesAsync({
|
|
27
|
+
projectRoot,
|
|
27
28
|
platform,
|
|
28
29
|
searchPaths,
|
|
29
30
|
silent: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutolinkedPackages.js","names":["_importExpoModulesAutolinking","data","require","getAutolinkedPackagesAsync","projectRoot","platforms","autolinking","importExpoModulesAutolinking","searchPaths","resolveSearchPathsAsync","platformPaths","Promise","all","map","platform","findModulesAsync","silent","resolvePackagesList","allPlatformPaths","paths","Object","keys","flat","uniquePaths","Set","sort","shouldSkipAutoPlugin","config","plugin","_config$_internal","Array","isArray","_internal","autolinkedModules","pluginId","isIncluded","includes"],"sources":["../src/getAutolinkedPackages.ts"],"sourcesContent":["import { ModPlatform, StaticPlugin } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { importExpoModulesAutolinking } from './importExpoModulesAutolinking';\n\n/**\n * Returns a list of packages that are autolinked to a project.\n *\n * @param projectRoot\n * @param platforms platforms to check for\n * @returns list of packages ex: `['expo-camera', 'react-native-screens']`\n */\nexport async function getAutolinkedPackagesAsync(\n projectRoot: string,\n platforms: ModPlatform[] = ['ios', 'android']\n) {\n const autolinking = importExpoModulesAutolinking(projectRoot);\n const searchPaths = await autolinking.resolveSearchPathsAsync(null, projectRoot);\n\n const platformPaths = await Promise.all(\n platforms.map((platform) =>\n autolinking.findModulesAsync({\n platform,\n searchPaths,\n silent: true,\n })\n )\n );\n\n return resolvePackagesList(platformPaths);\n}\n\nexport function resolvePackagesList(platformPaths: Record<string, any>[]) {\n const allPlatformPaths = platformPaths.map((paths) => Object.keys(paths)).flat();\n\n const uniquePaths = [...new Set(allPlatformPaths)];\n\n return uniquePaths.sort();\n}\n\nexport function shouldSkipAutoPlugin(\n config: Pick<ExpoConfig, '_internal'>,\n plugin: StaticPlugin | string\n) {\n // Hack workaround because expo-dev-client doesn't use expo modules.\n if (plugin === 'expo-dev-client') {\n return false;\n }\n\n // Only perform the check if `autolinkedModules` is defined, otherwise we assume\n // this is a legacy runner which doesn't support autolinking.\n if (Array.isArray(config._internal?.autolinkedModules)) {\n // Resolve the pluginId as a string.\n const pluginId = Array.isArray(plugin) ? plugin[0] : plugin;\n if (typeof pluginId === 'string') {\n // Determine if the autolinked modules list includes our moduleId\n const isIncluded = config._internal!.autolinkedModules.includes(pluginId);\n if (!isIncluded) {\n // If it doesn't then we know that any potential plugin shouldn't be applied automatically.\n return true;\n }\n }\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAGA,SAAAA,8BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,6BAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeE,0BAA0BA,CAC9CC,WAAmB,EACnBC,SAAwB,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,EAC7C;EACA,MAAMC,WAAW,GAAG,IAAAC,4DAA4B,EAACH,WAAW,CAAC;EAC7D,MAAMI,WAAW,GAAG,MAAMF,WAAW,CAACG,uBAAuB,CAAC,IAAI,EAAEL,WAAW,CAAC;EAEhF,MAAMM,aAAa,GAAG,MAAMC,OAAO,CAACC,GAAG,CACrCP,SAAS,CAACQ,GAAG,CAAEC,QAAQ,IACrBR,WAAW,CAACS,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"getAutolinkedPackages.js","names":["_importExpoModulesAutolinking","data","require","getAutolinkedPackagesAsync","projectRoot","platforms","autolinking","importExpoModulesAutolinking","searchPaths","resolveSearchPathsAsync","platformPaths","Promise","all","map","platform","findModulesAsync","silent","resolvePackagesList","allPlatformPaths","paths","Object","keys","flat","uniquePaths","Set","sort","shouldSkipAutoPlugin","config","plugin","_config$_internal","Array","isArray","_internal","autolinkedModules","pluginId","isIncluded","includes"],"sources":["../src/getAutolinkedPackages.ts"],"sourcesContent":["import { ModPlatform, StaticPlugin } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { importExpoModulesAutolinking } from './importExpoModulesAutolinking';\n\n/**\n * Returns a list of packages that are autolinked to a project.\n *\n * @param projectRoot\n * @param platforms platforms to check for\n * @returns list of packages ex: `['expo-camera', 'react-native-screens']`\n */\nexport async function getAutolinkedPackagesAsync(\n projectRoot: string,\n platforms: ModPlatform[] = ['ios', 'android']\n) {\n const autolinking = importExpoModulesAutolinking(projectRoot);\n const searchPaths = await autolinking.resolveSearchPathsAsync(null, projectRoot);\n\n const platformPaths = await Promise.all(\n platforms.map((platform) =>\n autolinking.findModulesAsync({\n projectRoot,\n platform,\n searchPaths,\n silent: true,\n })\n )\n );\n\n return resolvePackagesList(platformPaths);\n}\n\nexport function resolvePackagesList(platformPaths: Record<string, any>[]) {\n const allPlatformPaths = platformPaths.map((paths) => Object.keys(paths)).flat();\n\n const uniquePaths = [...new Set(allPlatformPaths)];\n\n return uniquePaths.sort();\n}\n\nexport function shouldSkipAutoPlugin(\n config: Pick<ExpoConfig, '_internal'>,\n plugin: StaticPlugin | string\n) {\n // Hack workaround because expo-dev-client doesn't use expo modules.\n if (plugin === 'expo-dev-client') {\n return false;\n }\n\n // Only perform the check if `autolinkedModules` is defined, otherwise we assume\n // this is a legacy runner which doesn't support autolinking.\n if (Array.isArray(config._internal?.autolinkedModules)) {\n // Resolve the pluginId as a string.\n const pluginId = Array.isArray(plugin) ? plugin[0] : plugin;\n if (typeof pluginId === 'string') {\n // Determine if the autolinked modules list includes our moduleId\n const isIncluded = config._internal!.autolinkedModules.includes(pluginId);\n if (!isIncluded) {\n // If it doesn't then we know that any potential plugin shouldn't be applied automatically.\n return true;\n }\n }\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAGA,SAAAA,8BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,6BAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeE,0BAA0BA,CAC9CC,WAAmB,EACnBC,SAAwB,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,EAC7C;EACA,MAAMC,WAAW,GAAG,IAAAC,4DAA4B,EAACH,WAAW,CAAC;EAC7D,MAA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;EACA,OAAO,KAAK;AACd"}
|
|
@@ -6,11 +6,9 @@ export type SearchOptions = {
|
|
|
6
6
|
platform: 'ios' | 'android' | 'web';
|
|
7
7
|
silent?: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
resolveSearchPathsAsync(searchPaths: string[] | null, cwd: string): Promise<string[]>;
|
|
11
|
-
findModulesAsync(providedOptions: SearchOptions): Promise<SearchResults>;
|
|
12
|
-
};
|
|
9
|
+
type AutolinkingModule = typeof import('expo-modules-autolinking/exports');
|
|
13
10
|
/**
|
|
14
11
|
* Imports the `expo-modules-autolinking` package installed in the project at the given path.
|
|
15
12
|
*/
|
|
16
13
|
export declare function importExpoModulesAutolinking(projectRoot: string): AutolinkingModule;
|
|
14
|
+
export {};
|
|
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.importExpoModulesAutolinking = importExpoModulesAutolinking;
|
|
7
|
-
// NOTE: Keep these types in-sync with expo-modules-autolinking
|
|
8
|
-
|
|
9
7
|
/**
|
|
10
8
|
* Imports the `expo-modules-autolinking` package installed in the project at the given path.
|
|
11
9
|
*/
|
|
@@ -15,14 +13,21 @@ function importExpoModulesAutolinking(projectRoot) {
|
|
|
15
13
|
return autolinking;
|
|
16
14
|
}
|
|
17
15
|
function tryRequireExpoModulesAutolinking(projectRoot) {
|
|
16
|
+
let resolvedAutolinkingPath;
|
|
17
|
+
const resolveOptions = {
|
|
18
|
+
paths: [projectRoot]
|
|
19
|
+
};
|
|
20
|
+
try {
|
|
21
|
+
resolvedAutolinkingPath = require.resolve('expo-modules-autolinking/exports', resolveOptions);
|
|
22
|
+
} catch {}
|
|
23
|
+
// Fallback to the older version of expo-modules-autolinking
|
|
18
24
|
try {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return require(resolvedAutolinkingPath);
|
|
23
|
-
} catch {
|
|
25
|
+
resolvedAutolinkingPath = require.resolve('expo-modules-autolinking/build/autolinking', resolveOptions);
|
|
26
|
+
} catch {}
|
|
27
|
+
if (!resolvedAutolinkingPath) {
|
|
24
28
|
throw new Error("Cannot find 'expo-modules-autolinking' package in your project, make sure that you have 'expo' package installed");
|
|
25
29
|
}
|
|
30
|
+
return require(resolvedAutolinkingPath);
|
|
26
31
|
}
|
|
27
32
|
function assertAutolinkingCompatibility(autolinking) {
|
|
28
33
|
if ('resolveSearchPathsAsync' in autolinking && 'findModulesAsync' in autolinking) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importExpoModulesAutolinking.js","names":["importExpoModulesAutolinking","projectRoot","autolinking","tryRequireExpoModulesAutolinking","assertAutolinkingCompatibility","resolvedAutolinkingPath","
|
|
1
|
+
{"version":3,"file":"importExpoModulesAutolinking.js","names":["importExpoModulesAutolinking","projectRoot","autolinking","tryRequireExpoModulesAutolinking","assertAutolinkingCompatibility","resolvedAutolinkingPath","resolveOptions","paths","require","resolve","Error"],"sources":["../src/importExpoModulesAutolinking.ts"],"sourcesContent":["export type SearchResults = {\n [moduleName: string]: object;\n};\n\nexport type SearchOptions = {\n searchPaths: string[];\n platform: 'ios' | 'android' | 'web';\n silent?: boolean;\n};\n\ntype AutolinkingModule = typeof import('expo-modules-autolinking/exports');\n\n/**\n * Imports the `expo-modules-autolinking` package installed in the project at the given path.\n */\nexport function importExpoModulesAutolinking(projectRoot: string): AutolinkingModule {\n const autolinking = tryRequireExpoModulesAutolinking(projectRoot);\n assertAutolinkingCompatibility(autolinking);\n return autolinking;\n}\n\nfunction tryRequireExpoModulesAutolinking(projectRoot: string): AutolinkingModule {\n let resolvedAutolinkingPath;\n const resolveOptions = { paths: [projectRoot] };\n\n try {\n resolvedAutolinkingPath = require.resolve('expo-modules-autolinking/exports', resolveOptions);\n } catch {}\n // Fallback to the older version of expo-modules-autolinking\n try {\n resolvedAutolinkingPath = require.resolve(\n 'expo-modules-autolinking/build/autolinking',\n resolveOptions\n );\n } catch {}\n\n if (!resolvedAutolinkingPath) {\n throw new Error(\n \"Cannot find 'expo-modules-autolinking' package in your project, make sure that you have 'expo' package installed\"\n );\n }\n return require(resolvedAutolinkingPath);\n}\n\nfunction assertAutolinkingCompatibility(autolinking: AutolinkingModule): void {\n if ('resolveSearchPathsAsync' in autolinking && 'findModulesAsync' in autolinking) {\n return;\n }\n throw new Error(\n \"The 'expo-modules-autolinking' package has been found, but it seems to be incompatible with '@expo/prebuild-config'\"\n );\n}\n"],"mappings":";;;;;;AAYA;AACA;AACA;AACO,SAASA,4BAA4BA,CAACC,WAAmB,EAAqB;EACnF,MAAMC,WAAW,GAAGC,gCAAgC,CAACF,WAAW,CAAC;EACjEG,8BAA8B,CAACF,WAAW,CAAC;EAC3C,OAAOA,WAAW;AACpB;AAEA,SAASC,gCAAgCA,CAACF,WAAmB,EAAqB;EAChF,IAAII,uBAAuB;EAC3B,MAAMC,cAAc,GAAG;IAAEC,KAAK,EAAE,CAACN,WAAW;EAAE,CAAC;EAE/C,IAAI;IACFI,uBAAuB,GAAGG,OAAO,CAACC,OAAO,CAAC,kCAAkC,EAAEH,cAAc,CAAC;EAC/F,CAAC,CAAC,MAAM,CAAC;EACT;EACA,IAAI;IACFD,uBAAuB,GAAGG,OAAO,CAACC,OAAO,CACvC,4CAA4C,EAC5CH,cAAc,CACf;EACH,CAAC,CAAC,MAAM,CAAC;EAET,IAAI,CAACD,uBAAuB,EAAE;IAC5B,MAAM,IAAIK,KAAK,CACb,kHAAkH,CACnH;EACH;EACA,OAAOF,OAAO,CAACH,uBAAuB,CAAC;AACzC;AAEA,SAASD,8BAA8BA,CAACF,WAA8B,EAAQ;EAC5E,IAAI,yBAAyB,IAAIA,WAAW,IAAI,kBAAkB,IAAIA,WAAW,EAAE;IACjF;EACF;EACA,MAAM,IAAIQ,KAAK,CACb,qHAAqH,CACtH;AACH"}
|
|
@@ -75,7 +75,7 @@ function setSplashScreenLegacyMainActivity(config, mainActivity, language) {
|
|
|
75
75
|
} = splashConfig;
|
|
76
76
|
const isJava = language === 'java';
|
|
77
77
|
const LE = isJava ? ';' : '';
|
|
78
|
-
mainActivity = (0, _codeMod().addImports)(mainActivity, ['expo.modules.splashscreen.SplashScreen', 'expo.modules.splashscreen.SplashScreenImageResizeMode', 'android.os.Bundle'], isJava);
|
|
78
|
+
mainActivity = (0, _codeMod().addImports)(mainActivity, ['expo.modules.splashscreen.singletons.SplashScreen', 'expo.modules.splashscreen.SplashScreenImageResizeMode', 'com.facebook.react.ReactRootView', 'android.os.Bundle'], isJava);
|
|
79
79
|
if (!mainActivity.match(/(?<=^.*super\.onCreate.*$)/m)) {
|
|
80
80
|
const onCreateBlock = isJava ? [' @Override', ' protected void onCreate(Bundle savedInstanceState) {', ' super.onCreate(savedInstanceState);', ' }'] : [' override fun onCreate(savedInstanceState: Bundle?) {', ' super.onCreate(savedInstanceState)', ' }'];
|
|
81
81
|
mainActivity = (0, _generateCode().mergeContents)({
|
package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withAndroidSplashLegacyMainActivity.js","names":["_configPlugins","data","require","_codeMod","_generateCode","_debug","_interopRequireDefault","_getAndroidSplashConfig","obj","__esModule","default","debug","Debug","SHOW_SPLASH_ID","withAndroidSplashLegacyMainActivity","config","withMainActivity","modResults","contents","setSplashScreenLegacyMainActivity","language","exports","mainActivity","_config$androidStatus","splashConfig","getAndroidSplashConfig","mod","removeContents","src","tag","didClear","statusBarTranslucent","androidStatusBar","translucent","resizeMode","isJava","LE","addImports","match","onCreateBlock","mergeContents","anchor","offset","comment","newSrc","join","split","filter","line","test","toUpperCase"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.ts"],"sourcesContent":["import { ConfigPlugin, withMainActivity } from '@expo/config-plugins';\nimport { addImports } from '@expo/config-plugins/build/android/codeMod';\nimport { mergeContents, removeContents } from '@expo/config-plugins/build/utils/generateCode';\nimport { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\n\nimport { getAndroidSplashConfig } from './getAndroidSplashConfig';\n\nconst debug = Debug('expo:prebuild-config:expo-splash-screen:android:mainActivity');\n\n// DO NOT CHANGE\nconst SHOW_SPLASH_ID = 'expo-splash-screen-mainActivity-onCreate-show-splash';\n\nexport const withAndroidSplashLegacyMainActivity: ConfigPlugin = (config) => {\n return withMainActivity(config, (config) => {\n config.modResults.contents = setSplashScreenLegacyMainActivity(\n config,\n config.modResults.contents,\n config.modResults.language\n );\n return config;\n });\n};\n\nexport function setSplashScreenLegacyMainActivity(\n config: Pick<ExpoConfig, 'android' | 'androidStatusBar' | 'userInterfaceStyle'>,\n mainActivity: string,\n language: 'java' | 'kt'\n): string {\n debug(`Modify with language: \"${language}\"`);\n const splashConfig = getAndroidSplashConfig(config);\n\n if (!splashConfig) {\n // Remove our generated code safely...\n const mod = removeContents({\n src: mainActivity,\n tag: SHOW_SPLASH_ID,\n });\n\n mainActivity = mod.contents;\n if (mod.didClear) {\n debug('Removed SplashScreen.show()');\n }\n return mainActivity;\n }\n // TODO: Translucent is weird\n const statusBarTranslucent = !!config.androidStatusBar?.translucent;\n\n const { resizeMode } = splashConfig;\n const isJava = language === 'java';\n const LE = isJava ? ';' : '';\n\n mainActivity = addImports(\n mainActivity,\n [\n 'expo.modules.splashscreen.SplashScreen',\n 'expo.modules.splashscreen.SplashScreenImageResizeMode',\n 'android.os.Bundle',\n ],\n isJava\n );\n\n if (!mainActivity.match(/(?<=^.*super\\.onCreate.*$)/m)) {\n const onCreateBlock = isJava\n ? [\n ' @Override',\n ' protected void onCreate(Bundle savedInstanceState) {',\n ' super.onCreate(savedInstanceState);',\n ' }',\n ]\n : [\n ' override fun onCreate(savedInstanceState: Bundle?) {',\n ' super.onCreate(savedInstanceState)',\n ' }',\n ];\n\n mainActivity = mergeContents({\n src: mainActivity,\n // insert just below super.onCreate\n anchor: isJava\n ? /(?<=public\\s+class\\s+.*\\s+extends\\s+.*\\s+{.*$)/m\n : /(?<=class\\s+.*\\s+:\\s+.*\\s+{.*$)/m,\n offset: 1,\n comment: '//',\n tag: 'expo-splash-screen-mainActivity-onCreate',\n newSrc: onCreateBlock.join('\\n'),\n }).contents;\n }\n\n // Remove our generated code safely...\n mainActivity = removeContents({\n src: mainActivity,\n tag: SHOW_SPLASH_ID,\n }).contents;\n\n // Remove code from `@expo/configure-splash-screen`\n mainActivity = mainActivity\n .split('\\n')\n .filter((line) => {\n return !/SplashScreen\\.show\\(this,\\s?SplashScreenImageResizeMode\\./.test(line);\n })\n .join('\\n');\n\n // Reapply generated code.\n mainActivity = mergeContents({\n src: mainActivity,\n // insert just below super.onCreate\n anchor: /(?<=^.*super\\.onCreate.*$)/m,\n offset: 1,\n comment: '//',\n tag: SHOW_SPLASH_ID,\n newSrc: ` SplashScreen.show(this, SplashScreenImageResizeMode.${resizeMode.toUpperCase()}, ReactRootView${\n isJava ? '.class' : '::class.java'\n }, ${statusBarTranslucent})${LE}`,\n }).contents;\n\n // TODO: Remove old `SplashScreen.show`\n\n return mainActivity;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,S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M,CAACiB,gBAAgB,cAAAT,qBAAA,eAAvBA,qBAAA,CAAyBU,WAAW;EAEnE,MAAM;IAAEC;EAAW,CAAC,GAAGV,YAAY;EACnC,MAAMW,MAAM,GAAGf,QAAQ,KAAK,MAAM;EAClC,MAAMgB,EAAE,GAAGD,MAAM,GAAG,GAAG,GAAG,EAAE;EAE5Bb,YAAY,GAAG,IAAAe,qBAAU,EACvBf,YAAY,EACZ,CACE,
|
|
1
|
+
{"version":3,"file":"withAndroidSplashLegacyMainActivity.js","names":["_configPlugins","data","require","_codeMod","_generateCode","_debug","_interopRequireDefault","_getAndroidSplashConfig","obj","__esModule","default","debug","Debug","SHOW_SPLASH_ID","withAndroidSplashLegacyMainActivity","config","withMainActivity","modResults","contents","setSplashScreenLegacyMainActivity","language","exports","mainActivity","_config$androidStatus","splashConfig","getAndroidSplashConfig","mod","removeContents","src","tag","didClear","statusBarTranslucent","androidStatusBar","translucent","resizeMode","isJava","LE","addImports","match","onCreateBlock","mergeContents","anchor","offset","comment","newSrc","join","split","filter","line","test","toUpperCase"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.ts"],"sourcesContent":["import { ConfigPlugin, withMainActivity } from '@expo/config-plugins';\nimport { addImports } from '@expo/config-plugins/build/android/codeMod';\nimport { mergeContents, removeContents } from '@expo/config-plugins/build/utils/generateCode';\nimport { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\n\nimport { getAndroidSplashConfig } from './getAndroidSplashConfig';\n\nconst debug = Debug('expo:prebuild-config:expo-splash-screen:android:mainActivity');\n\n// DO NOT CHANGE\nconst SHOW_SPLASH_ID = 'expo-splash-screen-mainActivity-onCreate-show-splash';\n\nexport const withAndroidSplashLegacyMainActivity: ConfigPlugin = (config) => {\n return withMainActivity(config, (config) => {\n config.modResults.contents = setSplashScreenLegacyMainActivity(\n config,\n config.modResults.contents,\n config.modResults.language\n );\n return config;\n });\n};\n\nexport function setSplashScreenLegacyMainActivity(\n config: Pick<ExpoConfig, 'android' | 'androidStatusBar' | 'userInterfaceStyle'>,\n mainActivity: string,\n language: 'java' | 'kt'\n): string {\n debug(`Modify with language: \"${language}\"`);\n const splashConfig = getAndroidSplashConfig(config);\n\n if (!splashConfig) {\n // Remove our generated code safely...\n const mod = removeContents({\n src: mainActivity,\n tag: SHOW_SPLASH_ID,\n });\n\n mainActivity = mod.contents;\n if (mod.didClear) {\n debug('Removed SplashScreen.show()');\n }\n return mainActivity;\n }\n // TODO: Translucent is weird\n const statusBarTranslucent = !!config.androidStatusBar?.translucent;\n\n const { resizeMode } = splashConfig;\n const isJava = language === 'java';\n const LE = isJava ? ';' : '';\n\n mainActivity = addImports(\n mainActivity,\n [\n 'expo.modules.splashscreen.singletons.SplashScreen',\n 'expo.modules.splashscreen.SplashScreenImageResizeMode',\n 'com.facebook.react.ReactRootView',\n 'android.os.Bundle',\n ],\n isJava\n );\n\n if (!mainActivity.match(/(?<=^.*super\\.onCreate.*$)/m)) {\n const onCreateBlock = isJava\n ? [\n ' @Override',\n ' protected void onCreate(Bundle savedInstanceState) {',\n ' super.onCreate(savedInstanceState);',\n ' }',\n ]\n : [\n ' override fun onCreate(savedInstanceState: Bundle?) {',\n ' super.onCreate(savedInstanceState)',\n ' }',\n ];\n\n mainActivity = mergeContents({\n src: mainActivity,\n // insert just below super.onCreate\n anchor: isJava\n ? /(?<=public\\s+class\\s+.*\\s+extends\\s+.*\\s+{.*$)/m\n : /(?<=class\\s+.*\\s+:\\s+.*\\s+{.*$)/m,\n offset: 1,\n comment: '//',\n tag: 'expo-splash-screen-mainActivity-onCreate',\n newSrc: onCreateBlock.join('\\n'),\n }).contents;\n }\n\n // Remove our generated code safely...\n mainActivity = removeContents({\n src: mainActivity,\n tag: SHOW_SPLASH_ID,\n }).contents;\n\n // Remove code from `@expo/configure-splash-screen`\n mainActivity = mainActivity\n .split('\\n')\n .filter((line) => {\n return !/SplashScreen\\.show\\(this,\\s?SplashScreenImageResizeMode\\./.test(line);\n })\n .join('\\n');\n\n // Reapply generated code.\n mainActivity = mergeContents({\n src: mainActivity,\n // insert just below super.onCreate\n anchor: /(?<=^.*super\\.onCreate.*$)/m,\n offset: 1,\n comment: '//',\n tag: SHOW_SPLASH_ID,\n newSrc: ` SplashScreen.show(this, SplashScreenImageResizeMode.${resizeMode.toUpperCase()}, ReactRootView${\n isJava ? '.class' : '::class.java'\n }, ${statusBarTranslucent})${LE}`,\n }).contents;\n\n // TODO: Remove old `SplashScreen.show`\n\n return mainActivity;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,wBAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,uBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkE,SAAAK,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAElE,MAAMG,KAAK,GAAG,IAAAC,gBAAK,EAAC,8DAA8D,CAAC;;AAEnF;AACA,MAAMC,cAAc,GAAG,sDAAsD;AAEtE,MAAMC,mCAAiD,GAA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AppleAuthentication() {
|
|
|
50
50
|
};
|
|
51
51
|
return data;
|
|
52
52
|
}
|
|
53
|
-
function _expoBranch() {
|
|
54
|
-
const data = _interopRequireDefault(require("./unversioned/expo-branch/expo-branch"));
|
|
55
|
-
_expoBranch = function () {
|
|
56
|
-
return data;
|
|
57
|
-
};
|
|
58
|
-
return data;
|
|
59
|
-
}
|
|
60
53
|
function _expoContacts() {
|
|
61
54
|
const data = _interopRequireDefault(require("./unversioned/expo-contacts"));
|
|
62
55
|
_expoContacts = function () {
|
|
@@ -184,9 +177,9 @@ const withAndroidExpoPlugins = (config, props) => {
|
|
|
184
177
|
|
|
185
178
|
// Must keep in sync with `withVersionedExpoSDKPlugins`
|
|
186
179
|
exports.withAndroidExpoPlugins = withAndroidExpoPlugins;
|
|
187
|
-
const versionedExpoSDKPackages = ['react-native-maps', 'expo-ads-admob', 'expo-apple-authentication', 'expo-contacts', 'expo-notifications', 'expo-updates', 'expo-
|
|
180
|
+
const versionedExpoSDKPackages = ['react-native-maps', 'expo-ads-admob', 'expo-apple-authentication', 'expo-contacts', 'expo-notifications', 'expo-updates', 'expo-navigation-bar', 'expo-document-picker', 'expo-splash-screen', 'expo-system-ui'];
|
|
188
181
|
const withVersionedExpoSDKPlugins = config => {
|
|
189
|
-
return (0, _configPlugins().withPlugins)(config, [_reactNativeMaps().default, _expoAdsAdmob().default, _expoAppleAuthentication().default, _expoContacts().default, _expoNotifications().default, _expoUpdates().default,
|
|
182
|
+
return (0, _configPlugins().withPlugins)(config, [_reactNativeMaps().default, _expoAdsAdmob().default, _expoAppleAuthentication().default, _expoContacts().default, _expoNotifications().default, _expoUpdates().default, _expoDocumentPicker().default,
|
|
190
183
|
// System UI must come before splash screen as they overlap
|
|
191
184
|
// and splash screen will warn about conflicting rules.
|
|
192
185
|
_expoSystemUi().default, _expoSplashScreen().default, _expoNavigationBar().default]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDefaultPlugins.js","names":["_configPlugins","data","require","_debug","_interopRequireDefault","_withAndroidIcons","_withIosIcons","_expoAdsAdmob","_expoAppleAuthentication","_expoBranch","_expoContacts","_expoDocumentPicker","_expoNavigationBar","_expoNotifications","_expoSplashScreen","_expoSystemUi","_expoUpdates","_reactNativeMaps","_getAutolinkedPackages","obj","__esModule","default","debug","Debug","withIosExpoPlugins","config","bundleIdentifier","ios","withPlugins","IOSConfig","BundleIdentifier","withBundleIdentifier","Swift","withSwiftBridgingHeader","withNoopSwiftFile","Google","withGoogle","Name","withDisplayName","withProductName","Orientation","withOrientation","RequiresFullScreen","withRequiresFullScreen","Scheme","withScheme","UsesNonExemptEncryption","withUsesNonExemptEncryption","Version","withBuildNumber","withVersion","withGoogleServicesFile","BuildProperties","withJsEnginePodfileProps","Entitlements","withAssociatedDomains","DeviceFamily","withDeviceFamily","Bitcode","withBitcode","Locales","withLocales","withIosIcons","exports","withAndroidExpoPlugins","props","android","package","AndroidConfig","withJsEngineGradleProps","withNameSettingsGradle","GoogleServices","withClassPath","withApplyPlugin","Package","withPackageGradle","AllowBackup","withAllowBackup","WindowSoftInputMode","withWindowSoftInputMode","IntentFilters","withAndroidIntentFilters","Permissions","withInternalBlockedPermissions","withPermissions","withName","StatusBar","withStatusBar","PrimaryColor","withPrimaryColor","withAndroidIcons","withPackageRefactor","versionedExpoSDKPackages","withVersionedExpoSDKPlugins","withMaps","withAdMob","withAppleAuthentication","withContacts","withNotifications","withUpdates","withBranch","withDocumentPicker","withSystemUI","withSplashScreen","withNavigationBar","getAutoPlugins","concat","legacyExpoPlugins","expoManagedVersionedPlugins","getLegacyExpoPlugins","withOptionalLegacyPlugins","plugins","reduce","prev","plugin","shouldSkipAutoPlugin","withStaticPlugin","_isLegacyPlugin","fallback","withLegacyExpoPlugins","Set"],"sources":["../../src/plugins/withDefaultPlugins.ts"],"sourcesContent":["/**\n * These are the versioned first-party plugins with some of the future third-party plugins mixed in for legacy support.\n */\nimport {\n AndroidConfig,\n ConfigPlugin,\n IOSConfig,\n StaticPlugin,\n withPlugins,\n withStaticPlugin,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\n\nimport { withAndroidIcons } from './icons/withAndroidIcons';\nimport { withIosIcons } from './icons/withIosIcons';\nimport withAdMob from './unversioned/expo-ads-admob/expo-ads-admob';\nimport withAppleAuthentication from './unversioned/expo-apple-authentication';\nimport withBranch from './unversioned/expo-branch/expo-branch';\nimport withContacts from './unversioned/expo-contacts';\nimport withDocumentPicker from './unversioned/expo-document-picker';\nimport withNavigationBar from './unversioned/expo-navigation-bar/expo-navigation-bar';\nimport withNotifications from './unversioned/expo-notifications/expo-notifications';\nimport withSplashScreen from './unversioned/expo-splash-screen/expo-splash-screen';\nimport withSystemUI from './unversioned/expo-system-ui/expo-system-ui';\nimport withUpdates from './unversioned/expo-updates';\nimport withMaps from './unversioned/react-native-maps';\nimport { shouldSkipAutoPlugin } from '../getAutolinkedPackages';\n\nconst debug = Debug('expo:prebuild-config');\n\n/**\n * Config plugin to apply all of the custom Expo iOS config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-updates, etc...\n */\nexport const withIosExpoPlugins: ConfigPlugin<{\n bundleIdentifier: string;\n}> = (config, { bundleIdentifier }) => {\n // Set the bundle ID ahead of time.\n if (!config.ios) config.ios = {};\n config.ios.bundleIdentifier = bundleIdentifier;\n\n return withPlugins(config, [\n [IOSConfig.BundleIdentifier.withBundleIdentifier, { bundleIdentifier }],\n IOSConfig.Swift.withSwiftBridgingHeader,\n IOSConfig.Swift.withNoopSwiftFile,\n IOSConfig.Google.withGoogle,\n IOSConfig.Name.withDisplayName,\n IOSConfig.Name.withProductName,\n IOSConfig.Orientation.withOrientation,\n IOSConfig.RequiresFullScreen.withRequiresFullScreen,\n IOSConfig.Scheme.withScheme,\n IOSConfig.UsesNonExemptEncryption.withUsesNonExemptEncryption,\n IOSConfig.Version.withBuildNumber,\n IOSConfig.Version.withVersion,\n IOSConfig.Google.withGoogleServicesFile,\n IOSConfig.BuildProperties.withJsEnginePodfileProps,\n // Entitlements\n IOSConfig.Entitlements.withAssociatedDomains,\n // XcodeProject\n IOSConfig.DeviceFamily.withDeviceFamily,\n IOSConfig.Bitcode.withBitcode,\n IOSConfig.Locales.withLocales,\n // Dangerous\n withIosIcons,\n ]);\n};\n\n/**\n * Config plugin to apply all of the custom Expo Android config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-updates, etc...\n */\nexport const withAndroidExpoPlugins: ConfigPlugin<{\n package: string;\n}> = (config, props) => {\n // Set the package name ahead of time.\n if (!config.android) config.android = {};\n config.android.package = props.package;\n\n return withPlugins(config, [\n // gradle.properties\n AndroidConfig.BuildProperties.withJsEngineGradleProps,\n\n // settings.gradle\n AndroidConfig.Name.withNameSettingsGradle,\n\n // project build.gradle\n AndroidConfig.GoogleServices.withClassPath,\n\n // app/build.gradle\n AndroidConfig.GoogleServices.withApplyPlugin,\n AndroidConfig.Package.withPackageGradle,\n AndroidConfig.Version.withVersion,\n\n // AndroidManifest.xml\n AndroidConfig.AllowBackup.withAllowBackup,\n AndroidConfig.WindowSoftInputMode.withWindowSoftInputMode,\n // Note: The withAndroidIntentFilters plugin must appear before the withScheme\n // plugin or withScheme will override the output of withAndroidIntentFilters.\n AndroidConfig.IntentFilters.withAndroidIntentFilters,\n AndroidConfig.Scheme.withScheme,\n AndroidConfig.Orientation.withOrientation,\n AndroidConfig.Permissions.withInternalBlockedPermissions,\n AndroidConfig.Permissions.withPermissions,\n\n // strings.xml\n AndroidConfig.Name.withName,\n\n // Dangerous -- these plugins run in reverse order.\n AndroidConfig.GoogleServices.withGoogleServicesFile,\n\n // Modify colors.xml and styles.xml\n AndroidConfig.StatusBar.withStatusBar,\n AndroidConfig.PrimaryColor.withPrimaryColor,\n\n withAndroidIcons,\n // If we renamed the package, we should also move it around and rename it in source files\n // Added last to ensure this plugin runs first. Out of tree solutions will mistakenly resolve the package incorrectly otherwise.\n AndroidConfig.Package.withPackageRefactor,\n ]);\n};\n\n// Must keep in sync with `withVersionedExpoSDKPlugins`\nconst versionedExpoSDKPackages: string[] = [\n 'react-native-maps',\n 'expo-ads-admob',\n 'expo-apple-authentication',\n 'expo-contacts',\n 'expo-notifications',\n 'expo-updates',\n 'expo-branch',\n 'expo-navigation-bar',\n 'expo-document-picker',\n 'expo-splash-screen',\n 'expo-system-ui',\n];\n\nexport const withVersionedExpoSDKPlugins: ConfigPlugin = (config) => {\n return withPlugins(config, [\n withMaps,\n withAdMob,\n withAppleAuthentication,\n withContacts,\n withNotifications,\n withUpdates,\n withBranch,\n withDocumentPicker,\n // System UI must come before splash screen as they overlap\n // and splash screen will warn about conflicting rules.\n withSystemUI,\n withSplashScreen,\n withNavigationBar,\n ]);\n};\n\nexport function getAutoPlugins() {\n return versionedExpoSDKPackages.concat(legacyExpoPlugins).concat(expoManagedVersionedPlugins);\n}\n\nexport function getLegacyExpoPlugins() {\n return legacyExpoPlugins;\n}\n\n// Expo managed packages that require extra update.\n// These get applied automatically to create parity with expo build in eas build.\nconst legacyExpoPlugins = [\n 'expo-app-auth',\n 'expo-av',\n 'expo-background-fetch',\n 'expo-barcode-scanner',\n 'expo-brightness',\n 'expo-calendar',\n 'expo-camera',\n 'expo-cellular',\n 'expo-dev-menu',\n 'expo-dev-launcher',\n 'expo-dev-client',\n 'expo-image-picker',\n 'expo-file-system',\n 'expo-location',\n 'expo-media-library',\n 'expo-screen-orientation',\n 'expo-sensors',\n 'expo-task-manager',\n 'expo-local-authentication',\n];\n\n// Plugins that need to be automatically applied, but also get applied by expo-cli if the versioned plugin isn't available.\n// These are split up because the user doesn't need to be prompted to setup these packages.\nconst expoManagedVersionedPlugins = [\n 'expo-firebase-analytics',\n 'expo-firebase-core',\n 'expo-google-sign-in',\n];\n\nconst withOptionalLegacyPlugins: ConfigPlugin<(StaticPlugin | string)[]> = (config, plugins) => {\n return plugins.reduce((prev, plugin) => {\n if (shouldSkipAutoPlugin(config, plugin)) {\n debug('Skipping unlinked auto plugin:', plugin);\n return prev;\n }\n\n return withStaticPlugin(prev, {\n // hide errors\n _isLegacyPlugin: true,\n plugin,\n // If a plugin doesn't exist, do nothing.\n fallback: (config) => config,\n });\n }, config);\n};\n\nexport function withLegacyExpoPlugins(config: ExpoConfig) {\n return withOptionalLegacyPlugins(config, [\n ...new Set(expoManagedVersionedPlugins.concat(legacyExpoPlugins)),\n ]);\n}\n"],"mappings":";;;;;;;;;;AAGA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AASA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAK,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,yBAAA;EAAA,MAAAP,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAM,wBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,YAAA;EAAA,MAAAR,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAO,WAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,cAAA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,CAACrF,MAAM,EAAEsF,OAAO,KAAK;EAC9F,OAAOA,OAAO,CAACC,MAAM,CAAC,CAACC,IAAI,EAAEC,MAAM,KAAK;IACtC,IAAI,IAAAC,6CAAoB,EAAC1F,MAAM,EAAEyF,MAAM,CAAC,EAAE;MACxC5F,KAAK,CAAC,gCAAgC,EAAE4F,MAAM,CAAC;MAC/C,OAAOD,IAAI;IACb;IAEA,OAAO,IAAAG,iCAAgB,EAACH,IAAI,EAAE;MAC5B;MACAI,eAAe,EAAE,IAAI;MACrBH,MAAM;MACN;MACAI,QAAQ,EAAG7F,MAAM,IAAKA;IACxB,CAAC,CAAC;EACJ,CAAC,EAAEA,MAAM,CAAC;AACZ,CAAC;AAEM,SAAS8F,qBAAqBA,CAAC9F,MAAkB,EAAE;EACxD,OAAOqF,yBAAyB,CAACrF,MAAM,EAAE,CACvC,GAAG,IAAI+F,GAAG,CAACZ,2BAA2B,CAACF,MAAM,CAACC,iBAAiB,CAAC,CAAC,CAClE,CAAC;AACJ"}
|
|
1
|
+
{"version":3,"file":"withDefaultPlugins.js","names":["_configPlugins","data","require","_debug","_interopRequireDefault","_withAndroidIcons","_withIosIcons","_expoAdsAdmob","_expoAppleAuthentication","_expoContacts","_expoDocumentPicker","_expoNavigationBar","_expoNotifications","_expoSplashScreen","_expoSystemUi","_expoUpdates","_reactNativeMaps","_getAutolinkedPackages","obj","__esModule","default","debug","Debug","withIosExpoPlugins","config","bundleIdentifier","ios","withPlugins","IOSConfig","BundleIdentifier","withBundleIdentifier","Swift","withSwiftBridgingHeader","withNoopSwiftFile","Google","withGoogle","Name","withDisplayName","withProductName","Orientation","withOrientation","RequiresFullScreen","withRequiresFullScreen","Scheme","withScheme","UsesNonExemptEncryption","withUsesNonExemptEncryption","Version","withBuildNumber","withVersion","withGoogleServicesFile","BuildProperties","withJsEnginePodfileProps","Entitlements","withAssociatedDomains","DeviceFamily","withDeviceFamily","Bitcode","withBitcode","Locales","withLocales","withIosIcons","exports","withAndroidExpoPlugins","props","android","package","AndroidConfig","withJsEngineGradleProps","withNameSettingsGradle","GoogleServices","withClassPath","withApplyPlugin","Package","withPackageGradle","AllowBackup","withAllowBackup","WindowSoftInputMode","withWindowSoftInputMode","IntentFilters","withAndroidIntentFilters","Permissions","withInternalBlockedPermissions","withPermissions","withName","StatusBar","withStatusBar","PrimaryColor","withPrimaryColor","withAndroidIcons","withPackageRefactor","versionedExpoSDKPackages","withVersionedExpoSDKPlugins","withMaps","withAdMob","withAppleAuthentication","withContacts","withNotifications","withUpdates","withDocumentPicker","withSystemUI","withSplashScreen","withNavigationBar","getAutoPlugins","concat","legacyExpoPlugins","expoManagedVersionedPlugins","getLegacyExpoPlugins","withOptionalLegacyPlugins","plugins","reduce","prev","plugin","shouldSkipAutoPlugin","withStaticPlugin","_isLegacyPlugin","fallback","withLegacyExpoPlugins","Set"],"sources":["../../src/plugins/withDefaultPlugins.ts"],"sourcesContent":["/**\n * These are the versioned first-party plugins with some of the future third-party plugins mixed in for legacy support.\n */\nimport {\n AndroidConfig,\n ConfigPlugin,\n IOSConfig,\n StaticPlugin,\n withPlugins,\n withStaticPlugin,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\n\nimport { withAndroidIcons } from './icons/withAndroidIcons';\nimport { withIosIcons } from './icons/withIosIcons';\nimport withAdMob from './unversioned/expo-ads-admob/expo-ads-admob';\nimport withAppleAuthentication from './unversioned/expo-apple-authentication';\nimport withContacts from './unversioned/expo-contacts';\nimport withDocumentPicker from './unversioned/expo-document-picker';\nimport withNavigationBar from './unversioned/expo-navigation-bar/expo-navigation-bar';\nimport withNotifications from './unversioned/expo-notifications/expo-notifications';\nimport withSplashScreen from './unversioned/expo-splash-screen/expo-splash-screen';\nimport withSystemUI from './unversioned/expo-system-ui/expo-system-ui';\nimport withUpdates from './unversioned/expo-updates';\nimport withMaps from './unversioned/react-native-maps';\nimport { shouldSkipAutoPlugin } from '../getAutolinkedPackages';\n\nconst debug = Debug('expo:prebuild-config');\n\n/**\n * Config plugin to apply all of the custom Expo iOS config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-updates, etc...\n */\nexport const withIosExpoPlugins: ConfigPlugin<{\n bundleIdentifier: string;\n}> = (config, { bundleIdentifier }) => {\n // Set the bundle ID ahead of time.\n if (!config.ios) config.ios = {};\n config.ios.bundleIdentifier = bundleIdentifier;\n\n return withPlugins(config, [\n [IOSConfig.BundleIdentifier.withBundleIdentifier, { bundleIdentifier }],\n IOSConfig.Swift.withSwiftBridgingHeader,\n IOSConfig.Swift.withNoopSwiftFile,\n IOSConfig.Google.withGoogle,\n IOSConfig.Name.withDisplayName,\n IOSConfig.Name.withProductName,\n IOSConfig.Orientation.withOrientation,\n IOSConfig.RequiresFullScreen.withRequiresFullScreen,\n IOSConfig.Scheme.withScheme,\n IOSConfig.UsesNonExemptEncryption.withUsesNonExemptEncryption,\n IOSConfig.Version.withBuildNumber,\n IOSConfig.Version.withVersion,\n IOSConfig.Google.withGoogleServicesFile,\n IOSConfig.BuildProperties.withJsEnginePodfileProps,\n // Entitlements\n IOSConfig.Entitlements.withAssociatedDomains,\n // XcodeProject\n IOSConfig.DeviceFamily.withDeviceFamily,\n IOSConfig.Bitcode.withBitcode,\n IOSConfig.Locales.withLocales,\n // Dangerous\n withIosIcons,\n ]);\n};\n\n/**\n * Config plugin to apply all of the custom Expo Android config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-updates, etc...\n */\nexport const withAndroidExpoPlugins: ConfigPlugin<{\n package: string;\n}> = (config, props) => {\n // Set the package name ahead of time.\n if (!config.android) config.android = {};\n config.android.package = props.package;\n\n return withPlugins(config, [\n // gradle.properties\n AndroidConfig.BuildProperties.withJsEngineGradleProps,\n\n // settings.gradle\n AndroidConfig.Name.withNameSettingsGradle,\n\n // project build.gradle\n AndroidConfig.GoogleServices.withClassPath,\n\n // app/build.gradle\n AndroidConfig.GoogleServices.withApplyPlugin,\n AndroidConfig.Package.withPackageGradle,\n AndroidConfig.Version.withVersion,\n\n // AndroidManifest.xml\n AndroidConfig.AllowBackup.withAllowBackup,\n AndroidConfig.WindowSoftInputMode.withWindowSoftInputMode,\n // Note: The withAndroidIntentFilters plugin must appear before the withScheme\n // plugin or withScheme will override the output of withAndroidIntentFilters.\n AndroidConfig.IntentFilters.withAndroidIntentFilters,\n AndroidConfig.Scheme.withScheme,\n AndroidConfig.Orientation.withOrientation,\n AndroidConfig.Permissions.withInternalBlockedPermissions,\n AndroidConfig.Permissions.withPermissions,\n\n // strings.xml\n AndroidConfig.Name.withName,\n\n // Dangerous -- these plugins run in reverse order.\n AndroidConfig.GoogleServices.withGoogleServicesFile,\n\n // Modify colors.xml and styles.xml\n AndroidConfig.StatusBar.withStatusBar,\n AndroidConfig.PrimaryColor.withPrimaryColor,\n\n withAndroidIcons,\n // If we renamed the package, we should also move it around and rename it in source files\n // Added last to ensure this plugin runs first. Out of tree solutions will mistakenly resolve the package incorrectly otherwise.\n AndroidConfig.Package.withPackageRefactor,\n ]);\n};\n\n// Must keep in sync with `withVersionedExpoSDKPlugins`\nconst versionedExpoSDKPackages: string[] = [\n 'react-native-maps',\n 'expo-ads-admob',\n 'expo-apple-authentication',\n 'expo-contacts',\n 'expo-notifications',\n 'expo-updates',\n 'expo-navigation-bar',\n 'expo-document-picker',\n 'expo-splash-screen',\n 'expo-system-ui',\n];\n\nexport const withVersionedExpoSDKPlugins: ConfigPlugin = (config) => {\n return withPlugins(config, [\n withMaps,\n withAdMob,\n withAppleAuthentication,\n withContacts,\n withNotifications,\n withUpdates,\n withDocumentPicker,\n // System UI must come before splash screen as they overlap\n // and splash screen will warn about conflicting rules.\n withSystemUI,\n withSplashScreen,\n withNavigationBar,\n ]);\n};\n\nexport function getAutoPlugins() {\n return versionedExpoSDKPackages.concat(legacyExpoPlugins).concat(expoManagedVersionedPlugins);\n}\n\nexport function getLegacyExpoPlugins() {\n return legacyExpoPlugins;\n}\n\n// Expo managed packages that require extra update.\n// These get applied automatically to create parity with expo build in eas build.\nconst legacyExpoPlugins = [\n 'expo-app-auth',\n 'expo-av',\n 'expo-background-fetch',\n 'expo-barcode-scanner',\n 'expo-brightness',\n 'expo-calendar',\n 'expo-camera',\n 'expo-cellular',\n 'expo-dev-menu',\n 'expo-dev-launcher',\n 'expo-dev-client',\n 'expo-image-picker',\n 'expo-file-system',\n 'expo-location',\n 'expo-media-library',\n 'expo-screen-orientation',\n 'expo-sensors',\n 'expo-task-manager',\n 'expo-local-authentication',\n];\n\n// Plugins that need to be automatically applied, but also get applied by expo-cli if the versioned plugin isn't available.\n// These are split up because the user doesn't need to be prompted to setup these packages.\nconst expoManagedVersionedPlugins = [\n 'expo-firebase-analytics',\n 'expo-firebase-core',\n 'expo-google-sign-in',\n];\n\nconst withOptionalLegacyPlugins: ConfigPlugin<(StaticPlugin | string)[]> = (config, plugins) => {\n return plugins.reduce((prev, plugin) => {\n if (shouldSkipAutoPlugin(config, plugin)) {\n debug('Skipping unlinked auto plugin:', plugin);\n return prev;\n }\n\n return withStaticPlugin(prev, {\n // hide errors\n _isLegacyPlugin: true,\n plugin,\n // If a plugin doesn't exist, do nothing.\n fallback: (config) => config,\n });\n }, config);\n};\n\nexport function withLegacyExpoPlugins(config: ExpoConfig) {\n return withOptionalLegacyPlugins(config, [\n ...new Set(expoManagedVersionedPlugins.concat(legacyExpoPlugins)),\n ]);\n}\n"],"mappings":";;;;;;;;;;AAGA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AASA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ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CAAA,EAAG;EACrC,OAAOF,iBAAiB;AAC1B;;AAEA;AACA;AACA,MAAMA,iBAAiB,GAAG,CACxB,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACd,mBAAmB,EACnB,2BAA2B,CAC5B;;AAED;AACA;AACA,MAAMC,2BAA2B,GAAG,CAClC,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,CACtB;AAED,MAAME,yBAAkE,GAAGA,CAACpF,MAAM,EAAEqF,OAAO,KAAK;EAC9F,OAAOA,OAAO,CAACC,MAAM,CAAC,CAACC,IAAI,EAAEC,MAAM,KAAK;IACtC,IAAI,IAAAC,6CAAoB,EAACzF,MAAM,EAAEwF,MAAM,CAAC,EAAE;MACxC3F,KAAK,CAAC,gCAAgC,EAAE2F,MAAM,CAAC;MAC/C,OAAOD,IAAI;IACb;IAEA,OAAO,IAAAG,iCAAgB,EAACH,IAAI,EAAE;MAC5B;MACAI,eAAe,EAAE,IAAI;MACrBH,MAAM;MACN;MACAI,QAAQ,EAAG5F,MAAM,IAAKA;IACxB,CAAC,CAAC;EACJ,CAAC,EAAEA,MAAM,CAAC;AACZ,CAAC;AAEM,SAAS6F,qBAAqBA,CAAC7F,MAAkB,EAAE;EACxD,OAAOoF,yBAAyB,CAACpF,MAAM,EAAE,CACvC,GAAG,IAAI8F,GAAG,CAACZ,2BAA2B,CAACF,MAAM,CAACC,iBAAiB,CAAC,CAAC,CAClE,CAAC;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/prebuild-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"description": "Get the prebuild config",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"watch": "tsc --watch --preserveWatchOutput",
|
|
8
7
|
"build": "tsc --emitDeclarationOnly && babel src --out-dir build --extensions \".ts\" --source-maps --ignore \"src/**/__mocks__/*\",\"src/**/__tests__/*\"",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
8
|
+
"clean": "expo-module clean",
|
|
9
|
+
"lint": "expo-module lint",
|
|
10
|
+
"prepare": "expo-module clean && yarn run build",
|
|
11
|
+
"prepublishOnly": "expo-module prepublishOnly",
|
|
12
|
+
"test": "expo-module test",
|
|
13
|
+
"typecheck": "expo-module typecheck"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -35,10 +36,10 @@
|
|
|
35
36
|
"@types/xml2js": "~0.4.11"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@expo/config": "~8.
|
|
39
|
-
"@expo/config-plugins": "~7.
|
|
39
|
+
"@expo/config": "~8.5.0",
|
|
40
|
+
"@expo/config-plugins": "~7.8.0",
|
|
40
41
|
"@expo/config-types": "^50.0.0-alpha.1",
|
|
41
|
-
"@expo/image-utils": "0.
|
|
42
|
+
"@expo/image-utils": "^0.4.0",
|
|
42
43
|
"@expo/json-file": "^8.2.37",
|
|
43
44
|
"debug": "^4.3.1",
|
|
44
45
|
"fs-extra": "^9.0.0",
|
|
@@ -47,10 +48,11 @@
|
|
|
47
48
|
"xml2js": "0.6.0"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
51
|
+
"expo-module-scripts": "^3.3.0",
|
|
50
52
|
"expo-modules-autolinking": ">=0.8.1"
|
|
51
53
|
},
|
|
52
54
|
"publishConfig": {
|
|
53
55
|
"access": "public"
|
|
54
56
|
},
|
|
55
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "6aca7ce098ddc667776a3d7cf612adbb985e264a"
|
|
56
58
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
function _withAndroidBranch() {
|
|
8
|
-
const data = require("./withAndroidBranch");
|
|
9
|
-
_withAndroidBranch = function () {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _withIosBranch() {
|
|
15
|
-
const data = require("./withIosBranch");
|
|
16
|
-
_withIosBranch = function () {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
return data;
|
|
20
|
-
}
|
|
21
|
-
function _createLegacyPlugin() {
|
|
22
|
-
const data = require("../createLegacyPlugin");
|
|
23
|
-
_createLegacyPlugin = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
|
-
var _default = (0, _createLegacyPlugin().createLegacyPlugin)({
|
|
29
|
-
packageName: 'expo-branch',
|
|
30
|
-
fallback: [
|
|
31
|
-
// Android
|
|
32
|
-
_withAndroidBranch().withAndroidBranch,
|
|
33
|
-
// iOS
|
|
34
|
-
_withIosBranch().withIosBranch]
|
|
35
|
-
});
|
|
36
|
-
exports.default = _default;
|
|
37
|
-
//# sourceMappingURL=expo-branch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expo-branch.js","names":["_withAndroidBranch","data","require","_withIosBranch","_createLegacyPlugin","_default","createLegacyPlugin","packageName","fallback","withAndroidBranch","withIosBranch","exports","default"],"sources":["../../../../src/plugins/unversioned/expo-branch/expo-branch.ts"],"sourcesContent":["import { withAndroidBranch } from './withAndroidBranch';\nimport { withIosBranch } from './withIosBranch';\nimport { createLegacyPlugin } from '../createLegacyPlugin';\n\nexport default createLegacyPlugin({\n packageName: 'expo-branch',\n fallback: [\n // Android\n withAndroidBranch,\n // iOS\n withIosBranch,\n ],\n});\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,eAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,oBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,mBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2D,IAAAI,QAAA,GAE5C,IAAAC,wCAAkB,EAAC;EAChCC,WAAW,EAAE,aAAa;EAC1BC,QAAQ,EAAE;EACR;EACAC,sCAAiB;EACjB;EACAC,8BAAa;AAEjB,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAP,QAAA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AndroidConfig, ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
3
|
-
export declare const withAndroidBranch: ConfigPlugin;
|
|
4
|
-
export declare function getBranchApiKey(config: ExpoConfig): string | null;
|
|
5
|
-
export declare function setBranchApiKey(config: ExpoConfig, androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getBranchApiKey = getBranchApiKey;
|
|
7
|
-
exports.setBranchApiKey = setBranchApiKey;
|
|
8
|
-
exports.withAndroidBranch = void 0;
|
|
9
|
-
function _configPlugins() {
|
|
10
|
-
const data = require("@expo/config-plugins");
|
|
11
|
-
_configPlugins = function () {
|
|
12
|
-
return data;
|
|
13
|
-
};
|
|
14
|
-
return data;
|
|
15
|
-
}
|
|
16
|
-
const {
|
|
17
|
-
addMetaDataItemToMainApplication,
|
|
18
|
-
getMainApplicationOrThrow,
|
|
19
|
-
removeMetaDataItemFromMainApplication
|
|
20
|
-
} = _configPlugins().AndroidConfig.Manifest;
|
|
21
|
-
const META_BRANCH_KEY = 'io.branch.sdk.BranchKey';
|
|
22
|
-
const withAndroidBranch = config => {
|
|
23
|
-
return (0, _configPlugins().withAndroidManifest)(config, config => {
|
|
24
|
-
config.modResults = setBranchApiKey(config, config.modResults);
|
|
25
|
-
return config;
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
exports.withAndroidBranch = withAndroidBranch;
|
|
29
|
-
function getBranchApiKey(config) {
|
|
30
|
-
var _config$android$confi, _config$android, _config$android$confi2, _config$android$confi3;
|
|
31
|
-
return (_config$android$confi = (_config$android = config.android) === null || _config$android === void 0 ? void 0 : (_config$android$confi2 = _config$android.config) === null || _config$android$confi2 === void 0 ? void 0 : (_config$android$confi3 = _config$android$confi2.branch) === null || _config$android$confi3 === void 0 ? void 0 : _config$android$confi3.apiKey) !== null && _config$android$confi !== void 0 ? _config$android$confi : null;
|
|
32
|
-
}
|
|
33
|
-
function setBranchApiKey(config, androidManifest) {
|
|
34
|
-
const apiKey = getBranchApiKey(config);
|
|
35
|
-
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
|
36
|
-
if (apiKey) {
|
|
37
|
-
// If the item exists, add it back
|
|
38
|
-
addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey);
|
|
39
|
-
} else {
|
|
40
|
-
// Remove any existing item
|
|
41
|
-
removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY);
|
|
42
|
-
}
|
|
43
|
-
return androidManifest;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=withAndroidBranch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withAndroidBranch.js","names":["_configPlugins","data","require","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","META_BRANCH_KEY","withAndroidBranch","config","withAndroidManifest","modResults","setBranchApiKey","exports","getBranchApiKey","_config$android$confi","_config$android","_config$android$confi2","_config$android$confi3","android","branch","apiKey","androidManifest","mainApplication"],"sources":["../../../../src/plugins/unversioned/expo-branch/withAndroidBranch.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst {\n addMetaDataItemToMainApplication,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n} = AndroidConfig.Manifest;\n\nconst META_BRANCH_KEY = 'io.branch.sdk.BranchKey';\n\nexport const withAndroidBranch: ConfigPlugin = (config) => {\n return withAndroidManifest(config, (config) => {\n config.modResults = setBranchApiKey(config, config.modResults);\n return config;\n });\n};\n\nexport function getBranchApiKey(config: ExpoConfig) {\n return config.android?.config?.branch?.apiKey ?? null;\n}\n\nexport function setBranchApiKey(\n config: ExpoConfig,\n androidManifest: AndroidConfig.Manifest.AndroidManifest\n) {\n const apiKey = getBranchApiKey(config);\n\n const mainApplication = getMainApplicationOrThrow(androidManifest);\n\n if (apiKey) {\n // If the item exists, add it back\n addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey);\n } else {\n // Remove any existing item\n removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY);\n }\n return androidManifest;\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,MAAM;EACJE,gCAAgC;EAChCC,yBAAyB;EACzBC;AACF,CAAC,GAAGC,8BAAa,CAACC,QAAQ;AAE1B,MAAMC,eAAe,GAAG,yBAAyB;AAE1C,MAAMC,iBAA+B,GAAIC,MAAM,IAAK;EACzD,OAAO,IAAAC,oCAAmB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC7CA,MAAM,CAACE,UAAU,GAAGC,eAAe,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC9D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAL,iBAAA,GAAAA,iBAAA;AAEK,SAASM,eAAeA,CAACL,MAAkB,EAAE;EAAA,IAAAM,qBAAA,EAAAC,eAAA,EAAAC,sBAAA,EAAAC,sBAAA;EAClD,QAAAH,qBAAA,IAAAC,eAAA,GAAOP,MAAM,CAACU,OAAO,cAAAH,eAAA,wBAAAC,sBAAA,GAAdD,eAAA,CAAgBP,MAAM,cAAAQ,sBAAA,wBAAAC,sBAAA,GAAtBD,sBAAA,CAAwBG,MAAM,cAAAF,sBAAA,uBAA9BA,sBAAA,CAAgCG,MAAM,cAAAN,qBAAA,cAAAA,qBAAA,GAAI,IAAI;AACvD;AAEO,SAASH,eAAeA,CAC7BH,MAAkB,EAClBa,eAAuD,EACvD;EACA,MAAMD,MAAM,GAAGP,eAAe,CAACL,MAAM,CAAC;EAEtC,MAAMc,eAAe,GAAGpB,yBAAyB,CAACmB,eAAe,CAAC;EAElE,IAAID,MAAM,EAAE;IACV;IACAnB,gCAAgC,CAACqB,eAAe,EAAEhB,eAAe,EAAEc,MAAM,CAAC;EAC5E,CAAC,MAAM;IACL;IACAjB,qCAAqC,CAACmB,eAAe,EAAEhB,eAAe,CAAC;EACzE;EACA,OAAOe,eAAe;AACxB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ConfigPlugin, InfoPlist } from '@expo/config-plugins';
|
|
2
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
3
|
-
export declare const withIosBranch: ConfigPlugin;
|
|
4
|
-
export declare function getBranchApiKey(config: Pick<ExpoConfig, 'ios'>): string | null;
|
|
5
|
-
export declare function setBranchApiKey(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getBranchApiKey = getBranchApiKey;
|
|
7
|
-
exports.setBranchApiKey = setBranchApiKey;
|
|
8
|
-
exports.withIosBranch = void 0;
|
|
9
|
-
function _configPlugins() {
|
|
10
|
-
const data = require("@expo/config-plugins");
|
|
11
|
-
_configPlugins = function () {
|
|
12
|
-
return data;
|
|
13
|
-
};
|
|
14
|
-
return data;
|
|
15
|
-
}
|
|
16
|
-
const withIosBranch = config => {
|
|
17
|
-
return (0, _configPlugins().withInfoPlist)(config, config => {
|
|
18
|
-
config.modResults = setBranchApiKey(config, config.modResults);
|
|
19
|
-
return config;
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
exports.withIosBranch = withIosBranch;
|
|
23
|
-
function getBranchApiKey(config) {
|
|
24
|
-
var _config$ios$config$br, _config$ios, _config$ios$config, _config$ios$config$br2;
|
|
25
|
-
return (_config$ios$config$br = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : (_config$ios$config = _config$ios.config) === null || _config$ios$config === void 0 ? void 0 : (_config$ios$config$br2 = _config$ios$config.branch) === null || _config$ios$config$br2 === void 0 ? void 0 : _config$ios$config$br2.apiKey) !== null && _config$ios$config$br !== void 0 ? _config$ios$config$br : null;
|
|
26
|
-
}
|
|
27
|
-
function setBranchApiKey(config, infoPlist) {
|
|
28
|
-
const apiKey = getBranchApiKey(config);
|
|
29
|
-
if (apiKey === null) {
|
|
30
|
-
return infoPlist;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
...infoPlist,
|
|
34
|
-
branch_key: {
|
|
35
|
-
live: apiKey
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=withIosBranch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withIosBranch.js","names":["_configPlugins","data","require","withIosBranch","config","withInfoPlist","modResults","setBranchApiKey","exports","getBranchApiKey","_config$ios$config$br","_config$ios","_config$ios$config","_config$ios$config$br2","ios","branch","apiKey","infoPlist","branch_key","live"],"sources":["../../../../src/plugins/unversioned/expo-branch/withIosBranch.ts"],"sourcesContent":["import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withIosBranch: ConfigPlugin = (config) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setBranchApiKey(config, config.modResults);\n return config;\n });\n};\n\nexport function getBranchApiKey(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.branch?.apiKey ?? null;\n}\n\nexport function setBranchApiKey(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n const apiKey = getBranchApiKey(config);\n\n if (apiKey === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n branch_key: {\n live: apiKey,\n },\n };\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGO,MAAME,aAA2B,GAAIC,MAAM,IAAK;EACrD,OAAO,IAAAC,8BAAa,EAACD,MAAM,EAAGA,MAAM,IAAK;IACvCA,MAAM,CAACE,UAAU,GAAGC,eAAe,CAACH,MAAM,EAAEA,MAAM,CAACE,UAAU,CAAC;IAC9D,OAAOF,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAL,aAAA,GAAAA,aAAA;AAEK,SAASM,eAAeA,CAACL,MAA+B,EAAE;EAAA,IAAAM,qBAAA,EAAAC,WAAA,EAAAC,kBAAA,EAAAC,sBAAA;EAC/D,QAAAH,qBAAA,IAAAC,WAAA,GAAOP,MAAM,CAACU,GAAG,cAAAH,WAAA,wBAAAC,kBAAA,GAAVD,WAAA,CAAYP,MAAM,cAAAQ,kBAAA,wBAAAC,sBAAA,GAAlBD,kBAAA,CAAoBG,MAAM,cAAAF,sBAAA,uBAA1BA,sBAAA,CAA4BG,MAAM,cAAAN,qBAAA,cAAAA,qBAAA,GAAI,IAAI;AACnD;AAEO,SAASH,eAAeA,CAACH,MAA+B,EAAEa,SAAoB,EAAa;EAChG,MAAMD,MAAM,GAAGP,eAAe,CAACL,MAAM,CAAC;EAEtC,IAAIY,MAAM,KAAK,IAAI,EAAE;IACnB,OAAOC,SAAS;EAClB;EAEA,OAAO;IACL,GAAGA,SAAS;IACZC,UAAU,EAAE;MACVC,IAAI,EAAEH;IACR;EACF,CAAC;AACH"}
|