first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

2
node_modules/expo-constants/.eslintrc.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');

637
node_modules/expo-constants/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,637 @@
# Changelog
## Unpublished
### 🛠 Breaking changes
### 🎉 New features
### 🐛 Bug fixes
### 💡 Others
## 55.0.7 — 2026-02-25
_This version does not introduce any user-facing changes._
## 55.0.6 — 2026-02-20
_This version does not introduce any user-facing changes._
## 55.0.5 — 2026-02-16
_This version does not introduce any user-facing changes._
## 55.0.4 — 2026-02-08
_This version does not introduce any user-facing changes._
## 55.0.3 — 2026-02-03
_This version does not introduce any user-facing changes._
## 55.0.2 — 2026-01-26
_This version does not introduce any user-facing changes._
## 55.0.1 — 2026-01-22
_This version does not introduce any user-facing changes._
## 55.0.0 — 2026-01-21
### 🎉 New features
- [android] Read projectRoot from expo-autolinking ([#40666](https://github.com/expo/expo/pull/40666) by [@gabrieldonadel](https://github.com/gabrieldonadel))
### 🐛 Bug fixes
- Fixed empty `expoConfig` on Android. ([#41259](https://github.com/expo/expo/pull/41259) by [@kudo](https://github.com/kudo))
### 💡 Others
- [Android] Removed unused native dependencies. ([#39763](https://github.com/expo/expo/pull/39763) by [@lukmccall](https://github.com/lukmccall))
- [Android] Removed references to legacy native modules API. ([#41855](https://github.com/expo/expo/pull/41855) by [@lukmccall](https://github.com/lukmccall))
## 18.0.11 - 2025-12-05
_This version does not introduce any user-facing changes._
## 18.0.10 - 2025-10-21
_This version does not introduce any user-facing changes._
## 18.0.9 — 2025-09-16
_This version does not introduce any user-facing changes._
## 18.0.8 — 2025-09-10
_This version does not introduce any user-facing changes._
## 18.0.7 — 2025-09-02
_This version does not introduce any user-facing changes._
## 18.0.6 — 2025-08-31
_This version does not introduce any user-facing changes._
## 18.0.5 — 2025-08-27
_This version does not introduce any user-facing changes._
## 18.0.4 — 2025-08-25
_This version does not introduce any user-facing changes._
## 18.0.3 — 2025-08-21
_This version does not introduce any user-facing changes._
## 18.0.2 — 2025-08-16
_This version does not introduce any user-facing changes._
## 18.0.1 — 2025-08-15
_This version does not introduce any user-facing changes._
## 18.0.0 — 2025-08-13
### 🐛 Bug fixes
- Remove invalid import from expo-dev-launcher. ([#37558](https://github.com/expo/expo/pull/37558) by [@douglowder](https://github.com/douglowder))
- Fix check-packages warning. ([#37570](https://github.com/expo/expo/pull/37570) by [@douglowder](https://github.com/douglowder))
### 💡 Others
- [iOS] forward PROJECT_ROOT env var to app config script ([#38208](https://github.com/expo/expo/pull/38208) by [@gabrieldonadel](https://github.com/gabrieldonadel))
## 17.1.7 - 2025-07-03
_This version does not introduce any user-facing changes._
## 17.1.6 — 2025-05-06
_This version does not introduce any user-facing changes._
## 17.1.5 — 2025-05-01
_This version does not introduce any user-facing changes._
## 17.1.4 — 2025-04-30
_This version does not introduce any user-facing changes._
## 17.1.3 — 2025-04-25
_This version does not introduce any user-facing changes._
## 17.1.2 — 2025-04-14
_This version does not introduce any user-facing changes._
## 17.1.1 — 2025-04-09
_This version does not introduce any user-facing changes._
## 17.1.0 — 2025-04-04
### 🛠 Breaking changes
- Bump minimum macOS version to 11.0. ([#34980](https://github.com/expo/expo/pull/34980) by [@gabrieldonadel](https://github.com/gabrieldonadel))
### 🐛 Bug fixes
- Add missing types to package exports ([#35223](https://github.com/expo/expo/pull/35223) by [@timostroehlein](https://github.com/timostroehlein))
### 💡 Others
- [android][ios] Updated Gradle build and Podspec files to ensure app.json/app.config.js values are correctly updated during each native build. ([#34228](https://github.com/expo/expo/pull/34228) by [@chrfalch](https://github.com/chrfalch))
- [Android] Started using expo modules gradle plugin. ([#34176](https://github.com/expo/expo/pull/34176) by [@lukmccall](https://github.com/lukmccall))
## 17.0.8 - 2025-03-11
### 🐛 Bug fixes
- [iOS] Fix pod install in older CocoaPods versions ([#35181](https://github.com/expo/expo/pull/35181) by [@gabrieldonadel](https://github.com/gabrieldonadel))
## 17.0.7 - 2025-02-19
_This version does not introduce any user-facing changes._
## 17.0.6 - 2025-02-14
_This version does not introduce any user-facing changes._
## 17.0.4 - 2025-01-10
_This version does not introduce any user-facing changes._
## 17.0.3 — 2024-11-14
_This version does not introduce any user-facing changes._
## 17.0.2 — 2024-10-28
_This version does not introduce any user-facing changes._
## 17.0.1 — 2024-10-22
### 💡 Others
- Fixed check-package test errors. ([#32232](https://github.com/expo/expo/pull/32232) by [@kudo](https://github.com/kudo))
## 17.0.0 — 2024-10-22
### 🛠 Breaking changes
- Bumped iOS and tvOS deployment target to 15.1. ([#30840](https://github.com/expo/expo/pull/30840) by [@tsapeta](https://github.com/tsapeta))
### 🎉 New features
- Add support for React Server environments. ([#30586](https://github.com/expo/expo/pull/30586) by [@EvanBacon](https://github.com/EvanBacon))
### 🐛 Bug fixes
- Add missing `react-native` peer dependencies for isolated modules. ([#30464](https://github.com/expo/expo/pull/30464) by [@byCedric](https://github.com/byCedric))
- Only import from `expo/config` to follow proper dependency chains. ([#30501](https://github.com/expo/expo/pull/30501) by [@byCedric](https://github.com/byCedric))
### 💡 Others
- Deprecate `Constants.appOwnership`. ([#30021](https://github.com/expo/expo/pull/30021) by [@amandeepmittal](https://github.com/amandeepmittal))
- Removed all `NativeModulesProxy` occurrences. ([#31496](https://github.com/expo/expo/pull/31496) by [@reichhartd](https://github.com/reichhartd))
## 16.0.2 - 2024-05-29
### 🐛 Bug fixes
- Source env when creating app config. ([#29099](https://github.com/expo/expo/pull/29099) by [@brentvatne](https://github.com/brentvatne))
## 16.0.1 — 2024-04-23
_This version does not introduce any user-facing changes._
## 16.0.0 — 2024-04-18
### 🛠 Breaking changes
- Remove deprecated installationId, isDevice, nativeAppVersion, nativeBuildVersion, platform.platform, platform.systemVersion, platform.userInterfaceIdiom properties. ([#26329](https://github.com/expo/expo/pull/26329) by [@aleqsio](https://github.com/aleqsio))
### 💡 Others
- [iOS] Add privacy manifest describing required reason API usage. ([#27770](https://github.com/expo/expo/pull/27770) by [@aleqsio](https://github.com/aleqsio))
- [expo-updates] Migrate to requireNativeModule/requireOptionalNativeModule. ([#25648](https://github.com/expo/expo/pull/25648) by [@wschurman](https://github.com/wschurman))
- Remove most of Constants.appOwnership. ([#26313](https://github.com/expo/expo/pull/26313) by [@wschurman](https://github.com/wschurman))
- Improve updates types and clarity in expo-asset. ([#26337](https://github.com/expo/expo/pull/26337) by [@wschurman](https://github.com/wschurman))
- Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo))
## 15.4.5 - 2024-01-18
_This version does not introduce any user-facing changes._
## 15.4.4 - 2024-01-15
### 🐛 Bug fixes
- Fixed build error on AGP 8.2. ([#26362](https://github.com/expo/expo/pull/26362) by [@kudo](https://github.com/kudo))
## 15.4.3 - 2024-01-10
### 🎉 New features
- Added support for macOS platform. ([#26233](https://github.com/expo/expo/pull/26233) by [@tsapeta](https://github.com/tsapeta))
## 15.4.2 - 2023-12-19
_This version does not introduce any user-facing changes._
## 15.4.1 — 2023-12-13
_This version does not introduce any user-facing changes._
## 15.4.0 — 2023-12-12
### 💡 Others
- Drop `crypto` usage on web. ([#25411](https://github.com/expo/expo/pull/25411) by [@EvanBacon](https://github.com/EvanBacon))
## 15.3.0 — 2023-11-14
### 🛠 Breaking changes
- Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
## 15.2.0 — 2023-10-17
_This version does not introduce any user-facing changes._
## 15.1.0 — 2023-09-15
### 🎉 New features
- Added support for Apple tvOS. ([#24329](https://github.com/expo/expo/pull/24329) by [@douglowder](https://github.com/douglowder))
### 💡 Others
- Use dedicated `requireOptionalNativeModule` instead of try-catching `requireNativeModule`. ([#24262](https://github.com/expo/expo/pull/24262) by [@tsapeta](https://github.com/tsapeta))
## 15.0.0 — 2023-09-04
### 🛠 Breaking changes
- Change source of truth for constants types. ([#24049](https://github.com/expo/expo/pull/24049) by [@wschurman](https://github.com/wschurman))
- Remove classic manifest types. ([#24053](https://github.com/expo/expo/pull/24053) by [@wschurman](https://github.com/wschurman))
- Dropped support for Android SDK 21 and 22. ([#24201](https://github.com/expo/expo/pull/24201) by [@behenate](https://github.com/behenate))
### 🎉 New features
- Added support for React Native 0.73. ([#24018](https://github.com/expo/expo/pull/24018) by [@kudo](https://github.com/kudo))
## 14.5.1 — 2023-08-02
### 🛠 Breaking changes
- Drop support for `logUrl` which sent console logs to the legacy `expo-cli`. ([#18596](https://github.com/expo/expo/pull/18596) by [@EvanBacon](https://github.com/EvanBacon))
## 14.5.0 — 2023-07-28
### 🐛 Bug fixes
- Fix task ':expo-constants:packageDebugAssets' uses this output of task ':expo-constants:copyReleaseExpoConfig' without declaring an explicit or implicit dependency when running `gradlew test` on Android. ([#23511](https://github.com/expo/expo/pull/23511) by [@lukmccall](https://github.com/lukmccall))
### 💡 Others
- Fork `uuid@3.4.0` and move into `expo-modules-core`. Remove the original dependency. ([#23249](https://github.com/expo/expo/pull/23249) by [@alanhughes](https://github.com/alanjhughes))
## 14.4.2 — 2023-06-24
### 💡 Others
- Remove the long-deprecated `Constants.deviceYearClass` and `Constants.platform.ios.model`. These properties now live on `expo-device`. ([#23068](https://github.com/expo/expo/pull/23068) by [@brentvatne](https://github.com/brentvatne))
## 14.4.1 — 2023-06-22
_This version does not introduce any user-facing changes._
## 14.4.0 — 2023-06-13
### 🐛 Bug fixes
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))
## 14.3.0 — 2023-05-08
### 💡 Others
- Warn on use of Constants.manifest. ([#22247](https://github.com/expo/expo/pull/22247) by [@wschurman](https://github.com/wschurman))
## 14.2.1 — 2023-02-09
_This version does not introduce any user-facing changes._
## 14.2.0 — 2023-02-03
### 💡 Others
- On Android bump `compileSdkVersion` and `targetSdkVersion` to `33`. ([#20721](https://github.com/expo/expo/pull/20721) by [@lukmccall](https://github.com/lukmccall))
## 14.1.0 — 2022-12-30
### 🎉 New features
- Migrated Android implementation to Expo Modules API. ([#19974](https://github.com/expo/expo/pull/19974) by [@alanhughes](https://github.com/alanjhughes))
### 🐛 Bug fixes
- Fix the list of platform keys in expo-module.config.json ([#20017](https://github.com/expo/expo/pull/20017) by [@alanjhughes](https://github.com/alanjhughes))
## 14.0.2 — 2022-10-30
_This version does not introduce any user-facing changes._
## 14.0.1 — 2022-10-28
_This version does not introduce any user-facing changes._
## 14.0.0 — 2022-10-06
### 🛠 Breaking changes
- Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. ([#18873](https://github.com/expo/expo/pull/18873) by [@tsapeta](https://github.com/tsapeta))
### 🐛 Bug fixes
- Fixed _with-node.sh_ doesn't keep quotes when passing arguments to Node.js and caused build errors when there are spaces in target name. ([#18741](https://github.com/expo/expo/pull/18741) by [@kudo](https://github.com/kudo))
### 💡 Others
- Refactored inline Android emulator checks to use enhanced checking in `EmulatorUtilities.isRunningOnEmulator()`. ([#16177](https://github.com/expo/expo/pull/16177)) by [@kbrandwijk](https://github.com/kbrandwijk), [@keith-kurak](https://github.com/keith-kurak))
## 13.2.3 — 2022-07-25
### 🐛 Bug fixes
- Deprecated the unreliable `source-login-scripts.sh` and sourcing the Node.js binary path from `.xcode.env` and `.xcode.env.local`. ([#18330](https://github.com/expo/expo/pull/18330) by [@kudo](https://github.com/kudo))
## 13.2.2 — 2022-07-16
_This version does not introduce any user-facing changes._
## 13.2.1 — 2022-07-11
_This version does not introduce any user-facing changes._
## 13.2.0 — 2022-07-07
### 🎉 New features
- Add getter for expo client config. ([#17865](https://github.com/expo/expo/pull/17865) by [@wschurman](https://github.com/wschurman))
### 🐛 Bug fixes
- Improved support of nvm sourcing in iOS shell scripts. ([#17109](https://github.com/expo/expo/pull/17109) by [@liamronancb](https://github.com/liamronancb))
- Fixed `source-login-scripts.sh` ~/zlogin typo. ([#17622](https://github.com/expo/expo/pull/17622) by [@vrgimael](https://github.com/vrgimael))
## 13.1.0 — 2022-04-18
### 🐛 Bug fixes
- Fixed iOS script phase build error when `extendedglob` is enabled in zsh config. ([#17024](https://github.com/expo/expo/pull/17024) by [@kudo](https://github.com/kudo))
### 💡 Others
- Updated `@expo/config` from `6.0.6` to `6.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
### ⚠️ Notices
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
## 13.0.2 - 2022-02-01
### 🐛 Bug fixes
- Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
## 13.0.1 — 2022-01-20
### 🐛 Bug fixes
- Fix the `PhaseScriptExecution` build errors when the `source_login_scripts.sh` failed to load. ([#15890](https://github.com/expo/expo/pull/15890) by [@kudo](https://github.com/kudo))
## 13.0.0 — 2021-12-03
### 🛠 Breaking changes
- Remove deprecated `Constants.deviceId`. ([#15280](https://github.com/expo/expo/pull/15280) by [@Simek](https://github.com/Simek))
- Remove legacy `Constants.linkingUrl` alias. ([#15280](https://github.com/expo/expo/pull/15280) by [@Simek](https://github.com/Simek))
### 💡 Others
- Add missing `null` to the `Constants.buildNumber` type. ([#15280](https://github.com/expo/expo/pull/15280) by [@Simek](https://github.com/Simek))
## 12.2.0 — 2021-11-17
### 🐛 Bug fixes
- Fix NODE_BINARY not found build error when using nvm via zsh ([#14895](https://github.com/expo/expo/pull/14895) by [@filipengberg](https://github.com/filipengberg))
### 💡 Others
- Extract nested objects from current types to new, separate types - `ExpoGoPackagerOpts` and `ManifestExtra`. ([#15113](https://github.com/expo/expo/pull/15113) by [@Simek](https://github.com/Simek))
## 12.1.3 — 2021-10-22
### 🐛 Bug fixes
- Don't include fonts from family "System Font" (introduced by iOS 15) ([#14577](https://github.com/expo/expo/pull/14577) by [@brentvatne](https://github.com/brentvatne))
- Fix `Constants.deviceId has been deprecated in favor of generating and storing your own ID.` warnings in classic react-native projects. ([#14837](https://github.com/expo/expo/pull/14837) by [@kudo](https://github.com/kudo))
## 12.1.2 — 2021-10-21
_This version does not introduce any user-facing changes._
## 12.1.1 — 2021-10-15
### 🛠 Breaking changes
- Deprecated `Constants.deviceYearClass`, moved to `expo-device` - `Device.deviceYearClass` ([#14691](https://github.com/expo/expo/pull/14691) by [@EvanBacon](https://github.com/EvanBacon))
- Deprecated `Constants.platform.ios.model`, moved to `expo-device` - `Device.modelName` ([#14691](https://github.com/expo/expo/pull/14691) by [@EvanBacon](https://github.com/EvanBacon))
### 🎉 New features
- Added support for iOS 15.0 devices ([#14640](https://github.com/expo/expo/pull/14640) by [@EvanBacon](https://github.com/EvanBacon))
## 12.1.0 — 2021-10-01
### 🐛 Bug fixes
- Don't include fonts from family "System Font" (introduced by iOS 15) ([#14577](https://github.com/expo/expo/pull/14577) by [@brentvatne](https://github.com/brentvatne))
## 12.0.0 — 2021-09-28
### 🛠 Breaking changes
- Dropped support for iOS 11.0 ([#14383](https://github.com/expo/expo/pull/14383) by [@cruzach](https://github.com/cruzach))
### 🐛 Bug fixes
- Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))
### 💡 Others
- Rewrite Android code to Kotlin. ([#14434](https://github.com/expo/expo/pull/14434) by [@kkafar](https://github.com/kkafar))
- Updated `@expo/config-plugins` ([#14443](https://github.com/expo/expo/pull/14443) by [@EvanBacon](https://github.com/EvanBacon))
## 11.1.0 — 2021-09-08
### 🎉 New features
- Use stable manifest ID where applicable. ([#12964](https://github.com/expo/expo/pull/12964) by [@wschurman](https://github.com/wschurman))
- Update JS code to read manifest2 when manifest is not available. ([#13602](https://github.com/expo/expo/pull/13602) by [@wschurman](https://github.com/wschurman))
- Update location of EAS projectId in new manifest. ([#13739](https://github.com/expo/expo/pull/13739) by [@wschurman](https://github.com/wschurman))
- Update location of scopeKey in new manifest. ([#13817](https://github.com/expo/expo/pull/13817) by [@wschurman](https://github.com/wschurman))
### 🐛 Bug fixes
- fix `__dir__` absolute path in script_phase making an inconsistent Podfile.lock. ([#13610](https://github.com/expo/expo/pull/13610) by [@kudo](https://github.com/kudo))
- Fix `PROJECT_ROOT` path resolution in `get-app-config-ios.sh`. ([#13439](https://github.com/expo/expo/pull/13439) by [@ajsmth](https://github.com/ajsmth))
- Fix app.config not generated. ([#13667](https://github.com/expo/expo/pull/13667) by [@kudo](https://github.com/kudo))
- Fix build phase error in xcode for nodejs possibly not found in nvm. ([#14047](https://github.com/expo/expo/pull/14047) by [@kudo](https://github.com/kudo))
### ⚠️ Notices
- Modularized expo-constants without further app setup. ([#13424](https://github.com/expo/expo/pull/13424) by [@kudo](https://github.com/kudo))
## 11.0.2 — 2021-09-02
### 💡 Others
- Skip running build scripts during iOS debug builds and add support for `SKIP_BUNDLING`/`FORCE_BUNDLING` environment variables. ([#14116](https://github.com/expo/expo/pull/14116) by [@fson](https://github.com/fson))
## 11.0.1 — 2021-06-22
_This version does not introduce any user-facing changes._
## 11.0.0 — 2021-06-16
### 🛠 Breaking changes
- Add new manifest2 field and make existing field optional. ([#12817](https://github.com/expo/expo/pull/12817) by [@wschurman](https://github.com/wschurman))
- Update `@expo/config` to include `originalFullName` in embedded config manifest. [Related PR on expo-cli](https://github.com/expo/expo-cli/pull/3494).
### 🐛 Bug fixes
- Enable kotlin in all modules. ([#12716](https://github.com/expo/expo/pull/12716) by [@wschurman](https://github.com/wschurman))
- Ensure classic manifest originalFullName is used over id. ([#12955](https://github.com/expo/expo/pull/12955) by [@wschurman](https://github.com/wschurman))
### 💡 Others
- Migrated module interface from `unimodules-constants-interface` to `expo-modules-core`. ([#12876](https://github.com/expo/expo/pull/12876) by [@tsapeta](https://github.com/tsapeta))
- Build Android code using Java 8 to fix Android instrumented test build error. ([#12939](https://github.com/expo/expo/pull/12939) by [@kudo](https://github.com/kudo))
- Inherit env vars in get-app-config-android.gradle. ([#13208](https://github.com/expo/expo/pull/13208) by [@jakub-gonet](https://github.com/jakub-gonet))
## 10.1.3 — 2021-04-13
_This version does not introduce any user-facing changes._
## 10.1.2 — 2021-04-09
### 🛠 Breaking changes
- Remove the `xde` property from `Constants.manifest`. ([#12438](https://github.com/expo/expo/pull/12438) by [@fson](https://github.com/fson))
- Update `@expo/config` to include `currentFullName` in embedded config manifest. [Related PR on expo-cli](https://github.com/expo/expo-cli/pull/3376).
## 10.1.1 — 2021-03-23
### 🎉 New features
- Added new `Constants.__unsafeNoWarnManifest` property that behaves as `Constants.manifest` property, but suppresses warning upon no manifest available. ([#12237](https://github.com/expo/expo/pull/12237) by [@bbarthec](https://github.com/bbarthec))
> Warning: don't use this property, it's introduced for internal use only.
## 10.1.0 — 2021-03-10
### 🎉 New features
- Updated Android build configuration to target Android 11 (added support for Android SDK 30). ([#11647](https://github.com/expo/expo/pull/11647) by [@bbarthec](https://github.com/bbarthec))
- Use `@expo/config-types` package for `ExpoConfig` type. ([#11810](https://github.com/expo/expo/pull/11810) by [@EvanBacon](https://github.com/EvanBacon))
### 🐛 Bug fixes
- Fixed support for Android Gradle plugin 4.1+ ([#11926](https://github.com/expo/expo/pull/11926) by [@esamelson](https://github.com/esamelson))
- Add deprecation messages for previously deprecated Constants fields. ([#11960](https://github.com/expo/expo/pull/11960) by [@ide](https://github.com/ide))
## 10.0.1 — 2021-01-25
_This version does not introduce any user-facing changes._
## 10.0.0 — 2021-01-15
### 🛠 Breaking changes
- Dropped support for iOS 10.0 ([#11344](https://github.com/expo/expo/pull/11344) by [@tsapeta](https://github.com/tsapeta))
### 🎉 New features
- Add support for new Apple devices to `platform.ios.deviceModel`. ([#11446](https://github.com/expo/expo/pull/11446) by [@sjchmiela](https://github.com/sjchmiela))
- Changed `Constants.platform.ios.model` nullability — it can now be `null`, if the value cannot be determined. ([#11445](https://github.com/expo/expo/pull/11445) by [@sjchmiela](https://github.com/sjchmiela))
### 🐛 Bug fixes
- Removed `fbjs` dependency ([#11396](https://github.com/expo/expo/pull/11396) by [@cruzach](https://github.com/cruzach))
- Added support for simulators running on Apple ARM64 processors (previously, constants expected to be exported by native code were unavailable). ([#11445](https://github.com/expo/expo/pull/11445) by [@sjchmiela](https://github.com/sjchmiela))
## 9.3.5 — 2020-12-11
### 🐛 Bug fixes
- Add @expo/config to dependencies
## 9.3.4 — 2020-12-09
### 🐛 Bug fixes
- Fixed an issue where `Constants.manifest` was still undefined in debug Android builds in the bare workflow
## 9.3.3 — 2020-12-02
_This version does not introduce any user-facing changes._
## 9.3.2 — 2020-12-01
### 🐛 Bug fixes
- Fixed the `getAppConfig.js` script to work with the latest version of `@expo/config`.
## 9.3.1 — 2020-11-25
### 🛠 Breaking changes
- Fixed `installationId` being backed up on Android which resulted in multiple devices having the same `installationId`. ([#11005](https://github.com/expo/expo/pull/11005) by [@sjchmiela](https://github.com/sjchmiela))
- Deprecated `.installationId` and `.deviceId` as these properties can be implemented in user space. Instead, implement the installation identifier on your own using `expo-application`'s `.androidId` on Android and a storage API like `expo-secure-store` on iOS and `localStorage` on Web. ([#10997](https://github.com/expo/expo/pull/10997) by [@sjchmiela](https://github.com/sjchmiela))
## 9.3.0 — 2020-11-17
### 🎉 New features
- Added `Constants.executionEnvironment` to distinguish between apps running in a bare, managed standalone, or App/Play Store development client environment. ([#10986](https://github.com/expo/expo/pull/10986) by [@esamelson](https://github.com/esamelson))
- Added script to embed app configuration into a bare app and export this object as `Constants.manifest`. ([#10948](https://github.com/expo/expo/pull/10948) and [#10949](https://github.com/expo/expo/pull/10949) by [@esamelson](https://github.com/esamelson))
- If `manifest` is defined on `expo-updates` then use it instead of `ExponentConstants.manifest` ([#10668](https://github.com/expo/expo/pull/10668) by [@esamelson](https://github.com/esamelson))
- Warn when developer attempts to access empty `Constants.manifest` in bare. Throw error when it is empty in managed. ([#11028](https://github.com/expo/expo/pull/11028) by [@esamelson](https://github.com/esamelson))
- Set `Contants.executionEnvironment` to `ExecutionEnvironment.Bare` on web.
## 9.2.0 — 2020-08-18
_This version does not introduce any user-facing changes._
## 9.1.1 — 2020-05-28
_This version does not introduce any user-facing changes._
## 9.1.0 — 2020-05-27
### 🐛 Bug fixes
- Fixed `uuid`'s deprecation of deep requiring ([#8114](https://github.com/expo/expo/pull/8114) by [@actuallymentor](https://github.com/actuallymentor))

26
node_modules/expo-constants/README.md generated vendored Normal file
View File

@@ -0,0 +1,26 @@
# expo-constants
Provides system information that remains constant throughout the lifetime of your app.
# API documentation
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/constants/)
- [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/constants/)
# Installation in managed Expo projects
For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/constants/).
# Installation in bare React Native projects
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
### Add the package to your npm dependencies
```
npx expo install expo-constants
```
# Contributing
Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).

22
node_modules/expo-constants/android/build.gradle generated vendored Normal file
View File

@@ -0,0 +1,22 @@
plugins {
id 'com.android.library'
id 'expo-module-gradle-plugin'
}
apply from: "../scripts/get-app-config-android.gradle"
group = 'host.exp.exponent'
version = '55.0.7'
expoModule {
// We can't prebuild the module because we need to apply `get-app-config-android.gradle` script.
canBePublished false
}
android {
namespace "expo.modules.constants"
defaultConfig {
versionCode 33
versionName "55.0.7"
}
}

View File

@@ -0,0 +1,3 @@
<manifest>
</manifest>

View File

@@ -0,0 +1,21 @@
// Copyright 2015-present 650 Industries. All rights reserved.
package expo.modules.constants
import expo.modules.interfaces.constants.ConstantsInterface
import expo.modules.kotlin.modules.Module
import expo.modules.kotlin.modules.ModuleDefinition
class ConstantsModule : Module() {
override fun definition() = ModuleDefinition {
Name("ExponentConstants")
Constants {
return@Constants appContext.service<ConstantsInterface>()?.constants ?: emptyMap()
}
AsyncFunction<String?>("getWebViewUserAgentAsync") {
return@AsyncFunction System.getProperty("http.agent")
}
}
}

View File

@@ -0,0 +1,99 @@
package expo.modules.constants
import android.content.Context
import android.os.Build
import android.util.Log
import expo.modules.interfaces.constants.ConstantsInterface
import expo.modules.kotlin.services.ServiceInterface
import java.io.FileNotFoundException
import java.util.UUID
private val TAG = ConstantsService::class.java.simpleName
private const val CONFIG_FILE_NAME = "app.config"
@ServiceInterface(ConstantsInterface::class)
open class ConstantsService(private val context: Context) : ConstantsInterface {
var statusBarHeightInternal = context
.resources
.getIdentifier("status_bar_height", "dimen", "android")
.takeIf { it > 0 }
?.let { (context.resources::getDimensionPixelSize)(it) }
?.let { pixels -> convertPixelsToDp(pixels.toFloat(), context) }
?: 0
private val sessionId = UUID.randomUUID().toString()
enum class ExecutionEnvironment(val string: String) {
BARE("bare"),
STANDALONE("standalone"),
STORE_CLIENT("storeClient")
}
override val constants: Map<String, Any?>
get() = mapOf(
"sessionId" to sessionId,
"executionEnvironment" to ExecutionEnvironment.BARE.string,
"statusBarHeight" to statusBarHeightInternal,
"deviceName" to deviceName,
"systemFonts" to systemFonts,
"systemVersion" to systemVersion,
"manifest" to appConfig,
"platform" to mapOf<String, Map<String, Any>>("android" to emptyMap())
)
// Just use package name in vanilla React Native apps.
override val appScopeKey: String?
get() = context.packageName
override val deviceName: String
get() = Build.MODEL
override val statusBarHeight: Int
get() = statusBarHeightInternal
override val systemVersion: String
get() = Build.VERSION.RELEASE
// From https://github.com/dabit3/react-native-fonts
override val systemFonts: List<String>
get() = listOf(
"normal",
"notoserif",
"sans-serif",
"sans-serif-light",
"sans-serif-thin",
"sans-serif-condensed",
"sans-serif-medium",
"serif",
"Roboto",
"monospace"
)
private val appConfig: String?
get() {
try {
return context
.assets
.open(CONFIG_FILE_NAME)
.use { input ->
input
.bufferedReader(charset = Charsets.UTF_8)
.use { it.readText() }
}
} catch (_: FileNotFoundException) {
// do nothing, expected in managed apps
} catch (e: Exception) {
Log.e(TAG, "Error reading embedded app config", e)
}
return null
}
companion object {
private fun convertPixelsToDp(px: Float, context: Context): Int {
val resources = context.resources
val metrics = resources.displayMetrics
val dp = px / (metrics.densityDpi / 160f)
return dp.toInt()
}
}
}

5
node_modules/expo-constants/build/Constants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { AndroidManifest, AppOwnership, Constants, ExecutionEnvironment, IOSManifest, NativeConstants, PlatformManifest, UserInterfaceIdiom, WebManifest } from './Constants.types';
export { AndroidManifest, AppOwnership, Constants, ExecutionEnvironment, IOSManifest, NativeConstants, PlatformManifest, UserInterfaceIdiom, WebManifest, };
declare const _default: Constants;
export default _default;
//# sourceMappingURL=Constants.d.ts.map

1
node_modules/expo-constants/build/Constants.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACL,eAAe,EACf,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,GACZ,CAAC;wBA0N0B,SAAS;AAArC,wBAAsC"}

189
node_modules/expo-constants/build/Constants.js generated vendored Normal file
View File

@@ -0,0 +1,189 @@
import { CodedError, requireOptionalNativeModule } from 'expo-modules-core';
import { Platform, NativeModules } from 'react-native';
import { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, } from './Constants.types';
import ExponentConstants from './ExponentConstants';
export { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, };
if (!ExponentConstants) {
console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");
}
const ExpoUpdates = requireOptionalNativeModule('ExpoUpdates');
let rawUpdatesManifest = null;
// If expo-updates defines a non-empty manifest, prefer that one
if (ExpoUpdates) {
let updatesManifest;
if (ExpoUpdates.manifest) {
updatesManifest = ExpoUpdates.manifest;
}
else if (ExpoUpdates.manifestString) {
updatesManifest = JSON.parse(ExpoUpdates.manifestString);
}
if (updatesManifest && Object.keys(updatesManifest).length > 0) {
rawUpdatesManifest = updatesManifest;
}
}
// If dev-launcher defines a non-empty manifest, prefer that one
let rawDevLauncherManifest = null;
if (NativeModules.EXDevLauncher) {
let devLauncherManifest;
if (NativeModules.EXDevLauncher.manifestString) {
devLauncherManifest = JSON.parse(NativeModules.EXDevLauncher.manifestString);
}
if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {
rawDevLauncherManifest = devLauncherManifest;
}
}
// Fall back to ExponentConstants.manifest if we don't have one from Updates
let rawAppConfig = null;
if (ExponentConstants && ExponentConstants.manifest) {
const appConfig = ExponentConstants.manifest;
// On Android we pass the manifest in JSON form so this step is necessary
if (typeof appConfig === 'string') {
rawAppConfig = JSON.parse(appConfig);
}
else {
rawAppConfig = appConfig;
}
}
let rawManifest = rawUpdatesManifest ?? rawDevLauncherManifest ?? rawAppConfig;
const { name, appOwnership, ...nativeConstants } = (ExponentConstants || {});
const constants = {
...nativeConstants,
// Ensure this is null in bare workflow
appOwnership: appOwnership ?? null,
};
Object.defineProperties(constants, {
/**
* Use `manifest` property by default.
* This property is only used for internal purposes.
* It behaves similarly to the original one, but suppresses warning upon no manifest available.
* `expo-asset` uses it to prevent users from seeing mentioned warning.
*/
__unsafeNoWarnManifest: {
get() {
const maybeManifest = getManifest(true);
if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: false,
},
__unsafeNoWarnManifest2: {
get() {
const maybeManifest = getManifest(true);
if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: false,
},
manifest: {
get() {
const maybeManifest = getManifest();
if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: true,
},
manifest2: {
get() {
const maybeManifest = getManifest();
if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: true,
},
expoConfig: {
get() {
const maybeManifest = getManifest(true);
if (!maybeManifest) {
return null;
}
// if running an embedded update, maybeManifest is a EmbeddedManifest which doesn't have
// the expo config. Instead, the embedded expo-constants app.config should be used.
if (ExpoUpdates && ExpoUpdates.isEmbeddedLaunch) {
return rawAppConfig;
}
if (isExpoUpdatesManifest(maybeManifest)) {
return maybeManifest.extra?.expoClient ?? null;
}
else if (isEmbeddedManifest(maybeManifest)) {
return maybeManifest;
}
return null;
},
enumerable: true,
},
expoGoConfig: {
get() {
const maybeManifest = getManifest(true);
if (!maybeManifest) {
return null;
}
if (isExpoUpdatesManifest(maybeManifest)) {
return maybeManifest.extra?.expoGo ?? null;
}
else if (isEmbeddedManifest(maybeManifest)) {
return maybeManifest;
}
return null;
},
enumerable: true,
},
easConfig: {
get() {
const maybeManifest = getManifest(true);
if (!maybeManifest) {
return null;
}
if (isExpoUpdatesManifest(maybeManifest)) {
return maybeManifest.extra?.eas ?? null;
}
else if (isEmbeddedManifest(maybeManifest)) {
return maybeManifest;
}
return null;
},
enumerable: true,
},
__rawManifest_TEST: {
get() {
return rawManifest;
},
set(value) {
rawManifest = value;
},
enumerable: false,
},
});
function isEmbeddedManifest(manifest) {
return !isExpoUpdatesManifest(manifest);
}
function isExpoUpdatesManifest(manifest) {
return 'metadata' in manifest;
}
function getManifest(suppressWarning = false) {
if (!rawManifest) {
const invalidManifestType = rawManifest === null ? 'null' : 'undefined';
if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare &&
Platform.OS !== 'web') {
if (!suppressWarning) {
console.warn(`Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.`);
}
}
else if (nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient ||
nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone) {
// If we somehow get here, this is a truly exceptional state to be in.
// Constants.manifest should *always* be defined in those contexts.
throw new CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE', `Constants.manifest is ${invalidManifestType}, must be an object.`);
}
}
return rawManifest;
}
export default constants;
//# sourceMappingURL=Constants.js.map

1
node_modules/expo-constants/build/Constants.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
import { AndroidManifest, AppOwnership, Constants, ExecutionEnvironment, IOSManifest, NativeConstants, PlatformManifest, UserInterfaceIdiom, WebManifest } from './Constants.types';
export { AndroidManifest, AppOwnership, Constants, ExecutionEnvironment, IOSManifest, NativeConstants, PlatformManifest, UserInterfaceIdiom, WebManifest, };
declare const _default: Constants;
export default _default;
//# sourceMappingURL=Constants.server.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Constants.server.d.ts","sourceRoot":"","sources":["../src/Constants.server.ts"],"names":[],"mappings":"AASA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACL,eAAe,EACf,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,GACZ,CAAC;wBA2D0B,SAAS;AAArC,wBAAsC"}

50
node_modules/expo-constants/build/Constants.server.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
import { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, } from './Constants.types';
import ExponentConstants from './ExponentConstants.web.js';
export { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, };
const PARSED_MANIFEST = (() => {
if (typeof ExponentConstants?.manifest === 'string') {
return JSON.parse(ExponentConstants.manifest);
}
return ExponentConstants?.manifest;
})();
const constants = ExponentConstants;
Object.defineProperties(constants, {
/**
* Use `manifest` property by default.
* This property is only used for internal purposes.
* It behaves similarly to the original one, but suppresses warning upon no manifest available.
* `expo-asset` uses it to prevent users from seeing mentioned warning.
*/
__unsafeNoWarnManifest: {
get() {
return PARSED_MANIFEST;
},
enumerable: false,
},
manifest: {
get() {
return PARSED_MANIFEST;
},
enumerable: true,
},
expoConfig: {
get() {
return PARSED_MANIFEST;
},
enumerable: true,
},
expoGoConfig: {
get() {
return PARSED_MANIFEST;
},
enumerable: true,
},
easConfig: {
get() {
return PARSED_MANIFEST;
},
enumerable: true,
},
});
export default constants;
//# sourceMappingURL=Constants.server.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Constants.server.js","sourceRoot":"","sources":["../src/Constants.server.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,YAAY,EAEZ,oBAAoB,EAIpB,kBAAkB,GAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,iBAAiB,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAEL,YAAY,EAEZ,oBAAoB,EAIpB,kBAAkB,GAEnB,CAAC;AAIF,MAAM,eAAe,GAAgB,CAAC,GAAG,EAAE;IACzC,IAAI,OAAO,iBAAiB,EAAE,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,iBAAiB,EAAE,QAAe,CAAC;AAC5C,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,SAAS,GAAc,iBAAiB,CAAC;AAE/C,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE;IACjC;;;;;OAKG;IACH,sBAAsB,EAAE;QACtB,GAAG;YACD,OAAO,eAAsB,CAAC;QAChC,CAAC;QACD,UAAU,EAAE,KAAK;KAClB;IACD,QAAQ,EAAE;QACR,GAAG;YACD,OAAO,eAAsB,CAAC;QAChC,CAAC;QACD,UAAU,EAAE,IAAI;KACjB;IACD,UAAU,EAAE;QACV,GAAG;YAQD,OAAO,eAAsB,CAAC;QAChC,CAAC;QACD,UAAU,EAAE,IAAI;KACjB;IACD,YAAY,EAAE;QACZ,GAAG;YACD,OAAO,eAAsB,CAAC;QAChC,CAAC;QACD,UAAU,EAAE,IAAI;KACjB;IACD,SAAS,EAAE;QACT,GAAG;YACD,OAAO,eAAsB,CAAC;QAChC,CAAC;QACD,UAAU,EAAE,IAAI;KACjB;CACF,CAAC,CAAC;AAEH,eAAe,SAAsB,CAAC","sourcesContent":["import type { ExpoConfig } from 'expo/config';\nimport type {\n EmbeddedManifest,\n EASConfig,\n ExpoGoConfig,\n ExpoUpdatesManifest,\n} from 'expo-manifests';\nimport type { Manifest as UpdatesManifest } from 'expo-updates';\n\nimport {\n AndroidManifest,\n AppOwnership,\n Constants,\n ExecutionEnvironment,\n IOSManifest,\n NativeConstants,\n PlatformManifest,\n UserInterfaceIdiom,\n WebManifest,\n} from './Constants.types';\nimport ExponentConstants from './ExponentConstants.web.js';\ntype DevLauncherManifest = ExpoUpdatesManifest;\n\nexport {\n AndroidManifest,\n AppOwnership,\n Constants,\n ExecutionEnvironment,\n IOSManifest,\n NativeConstants,\n PlatformManifest,\n UserInterfaceIdiom,\n WebManifest,\n};\n\ntype RawManifest = UpdatesManifest | DevLauncherManifest | ExpoConfig;\n\nconst PARSED_MANIFEST: RawManifest = (() => {\n if (typeof ExponentConstants?.manifest === 'string') {\n return JSON.parse(ExponentConstants.manifest);\n }\n return ExponentConstants?.manifest as any;\n})();\n\nconst constants: Constants = ExponentConstants;\n\nObject.defineProperties(constants, {\n /**\n * Use `manifest` property by default.\n * This property is only used for internal purposes.\n * It behaves similarly to the original one, but suppresses warning upon no manifest available.\n * `expo-asset` uses it to prevent users from seeing mentioned warning.\n */\n __unsafeNoWarnManifest: {\n get(): EmbeddedManifest | null {\n return PARSED_MANIFEST as any;\n },\n enumerable: false,\n },\n manifest: {\n get(): EmbeddedManifest | null {\n return PARSED_MANIFEST as any;\n },\n enumerable: true,\n },\n expoConfig: {\n get():\n | (ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n })\n | null {\n return PARSED_MANIFEST as any;\n },\n enumerable: true,\n },\n expoGoConfig: {\n get(): ExpoGoConfig | null {\n return PARSED_MANIFEST as any;\n },\n enumerable: true,\n },\n easConfig: {\n get(): EASConfig | null {\n return PARSED_MANIFEST as any;\n },\n enumerable: true,\n },\n});\n\nexport default constants as Constants;\n"]}

231
node_modules/expo-constants/build/Constants.types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,231 @@
import type { ExpoConfig } from 'expo/config';
import type { EASConfig as ManifestsEASConfig, ExpoGoConfig as ManifestsExpoGoConfig, ExpoUpdatesManifest, EmbeddedManifest, ManifestAsset as ManifestAssetForReExport, ManifestExtra as ManifestExtraForReExport, ClientScopingConfig as ClientScopingConfigForReExport, ExpoGoPackagerOpts as ExpoGoPackagerOptsForReExport } from 'expo-manifests';
export declare enum AppOwnership {
/**
* The experience is running inside the Expo Go app.
* @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
*/
Expo = "expo"
}
/**
* Identifies where the app's JavaScript bundle is currently running.
*/
export declare enum ExecutionEnvironment {
/** A project that includes native project directories that you maintain directly in your
* [existing (bare) React Native app](https://docs.expo.dev/bare/overview/).
*/
Bare = "bare",
/** Production/release build created with or without EAS Build. */
Standalone = "standalone",
/** Expo Go or a development build built with `expo-dev-client`. */
StoreClient = "storeClient"
}
/**
* Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up
* as `unsupported`.
*/
export declare enum UserInterfaceIdiom {
Handset = "handset",
Tablet = "tablet",
Desktop = "desktop",
TV = "tv",
Unsupported = "unsupported"
}
/**
* @platform ios
*/
export type IOSManifest = {
/**
* The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.
* In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This
* may differ from the value in `Constants.expoConfig.ios.buildNumber` because the manifest
* can be updated, whereas this value will never change for a given native binary.
* The value is set to `null` in case you run your app in Expo Go.
*/
buildNumber: string | null;
/**
* The Apple internal model identifier for this device.
* @example
* `iPhone1,1`
* @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).
*/
platform: string;
/**
* The human-readable model name of this device. For example, `"iPhone 7 Plus"` if it can be determined,
* otherwise will be `null`.
* @deprecated Moved to `expo-device` as [`Device.modelName`](./device/#devicemodelname).
*/
model: string | null;
/**
* The user interface idiom of the current device, such as whether the app is running on an iPhone, iPad, Mac or Apple TV.
* @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).
*/
userInterfaceIdiom: UserInterfaceIdiom;
/**
* The version of iOS running on this device.
* @example
* `10.3`
* @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).
*/
systemVersion: string;
} & Record<string, any>;
/**
* @platform android
*/
export type AndroidManifest = {
/**
* The version code set by `android.versionCode` in app.json.
* The value is set to `null` in case you run your app in Expo Go.
* @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).
*/
versionCode: number;
} & Record<string, any>;
/**
* @platform web
*/
export type WebManifest = Record<string, any>;
export type ManifestAsset = ManifestAssetForReExport;
export type Manifest = ExpoUpdatesManifest;
export type ManifestExtra = ManifestExtraForReExport;
export type EASConfig = ManifestsEASConfig;
export type ClientScopingConfig = ClientScopingConfigForReExport;
export type ExpoGoConfig = ManifestsExpoGoConfig;
export type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;
export type PlatformManifest = {
ios?: IOSManifest;
android?: AndroidManifest;
web?: WebManifest;
detach?: {
scheme?: string;
[key: string]: any;
};
scheme?: string;
hostUri?: string;
developer?: string;
} & Record<string, any>;
export type NativeConstants = {
/**
* @hidden
*/
name: 'ExponentConstants';
/**
* Returns `expo` when running in Expo Go, otherwise `null`.
* @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
*/
appOwnership: AppOwnership | null;
/**
* Returns `true` when the app is running in debug mode (`__DEV__`). Otherwise, returns `false`.
*/
debugMode: boolean;
/**
* A human-readable name for the device type.
*/
deviceName?: string;
/**
* The [device year class](https://github.com/facebook/device-year-class) of this device.
* @deprecated Moved to `expo-device` as [`Device.deviceYearClass`](./device/#deviceyearclass).
*/
deviceYearClass: number | null;
/**
* Returns the current execution environment.
*/
executionEnvironment: ExecutionEnvironment;
experienceUrl: string;
/**
* Nullable only on the web.
*/
expoRuntimeVersion: string | null;
/**
* The version string of the Expo Go app currently running.
* Returns `null` in bare workflow and web.
*/
expoVersion: string | null;
isDetached?: boolean;
intentUri?: string;
/**
* Returns `true` if the app is running in headless mode. Otherwise, returns `false`.
*/
isHeadless: boolean;
linkingUri: string;
/**
* @hidden
* Manifest embedded in the build. Returns `null` when `manifest2` is non-null.
* @deprecated Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build
* and EAS Update.
*/
manifest: EmbeddedManifest | null;
/**
* Manifest for Expo apps using modern Expo Updates from a remote source, such as apps that
* use EAS Update. `Constants.expoConfig` should be used for accessing the Expo config object.
*/
manifest2: ExpoUpdatesManifest | null;
/**
* The standard Expo config object defined in **app.json** and **app.config.js** files. For both
* classic and modern manifests, whether they are embedded or remote.
*/
expoConfig: (ExpoConfig & {
/**
* Only present during development using @expo/cli.
*/
hostUri?: string;
}) | null;
/**
* The standard Expo Go config object populated when running in Expo Go.
*/
expoGoConfig: ManifestsExpoGoConfig | null;
/**
* The standard EAS config object populated when using EAS.
*/
easConfig: ManifestsEASConfig | null;
/**
* A string that is unique to the current session of your app. It is different across apps and
* across multiple launches of the same app.
*/
sessionId: string;
/**
* The default status bar height for the device. Does not factor in changes when location tracking
* is in use or a phone call is active.
*/
statusBarHeight: number;
/**
* A list of the system font names available on the current device.
*/
systemFonts: string[];
systemVersion?: number;
/**
* @hidden
*/
supportedExpoSdks?: string[];
/**
* Returns the specific platform manifest object.
*
* > **Note**: This is distinct from the `manifest` and `manifest2`.
*/
platform?: PlatformManifest;
/**
* Gets the user agent string which would be included in requests sent by a web view running on
* this device. This is probably not the same user agent you might be providing in your JS `fetch`
* requests.
*/
getWebViewUserAgentAsync: () => Promise<string | null>;
} & Record<string, any>;
/**
* @hidden
*/
export type Constants = NativeConstants & {
/**
* > **Warning**: Do not use this property. Use `manifest` by default.
*
* In certain cases accessing manifest via this property
* suppresses important warning about missing manifest.
*/
__unsafeNoWarnManifest?: EmbeddedManifest;
/**
* > **Warning**: Do not use this property. Use `manifest2` by default.
*
* In certain cases accessing manifest via this property
* suppresses important warning about missing manifest.
*/
__unsafeNoWarnManifest2?: ExpoUpdatesManifest;
};
//# sourceMappingURL=Constants.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Constants.types.d.ts","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EACV,SAAS,IAAI,kBAAkB,EAC/B,YAAY,IAAI,qBAAqB,EACrC,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,IAAI,wBAAwB,EACzC,aAAa,IAAI,wBAAwB,EACzC,mBAAmB,IAAI,8BAA8B,EACrD,kBAAkB,IAAI,6BAA6B,EAEpD,MAAM,gBAAgB,CAAC;AAExB,oBAAY,YAAY;IACtB;;;OAGG;IACH,IAAI,SAAS;CACd;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,IAAI,SAAS;IACb,kEAAkE;IAClE,UAAU,eAAe;IACzB,mEAAmE;IACnE,WAAW,gBAAgB;CAC5B;AAGD;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,EAAE,OAAO;IACT,WAAW,gBAAgB;CAC5B;AAGD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;OAGG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;IACvC;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAGxB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAI9C,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAAC;AACrD,MAAM,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AAC3C,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAAC;AACrD,MAAM,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC;AACjD,MAAM,MAAM,kBAAkB,GAAG,6BAA6B,CAAC;AAG/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAGxB,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACtC;;;OAGG;IACH,UAAU,EACN,CAAC,UAAU,GAAG;QACZ;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC,GACF,IAAI,CAAC;IACT;;OAEG;IACH,YAAY,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC3C;;OAEG;IACH,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;;OAIG;IACH,wBAAwB,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACxD,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG;IACxC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;IAC1C;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,mBAAmB,CAAC;CAC/C,CAAC"}

36
node_modules/expo-constants/build/Constants.types.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
export var AppOwnership;
(function (AppOwnership) {
/**
* The experience is running inside the Expo Go app.
* @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
*/
AppOwnership["Expo"] = "expo";
})(AppOwnership || (AppOwnership = {}));
/**
* Identifies where the app's JavaScript bundle is currently running.
*/
export var ExecutionEnvironment;
(function (ExecutionEnvironment) {
/** A project that includes native project directories that you maintain directly in your
* [existing (bare) React Native app](https://docs.expo.dev/bare/overview/).
*/
ExecutionEnvironment["Bare"] = "bare";
/** Production/release build created with or without EAS Build. */
ExecutionEnvironment["Standalone"] = "standalone";
/** Expo Go or a development build built with `expo-dev-client`. */
ExecutionEnvironment["StoreClient"] = "storeClient";
})(ExecutionEnvironment || (ExecutionEnvironment = {}));
// @needsAudit
/**
* Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up
* as `unsupported`.
*/
export var UserInterfaceIdiom;
(function (UserInterfaceIdiom) {
UserInterfaceIdiom["Handset"] = "handset";
UserInterfaceIdiom["Tablet"] = "tablet";
UserInterfaceIdiom["Desktop"] = "desktop";
UserInterfaceIdiom["TV"] = "tv";
UserInterfaceIdiom["Unsupported"] = "unsupported";
})(UserInterfaceIdiom || (UserInterfaceIdiom = {}));
//# sourceMappingURL=Constants.types.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
declare const _default: any;
export default _default;
//# sourceMappingURL=ExponentConstants.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExponentConstants.d.ts","sourceRoot":"","sources":["../src/ExponentConstants.ts"],"names":[],"mappings":";AAEA,wBAAgE"}

View File

@@ -0,0 +1,3 @@
import { requireOptionalNativeModule } from 'expo-modules-core';
export default requireOptionalNativeModule('ExponentConstants');
//# sourceMappingURL=ExponentConstants.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExponentConstants.js","sourceRoot":"","sources":["../src/ExponentConstants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,eAAe,2BAA2B,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["import { requireOptionalNativeModule } from 'expo-modules-core';\n\nexport default requireOptionalNativeModule('ExponentConstants');\n"]}

View File

@@ -0,0 +1,4 @@
import { NativeConstants } from './Constants.types';
declare const _default: NativeConstants;
export default _default;
//# sourceMappingURL=ExponentConstants.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExponentConstants.web.d.ts","sourceRoot":"","sources":["../src/ExponentConstants.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,eAAe,EAAe,MAAM,mBAAmB,CAAC;wBAsGlF,eAAe;AAtEpB,wBAsEqB"}

View File

@@ -0,0 +1,103 @@
import { ExecutionEnvironment } from './Constants.types';
const _sessionId = (Date.now() + '-' + Math.floor(Math.random() * 1000000000)).toString();
function getBrowserName() {
if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string') {
const agent = navigator.userAgent.toLowerCase();
if (agent.includes('edge')) {
return 'Edge';
}
else if (agent.includes('edg')) {
return 'Chromium Edge';
}
else if (agent.includes('opr') && 'opr' in window && !!window['opr']) {
return 'Opera';
}
else if (agent.includes('chrome') && 'chrome' in window && !!window['chrome']) {
return 'Chrome';
}
else if (agent.includes('trident')) {
return 'IE';
}
else if (agent.includes('firefox')) {
return 'Firefox';
}
else if (agent.includes('safari')) {
return 'Safari';
}
}
return undefined;
}
export default {
get appOwnership() {
return null;
},
get executionEnvironment() {
return ExecutionEnvironment.Bare;
},
get sessionId() {
return _sessionId;
},
get isHeadless() {
if (typeof navigator === 'undefined')
return true;
return /\bHeadlessChrome\//.test(navigator.userAgent);
},
get expoVersion() {
return this.manifest.sdkVersion || null;
},
get linkingUri() {
if (typeof location !== 'undefined') {
// On native this is `exp://`
// On web we should use the protocol and hostname (location.origin)
return location.origin;
}
else {
return '';
}
},
get expoRuntimeVersion() {
return this.expoVersion;
},
get deviceName() {
return getBrowserName();
},
get systemFonts() {
// TODO: Bacon: Maybe possible.
return [];
},
get statusBarHeight() {
return 0;
},
get deviceYearClass() {
// TODO: Bacon: The android version isn't very accurate either, maybe we could try and guess this value.
return null;
},
get manifest() {
// This is defined by @expo/webpack-config or babel-preset-expo.
// If your site is bundled with a different config then you may not have access to the app.json automatically.
return process.env.APP_MANIFEST || {};
},
get manifest2() {
return null;
},
get experienceUrl() {
if (typeof location !== 'undefined') {
return location.origin;
}
else {
return '';
}
},
get debugMode() {
return __DEV__;
},
async getWebViewUserAgentAsync() {
if (typeof navigator !== 'undefined') {
return navigator.userAgent;
}
else {
return null;
}
},
};
//# sourceMappingURL=ExponentConstants.web.js.map

File diff suppressed because one or more lines are too long

10
node_modules/expo-constants/expo-module.config.json generated vendored Normal file
View File

@@ -0,0 +1,10 @@
{
"platforms": ["apple", "android", "web"],
"apple": {
"modules": ["ConstantsModule"]
},
"android": {
"modules": ["expo.modules.constants.ConstantsModule"],
"services": ["expo.modules.constants.ConstantsService"]
}
}

25
node_modules/expo-constants/ios/ConstantsModule.swift generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import ExpoModulesCore
#if !os(tvOS)
import WebKit
#endif
public class ConstantsModule: Module {
private lazy var constants = appContext?.constants?.constants() as? [String: Any] ?? [:]
public func definition() -> ModuleDefinition {
Name("ExponentConstants")
Constants {
return constants
}
AsyncFunction("getWebViewUserAgentAsync") { () -> String? in
#if os(tvOS)
return nil
#else
let webView = WKWebView()
return webView.value(forKey: "userAgent") as? String
#endif
}.runOnQueue(.main)
}
}

57
node_modules/expo-constants/ios/EXConstants.podspec generated vendored Normal file
View File

@@ -0,0 +1,57 @@
require 'json'
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
Pod::Spec.new do |s|
s.name = 'EXConstants'
s.version = package['version']
s.summary = package['description']
s.description = package['description']
s.license = package['license']
s.author = package['author']
s.homepage = package['homepage']
s.platforms = {
:ios => '15.1',
:osx => '11.0',
:tvos => '15.1'
}
s.swift_version = '5.9'
s.source = { git: 'https://github.com/expo/expo.git' }
s.static_framework = true
s.dependency 'ExpoModulesCore'
# Swift/Objective-C compatibility
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}
if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
s.source_files = "**/*.h"
s.vendored_frameworks = "#{s.name}.xcframework"
else
s.source_files = "**/*.{h,m,swift}"
end
env_vars = ENV['PROJECT_ROOT'] ? "PROJECT_ROOT=#{ENV['PROJECT_ROOT']} " : ""
script_phase = {
:name => 'Generate app.config for prebuilt Constants.manifest',
:script => "bash -l -c \"#{env_vars}$PODS_TARGET_SRCROOT/../scripts/get-app-config-ios.sh\"",
:execution_position => :before_compile
}
# :always_out_of_date is only available in CocoaPods 1.13.0 and later
if Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.13.0')
# always run the script without warning
script_phase[:always_out_of_date] = "1"
end
s.script_phase = script_phase
# Generate EXConstants.bundle without existing resources
# `get-app-config-ios.sh` will generate app.config in EXConstants.bundle
s.resource_bundles = {
'EXConstants' => [],
'ExpoConstants_privacy' => ['PrivacyInfo.xcprivacy']
}
end

View File

@@ -0,0 +1,14 @@
// Copyright 2015-present 650 Industries. All rights reserved.
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface EXConstantsInstallationIdProvider : NSObject
- (nullable NSString *)getInstallationId;
- (NSString *)getOrCreateInstallationId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,108 @@
// Copyright 2015-present 650 Industries. All rights reserved.
#import <EXConstants/EXConstantsInstallationIdProvider.h>
static NSString * const kEXDeviceInstallationUUIDKey = @"EXDeviceInstallationUUIDKey";
static NSString * const kEXDeviceInstallationUUIDLegacyKey = @"EXDeviceInstallUUIDKey";
@implementation EXConstantsInstallationIdProvider
- (NSString *)getOrCreateInstallationId
{
#if TARGET_OS_IOS || TARGET_OS_TV
NSString *installationId = [self getInstallationId];
if (installationId) {
return installationId;
}
installationId = [[NSUUID UUID] UUIDString];
[self setInstallationId:installationId error:NULL];
return installationId;
#elif TARGET_OS_OSX
return nil;
#endif
}
- (nullable NSString *)getInstallationId
{
NSString *installationId;
CFTypeRef keychainResult = NULL;
if (SecItemCopyMatching((__bridge CFDictionaryRef)[self installationIdGetQuery], &keychainResult) == noErr) {
NSData *result = (__bridge_transfer NSData *)keychainResult;
NSString *value = [[NSString alloc] initWithData:result
encoding:NSUTF8StringEncoding];
// `initWithUUIDString` returns nil if string is not a valid UUID
if ([[NSUUID alloc] initWithUUIDString:value]) {
installationId = value;
}
}
if (installationId) {
return installationId;
}
// Uses required reason API based on the following reason: CA92.1
NSString *legacyUUID = [[NSUserDefaults standardUserDefaults] stringForKey:kEXDeviceInstallationUUIDLegacyKey];
if (legacyUUID) {
installationId = legacyUUID;
NSError *error = nil;
if ([self setInstallationId:installationId error:&error]) {
// We only remove the value from old storage once it's set and saved in the new storage.
[[NSUserDefaults standardUserDefaults] removeObjectForKey:kEXDeviceInstallationUUIDLegacyKey];
} else {
NSLog(@"Could not migrate device installation UUID from legacy storage: %@", error.description);
}
}
return installationId;
}
- (BOOL)setInstallationId:(NSString *)installationId error:(NSError **)error
{
// Delete existing UUID so we don't need to handle "duplicate item" error
SecItemDelete((__bridge CFDictionaryRef)[self installationIdSearchQuery]);
OSStatus status = SecItemAdd((__bridge CFDictionaryRef)[self installationIdSetQuery:installationId], NULL);
if (status != errSecSuccess && error) {
*error = [NSError errorWithDomain:NSOSStatusErrorDomain code:status userInfo:nil];
}
return status == errSecSuccess;
}
# pragma mark - Keychain dictionaries
- (NSDictionary *)installationIdSearchQueryMerging:(NSDictionary *)dictionaryToMerge
{
NSData *encodedKey = [kEXDeviceInstallationUUIDKey dataUsingEncoding:NSUTF8StringEncoding];
NSMutableDictionary *query = [NSMutableDictionary dictionaryWithDictionary:@{
(__bridge id)kSecClass:(__bridge id)kSecClassGenericPassword,
(__bridge id)kSecAttrService:[NSBundle mainBundle].bundleIdentifier,
(__bridge id)kSecAttrGeneric:encodedKey,
(__bridge id)kSecAttrAccount:encodedKey
}];
[query addEntriesFromDictionary:dictionaryToMerge];
return query;
}
- (NSDictionary *)installationIdSearchQuery
{
return [self installationIdSearchQueryMerging:@{}];
}
- (NSDictionary *)installationIdGetQuery
{
return [self installationIdSearchQueryMerging:@{
(__bridge id)kSecMatchLimit:(__bridge id)kSecMatchLimitOne,
(__bridge id)kSecReturnData:(__bridge id)kCFBooleanTrue
}];
}
- (NSDictionary *)installationIdSetQuery:(NSString *)deviceInstallationUUID
{
return [self installationIdSearchQueryMerging:@{
(__bridge id)kSecValueData:[deviceInstallationUUID dataUsingEncoding:NSUTF8StringEncoding],
(__bridge id)kSecAttrAccessible:(__bridge id)kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly
}];
}
@end

23
node_modules/expo-constants/ios/EXConstantsService.h generated vendored Normal file
View File

@@ -0,0 +1,23 @@
// Copyright 2015-present 650 Industries. All rights reserved.
#import <Foundation/Foundation.h>
#import <ExpoModulesCore/EXInternalModule.h>
#import <ExpoModulesCore/EXConstantsInterface.h>
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXPORT NSString * const EXConstantsExecutionEnvironmentBare;
FOUNDATION_EXPORT NSString * const EXConstantsExecutionEnvironmentStoreClient;
@interface EXConstantsService : NSObject <EXInternalModule, EXConstantsInterface>
- (NSString *)buildVersion;
- (CGFloat)statusBarHeight;
- (NSArray<NSString *> *)systemFontNames;
+ (NSNumber *)deviceYear;
+ (NSString *)deviceName;
@end
NS_ASSUME_NONNULL_END

132
node_modules/expo-constants/ios/EXConstantsService.m generated vendored Normal file
View File

@@ -0,0 +1,132 @@
// Copyright 2015-present 650 Industries. All rights reserved.
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
#import <ExpoModulesCore/EXUtilities.h>
#import <EXConstants/EXConstantsService.h>
#import <EXConstants/EXConstantsInstallationIdProvider.h>
NSString * const EXConstantsExecutionEnvironmentBare = @"bare";
NSString * const EXConstantsExecutionEnvironmentStoreClient = @"storeClient";
@interface EXConstantsService ()
@property (nonatomic, strong) NSString *sessionId;
@end
@implementation EXConstantsService
EX_REGISTER_MODULE();
+ (const NSArray<Protocol *> *)exportedInterfaces
{
return @[@protocol(EXConstantsInterface)];
}
- (NSDictionary *)constants
{
if (!_sessionId) {
_sessionId = [[NSUUID UUID] UUIDString];
}
BOOL isDebugXCodeScheme = NO;
#if DEBUG
isDebugXCodeScheme = YES;
#endif
return @{
@"sessionId": _sessionId,
@"executionEnvironment": EXConstantsExecutionEnvironmentBare,
@"statusBarHeight": @([self statusBarHeight]),
@"deviceName": [[self class] deviceName],
@"systemFonts": [self systemFontNames],
@"debugMode": @(isDebugXCodeScheme),
@"isHeadless": @(NO),
@"manifest": EXNullIfNil([[self class] appConfig]), // Deprecated, but still used internally.
@"platform": @{
@"ios": @{
@"buildNumber": EXNullIfNil([self buildVersion]),
},
},
};
}
- (NSString *)buildVersion
{
return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
}
- (CGFloat)statusBarHeight
{
#if TARGET_OS_IOS
__block CGSize statusBarSize;
[EXUtilities performSynchronouslyOnMainThread:^{
statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
}];
return MIN(statusBarSize.width, statusBarSize.height);
#elif TARGET_OS_OSX || TARGET_OS_TV
return 0;
#endif
}
- (NSArray<NSString *> *)systemFontNames
{
#if TARGET_OS_IOS || TARGET_OS_TV
NSArray<NSString *> *familyNames = [UIFont familyNames];
NSMutableArray<NSString *> *fontNames = [NSMutableArray array];
for (NSString *familyName in familyNames) {
// "System Font" is added to [UIFont familyNames] in iOS 15, and the font names that
// correspond with it are dot prefixed .SFUI-* fonts which log the following warning
// when passed in to [UIFont fontNamesForFamilyName:name]:
// CoreText note: Client requested name .SFUI-HeavyItalic, it will get TimesNewRomanPSMT rather than the intended font.
// All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:]
//
if (![familyName isEqualToString:@"System Font"]) {
[fontNames addObject:familyName];
[fontNames addObjectsFromArray:[UIFont fontNamesForFamilyName:familyName]];
}
}
// Remove duplicates and sort alphabetically
return [[[NSSet setWithArray:fontNames] allObjects] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
#elif TARGET_OS_OSX
return [[NSFontManager sharedFontManager] availableFontFamilies];
#endif
}
# pragma mark - device info
+ (NSString *)deviceName
{
#if TARGET_OS_IOS || TARGET_OS_TV
return [UIDevice currentDevice].name;
#elif TARGET_OS_OSX
return [NSHost currentHost].localizedName;
#endif
}
+ (NSDictionary *)appConfig
{
NSBundle *frameworkBundle = [NSBundle bundleForClass:[EXConstantsService class]];
NSURL *bundleUrl = [frameworkBundle.resourceURL URLByAppendingPathComponent:@"EXConstants.bundle"];
NSBundle *bundle = [NSBundle bundleWithURL:bundleUrl];
NSString *path = [bundle pathForResource:@"app" ofType:@"config"];
if (path) {
NSData *configData = [NSData dataWithContentsOfFile:path];
if (configData) {
NSError *error;
NSDictionary *configObject = [NSJSONSerialization JSONObjectWithData:configData options:kNilOptions error:&error];
if (!configObject || ![configObject isKindOfClass:[NSDictionary class]]) {
NSLog(@"Error reading embedded app config: %@", error.localizedDescription ?: @"config is not an object");
return nil;
}
return configObject;
}
}
return nil;
}
@end

24
node_modules/expo-constants/ios/PrivacyInfo.xcprivacy generated vendored Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
</array>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>

1
node_modules/expo-constants/jest-rsc.config.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = require('jest-expo/rsc/jest-preset');

57
node_modules/expo-constants/package.json generated vendored Normal file
View File

@@ -0,0 +1,57 @@
{
"name": "expo-constants",
"version": "55.0.7",
"description": "Provides system information that remains constant throughout the lifetime of your app.",
"main": "build/Constants.js",
"types": "build/Constants.d.ts",
"sideEffects": false,
"exports": {
"./package.json": "./package.json",
".": {
"types": "./build/Constants.d.ts",
"react-server": "./build/Constants.server.js",
"default": "./build/Constants.js"
}
},
"scripts": {
"build": "expo-module build",
"clean": "expo-module clean",
"lint": "expo-module lint",
"test": "expo-module test",
"test:rsc": "jest --config jest-rsc.config.js",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"expo-module": "expo-module"
},
"keywords": [
"react-native",
"expo",
"constants"
],
"repository": {
"type": "git",
"url": "https://github.com/expo/expo.git",
"directory": "packages/expo-constants"
},
"bugs": {
"url": "https://github.com/expo/expo/issues"
},
"author": "650 Industries, Inc.",
"license": "MIT",
"homepage": "https://docs.expo.dev/versions/latest/sdk/constants/",
"jest": {
"preset": "expo-module-scripts"
},
"dependencies": {
"@expo/config": "~55.0.8",
"@expo/env": "~2.1.1"
},
"devDependencies": {
"expo-module-scripts": "^55.0.2"
},
"peerDependencies": {
"expo": "*",
"react-native": "*"
},
"gitHead": "b183e5cbd95eb6ee54a878291c7077d8d63e4850"
}

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,29 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const config_1 = require("@expo/config");
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const possibleProjectRoot = process.argv[2];
const destinationDir = process.argv[3];
// TODO: Verify we can remove projectRoot validation, now that we no longer
// support React Native <= 62
let projectRoot;
if (fs_1.default.existsSync(path_1.default.join(possibleProjectRoot, 'package.json'))) {
projectRoot = possibleProjectRoot;
}
else if (fs_1.default.existsSync(path_1.default.join(possibleProjectRoot, '..', 'package.json'))) {
projectRoot = path_1.default.resolve(possibleProjectRoot, '..');
}
else {
throw new Error(`Unable to locate project (no package.json found) at path: ${possibleProjectRoot}`);
}
require('@expo/env').load(projectRoot);
process.chdir(projectRoot);
const { exp } = (0, config_1.getConfig)(projectRoot, {
isPublicConfig: true,
skipSDKVersionRequirement: true,
});
fs_1.default.writeFileSync(path_1.default.join(destinationDir, 'app.config'), JSON.stringify(exp));

View File

@@ -0,0 +1,49 @@
// Gradle script for generating serialized public app config (from app.config.js/ts or app.json) and bundling it into the APK
import org.apache.tools.ant.taskdefs.condition.Os
def expoConstantsDir = project.providers.exec {
workingDir(projectDir)
commandLine("node", "-e", "console.log(require('path').dirname(require.resolve('expo-constants/package.json')));")
}.standardOutput.asText.get().trim()
def config = project.hasProperty("react") ? project.react : [];
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"]
afterEvaluate {
def expoGradleExtension = gradle.extensions.findByName("expoGradle")
def customProjectRoot = expoGradleExtension?.projectRoot
def projectRoot = file("${customProjectRoot ?: rootProject.projectDir}")
def assetsDir = file("$buildDir/generated/assets/expo-constants")
def currentCreateConfigTask = tasks.register('createExpoConfig', Exec) {
description = 'expo-constants: Create app.config.'
doFirst {
assetsDir.deleteDir()
assetsDir.mkdirs()
}
// Mark the task as always out-of-date so it always runs - ie. regenerate app.config on every build
outputs.upToDateWhen { false }
// Add generated assetsDir into assets.srcDirs
project.android.sourceSets.main.assets.srcDirs += assetsDir
// Set up outputs so gradle can cache the result
outputs.dir assetsDir
// Switch to project root and generate the app config
workingDir projectRoot
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("cmd", "/c", *nodeExecutableAndArgs, "$expoConstantsDir/scripts/getAppConfig.js", projectRoot, assetsDir)
} else {
commandLine(*nodeExecutableAndArgs, "$expoConstantsDir/scripts/getAppConfig.js", projectRoot, assetsDir)
}
}
// Generate app.config at preBuild
tasks.getByName('preBuild').dependsOn(currentCreateConfigTask)
}

35
node_modules/expo-constants/scripts/get-app-config-ios.sh generated vendored Executable file
View File

@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -eo pipefail
DEST="$CONFIGURATION_BUILD_DIR"
RESOURCE_BUNDLE_NAME="EXConstants.bundle"
EXPO_CONSTANTS_PACKAGE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
# For classic main project build phases integration, will be no-op to prevent duplicated app.config creation.
#
# `$PROJECT_DIR` is passed by Xcode as the directory to the xcodeproj file.
# in classic main project setup it is something like /path/to/app/ios
# in new style pod project setup it is something like /path/to/app/ios/Pods
PROJECT_DIR_BASENAME=$(basename $PROJECT_DIR)
if [ "x$PROJECT_DIR_BASENAME" != "xPods" ]; then
exit 0
fi
# If PROJECT_ROOT is not specified, fallback to use Xcode PROJECT_DIR
PROJECT_ROOT=${PROJECT_ROOT:-"$PROJECT_DIR/../.."}
PROJECT_ROOT=${PROJECT_ROOT:-"$EXPO_CONSTANTS_PACKAGE_DIR/../.."}
cd "$PROJECT_ROOT" || exit
if [ "$BUNDLE_FORMAT" == "shallow" ]; then
RESOURCE_DEST="$DEST/$RESOURCE_BUNDLE_NAME"
elif [ "$BUNDLE_FORMAT" == "deep" ]; then
RESOURCE_DEST="$DEST/$RESOURCE_BUNDLE_NAME/Contents/Resources"
mkdir -p "$RESOURCE_DEST"
else
echo "Unsupported bundle format: $BUNDLE_FORMAT"
exit 1
fi
"${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/with-node.sh" "${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/getAppConfig.js" "$PROJECT_ROOT" "$RESOURCE_DEST"

1
node_modules/expo-constants/scripts/getAppConfig.js generated vendored Normal file
View File

@@ -0,0 +1 @@
require('./build/getAppConfig');

1
node_modules/expo-constants/scripts/jest.config.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = require('expo-module-scripts/jest-preset-scripts');

View File

@@ -0,0 +1,28 @@
import { getConfig } from '@expo/config';
import fs from 'fs';
import path from 'path';
const possibleProjectRoot = process.argv[2];
const destinationDir = process.argv[3];
// TODO: Verify we can remove projectRoot validation, now that we no longer
// support React Native <= 62
let projectRoot;
if (fs.existsSync(path.join(possibleProjectRoot, 'package.json'))) {
projectRoot = possibleProjectRoot;
} else if (fs.existsSync(path.join(possibleProjectRoot, '..', 'package.json'))) {
projectRoot = path.resolve(possibleProjectRoot, '..');
} else {
throw new Error(
`Unable to locate project (no package.json found) at path: ${possibleProjectRoot}`
);
}
require('@expo/env').load(projectRoot);
process.chdir(projectRoot);
const { exp } = getConfig(projectRoot, {
isPublicConfig: true,
skipSDKVersionRequirement: true,
});
fs.writeFileSync(path.join(destinationDir, 'app.config'), JSON.stringify(exp));

9
node_modules/expo-constants/scripts/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "expo-module-scripts/tsconfig.plugin",
"compilerOptions": {
"outDir": "build",
"rootDir": "src"
},
"include": ["./src"],
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
}

44
node_modules/expo-constants/scripts/with-node.sh generated vendored Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# Copyright 2018-present 650 Industries. All rights reserved.
#
# @generated by expo-module-scripts
#
# USAGE:
# ./with-node.sh command
CURR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
# Start with a default
NODE_BINARY=$(command -v node)
export NODE_BINARY
# Override the default with the global environment
ENV_PATH="$PODS_ROOT/../.xcode.env"
if [[ -f "$ENV_PATH" ]]; then
source "$ENV_PATH"
fi
# Override the global with the local environment
LOCAL_ENV_PATH="${ENV_PATH}.local"
if [[ -f "$LOCAL_ENV_PATH" ]]; then
source "$LOCAL_ENV_PATH"
fi
if [[ -n "$NODE_BINARY" && -x "$NODE_BINARY" ]]; then
echo "Node found at: ${NODE_BINARY}"
else
cat >&2 << EOF
[ERROR] Could not find "node" while running an Xcode build script. You need to specify the path to your Node.js executable by defining an environment variable named NODE_BINARY in your project's .xcode.env or .xcode.env.local file. You can set this up quickly by running:
echo "export NODE_BINARY=\$(command -v node)" >> .xcode.env
in the ios folder of your project.
EOF
exit 1
fi
# Execute argument, if present
if [[ "$#" -gt 0 ]]; then
"$NODE_BINARY" "$@"
fi

93
node_modules/expo-constants/src/Constants.server.ts generated vendored Normal file
View File

@@ -0,0 +1,93 @@
import type { ExpoConfig } from 'expo/config';
import type {
EmbeddedManifest,
EASConfig,
ExpoGoConfig,
ExpoUpdatesManifest,
} from 'expo-manifests';
import type { Manifest as UpdatesManifest } from 'expo-updates';
import {
AndroidManifest,
AppOwnership,
Constants,
ExecutionEnvironment,
IOSManifest,
NativeConstants,
PlatformManifest,
UserInterfaceIdiom,
WebManifest,
} from './Constants.types';
import ExponentConstants from './ExponentConstants.web.js';
type DevLauncherManifest = ExpoUpdatesManifest;
export {
AndroidManifest,
AppOwnership,
Constants,
ExecutionEnvironment,
IOSManifest,
NativeConstants,
PlatformManifest,
UserInterfaceIdiom,
WebManifest,
};
type RawManifest = UpdatesManifest | DevLauncherManifest | ExpoConfig;
const PARSED_MANIFEST: RawManifest = (() => {
if (typeof ExponentConstants?.manifest === 'string') {
return JSON.parse(ExponentConstants.manifest);
}
return ExponentConstants?.manifest as any;
})();
const constants: Constants = ExponentConstants;
Object.defineProperties(constants, {
/**
* Use `manifest` property by default.
* This property is only used for internal purposes.
* It behaves similarly to the original one, but suppresses warning upon no manifest available.
* `expo-asset` uses it to prevent users from seeing mentioned warning.
*/
__unsafeNoWarnManifest: {
get(): EmbeddedManifest | null {
return PARSED_MANIFEST as any;
},
enumerable: false,
},
manifest: {
get(): EmbeddedManifest | null {
return PARSED_MANIFEST as any;
},
enumerable: true,
},
expoConfig: {
get():
| (ExpoConfig & {
/**
* Only present during development using @expo/cli.
*/
hostUri?: string;
})
| null {
return PARSED_MANIFEST as any;
},
enumerable: true,
},
expoGoConfig: {
get(): ExpoGoConfig | null {
return PARSED_MANIFEST as any;
},
enumerable: true,
},
easConfig: {
get(): EASConfig | null {
return PARSED_MANIFEST as any;
},
enumerable: true,
},
});
export default constants as Constants;

257
node_modules/expo-constants/src/Constants.ts generated vendored Normal file
View File

@@ -0,0 +1,257 @@
import type { ExpoConfig } from 'expo/config';
// @ts-ignore -- optional interface, will gracefully degrade to `any` if not installed
import type {
EmbeddedManifest,
EASConfig,
ExpoGoConfig,
ExpoUpdatesManifest,
// @ts-ignore -- optional interface, will gracefully degrade to `any` if not installed
} from 'expo-manifests';
import { CodedError, requireOptionalNativeModule } from 'expo-modules-core';
// @ts-ignore -- optional interface, will gracefully degrade to `any` if not installed
import type { Manifest as UpdatesManifest, ExpoUpdatesModule } from 'expo-updates';
import { Platform, NativeModules } from 'react-native';
import {
AndroidManifest,
AppOwnership,
Constants,
ExecutionEnvironment,
IOSManifest,
NativeConstants,
PlatformManifest,
UserInterfaceIdiom,
WebManifest,
} from './Constants.types';
import ExponentConstants from './ExponentConstants';
type DevLauncherManifest = ExpoUpdatesManifest;
export {
AndroidManifest,
AppOwnership,
Constants,
ExecutionEnvironment,
IOSManifest,
NativeConstants,
PlatformManifest,
UserInterfaceIdiom,
WebManifest,
};
if (!ExponentConstants) {
console.warn(
"No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?"
);
}
const ExpoUpdates = requireOptionalNativeModule<ExpoUpdatesModule>('ExpoUpdates');
let rawUpdatesManifest: UpdatesManifest | null = null;
// If expo-updates defines a non-empty manifest, prefer that one
if (ExpoUpdates) {
let updatesManifest: object | undefined;
if (ExpoUpdates.manifest) {
updatesManifest = ExpoUpdates.manifest;
} else if (ExpoUpdates.manifestString) {
updatesManifest = JSON.parse(ExpoUpdates.manifestString);
}
if (updatesManifest && Object.keys(updatesManifest).length > 0) {
rawUpdatesManifest = updatesManifest as any;
}
}
// If dev-launcher defines a non-empty manifest, prefer that one
let rawDevLauncherManifest: DevLauncherManifest | null = null;
if (NativeModules.EXDevLauncher) {
let devLauncherManifest;
if (NativeModules.EXDevLauncher.manifestString) {
devLauncherManifest = JSON.parse(NativeModules.EXDevLauncher.manifestString);
}
if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {
rawDevLauncherManifest = devLauncherManifest as any;
}
}
// Fall back to ExponentConstants.manifest if we don't have one from Updates
let rawAppConfig: ExpoConfig | null = null;
if (ExponentConstants && ExponentConstants.manifest) {
const appConfig: object | string = ExponentConstants.manifest;
// On Android we pass the manifest in JSON form so this step is necessary
if (typeof appConfig === 'string') {
rawAppConfig = JSON.parse(appConfig);
} else {
rawAppConfig = appConfig as any;
}
}
type RawManifest = UpdatesManifest | DevLauncherManifest | ExpoConfig;
let rawManifest: RawManifest | null = rawUpdatesManifest ?? rawDevLauncherManifest ?? rawAppConfig;
const { name, appOwnership, ...nativeConstants } = (ExponentConstants || {}) as any;
const constants: Constants = {
...nativeConstants,
// Ensure this is null in bare workflow
appOwnership: appOwnership ?? null,
};
Object.defineProperties(constants, {
/**
* Use `manifest` property by default.
* This property is only used for internal purposes.
* It behaves similarly to the original one, but suppresses warning upon no manifest available.
* `expo-asset` uses it to prevent users from seeing mentioned warning.
*/
__unsafeNoWarnManifest: {
get(): EmbeddedManifest | null {
const maybeManifest = getManifest(true);
if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: false,
},
__unsafeNoWarnManifest2: {
get(): ExpoUpdatesManifest | null {
const maybeManifest = getManifest(true);
if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: false,
},
manifest: {
get(): EmbeddedManifest | null {
const maybeManifest = getManifest();
if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: true,
},
manifest2: {
get(): ExpoUpdatesManifest | null {
const maybeManifest = getManifest();
if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
return null;
}
return maybeManifest;
},
enumerable: true,
},
expoConfig: {
get():
| (ExpoConfig & {
/**
* Only present during development using @expo/cli.
*/
hostUri?: string;
})
| null {
const maybeManifest = getManifest(true);
if (!maybeManifest) {
return null;
}
// if running an embedded update, maybeManifest is a EmbeddedManifest which doesn't have
// the expo config. Instead, the embedded expo-constants app.config should be used.
if (ExpoUpdates && ExpoUpdates.isEmbeddedLaunch) {
return rawAppConfig;
}
if (isExpoUpdatesManifest(maybeManifest)) {
return maybeManifest.extra?.expoClient ?? null;
} else if (isEmbeddedManifest(maybeManifest)) {
return maybeManifest as any;
}
return null;
},
enumerable: true,
},
expoGoConfig: {
get(): ExpoGoConfig | null {
const maybeManifest = getManifest(true);
if (!maybeManifest) {
return null;
}
if (isExpoUpdatesManifest(maybeManifest)) {
return maybeManifest.extra?.expoGo ?? null;
} else if (isEmbeddedManifest(maybeManifest)) {
return maybeManifest as any;
}
return null;
},
enumerable: true,
},
easConfig: {
get(): EASConfig | null {
const maybeManifest = getManifest(true);
if (!maybeManifest) {
return null;
}
if (isExpoUpdatesManifest(maybeManifest)) {
return maybeManifest.extra?.eas ?? null;
} else if (isEmbeddedManifest(maybeManifest)) {
return maybeManifest as any;
}
return null;
},
enumerable: true,
},
__rawManifest_TEST: {
get(): RawManifest | null {
return rawManifest;
},
set(value: RawManifest | null) {
rawManifest = value;
},
enumerable: false,
},
});
function isEmbeddedManifest(manifest: RawManifest): manifest is EmbeddedManifest {
return !isExpoUpdatesManifest(manifest);
}
function isExpoUpdatesManifest(manifest: RawManifest): manifest is ExpoUpdatesManifest {
return 'metadata' in manifest;
}
function getManifest(suppressWarning = false): RawManifest | null {
if (!rawManifest) {
const invalidManifestType = rawManifest === null ? 'null' : 'undefined';
if (
nativeConstants.executionEnvironment === ExecutionEnvironment.Bare &&
Platform.OS !== 'web'
) {
if (!suppressWarning) {
console.warn(
`Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.`
);
}
} else if (
nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient ||
nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone
) {
// If we somehow get here, this is a truly exceptional state to be in.
// Constants.manifest should *always* be defined in those contexts.
throw new CodedError(
'ERR_CONSTANTS_MANIFEST_UNAVAILABLE',
`Constants.manifest is ${invalidManifestType}, must be an object.`
);
}
}
return rawManifest;
}
export default constants as Constants;

260
node_modules/expo-constants/src/Constants.types.ts generated vendored Normal file
View File

@@ -0,0 +1,260 @@
import type { ExpoConfig } from 'expo/config';
import type {
EASConfig as ManifestsEASConfig,
ExpoGoConfig as ManifestsExpoGoConfig,
ExpoUpdatesManifest,
EmbeddedManifest,
ManifestAsset as ManifestAssetForReExport,
ManifestExtra as ManifestExtraForReExport,
ClientScopingConfig as ClientScopingConfigForReExport,
ExpoGoPackagerOpts as ExpoGoPackagerOptsForReExport,
// @ts-ignore -- optional interface, will gracefully degrade to `any` not installed
} from 'expo-manifests';
export enum AppOwnership {
/**
* The experience is running inside the Expo Go app.
* @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
*/
Expo = 'expo',
}
/**
* Identifies where the app's JavaScript bundle is currently running.
*/
export enum ExecutionEnvironment {
/** A project that includes native project directories that you maintain directly in your
* [existing (bare) React Native app](https://docs.expo.dev/bare/overview/).
*/
Bare = 'bare',
/** Production/release build created with or without EAS Build. */
Standalone = 'standalone',
/** Expo Go or a development build built with `expo-dev-client`. */
StoreClient = 'storeClient',
}
// @needsAudit
/**
* Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up
* as `unsupported`.
*/
export enum UserInterfaceIdiom {
Handset = 'handset',
Tablet = 'tablet',
Desktop = 'desktop',
TV = 'tv',
Unsupported = 'unsupported',
}
// @needsAudit
/**
* @platform ios
*/
export type IOSManifest = {
/**
* The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.
* In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This
* may differ from the value in `Constants.expoConfig.ios.buildNumber` because the manifest
* can be updated, whereas this value will never change for a given native binary.
* The value is set to `null` in case you run your app in Expo Go.
*/
buildNumber: string | null;
/**
* The Apple internal model identifier for this device.
* @example
* `iPhone1,1`
* @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).
*/
platform: string;
/**
* The human-readable model name of this device. For example, `"iPhone 7 Plus"` if it can be determined,
* otherwise will be `null`.
* @deprecated Moved to `expo-device` as [`Device.modelName`](./device/#devicemodelname).
*/
model: string | null;
/**
* The user interface idiom of the current device, such as whether the app is running on an iPhone, iPad, Mac or Apple TV.
* @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).
*/
userInterfaceIdiom: UserInterfaceIdiom;
/**
* The version of iOS running on this device.
* @example
* `10.3`
* @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).
*/
systemVersion: string;
} & Record<string, any>;
// @needsAudit
/**
* @platform android
*/
export type AndroidManifest = {
/**
* The version code set by `android.versionCode` in app.json.
* The value is set to `null` in case you run your app in Expo Go.
* @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).
*/
versionCode: number;
} & Record<string, any>;
/**
* @platform web
*/
export type WebManifest = Record<string, any>;
// type re-exports to prevent breaking change
export type ManifestAsset = ManifestAssetForReExport;
export type Manifest = ExpoUpdatesManifest;
export type ManifestExtra = ManifestExtraForReExport;
export type EASConfig = ManifestsEASConfig;
export type ClientScopingConfig = ClientScopingConfigForReExport;
export type ExpoGoConfig = ManifestsExpoGoConfig;
export type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;
// @needsAudit @docsMissing
export type PlatformManifest = {
ios?: IOSManifest;
android?: AndroidManifest;
web?: WebManifest;
detach?: {
scheme?: string;
[key: string]: any;
};
scheme?: string;
hostUri?: string;
developer?: string;
} & Record<string, any>;
// @needsAudit @docsMissing
export type NativeConstants = {
/**
* @hidden
*/
name: 'ExponentConstants';
/**
* Returns `expo` when running in Expo Go, otherwise `null`.
* @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
*/
appOwnership: AppOwnership | null;
/**
* Returns `true` when the app is running in debug mode (`__DEV__`). Otherwise, returns `false`.
*/
debugMode: boolean;
/**
* A human-readable name for the device type.
*/
deviceName?: string;
/**
* The [device year class](https://github.com/facebook/device-year-class) of this device.
* @deprecated Moved to `expo-device` as [`Device.deviceYearClass`](./device/#deviceyearclass).
*/
deviceYearClass: number | null;
/**
* Returns the current execution environment.
*/
executionEnvironment: ExecutionEnvironment;
experienceUrl: string;
/**
* Nullable only on the web.
*/
expoRuntimeVersion: string | null;
/**
* The version string of the Expo Go app currently running.
* Returns `null` in bare workflow and web.
*/
expoVersion: string | null;
isDetached?: boolean;
intentUri?: string;
/**
* Returns `true` if the app is running in headless mode. Otherwise, returns `false`.
*/
isHeadless: boolean;
linkingUri: string;
/**
* @hidden
* Manifest embedded in the build. Returns `null` when `manifest2` is non-null.
* @deprecated Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build
* and EAS Update.
*/
manifest: EmbeddedManifest | null;
/**
* Manifest for Expo apps using modern Expo Updates from a remote source, such as apps that
* use EAS Update. `Constants.expoConfig` should be used for accessing the Expo config object.
*/
manifest2: ExpoUpdatesManifest | null;
/**
* The standard Expo config object defined in **app.json** and **app.config.js** files. For both
* classic and modern manifests, whether they are embedded or remote.
*/
expoConfig:
| (ExpoConfig & {
/**
* Only present during development using @expo/cli.
*/
hostUri?: string;
})
| null;
/**
* The standard Expo Go config object populated when running in Expo Go.
*/
expoGoConfig: ManifestsExpoGoConfig | null;
/**
* The standard EAS config object populated when using EAS.
*/
easConfig: ManifestsEASConfig | null;
/**
* A string that is unique to the current session of your app. It is different across apps and
* across multiple launches of the same app.
*/
sessionId: string;
/**
* The default status bar height for the device. Does not factor in changes when location tracking
* is in use or a phone call is active.
*/
statusBarHeight: number;
/**
* A list of the system font names available on the current device.
*/
systemFonts: string[];
systemVersion?: number;
/**
* @hidden
*/
supportedExpoSdks?: string[];
/**
* Returns the specific platform manifest object.
*
* > **Note**: This is distinct from the `manifest` and `manifest2`.
*/
platform?: PlatformManifest;
/**
* Gets the user agent string which would be included in requests sent by a web view running on
* this device. This is probably not the same user agent you might be providing in your JS `fetch`
* requests.
*/
getWebViewUserAgentAsync: () => Promise<string | null>;
} & Record<string, any>;
/**
* @hidden
*/
export type Constants = NativeConstants & {
/**
* > **Warning**: Do not use this property. Use `manifest` by default.
*
* In certain cases accessing manifest via this property
* suppresses important warning about missing manifest.
*/
__unsafeNoWarnManifest?: EmbeddedManifest;
/**
* > **Warning**: Do not use this property. Use `manifest2` by default.
*
* In certain cases accessing manifest via this property
* suppresses important warning about missing manifest.
*/
__unsafeNoWarnManifest2?: ExpoUpdatesManifest;
};

3
node_modules/expo-constants/src/ExponentConstants.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import { requireOptionalNativeModule } from 'expo-modules-core';
export default requireOptionalNativeModule('ExponentConstants');

View File

@@ -0,0 +1,103 @@
import { ExecutionEnvironment, NativeConstants, WebManifest } from './Constants.types';
declare let __DEV__: boolean;
declare let process: { env: any };
declare let navigator: Navigator;
declare let location: Location;
const _sessionId = (Date.now() + '-' + Math.floor(Math.random() * 1000000000)).toString();
function getBrowserName(): string | undefined {
if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string') {
const agent = navigator.userAgent.toLowerCase();
if (agent.includes('edge')) {
return 'Edge';
} else if (agent.includes('edg')) {
return 'Chromium Edge';
} else if (agent.includes('opr') && 'opr' in window && !!window['opr']) {
return 'Opera';
} else if (agent.includes('chrome') && 'chrome' in window && !!window['chrome']) {
return 'Chrome';
} else if (agent.includes('trident')) {
return 'IE';
} else if (agent.includes('firefox')) {
return 'Firefox';
} else if (agent.includes('safari')) {
return 'Safari';
}
}
return undefined;
}
export default {
get appOwnership() {
return null;
},
get executionEnvironment() {
return ExecutionEnvironment.Bare;
},
get sessionId(): string {
return _sessionId;
},
get isHeadless(): boolean {
if (typeof navigator === 'undefined') return true;
return /\bHeadlessChrome\//.test(navigator.userAgent);
},
get expoVersion(): string | null {
return (this.manifest as any)!.sdkVersion || null;
},
get linkingUri(): string {
if (typeof location !== 'undefined') {
// On native this is `exp://`
// On web we should use the protocol and hostname (location.origin)
return location.origin;
} else {
return '';
}
},
get expoRuntimeVersion(): string | null {
return this.expoVersion;
},
get deviceName(): string | undefined {
return getBrowserName();
},
get systemFonts(): string[] {
// TODO: Bacon: Maybe possible.
return [];
},
get statusBarHeight(): number {
return 0;
},
get deviceYearClass(): number | null {
// TODO: Bacon: The android version isn't very accurate either, maybe we could try and guess this value.
return null;
},
get manifest(): WebManifest {
// This is defined by @expo/webpack-config or babel-preset-expo.
// If your site is bundled with a different config then you may not have access to the app.json automatically.
return process.env.APP_MANIFEST || {};
},
get manifest2(): null {
return null;
},
get experienceUrl(): string {
if (typeof location !== 'undefined') {
return location.origin;
} else {
return '';
}
},
get debugMode(): boolean {
return __DEV__;
},
async getWebViewUserAgentAsync(): Promise<string | null> {
if (typeof navigator !== 'undefined') {
return navigator.userAgent;
} else {
return null;
}
},
} as NativeConstants;

9
node_modules/expo-constants/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,9 @@
// @generated by expo-module-scripts
{
"extends": "expo-module-scripts/tsconfig.base",
"compilerOptions": {
"outDir": "./build"
},
"include": ["./src"],
"exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__rsc_tests__/*"]
}