@expo/config-plugins 7.2.3 → 7.2.5
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 +6 -0
- package/build/Plugin.types.js.map +1 -1
- package/build/android/AllowBackup.d.ts +1 -1
- package/build/android/GoogleMapsApiKey.d.ts +1 -1
- package/build/android/IntentFilters.d.ts +1 -1
- package/build/android/Name.d.ts +1 -1
- package/build/android/Orientation.d.ts +1 -1
- package/build/android/Scheme.d.ts +1 -1
- package/build/ios/Entitlements.d.ts +1 -1
- package/build/ios/Name.d.ts +2 -2
- package/build/ios/Orientation.d.ts +1 -1
- package/build/ios/RequiresFullScreen.d.ts +1 -1
- package/build/ios/Scheme.d.ts +1 -1
- package/build/ios/UsesNonExemptEncryption.d.ts +1 -1
- package/build/ios/Version.d.ts +2 -2
- package/build/plugins/mod-compiler.d.ts +9 -7
- package/build/plugins/mod-compiler.js +4 -6
- package/build/plugins/mod-compiler.js.map +1 -1
- package/build/plugins/withIosBaseMods.js +1 -1
- package/build/plugins/withIosBaseMods.js.map +1 -1
- package/package.json +2 -2
package/build/Plugin.types.d.ts
CHANGED
|
@@ -37,6 +37,12 @@ export interface ModProps<T = any> {
|
|
|
37
37
|
* @example projectRoot/ios/[projectName]/
|
|
38
38
|
*/
|
|
39
39
|
readonly projectName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Ignore any of the user's local native files and solely rely on the generated files.
|
|
42
|
+
* This makes prebuild data, like entitlements, more aligned to what users expects.
|
|
43
|
+
* When enabling this, users must be informed and have a way to disable this exclusion.
|
|
44
|
+
*/
|
|
45
|
+
readonly ignoreExistingNativeFiles?: boolean;
|
|
40
46
|
nextMod?: Mod<T>;
|
|
41
47
|
}
|
|
42
48
|
export interface ExportedConfig extends ExpoConfig {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.types.js","names":["_xcode","data","require","_Manifest","_IosConfig"],"sources":["../src/Plugin.types.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\nimport { XcodeProject } from 'xcode';\n\nimport { Properties } from './android';\nimport { AndroidManifest } from './android/Manifest';\nimport * as AndroidPaths from './android/Paths';\nimport { ResourceXML } from './android/Resources';\nimport { ExpoPlist, InfoPlist } from './ios/IosConfig.types';\nimport { AppDelegateProjectFile } from './ios/Paths';\n\ntype OptionalPromise<T> = Promise<T> | T;\n\ntype Plist = JSONObject;\n\nexport interface ModProps<T = any> {\n /**\n * Project root directory for the universal app.\n */\n readonly projectRoot: string;\n\n /**\n * Project root for the specific platform.\n */\n readonly platformProjectRoot: string;\n\n /**\n * Name of the mod.\n */\n readonly modName: string;\n\n /**\n * Name of the platform used in the mods config.\n */\n readonly platform: ModPlatform;\n\n /**\n * If the mod is being evaluated in introspection mode.\n * No file system modifications should be made when introspect is `true`.\n */\n readonly introspect: boolean;\n\n /**\n * [iOS]: The path component used for querying project files.\n *\n * @example projectRoot/ios/[projectName]/\n */\n readonly projectName?: string;\n\n nextMod?: Mod<T>;\n}\n\n// TODO: Migrate ProjectConfig to using expo instead if exp\nexport interface ExportedConfig extends ExpoConfig {\n mods?: ModConfig | null;\n}\n\nexport interface ExportedConfigWithProps<Data = any> extends ExportedConfig {\n /**\n * The Object representation of a complex file type.\n */\n modResults: Data;\n modRequest: ModProps<Data>;\n /**\n * A frozen representation of the original file contents,\n * this can be used as a reference into the user's original intent.\n *\n * For example, you could infer that the user defined a certain\n * value explicitly and disable any automatic changes.\n */\n readonly modRawConfig: ExpoConfig;\n}\n\n/**\n * A helper type to get the properties of a plugin.\n */\nexport type PluginParameters<T extends ConfigPlugin<any>> = T extends (\n config: any,\n props: infer P\n) => any\n ? P\n : never;\n\nexport type ConfigPlugin<Props = void> = (config: ExpoConfig, props: Props) => ExpoConfig;\n\nexport type StaticPlugin<T = any> = [string | ConfigPlugin<T>, T];\n\nexport type Mod<Props = any> = ((\n config: ExportedConfigWithProps<Props>\n) => OptionalPromise<ExportedConfigWithProps<Props>>) & {\n /**\n * Indicates that the mod provides data upstream to other mods.\n * This mod should always be the last one added.\n */\n isProvider?: boolean;\n /**\n * If the mod supports introspection, and avoids making any filesystem modifications during compilation.\n * By enabling, this mod, and all of its descendants will be run in introspection mode.\n * This should only be used for static files like JSON or XML, and not for application files that require regexes,\n * or complex static files that require other files to be generated like Xcode `.pbxproj`.\n */\n isIntrospective?: boolean;\n};\n\nexport interface ModConfig {\n android?: {\n /**\n * Dangerously make a modification before any other android mods have been run.\n */\n dangerous?: Mod<unknown>;\n /**\n * Modify the `android/app/src/main/AndroidManifest.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n manifest?: Mod<AndroidManifest>;\n /**\n * Modify the `android/app/src/main/res/values/strings.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n strings?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/res/values/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n colors?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/res/values-night/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n colorsNight?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/res/values/styles.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n styles?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/<package>/MainActivity.java` as a string.\n */\n mainActivity?: Mod<AndroidPaths.ApplicationProjectFile>;\n /**\n * Modify the `android/app/src/main/<package>/MainApplication.java` as a string.\n */\n mainApplication?: Mod<AndroidPaths.ApplicationProjectFile>;\n /**\n * Modify the `android/app/build.gradle` as a string.\n */\n appBuildGradle?: Mod<AndroidPaths.GradleProjectFile>;\n /**\n * Modify the `android/build.gradle` as a string.\n */\n projectBuildGradle?: Mod<AndroidPaths.GradleProjectFile>;\n /**\n * Modify the `android/settings.gradle` as a string.\n */\n settingsGradle?: Mod<AndroidPaths.GradleProjectFile>;\n /**\n * Modify the `android/gradle.properties` as a `Properties.PropertiesItem[]`.\n */\n gradleProperties?: Mod<Properties.PropertiesItem[]>;\n };\n ios?: {\n /**\n * Dangerously make a modification before any other android mods have been run.\n */\n dangerous?: Mod<unknown>;\n /**\n * Modify the `ios/<name>/Info.plist` as JSON (parsed with [`@expo/plist`](https://www.npmjs.com/package/@expo/plist)).\n */\n infoPlist?: Mod<InfoPlist>;\n /**\n * Modify the `ios/<name>/<product-name>.entitlements` as JSON (parsed with [`@expo/plist`](https://www.npmjs.com/package/@expo/plist)).\n */\n entitlements?: Mod<Plist>;\n /**\n * Modify the `ios/<name>/Expo.plist` as JSON (Expo updates config for iOS) (parsed with [`@expo/plist`](https://www.npmjs.com/package/@expo/plist)).\n */\n expoPlist?: Mod<Plist>;\n /**\n * Modify the `ios/<name>.xcodeproj` as an `XcodeProject` (parsed with [`xcode`](https://www.npmjs.com/package/xcode))\n */\n xcodeproj?: Mod<XcodeProject>;\n /**\n * Modify the `ios/<name>/AppDelegate.m` as a string (dangerous)\n */\n appDelegate?: Mod<AppDelegateProjectFile>;\n /**\n * Modify the `ios/Podfile.properties.json` as key-value pairs\n */\n podfileProperties?: Mod<Record<string, string>>;\n };\n}\n\nexport type ModPlatform = keyof ModConfig;\n\nexport { XcodeProject, InfoPlist, ExpoPlist, AndroidManifest };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"Plugin.types.js","names":["_xcode","data","require","_Manifest","_IosConfig"],"sources":["../src/Plugin.types.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\nimport { XcodeProject } from 'xcode';\n\nimport { Properties } from './android';\nimport { AndroidManifest } from './android/Manifest';\nimport * as AndroidPaths from './android/Paths';\nimport { ResourceXML } from './android/Resources';\nimport { ExpoPlist, InfoPlist } from './ios/IosConfig.types';\nimport { AppDelegateProjectFile } from './ios/Paths';\n\ntype OptionalPromise<T> = Promise<T> | T;\n\ntype Plist = JSONObject;\n\nexport interface ModProps<T = any> {\n /**\n * Project root directory for the universal app.\n */\n readonly projectRoot: string;\n\n /**\n * Project root for the specific platform.\n */\n readonly platformProjectRoot: string;\n\n /**\n * Name of the mod.\n */\n readonly modName: string;\n\n /**\n * Name of the platform used in the mods config.\n */\n readonly platform: ModPlatform;\n\n /**\n * If the mod is being evaluated in introspection mode.\n * No file system modifications should be made when introspect is `true`.\n */\n readonly introspect: boolean;\n\n /**\n * [iOS]: The path component used for querying project files.\n *\n * @example projectRoot/ios/[projectName]/\n */\n readonly projectName?: string;\n\n /**\n * Ignore any of the user's local native files and solely rely on the generated files.\n * This makes prebuild data, like entitlements, more aligned to what users expects.\n * When enabling this, users must be informed and have a way to disable this exclusion.\n */\n readonly ignoreExistingNativeFiles?: boolean;\n\n nextMod?: Mod<T>;\n}\n\n// TODO: Migrate ProjectConfig to using expo instead if exp\nexport interface ExportedConfig extends ExpoConfig {\n mods?: ModConfig | null;\n}\n\nexport interface ExportedConfigWithProps<Data = any> extends ExportedConfig {\n /**\n * The Object representation of a complex file type.\n */\n modResults: Data;\n modRequest: ModProps<Data>;\n /**\n * A frozen representation of the original file contents,\n * this can be used as a reference into the user's original intent.\n *\n * For example, you could infer that the user defined a certain\n * value explicitly and disable any automatic changes.\n */\n readonly modRawConfig: ExpoConfig;\n}\n\n/**\n * A helper type to get the properties of a plugin.\n */\nexport type PluginParameters<T extends ConfigPlugin<any>> = T extends (\n config: any,\n props: infer P\n) => any\n ? P\n : never;\n\nexport type ConfigPlugin<Props = void> = (config: ExpoConfig, props: Props) => ExpoConfig;\n\nexport type StaticPlugin<T = any> = [string | ConfigPlugin<T>, T];\n\nexport type Mod<Props = any> = ((\n config: ExportedConfigWithProps<Props>\n) => OptionalPromise<ExportedConfigWithProps<Props>>) & {\n /**\n * Indicates that the mod provides data upstream to other mods.\n * This mod should always be the last one added.\n */\n isProvider?: boolean;\n /**\n * If the mod supports introspection, and avoids making any filesystem modifications during compilation.\n * By enabling, this mod, and all of its descendants will be run in introspection mode.\n * This should only be used for static files like JSON or XML, and not for application files that require regexes,\n * or complex static files that require other files to be generated like Xcode `.pbxproj`.\n */\n isIntrospective?: boolean;\n};\n\nexport interface ModConfig {\n android?: {\n /**\n * Dangerously make a modification before any other android mods have been run.\n */\n dangerous?: Mod<unknown>;\n /**\n * Modify the `android/app/src/main/AndroidManifest.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n manifest?: Mod<AndroidManifest>;\n /**\n * Modify the `android/app/src/main/res/values/strings.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n strings?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/res/values/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n colors?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/res/values-night/colors.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n colorsNight?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/res/values/styles.xml` as JSON (parsed with [`xml2js`](https://www.npmjs.com/package/xml2js)).\n */\n styles?: Mod<ResourceXML>;\n /**\n * Modify the `android/app/src/main/<package>/MainActivity.java` as a string.\n */\n mainActivity?: Mod<AndroidPaths.ApplicationProjectFile>;\n /**\n * Modify the `android/app/src/main/<package>/MainApplication.java` as a string.\n */\n mainApplication?: Mod<AndroidPaths.ApplicationProjectFile>;\n /**\n * Modify the `android/app/build.gradle` as a string.\n */\n appBuildGradle?: Mod<AndroidPaths.GradleProjectFile>;\n /**\n * Modify the `android/build.gradle` as a string.\n */\n projectBuildGradle?: Mod<AndroidPaths.GradleProjectFile>;\n /**\n * Modify the `android/settings.gradle` as a string.\n */\n settingsGradle?: Mod<AndroidPaths.GradleProjectFile>;\n /**\n * Modify the `android/gradle.properties` as a `Properties.PropertiesItem[]`.\n */\n gradleProperties?: Mod<Properties.PropertiesItem[]>;\n };\n ios?: {\n /**\n * Dangerously make a modification before any other android mods have been run.\n */\n dangerous?: Mod<unknown>;\n /**\n * Modify the `ios/<name>/Info.plist` as JSON (parsed with [`@expo/plist`](https://www.npmjs.com/package/@expo/plist)).\n */\n infoPlist?: Mod<InfoPlist>;\n /**\n * Modify the `ios/<name>/<product-name>.entitlements` as JSON (parsed with [`@expo/plist`](https://www.npmjs.com/package/@expo/plist)).\n */\n entitlements?: Mod<Plist>;\n /**\n * Modify the `ios/<name>/Expo.plist` as JSON (Expo updates config for iOS) (parsed with [`@expo/plist`](https://www.npmjs.com/package/@expo/plist)).\n */\n expoPlist?: Mod<Plist>;\n /**\n * Modify the `ios/<name>.xcodeproj` as an `XcodeProject` (parsed with [`xcode`](https://www.npmjs.com/package/xcode))\n */\n xcodeproj?: Mod<XcodeProject>;\n /**\n * Modify the `ios/<name>/AppDelegate.m` as a string (dangerous)\n */\n appDelegate?: Mod<AppDelegateProjectFile>;\n /**\n * Modify the `ios/Podfile.properties.json` as key-value pairs\n */\n podfileProperties?: Mod<Record<string, string>>;\n };\n}\n\nexport type ModPlatform = keyof ModConfig;\n\nexport { XcodeProject, InfoPlist, ExpoPlist, AndroidManifest };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { AndroidManifest } from './Manifest';
|
|
3
|
-
export declare const withAllowBackup: import("..").ConfigPlugin
|
|
3
|
+
export declare const withAllowBackup: import("..").ConfigPlugin;
|
|
4
4
|
export declare function getAllowBackup(config: Pick<ExpoConfig, 'android'>): boolean;
|
|
5
5
|
export declare function setAllowBackup(config: Pick<ExpoConfig, 'android'>, androidManifest: AndroidManifest): AndroidManifest;
|
|
6
6
|
export declare function getAllowBackupFromManifest(androidManifest: AndroidManifest): boolean | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { AndroidManifest } from './Manifest';
|
|
3
|
-
export declare const withGoogleMapsApiKey: import("..").ConfigPlugin
|
|
3
|
+
export declare const withGoogleMapsApiKey: import("..").ConfigPlugin;
|
|
4
4
|
export declare function getGoogleMapsApiKey(config: Pick<ExpoConfig, 'android'>): string | null;
|
|
5
5
|
export declare function setGoogleMapsApiKey(config: Pick<ExpoConfig, 'android'>, androidManifest: AndroidManifest): AndroidManifest;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Android, ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { AndroidManifest, ManifestIntentFilter } from './Manifest';
|
|
3
3
|
type AndroidIntentFilters = NonNullable<Android['intentFilters']>;
|
|
4
|
-
export declare const withAndroidIntentFilters: import("..").ConfigPlugin
|
|
4
|
+
export declare const withAndroidIntentFilters: import("..").ConfigPlugin;
|
|
5
5
|
export declare function getIntentFilters(config: Pick<ExpoConfig, 'android'>): AndroidIntentFilters;
|
|
6
6
|
export declare function setAndroidIntentFilters(config: Pick<ExpoConfig, 'android'>, androidManifest: AndroidManifest): AndroidManifest;
|
|
7
7
|
export default function renderIntentFilters(intentFilters: AndroidIntentFilters): ManifestIntentFilter[];
|
package/build/android/Name.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { ConfigPlugin } from '../Plugin.types';
|
|
|
8
8
|
* @param name
|
|
9
9
|
*/
|
|
10
10
|
export declare function sanitizeNameForGradle(name: string): string;
|
|
11
|
-
export declare const withName: ConfigPlugin
|
|
11
|
+
export declare const withName: ConfigPlugin;
|
|
12
12
|
export declare const withNameSettingsGradle: ConfigPlugin;
|
|
13
13
|
export declare function getName(config: Pick<ExpoConfig, 'name'>): string | null;
|
|
14
14
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { AndroidManifest } from './Manifest';
|
|
3
3
|
export declare const SCREEN_ORIENTATION_ATTRIBUTE = "android:screenOrientation";
|
|
4
|
-
export declare const withOrientation: import("..").ConfigPlugin
|
|
4
|
+
export declare const withOrientation: import("..").ConfigPlugin;
|
|
5
5
|
export declare function getOrientation(config: Pick<ExpoConfig, 'orientation'>): "default" | "portrait" | "landscape" | null;
|
|
6
6
|
export declare function setAndroidOrientation(config: Pick<ExpoConfig, 'orientation'>, androidManifest: AndroidManifest): AndroidManifest;
|
|
@@ -8,7 +8,7 @@ export type IntentFilterProps = {
|
|
|
8
8
|
host?: string;
|
|
9
9
|
}[];
|
|
10
10
|
};
|
|
11
|
-
export declare const withScheme: import("..").ConfigPlugin
|
|
11
|
+
export declare const withScheme: import("..").ConfigPlugin;
|
|
12
12
|
export declare function getScheme(config: {
|
|
13
13
|
scheme?: string | string[];
|
|
14
14
|
}): string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { JSONObject } from '@expo/json-file';
|
|
3
|
-
export declare const withAssociatedDomains: import("..").ConfigPlugin
|
|
3
|
+
export declare const withAssociatedDomains: import("..").ConfigPlugin;
|
|
4
4
|
export declare function setAssociatedDomains(config: ExpoConfig, { 'com.apple.developer.associated-domains': _, ...entitlementsPlist }: JSONObject): JSONObject;
|
|
5
5
|
export declare function getEntitlementsPath(projectRoot: string, { targetName, buildConfiguration, }?: {
|
|
6
6
|
targetName?: string;
|
package/build/ios/Name.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { ExpoConfig } from '@expo/config-types';
|
|
|
2
2
|
import { XcodeProject } from 'xcode';
|
|
3
3
|
import { ConfigPlugin } from '../Plugin.types';
|
|
4
4
|
import { InfoPlist } from './IosConfig.types';
|
|
5
|
-
export declare const withDisplayName: ConfigPlugin
|
|
6
|
-
export declare const withName: ConfigPlugin
|
|
5
|
+
export declare const withDisplayName: ConfigPlugin;
|
|
6
|
+
export declare const withName: ConfigPlugin;
|
|
7
7
|
/** Set the PRODUCT_NAME variable in the xcproj file based on the app.json name property. */
|
|
8
8
|
export declare const withProductName: ConfigPlugin;
|
|
9
9
|
export declare function getName(config: Pick<ExpoConfig, 'name'>): string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { InfoPlist, InterfaceOrientation } from './IosConfig.types';
|
|
3
|
-
export declare const withOrientation: import("..").ConfigPlugin
|
|
3
|
+
export declare const withOrientation: import("..").ConfigPlugin;
|
|
4
4
|
export declare function getOrientation(config: Pick<ExpoConfig, 'orientation'>): "default" | "portrait" | "landscape" | null;
|
|
5
5
|
export declare const PORTRAIT_ORIENTATIONS: InterfaceOrientation[];
|
|
6
6
|
export declare const LANDSCAPE_ORIENTATIONS: InterfaceOrientation[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { InfoPlist } from './IosConfig.types';
|
|
3
|
-
export declare const withRequiresFullScreen: import("..").ConfigPlugin
|
|
3
|
+
export declare const withRequiresFullScreen: import("..").ConfigPlugin;
|
|
4
4
|
export declare function getRequiresFullScreen(config: Pick<ExpoConfig, 'ios' | 'sdkVersion'>): boolean;
|
|
5
5
|
export declare function setRequiresFullScreen(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist;
|
package/build/ios/Scheme.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { InfoPlist } from './IosConfig.types';
|
|
3
|
-
export declare const withScheme: import("..").ConfigPlugin
|
|
3
|
+
export declare const withScheme: import("..").ConfigPlugin;
|
|
4
4
|
export declare function getScheme(config: {
|
|
5
5
|
scheme?: string | string[];
|
|
6
6
|
}): string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { InfoPlist } from './IosConfig.types';
|
|
3
|
-
export declare const withUsesNonExemptEncryption: import("..").ConfigPlugin
|
|
3
|
+
export declare const withUsesNonExemptEncryption: import("..").ConfigPlugin;
|
|
4
4
|
export declare function getUsesNonExemptEncryption(config: Pick<ExpoConfig, 'ios'>): boolean | null;
|
|
5
5
|
export declare function setUsesNonExemptEncryption(config: Pick<ExpoConfig, 'ios'>, { ITSAppUsesNonExemptEncryption, ...infoPlist }: InfoPlist): InfoPlist;
|
package/build/ios/Version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config-types';
|
|
2
2
|
import { InfoPlist } from './IosConfig.types';
|
|
3
|
-
export declare const withVersion: import("..").ConfigPlugin
|
|
4
|
-
export declare const withBuildNumber: import("..").ConfigPlugin
|
|
3
|
+
export declare const withVersion: import("..").ConfigPlugin;
|
|
4
|
+
export declare const withBuildNumber: import("..").ConfigPlugin;
|
|
5
5
|
export declare function getVersion(config: Pick<ExpoConfig, 'version'>): string;
|
|
6
6
|
export declare function setVersion(config: Pick<ExpoConfig, 'version'>, infoPlist: InfoPlist): InfoPlist;
|
|
7
7
|
export declare function getBuildNumber(config: Pick<ExpoConfig, 'ios'>): string;
|
|
@@ -17,20 +17,22 @@ export declare function compileModsAsync(config: ExportedConfig, props: {
|
|
|
17
17
|
platforms?: ModPlatform[];
|
|
18
18
|
introspect?: boolean;
|
|
19
19
|
assertMissingModProviders?: boolean;
|
|
20
|
+
ignoreExistingNativeFiles?: boolean;
|
|
20
21
|
}): Promise<ExportedConfig>;
|
|
21
22
|
/**
|
|
22
23
|
* A generic plugin compiler.
|
|
23
24
|
*
|
|
24
25
|
* @param config
|
|
25
26
|
*/
|
|
26
|
-
export declare function evalModsAsync(config: ExportedConfig, { projectRoot, introspect, platforms,
|
|
27
|
-
/**
|
|
28
|
-
* Throw errors when mods are missing providers.
|
|
29
|
-
* @default true
|
|
30
|
-
*/
|
|
31
|
-
assertMissingModProviders, }: {
|
|
27
|
+
export declare function evalModsAsync(config: ExportedConfig, { projectRoot, introspect, platforms, assertMissingModProviders, ignoreExistingNativeFiles, }: {
|
|
32
28
|
projectRoot: string;
|
|
33
29
|
introspect?: boolean;
|
|
34
|
-
assertMissingModProviders?: boolean;
|
|
35
30
|
platforms?: ModPlatform[];
|
|
31
|
+
/**
|
|
32
|
+
* Throw errors when mods are missing providers.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
assertMissingModProviders?: boolean;
|
|
36
|
+
/** Ignore any existing native files, only use the generated prebuild results. */
|
|
37
|
+
ignoreExistingNativeFiles?: boolean;
|
|
36
38
|
}): Promise<ExportedConfig>;
|
|
@@ -160,11 +160,8 @@ async function evalModsAsync(config, {
|
|
|
160
160
|
projectRoot,
|
|
161
161
|
introspect,
|
|
162
162
|
platforms,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
* @default true
|
|
166
|
-
*/
|
|
167
|
-
assertMissingModProviders
|
|
163
|
+
assertMissingModProviders,
|
|
164
|
+
ignoreExistingNativeFiles = false
|
|
168
165
|
}) {
|
|
169
166
|
const modRawConfig = getRawClone(config);
|
|
170
167
|
for (const [platformName, platform] of Object.entries((_config$mods = config.mods) !== null && _config$mods !== void 0 ? _config$mods : {})) {
|
|
@@ -188,7 +185,8 @@ async function evalModsAsync(config, {
|
|
|
188
185
|
platformProjectRoot,
|
|
189
186
|
platform: platformName,
|
|
190
187
|
modName,
|
|
191
|
-
introspect: !!introspect
|
|
188
|
+
introspect: !!introspect,
|
|
189
|
+
ignoreExistingNativeFiles
|
|
192
190
|
};
|
|
193
191
|
if (!mod.isProvider) {
|
|
194
192
|
// In strict mode, throw an error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod-compiler.js","names":["_debug","data","_interopRequireDefault","require","_path","_Xcodeproj","_errors","Warnings","_interopRequireWildcard","_createBaseMod","_withAndroidBaseMods","_withIosBaseMods","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","debug","Debug","withDefaultBaseMods","config","props","withIosBaseMods","withAndroidBaseMods","withIntrospectionBaseMods","saveToInternal","skipEmptyMod","mods","platform","keys","_config$mods$platform","_config$mods$platform2","isIntrospective","_config$mods$platform3","compileModsAsync","introspect","evalModsAsync","sortMods","commands","order","allKeys","map","completeOrder","Set","sorted","length","group","shift","commandSet","find","push","getRawClone","freeze","JSON","parse","stringify","orders","ios","projectRoot","platforms","assertMissingModProviders","modRawConfig","platformName","entries","_config$mods","includes","_orders$platformName","name","join","platformProjectRoot","path","projectName","getHackyProjectName","undefined","modName","mod","modRequest","isProvider","errorMessage","PluginError","addWarningForPlatform","results","modResults","assertModResults"],"sources":["../../src/plugins/mod-compiler.ts"],"sourcesContent":["import Debug from 'debug';\nimport path from 'path';\n\nimport { ExportedConfig, Mod, ModConfig, ModPlatform } from '../Plugin.types';\nimport { getHackyProjectName } from '../ios/utils/Xcodeproj';\nimport { PluginError } from '../utils/errors';\nimport * as Warnings from '../utils/warnings';\nimport { assertModResults, ForwardedBaseModOptions } from './createBaseMod';\nimport { withAndroidBaseMods } from './withAndroidBaseMods';\nimport { withIosBaseMods } from './withIosBaseMods';\n\nconst debug = Debug('expo:config-plugins:mod-compiler');\n\nexport function withDefaultBaseMods(\n config: ExportedConfig,\n props: ForwardedBaseModOptions = {}\n): ExportedConfig {\n config = withIosBaseMods(config, props);\n config = withAndroidBaseMods(config, props);\n return config;\n}\n\n/**\n * Get a prebuild config that safely evaluates mods without persisting any changes to the file system.\n * Currently this only supports infoPlist, entitlements, androidManifest, strings, gradleProperties, and expoPlist mods.\n * This plugin should be evaluated directly:\n */\nexport function withIntrospectionBaseMods(\n config: ExportedConfig,\n props: ForwardedBaseModOptions = {}\n): ExportedConfig {\n config = withIosBaseMods(config, {\n saveToInternal: true,\n // This writing optimization can be skipped since we never write in introspection mode.\n // Including empty mods will ensure that all mods get introspected.\n skipEmptyMod: false,\n ...props,\n });\n config = withAndroidBaseMods(config, {\n saveToInternal: true,\n skipEmptyMod: false,\n ...props,\n });\n\n if (config.mods) {\n // Remove all mods that don't have an introspection base mod, for instance `dangerous` mods.\n for (const platform of Object.keys(config.mods) as ModPlatform[]) {\n // const platformPreserve = preserve[platform];\n for (const key of Object.keys(config.mods[platform] || {})) {\n // @ts-ignore\n if (!config.mods[platform]?.[key]?.isIntrospective) {\n debug(`removing non-idempotent mod: ${platform}.${key}`);\n // @ts-ignore\n delete config.mods[platform]?.[key];\n }\n }\n }\n }\n\n return config;\n}\n\n/**\n *\n * @param projectRoot\n * @param config\n */\nexport async function compileModsAsync(\n config: ExportedConfig,\n props: {\n projectRoot: string;\n platforms?: ModPlatform[];\n introspect?: boolean;\n assertMissingModProviders?: boolean;\n }\n): Promise<ExportedConfig> {\n if (props.introspect === true) {\n config = withIntrospectionBaseMods(config);\n } else {\n config = withDefaultBaseMods(config);\n }\n return await evalModsAsync(config, props);\n}\n\nfunction sortMods(commands: [string, any][], order: string[]): [string, any][] {\n const allKeys = commands.map(([key]) => key);\n const completeOrder = [...new Set([...order, ...allKeys])];\n const sorted: [string, any][] = [];\n while (completeOrder.length) {\n const group = completeOrder.shift()!;\n const commandSet = commands.find(([key]) => key === group);\n if (commandSet) {\n sorted.push(commandSet);\n }\n }\n return sorted;\n}\n\nfunction getRawClone({ mods, ...config }: ExportedConfig) {\n // Configs should be fully serializable, so we can clone them without worrying about\n // the mods.\n return Object.freeze(JSON.parse(JSON.stringify(config)));\n}\n\nconst orders: Record<string, string[]> = {\n ios: [\n // dangerous runs first\n 'dangerous',\n // run the XcodeProject mod second because many plugins attempt to read from it.\n 'xcodeproj',\n ],\n};\n/**\n * A generic plugin compiler.\n *\n * @param config\n */\nexport async function evalModsAsync(\n config: ExportedConfig,\n {\n projectRoot,\n introspect,\n platforms,\n /**\n * Throw errors when mods are missing providers.\n * @default true\n */\n assertMissingModProviders,\n }: {\n projectRoot: string;\n introspect?: boolean;\n assertMissingModProviders?: boolean;\n platforms?: ModPlatform[];\n }\n): Promise<ExportedConfig> {\n const modRawConfig = getRawClone(config);\n for (const [platformName, platform] of Object.entries(config.mods ?? ({} as ModConfig))) {\n if (platforms && !platforms.includes(platformName as any)) {\n debug(`skip platform: ${platformName}`);\n continue;\n }\n\n let entries = Object.entries(platform);\n if (entries.length) {\n // Move dangerous item to the first position if it exists, this ensures that all dangerous code runs first.\n entries = sortMods(entries, orders[platformName] ?? ['dangerous']);\n debug(`run in order: ${entries.map(([name]) => name).join(', ')}`);\n const platformProjectRoot = path.join(projectRoot, platformName);\n const projectName =\n platformName === 'ios' ? getHackyProjectName(projectRoot, config) : undefined;\n\n for (const [modName, mod] of entries) {\n const modRequest = {\n projectRoot,\n projectName,\n platformProjectRoot,\n platform: platformName as ModPlatform,\n modName,\n introspect: !!introspect,\n };\n\n if (!(mod as Mod).isProvider) {\n // In strict mode, throw an error.\n const errorMessage = `Initial base modifier for \"${platformName}.${modName}\" is not a provider and therefore will not provide modResults to child mods`;\n if (assertMissingModProviders !== false) {\n throw new PluginError(errorMessage, 'MISSING_PROVIDER');\n } else {\n Warnings.addWarningForPlatform(\n platformName as ModPlatform,\n `${platformName}.${modName}`,\n `Skipping: Initial base modifier for \"${platformName}.${modName}\" is not a provider and therefore will not provide modResults to child mods. This may be due to an outdated version of Expo CLI.`\n );\n // In loose mode, just skip the mod entirely.\n continue;\n }\n }\n\n const results = await (mod as Mod)({\n ...config,\n modResults: null,\n modRequest,\n modRawConfig,\n });\n\n // Sanity check to help locate non compliant mods.\n config = assertModResults(results, platformName, modName);\n // @ts-ignore: `modResults` is added for modifications\n delete config.modResults;\n // @ts-ignore: `modRequest` is added for modifications\n delete config.modRequest;\n // @ts-ignore: `modRawConfig` is added for modifications\n delete config.modRawConfig;\n }\n }\n }\n\n return config;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;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G,MAAON,GAAG,CAAS;UACjC,GAAGvD,MAAM;UACT8D,UAAU,EAAE,IAAI;UAChBN,UAAU;UACVf;QACF,CAAC,CAAC;;QAEF;QACAzC,MAAM,GAAG,IAAA+D,iCAAgB,EAACF,OAAO,EAAEnB,YAAY,EAAEY,OAAO,CAAC;QACzD;QACA,OAAOtD,MAAM,CAAC8D,UAAU;QACxB;QACA,OAAO9D,MAAM,CAACwD,UAAU;QACxB;QACA,OAAOxD,MAAM,CAACyC,YAAY;MAC5B;IACF;EACF;EAEA,OAAOzC,MAAM;AACf"}
|
|
1
|
+
{"version":3,"file":"mod-compiler.js","names":["_debug","data","_interopRequireDefault","require","_path","_Xcodeproj","_errors","Warnings","_interopRequireWildcard","_createBaseMod","_withAndroidBaseMods","_withIosBaseMods","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","debug","Debug","withDefaultBaseMods","config","props","withIosBaseMods","withAndroidBaseMods","withIntrospectionBaseMods","saveToInternal","skipEmptyMod","mods","platform","keys","_config$mods$platform","_config$mods$platform2","isIntrospective","_config$mods$platform3","compileModsAsync","introspect","evalModsAsync","sortMods","commands","order","allKeys","map","completeOrder","Set","sorted","length","group","shift","commandSet","find","push","getRawClone","freeze","JSON","parse","stringify","orders","ios","projectRoot","platforms","assertMissingModProviders","ignoreExistingNativeFiles","modRawConfig","platformName","entries","_config$mods","includes","_orders$platformName","name","join","platformProjectRoot","path","projectName","getHackyProjectName","undefined","modName","mod","modRequest","isProvider","errorMessage","PluginError","addWarningForPlatform","results","modResults","assertModResults"],"sources":["../../src/plugins/mod-compiler.ts"],"sourcesContent":["import Debug from 'debug';\nimport path from 'path';\n\nimport { ExportedConfig, Mod, ModConfig, ModPlatform } from '../Plugin.types';\nimport { getHackyProjectName } from '../ios/utils/Xcodeproj';\nimport { PluginError } from '../utils/errors';\nimport * as Warnings from '../utils/warnings';\nimport { assertModResults, ForwardedBaseModOptions } from './createBaseMod';\nimport { withAndroidBaseMods } from './withAndroidBaseMods';\nimport { withIosBaseMods } from './withIosBaseMods';\n\nconst debug = Debug('expo:config-plugins:mod-compiler');\n\nexport function withDefaultBaseMods(\n config: ExportedConfig,\n props: ForwardedBaseModOptions = {}\n): ExportedConfig {\n config = withIosBaseMods(config, props);\n config = withAndroidBaseMods(config, props);\n return config;\n}\n\n/**\n * Get a prebuild config that safely evaluates mods without persisting any changes to the file system.\n * Currently this only supports infoPlist, entitlements, androidManifest, strings, gradleProperties, and expoPlist mods.\n * This plugin should be evaluated directly:\n */\nexport function withIntrospectionBaseMods(\n config: ExportedConfig,\n props: ForwardedBaseModOptions = {}\n): ExportedConfig {\n config = withIosBaseMods(config, {\n saveToInternal: true,\n // This writing optimization can be skipped since we never write in introspection mode.\n // Including empty mods will ensure that all mods get introspected.\n skipEmptyMod: false,\n ...props,\n });\n config = withAndroidBaseMods(config, {\n saveToInternal: true,\n skipEmptyMod: false,\n ...props,\n });\n\n if (config.mods) {\n // Remove all mods that don't have an introspection base mod, for instance `dangerous` mods.\n for (const platform of Object.keys(config.mods) as ModPlatform[]) {\n // const platformPreserve = preserve[platform];\n for (const key of Object.keys(config.mods[platform] || {})) {\n // @ts-ignore\n if (!config.mods[platform]?.[key]?.isIntrospective) {\n debug(`removing non-idempotent mod: ${platform}.${key}`);\n // @ts-ignore\n delete config.mods[platform]?.[key];\n }\n }\n }\n }\n\n return config;\n}\n\n/**\n *\n * @param projectRoot\n * @param config\n */\nexport async function compileModsAsync(\n config: ExportedConfig,\n props: {\n projectRoot: string;\n platforms?: ModPlatform[];\n introspect?: boolean;\n assertMissingModProviders?: boolean;\n ignoreExistingNativeFiles?: boolean;\n }\n): Promise<ExportedConfig> {\n if (props.introspect === true) {\n config = withIntrospectionBaseMods(config);\n } else {\n config = withDefaultBaseMods(config);\n }\n return await evalModsAsync(config, props);\n}\n\nfunction sortMods(commands: [string, any][], order: string[]): [string, any][] {\n const allKeys = commands.map(([key]) => key);\n const completeOrder = [...new Set([...order, ...allKeys])];\n const sorted: [string, any][] = [];\n while (completeOrder.length) {\n const group = completeOrder.shift()!;\n const commandSet = commands.find(([key]) => key === group);\n if (commandSet) {\n sorted.push(commandSet);\n }\n }\n return sorted;\n}\n\nfunction getRawClone({ mods, ...config }: ExportedConfig) {\n // Configs should be fully serializable, so we can clone them without worrying about\n // the mods.\n return Object.freeze(JSON.parse(JSON.stringify(config)));\n}\n\nconst orders: Record<string, string[]> = {\n ios: [\n // dangerous runs first\n 'dangerous',\n // run the XcodeProject mod second because many plugins attempt to read from it.\n 'xcodeproj',\n ],\n};\n/**\n * A generic plugin compiler.\n *\n * @param config\n */\nexport async function evalModsAsync(\n config: ExportedConfig,\n {\n projectRoot,\n introspect,\n platforms,\n assertMissingModProviders,\n ignoreExistingNativeFiles = false,\n }: {\n projectRoot: string;\n introspect?: boolean;\n platforms?: ModPlatform[];\n /**\n * Throw errors when mods are missing providers.\n * @default true\n */\n assertMissingModProviders?: boolean;\n /** Ignore any existing native files, only use the generated prebuild results. */\n ignoreExistingNativeFiles?: boolean;\n }\n): Promise<ExportedConfig> {\n const modRawConfig = getRawClone(config);\n for (const [platformName, platform] of Object.entries(config.mods ?? ({} as ModConfig))) {\n if (platforms && !platforms.includes(platformName as any)) {\n debug(`skip platform: ${platformName}`);\n continue;\n }\n\n let entries = Object.entries(platform);\n if (entries.length) {\n // Move dangerous item to the first position if it exists, this ensures that all dangerous code runs first.\n entries = sortMods(entries, orders[platformName] ?? ['dangerous']);\n debug(`run in order: ${entries.map(([name]) => name).join(', ')}`);\n const platformProjectRoot = path.join(projectRoot, platformName);\n const projectName =\n platformName === 'ios' ? getHackyProjectName(projectRoot, config) : undefined;\n\n for (const [modName, mod] of entries) {\n const modRequest = {\n projectRoot,\n projectName,\n platformProjectRoot,\n platform: platformName as ModPlatform,\n modName,\n introspect: !!introspect,\n ignoreExistingNativeFiles,\n };\n\n if (!(mod as Mod).isProvider) {\n // In strict mode, throw an error.\n const errorMessage = `Initial base modifier for \"${platformName}.${modName}\" is not a provider and therefore will not provide modResults to child mods`;\n if (assertMissingModProviders !== false) {\n throw new PluginError(errorMessage, 'MISSING_PROVIDER');\n } else {\n Warnings.addWarningForPlatform(\n platformName as ModPlatform,\n `${platformName}.${modName}`,\n `Skipping: Initial base modifier for \"${platformName}.${modName}\" is not a provider and therefore will not provide modResults to child mods. This may be due to an outdated version of Expo CLI.`\n );\n // In loose mode, just skip the mod entirely.\n continue;\n }\n }\n\n const results = await (mod as Mod)({\n ...config,\n modResults: null,\n modRequest,\n modRawConfig,\n });\n\n // Sanity check to help locate non compliant mods.\n config = assertModResults(results, platformName, modName);\n // @ts-ignore: `modResults` is added for modifications\n delete config.modResults;\n // @ts-ignore: `modRequest` is added for modifications\n delete config.modRequest;\n // @ts-ignore: `modRawConfig` is added for modifications\n delete config.modRawConfig;\n }\n }\n }\n\n return config;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAO,uBAAA,CA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,MAAM;UACT+D,UAAU,EAAE,IAAI;UAChBN,UAAU;UACVf;QACF,CAAC,CAAC;;QAEF;QACA1C,MAAM,GAAG,IAAAgE,iCAAgB,EAACF,OAAO,EAAEnB,YAAY,EAAEY,OAAO,CAAC;QACzD;QACA,OAAOvD,MAAM,CAAC+D,UAAU;QACxB;QACA,OAAO/D,MAAM,CAACyD,UAAU;QACxB;QACA,OAAOzD,MAAM,CAAC0C,YAAY;MAC5B;IACF;EACF;EAEA,OAAO1C,MAAM;AACf"}
|
|
@@ -327,7 +327,7 @@ const defaultProviders = {
|
|
|
327
327
|
async read(filePath, config) {
|
|
328
328
|
let modResults;
|
|
329
329
|
try {
|
|
330
|
-
if (_fs().default.existsSync(filePath)) {
|
|
330
|
+
if (!config.modRequest.ignoreExistingNativeFiles && _fs().default.existsSync(filePath)) {
|
|
331
331
|
const contents = await readFile(filePath, 'utf8');
|
|
332
332
|
(0, _assert().default)(contents, 'Entitlements plist is empty');
|
|
333
333
|
modResults = _plist().default.parse(contents);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIosBaseMods.js","names":["_jsonFile","data","_interopRequireDefault","require","_plist","_assert","_fs","_interopRequireWildcard","_path","_xcode","_ios","_Entitlements","_Xcodeproj","_getInfoPlistPath","_modules","_sortObject","_warnings","_createBaseMod","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","readFile","writeFile","promises","getEntitlementsPlistTemplate","getInfoPlistTemplate","CFBundleDevelopmentRegion","CFBundleExecutable","CFBundleIdentifier","CFBundleName","CFBundlePackageType","CFBundleInfoDictionaryVersion","CFBundleSignature","LSRequiresIPhoneOS","NSAppTransportSecurity","NSAllowsArbitraryLoads","NSExceptionDomains","localhost","NSExceptionAllowsInsecureHTTPLoads","UILaunchStoryboardName","UIRequiredDeviceCapabilities","UIViewControllerBasedStatusBarAppearance","UIStatusBarStyle","CADisableMinimumFrameDurationOnPhone","defaultProviders","dangerous","provider","getFilePath","read","write","appDelegate","modRequest","projectRoot","Paths","getAppDelegateFilePath","filePath","getFileInfo","modResults","contents","expoPlist","isIntrospective","platformProjectRoot","projectName","supportingDirectory","path","join","resolve","introspect","plist","parse","error","build","sortObject","xcodeproj","getPBXProjectPath","project","xcode","parseSync","writeSync","infoPlist","config","getPbxproj","infoPlistBuildProperty","getInfoPlistPathFromPbxproj","infoPlistPath","fileExists","addWarningIOS","getInfoPlistPath","ios","assert","entitlements","_Entitlements$getEnti","ensureApplicationTargetEntitlementsFileConfigured","Entitlements","getEntitlementsPath","fs","existsSync","podfileProperties","results","JsonFile","readAsync","writeAsync","withIosBaseMods","providers","props","withGeneratedBaseMods","platform","getIosModFileProviders"],"sources":["../../src/plugins/withIosBaseMods.ts"],"sourcesContent":["import JsonFile, { JSONObject, JSONValue } from '@expo/json-file';\nimport plist from '@expo/plist';\nimport assert from 'assert';\nimport fs, { promises } from 'fs';\nimport path from 'path';\nimport xcode, { XcodeProject } from 'xcode';\n\nimport { ExportedConfig, ModConfig } from '../Plugin.types';\nimport { Entitlements, Paths } from '../ios';\nimport { ensureApplicationTargetEntitlementsFileConfigured } from '../ios/Entitlements';\nimport { InfoPlist } from '../ios/IosConfig.types';\nimport { getPbxproj } from '../ios/utils/Xcodeproj';\nimport { getInfoPlistPathFromPbxproj } from '../ios/utils/getInfoPlistPath';\nimport { fileExists } from '../utils/modules';\nimport { sortObject } from '../utils/sortObject';\nimport { addWarningIOS } from '../utils/warnings';\nimport { ForwardedBaseModOptions, provider, withGeneratedBaseMods } from './createBaseMod';\n\nconst { readFile, writeFile } = promises;\n\ntype IosModName = keyof Required<ModConfig>['ios'];\n\nfunction getEntitlementsPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {};\n}\n\nfunction getInfoPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {\n CFBundleDevelopmentRegion: '$(DEVELOPMENT_LANGUAGE)',\n CFBundleExecutable: '$(EXECUTABLE_NAME)',\n CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)',\n CFBundleName: '$(PRODUCT_NAME)',\n CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',\n CFBundleInfoDictionaryVersion: '6.0',\n CFBundleSignature: '????',\n LSRequiresIPhoneOS: true,\n NSAppTransportSecurity: {\n NSAllowsArbitraryLoads: true,\n NSExceptionDomains: {\n localhost: {\n NSExceptionAllowsInsecureHTTPLoads: true,\n },\n },\n },\n UILaunchStoryboardName: 'SplashScreen',\n UIRequiredDeviceCapabilities: ['armv7'],\n UIViewControllerBasedStatusBarAppearance: false,\n UIStatusBarStyle: 'UIStatusBarStyleDefault',\n CADisableMinimumFrameDurationOnPhone: true,\n };\n}\n\nconst defaultProviders = {\n dangerous: provider<unknown>({\n getFilePath() {\n return '';\n },\n async read() {\n return {};\n },\n async write() {},\n }),\n // Append a rule to supply AppDelegate data to mods on `mods.ios.appDelegate`\n appDelegate: provider<Paths.AppDelegateProjectFile>({\n getFilePath({ modRequest: { projectRoot } }) {\n // TODO: Get application AppDelegate file from pbxproj.\n return Paths.getAppDelegateFilePath(projectRoot);\n },\n async read(filePath) {\n return Paths.getFileInfo(filePath);\n },\n async write(filePath: string, { modResults: { contents } }) {\n await writeFile(filePath, contents);\n },\n }),\n // Append a rule to supply Expo.plist data to mods on `mods.ios.expoPlist`\n expoPlist: provider<JSONObject>({\n isIntrospective: true,\n getFilePath({ modRequest: { platformProjectRoot, projectName } }) {\n const supportingDirectory = path.join(platformProjectRoot, projectName!, 'Supporting');\n return path.resolve(supportingDirectory, 'Expo.plist');\n },\n async read(filePath, { modRequest: { introspect } }) {\n try {\n return plist.parse(await readFile(filePath, 'utf8'));\n } catch (error) {\n if (introspect) {\n return {};\n }\n throw error;\n }\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await writeFile(filePath, plist.build(sortObject(modResults)));\n },\n }),\n // Append a rule to supply .xcodeproj data to mods on `mods.ios.xcodeproj`\n xcodeproj: provider<XcodeProject>({\n getFilePath({ modRequest: { projectRoot } }) {\n return Paths.getPBXProjectPath(projectRoot);\n },\n async read(filePath) {\n const project = xcode.project(filePath);\n project.parseSync();\n return project;\n },\n async write(filePath, { modResults }) {\n await writeFile(filePath, modResults.writeSync());\n },\n }),\n // Append a rule to supply Info.plist data to mods on `mods.ios.infoPlist`\n infoPlist: provider<InfoPlist, ForwardedBaseModOptions>({\n isIntrospective: true,\n async getFilePath(config) {\n let project: xcode.XcodeProject | null = null;\n try {\n project = getPbxproj(config.modRequest.projectRoot);\n } catch {\n // noop\n }\n\n // Only check / warn if a project actually exists, this'll provide\n // more accurate warning messages for users in managed projects.\n if (project) {\n const infoPlistBuildProperty = getInfoPlistPathFromPbxproj(project);\n\n if (infoPlistBuildProperty) {\n //: [root]/myapp/ios/MyApp/Info.plist\n const infoPlistPath = path.join(\n //: myapp/ios\n config.modRequest.platformProjectRoot,\n //: MyApp/Info.plist\n infoPlistBuildProperty\n );\n if (fileExists(infoPlistPath)) {\n return infoPlistPath;\n }\n addWarningIOS(\n 'mods.ios.infoPlist',\n `Info.plist file linked to Xcode project does not exist: ${infoPlistPath}`\n );\n } else {\n addWarningIOS('mods.ios.infoPlist', 'Failed to find Info.plist linked to Xcode project.');\n }\n }\n try {\n // Fallback on glob...\n return await Paths.getInfoPlistPath(config.modRequest.projectRoot);\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n async read(filePath, config) {\n // Apply all of the Info.plist values to the expo.ios.infoPlist object\n // TODO: Remove this in favor of just overwriting the Info.plist with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.infoPlist) config.ios.infoPlist = {};\n\n let modResults: InfoPlist;\n try {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Info.plist is empty');\n modResults = plist.parse(contents) as InfoPlist;\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the infoPlist object from the Expo config.\n modResults = getInfoPlistTemplate();\n }\n\n config.ios.infoPlist = {\n ...(modResults || {}),\n ...config.ios.infoPlist,\n };\n\n return config.ios.infoPlist!;\n },\n async write(filePath, config) {\n // Update the contents of the static infoPlist object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.infoPlist = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n // Append a rule to supply .entitlements data to mods on `mods.ios.entitlements`\n entitlements: provider<JSONObject, ForwardedBaseModOptions>({\n isIntrospective: true,\n\n async getFilePath(config) {\n try {\n ensureApplicationTargetEntitlementsFileConfigured(config.modRequest.projectRoot);\n return Entitlements.getEntitlementsPath(config.modRequest.projectRoot) ?? '';\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n\n async read(filePath, config) {\n let modResults: JSONObject;\n try {\n if (fs.existsSync(filePath)) {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Entitlements plist is empty');\n modResults = plist.parse(contents);\n } else {\n modResults = getEntitlementsPlistTemplate();\n }\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the template file.\n modResults = getEntitlementsPlistTemplate();\n }\n\n // Apply all of the .entitlements values to the expo.ios.entitlements object\n // TODO: Remove this in favor of just overwriting the .entitlements with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.entitlements) config.ios.entitlements = {};\n\n config.ios.entitlements = {\n ...(modResults || {}),\n ...config.ios.entitlements,\n };\n\n return config.ios.entitlements!;\n },\n\n async write(filePath, config) {\n // Update the contents of the static entitlements object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.entitlements = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n\n // Append a rule to supply Podfile.properties.json data to mods on `mods.ios.podfileProperties`\n podfileProperties: provider<Record<string, JSONValue>>({\n isIntrospective: true,\n\n getFilePath({ modRequest: { platformProjectRoot } }) {\n return path.resolve(platformProjectRoot, 'Podfile.properties.json');\n },\n async read(filePath) {\n let results: Record<string, JSONValue> = {};\n try {\n results = await JsonFile.readAsync(filePath);\n } catch {}\n return results;\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await JsonFile.writeAsync(filePath, modResults);\n },\n }),\n};\n\ntype IosDefaultProviders = typeof defaultProviders;\n\nexport function withIosBaseMods(\n config: ExportedConfig,\n {\n providers,\n ...props\n }: ForwardedBaseModOptions & { providers?: Partial<IosDefaultProviders> } = {}\n): ExportedConfig {\n return withGeneratedBaseMods<IosModName>(config, {\n ...props,\n platform: 'ios',\n providers: providers ?? getIosModFileProviders(),\n });\n}\n\nexport function getIosModFileProviders() {\n return defaultProviders;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,IAAA;EAAA,MAAAL,IAAA,GAAAM,uBAAA,CAAAJ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yBAAyB,CAAC;IACrE,CAAC;IACD,MAAMb,IAAIA,CAACO,QAAQ,EAAE;MACnB,IAAI2C,OAAkC,GAAG,CAAC,CAAC;MAC3C,IAAI;QACFA,OAAO,GAAG,MAAMC,mBAAQ,CAACC,SAAS,CAAC7C,QAAQ,CAAC;MAC9C,CAAC,CAAC,MAAM,CAAC;MACT,OAAO2C,OAAO;IAChB,CAAC;IACD,MAAMjD,KAAKA,CAACM,QAAQ,EAAE;MAAEE,UAAU;MAAEN,UAAU,EAAE;QAAEgB;MAAW;IAAE,CAAC,EAAE;MAChE,IAAIA,UAAU,EAAE;QACd;MACF;MACA,MAAMgC,mBAAQ,CAACE,UAAU,CAAC9C,QAAQ,EAAEE,UAAU,CAAC;IACjD;EACF,CAAC;AACH,CAAC;AAIM,SAAS6C,eAAeA,CAC7BtB,MAAsB,EACtB;EACEuB,SAAS;EACT,GAAGC;AACmE,CAAC,GAAG,CAAC,CAAC,EAC9D;EAChB,OAAO,IAAAC,sCAAqB,EAAazB,MAAM,EAAE;IAC/C,GAAGwB,KAAK;IACRE,QAAQ,EAAE,KAAK;IACfH,SAAS,EAAEA,SAAS,aAATA,SAAS,cAATA,SAAS,GAAII,sBAAsB;EAChD,CAAC,CAAC;AACJ;AAEO,SAASA,sBAAsBA,CAAA,EAAG;EACvC,OAAO/D,gBAAgB;AACzB"}
|
|
1
|
+
{"version":3,"file":"withIosBaseMods.js","names":["_jsonFile","data","_interopRequireDefault","require","_plist","_assert","_fs","_interopRequireWildcard","_path","_xcode","_ios","_Entitlements","_Xcodeproj","_getInfoPlistPath","_modules","_sortObject","_warnings","_createBaseMod","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","readFile","writeFile","promises","getEntitlementsPlistTemplate","getInfoPlistTemplate","CFBundleDevelopmentRegion","CFBundleExecutable","CFBundleIdentifier","CFBundleName","CFBundlePackageType","CFBundleInfoDictionaryVersion","CFBundleSignature","LSRequiresIPhoneOS","NSAppTransportSecurity","NSAllowsArbitraryLoads","NSExceptionDomains","localhost","NSExceptionAllowsInsecureHTTPLoads","UILaunchStoryboardName","UIRequiredDeviceCapabilities","UIViewControllerBasedStatusBarAppearance","UIStatusBarStyle","CADisableMinimumFrameDurationOnPhone","defaultProviders","dangerous","provider","getFilePath","read","write","appDelegate","modRequest","projectRoot","Paths","getAppDelegateFilePath","filePath","getFileInfo","modResults","contents","expoPlist","isIntrospective","platformProjectRoot","projectName","supportingDirectory","path","join","resolve","introspect","plist","parse","error","build","sortObject","xcodeproj","getPBXProjectPath","project","xcode","parseSync","writeSync","infoPlist","config","getPbxproj","infoPlistBuildProperty","getInfoPlistPathFromPbxproj","infoPlistPath","fileExists","addWarningIOS","getInfoPlistPath","ios","assert","entitlements","_Entitlements$getEnti","ensureApplicationTargetEntitlementsFileConfigured","Entitlements","getEntitlementsPath","ignoreExistingNativeFiles","fs","existsSync","podfileProperties","results","JsonFile","readAsync","writeAsync","withIosBaseMods","providers","props","withGeneratedBaseMods","platform","getIosModFileProviders"],"sources":["../../src/plugins/withIosBaseMods.ts"],"sourcesContent":["import JsonFile, { JSONObject, JSONValue } from '@expo/json-file';\nimport plist from '@expo/plist';\nimport assert from 'assert';\nimport fs, { promises } from 'fs';\nimport path from 'path';\nimport xcode, { XcodeProject } from 'xcode';\n\nimport { ExportedConfig, ModConfig } from '../Plugin.types';\nimport { Entitlements, Paths } from '../ios';\nimport { ensureApplicationTargetEntitlementsFileConfigured } from '../ios/Entitlements';\nimport { InfoPlist } from '../ios/IosConfig.types';\nimport { getPbxproj } from '../ios/utils/Xcodeproj';\nimport { getInfoPlistPathFromPbxproj } from '../ios/utils/getInfoPlistPath';\nimport { fileExists } from '../utils/modules';\nimport { sortObject } from '../utils/sortObject';\nimport { addWarningIOS } from '../utils/warnings';\nimport { ForwardedBaseModOptions, provider, withGeneratedBaseMods } from './createBaseMod';\n\nconst { readFile, writeFile } = promises;\n\ntype IosModName = keyof Required<ModConfig>['ios'];\n\nfunction getEntitlementsPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {};\n}\n\nfunction getInfoPlistTemplate() {\n // TODO: Fetch the versioned template file if possible\n return {\n CFBundleDevelopmentRegion: '$(DEVELOPMENT_LANGUAGE)',\n CFBundleExecutable: '$(EXECUTABLE_NAME)',\n CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)',\n CFBundleName: '$(PRODUCT_NAME)',\n CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',\n CFBundleInfoDictionaryVersion: '6.0',\n CFBundleSignature: '????',\n LSRequiresIPhoneOS: true,\n NSAppTransportSecurity: {\n NSAllowsArbitraryLoads: true,\n NSExceptionDomains: {\n localhost: {\n NSExceptionAllowsInsecureHTTPLoads: true,\n },\n },\n },\n UILaunchStoryboardName: 'SplashScreen',\n UIRequiredDeviceCapabilities: ['armv7'],\n UIViewControllerBasedStatusBarAppearance: false,\n UIStatusBarStyle: 'UIStatusBarStyleDefault',\n CADisableMinimumFrameDurationOnPhone: true,\n };\n}\n\nconst defaultProviders = {\n dangerous: provider<unknown>({\n getFilePath() {\n return '';\n },\n async read() {\n return {};\n },\n async write() {},\n }),\n // Append a rule to supply AppDelegate data to mods on `mods.ios.appDelegate`\n appDelegate: provider<Paths.AppDelegateProjectFile>({\n getFilePath({ modRequest: { projectRoot } }) {\n // TODO: Get application AppDelegate file from pbxproj.\n return Paths.getAppDelegateFilePath(projectRoot);\n },\n async read(filePath) {\n return Paths.getFileInfo(filePath);\n },\n async write(filePath: string, { modResults: { contents } }) {\n await writeFile(filePath, contents);\n },\n }),\n // Append a rule to supply Expo.plist data to mods on `mods.ios.expoPlist`\n expoPlist: provider<JSONObject>({\n isIntrospective: true,\n getFilePath({ modRequest: { platformProjectRoot, projectName } }) {\n const supportingDirectory = path.join(platformProjectRoot, projectName!, 'Supporting');\n return path.resolve(supportingDirectory, 'Expo.plist');\n },\n async read(filePath, { modRequest: { introspect } }) {\n try {\n return plist.parse(await readFile(filePath, 'utf8'));\n } catch (error) {\n if (introspect) {\n return {};\n }\n throw error;\n }\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await writeFile(filePath, plist.build(sortObject(modResults)));\n },\n }),\n // Append a rule to supply .xcodeproj data to mods on `mods.ios.xcodeproj`\n xcodeproj: provider<XcodeProject>({\n getFilePath({ modRequest: { projectRoot } }) {\n return Paths.getPBXProjectPath(projectRoot);\n },\n async read(filePath) {\n const project = xcode.project(filePath);\n project.parseSync();\n return project;\n },\n async write(filePath, { modResults }) {\n await writeFile(filePath, modResults.writeSync());\n },\n }),\n // Append a rule to supply Info.plist data to mods on `mods.ios.infoPlist`\n infoPlist: provider<InfoPlist, ForwardedBaseModOptions>({\n isIntrospective: true,\n async getFilePath(config) {\n let project: xcode.XcodeProject | null = null;\n try {\n project = getPbxproj(config.modRequest.projectRoot);\n } catch {\n // noop\n }\n\n // Only check / warn if a project actually exists, this'll provide\n // more accurate warning messages for users in managed projects.\n if (project) {\n const infoPlistBuildProperty = getInfoPlistPathFromPbxproj(project);\n\n if (infoPlistBuildProperty) {\n //: [root]/myapp/ios/MyApp/Info.plist\n const infoPlistPath = path.join(\n //: myapp/ios\n config.modRequest.platformProjectRoot,\n //: MyApp/Info.plist\n infoPlistBuildProperty\n );\n if (fileExists(infoPlistPath)) {\n return infoPlistPath;\n }\n addWarningIOS(\n 'mods.ios.infoPlist',\n `Info.plist file linked to Xcode project does not exist: ${infoPlistPath}`\n );\n } else {\n addWarningIOS('mods.ios.infoPlist', 'Failed to find Info.plist linked to Xcode project.');\n }\n }\n try {\n // Fallback on glob...\n return await Paths.getInfoPlistPath(config.modRequest.projectRoot);\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n async read(filePath, config) {\n // Apply all of the Info.plist values to the expo.ios.infoPlist object\n // TODO: Remove this in favor of just overwriting the Info.plist with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.infoPlist) config.ios.infoPlist = {};\n\n let modResults: InfoPlist;\n try {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Info.plist is empty');\n modResults = plist.parse(contents) as InfoPlist;\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the infoPlist object from the Expo config.\n modResults = getInfoPlistTemplate();\n }\n\n config.ios.infoPlist = {\n ...(modResults || {}),\n ...config.ios.infoPlist,\n };\n\n return config.ios.infoPlist!;\n },\n async write(filePath, config) {\n // Update the contents of the static infoPlist object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.infoPlist = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n // Append a rule to supply .entitlements data to mods on `mods.ios.entitlements`\n entitlements: provider<JSONObject, ForwardedBaseModOptions>({\n isIntrospective: true,\n\n async getFilePath(config) {\n try {\n ensureApplicationTargetEntitlementsFileConfigured(config.modRequest.projectRoot);\n return Entitlements.getEntitlementsPath(config.modRequest.projectRoot) ?? '';\n } catch (error: any) {\n if (config.modRequest.introspect) {\n // fallback to an empty string in introspection mode.\n return '';\n }\n throw error;\n }\n },\n\n async read(filePath, config) {\n let modResults: JSONObject;\n try {\n if (!config.modRequest.ignoreExistingNativeFiles && fs.existsSync(filePath)) {\n const contents = await readFile(filePath, 'utf8');\n assert(contents, 'Entitlements plist is empty');\n modResults = plist.parse(contents);\n } else {\n modResults = getEntitlementsPlistTemplate();\n }\n } catch (error: any) {\n // Throw errors in introspection mode.\n if (!config.modRequest.introspect) {\n throw error;\n }\n // Fallback to using the template file.\n modResults = getEntitlementsPlistTemplate();\n }\n\n // Apply all of the .entitlements values to the expo.ios.entitlements object\n // TODO: Remove this in favor of just overwriting the .entitlements with the Expo object. This will enable people to actually remove values.\n if (!config.ios) config.ios = {};\n if (!config.ios.entitlements) config.ios.entitlements = {};\n\n config.ios.entitlements = {\n ...(modResults || {}),\n ...config.ios.entitlements,\n };\n\n return config.ios.entitlements!;\n },\n\n async write(filePath, config) {\n // Update the contents of the static entitlements object\n if (!config.ios) {\n config.ios = {};\n }\n config.ios.entitlements = config.modResults;\n\n // Return early without writing, in introspection mode.\n if (config.modRequest.introspect) {\n return;\n }\n\n await writeFile(filePath, plist.build(sortObject(config.modResults)));\n },\n }),\n\n // Append a rule to supply Podfile.properties.json data to mods on `mods.ios.podfileProperties`\n podfileProperties: provider<Record<string, JSONValue>>({\n isIntrospective: true,\n\n getFilePath({ modRequest: { platformProjectRoot } }) {\n return path.resolve(platformProjectRoot, 'Podfile.properties.json');\n },\n async read(filePath) {\n let results: Record<string, JSONValue> = {};\n try {\n results = await JsonFile.readAsync(filePath);\n } catch {}\n return results;\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await JsonFile.writeAsync(filePath, modResults);\n },\n }),\n};\n\ntype IosDefaultProviders = typeof defaultProviders;\n\nexport function withIosBaseMods(\n config: ExportedConfig,\n {\n providers,\n ...props\n }: ForwardedBaseModOptions & { providers?: Partial<IosDefaultProviders> } = {}\n): ExportedConfig {\n return withGeneratedBaseMods<IosModName>(config, {\n ...props,\n platform: 'ios',\n providers: providers ?? getIosModFileProviders(),\n });\n}\n\nexport function getIosModFileProviders() {\n return defaultProviders;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA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|
+
"version": "7.2.5",
|
|
4
4
|
"description": "A library for Expo config plugins",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "cf90d5c30c2a08a6493ebfa8aa3791aa70666759"
|
|
60
60
|
}
|