From ace454934c65518ba776a1110ae5988c579d7989 Mon Sep 17 00:00:00 2001 From: Evan Bacon Date: Mon, 5 Feb 2024 15:41:41 -0600 Subject: [PATCH] chore: drop deprecated `@config-plugins/react-native-ble-plx` package (#219) * drop react-native-ble-plx * fix builds * update --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 - .github/ISSUE_TEMPLATE/config.yml | 3 - .github/dependabot.yml | 6 - .github/workflows/test.yml | 1 - README.md | 2 +- apps/app/webpack.config.js | 3 - apps/react-native-ble-plx/app.config.js | 16 - apps/react-native-ble-plx/app.json | 9 - apps/react-native-ble-plx/babel.config.js | 6 - apps/react-native-ble-plx/index.js | 5 - apps/react-native-ble-plx/metro.config.js | 6 - apps/react-native-ble-plx/package.json | 25 -- apps/react-native-ble-plx/src/App.tsx | 32 -- .../src/useBluetoothDevices.ts | 80 ----- apps/react-native-ble-plx/tsconfig.json | 4 - package.json | 2 +- .../build/withAndroidJscIntl.d.ts | 8 - .../build/withAndroidJscIntl.js | 19 -- .../build/withAndroidFFMPEGPackage.d.ts | 3 - .../build/withAndroidFFMPEGPackage.js | 68 ---- .../build/withCocoaPodsImport.d.ts | 5 - .../build/withCocoaPodsImport.js | 46 --- .../build/withFFMPEG.d.ts | 11 - .../build/withFFMPEG.js | 38 --- .../build/withIosDeploymentTarget.d.ts | 7 - .../build/withIosDeploymentTarget.js | 47 --- .../build/generateImessageIconsAsync.d.ts | 15 - .../build/generateImessageIconsAsync.js | 131 -------- packages/ios-stickers/build/options.json | 61 ---- .../ios-stickers/build/withStickerAssets.d.ts | 19 -- .../ios-stickers/build/withStickerAssets.js | 124 -------- .../build/withStickerInfoPlist.d.ts | 3 - .../build/withStickerInfoPlist.js | 65 ---- .../ios-stickers/build/withStickerPack.d.ts | 5 - .../ios-stickers/build/withStickerPack.js | 48 --- .../build/withStickerXcodeTarget.d.ts | 4 - .../build/withStickerXcodeTarget.js | 25 -- packages/ios-stickers/build/xcodeSticker.d.ts | 20 -- packages/ios-stickers/build/xcodeSticker.js | 277 ---------------- packages/react-native-ble-plx/.eslintrc.js | 2 - packages/react-native-ble-plx/CHANGELOG.md | 47 --- packages/react-native-ble-plx/README.md | 2 + packages/react-native-ble-plx/app.plugin.js | 1 - .../react-native-ble-plx/build/withBLE.d.ts | 10 - .../react-native-ble-plx/build/withBLE.js | 35 -- .../build/withBLEAndroidManifest.d.ts | 35 -- .../build/withBLEAndroidManifest.js | 91 ------ .../build/withBLEBackgroundModes.d.ts | 9 - .../build/withBLEBackgroundModes.js | 39 --- .../build/withBluetoothPermissions.d.ts | 4 - .../build/withBluetoothPermissions.js | 17 - packages/react-native-ble-plx/jest.config.js | 1 - packages/react-native-ble-plx/package.json | 38 --- .../__tests__/fixtures/AndroidManifest.xml | 24 -- .../__tests__/withBLEAndroidManifest-test.ts | 111 ------- packages/react-native-ble-plx/src/withBLE.ts | 59 ---- .../src/withBLEAndroidManifest.ts | 156 --------- .../src/withBLEBackgroundModes.ts | 50 --- .../src/withBluetoothPermissions.ts | 18 -- packages/react-native-ble-plx/tsconfig.json | 9 - .../build/withReactNativeBlobUtil.d.ts | 6 - .../build/withReactNativeBlobUtil.js | 106 ------- packages/react-native-branch/build/types.d.ts | 5 - packages/react-native-branch/build/types.js | 2 - .../react-native-branch/build/withBranch.d.ts | 4 - .../react-native-branch/build/withBranch.js | 23 -- .../build/withBranchAndroid.d.ts | 7 - .../build/withBranchAndroid.js | 35 -- .../build/withBranchIOS.d.ts | 6 - .../build/withBranchIOS.js | 50 --- .../build/ensureHeaderSearchPath.d.ts | 2 - .../build/ensureHeaderSearchPath.js | 34 -- .../build/withCallkeep.d.ts | 7 - .../build/withCallkeep.js | 112 ------- .../build/index.d.ts | 7 - .../build/index.js | 175 ---------- .../build/index.js.map | 1 - .../build/withAndroidGoogleCast.d.ts | 11 - .../build/withAndroidGoogleCast.js | 149 --------- .../build/withGoogleCast.d.ts | 16 - .../build/withGoogleCast.js | 20 -- .../build/withIosGoogleCast.d.ts | 15 - .../build/withIosGoogleCast.js | 127 -------- packages/react-native-pdf/build/withPdf.d.ts | 5 - packages/react-native-pdf/build/withPdf.js | 52 --- .../build/withReactNativeSiriShortcut.d.ts | 6 - .../build/withReactNativeSiriShortcut.js | 83 ----- .../build/withBitcodeDisabled.d.ts | 2 - .../build/withBitcodeDisabled.js | 18 -- .../build/withDesugaring.d.ts | 6 - .../build/withDesugaring.js | 26 -- .../build/withPermissions.d.ts | 6 - .../build/withPermissions.js | 21 -- .../react-native-webrtc/build/withWebRTC.d.ts | 4 - .../react-native-webrtc/build/withWebRTC.js | 34 -- yarn.lock | 300 ++++++++++++------ 96 files changed, 210 insertions(+), 3281 deletions(-) delete mode 100644 apps/app/webpack.config.js delete mode 100644 apps/react-native-ble-plx/app.config.js delete mode 100644 apps/react-native-ble-plx/app.json delete mode 100644 apps/react-native-ble-plx/babel.config.js delete mode 100644 apps/react-native-ble-plx/index.js delete mode 100644 apps/react-native-ble-plx/metro.config.js delete mode 100644 apps/react-native-ble-plx/package.json delete mode 100644 apps/react-native-ble-plx/src/App.tsx delete mode 100644 apps/react-native-ble-plx/src/useBluetoothDevices.ts delete mode 100644 apps/react-native-ble-plx/tsconfig.json delete mode 100644 packages/android-jsc-intl/build/withAndroidJscIntl.d.ts delete mode 100644 packages/android-jsc-intl/build/withAndroidJscIntl.js delete mode 100644 packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.d.ts delete mode 100644 packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.js delete mode 100644 packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.d.ts delete mode 100644 packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.js delete mode 100644 packages/ffmpeg-kit-react-native/build/withFFMPEG.d.ts delete mode 100644 packages/ffmpeg-kit-react-native/build/withFFMPEG.js delete mode 100644 packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.d.ts delete mode 100644 packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.js delete mode 100644 packages/ios-stickers/build/generateImessageIconsAsync.d.ts delete mode 100644 packages/ios-stickers/build/generateImessageIconsAsync.js delete mode 100644 packages/ios-stickers/build/options.json delete mode 100644 packages/ios-stickers/build/withStickerAssets.d.ts delete mode 100644 packages/ios-stickers/build/withStickerAssets.js delete mode 100644 packages/ios-stickers/build/withStickerInfoPlist.d.ts delete mode 100644 packages/ios-stickers/build/withStickerInfoPlist.js delete mode 100644 packages/ios-stickers/build/withStickerPack.d.ts delete mode 100644 packages/ios-stickers/build/withStickerPack.js delete mode 100644 packages/ios-stickers/build/withStickerXcodeTarget.d.ts delete mode 100644 packages/ios-stickers/build/withStickerXcodeTarget.js delete mode 100644 packages/ios-stickers/build/xcodeSticker.d.ts delete mode 100644 packages/ios-stickers/build/xcodeSticker.js delete mode 100644 packages/react-native-ble-plx/.eslintrc.js delete mode 100644 packages/react-native-ble-plx/CHANGELOG.md delete mode 100644 packages/react-native-ble-plx/app.plugin.js delete mode 100644 packages/react-native-ble-plx/build/withBLE.d.ts delete mode 100644 packages/react-native-ble-plx/build/withBLE.js delete mode 100644 packages/react-native-ble-plx/build/withBLEAndroidManifest.d.ts delete mode 100644 packages/react-native-ble-plx/build/withBLEAndroidManifest.js delete mode 100644 packages/react-native-ble-plx/build/withBLEBackgroundModes.d.ts delete mode 100644 packages/react-native-ble-plx/build/withBLEBackgroundModes.js delete mode 100644 packages/react-native-ble-plx/build/withBluetoothPermissions.d.ts delete mode 100644 packages/react-native-ble-plx/build/withBluetoothPermissions.js delete mode 100644 packages/react-native-ble-plx/jest.config.js delete mode 100644 packages/react-native-ble-plx/package.json delete mode 100644 packages/react-native-ble-plx/src/__tests__/fixtures/AndroidManifest.xml delete mode 100644 packages/react-native-ble-plx/src/__tests__/withBLEAndroidManifest-test.ts delete mode 100644 packages/react-native-ble-plx/src/withBLE.ts delete mode 100644 packages/react-native-ble-plx/src/withBLEAndroidManifest.ts delete mode 100644 packages/react-native-ble-plx/src/withBLEBackgroundModes.ts delete mode 100644 packages/react-native-ble-plx/src/withBluetoothPermissions.ts delete mode 100644 packages/react-native-ble-plx/tsconfig.json delete mode 100644 packages/react-native-blob-util/build/withReactNativeBlobUtil.d.ts delete mode 100644 packages/react-native-blob-util/build/withReactNativeBlobUtil.js delete mode 100644 packages/react-native-branch/build/types.d.ts delete mode 100644 packages/react-native-branch/build/types.js delete mode 100644 packages/react-native-branch/build/withBranch.d.ts delete mode 100644 packages/react-native-branch/build/withBranch.js delete mode 100644 packages/react-native-branch/build/withBranchAndroid.d.ts delete mode 100644 packages/react-native-branch/build/withBranchAndroid.js delete mode 100644 packages/react-native-branch/build/withBranchIOS.d.ts delete mode 100644 packages/react-native-branch/build/withBranchIOS.js delete mode 100644 packages/react-native-callkeep/build/ensureHeaderSearchPath.d.ts delete mode 100644 packages/react-native-callkeep/build/ensureHeaderSearchPath.js delete mode 100644 packages/react-native-callkeep/build/withCallkeep.d.ts delete mode 100644 packages/react-native-callkeep/build/withCallkeep.js delete mode 100644 packages/react-native-dynamic-app-icon/build/index.d.ts delete mode 100644 packages/react-native-dynamic-app-icon/build/index.js delete mode 100644 packages/react-native-dynamic-app-icon/build/index.js.map delete mode 100644 packages/react-native-google-cast/build/withAndroidGoogleCast.d.ts delete mode 100644 packages/react-native-google-cast/build/withAndroidGoogleCast.js delete mode 100644 packages/react-native-google-cast/build/withGoogleCast.d.ts delete mode 100644 packages/react-native-google-cast/build/withGoogleCast.js delete mode 100644 packages/react-native-google-cast/build/withIosGoogleCast.d.ts delete mode 100644 packages/react-native-google-cast/build/withIosGoogleCast.js delete mode 100644 packages/react-native-pdf/build/withPdf.d.ts delete mode 100644 packages/react-native-pdf/build/withPdf.js delete mode 100644 packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.d.ts delete mode 100644 packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.js delete mode 100644 packages/react-native-webrtc/build/withBitcodeDisabled.d.ts delete mode 100644 packages/react-native-webrtc/build/withBitcodeDisabled.js delete mode 100644 packages/react-native-webrtc/build/withDesugaring.d.ts delete mode 100644 packages/react-native-webrtc/build/withDesugaring.js delete mode 100644 packages/react-native-webrtc/build/withPermissions.d.ts delete mode 100644 packages/react-native-webrtc/build/withPermissions.js delete mode 100644 packages/react-native-webrtc/build/withWebRTC.d.ts delete mode 100644 packages/react-native-webrtc/build/withWebRTC.js diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f22a59e3..6aeaf0bc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,7 +35,6 @@ body: - '@config-plugins/ffmpeg-kit-react-native' - '@config-plugins/ios-stickers' - '@config-plugins/react-native-adjust' - - '@config-plugins/react-native-ble-plx' - '@config-plugins/react-native-blob-util' - '@config-plugins/react-native-branch' - '@config-plugins/react-native-callkeep' diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 88453839..330f4c56 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -15,9 +15,6 @@ contact_links: - about: Adjust React Native SDK name: 📦 react-native-adjust issues url: https://github.com/adjust/react_native_sdk/issues - - about: React Native Bluetooth Low Energy library - name: 📦 react-native-ble-plx issues - url: https://github.com/dotintent/react-native-ble-plx/issues - about: >- A module provides upload, download, and files access API. Supports file stream read/write for process large files. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c2737c6f..e0958c35 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -41,12 +41,6 @@ updates: interval: daily time: '09:00' timezone: America/Los_Angeles - - package-ecosystem: npm - directory: packages/react-native-ble-plx - schedule: - interval: daily - time: '09:00' - timezone: America/Los_Angeles - package-ecosystem: npm directory: packages/react-native-blob-util schedule: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b9f40218..5feeffda 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,6 @@ jobs: detox, ffmpeg-kit-react-native, ios-stickers, - react-native-ble-plx, react-native-blob-util, react-native-branch, react-native-siri-shortcut, diff --git a/README.md b/README.md index 824101c3..e91528f0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ - All packages here are community maintained. Feel free to improve docs, packages, tests, etc. - We maintain a 1-1 mapping of **native packages** ⇔ `@config-plugins/*`. This means there should be no general utility packages here -- those are better suited for a different repo / NPM namespace. -## Awesome +## First-party plugins Here is a list of known packages that have a built-in Config Plugin. diff --git a/apps/app/webpack.config.js b/apps/app/webpack.config.js deleted file mode 100644 index 39daecb6..00000000 --- a/apps/app/webpack.config.js +++ /dev/null @@ -1,3 +0,0 @@ -const { createWebpackConfigAsync } = require("expo-yarn-workspaces/webpack"); - -module.exports = createWebpackConfigAsync; diff --git a/apps/react-native-ble-plx/app.config.js b/apps/react-native-ble-plx/app.config.js deleted file mode 100644 index c8df85db..00000000 --- a/apps/react-native-ble-plx/app.config.js +++ /dev/null @@ -1,16 +0,0 @@ -const path = require("path"); -const folderName = path.basename(__dirname); -const cleanName = folderName.replace(/[_\s-]/g, ""); -const appId = "dev.bacon." + cleanName; - -module.exports = ({ config }) => { - if (!config.extra) config.extra = {}; - // Expose CI env variables to the app - config.extra.CI = process.env.CI; - - if (!config.ios) config.ios = {}; - config.ios.bundleIdentifier = appId; - if (!config.android) config.android = {}; - config.android.package = appId; - return config; -}; diff --git a/apps/react-native-ble-plx/app.json b/apps/react-native-ble-plx/app.json deleted file mode 100644 index 57ce4566..00000000 --- a/apps/react-native-ble-plx/app.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "expo": { - "name": "ble-plx", - "icon": "https://icogen.vercel.app/api/icon?icon=🔌&color_hex=072462", - "plugins": [ - "@config-plugins/react-native-ble-plx" - ] - } -} diff --git a/apps/react-native-ble-plx/babel.config.js b/apps/react-native-ble-plx/babel.config.js deleted file mode 100644 index 2900afe9..00000000 --- a/apps/react-native-ble-plx/babel.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function(api) { - api.cache(true); - return { - presets: ['babel-preset-expo'], - }; -}; diff --git a/apps/react-native-ble-plx/index.js b/apps/react-native-ble-plx/index.js deleted file mode 100644 index 58298e14..00000000 --- a/apps/react-native-ble-plx/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import { registerRootComponent } from "expo"; - -import App from "./src/App"; - -registerRootComponent(App); diff --git a/apps/react-native-ble-plx/metro.config.js b/apps/react-native-ble-plx/metro.config.js deleted file mode 100644 index 704d63b2..00000000 --- a/apps/react-native-ble-plx/metro.config.js +++ /dev/null @@ -1,6 +0,0 @@ -// Learn more https://docs.expo.io/guides/customizing-metro -const { getDefaultConfig } = require("@expo/metro-config"); - -const config = getDefaultConfig(__dirname); - -module.exports = config; diff --git a/apps/react-native-ble-plx/package.json b/apps/react-native-ble-plx/package.json deleted file mode 100644 index 716a5857..00000000 --- a/apps/react-native-ble-plx/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@config-plugins-app/react-native-ble-plx", - "main": "./index.js", - "version": "1.0.0", - "scripts": { - "start": "expo start --dev-client", - "ios": "expo run:ios", - "android": "expo run:android" - }, - "dependencies": { - "@config-plugins/react-native-ble-plx": "*", - "expo": "^49.0.3", - "expo-splash-screen": "~0.20.4", - "expo-status-bar": "~1.6.0", - "react": "18.2.0", - "react-native": "0.72.3", - "react-native-ble-plx": "^2.0.3" - }, - "devDependencies": { - "@babel/core": "^7.20.0", - "@types/react": "~18.2.14", - "typescript": "^5.1.3" - }, - "private": true -} diff --git a/apps/react-native-ble-plx/src/App.tsx b/apps/react-native-ble-plx/src/App.tsx deleted file mode 100644 index 1c36d8a0..00000000 --- a/apps/react-native-ble-plx/src/App.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import { Text, View } from 'react-native'; - -import useBluetoothDevices, { useManager, useManagerState } from './useBluetoothDevices'; - -export default function App() { - const bleManager = useManager(); - const state = useManagerState(bleManager); - - console.log('Info:', state); - - return ( - - State: {state} - {state === 'PoweredOn' && } - - ); -} - -function DeviceScanner({ bleManager }) { - const [devices] = useBluetoothDevices(bleManager); - - React.useEffect(() => { - console.log(devices); - }, [devices]); - - return ( - - {devices.filter(({name}) => name).map((device, index) => ({device.name}))} - - ) -} diff --git a/apps/react-native-ble-plx/src/useBluetoothDevices.ts b/apps/react-native-ble-plx/src/useBluetoothDevices.ts deleted file mode 100644 index 5ec46af5..00000000 --- a/apps/react-native-ble-plx/src/useBluetoothDevices.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { useEffect, useMemo, useRef, useState } from "react"; -import { BleManager, State, Device } from "react-native-ble-plx"; - -function uniqBy(arr: T[], key: keyof T) { - return Object.values( - arr.reduce((acc, item) => { - const id = item[key]; - // @ts-ignore - acc[id] = item; - return acc; - }, {} as Record) - ); -} - -export function useManager() { - return useMemo(() => new BleManager(), []); -} - -export function useManagerState(bleManager: BleManager): State | null { - const [state, setState] = useState(null); - const isMounted = useMounted(); - - useEffect(() => { - if (!bleManager) return; - - bleManager.onStateChange((state) => { - if (isMounted.current) { - setState(state); - } - }, true); - }, [bleManager]); - - return state; -} - -function useMounted() { - const isMounted = useRef(true); - useEffect(() => { - isMounted.current = true; - return () => { - isMounted.current = false; - }; - }, []); - return isMounted; -} - -export function useBluetoothDevices( - bleManager: BleManager -): [Device[], null | string] { - const isMoutned = useMounted(); - const [error, setError] = useState(null); - const [devices, setDevices] = useState([]); - - useEffect(() => { - bleManager.startDeviceScan( - [], - { allowDuplicates: false }, - (e, scannedDevice) => { - if (!isMoutned.current) return; - if (e) { - setError(e.message); - } - - if (!scannedDevice) return; - - setDevices((oldDevices) => - uniqBy([...oldDevices, scannedDevice], "id") - ); - } - ); - - return () => { - bleManager.stopDeviceScan(); - }; - }, [bleManager]); - - return [devices, error]; -} - -export default useBluetoothDevices; diff --git a/apps/react-native-ble-plx/tsconfig.json b/apps/react-native-ble-plx/tsconfig.json deleted file mode 100644 index 0e6371f6..00000000 --- a/apps/react-native-ble-plx/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "compilerOptions": {}, - "extends": "expo/tsconfig.base" -} diff --git a/package.json b/package.json index 45d8d5c0..bf7e2074 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@types/js-yaml": "^4.0.5", "@types/prompts": "^2.0.13", "eslint": "^8.10.0", - "expo-yarn-workspaces": "^2.0.2", + "expo-yarn-workspaces": "^2.3.2", "js-yaml": "^4.1.0", "lerna": "3.4.1", "prettier": "^2.2.1", diff --git a/packages/android-jsc-intl/build/withAndroidJscIntl.d.ts b/packages/android-jsc-intl/build/withAndroidJscIntl.d.ts deleted file mode 100644 index ede217ba..00000000 --- a/packages/android-jsc-intl/build/withAndroidJscIntl.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ConfigPlugin } from "@expo/config-plugins"; -/** - * Apply android-jsc-intl native configuration. - * - * This plugin lets you access the `Intl` API in Android apps (without Hermes). - */ -declare const withAndroidJscIntl: ConfigPlugin; -export default withAndroidJscIntl; diff --git a/packages/android-jsc-intl/build/withAndroidJscIntl.js b/packages/android-jsc-intl/build/withAndroidJscIntl.js deleted file mode 100644 index 743bc8e0..00000000 --- a/packages/android-jsc-intl/build/withAndroidJscIntl.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_plugins_1 = require("@expo/config-plugins"); -/** - * Apply android-jsc-intl native configuration. - * - * This plugin lets you access the `Intl` API in Android apps (without Hermes). - */ -const withAndroidJscIntl = (config) => { - // Return the modified config. - return (0, config_plugins_1.withAppBuildGradle)(config, (config) => { - if (config.modResults.language !== "groovy") { - throw new Error("[@expo/config-plugins][withAndroidJscIntl] Cannot enable Intl in Android JSC app gradle because the build.gradle is not groovy."); - } - config.modResults.contents = config.modResults.contents.replace("org.webkit:android-jsc:+", "org.webkit:android-jsc-intl:+"); - return config; - }); -}; -exports.default = withAndroidJscIntl; diff --git a/packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.d.ts b/packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.d.ts deleted file mode 100644 index 20d409fb..00000000 --- a/packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare const withAndroidFFMPEGPackage: ConfigPlugin; -export declare function addPackageName(src: string, packageName?: string): string; diff --git a/packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.js b/packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.js deleted file mode 100644 index 5f6be097..00000000 --- a/packages/ffmpeg-kit-react-native/build/withAndroidFFMPEGPackage.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addPackageName = exports.withAndroidFFMPEGPackage = void 0; -const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); -const config_plugins_1 = require("expo/config-plugins"); -const withAndroidFFMPEGPackage = (config, packageName) => { - config = (0, config_plugins_1.withProjectBuildGradle)(config, (config) => { - if (config.modResults.language === "groovy") { - config.modResults.contents = addPackageName(config.modResults.contents, packageName); - } - else { - throw new Error("Cannot add camera maven gradle because the build.gradle is not groovy"); - } - return config; - }); - config = withLibCppSharedSo(config); - return config; -}; -exports.withAndroidFFMPEGPackage = withAndroidFFMPEGPackage; -function addPackageName(src, packageName) { - const tag = "ffmpeg-kit-react-native-package"; - const gradleMaven = packageName - ? `ext { ffmpegKitPackage = "${packageName}" }` - : ""; - return appendContents({ - tag, - src, - newSrc: gradleMaven, - comment: "//", - }).contents; -} -exports.addPackageName = addPackageName; -// Fork of config-plugins mergeContents, but appends the contents to the end of the file. -function appendContents({ src, newSrc, tag, comment, }) { - const header = (0, generateCode_1.createGeneratedHeaderComment)(newSrc, tag, comment); - if (!src.includes(header)) { - // Ensure the old generated contents are removed. - let sanitizedTarget = (0, generateCode_1.removeGeneratedContents)(src, tag); - if (sanitizedTarget) - sanitizedTarget += "\n"; - const contentsToAdd = [ - // @something - header, - // contents - newSrc, - // @end - `${comment} @generated end ${tag}`, - ].join("\n"); - return { - contents: (sanitizedTarget ?? src) + contentsToAdd, - didMerge: true, - didClear: !!sanitizedTarget, - }; - } - return { contents: src, didClear: false, didMerge: false }; -} -// This is required if you have several libraries which include libc++_shared.so as a dependency. -// See https://github.com/tanersener/ffmpeg-kit/wiki/Tips#2-depending-another-android-library-containing-libc_sharedso -function withLibCppSharedSo(config) { - return (0, config_plugins_1.withGradleProperties)(config, (config) => { - config.modResults.push({ - type: "property", - key: "android.packagingOptions.pickFirsts", - value: "lib/x86/libc++_shared.so,lib/x86_64/libc++_shared.so,lib/armeabi-v7a/libc++_shared.so,lib/arm64-v8a/libc++_shared.so", - }); - return config; - }); -} diff --git a/packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.d.ts b/packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.d.ts deleted file mode 100644 index 3ba02c4e..00000000 --- a/packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare const withPodfilePropertiesPackage: ConfigPlugin; -/** Dangerously adds the custom import to the CocoaPods. */ -export declare const withCocoaPodsImport: ConfigPlugin; -export declare function addCocoaPodsImport(src: string): string; diff --git a/packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.js b/packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.js deleted file mode 100644 index 87356fc8..00000000 --- a/packages/ffmpeg-kit-react-native/build/withCocoaPodsImport.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addCocoaPodsImport = exports.withCocoaPodsImport = exports.withPodfilePropertiesPackage = void 0; -const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); -const config_plugins_1 = require("expo/config-plugins"); -const fs_1 = require("fs"); -const path_1 = __importDefault(require("path")); -const withPodfilePropertiesPackage = (config, packageName) => { - return (0, config_plugins_1.withPodfileProperties)(config, (config) => { - // @ts-ignore: wrong type - config.modResults["ffmpeg-kit-react-native.subspecs"] = [ - packageName, - ].filter(Boolean); - return config; - }); -}; -exports.withPodfilePropertiesPackage = withPodfilePropertiesPackage; -/** Dangerously adds the custom import to the CocoaPods. */ -const withCocoaPodsImport = (c) => { - return (0, config_plugins_1.withDangerousMod)(c, [ - "ios", - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - async (config) => { - const file = path_1.default.join(config.modRequest.platformProjectRoot, "Podfile"); - const contents = await fs_1.promises.readFile(file, "utf8"); - await fs_1.promises.writeFile(file, addCocoaPodsImport(contents), "utf-8"); - return config; - }, - ]); -}; -exports.withCocoaPodsImport = withCocoaPodsImport; -function addCocoaPodsImport(src) { - return (0, generateCode_1.mergeContents)({ - tag: `ffmpeg-kit-react-native-import`, - src, - newSrc: ` pod 'ffmpeg-kit-react-native', :subspecs => podfile_properties['ffmpeg-kit-react-native.subspecs'] || [], :podspec => File.join(File.dirname(\`node --print "require.resolve('ffmpeg-kit-react-native/package.json')"\`), "ffmpeg-kit-react-native.podspec")`, - anchor: /use_native_modules/, - // We can't go after the use_native_modules block because it might have parameters, causing it to be multi-line (see react-native template). - offset: 0, - comment: "#", - }).contents; -} -exports.addCocoaPodsImport = addCocoaPodsImport; diff --git a/packages/ffmpeg-kit-react-native/build/withFFMPEG.d.ts b/packages/ffmpeg-kit-react-native/build/withFFMPEG.d.ts deleted file mode 100644 index 418f81d4..00000000 --- a/packages/ffmpeg-kit-react-native/build/withFFMPEG.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -type Package = "min" | "min-gpl" | "https" | "https-gpl" | "audio" | "video" | "full" | "full-gpl"; -export type Props = { - package?: Package; - ios?: { - package?: Package; - }; - android?: { - package?: Package; - }; -}; -export {}; diff --git a/packages/ffmpeg-kit-react-native/build/withFFMPEG.js b/packages/ffmpeg-kit-react-native/build/withFFMPEG.js deleted file mode 100644 index 668d8adf..00000000 --- a/packages/ffmpeg-kit-react-native/build/withFFMPEG.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const expo_build_properties_1 = require("expo-build-properties"); -const config_plugins_1 = require("expo/config-plugins"); -const withAndroidFFMPEGPackage_1 = require("./withAndroidFFMPEGPackage"); -const withCocoaPodsImport_1 = require("./withCocoaPodsImport"); -let pkg = { - name: "ffmpeg-kit-react-native", -}; -try { - pkg = require("ffmpeg-kit-react-native/package.json"); -} -catch { - // empty catch block -} -const withFFMPEG = (config, _props) => { - const props = _props || {}; - const iosPackage = props.ios?.package || props.package; - const androidPackage = props.android?.package || props.package; - return (0, config_plugins_1.withPlugins)(config, [ - // iOS - [withCocoaPodsImport_1.withPodfilePropertiesPackage, iosPackage], - withCocoaPodsImport_1.withCocoaPodsImport, - // Android - // Set min SDK Version to 24. - [ - expo_build_properties_1.withBuildProperties, - { - android: { - // https://github.com/expo/expo/blob/sdk-46/templates/expo-template-bare-minimum/android/build.gradle#L8 - minSdkVersion: 24, - }, - }, - ], - [withAndroidFFMPEGPackage_1.withAndroidFFMPEGPackage, androidPackage], - ]); -}; -module.exports = (0, config_plugins_1.createRunOncePlugin)(withFFMPEG, pkg.name, pkg.version); diff --git a/packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.d.ts b/packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.d.ts deleted file mode 100644 index 62079148..00000000 --- a/packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ConfigPlugin, XcodeProject } from "expo/config-plugins"; -type IosDeploymentTargetConfigPlugin = ConfigPlugin<{ - deploymentTarget: string; -}>; -export declare const withIosDeploymentTarget: IosDeploymentTargetConfigPlugin; -export declare function updateDeploymentTargetXcodeProject(project: XcodeProject, deploymentTarget: string): XcodeProject; -export {}; diff --git a/packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.js b/packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.js deleted file mode 100644 index a688c541..00000000 --- a/packages/ffmpeg-kit-react-native/build/withIosDeploymentTarget.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateDeploymentTargetXcodeProject = exports.withIosDeploymentTarget = void 0; -// Copied from https://github.com/expo/expo-cli/blob/main/packages/install-expo-modules/src/plugins/ios/withIosDeploymentTarget.ts -const config_plugins_1 = require("expo/config-plugins"); -const semver_1 = __importDefault(require("semver")); -const withIosDeploymentTarget = (config, props) => { - config = withIosDeploymentTargetPodfile(config, props); - config = withIosDeploymentTargetXcodeProject(config, props); - return config; -}; -exports.withIosDeploymentTarget = withIosDeploymentTarget; -const withIosDeploymentTargetPodfile = (config, props) => { - return (0, config_plugins_1.withPodfileProperties)(config, async (config) => { - const existing = config.modResults["ios.deploymentTarget"]; - if (typeof existing !== "string" || - semver_1.default.lt(toSemVer(existing), toSemVer(props.deploymentTarget))) { - config.modResults["ios.deploymentTarget"] = props.deploymentTarget; - } - return config; - }); -}; -const withIosDeploymentTargetXcodeProject = (config, props) => { - return (0, config_plugins_1.withXcodeProject)(config, (config) => { - config.modResults = updateDeploymentTargetXcodeProject(config.modResults, props.deploymentTarget); - return config; - }); -}; -function updateDeploymentTargetXcodeProject(project, deploymentTarget) { - const configurations = project.pbxXCBuildConfigurationSection(); - // @ts-ignore - for (const { buildSettings } of Object.values(configurations ?? {})) { - const currDeploymentTarget = buildSettings?.IPHONEOS_DEPLOYMENT_TARGET; - if (currDeploymentTarget && - semver_1.default.lt(toSemVer(currDeploymentTarget), toSemVer(deploymentTarget))) { - buildSettings.IPHONEOS_DEPLOYMENT_TARGET = deploymentTarget; - } - } - return project; -} -exports.updateDeploymentTargetXcodeProject = updateDeploymentTargetXcodeProject; -function toSemVer(version) { - return semver_1.default.coerce(version) ?? new semver_1.default.SemVer("0.0.0"); -} diff --git a/packages/ios-stickers/build/generateImessageIconsAsync.d.ts b/packages/ios-stickers/build/generateImessageIconsAsync.d.ts deleted file mode 100644 index 3f201a39..00000000 --- a/packages/ios-stickers/build/generateImessageIconsAsync.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type ContentsJsonImageIdiom = "iphone" | "ipad" | "ios-marketing" | "universal"; -export type ContentsJsonImageAppearance = { - appearance: "luminosity"; - value: "dark"; -}; -export type ContentsJsonImageScale = "1x" | "2x" | "3x"; -export interface ContentsJsonImage { - appearances?: ContentsJsonImageAppearance[]; - idiom: ContentsJsonImageIdiom; - size?: string; - scale: ContentsJsonImageScale; - filename?: string; - platform?: string; -} -export declare function generateImessageIconsAsync(projectRoot: string, icon: string, iconsPath: string): Promise; diff --git a/packages/ios-stickers/build/generateImessageIconsAsync.js b/packages/ios-stickers/build/generateImessageIconsAsync.js deleted file mode 100644 index b8381897..00000000 --- a/packages/ios-stickers/build/generateImessageIconsAsync.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.generateImessageIconsAsync = void 0; -const image_utils_1 = require("@expo/image-utils"); -const fs_1 = __importDefault(require("fs")); -const path_1 = require("path"); -const IMAGE_CACHE_NAME = "ios-stickers-icons"; -// Hard-coding seemed like the clearest and safest way to implement the sizes. -const ICON_CONTENTS = [ - { - idiom: "iphone", - sizes: [ - { - size: 29, - scales: [2, 3], - }, - { - size: [60, 45], - scales: [2, 3], - }, - ], - }, - { - idiom: "ipad", - sizes: [ - { - size: 29, - scales: [2], - }, - { - size: [67, 50], - scales: [2], - }, - { - size: [74, 55], - scales: [2], - }, - ], - }, - { - idiom: "universal", - sizes: [ - { - platform: "ios", - size: [27, 20], - scales: [2, 3], - }, - { - platform: "ios", - size: [32, 24], - scales: [2, 3], - }, - ], - }, - { - idiom: "ios-marketing", - sizes: [ - { - size: 1024, - scales: [1], - }, - { - platform: "ios", - size: [1024, 768], - scales: [1], - }, - ], - }, -]; -async function generateImessageIconsAsync(projectRoot, icon, iconsPath) { - // Ensure the Images.xcassets/AppIcon.appiconset path exists - fs_1.default.mkdirSync(iconsPath, { recursive: true }); - // Store the image JSON data for assigning via the Contents.json - const imagesJson = []; - // keep track of icons that have been generated so we can reuse them in the Contents.json - const generatedIcons = {}; - for (const platform of ICON_CONTENTS) { - // const isMarketing = platform.idiom === 'ios-marketing'; - for (const { size, scales, ...rest } of platform.sizes) { - for (const scale of scales) { - // The marketing icon is special because it makes no sense. - const filename = getAppleIconName(size, scale, platform.idiom); - // Only create an image that hasn't already been generated. - const [width, height] = Array.isArray(size) ? size : [size, size]; - if (!(filename in generatedIcons)) { - const iconWSizePx = width * scale; - const iconHSizePx = height * scale; - // Using this method will cache the images in `.expo` based on the properties used to generate them. - // this method also supports remote URLs and using the global sharp instance. - const { source } = await (0, image_utils_1.generateImageAsync)({ projectRoot, cacheType: IMAGE_CACHE_NAME }, { - src: icon, - name: filename, - width: iconWSizePx, - height: iconHSizePx, - removeTransparency: true, - // The icon should be square, but if it's not then it will be cropped. - resizeMode: "cover", - // Force the background color to solid white to prevent any transparency. - // TODO: Maybe use a more adaptive option based on the icon color? - backgroundColor: "#ffffff", - }); - // Write image buffer to the file system. - const assetPath = (0, path_1.join)(iconsPath, filename); - await fs_1.default.promises.writeFile(assetPath, source); - // Save a reference to the generated image so we don't create a duplicate. - generatedIcons[filename] = true; - } - const imgJson = { - filename, - idiom: platform.idiom, - scale: `${scale}x`, - size: `${width}x${height}`, - }; - // This order closely matches Xcode formatting. - imagesJson.push(imgJson); - if (rest.platform) { - imgJson.platform = rest.platform; - } - } - } - } - return imagesJson; -} -exports.generateImessageIconsAsync = generateImessageIconsAsync; -function getAppleIconName(size, scale, idiom) { - const [width, height] = Array.isArray(size) ? size : [size, size]; - return `App-Icon-${idiom}-${width}x${height}@${scale}x.png`; -} diff --git a/packages/ios-stickers/build/options.json b/packages/ios-stickers/build/options.json deleted file mode 100644 index 8b9e1a8e..00000000 --- a/packages/ios-stickers/build/options.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "title": "@config-plugins/ios-stickers options", - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "#/definitions/Props", - "definitions": { - "Props": { - "type": "object", - "properties": { - "stickers": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Sticker" - } - ] - } - }, - "icon": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stickerBundleId": { - "type": "string" - }, - "columns": { - "type": "number", - "enum": [ - 2, - 3, - 4 - ] - } - }, - "additionalProperties": false - }, - "Sticker": { - "type": "object", - "properties": { - "image": { - "type": "string" - }, - "name": { - "type": "string" - }, - "accessibilityLabel": { - "type": "string" - } - }, - "required": [ - "image" - ], - "additionalProperties": false - } - } -} diff --git a/packages/ios-stickers/build/withStickerAssets.d.ts b/packages/ios-stickers/build/withStickerAssets.d.ts deleted file mode 100644 index 197b01be..00000000 --- a/packages/ios-stickers/build/withStickerAssets.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -/** Dangerously applies sticker assets to the iOS project. */ -export declare const withStickerAssets: ConfigPlugin<{ - icon?: string; - size: string; - stickers: Sticker[]; -}>; -export type Sticker = { - image: string; - name?: string; - accessibilityLabel?: string; -}; -export type Props = { - stickers?: (string | Sticker)[]; - icon?: string; - name?: string; - stickerBundleId?: string; - columns?: 2 | 3 | 4; -}; diff --git a/packages/ios-stickers/build/withStickerAssets.js b/packages/ios-stickers/build/withStickerAssets.js deleted file mode 100644 index d4854ab6..00000000 --- a/packages/ios-stickers/build/withStickerAssets.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withStickerAssets = void 0; -const image_utils_1 = require("@expo/image-utils"); -const config_plugins_1 = require("expo/config-plugins"); -const fs_1 = __importDefault(require("fs")); -const path_1 = __importDefault(require("path")); -const generateImessageIconsAsync_1 = require("./generateImessageIconsAsync"); -const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget"); -const STICKERS_ROOT_PATH = "Stickers.xcassets"; -const IMESSAGE_APP_ICON_PATH = "Stickers.xcassets/iMessage App Icon.stickersiconset"; -const STICKER_PACK_PATH = "Stickers.xcassets/Sticker Pack.stickerpack"; -const defaultInfo = { - author: "expo", - version: 1, -}; -const stickersRootContents = { - info: defaultInfo, -}; -function createSticker({ stickerpackPath, name, imageBuffer, extension, accessibilityLabel, }) { - const stickerName = `${name}.sticker`; - const stickerPath = path_1.default.join(stickerpackPath, stickerName); - fs_1.default.mkdirSync(stickerPath, { recursive: true }); - // TODO: support other mime types - const imageName = `image${extension || ".png"}`; - const contents = { - info: defaultInfo, - properties: { - filename: imageName, - }, - }; - // If undefined, defaults to the name of the sticker - if (accessibilityLabel) { - contents.properties["accessibility-label"] = accessibilityLabel; - } - fs_1.default.writeFileSync(path_1.default.join(stickerPath, imageName), imageBuffer); - // Persist contents - const contentsPath = path_1.default.join(stickerPath, "Contents.json"); - fs_1.default.writeFileSync(contentsPath, JSON.stringify(contents, null, 2)); - return { - name: stickerName, - }; -} -/** Dangerously applies sticker assets to the iOS project. */ -const withStickerAssets = (config, { stickers, icon, size }) => { - // Default to using the app icon - if (!icon) { - icon = (config.ios || {}).icon || config.icon; - } - return (0, config_plugins_1.withDangerousMod)(config, [ - "ios", - async (config) => { - const stickerPackName = (0, withStickerXcodeTarget_1.getProjectStickersName)(config.modRequest.projectName); - const stickerRootPath = path_1.default.join(config.modRequest.platformProjectRoot, stickerPackName); - const stickersAssetsPath = path_1.default.join(stickerRootPath, STICKERS_ROOT_PATH); - // Delete all assets... - await fs_1.default.promises - .rm(stickersAssetsPath, { recursive: true, force: true }) - .catch(() => null); - const stickersRootContentsJsonPath = path_1.default.join(stickersAssetsPath, "Contents.json"); - fs_1.default.mkdirSync(stickersAssetsPath, { - recursive: true, - }); - // Xcode has trouble with the Contents.json for marketing images - fs_1.default.writeFileSync(stickersRootContentsJsonPath, JSON.stringify(stickersRootContents, null, 2)); - // iMessage icon - const iMessageAppIconsPath = path_1.default.join(stickerRootPath, IMESSAGE_APP_ICON_PATH); - // Only generate icons if an icon is defined - const imessageIconContents = icon - ? await (0, generateImessageIconsAsync_1.generateImessageIconsAsync)(config.modRequest.projectRoot, icon, iMessageAppIconsPath) - : []; - const iMessageAppIconContentsJsonPath = path_1.default.join(iMessageAppIconsPath, "Contents.json"); - fs_1.default.mkdirSync(iMessageAppIconsPath, { - recursive: true, - }); - fs_1.default.writeFileSync(iMessageAppIconContentsJsonPath, JSON.stringify({ images: imessageIconContents, info: defaultInfo }, null, 2)); - const stickerPackContentsPath = path_1.default.join(stickerRootPath, STICKER_PACK_PATH); - const stickersContents = { - info: defaultInfo, - properties: { - "grid-size": size, - }, - stickers: [], - }; - if (Array.isArray(stickers)) { - for (const sticker of stickers) { - const src = typeof sticker === "string" ? sticker : sticker.image; - // TODO: warn when image is bigger than 512000 bytes... - // Using this method will cache the images in `.expo` based on the properties used to generate them. - // this method also supports remote URLs and using the global sharp instance. - // TODO: Support GIFs - const { source, name: _name } = await (0, image_utils_1.generateImageAsync)({ - projectRoot: config.modRequest.projectRoot, - cacheType: "ios-stickers", - }, { - src, - }); - // let results; - const results = createSticker({ - stickerpackPath: stickerPackContentsPath, - name: sticker.name || _name, - imageBuffer: source, - extension: path_1.default.extname(_name), - accessibilityLabel: sticker.accessibilityLabel, - }); - stickersContents.stickers.push({ - filename: results.name, - }); - } - } - const stickerPackContentsJsonPath = path_1.default.join(stickerPackContentsPath, "Contents.json"); - fs_1.default.mkdirSync(stickerPackContentsPath, { - recursive: true, - }); - // TODO - fs_1.default.writeFileSync(stickerPackContentsJsonPath, JSON.stringify(stickersContents, null, 2)); - return config; - }, - ]); -}; -exports.withStickerAssets = withStickerAssets; diff --git a/packages/ios-stickers/build/withStickerInfoPlist.d.ts b/packages/ios-stickers/build/withStickerInfoPlist.d.ts deleted file mode 100644 index 05bc0817..00000000 --- a/packages/ios-stickers/build/withStickerInfoPlist.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -import { Props } from "./withStickerAssets"; -export declare const withStickersPlist: ConfigPlugin>; diff --git a/packages/ios-stickers/build/withStickerInfoPlist.js b/packages/ios-stickers/build/withStickerInfoPlist.js deleted file mode 100644 index d116b44a..00000000 --- a/packages/ios-stickers/build/withStickerInfoPlist.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withStickersPlist = void 0; -const plist_1 = __importDefault(require("@expo/plist")); -const config_plugins_1 = require("expo/config-plugins"); -const fs = __importStar(require("fs")); -const path = __importStar(require("path")); -const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget"); -const withStickersPlist = (config, { name }) => { - return (0, config_plugins_1.withDangerousMod)(config, [ - "ios", - async (config) => { - const stickerPackName = (0, withStickerXcodeTarget_1.getProjectStickersName)(config.modRequest.projectName); - const stickerRootPath = path.join(config.modRequest.platformProjectRoot, stickerPackName); - const filePath = path.join(stickerRootPath, "Info.plist"); - const stickers = { - CFBundleDevelopmentRegion: "$(DEVELOPMENT_LANGUAGE)", - CFBundleExecutable: "$(EXECUTABLE_NAME)", - CFBundleIdentifier: "$(PRODUCT_BUNDLE_IDENTIFIER)", - CFBundleInfoDictionaryVersion: "6.0", - CFBundleName: "$(PRODUCT_NAME)", - CFBundlePackageType: "$(PRODUCT_BUNDLE_PACKAGE_TYPE)", - NSExtension: { - NSExtensionPointIdentifier: "com.apple.message-payload-provider", - NSExtensionPrincipalClass: "StickerBrowserViewController", - }, - }; - stickers.CFBundleDisplayName = name || stickerPackName; - // The version numbers must match the main Info.plist - stickers.CFBundleVersion = config_plugins_1.IOSConfig.Version.getBuildNumber(config); - stickers.CFBundleShortVersionString = - config_plugins_1.IOSConfig.Version.getVersion(config); - await fs.promises.mkdir(path.dirname(filePath), { recursive: true }); - await fs.promises.writeFile(filePath, plist_1.default.build(stickers)); - return config; - }, - ]); -}; -exports.withStickersPlist = withStickersPlist; diff --git a/packages/ios-stickers/build/withStickerPack.d.ts b/packages/ios-stickers/build/withStickerPack.d.ts deleted file mode 100644 index ebcb3ede..00000000 --- a/packages/ios-stickers/build/withStickerPack.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -import { Props, Sticker } from "./withStickerAssets"; -export declare function normalizeStickersProps(props?: Props["stickers"]): Sticker[]; -declare const withStickerPack: ConfigPlugin; -export default withStickerPack; diff --git a/packages/ios-stickers/build/withStickerPack.js b/packages/ios-stickers/build/withStickerPack.js deleted file mode 100644 index 7a4e5a6f..00000000 --- a/packages/ios-stickers/build/withStickerPack.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.normalizeStickersProps = void 0; -const path_1 = __importDefault(require("path")); -const schema_utils_1 = require("schema-utils"); -const options_json_1 = __importDefault(require("./options.json")); -const withStickerAssets_1 = require("./withStickerAssets"); -const withStickerInfoPlist_1 = require("./withStickerInfoPlist"); -const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget"); -// TODO: Maybe the name is better to use as a prop... -const sizeColumnMap = { - 4: "small", - 3: "regular", - 2: "large", -}; -function normalizeStickersProps(props = []) { - const imagesObj = props.map((prop) => { - if (typeof prop === "string") { - return { image: prop }; - } - return prop; - }); - // Apply names - return imagesObj.map((sticker) => { - sticker.name = - sticker.name || path_1.default.basename(sticker.image, path_1.default.extname(sticker.image)); - return sticker; - }); -} -exports.normalizeStickersProps = normalizeStickersProps; -const withStickerPack = (config, options = {}) => { - // Perform option validation. - (0, schema_utils_1.validate)(options_json_1.default, options); - const { stickers, icon, name, stickerBundleId, columns = 3 } = options; - const size = sizeColumnMap[columns] || "regular"; - if (!size) { - throw new Error(`Column size "${columns}" is invalid. Expected one of: ${Object.keys(sizeColumnMap).join(", ")}`); - } - const _stickers = normalizeStickersProps(stickers); - config = (0, withStickerInfoPlist_1.withStickersPlist)(config, { name }); - config = (0, withStickerAssets_1.withStickerAssets)(config, { stickers: _stickers, icon, size }); - config = (0, withStickerXcodeTarget_1.withStickerXcodeTarget)(config, { stickerBundleId }); - return config; -}; -exports.default = withStickerPack; diff --git a/packages/ios-stickers/build/withStickerXcodeTarget.d.ts b/packages/ios-stickers/build/withStickerXcodeTarget.d.ts deleted file mode 100644 index 57d38c0e..00000000 --- a/packages/ios-stickers/build/withStickerXcodeTarget.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -import { Props } from "./withStickerAssets"; -export declare function getProjectStickersName(name: string): string; -export declare const withStickerXcodeTarget: ConfigPlugin>; diff --git a/packages/ios-stickers/build/withStickerXcodeTarget.js b/packages/ios-stickers/build/withStickerXcodeTarget.js deleted file mode 100644 index 6f374d5f..00000000 --- a/packages/ios-stickers/build/withStickerXcodeTarget.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withStickerXcodeTarget = exports.getProjectStickersName = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const xcodeSticker_1 = require("./xcodeSticker"); -const STICKERS_ROOT_PATH = "Stickers.xcassets"; -function getProjectStickersName(name) { - return `${name} Stickers`; -} -exports.getProjectStickersName = getProjectStickersName; -const withStickerXcodeTarget = (config, { stickerBundleId }) => { - return (0, config_plugins_1.withXcodeProject)(config, (config) => { - const stickerPackName = getProjectStickersName(config.modRequest.projectName); - (0, xcodeSticker_1.addStickersTarget)(config.modResults, stickerPackName, config.ios.bundleIdentifier, stickerPackName, stickerBundleId); - const stickersKey = (0, xcodeSticker_1.addStickerResourceFile)(config.modResults, STICKERS_ROOT_PATH, stickerPackName); - if (stickersKey) { - const mainGroup = (0, xcodeSticker_1.getMainPBXGroup)(config.modResults); - if (mainGroup) { - config.modResults.addToPbxGroup(stickersKey, mainGroup.id); - } - } - return config; - }); -}; -exports.withStickerXcodeTarget = withStickerXcodeTarget; diff --git a/packages/ios-stickers/build/xcodeSticker.d.ts b/packages/ios-stickers/build/xcodeSticker.d.ts deleted file mode 100644 index d0574e11..00000000 --- a/packages/ios-stickers/build/xcodeSticker.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { XcodeProject } from "expo/config-plugins"; -export declare function getMainPBXGroup(proj: XcodeProject): { - id: any; - obj: any; -} | null; -export declare function addStickerResourceFile(proj: XcodeProject, path: string, rootFolderName: string): any; -export declare function addStickersTarget(proj: XcodeProject, name: string, bundleId: string, subfolder: string, stickerBundleId?: string): false | { - uuid: any; - pbxNativeTarget: { - isa: string; - name: string; - productName: string; - productReference: any; - productType: string; - buildConfigurationList: any; - buildPhases: never[]; - buildRules: never[]; - dependencies: never[]; - }; -}; diff --git a/packages/ios-stickers/build/xcodeSticker.js b/packages/ios-stickers/build/xcodeSticker.js deleted file mode 100644 index e6170c83..00000000 --- a/packages/ios-stickers/build/xcodeSticker.js +++ /dev/null @@ -1,277 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addStickersTarget = exports.addStickerResourceFile = exports.getMainPBXGroup = void 0; -const path_1 = __importDefault(require("path")); -const util_1 = __importDefault(require("util")); -// @ts-ignore -const pbxFile_1 = __importDefault(require("xcode/lib/pbxFile")); -function getMainPBXGroup(proj) { - const project = proj.pbxProjectSection()[proj.getFirstProject().uuid]; - if (!project || !project.mainGroup) { - return null; - } - const groupObj = proj.hash.project.objects.PBXGroup[project.mainGroup]; - if (!groupObj) { - return null; - } - return { id: project.mainGroup, obj: groupObj }; -} -exports.getMainPBXGroup = getMainPBXGroup; -function addStickerResourceFile(proj, path, rootFolderName) { - const opt = {}; - let file = new pbxFile_1.default(path, opt); - if (proj.hasFile(file.path)) { - return false; - } - file.uuid = proj.generateUuid(); - file.target = opt ? opt.target : undefined; - correctForResourcesPath(file, proj); - file.fileRef = proj.generateUuid(); - // create stickers group - const stickersKey = proj.pbxCreateGroup( - // Without quotes, this breaks the xcode project - `"${rootFolderName}"`, `"${rootFolderName}"`); - proj.addToPbxBuildFileSection(file); // PBXBuildFile - // proj.addToPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase - // ^ the above was written as a shortcut, I guess nobody expected there to be another BuildPhase - // var self = proj; - const addToPbxStickersBuildPhase = function (file) { - // use the name Stickers instead of Resources to identify the new BuildPhase - const sources = proj.buildPhaseObject("PBXResourcesBuildPhase", - // "Resources", - rootFolderName, - // Resources, - file.target); - sources.files.push(pbxBuildPhaseObj(file)); - }; - addToPbxStickersBuildPhase(file); - // PBXFileReference - proj.addToPbxFileReferenceSection(file); - proj.addToPbxGroup(file, stickersKey); - // Push the Stickers Info.plist - file = new pbxFile_1.default("Info.plist", opt); - if (proj.hasFile(file.path)) { - return false; - } - file.uuid = proj.generateUuid(); - correctForResourcesPath(file, proj, rootFolderName); - file.fileRef = proj.generateUuid(); - // PBXFileReference - proj.addToPbxFileReferenceSection(file); - proj.addToPbxGroup(file, stickersKey); - return stickersKey; -} -exports.addStickerResourceFile = addStickerResourceFile; -const isaXCBuildConfiguration = "XCBuildConfiguration"; -const pbxTargetDependency = "PBXTargetDependency"; -const pbxContainerItemProxy = "PBXContainerItemProxy"; -function addStickersTarget(proj, name, bundleId, subfolder, stickerBundleId) { - // Setup uuid and name of new target - const targetUuid = proj.generateUuid(); - const targetType = "app_extension_messages_sticker_pack"; - const targetName = name.trim(); - const bundleName = subfolder.trim().split(" ").join("-"); - // Check type against list of allowed target types - if (!targetName) { - throw new Error("Target name missing."); - } - // Check type against list of allowed target types - if (!targetType) { - throw new Error("Target type missing."); - } - // Check type against list of allowed target types - if (!producttypeForTargettype(targetType)) { - throw new Error("Target type invalid: " + targetType); - } - // Either use the given bundleId for the stickers or - // generate one from the app bundleId and stickers project folder - const PRODUCT_BUNDLE_IDENTIFIER = stickerBundleId ?? `"${bundleId}.${bundleName}"`; - const INFOPLIST_FILE = `"${subfolder}/Info.plist"`; - const commonBuildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME: '"iMessage App Icon"', - CLANG_ANALYZER_NONNULL: "YES", - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION: "YES_AGGRESSIVE", - CLANG_CXX_LANGUAGE_STANDARD: '"gnu++14"', - CLANG_ENABLE_OBJC_WEAK: "YES", - CLANG_WARN_DOCUMENTATION_COMMENTS: "YES", - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: "YES", - CLANG_WARN_UNGUARDED_AVAILABILITY: "YES_AGGRESSIVE", - CODE_SIGN_STYLE: "Automatic", - DEBUG_INFORMATION_FORMAT: "dwarf", - GCC_C_LANGUAGE_STANDARD: "gnu11", - INFOPLIST_FILE, - IPHONEOS_DEPLOYMENT_TARGET: "14.5", - MTL_FAST_MATH: "YES", - PRODUCT_BUNDLE_IDENTIFIER, - PRODUCT_NAME: `"$(TARGET_NAME)"`, - SKIP_INSTALL: "YES", - TARGETED_DEVICE_FAMILY: `"1,2"`, - }; - // Build Configuration: Create - const buildConfigurationsList = [ - { - name: "Debug", - isa: isaXCBuildConfiguration, - buildSettings: { - ...commonBuildSettings, - MTL_ENABLE_DEBUG_INFO: "INCLUDE_SOURCE", - }, - }, - { - name: "Release", - isa: isaXCBuildConfiguration, - buildSettings: { - ...commonBuildSettings, - COPY_PHASE_STRIP: "NO", - }, - }, - ]; - const existing = proj.hash.project.objects[isaXCBuildConfiguration]; - for (const [, config] of Object.entries(existing)) { - if (typeof config === "string") - continue; - if (config.buildSettings.ASSETCATALOG_COMPILER_APPICON_NAME && - config.buildSettings.ASSETCATALOG_COMPILER_APPICON_NAME.match(/iMessage App Icon/)) { - // Has existing setup... - // TODO: sync old values with potentially new values... - return false; - } - } - // Build Configuration: Add - const buildConfigurations = proj.addXCConfigurationList(buildConfigurationsList, "Release", `Build configuration list for PBXNativeTarget ${quoted(targetName)} `); - // Product: Create - const productName = targetName; - const productType = producttypeForTargettype(targetType); - const productFileType = filetypeForProducttype(productType); - const productFile = proj.addProductFile(productName, { - group: "Embed App Extensions", - target: targetUuid, - explicitFileType: productFileType, - }); - // stickers - productFile.settings = productFile.settings || {}; - productFile.settings.ATTRIBUTES = ["RemoveHeadersOnCopy"]; - // Product: Add to build file list - proj.addToPbxBuildFileSection(productFile); - const strippedTargetName = path_1.default.basename(targetName, ".appex").trim(); - const quotedTargetName = quoted(strippedTargetName); - // Target: Create - const target = { - uuid: targetUuid, - pbxNativeTarget: { - isa: "PBXNativeTarget", - name: quotedTargetName, - productName: quotedTargetName, - productReference: productFile.fileRef, - productType: quoted(producttypeForTargettype(targetType)), - buildConfigurationList: buildConfigurations.uuid, - buildPhases: [], - buildRules: [], - dependencies: [], - }, - }; - // Target: Add to PBXNativeTarget section - proj.addToPbxNativeTargetSection(target); - // Product: Embed (only for "extension"-type targets) - // Create CopyFiles phase in first target - const { buildPhase } = proj.addBuildPhase([], "PBXCopyFilesBuildPhase", "Embed App Extensions", proj.getFirstTarget().uuid, - // targetType, - "app_extension"); - // TODO: Add to https://github.com/apache/cordova-node-xcode/blob/8b98cabc5978359db88dc9ff2d4c015cba40f150/lib/pbxProject.js#L1604 - buildPhase.dstSubfolderSpec = 13; - addToPbxCopyfilesBuildPhase(proj, productFile, "Embed App Extensions"); - // need to add another buildphase - // filePathsArray, buildPhaseType, comment, target - proj.addBuildPhase([], "PBXResourcesBuildPhase", subfolder, targetUuid); - // Target: Add uuid to root project - proj.addToPbxProjectSection(target); - // const pbxTargetDependencySection = proj.hash.project.objects[pbxTargetDependency]; - // These need to be defined in projects that don't have them already - if (!proj.hash.project.objects[pbxTargetDependency]) { - proj.hash.project.objects[pbxTargetDependency] = {}; - } - if (!proj.hash.project.objects[pbxContainerItemProxy]) { - proj.hash.project.objects[pbxContainerItemProxy] = {}; - } - proj.addTargetDependency(proj.getFirstTarget().uuid, [target.uuid]); - // Set the creation tools and provisioning.... - if (!proj.pbxProjectSection()[proj.getFirstProject().uuid].attributes - .TargetAttributes) { - proj.pbxProjectSection()[proj.getFirstProject().uuid].attributes.TargetAttributes = {}; - } - proj.pbxProjectSection()[proj.getFirstProject().uuid].attributes.TargetAttributes[target.uuid] = { - CreatedOnToolsVersion: "12.5", - ProvisioningStyle: "Automatic", - }; - return target; -} -exports.addStickersTarget = addStickersTarget; -// Copied over from xcode package for public -function correctForResourcesPath(file, project, name = "Resources") { - return correctForPath(file, project, name); -} -function correctForPath(file, project, group) { - const r_group_dir = new RegExp("^" + group + "[\\\\/]"); - const _group = project.pbxGroupByName(group); - if (_group && _group.path) { - file.path = file.path.replace(r_group_dir, ""); - } - return file; -} -function addToPbxCopyfilesBuildPhase(proj, file, name) { - const sources = proj.buildPhaseObject("PBXCopyFilesBuildPhase", name || "Copy Files", file.target); - sources.files.push(pbxBuildPhaseObj(file)); -} -function producttypeForTargettype(targetType) { - const PRODUCTTYPE_BY_TARGETTYPE = { - application: "com.apple.product-type.application", - app_extension: "com.apple.product-type.app-extension", - bundle: "com.apple.product-type.bundle", - command_line_tool: "com.apple.product-type.tool", - dynamic_library: "com.apple.product-type.library.dynamic", - framework: "com.apple.product-type.framework", - static_library: "com.apple.product-type.library.static", - unit_test_bundle: "com.apple.product-type.bundle.unit-test", - watch_app: "com.apple.product-type.application.watchapp", - watch2_app: "com.apple.product-type.application.watchapp2", - watch_extension: "com.apple.product-type.watchkit-extension", - watch2_extension: "com.apple.product-type.watchkit2-extension", - // Custom - app_extension_messages_sticker_pack: "com.apple.product-type.app-extension.messages-sticker-pack", - }; - return PRODUCTTYPE_BY_TARGETTYPE[targetType]; -} -function filetypeForProducttype(productType) { - const FILETYPE_BY_PRODUCTTYPE = { - "com.apple.product-type.application": '"wrapper.application"', - "com.apple.product-type.app-extension": '"wrapper.app-extension"', - "com.apple.product-type.bundle": '"wrapper.plug-in"', - "com.apple.product-type.tool": '"compiled.mach-o.dylib"', - "com.apple.product-type.library.dynamic": '"compiled.mach-o.dylib"', - "com.apple.product-type.framework": '"wrapper.framework"', - "com.apple.product-type.library.static": '"archive.ar"', - "com.apple.product-type.bundle.unit-test": '"wrapper.cfbundle"', - "com.apple.product-type.application.watchapp": '"wrapper.application"', - "com.apple.product-type.application.watchapp2": '"wrapper.application"', - "com.apple.product-type.watchkit-extension": '"wrapper.app-extension"', - "com.apple.product-type.watchkit2-extension": '"wrapper.app-extension"', - // Custom - "com.apple.product-type.app-extension.messages-sticker-pack": '"wrapper.app-extension"', - }; - return FILETYPE_BY_PRODUCTTYPE[productType]; -} -function pbxBuildPhaseObj(file) { - const obj = Object.create(null); - obj.value = file.uuid; - obj.comment = longComment(file); - return obj; -} -function longComment(file) { - return util_1.default.format("%s in %s", file.basename, file.group); -} -function quoted(str) { - return util_1.default.format(`"%s"`, str); -} diff --git a/packages/react-native-ble-plx/.eslintrc.js b/packages/react-native-ble-plx/.eslintrc.js deleted file mode 100644 index 27201978..00000000 --- a/packages/react-native-ble-plx/.eslintrc.js +++ /dev/null @@ -1,2 +0,0 @@ -// @generated by expo-module-scripts -module.exports = require('expo-module-scripts/eslintrc.base.js'); diff --git a/packages/react-native-ble-plx/CHANGELOG.md b/packages/react-native-ble-plx/CHANGELOG.md deleted file mode 100644 index 0177a6b0..00000000 --- a/packages/react-native-ble-plx/CHANGELOG.md +++ /dev/null @@ -1,47 +0,0 @@ -### @config-plugins/react-native-ble-plx 6.0.0 - -- Expo SDK 48 support - -### @config-plugins/react-native-ble-plx [2.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-ble-plx@2.0.0...@config-plugins/react-native-ble-plx@2.0.1) (2022-07-25) - -### Bug Fixes - -- **react-native-ble-plx:** Added new Bluetooth specific permission for Android 12 (SDK 31). ([#91](https://github.com/expo/config-plugins/issues/91)) ([d3df63f](https://github.com/expo/config-plugins/commit/d3df63fbb2344251b9b371959de3ce6e4b9ab0cd)) - -## @config-plugins/react-native-ble-plx [2.0.0](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-ble-plx@1.0.3...@config-plugins/react-native-ble-plx@2.0.0) (2022-05-27) - -### ⚠ BREAKING CHANGES - -- add SDK 45 support (#79) - -### Features - -- add SDK 45 support ([#79](https://github.com/expo/config-plugins/issues/79)) ([96c72dd](https://github.com/expo/config-plugins/commit/96c72dda469ace2b9eafd38ba4d21f1bcd2e3cdf)) - -### Other chores - -- publish packages [no-ci] ([0c7b413](https://github.com/expo/config-plugins/commit/0c7b413a765e4b1ff92b9e3edc2b62077c41ce46)) - -### @config-plugins/react-native-ble-plx [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-ble-plx@1.0.2...@config-plugins/react-native-ble-plx@1.0.3) (2022-05-09) - -### Other chores - -- **react-native-ble-plx:** lint fix ([a99c60e](https://github.com/expo/config-plugins/commit/a99c60efd5fe53d369551c9a1323701ab14e935b)) - -### @config-plugins/react-native-ble-plx [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-ble-plx@1.0.1...@config-plugins/react-native-ble-plx@1.0.2) (2022-03-22) - -### Other chores - -- git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904)) - -### @config-plugins/react-native-ble-plx [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/react-native-ble-plx@1.0.0...@config-plugins/react-native-ble-plx@1.0.1) (2022-03-16) - -### Continuous Integration - -- fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089)) - -## @config-plugins/react-native-ble-plx 1.0.0 (2022-03-15) - -### Other chores - -- upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d)) diff --git a/packages/react-native-ble-plx/README.md b/packages/react-native-ble-plx/README.md index 867f55c8..f27a1349 100644 --- a/packages/react-native-ble-plx/README.md +++ b/packages/react-native-ble-plx/README.md @@ -1,5 +1,7 @@ # config-plugins/react-native-ble-plx +> [!IMPORTANT] > `react-native-ble-plx` now has upstream support for Expo Config Plugins, this package is no longer necessary. Please remove it from your project and use the latest version of `react-native-ble-plx` instead. + Config plugin to auto-configure `react-native-ble-plx` when the native code is generated (`npx expo prebuild`). [Upstream PR](https://github.com/Polidea/react-native-ble-plx/pull/842). ## Expo installation diff --git a/packages/react-native-ble-plx/app.plugin.js b/packages/react-native-ble-plx/app.plugin.js deleted file mode 100644 index 8be5bd68..00000000 --- a/packages/react-native-ble-plx/app.plugin.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./build/withBLE"); diff --git a/packages/react-native-ble-plx/build/withBLE.d.ts b/packages/react-native-ble-plx/build/withBLE.d.ts deleted file mode 100644 index 9aff4573..00000000 --- a/packages/react-native-ble-plx/build/withBLE.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -import { BackgroundMode } from "./withBLEBackgroundModes"; -export { BackgroundMode }; -declare const _default: ConfigPlugin; -export default _default; diff --git a/packages/react-native-ble-plx/build/withBLE.js b/packages/react-native-ble-plx/build/withBLE.js deleted file mode 100644 index f0ebf8fd..00000000 --- a/packages/react-native-ble-plx/build/withBLE.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BackgroundMode = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const withBLEAndroidManifest_1 = require("./withBLEAndroidManifest"); -const withBLEBackgroundModes_1 = require("./withBLEBackgroundModes"); -Object.defineProperty(exports, "BackgroundMode", { enumerable: true, get: function () { return withBLEBackgroundModes_1.BackgroundMode; } }); -const withBluetoothPermissions_1 = require("./withBluetoothPermissions"); -const pkg = { name: "react-native-ble-plx", version: "UNVERSIONED" }; //require('react-native-ble-plx/package.json') -/** - * Apply BLE native configuration. - */ -const withBLE = (config, props = {}) => { - const _props = props || {}; - const isBackgroundEnabled = _props.isBackgroundEnabled ?? false; - const neverForLocation = _props.neverForLocation ?? false; - if ("bluetoothPeripheralPermission" in _props) { - config_plugins_1.WarningAggregator.addWarningIOS("bluetoothPeripheralPermission", `The iOS permission \`NSBluetoothPeripheralUsageDescription\` is fully deprecated as of iOS 13 (lowest iOS version in Expo SDK 47+). Remove the \`bluetoothPeripheralPermission\` property from the \`@config-plugins/react-native-ble-plx\` config plugin.`); - } - // iOS - config = (0, withBluetoothPermissions_1.withBluetoothPermissions)(config, _props); - config = (0, withBLEBackgroundModes_1.withBLEBackgroundModes)(config, _props.modes || []); - // Android - config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [ - "android.permission.BLUETOOTH", - "android.permission.BLUETOOTH_ADMIN", - "android.permission.BLUETOOTH_CONNECT", // since Android SDK 31 - ]); - config = (0, withBLEAndroidManifest_1.withBLEAndroidManifest)(config, { - isBackgroundEnabled, - neverForLocation, - }); - return config; -}; -exports.default = (0, config_plugins_1.createRunOncePlugin)(withBLE, pkg.name, pkg.version); diff --git a/packages/react-native-ble-plx/build/withBLEAndroidManifest.d.ts b/packages/react-native-ble-plx/build/withBLEAndroidManifest.d.ts deleted file mode 100644 index 28b5cf0e..00000000 --- a/packages/react-native-ble-plx/build/withBLEAndroidManifest.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { ConfigPlugin, AndroidConfig } from "expo/config-plugins"; -type InnerManifest = AndroidConfig.Manifest.AndroidManifest["manifest"]; -type ManifestPermission = InnerManifest["permission"]; -type ExtraTools = { - "tools:targetApi"?: string; -}; -type ManifestUsesPermissionWithExtraTools = { - $: AndroidConfig.Manifest.ManifestUsesPermission["$"] & ExtraTools; -}; -type AndroidManifest = { - manifest: InnerManifest & { - permission?: ManifestPermission; - "uses-permission"?: ManifestUsesPermissionWithExtraTools[]; - "uses-permission-sdk-23"?: ManifestUsesPermissionWithExtraTools[]; - "uses-feature"?: InnerManifest["uses-feature"]; - }; -}; -export declare const withBLEAndroidManifest: ConfigPlugin<{ - isBackgroundEnabled: boolean; - neverForLocation: boolean; -}>; -/** - * Add location permissions - * - 'android.permission.ACCESS_COARSE_LOCATION' for Android SDK 28 (Android 9) and lower - * - 'android.permission.ACCESS_FINE_LOCATION' for Android SDK 29 (Android 10) and higher. - * From Android SDK 31 (Android 12) it might not be required if BLE is not used for location. - */ -export declare function addLocationPermissionToManifest(androidManifest: AndroidManifest, neverForLocationSinceSdk31: boolean): AndroidManifest; -/** - * Add 'android.permission.BLUETOOTH_SCAN'. - * Required since Android SDK 31 (Android 12). - */ -export declare function addScanPermissionToManifest(androidManifest: AndroidManifest, neverForLocation: boolean): AndroidManifest; -export declare function addBLEHardwareFeatureToManifest(androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest; -export {}; diff --git a/packages/react-native-ble-plx/build/withBLEAndroidManifest.js b/packages/react-native-ble-plx/build/withBLEAndroidManifest.js deleted file mode 100644 index a0d19595..00000000 --- a/packages/react-native-ble-plx/build/withBLEAndroidManifest.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addBLEHardwareFeatureToManifest = exports.addScanPermissionToManifest = exports.addLocationPermissionToManifest = exports.withBLEAndroidManifest = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const withBLEAndroidManifest = (config, { isBackgroundEnabled, neverForLocation }) => { - return (0, config_plugins_1.withAndroidManifest)(config, (config) => { - config.modResults = addLocationPermissionToManifest(config.modResults, neverForLocation); - config.modResults = addScanPermissionToManifest(config.modResults, neverForLocation); - if (isBackgroundEnabled) { - config.modResults = addBLEHardwareFeatureToManifest(config.modResults); - } - return config; - }); -}; -exports.withBLEAndroidManifest = withBLEAndroidManifest; -/** - * Add location permissions - * - 'android.permission.ACCESS_COARSE_LOCATION' for Android SDK 28 (Android 9) and lower - * - 'android.permission.ACCESS_FINE_LOCATION' for Android SDK 29 (Android 10) and higher. - * From Android SDK 31 (Android 12) it might not be required if BLE is not used for location. - */ -function addLocationPermissionToManifest(androidManifest, neverForLocationSinceSdk31) { - if (!Array.isArray(androidManifest.manifest["uses-permission-sdk-23"])) { - androidManifest.manifest["uses-permission-sdk-23"] = []; - } - const optMaxSdkVersion = neverForLocationSinceSdk31 - ? { - "android:maxSdkVersion": "30", - } - : {}; - if (!androidManifest.manifest["uses-permission-sdk-23"].find((item) => item.$["android:name"] === "android.permission.ACCESS_COARSE_LOCATION")) { - androidManifest.manifest["uses-permission-sdk-23"].push({ - $: { - "android:name": "android.permission.ACCESS_COARSE_LOCATION", - ...optMaxSdkVersion, - }, - }); - } - if (!androidManifest.manifest["uses-permission-sdk-23"].find((item) => item.$["android:name"] === "android.permission.ACCESS_FINE_LOCATION")) { - androidManifest.manifest["uses-permission-sdk-23"].push({ - $: { - "android:name": "android.permission.ACCESS_FINE_LOCATION", - ...optMaxSdkVersion, - }, - }); - } - return androidManifest; -} -exports.addLocationPermissionToManifest = addLocationPermissionToManifest; -/** - * Add 'android.permission.BLUETOOTH_SCAN'. - * Required since Android SDK 31 (Android 12). - */ -function addScanPermissionToManifest(androidManifest, neverForLocation) { - if (!Array.isArray(androidManifest.manifest["uses-permission"])) { - androidManifest.manifest["uses-permission"] = []; - } - if (!androidManifest.manifest["uses-permission"].find((item) => item.$["android:name"] === "android.permission.BLUETOOTH_SCAN")) { - config_plugins_1.AndroidConfig.Manifest.ensureToolsAvailable(androidManifest); - androidManifest.manifest["uses-permission"]?.push({ - $: { - "android:name": "android.permission.BLUETOOTH_SCAN", - ...(neverForLocation - ? { - "android:usesPermissionFlags": "neverForLocation", - } - : {}), - "tools:targetApi": "31", - }, - }); - } - return androidManifest; -} -exports.addScanPermissionToManifest = addScanPermissionToManifest; -// Add this line if your application always requires BLE. More info can be found on: https://developer.android.com/guide/topics/connectivity/bluetooth-le.html#permissions -function addBLEHardwareFeatureToManifest(androidManifest) { - // Add `` to the AndroidManifest.xml - if (!Array.isArray(androidManifest.manifest["uses-feature"])) { - androidManifest.manifest["uses-feature"] = []; - } - if (!androidManifest.manifest["uses-feature"].find((item) => item.$["android:name"] === "android.hardware.bluetooth_le")) { - androidManifest.manifest["uses-feature"]?.push({ - $: { - "android:name": "android.hardware.bluetooth_le", - "android:required": "true", - }, - }); - } - return androidManifest; -} -exports.addBLEHardwareFeatureToManifest = addBLEHardwareFeatureToManifest; diff --git a/packages/react-native-ble-plx/build/withBLEBackgroundModes.d.ts b/packages/react-native-ble-plx/build/withBLEBackgroundModes.d.ts deleted file mode 100644 index 8dbabc48..00000000 --- a/packages/react-native-ble-plx/build/withBLEBackgroundModes.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare enum BackgroundMode { - Central = "central", - Peripheral = "peripheral" -} -/** - * Append `UIBackgroundModes` to the `Info.plist`. - */ -export declare const withBLEBackgroundModes: ConfigPlugin; diff --git a/packages/react-native-ble-plx/build/withBLEBackgroundModes.js b/packages/react-native-ble-plx/build/withBLEBackgroundModes.js deleted file mode 100644 index 7b809798..00000000 --- a/packages/react-native-ble-plx/build/withBLEBackgroundModes.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withBLEBackgroundModes = exports.BackgroundMode = void 0; -const config_plugins_1 = require("expo/config-plugins"); -var BackgroundMode; -(function (BackgroundMode) { - BackgroundMode["Central"] = "central"; - BackgroundMode["Peripheral"] = "peripheral"; -})(BackgroundMode = exports.BackgroundMode || (exports.BackgroundMode = {})); -function ensureKey(arr, key) { - if (!arr.find((mode) => mode === key)) { - arr.push(key); - } - return arr; -} -const centralKey = "bluetooth-central"; -const peripheralKey = "bluetooth-peripheral"; -/** - * Append `UIBackgroundModes` to the `Info.plist`. - */ -const withBLEBackgroundModes = (c, modes) => { - return (0, config_plugins_1.withInfoPlist)(c, (config) => { - if (!Array.isArray(config.modResults.UIBackgroundModes)) { - config.modResults.UIBackgroundModes = []; - } - if (modes.includes(BackgroundMode.Central)) { - config.modResults.UIBackgroundModes = ensureKey(config.modResults.UIBackgroundModes, centralKey); - } - if (modes.includes(BackgroundMode.Peripheral)) { - config.modResults.UIBackgroundModes = ensureKey(config.modResults.UIBackgroundModes, peripheralKey); - } - // Prevent empty array - if (!config.modResults.UIBackgroundModes.length) { - delete config.modResults.UIBackgroundModes; - } - return config; - }); -}; -exports.withBLEBackgroundModes = withBLEBackgroundModes; diff --git a/packages/react-native-ble-plx/build/withBluetoothPermissions.d.ts b/packages/react-native-ble-plx/build/withBluetoothPermissions.d.ts deleted file mode 100644 index 4ac8a242..00000000 --- a/packages/react-native-ble-plx/build/withBluetoothPermissions.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare const withBluetoothPermissions: ConfigPlugin<{ - bluetoothAlwaysPermission?: string | false; -}>; diff --git a/packages/react-native-ble-plx/build/withBluetoothPermissions.js b/packages/react-native-ble-plx/build/withBluetoothPermissions.js deleted file mode 100644 index 3b15e2f3..00000000 --- a/packages/react-native-ble-plx/build/withBluetoothPermissions.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withBluetoothPermissions = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const BLUETOOTH_ALWAYS = "Allow $(PRODUCT_NAME) to connect to bluetooth devices"; -const withBluetoothPermissions = (c, { bluetoothAlwaysPermission } = {}) => { - return (0, config_plugins_1.withInfoPlist)(c, (config) => { - if (bluetoothAlwaysPermission !== false) { - config.modResults.NSBluetoothAlwaysUsageDescription = - bluetoothAlwaysPermission || - config.modResults.NSBluetoothAlwaysUsageDescription || - BLUETOOTH_ALWAYS; - } - return config; - }); -}; -exports.withBluetoothPermissions = withBluetoothPermissions; diff --git a/packages/react-native-ble-plx/jest.config.js b/packages/react-native-ble-plx/jest.config.js deleted file mode 100644 index e539b3b1..00000000 --- a/packages/react-native-ble-plx/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('expo-module-scripts/jest-preset-plugin'); diff --git a/packages/react-native-ble-plx/package.json b/packages/react-native-ble-plx/package.json deleted file mode 100644 index 7ee31e1b..00000000 --- a/packages/react-native-ble-plx/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@config-plugins/react-native-ble-plx", - "version": "7.0.0", - "description": "Config plugin to auto configure react-native-ble-plx on prebuild", - "main": "build/withBLE.js", - "types": "build/withBLE.d.ts", - "sideEffects": false, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/expo/config-plugins.git", - "directory": "packages/react-native-ble-plx" - }, - "files": [ - "build", - "app.plugin.js" - ], - "scripts": { - "build": "expo-module build", - "clean": "expo-module clean", - "lint": "expo-module lint", - "test": "expo-module test", - "prepare": "expo-module prepare", - "prepublishOnly": "expo-module prepublishOnly", - "expo-module": "expo-module" - }, - "keywords": [ - "react-native", - "expo" - ], - "peerDependencies": { - "expo": "^49" - }, - "devDependencies": { - "expo-module-scripts": "^3.0.3" - }, - "upstreamPackage": "react-native-ble-plx" -} diff --git a/packages/react-native-ble-plx/src/__tests__/fixtures/AndroidManifest.xml b/packages/react-native-ble-plx/src/__tests__/fixtures/AndroidManifest.xml deleted file mode 100644 index eb91baa5..00000000 --- a/packages/react-native-ble-plx/src/__tests__/fixtures/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - diff --git a/packages/react-native-ble-plx/src/__tests__/withBLEAndroidManifest-test.ts b/packages/react-native-ble-plx/src/__tests__/withBLEAndroidManifest-test.ts deleted file mode 100644 index 8f1ca469..00000000 --- a/packages/react-native-ble-plx/src/__tests__/withBLEAndroidManifest-test.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { AndroidConfig, XML } from "@expo/config-plugins"; -import { resolve } from "path"; - -import { - addLocationPermissionToManifest, - addScanPermissionToManifest, - addBLEHardwareFeatureToManifest, -} from "../withBLEAndroidManifest"; - -const { readAndroidManifestAsync } = AndroidConfig.Manifest; - -const sampleManifestPath = resolve(__dirname, "fixtures/AndroidManifest.xml"); - -describe("addLocationPermissionToManifest", () => { - it(`adds elements`, async () => { - let androidManifest = await readAndroidManifestAsync(sampleManifestPath); - androidManifest = addLocationPermissionToManifest(androidManifest, false); - expect(androidManifest.manifest["uses-permission-sdk-23"]).toContainEqual({ - $: { - "android:name": "android.permission.ACCESS_COARSE_LOCATION", - }, - }); - expect(androidManifest.manifest["uses-permission-sdk-23"]).toContainEqual({ - $: { - "android:name": "android.permission.ACCESS_FINE_LOCATION", - }, - }); - // Sanity - expect(XML.format(androidManifest)).toMatch( - // - ); - expect(XML.format(androidManifest)).toMatch( - // - ); - }); - it(`adds elements with SDK limit`, async () => { - let androidManifest = await readAndroidManifestAsync(sampleManifestPath); - androidManifest = addLocationPermissionToManifest(androidManifest, true); - expect(androidManifest.manifest["uses-permission-sdk-23"]).toContainEqual({ - $: { - "android:name": "android.permission.ACCESS_COARSE_LOCATION", - "android:maxSdkVersion": "30", - }, - }); - expect(androidManifest.manifest["uses-permission-sdk-23"]).toContainEqual({ - $: { - "android:name": "android.permission.ACCESS_FINE_LOCATION", - "android:maxSdkVersion": "30", - }, - }); - // Sanity - expect(XML.format(androidManifest)).toMatch( - // - ); - expect(XML.format(androidManifest)).toMatch( - // - ); - }); -}); - -describe("addScanPermissionToManifest", () => { - it(`adds element`, async () => { - let androidManifest = await readAndroidManifestAsync(sampleManifestPath); - androidManifest = addScanPermissionToManifest(androidManifest, false); - expect(androidManifest.manifest["uses-permission"]).toContainEqual({ - $: { - "android:name": "android.permission.BLUETOOTH_SCAN", - "tools:targetApi": "31", - }, - }); - // Sanity - expect(XML.format(androidManifest)).toMatch( - // - ); - }); - it(`adds element with 'neverForLocation' attribute`, async () => { - let androidManifest = await readAndroidManifestAsync(sampleManifestPath); - androidManifest = addScanPermissionToManifest(androidManifest, true); - expect(androidManifest.manifest["uses-permission"]).toContainEqual({ - $: { - "android:name": "android.permission.BLUETOOTH_SCAN", - "android:usesPermissionFlags": "neverForLocation", - "tools:targetApi": "31", - }, - }); - // Sanity - expect(XML.format(androidManifest)).toMatch( - // - ); - }); -}); - -describe("addBLEHardwareFeatureToManifest", () => { - it(`adds element`, async () => { - let androidManifest = await readAndroidManifestAsync(sampleManifestPath); - androidManifest = addBLEHardwareFeatureToManifest(androidManifest); - - expect(androidManifest.manifest["uses-feature"]).toStrictEqual([ - { - $: { - "android:name": "android.hardware.bluetooth_le", - "android:required": "true", - }, - }, - ]); - // Sanity - expect(XML.format(androidManifest)).toMatch( - // - ); - }); -}); diff --git a/packages/react-native-ble-plx/src/withBLE.ts b/packages/react-native-ble-plx/src/withBLE.ts deleted file mode 100644 index ed22fe1a..00000000 --- a/packages/react-native-ble-plx/src/withBLE.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - AndroidConfig, - ConfigPlugin, - createRunOncePlugin, - WarningAggregator, -} from "expo/config-plugins"; - -import { withBLEAndroidManifest } from "./withBLEAndroidManifest"; -import { - BackgroundMode, - withBLEBackgroundModes, -} from "./withBLEBackgroundModes"; -import { withBluetoothPermissions } from "./withBluetoothPermissions"; - -const pkg = { name: "react-native-ble-plx", version: "UNVERSIONED" }; //require('react-native-ble-plx/package.json') - -/** - * Apply BLE native configuration. - */ -const withBLE: ConfigPlugin< - { - isBackgroundEnabled?: boolean; - neverForLocation?: boolean; - modes?: BackgroundMode[]; - bluetoothAlwaysPermission?: string | false; - } | void -> = (config, props = {}) => { - const _props = props || {}; - const isBackgroundEnabled = _props.isBackgroundEnabled ?? false; - const neverForLocation = _props.neverForLocation ?? false; - - if ("bluetoothPeripheralPermission" in _props) { - WarningAggregator.addWarningIOS( - "bluetoothPeripheralPermission", - `The iOS permission \`NSBluetoothPeripheralUsageDescription\` is fully deprecated as of iOS 13 (lowest iOS version in Expo SDK 47+). Remove the \`bluetoothPeripheralPermission\` property from the \`@config-plugins/react-native-ble-plx\` config plugin.` - ); - } - - // iOS - config = withBluetoothPermissions(config, _props); - config = withBLEBackgroundModes(config, _props.modes || []); - - // Android - config = AndroidConfig.Permissions.withPermissions(config, [ - "android.permission.BLUETOOTH", - "android.permission.BLUETOOTH_ADMIN", - "android.permission.BLUETOOTH_CONNECT", // since Android SDK 31 - ]); - config = withBLEAndroidManifest(config, { - isBackgroundEnabled, - neverForLocation, - }); - - return config; -}; - -export { BackgroundMode }; - -export default createRunOncePlugin(withBLE, pkg.name, pkg.version); diff --git a/packages/react-native-ble-plx/src/withBLEAndroidManifest.ts b/packages/react-native-ble-plx/src/withBLEAndroidManifest.ts deleted file mode 100644 index 83c65107..00000000 --- a/packages/react-native-ble-plx/src/withBLEAndroidManifest.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { - ConfigPlugin, - withAndroidManifest, - AndroidConfig, -} from "expo/config-plugins"; - -type InnerManifest = AndroidConfig.Manifest.AndroidManifest["manifest"]; - -type ManifestPermission = InnerManifest["permission"]; - -// TODO: add to `AndroidManifestAttributes` in @expo/config-plugins -type ExtraTools = { - // https://developer.android.com/studio/write/tool-attributes#toolstargetapi - "tools:targetApi"?: string; -}; - -type ManifestUsesPermissionWithExtraTools = { - $: AndroidConfig.Manifest.ManifestUsesPermission["$"] & ExtraTools; -}; - -type AndroidManifest = { - manifest: InnerManifest & { - permission?: ManifestPermission; - "uses-permission"?: ManifestUsesPermissionWithExtraTools[]; - "uses-permission-sdk-23"?: ManifestUsesPermissionWithExtraTools[]; - "uses-feature"?: InnerManifest["uses-feature"]; - }; -}; - -export const withBLEAndroidManifest: ConfigPlugin<{ - isBackgroundEnabled: boolean; - neverForLocation: boolean; -}> = (config, { isBackgroundEnabled, neverForLocation }) => { - return withAndroidManifest(config, (config) => { - config.modResults = addLocationPermissionToManifest( - config.modResults, - neverForLocation - ); - config.modResults = addScanPermissionToManifest( - config.modResults, - neverForLocation - ); - if (isBackgroundEnabled) { - config.modResults = addBLEHardwareFeatureToManifest(config.modResults); - } - return config; - }); -}; - -/** - * Add location permissions - * - 'android.permission.ACCESS_COARSE_LOCATION' for Android SDK 28 (Android 9) and lower - * - 'android.permission.ACCESS_FINE_LOCATION' for Android SDK 29 (Android 10) and higher. - * From Android SDK 31 (Android 12) it might not be required if BLE is not used for location. - */ -export function addLocationPermissionToManifest( - androidManifest: AndroidManifest, - neverForLocationSinceSdk31: boolean -) { - if (!Array.isArray(androidManifest.manifest["uses-permission-sdk-23"])) { - androidManifest.manifest["uses-permission-sdk-23"] = []; - } - - const optMaxSdkVersion = neverForLocationSinceSdk31 - ? { - "android:maxSdkVersion": "30", - } - : {}; - - if ( - !androidManifest.manifest["uses-permission-sdk-23"].find( - (item) => - item.$["android:name"] === "android.permission.ACCESS_COARSE_LOCATION" - ) - ) { - androidManifest.manifest["uses-permission-sdk-23"].push({ - $: { - "android:name": "android.permission.ACCESS_COARSE_LOCATION", - ...optMaxSdkVersion, - }, - }); - } - - if ( - !androidManifest.manifest["uses-permission-sdk-23"].find( - (item) => - item.$["android:name"] === "android.permission.ACCESS_FINE_LOCATION" - ) - ) { - androidManifest.manifest["uses-permission-sdk-23"].push({ - $: { - "android:name": "android.permission.ACCESS_FINE_LOCATION", - ...optMaxSdkVersion, - }, - }); - } - - return androidManifest; -} - -/** - * Add 'android.permission.BLUETOOTH_SCAN'. - * Required since Android SDK 31 (Android 12). - */ -export function addScanPermissionToManifest( - androidManifest: AndroidManifest, - neverForLocation: boolean -) { - if (!Array.isArray(androidManifest.manifest["uses-permission"])) { - androidManifest.manifest["uses-permission"] = []; - } - - if ( - !androidManifest.manifest["uses-permission"].find( - (item) => item.$["android:name"] === "android.permission.BLUETOOTH_SCAN" - ) - ) { - AndroidConfig.Manifest.ensureToolsAvailable(androidManifest); - androidManifest.manifest["uses-permission"]?.push({ - $: { - "android:name": "android.permission.BLUETOOTH_SCAN", - ...(neverForLocation - ? { - "android:usesPermissionFlags": "neverForLocation", - } - : {}), - "tools:targetApi": "31", - }, - }); - } - return androidManifest; -} - -// Add this line if your application always requires BLE. More info can be found on: https://developer.android.com/guide/topics/connectivity/bluetooth-le.html#permissions -export function addBLEHardwareFeatureToManifest( - androidManifest: AndroidConfig.Manifest.AndroidManifest -) { - // Add `` to the AndroidManifest.xml - if (!Array.isArray(androidManifest.manifest["uses-feature"])) { - androidManifest.manifest["uses-feature"] = []; - } - - if ( - !androidManifest.manifest["uses-feature"].find( - (item) => item.$["android:name"] === "android.hardware.bluetooth_le" - ) - ) { - androidManifest.manifest["uses-feature"]?.push({ - $: { - "android:name": "android.hardware.bluetooth_le", - "android:required": "true", - }, - }); - } - return androidManifest; -} diff --git a/packages/react-native-ble-plx/src/withBLEBackgroundModes.ts b/packages/react-native-ble-plx/src/withBLEBackgroundModes.ts deleted file mode 100644 index cad08ce6..00000000 --- a/packages/react-native-ble-plx/src/withBLEBackgroundModes.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ConfigPlugin, withInfoPlist } from "expo/config-plugins"; - -export enum BackgroundMode { - Central = "central", - Peripheral = "peripheral", -} - -function ensureKey(arr: string[], key: string) { - if (!arr.find((mode) => mode === key)) { - arr.push(key); - } - return arr; -} - -const centralKey = "bluetooth-central"; -const peripheralKey = "bluetooth-peripheral"; - -/** - * Append `UIBackgroundModes` to the `Info.plist`. - */ -export const withBLEBackgroundModes: ConfigPlugin = ( - c, - modes -) => { - return withInfoPlist(c, (config) => { - if (!Array.isArray(config.modResults.UIBackgroundModes)) { - config.modResults.UIBackgroundModes = []; - } - - if (modes.includes(BackgroundMode.Central)) { - config.modResults.UIBackgroundModes = ensureKey( - config.modResults.UIBackgroundModes, - centralKey - ); - } - if (modes.includes(BackgroundMode.Peripheral)) { - config.modResults.UIBackgroundModes = ensureKey( - config.modResults.UIBackgroundModes, - peripheralKey - ); - } - - // Prevent empty array - if (!config.modResults.UIBackgroundModes.length) { - delete config.modResults.UIBackgroundModes; - } - - return config; - }); -}; diff --git a/packages/react-native-ble-plx/src/withBluetoothPermissions.ts b/packages/react-native-ble-plx/src/withBluetoothPermissions.ts deleted file mode 100644 index 7a6d74f1..00000000 --- a/packages/react-native-ble-plx/src/withBluetoothPermissions.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ConfigPlugin, withInfoPlist } from "expo/config-plugins"; - -const BLUETOOTH_ALWAYS = - "Allow $(PRODUCT_NAME) to connect to bluetooth devices"; - -export const withBluetoothPermissions: ConfigPlugin<{ - bluetoothAlwaysPermission?: string | false; -}> = (c, { bluetoothAlwaysPermission } = {}) => { - return withInfoPlist(c, (config) => { - if (bluetoothAlwaysPermission !== false) { - config.modResults.NSBluetoothAlwaysUsageDescription = - bluetoothAlwaysPermission || - config.modResults.NSBluetoothAlwaysUsageDescription || - BLUETOOTH_ALWAYS; - } - return config; - }); -}; diff --git a/packages/react-native-ble-plx/tsconfig.json b/packages/react-native-ble-plx/tsconfig.json deleted file mode 100644 index 354bddb4..00000000 --- a/packages/react-native-ble-plx/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "expo-module-scripts/tsconfig.plugin", - "compilerOptions": { - "outDir": "build", - "rootDir": "src" - }, - "include": ["./src"], - "exclude": ["**/__mocks__/*", "**/__tests__/*"] -} diff --git a/packages/react-native-blob-util/build/withReactNativeBlobUtil.d.ts b/packages/react-native-blob-util/build/withReactNativeBlobUtil.d.ts deleted file mode 100644 index c076aea3..00000000 --- a/packages/react-native-blob-util/build/withReactNativeBlobUtil.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AndroidConfig, ConfigPlugin } from "expo/config-plugins"; -export declare function appendDownloadCompleteAction(androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest; -export declare function ensureBlobProviderManifest(androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest; -export declare function ensureBlobProviderAuthorityString(res: AndroidConfig.Resources.ResourceXML, authority: string): AndroidConfig.Resources.ResourceXML; -declare const _default: ConfigPlugin; -export default _default; diff --git a/packages/react-native-blob-util/build/withReactNativeBlobUtil.js b/packages/react-native-blob-util/build/withReactNativeBlobUtil.js deleted file mode 100644 index 8c41bd9e..00000000 --- a/packages/react-native-blob-util/build/withReactNativeBlobUtil.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ensureBlobProviderAuthorityString = exports.ensureBlobProviderManifest = exports.appendDownloadCompleteAction = void 0; -const config_plugins_1 = require("expo/config-plugins"); -let pkg = { - name: "react-native-blob-util", -}; -try { - pkg = require("react-native-blob-util/package.json"); -} -catch { - // empty catch block -} -function appendDownloadCompleteAction(androidManifest) { - if (!Array.isArray(androidManifest.manifest.application)) { - return androidManifest; - } - for (const application of androidManifest.manifest.application) { - for (const activity of application.activity || []) { - if (activity?.$?.["android:launchMode"] === "singleTask") { - for (const intentFilter of activity["intent-filter"] || []) { - const isLauncher = intentFilter.category?.some((action) => action.$["android:name"] === "android.intent.category.LAUNCHER"); - if (!isLauncher) - continue; - intentFilter.action = intentFilter.action || []; - const hasDownloadCompleteAction = intentFilter.action.some((action) => action.$["android:name"] === - "android.intent.action.DOWNLOAD_COMPLETE"); - if (!hasDownloadCompleteAction) { - intentFilter.action.push({ - $: { - "android:name": "android.intent.action.DOWNLOAD_COMPLETE", - }, - }); - return androidManifest; - } - } - break; - } - } - } - return androidManifest; -} -exports.appendDownloadCompleteAction = appendDownloadCompleteAction; -// com.facebook.react.modules.blob.BlobProvider -const withBlobProvider = (config) => { - (0, config_plugins_1.withAndroidManifest)(config, (config) => { - ensureBlobProviderManifest(config.modResults); - return config; - }); - return config; -}; -function ensureBlobProviderManifest(androidManifest) { - const app = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest); - if (!app.provider) { - app.provider = []; - } - if (!app.provider.some((p) => p.$["android:name"] === "com.facebook.react.modules.blob.BlobProvider")) { - // - app.provider.push({ - $: { - "android:name": "com.facebook.react.modules.blob.BlobProvider", - "android:authorities": "@string/blob_provider_authority", - "android:exported": "false", - }, - }); - } - return androidManifest; -} -exports.ensureBlobProviderManifest = ensureBlobProviderManifest; -const withReactNativeBlobUtil = (config) => { - config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [ - "android.permission.READ_EXTERNAL_STORAGE", - "android.permission.WRITE_EXTERNAL_STORAGE", - "android.permission.DOWNLOAD_WITHOUT_NOTIFICATION", - // Wifi-only mode. - "android.permission.ACCESS_NETWORK_STATE", - ]); - config = (0, config_plugins_1.withAndroidManifest)(config, (config) => { - config.modResults = appendDownloadCompleteAction(config.modResults); - return config; - }); - withBlobProvider(config); - config = (0, config_plugins_1.withStringsXml)(config, (config) => { - ensureBlobProviderAuthorityString(config.modResults, config.android?.package + ".blobs"); - return config; - }); - return config; -}; -function ensureBlobProviderAuthorityString(res, authority) { - if (!res.resources.string) { - res.resources.string = []; - } - if (!res.resources.string.some((s) => s.$["name"] === "blob_provider_authority")) { - res.resources.string.push({ - _: "invalid", - $: { - name: "blob_provider_authority", - }, - }); - } - const item = res.resources.string.find((s) => s.$["name"] === "blob_provider_authority"); - item._ = authority; - return res; -} -exports.ensureBlobProviderAuthorityString = ensureBlobProviderAuthorityString; -exports.default = (0, config_plugins_1.createRunOncePlugin)(withReactNativeBlobUtil, pkg.name, pkg.version); diff --git a/packages/react-native-branch/build/types.d.ts b/packages/react-native-branch/build/types.d.ts deleted file mode 100644 index d3b49094..00000000 --- a/packages/react-native-branch/build/types.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type ConfigData = { - apiKey?: string; - iosAppDomain?: string; - iosUniversalLinkDomains?: string[]; -}; diff --git a/packages/react-native-branch/build/types.js b/packages/react-native-branch/build/types.js deleted file mode 100644 index c8ad2e54..00000000 --- a/packages/react-native-branch/build/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/react-native-branch/build/withBranch.d.ts b/packages/react-native-branch/build/withBranch.d.ts deleted file mode 100644 index 67bf6f0b..00000000 --- a/packages/react-native-branch/build/withBranch.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -import { ConfigData } from "./types"; -declare const _default: ConfigPlugin; -export default _default; diff --git a/packages/react-native-branch/build/withBranch.js b/packages/react-native-branch/build/withBranch.js deleted file mode 100644 index efc97d82..00000000 --- a/packages/react-native-branch/build/withBranch.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_plugins_1 = require("expo/config-plugins"); -const withBranchAndroid_1 = require("./withBranchAndroid"); -const withBranchIOS_1 = require("./withBranchIOS"); -const withBranch = (config, { apiKey, iosAppDomain, iosUniversalLinkDomains } = {}) => { - config = (0, withBranchAndroid_1.withBranchAndroid)(config, { apiKey }); - config = (0, withBranchIOS_1.withBranchIOS)(config, { - apiKey, - iosAppDomain, - iosUniversalLinkDomains, - }); - return config; -}; -let pkg = { - name: "react-native-branch", -}; -try { - const branchPkg = require("react-native-branch/package.json"); - pkg = branchPkg; -} -catch { } -exports.default = (0, config_plugins_1.createRunOncePlugin)(withBranch, pkg.name, pkg.version); diff --git a/packages/react-native-branch/build/withBranchAndroid.d.ts b/packages/react-native-branch/build/withBranchAndroid.d.ts deleted file mode 100644 index d1cf06c0..00000000 --- a/packages/react-native-branch/build/withBranchAndroid.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ExpoConfig } from "expo/config"; -import { AndroidConfig, ConfigPlugin } from "expo/config-plugins"; -export declare function getBranchApiKey(config: ExpoConfig): string | null; -export declare function setBranchApiKey(apiKey: string, androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest; -export declare const withBranchAndroid: ConfigPlugin<{ - apiKey?: string; -}>; diff --git a/packages/react-native-branch/build/withBranchAndroid.js b/packages/react-native-branch/build/withBranchAndroid.js deleted file mode 100644 index e9b96adf..00000000 --- a/packages/react-native-branch/build/withBranchAndroid.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withBranchAndroid = exports.setBranchApiKey = exports.getBranchApiKey = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const { addMetaDataItemToMainApplication, getMainApplicationOrThrow, removeMetaDataItemFromMainApplication, } = config_plugins_1.AndroidConfig.Manifest; -const META_BRANCH_KEY = "io.branch.sdk.BranchKey"; -function getBranchApiKey(config) { - return config.android?.config?.branch?.apiKey ?? null; -} -exports.getBranchApiKey = getBranchApiKey; -function setBranchApiKey(apiKey, androidManifest) { - const mainApplication = getMainApplicationOrThrow(androidManifest); - if (apiKey) { - // If the item exists, add it back - addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey); - } - else { - // Remove any existing item - removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY); - } - return androidManifest; -} -exports.setBranchApiKey = setBranchApiKey; -const withBranchAndroid = (config, data) => { - const apiKey = data.apiKey ?? getBranchApiKey(config); - if (!apiKey) { - throw new Error("Branch API key is required: expo.android.config.branch.apiKey"); - } - config = (0, config_plugins_1.withAndroidManifest)(config, (config) => { - config.modResults = setBranchApiKey(apiKey, config.modResults); - return config; - }); - return config; -}; -exports.withBranchAndroid = withBranchAndroid; diff --git a/packages/react-native-branch/build/withBranchIOS.d.ts b/packages/react-native-branch/build/withBranchIOS.d.ts deleted file mode 100644 index f110d083..00000000 --- a/packages/react-native-branch/build/withBranchIOS.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ExpoConfig } from "expo/config"; -import { ConfigPlugin, InfoPlist } from "expo/config-plugins"; -import { ConfigData } from "./types"; -export declare function getBranchApiKey(config: Pick): string | null; -export declare function setBranchApiKey(apiKey: string | null, infoPlist: InfoPlist): InfoPlist; -export declare const withBranchIOS: ConfigPlugin; diff --git a/packages/react-native-branch/build/withBranchIOS.js b/packages/react-native-branch/build/withBranchIOS.js deleted file mode 100644 index 4051f9d1..00000000 --- a/packages/react-native-branch/build/withBranchIOS.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withBranchIOS = exports.setBranchApiKey = exports.getBranchApiKey = void 0; -const config_plugins_1 = require("expo/config-plugins"); -function getBranchApiKey(config) { - return config.ios?.config?.branch?.apiKey ?? null; -} -exports.getBranchApiKey = getBranchApiKey; -function setBranchApiKey(apiKey, infoPlist) { - if (apiKey === null) { - return infoPlist; - } - return { - ...infoPlist, - branch_key: { - live: apiKey, - }, - }; -} -exports.setBranchApiKey = setBranchApiKey; -const withBranchIOS = (config, data) => { - // Ensure object exist - if (!config.ios) { - config.ios = {}; - } - const apiKey = data.apiKey ?? getBranchApiKey(config); - if (!apiKey) { - throw new Error("Branch API key is required: expo.ios.config.branch.apiKey"); - } - // Update the infoPlist with the branch key and branch domain - config = (0, config_plugins_1.withInfoPlist)(config, (config) => { - config.modResults = setBranchApiKey(apiKey, config.modResults); - if (data.iosAppDomain) { - config.modResults.branch_app_domain = data.iosAppDomain; - } - else { - delete config.modResults.branch_app_domain; - } - if (data.iosUniversalLinkDomains) { - config.modResults.branch_universal_link_domains = - data.iosUniversalLinkDomains; - } - else { - delete config.modResults.branch_universal_link_domains; - } - return config; - }); - return config; -}; -exports.withBranchIOS = withBranchIOS; diff --git a/packages/react-native-callkeep/build/ensureHeaderSearchPath.d.ts b/packages/react-native-callkeep/build/ensureHeaderSearchPath.d.ts deleted file mode 100644 index ab3c8817..00000000 --- a/packages/react-native-callkeep/build/ensureHeaderSearchPath.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { XcodeProject } from "expo/config-plugins"; -export declare function ensureHeaderSearchPath(project: XcodeProject, file: string): void; diff --git a/packages/react-native-callkeep/build/ensureHeaderSearchPath.js b/packages/react-native-callkeep/build/ensureHeaderSearchPath.js deleted file mode 100644 index 0f979b13..00000000 --- a/packages/react-native-callkeep/build/ensureHeaderSearchPath.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ensureHeaderSearchPath = void 0; -const COMMENT_KEY = /_comment$/; -function unquote(str) { - if (str) - return str.replace(/^"(.*)"$/, "$1"); -} -function nonComments(obj) { - const keys = Object.keys(obj); - const newObj = {}; - for (let i = 0; i < keys.length; i++) { - if (!COMMENT_KEY.test(keys[i])) { - newObj[keys[i]] = obj[keys[i]]; - } - } - return newObj; -} -function ensureHeaderSearchPath(project, file) { - const configurations = nonComments(project.pbxXCBuildConfigurationSection()); - const INHERITED = '"$(inherited)"'; - for (const config in configurations) { - const buildSettings = configurations[config].buildSettings; - if (unquote(buildSettings["PRODUCT_NAME"]) !== project.productName) - continue; - if (!buildSettings["HEADER_SEARCH_PATHS"]) { - buildSettings["HEADER_SEARCH_PATHS"] = [INHERITED]; - } - if (!buildSettings.HEADER_SEARCH_PATHS.includes(file)) { - buildSettings["HEADER_SEARCH_PATHS"].push(file); - } - } -} -exports.ensureHeaderSearchPath = ensureHeaderSearchPath; diff --git a/packages/react-native-callkeep/build/withCallkeep.d.ts b/packages/react-native-callkeep/build/withCallkeep.d.ts deleted file mode 100644 index 3a33bbb6..00000000 --- a/packages/react-native-callkeep/build/withCallkeep.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -declare const withCallkeep: ConfigPlugin; -export declare const withXcodeLinkBinaryWithLibraries: ConfigPlugin<{ - library: string; - status?: string; -}>; -export default withCallkeep; diff --git a/packages/react-native-callkeep/build/withCallkeep.js b/packages/react-native-callkeep/build/withCallkeep.js deleted file mode 100644 index 5eb67d1a..00000000 --- a/packages/react-native-callkeep/build/withCallkeep.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withXcodeLinkBinaryWithLibraries = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const ensureHeaderSearchPath_1 = require("./ensureHeaderSearchPath"); -const withCallkeepHeaderSearchPath = (config) => { - const headerSearchPath = `"$(SRCROOT)/../node_modules/react-native-callkeep/ios/RNCallKeep"`; - return (0, config_plugins_1.withXcodeProject)(config, (config) => { - (0, ensureHeaderSearchPath_1.ensureHeaderSearchPath)(config.modResults, headerSearchPath); - return config; - }); -}; -const withAndroidManifestService = (config) => { - return (0, config_plugins_1.withAndroidManifest)(config, (config) => { - // = 11 - // android:foregroundServiceType="camera|microphone" - // // For android < 11 - // android:foregroundServiceType="phoneCall" - // > - // - // - // - // ; - const app = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults); - if (!Array.isArray(app.service)) - app.service = []; - if (!app.service.find((item) => item.$["android:name"] === - "io.wazo.callkeep.RNCallKeepBackgroundMessagingService")) { - app.service.push({ - $: { - "android:name": "io.wazo.callkeep.RNCallKeepBackgroundMessagingService", - "android:exported": "true", - }, - }); - } - // TODO: Update item - if (!app.service.find((item) => item.$["android:name"] === "io.wazo.callkeep.VoiceConnectionService")) { - app.service.push({ - $: { - "android:name": "io.wazo.callkeep.VoiceConnectionService", - "android:exported": "true", - // @ts-ignore - "android:label": "Wazo", - "android:permission": "android.permission.BIND_TELECOM_CONNECTION_SERVICE", - // Use this to target android >= 11 - // "android:foregroundServiceType": "camera|microphone", - // For android < 11 - "android:foregroundServiceType": "phoneCall", - }, - "intent-filter": [ - { - action: [ - { - $: { - "android:name": "android.telecom.ConnectionService", - }, - }, - ], - }, - ], - }); - } - return config; - }); -}; -const withCallkeep = (config) => { - config = (0, config_plugins_1.withInfoPlist)(config, (config) => { - if (!Array.isArray(config.modResults.UIBackgroundModes)) { - config.modResults.UIBackgroundModes = []; - } - if (!config.modResults.UIBackgroundModes.includes("voip")) { - config.modResults.UIBackgroundModes.push("voip"); - } - return config; - }); - config = withCallkeepHeaderSearchPath(config); - config = (0, exports.withXcodeLinkBinaryWithLibraries)(config, { - library: "Intents.framework", - status: "optional", - }); - config = (0, exports.withXcodeLinkBinaryWithLibraries)(config, { - library: "CallKit.framework", - }); - config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [ - "android.permission.BIND_TELECOM_CONNECTION_SERVICE", - "android.permission.FOREGROUND_SERVICE", - "android.permission.READ_PHONE_STATE", - "android.permission.CALL_PHONE", - ]); - config = withAndroidManifestService(config); - return config; -}; -const withXcodeLinkBinaryWithLibraries = (config, { library, status }) => { - return (0, config_plugins_1.withXcodeProject)(config, (config) => { - const options = status === "optional" ? { weak: true } : {}; - const target = config_plugins_1.IOSConfig.XcodeUtils.getApplicationNativeTarget({ - project: config.modResults, - projectName: config.modRequest.projectName, - }); - config.modResults.addFramework(library, { - target: target.uuid, - ...options, - }); - return config; - }); -}; -exports.withXcodeLinkBinaryWithLibraries = withXcodeLinkBinaryWithLibraries; -exports.default = withCallkeep; diff --git a/packages/react-native-dynamic-app-icon/build/index.d.ts b/packages/react-native-dynamic-app-icon/build/index.d.ts deleted file mode 100644 index e929aa60..00000000 --- a/packages/react-native-dynamic-app-icon/build/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -type IconSet = Record; -declare const withDynamicIcon: ConfigPlugin; -export default withDynamicIcon; diff --git a/packages/react-native-dynamic-app-icon/build/index.js b/packages/react-native-dynamic-app-icon/build/index.js deleted file mode 100644 index db87b459..00000000 --- a/packages/react-native-dynamic-app-icon/build/index.js +++ /dev/null @@ -1,175 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const image_utils_1 = require("@expo/image-utils"); -const config_plugins_1 = require("expo/config-plugins"); -const fs_1 = __importDefault(require("fs")); -const path_1 = __importDefault(require("path")); -// @ts-ignore -const pbxFile_1 = __importDefault(require("xcode/lib/pbxFile")); -const folderName = "DynamicAppIcons"; -const size = 60; -const scales = [2, 3]; -function arrayToImages(images) { - return images.reduce((prev, curr, i) => ({ ...prev, [i]: { image: curr } }), {}); -} -const withDynamicIcon = (config, props = {}) => { - const _props = props || {}; - let prepped = {}; - if (Array.isArray(_props)) { - prepped = arrayToImages(_props); - } - else if (_props) { - prepped = _props; - } - config = withIconXcodeProject(config, { icons: prepped }); - config = withIconInfoPlist(config, { icons: prepped }); - config = withIconImages(config, { icons: prepped }); - return config; -}; -function getIconName(name, size, scale) { - const fileName = `${name}-Icon-${size}x${size}`; - if (scale != null) { - return `${fileName}@${scale}x.png`; - } - return fileName; -} -const withIconXcodeProject = (config, { icons }) => { - return (0, config_plugins_1.withXcodeProject)(config, async (config) => { - const groupPath = `${config.modRequest.projectName}/${folderName}`; - const group = config_plugins_1.IOSConfig.XcodeUtils.ensureGroupRecursively(config.modResults, groupPath); - const project = config.modResults; - const opt = {}; - // Unlink old assets - const groupId = Object.keys(project.hash.project.objects["PBXGroup"]).find((id) => { - const _group = project.hash.project.objects["PBXGroup"][id]; - return _group.name === group.name; - }); - if (!project.hash.project.objects["PBXVariantGroup"]) { - project.hash.project.objects["PBXVariantGroup"] = {}; - } - const variantGroupId = Object.keys(project.hash.project.objects["PBXVariantGroup"]).find((id) => { - const _group = project.hash.project.objects["PBXVariantGroup"][id]; - return _group.name === group.name; - }); - const children = [...(group.children || [])]; - for (const child of children) { - const file = new pbxFile_1.default(path_1.default.join(group.name, child.comment), opt); - file.target = opt ? opt.target : undefined; - project.removeFromPbxBuildFileSection(file); // PBXBuildFile - project.removeFromPbxFileReferenceSection(file); // PBXFileReference - if (group) { - if (groupId) { - project.removeFromPbxGroup(file, groupId); //Group other than Resources (i.e. 'splash') - } - else if (variantGroupId) { - project.removeFromPbxVariantGroup(file, variantGroupId); // PBXVariantGroup - } - } - project.removeFromPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase - } - // Link new assets - await iterateIconsAsync({ icons }, async (key, icon, index) => { - for (const scale of scales) { - const iconFileName = getIconName(key, size, scale); - if (!group?.children.some(({ comment }) => comment === iconFileName)) { - // Only write the file if it doesn't already exist. - config.modResults = config_plugins_1.IOSConfig.XcodeUtils.addResourceFileToGroup({ - filepath: path_1.default.join(groupPath, iconFileName), - groupName: groupPath, - project: config.modResults, - isBuildFile: true, - verbose: true, - }); - } - else { - console.log("Skipping duplicate: ", iconFileName); - } - } - }); - return config; - }); -}; -const withIconInfoPlist = (config, { icons }) => { - return (0, config_plugins_1.withInfoPlist)(config, async (config) => { - const altIcons = {}; - await iterateIconsAsync({ icons }, async (key, icon) => { - altIcons[key] = { - CFBundleIconFiles: [ - // Must be a file path relative to the source root (not a icon set it seems). - // i.e. `Bacon-Icon-60x60` when the image is `ios/somn/appIcons/Bacon-Icon-60x60@2x.png` - getIconName(key, size), - ], - UIPrerenderedIcon: !!icon.prerendered, - }; - }); - function applyToPlist(key) { - if (typeof config.modResults[key] !== "object" || - Array.isArray(config.modResults[key]) || - !config.modResults[key]) { - config.modResults[key] = {}; - } - // @ts-expect-error - config.modResults[key].CFBundleAlternateIcons = altIcons; - // @ts-expect-error - config.modResults[key].CFBundlePrimaryIcon = { - CFBundleIconFiles: ["AppIcon"], - }; - } - // Apply for both tablet and phone support - applyToPlist("CFBundleIcons"); - applyToPlist("CFBundleIcons~ipad"); - return config; - }); -}; -const withIconImages = (config, props) => { - return (0, config_plugins_1.withDangerousMod)(config, [ - "ios", - async (config) => { - await createIconsAsync(config, props); - return config; - }, - ]); -}; -async function createIconsAsync(config, { icons }) { - const iosRoot = path_1.default.join(config.modRequest.platformProjectRoot, config.modRequest.projectName); - // Delete all existing assets - await fs_1.default.promises - .rm(path_1.default.join(iosRoot, folderName), { recursive: true, force: true }) - .catch(() => null); - // Ensure directory exists - await fs_1.default.promises.mkdir(path_1.default.join(iosRoot, folderName), { recursive: true }); - // Generate new assets - await iterateIconsAsync({ icons }, async (key, icon) => { - for (const scale of scales) { - const iconFileName = getIconName(key, size, scale); - const fileName = path_1.default.join(folderName, iconFileName); - const outputPath = path_1.default.join(iosRoot, fileName); - const scaledSize = scale * size; - const { source } = await (0, image_utils_1.generateImageAsync)({ - projectRoot: config.modRequest.projectRoot, - cacheType: "react-native-dynamic-app-icon", - }, { - name: iconFileName, - src: icon.image, - removeTransparency: true, - backgroundColor: "#ffffff", - resizeMode: "cover", - width: scaledSize, - height: scaledSize, - }); - await fs_1.default.promises.writeFile(outputPath, source); - } - }); -} -async function iterateIconsAsync({ icons }, callback) { - const entries = Object.entries(icons); - for (let i = 0; i < entries.length; i++) { - const [key, val] = entries[i]; - await callback(key, val, i); - } -} -exports.default = withDynamicIcon; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/react-native-dynamic-app-icon/build/index.js.map b/packages/react-native-dynamic-app-icon/build/index.js.map deleted file mode 100644 index feea3ebf..00000000 --- a/packages/react-native-dynamic-app-icon/build/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,mDAAuD;AACvD,wDAO6B;AAC7B,4CAAoB;AACpB,gDAAwB;AACxB,aAAa;AACb,gEAAwC;AAExC,MAAM,UAAU,GAAG,iBAAiB,CAAC;AACrC,MAAM,IAAI,GAAG,EAAE,CAAC;AAChB,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAQtB,SAAS,aAAa,CAAC,MAAgB;IACrC,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,EACtD,EAAE,CACH,CAAC;AACJ,CAAC;AAED,MAAM,eAAe,GAA4C,CAC/D,MAAM,EACN,KAAK,GAAG,EAAE,EACV,EAAE;IACF,MAAM,MAAM,GAAG,KAAK,IAAI,EAAE,CAAC;IAE3B,IAAI,OAAO,GAAmB,EAAE,CAAC;IAEjC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACzB,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;KACjC;SAAM,IAAI,MAAM,EAAE;QACjB,OAAO,GAAG,MAAM,CAAC;KAClB;IAED,MAAM,GAAG,oBAAoB,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1D,MAAM,GAAG,iBAAiB,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACvD,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,SAAS,WAAW,CAAC,IAAY,EAAE,IAAY,EAAE,KAAc;IAC7D,MAAM,QAAQ,GAAG,GAAG,IAAI,SAAS,IAAI,IAAI,IAAI,EAAE,CAAC;IAEhD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,GAAG,QAAQ,IAAI,KAAK,OAAO,CAAC;KACpC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,oBAAoB,GAAwB,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IACtE,OAAO,IAAA,iCAAgB,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAC/C,MAAM,SAAS,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,WAAY,IAAI,UAAU,EAAE,CAAC;QACpE,MAAM,KAAK,GAAG,0BAAS,CAAC,UAAU,CAAC,sBAAsB,CACvD,MAAM,CAAC,UAAU,EACjB,SAAS,CACV,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;QAClC,MAAM,GAAG,GAAQ,EAAE,CAAC;QAEpB,oBAAoB;QAEpB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CACxE,CAAC,EAAE,EAAE,EAAE;YACL,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;YAC5D,OAAO,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC;QACpC,CAAC,CACF,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE;YACpD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;SACtD;QACD,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAChC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAChD,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE;YACZ,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;YACnE,OAAO,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC;QAE7C,KAAK,MAAM,KAAK,IAAI,QAGjB,EAAE;YACH,MAAM,IAAI,GAAG,IAAI,iBAAO,CAAC,cAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;YACpE,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAE3C,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe;YAC5D,OAAO,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB;YACpE,IAAI,KAAK,EAAE;gBACT,IAAI,OAAO,EAAE;oBACX,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,4CAA4C;iBACxF;qBAAM,IAAI,cAAc,EAAE;oBACzB,OAAO,CAAC,yBAAyB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,kBAAkB;iBAC5E;aACF;YACD,OAAO,CAAC,gCAAgC,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAyB;SAC1E;QAED,kBAAkB;QAElB,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;YAC5D,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;gBAC1B,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;gBAEnD,IACE,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CACnB,CAAC,EAAE,OAAO,EAAuB,EAAE,EAAE,CAAC,OAAO,KAAK,YAAY,CAC/D,EACD;oBACA,mDAAmD;oBACnD,MAAM,CAAC,UAAU,GAAG,0BAAS,CAAC,UAAU,CAAC,sBAAsB,CAAC;wBAC9D,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC;wBAC5C,SAAS,EAAE,SAAS;wBACpB,OAAO,EAAE,MAAM,CAAC,UAAU;wBAC1B,WAAW,EAAE,IAAI;wBACjB,OAAO,EAAE,IAAI;qBACd,CAAC,CAAC;iBACJ;qBAAM;oBACL,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,YAAY,CAAC,CAAC;iBACnD;aACF;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAwB,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IACnE,OAAO,IAAA,8BAAa,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,QAAQ,GAGV,EAAE,CAAC;QAEP,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACrD,QAAQ,CAAC,GAAG,CAAC,GAAG;gBACd,iBAAiB,EAAE;oBACjB,6EAA6E;oBAC7E,wFAAwF;oBACxF,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC;iBACvB;gBACD,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW;aACtC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,SAAS,YAAY,CAAC,GAAW;YAC/B,IACE,OAAO,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,QAAQ;gBAC1C,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;gBACrC,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,EACvB;gBACA,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;aAC7B;YAED,mBAAmB;YACnB,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,sBAAsB,GAAG,QAAQ,CAAC;YAEzD,mBAAmB;YACnB,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,mBAAmB,GAAG;gBAC3C,iBAAiB,EAAE,CAAC,SAAS,CAAC;aAC/B,CAAC;QACJ,CAAC;QAED,0CAA0C;QAC1C,YAAY,CAAC,eAAe,CAAC,CAAC;QAC9B,YAAY,CAAC,oBAAoB,CAAC,CAAC;QAEnC,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,cAAc,GAAwB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;IAC5D,OAAO,IAAA,iCAAgB,EAAC,MAAM,EAAE;QAC9B,KAAK;QACL,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,MAAM,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YACtC,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,KAAK,UAAU,gBAAgB,CAC7B,MAA+B,EAC/B,EAAE,KAAK,EAAS;IAEhB,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CACvB,MAAM,CAAC,UAAU,CAAC,mBAAmB,EACrC,MAAM,CAAC,UAAU,CAAC,WAAY,CAC/B,CAAC;IAEF,6BAA6B;IAC7B,MAAM,YAAE,CAAC,QAAQ;SACd,EAAE,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SACpE,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACrB,0BAA0B;IAC1B,MAAM,YAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,sBAAsB;IACtB,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACrD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC1B,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;YACnD,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;YACrD,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAEhD,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;YAChC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,gCAAkB,EACzC;gBACE,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW;gBAC1C,SAAS,EAAE,+BAA+B;aAC3C,EACD;gBACE,IAAI,EAAE,YAAY;gBAClB,GAAG,EAAE,IAAI,CAAC,KAAK;gBACf,kBAAkB,EAAE,IAAI;gBACxB,eAAe,EAAE,SAAS;gBAC1B,UAAU,EAAE,OAAO;gBACnB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,UAAU;aACnB,CACF,CAAC;YAEF,MAAM,YAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;SACjD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC9B,EAAE,KAAK,EAAS,EAChB,QAIkB;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAE9B,MAAM,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;KAC7B;AACH,CAAC;AAED,kBAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/packages/react-native-google-cast/build/withAndroidGoogleCast.d.ts b/packages/react-native-google-cast/build/withAndroidGoogleCast.d.ts deleted file mode 100644 index 1a14c16c..00000000 --- a/packages/react-native-google-cast/build/withAndroidGoogleCast.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare const withAndroidGoogleCast: ConfigPlugin<{ - /** - * @default '+' - */ - androidPlayServicesCastFrameworkVersion?: string; - /** - * ?? - */ - receiverAppId?: string; -}>; diff --git a/packages/react-native-google-cast/build/withAndroidGoogleCast.js b/packages/react-native-google-cast/build/withAndroidGoogleCast.js deleted file mode 100644 index c4991e66..00000000 --- a/packages/react-native-google-cast/build/withAndroidGoogleCast.js +++ /dev/null @@ -1,149 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withAndroidGoogleCast = void 0; -const codeMod_1 = require("@expo/config-plugins/build/android/codeMod"); -const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); -const config_plugins_1 = require("expo/config-plugins"); -const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } = config_plugins_1.AndroidConfig.Manifest; -const META_PROVIDER_CLASS = "com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"; -const META_RECEIVER_APP_ID = "com.reactnative.googlecast.RECEIVER_APPLICATION_ID"; -const CUSTOM_ACTIVITY = "com.reactnative.googlecast.RNGCExpandedControllerActivity"; -async function ensureCustomActivityAsync({ mainApplication, }) { - if (Array.isArray(mainApplication.activity)) { - // Remove all activities matching the custom name - mainApplication.activity = mainApplication.activity.filter((activity) => { - return activity.$?.["android:name"] !== CUSTOM_ACTIVITY; - }); - } - else { - mainApplication.activity = []; - } - // `` - mainApplication.activity.push({ - $: { - "android:name": CUSTOM_ACTIVITY, - }, - }); - return mainApplication; -} -const withAndroidManifestCast = (config, { receiverAppId } = {}) => { - return (0, config_plugins_1.withAndroidManifest)(config, async (config) => { - const mainApplication = getMainApplicationOrThrow(config.modResults); - ensureCustomActivityAsync({ mainApplication }); - addMetaDataItemToMainApplication(mainApplication, META_PROVIDER_CLASS, - // This is the native Java class - "com.reactnative.googlecast.GoogleCastOptionsProvider"); - if (receiverAppId) { - addMetaDataItemToMainApplication(mainApplication, META_RECEIVER_APP_ID, receiverAppId); - } - return config; - }); -}; -const withProjectBuildGradleVersion = (config, { version }) => { - return (0, config_plugins_1.withProjectBuildGradle)(config, (config) => { - if (config.modResults.language !== "groovy") - throw new Error("react-native-google-cast config plugin does not support Kotlin /build.gradle yet."); - config.modResults.contents = addGoogleCastVersionImport(config.modResults.contents, { - version, - }).contents; - return config; - }); -}; -const withAppBuildGradleImport = (config, { version }) => { - return (0, config_plugins_1.withAppBuildGradle)(config, (config) => { - if (config.modResults.language !== "groovy") - throw new Error("react-native-google-cast config plugin does not support Kotlin app/build.gradle yet."); - config.modResults.contents = addSafeExtGet(config.modResults.contents); - config.modResults.contents = addGoogleCastImport(config.modResults.contents, { - version, - }).contents; - return config; - }); -}; -const withMainActivityLazyLoading = (config) => { - return (0, config_plugins_1.withMainActivity)(config, async (config) => { - const src = (0, codeMod_1.addImports)(config.modResults.contents, ["com.google.android.gms.cast.framework.CastContext"], config.modResults.language === "java"); - if (config.modResults.language === "java") { - config.modResults.contents = addGoogleCastLazyLoadingImport(src).contents; - } - else { - throw new Error("react-native-google-cast config plugin does not support kotlin MainActivity yet."); - } - return config; - }); -}; -// castFrameworkVersion -const withAndroidGoogleCast = (config, props) => { - config = withAndroidManifestCast(config, { - receiverAppId: props.receiverAppId, - }); - config = withMainActivityLazyLoading(config); - config = withProjectBuildGradleVersion(config, { - // gradle dep version - version: props.androidPlayServicesCastFrameworkVersion ?? "+", - }); - config = withAppBuildGradleImport(config, { - // gradle dep version - version: props.androidPlayServicesCastFrameworkVersion ?? "+", - }); - return config; -}; -exports.withAndroidGoogleCast = withAndroidGoogleCast; -function addGoogleCastLazyLoadingImport(src) { - const newSrc = []; - newSrc.push(" CastContext.getSharedInstance(this);"); - return (0, generateCode_1.mergeContents)({ - tag: "react-native-google-cast-onCreate", - src, - newSrc: newSrc.join("\n"), - anchor: /super\.onCreate\(\w+\);/, - offset: 1, - comment: "//", - }); -} -// TODO: Add this ability to autolinking -// dependencies { implementation "com.google.android.gms:play-services-cast-framework:+" } -function addGoogleCastImport(src, { version } = {}) { - const newSrc = []; - newSrc.push(` implementation "com.google.android.gms:play-services-cast-framework:\${safeExtGet('castFrameworkVersion', '${version}')}"`); - return (0, generateCode_1.mergeContents)({ - tag: "react-native-google-cast-dependencies", - src, - newSrc: newSrc.join("\n"), - anchor: /dependencies(?:\s+)?\{/, - offset: 1, - comment: "//", - }); -} -function addSafeExtGet(src) { - const tag = "safeExtGet"; - src = (0, generateCode_1.removeContents)({ src, tag }).contents; - // If the source already has a safeExtGet method after removing this one, then go with the existing one. - if (src.match(/def(?:\s+)?safeExtGet\(/)) { - return src; - } - // Otherwise add a new one - const newSrc = []; - newSrc.push("def safeExtGet(prop, fallback) {", " rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback", "}"); - return (0, generateCode_1.mergeContents)({ - tag: "safeExtGet", - src, - newSrc: newSrc.join("\n"), - // This block can go anywhere in the upper scope - anchor: /apply plugin/, - offset: 1, - comment: "//", - }).contents; -} -function addGoogleCastVersionImport(src, { version } = {}) { - const newSrc = []; - newSrc.push(` castFrameworkVersion = "${version}"`); - return (0, generateCode_1.mergeContents)({ - tag: "react-native-google-cast-version", - src, - newSrc: newSrc.join("\n"), - anchor: /ext(?:\s+)?\{/, - offset: 1, - comment: "//", - }); -} diff --git a/packages/react-native-google-cast/build/withGoogleCast.d.ts b/packages/react-native-google-cast/build/withGoogleCast.d.ts deleted file mode 100644 index 24b8b2a5..00000000 --- a/packages/react-native-google-cast/build/withGoogleCast.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -declare const _default: ConfigPlugin; -export default _default; diff --git a/packages/react-native-google-cast/build/withGoogleCast.js b/packages/react-native-google-cast/build/withGoogleCast.js deleted file mode 100644 index 9bedf6ac..00000000 --- a/packages/react-native-google-cast/build/withGoogleCast.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_plugins_1 = require("expo/config-plugins"); -const withAndroidGoogleCast_1 = require("./withAndroidGoogleCast"); -const withIosGoogleCast_1 = require("./withIosGoogleCast"); -const withGoogleCast = (config, _props) => { - const props = _props || {}; - // TODO: Are the Android and iOS receiverAppId values the same? - config = (0, withIosGoogleCast_1.withIosGoogleCast)(config, { - receiverAppId: props.iosReceiverAppId, - // disableDiscoveryAutostart?: boolean; - // startDiscoveryAfterFirstTapOnCastButton?: boolean; - }); - config = (0, withAndroidGoogleCast_1.withAndroidGoogleCast)(config, { - receiverAppId: props.androidReceiverAppId, - androidPlayServicesCastFrameworkVersion: props.androidPlayServicesCastFrameworkVersion, - }); - return config; -}; -exports.default = (0, config_plugins_1.createRunOncePlugin)(withGoogleCast, "react-native-google-cast"); diff --git a/packages/react-native-google-cast/build/withIosGoogleCast.d.ts b/packages/react-native-google-cast/build/withIosGoogleCast.d.ts deleted file mode 100644 index 56d24092..00000000 --- a/packages/react-native-google-cast/build/withIosGoogleCast.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare const withIosGoogleCast: ConfigPlugin<{ - /** - * @default 'CC1AD845' - */ - receiverAppId?: string; -}>; -export declare const MATCH_INIT: RegExp; -type IosProps = { - receiverAppId?: string | null; - disableDiscoveryAutostart?: boolean; - startDiscoveryAfterFirstTapOnCastButton?: boolean; -}; -export declare function addGoogleCastAppDelegateDidFinishLaunchingWithOptions(src: string, { receiverAppId, disableDiscoveryAutostart, startDiscoveryAfterFirstTapOnCastButton, }?: IosProps): import("@expo/config-plugins/build/utils/generateCode").MergeResults; -export {}; diff --git a/packages/react-native-google-cast/build/withIosGoogleCast.js b/packages/react-native-google-cast/build/withIosGoogleCast.js deleted file mode 100644 index 75a8afba..00000000 --- a/packages/react-native-google-cast/build/withIosGoogleCast.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addGoogleCastAppDelegateDidFinishLaunchingWithOptions = exports.MATCH_INIT = exports.withIosGoogleCast = void 0; -const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); -const config_plugins_1 = require("expo/config-plugins"); -/** - * In Xcode, go to Signing & Capabilities, click + Capability and select Access WiFi Information. (This is required since iOS 12.) - * Note that "Wireless Accessory Configuration" is unrelated. - * - * @param {*} config - * @returns - */ -const withIosWifiEntitlements = (config) => { - return (0, config_plugins_1.withEntitlementsPlist)(config, (config) => { - config.modResults["com.apple.developer.networking.wifi-info"] = true; - return config; - }); -}; -const LOCAL_NETWORK_USAGE = "${PRODUCT_NAME} uses the local network to discover Cast-enabled devices on your WiFi network"; -// const BLUETOOTH_ALWAYS_USAGE = -// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices"; -// const BLUETOOTH_PERIPHERAL_USAGE = -// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices"; -// const MICROPHONE_USAGE = -// "${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices"; -/** - * On iOS, a dialog asking the user for the local network permission will now be displayed immediately when the app is opened. - * - * @param {*} config - * @param {*} props.receiverAppId If using a custom receiver, make sure to replace `CC1AD845` with your custom receiver app id. - * @returns - */ -const withIosLocalNetworkPermissions = (config, { receiverAppId = "CC1AD845" } = {}) => { - return (0, config_plugins_1.withInfoPlist)(config, (config) => { - if (!Array.isArray(config.modResults.NSBonjourServices)) { - config.modResults.NSBonjourServices = []; - } - // Add required values - config.modResults.NSBonjourServices.push("_googlecast._tcp", `_${receiverAppId}._googlecast._tcp`); - // Remove duplicates - config.modResults.NSBonjourServices = [ - ...new Set(config.modResults.NSBonjourServices), - ]; - // For iOS 14+, you need to add local network permissions to Info.plist: - // https://developers.google.com/cast/docs/ios_sender/ios_permissions_changes#updating_your_app_on_ios_14 - config.modResults.NSLocalNetworkUsageDescription = - config.modResults.NSLocalNetworkUsageDescription || LOCAL_NETWORK_USAGE; - return config; - }); -}; -// const withIosGuestMode: ConfigPlugin = (config) => { -// return withInfoPlist(config, (config) => { -// config.modResults.NSBluetoothAlwaysUsageDescription = -// config.modResults.NSBluetoothAlwaysUsageDescription || -// BLUETOOTH_ALWAYS_USAGE; -// config.modResults.NSBluetoothPeripheralUsageDescription = -// config.modResults.NSBluetoothPeripheralUsageDescription || -// BLUETOOTH_PERIPHERAL_USAGE; -// config.modResults.NSMicrophoneUsageDescription = -// config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE; -// return config; -// }); -// }; -// TODO: Use AppDelegate swizzling -const withIosAppDelegateLoaded = (config, props) => { - return (0, config_plugins_1.withAppDelegate)(config, (config) => { - if (!["objc", "objcpp"].includes(config.modResults.language)) { - throw new Error("react-native-google-cast config plugin does not support AppDelegate' that aren't Objective-C(++) yet."); - } - config.modResults.contents = - addGoogleCastAppDelegateDidFinishLaunchingWithOptions(config.modResults.contents, props).contents; - config.modResults.contents = addGoogleCastAppDelegateImport(config.modResults.contents).contents; - return config; - }); -}; -const withIosGoogleCast = (config, props) => { - config = withIosWifiEntitlements(config); - config = withIosLocalNetworkPermissions(config, { - receiverAppId: props.receiverAppId, - }); - config = withIosAppDelegateLoaded(config, { - receiverAppId: props.receiverAppId, - // disableDiscoveryAutostart?: boolean; - // startDiscoveryAfterFirstTapOnCastButton?: boolean; - }); - // TODO - // config = withIosGuestMode(config) - return config; -}; -exports.withIosGoogleCast = withIosGoogleCast; -// From expo-cli RNMaps setup -exports.MATCH_INIT = /-\s*\(BOOL\)\s*application:\s*\(UIApplication\s*\*\s*\)\s*\w+\s+didFinishLaunchingWithOptions:/g; -function addGoogleCastAppDelegateDidFinishLaunchingWithOptions(src, { receiverAppId = null, disableDiscoveryAutostart = false, startDiscoveryAfterFirstTapOnCastButton = true, } = {}) { - let newSrc = []; - newSrc.push( - // For extra safety - "#if __has_include()", - // TODO: This should probably read safely from a static file like the Info.plist - ` NSString *receiverAppID = ${receiverAppId - ? `@"${receiverAppId}"` - : "kGCKDefaultMediaReceiverApplicationID"};`, " GCKDiscoveryCriteria *criteria = [[GCKDiscoveryCriteria alloc] initWithApplicationID:receiverAppID];", " GCKCastOptions* options = [[GCKCastOptions alloc] initWithDiscoveryCriteria:criteria];", - // TODO: Same as above, read statically - // ` options.disableDiscoveryAutostart = ${String(!!disableDiscoveryAutostart)};`, - ` options.startDiscoveryAfterFirstTapOnCastButton = ${String(!!startDiscoveryAfterFirstTapOnCastButton)};`, " [GCKCastContext setSharedInstanceWithOptions:options];", "#endif"); - newSrc = newSrc.filter(Boolean); - return (0, generateCode_1.mergeContents)({ - tag: "react-native-google-cast-didFinishLaunchingWithOptions", - src, - newSrc: newSrc.join("\n"), - anchor: exports.MATCH_INIT, - offset: 2, - comment: "//", - }); -} -exports.addGoogleCastAppDelegateDidFinishLaunchingWithOptions = addGoogleCastAppDelegateDidFinishLaunchingWithOptions; -function addGoogleCastAppDelegateImport(src) { - const newSrc = []; - newSrc.push("#if __has_include()", "#import ", "#endif"); - return (0, generateCode_1.mergeContents)({ - tag: "react-native-google-cast-import", - src, - newSrc: newSrc.join("\n"), - anchor: /#import "AppDelegate\.h"/, - offset: 1, - comment: "//", - }); -} diff --git a/packages/react-native-pdf/build/withPdf.d.ts b/packages/react-native-pdf/build/withPdf.d.ts deleted file mode 100644 index 45347849..00000000 --- a/packages/react-native-pdf/build/withPdf.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare const withAndroidPackagingOptions: ConfigPlugin; -export declare function addAndroidPackagingOptions(src: string): import("@expo/config-plugins/build/utils/generateCode").MergeResults; -declare const _default: ConfigPlugin; -export default _default; diff --git a/packages/react-native-pdf/build/withPdf.js b/packages/react-native-pdf/build/withPdf.js deleted file mode 100644 index 15544fed..00000000 --- a/packages/react-native-pdf/build/withPdf.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addAndroidPackagingOptions = exports.withAndroidPackagingOptions = void 0; -const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); -const config_plugins_1 = require("expo/config-plugins"); -let pkg = { - name: "react-native-pdf", -}; -try { - pkg = require("react-native-pdf/package.json"); -} -catch { - // empty catch block -} -const withAndroidPackagingOptions = (config) => { - return (0, config_plugins_1.withAppBuildGradle)(config, (config) => { - if (config.modResults.language === "groovy") { - config.modResults.contents = addAndroidPackagingOptions(config.modResults.contents).contents; - } - else { - config_plugins_1.WarningAggregator.addWarningAndroid("@config-plugins/react-native-pdf", `Cannot automatically configure app build.gradle if it's not groovy`); - } - return config; - }); -}; -exports.withAndroidPackagingOptions = withAndroidPackagingOptions; -function addAndroidPackagingOptions(src) { - return (0, generateCode_1.mergeContents)({ - tag: "react-native-pdf-packaging-options", - src, - newSrc: packagingOptionsContents, - anchor: /android(?:\s+)?\{/, - // Inside the android block. - offset: 1, - comment: "//", - }); -} -exports.addAndroidPackagingOptions = addAndroidPackagingOptions; -const packagingOptionsContents = ` - packagingOptions { - pickFirst 'lib/x86/libc++_shared.so' - pickFirst 'lib/x86_64/libjsc.so' - pickFirst 'lib/arm64-v8a/libjsc.so' - pickFirst 'lib/arm64-v8a/libc++_shared.so' - pickFirst 'lib/x86_64/libc++_shared.so' - pickFirst 'lib/armeabi-v7a/libc++_shared.so' - } -`; -const withReactNativePdf = (config) => { - return (0, exports.withAndroidPackagingOptions)(config); -}; -exports.default = (0, config_plugins_1.createRunOncePlugin)(withReactNativePdf, pkg.name, pkg.version); diff --git a/packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.d.ts b/packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.d.ts deleted file mode 100644 index 2049df9e..00000000 --- a/packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MergeResults } from "@expo/config-plugins/build/utils/generateCode"; -import { ConfigPlugin } from "expo/config-plugins"; -export declare function addSiriShortcutAppDelegateImport(src: string): MergeResults; -export declare function addSiriShortcutAppDelegateInit(src: string): MergeResults; -declare const _default: ConfigPlugin; -export default _default; diff --git a/packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.js b/packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.js deleted file mode 100644 index 7c592e09..00000000 --- a/packages/react-native-siri-shortcut/build/withReactNativeSiriShortcut.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.addSiriShortcutAppDelegateInit = exports.addSiriShortcutAppDelegateImport = void 0; -const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); -const config_plugins_1 = require("expo/config-plugins"); -/** - * Apply react-native-siri-shortcut configuration for Expo SDK 44 projects. - */ -const withReactNativeSiriShortcut = (config, activityTypes) => { - withSiriShortcutAppDelegate(config); - withSiriEntitlements(config); - const items = activityTypes || []; - if (!Array.isArray(items) || !items.length) { - return config; - } - return withReactNativeSiriShortcutInfoPlist(config, items); -}; -const withReactNativeSiriShortcutInfoPlist = (config, activityTypes) => { - return (0, config_plugins_1.withInfoPlist)(config, (config) => { - config.modResults.NSUserActivityTypes = activityTypes; - return config; - }); -}; -function addSiriShortcutAppDelegateImport(src) { - return (0, generateCode_1.mergeContents)({ - tag: "react-native-siri-shortcut", - src, - newSrc: "#import ", - anchor: /#import "AppDelegate\.h"/, - offset: 1, - comment: "//", - }); -} -exports.addSiriShortcutAppDelegateImport = addSiriShortcutAppDelegateImport; -function addSiriShortcutAppDelegateInit(src) { - return (0, generateCode_1.mergeContents)({ - tag: "react-native-siri-shortcut-delegate", - src, - newSrc: " [RNSSSiriShortcuts application:application continueUserActivity:userActivity restorationHandler:restorationHandler];", - anchor: / return \[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler\] \|\| result;/, - offset: -1, - comment: "//", - }); -} -exports.addSiriShortcutAppDelegateInit = addSiriShortcutAppDelegateInit; -/** Append the siri entitlement on iOS */ -const withSiriEntitlements = (config) => { - return (0, config_plugins_1.withEntitlementsPlist)(config, (config) => { - config.modResults["com.apple.developer.siri"] = true; - return config; - }); -}; -const withSiriShortcutAppDelegate = (config) => { - return (0, config_plugins_1.withAppDelegate)(config, (config) => { - if (["objc", "objcpp"].includes(config.modResults.language)) { - try { - config.modResults.contents = addSiriShortcutAppDelegateImport(config.modResults.contents).contents; - config.modResults.contents = addSiriShortcutAppDelegateInit(config.modResults.contents).contents; - } - catch (error) { - if (error.code === "ERR_NO_MATCH") { - throw new Error(`Cannot add Siri Shortcut to the project's AppDelegate because it's malformed. Please report this with a copy of your project AppDelegate.`); - } - throw error; - } - } - else { - throw new Error("Cannot setup Siri Shortcut because the AppDelegate is not Objective C"); - } - return config; - }); -}; -const pkg = { - // Prevent this plugin from being run more than once. - // This pattern enables users to safely migrate off of this - // out-of-tree `@config-plugins/react-native-siri-shortcut` to a future - // upstream plugin in `react-native-siri-shortcut` - name: "react-native-siri-shortcut", - // Indicates that this plugin is dangerously linked to a module, - // and might not work with the latest version of that module. - version: "UNVERSIONED", -}; -exports.default = (0, config_plugins_1.createRunOncePlugin)(withReactNativeSiriShortcut, pkg.name, pkg.version); diff --git a/packages/react-native-webrtc/build/withBitcodeDisabled.d.ts b/packages/react-native-webrtc/build/withBitcodeDisabled.d.ts deleted file mode 100644 index 3e974d91..00000000 --- a/packages/react-native-webrtc/build/withBitcodeDisabled.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export declare const withBitcodeDisabled: ConfigPlugin; diff --git a/packages/react-native-webrtc/build/withBitcodeDisabled.js b/packages/react-native-webrtc/build/withBitcodeDisabled.js deleted file mode 100644 index fe61f1af..00000000 --- a/packages/react-native-webrtc/build/withBitcodeDisabled.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withBitcodeDisabled = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const withBitcodeDisabled = (config) => { - if (!config.ios) { - config.ios = {}; - } - if (config.ios?.bitcode != null && config.ios?.bitcode !== false) { - config_plugins_1.WarningAggregator.addWarningIOS("ios.bitcode", "react-native-webrtc plugin is overwriting project bitcode settings. WebRTC requires bitcode to be disabled for builds, targeting physical iOS devices."); - } - // WebRTC requires Bitcode be disabled for - // production AND development iOS builds that target devices, e.g. not simulators. - // SDK +44 property - config.ios.bitcode = false; - return config; -}; -exports.withBitcodeDisabled = withBitcodeDisabled; diff --git a/packages/react-native-webrtc/build/withDesugaring.d.ts b/packages/react-native-webrtc/build/withDesugaring.d.ts deleted file mode 100644 index 90d09688..00000000 --- a/packages/react-native-webrtc/build/withDesugaring.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -/** - * Set the `android.enableDexingArtifactTransform.desugaring` value in the static `gradle.properties` file. - * This is used to disable desugaring to fix weird Android bugs. [Learn more](https://github.com/jitsi/jitsi-meet/issues/7911#issuecomment-714323255). - */ -export declare const withDesugaring: ConfigPlugin; diff --git a/packages/react-native-webrtc/build/withDesugaring.js b/packages/react-native-webrtc/build/withDesugaring.js deleted file mode 100644 index d4a44b3f..00000000 --- a/packages/react-native-webrtc/build/withDesugaring.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withDesugaring = void 0; -const config_plugins_1 = require("expo/config-plugins"); -/** - * Set the `android.enableDexingArtifactTransform.desugaring` value in the static `gradle.properties` file. - * This is used to disable desugaring to fix weird Android bugs. [Learn more](https://github.com/jitsi/jitsi-meet/issues/7911#issuecomment-714323255). - */ -const withDesugaring = (config, isDisabled) => { - const desugaringKey = "android.enableDexingArtifactTransform.desugaring"; - return (0, config_plugins_1.withGradleProperties)(config, (config) => { - config.modResults = config.modResults.filter((item) => { - if (item.type === "property" && item.key === desugaringKey) { - return false; - } - return true; - }); - config.modResults.push({ - type: "property", - key: desugaringKey, - value: String(!isDisabled), - }); - return config; - }); -}; -exports.withDesugaring = withDesugaring; diff --git a/packages/react-native-webrtc/build/withPermissions.d.ts b/packages/react-native-webrtc/build/withPermissions.d.ts deleted file mode 100644 index 881ea125..00000000 --- a/packages/react-native-webrtc/build/withPermissions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -export type IOSPermissionsProps = { - cameraPermission?: string; - microphonePermission?: string; -}; -export declare const withPermissions: ConfigPlugin; diff --git a/packages/react-native-webrtc/build/withPermissions.js b/packages/react-native-webrtc/build/withPermissions.js deleted file mode 100644 index ea247fca..00000000 --- a/packages/react-native-webrtc/build/withPermissions.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withPermissions = void 0; -const config_plugins_1 = require("expo/config-plugins"); -const CAMERA_USAGE = "Allow $(PRODUCT_NAME) to access your camera"; -const MICROPHONE_USAGE = "Allow $(PRODUCT_NAME) to access your microphone"; -const withPermissions = (config, props) => { - return (0, config_plugins_1.withInfoPlist)(config, (config) => { - const { cameraPermission, microphonePermission } = props || {}; - config.modResults.NSCameraUsageDescription = - cameraPermission || - config.modResults.NSCameraUsageDescription || - CAMERA_USAGE; - config.modResults.NSMicrophoneUsageDescription = - microphonePermission || - config.modResults.NSMicrophoneUsageDescription || - MICROPHONE_USAGE; - return config; - }); -}; -exports.withPermissions = withPermissions; diff --git a/packages/react-native-webrtc/build/withWebRTC.d.ts b/packages/react-native-webrtc/build/withWebRTC.d.ts deleted file mode 100644 index 7d0a2382..00000000 --- a/packages/react-native-webrtc/build/withWebRTC.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ConfigPlugin } from "expo/config-plugins"; -import { IOSPermissionsProps } from "./withPermissions"; -declare const _default: ConfigPlugin; -export default _default; diff --git a/packages/react-native-webrtc/build/withWebRTC.js b/packages/react-native-webrtc/build/withWebRTC.js deleted file mode 100644 index 3556acdc..00000000 --- a/packages/react-native-webrtc/build/withWebRTC.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const expo_build_properties_1 = require("expo-build-properties"); -const config_plugins_1 = require("expo/config-plugins"); -const withBitcodeDisabled_1 = require("./withBitcodeDisabled"); -const withDesugaring_1 = require("./withDesugaring"); -const withPermissions_1 = require("./withPermissions"); -const pkg = { name: "react-native-webrtc", version: "UNVERSIONED" }; //require("react-native-webrtc/package.json"); -const withWebRTC = (config, props = {}) => { - const _props = props || {}; - // iOS - config = (0, withPermissions_1.withPermissions)(config, _props); - config = (0, withBitcodeDisabled_1.withBitcodeDisabled)(config); - // Android - config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [ - "android.permission.ACCESS_NETWORK_STATE", - "android.permission.BLUETOOTH", - "android.permission.CAMERA", - "android.permission.INTERNET", - "android.permission.MODIFY_AUDIO_SETTINGS", - "android.permission.RECORD_AUDIO", - "android.permission.SYSTEM_ALERT_WINDOW", - "android.permission.WAKE_LOCK", - ]); - config = (0, expo_build_properties_1.withBuildProperties)(config, { - android: { - // https://github.com/expo/expo/blob/sdk-46/templates/expo-template-bare-minimum/android/build.gradle#L8 - minSdkVersion: 24, - }, - }); - config = (0, withDesugaring_1.withDesugaring)(config, true); - return config; -}; -exports.default = (0, config_plugins_1.createRunOncePlugin)(withWebRTC, pkg.name, pkg.version); diff --git a/yarn.lock b/yarn.lock index eba561de..b453145f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -105,6 +105,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.20.5": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" + integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== + dependencies: + "@babel/types" "^7.23.6" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -325,11 +335,21 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-string-parser@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" + integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== + "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + "@babel/helper-validator-identifier@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" @@ -1250,6 +1270,15 @@ "@babel/helper-validator-identifier" "^7.22.5" to-fast-properties "^2.0.0" +"@babel/types@^7.23.6": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.9.tgz#1dd7b59a9a2b5c87f8b41e52770b5ecbf492e002" + integrity sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@bacons/xcode@^1.0.0-alpha.6": version "1.0.0-alpha.6" resolved "https://registry.yarnpkg.com/@bacons/xcode/-/xcode-1.0.0-alpha.6.tgz#a4c2d1ef7894e452d25328a10432ee7052593b53" @@ -1465,27 +1494,6 @@ node-forge "^1.2.1" nullthrows "^1.1.1" -"@expo/config-plugins@4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-4.1.5.tgz#9d357d2cda9c095e511b51583ede8a3b76174068" - integrity sha512-RVvU40RtZt12HavuDAe+LDIq9lHj7sheOfMEHdmpJ/uTA8pgvkbc56XF6JHQD+yRr6+uhhb+JnAasGq49dsQbw== - dependencies: - "@expo/config-types" "^45.0.0" - "@expo/json-file" "8.2.36" - "@expo/plist" "0.0.18" - "@expo/sdk-runtime-versions" "^1.0.0" - "@react-native/normalize-color" "^2.0.0" - chalk "^4.1.2" - debug "^4.3.1" - find-up "~5.0.0" - getenv "^1.0.0" - glob "7.1.6" - resolve-from "^5.0.0" - semver "^7.3.5" - slash "^3.0.0" - xcode "^3.0.1" - xml2js "0.4.23" - "@expo/config-plugins@7.2.5", "@expo/config-plugins@~7.2.0": version "7.2.5" resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-7.2.5.tgz#b15f22878975fdc4ddcfa8cdc971937ddc4c0249" @@ -1507,7 +1515,7 @@ xcode "^3.0.1" xml2js "0.6.0" -"@expo/config-plugins@~5.0.0", "@expo/config-plugins@~5.0.3": +"@expo/config-plugins@~5.0.3": version "5.0.4" resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-5.0.4.tgz#216fea6558fe66615af1370de55193f4181cb23e" integrity sha512-vzUcVpqOMs3h+hyRdhGwk+eGIOhXa5xYdd92yO17RMNHav3v/+ekMbs7XA2c3lepMO8Yd4/5hqmRw9ZTL6jGzg== @@ -1528,15 +1536,28 @@ xcode "^3.0.1" xml2js "0.4.23" -"@expo/config-types@^45.0.0": - version "45.0.0" - resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-45.0.0.tgz#963c2fdce8fbcbd003758b92ed8a25375f437ef6" - integrity sha512-/QGhhLWyaGautgEyU50UJr5YqKJix5t77ePTwreOVAhmZH+ff3nrrtYTTnccx+qF08ZNQmfAyYMCD3rQfzpiJA== - -"@expo/config-types@^46.0.0": - version "46.0.1" - resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-46.0.1.tgz#ba5d6197222039de13aefdf0171d24b027781cd0" - integrity sha512-LQWGDagQ0YXGSJyLomNDZrYXj/cUP+wczs9y2M8MB9UDoSU6dbLRMiSX0FMhhKKdxBK0p92VQxZyqOzGpIYfSw== +"@expo/config-plugins@~7.8.2": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-7.8.4.tgz#533b5d536c1dc8b5544d64878b51bda28f2e1a1f" + integrity sha512-hv03HYxb/5kX8Gxv/BTI8TLc9L06WzqAfHRRXdbar4zkLcP2oTzvsLEF4/L/TIpD3rsnYa0KU42d0gWRxzPCJg== + dependencies: + "@expo/config-types" "^50.0.0-alpha.1" + "@expo/fingerprint" "^0.6.0" + "@expo/json-file" "~8.3.0" + "@expo/plist" "^0.1.0" + "@expo/sdk-runtime-versions" "^1.0.0" + "@react-native/normalize-color" "^2.0.0" + chalk "^4.1.2" + debug "^4.3.1" + find-up "~5.0.0" + getenv "^1.0.0" + glob "7.1.6" + resolve-from "^5.0.0" + semver "^7.5.3" + slash "^3.0.0" + slugify "^1.6.6" + xcode "^3.0.1" + xml2js "0.6.0" "@expo/config-types@^47.0.0": version "47.0.0" @@ -1548,39 +1569,10 @@ resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-49.0.0.tgz#15ffef715285c06703f6fb7ec0cda853f645cc09" integrity sha512-8eyREVi+K2acnMBe/rTIu1dOfyR2+AMnTLHlut+YpMV9OZPdeKV0Bs9BxAewGqBA2slslbQ9N39IS2CuTKpXkA== -"@expo/config@6.0.24": - version "6.0.24" - resolved "https://registry.yarnpkg.com/@expo/config/-/config-6.0.24.tgz#3602da8fdfa817e290a52fb328fc8ed9d6bc61e7" - integrity sha512-OcACI1md1Yo5TQmUxxueJ/RaTlR2Mgl6KswTFOYCL1XJERF/jjAx95zhWXH+JQGdlM0yB0vqM6vB6GbUFRvLxA== - dependencies: - "@babel/code-frame" "~7.10.4" - "@expo/config-plugins" "4.1.5" - "@expo/config-types" "^45.0.0" - "@expo/json-file" "8.2.36" - getenv "^1.0.0" - glob "7.1.6" - require-from-string "^2.0.2" - resolve-from "^5.0.0" - semver "7.3.2" - slugify "^1.3.4" - sucrase "^3.20.0" - -"@expo/config@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@expo/config/-/config-7.0.0.tgz#0289d4cadff48eaed33683384c41ae9a90bb8b00" - integrity sha512-4807iau5gTcCAMUDWxsXfBX4E3embZJREO9c098GiRgAvCBc7PCqdGs9jEAKakCxmPbMGBURL17rKYAsHtZuQw== - dependencies: - "@babel/code-frame" "~7.10.4" - "@expo/config-plugins" "~5.0.0" - "@expo/config-types" "^46.0.0" - "@expo/json-file" "8.2.36" - getenv "^1.0.0" - glob "7.1.6" - require-from-string "^2.0.2" - resolve-from "^5.0.0" - semver "7.3.2" - slugify "^1.3.4" - sucrase "^3.20.0" +"@expo/config-types@^50.0.0", "@expo/config-types@^50.0.0-alpha.1": + version "50.0.0" + resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-50.0.0.tgz#b534d3ec997ec60f8af24f6ad56244c8afc71a0b" + integrity sha512-0kkhIwXRT6EdFDwn+zTg9R2MZIAEYGn1MVkyRohAd+C9cXOb5RA8WLQi7vuxKF9m1SMtNAUrf0pO+ENK0+/KSw== "@expo/config@8.1.2", "@expo/config@~8.1.0": version "8.1.2" @@ -1616,6 +1608,23 @@ slugify "^1.3.4" sucrase "^3.20.0" +"@expo/config@~8.5.0": + version "8.5.4" + resolved "https://registry.yarnpkg.com/@expo/config/-/config-8.5.4.tgz#bb5eb06caa36e4e35dc8c7647fae63e147b830ca" + integrity sha512-ggOLJPHGzJSJHVBC1LzwXwR6qUn8Mw7hkc5zEKRIdhFRuIQ6s2FE4eOvP87LrNfDF7eZGa6tJQYsiHSmZKG+8Q== + dependencies: + "@babel/code-frame" "~7.10.4" + "@expo/config-plugins" "~7.8.2" + "@expo/config-types" "^50.0.0" + "@expo/json-file" "^8.2.37" + getenv "^1.0.0" + glob "7.1.6" + require-from-string "^2.0.2" + resolve-from "^5.0.0" + semver "7.5.3" + slugify "^1.3.4" + sucrase "3.34.0" + "@expo/dev-server@0.5.4": version "0.5.4" resolved "https://registry.yarnpkg.com/@expo/dev-server/-/dev-server-0.5.4.tgz#de60dff310e32f24e8beb54ed5505bf0a03dbf08" @@ -1667,6 +1676,30 @@ dotenv-expand "~10.0.0" getenv "^1.0.0" +"@expo/env@~0.2.0": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@expo/env/-/env-0.2.1.tgz#51b5e836ce510cbb18341ad2ab2f685354fd4a94" + integrity sha512-deZmRS7Dvp18VM8s559dq/ZjPlV1D9vtLoLXwHmCK/JYOvtNptdKsfxcWjI7ewmo6ln2PqgNI9HRI74q6Wk2eA== + dependencies: + chalk "^4.0.0" + debug "^4.3.4" + dotenv "~16.0.3" + dotenv-expand "~10.0.0" + getenv "^1.0.0" + +"@expo/fingerprint@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@expo/fingerprint/-/fingerprint-0.6.0.tgz#77366934673d4ecea37284109b4dd67f9e6a7487" + integrity sha512-KfpoVRTMwMNJ/Cf5o+Ou8M/Y0EGSTqK+rbi70M2Y0K2qgWNfMJ1gm6sYO9uc8lcTr7YSYM1Rme3dk7QXhpScNA== + dependencies: + "@expo/spawn-async" "^1.5.0" + chalk "^4.1.2" + debug "^4.3.4" + find-up "^5.0.0" + minimatch "^3.0.4" + p-limit "^3.1.0" + resolve-from "^5.0.0" + "@expo/image-utils@0.3.22": version "0.3.22" resolved "https://registry.yarnpkg.com/@expo/image-utils/-/image-utils-0.3.22.tgz#3a45fb2e268d20fcc761c87bca3aca7fd8e24260" @@ -1684,6 +1717,23 @@ semver "7.3.2" tempy "0.3.0" +"@expo/image-utils@0.3.23": + version "0.3.23" + resolved "https://registry.yarnpkg.com/@expo/image-utils/-/image-utils-0.3.23.tgz#f14fd7e1f5ff6f8e4911a41e27dd274470665c3f" + integrity sha512-nhUVvW0TrRE4jtWzHQl8TR4ox7kcmrc2I0itaeJGjxF5A54uk7avgA0wRt7jP1rdvqQo1Ke1lXyLYREdhN9tPw== + dependencies: + "@expo/spawn-async" "1.5.0" + chalk "^4.0.0" + fs-extra "9.0.0" + getenv "^1.0.0" + jimp-compact "0.16.1" + mime "^2.4.4" + node-fetch "^2.6.0" + parse-png "^2.1.0" + resolve-from "^5.0.0" + semver "7.3.2" + tempy "0.3.0" + "@expo/json-file@8.2.30": version "8.2.30" resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-8.2.30.tgz#bd855b6416b5c3af7e55b43f6761c1e7d2b755b0" @@ -1712,6 +1762,15 @@ json5 "^2.2.2" write-file-atomic "^2.3.0" +"@expo/json-file@~8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-8.3.0.tgz#fc84af77b532a4e9bfb5beafd0e3b7f692b6bd7e" + integrity sha512-yROUeXJXR5goagB8c3muFLCzLmdGOvoPpR5yDNaXrnTp4euNykr9yW0wWhJx4YVRTNOPtGBnEbbJBW+a9q+S6g== + dependencies: + "@babel/code-frame" "~7.10.4" + json5 "^2.2.2" + write-file-atomic "^2.3.0" + "@expo/metro-config@~0.10.0": version "0.10.6" resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.10.6.tgz#d35761cd49a893f687b757cbd777d3ff461ee90f" @@ -1730,19 +1789,31 @@ resolve-from "^5.0.0" sucrase "^3.20.0" -"@expo/metro-config@~0.3.18": - version "0.3.21" - resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.3.21.tgz#f0ac853aa43291b678a26d9f3d7b5f873ed794dc" - integrity sha512-z3vaB+He/hvO3F65hdpmYjB2y969UtzB8u7M1y91AURDemsMT82xri7fjNxx6R4EVNzhr5a3PG93kArEDnuBfw== +"@expo/metro-config@~0.17.0": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.17.3.tgz#f06f0929e4ac907517d24794d35021901651da49" + integrity sha512-YW8ixbaz6yL7/Mg1rJJejiAAVQQKjGY1wXvT2Dh487r/r9/j1yE1YRS/oRY1yItYzbnHvO0p0jMnEGfiFYL3Tg== dependencies: - "@expo/config" "7.0.0" - "@expo/json-file" "8.2.36" + "@babel/core" "^7.20.0" + "@babel/generator" "^7.20.5" + "@babel/parser" "^7.20.0" + "@babel/types" "^7.20.0" + "@expo/config" "~8.5.0" + "@expo/env" "~0.2.0" + "@expo/json-file" "~8.3.0" + "@expo/spawn-async" "^1.7.2" + babel-preset-fbjs "^3.4.0" chalk "^4.1.0" debug "^4.3.2" find-yarn-workspace-root "~2.0.0" + fs-extra "^9.1.0" getenv "^1.0.0" + glob "^7.2.3" + jsc-safe-url "^0.2.4" + lightningcss "~1.19.0" + postcss "~8.4.32" resolve-from "^5.0.0" - sucrase "^3.20.0" + sucrase "3.34.0" "@expo/npm-proofread@^1.0.1": version "1.0.1" @@ -1809,6 +1880,15 @@ base64-js "^1.2.3" xmlbuilder "^14.0.0" +"@expo/plist@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.1.0.tgz#eabc95f951d14e10c87fd0443ee01d567371f058" + integrity sha512-xWD+8vIFif0wKyuqe3fmnmnSouXYucciZXFzS0ZD5OV9eSAS1RGQI5FaGGJ6zxJ4mpdy/4QzbLdBjnYE5vxA0g== + dependencies: + "@xmldom/xmldom" "~0.7.7" + base64-js "^1.2.3" + xmlbuilder "^14.0.0" + "@expo/prebuild-config@6.2.6": version "6.2.6" resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-6.2.6.tgz#c5b4f8adcba4be00c874d6b24a8267d45c555261" @@ -1857,24 +1937,30 @@ dependencies: cross-spawn "^7.0.3" +"@expo/spawn-async@^1.7.2": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@expo/spawn-async/-/spawn-async-1.7.2.tgz#fcfe66c3e387245e72154b1a7eae8cada6a47f58" + integrity sha512-QdWi16+CHB9JYP7gma19OVVg0BFkvU8zNj9GjWorYI8Iv8FUxjOCcYRuAmX4s/h91e4e7BPsskc8cSrZYho9Ew== + dependencies: + cross-spawn "^7.0.3" + "@expo/vector-icons@^13.0.0": version "13.0.0" resolved "https://registry.yarnpkg.com/@expo/vector-icons/-/vector-icons-13.0.0.tgz#e2989b85e95a82bce216f88cf8fb583ab050ec95" integrity sha512-TI+l71+5aSKnShYclFa14Kum+hQMZ86b95SH6tQUG3qZEmLTarvWpKwqtTwQKqvlJSJrpFiSFu3eCuZokY6zWA== -"@expo/webpack-config@~0.16.14": - version "0.16.27" - resolved "https://registry.yarnpkg.com/@expo/webpack-config/-/webpack-config-0.16.27.tgz#05819e9b4a3f9dfc6890e86d14c11071d70c8891" - integrity sha512-dC9RzRJAvMncNyxQX1+SR4NfkQPwjYxhxDpeUxGVySEuPLeluG219ddqMTVh2HMeqA7fGZsCEGWa5yVadSknNQ== +"@expo/webpack-config@~0.17.4": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@expo/webpack-config/-/webpack-config-0.17.4.tgz#c2cb670a8f431dc76a645d183a38465ed235e3a7" + integrity sha512-vn37RDhYowfLc2oRaXhmbI/9FStjQFXPONG3yRLfwUnA4dRtfXapJUSKHJKRwOy4fBBmTrb2tthtsdb4zeWmsw== dependencies: "@babel/core" "7.9.0" - "@expo/config" "6.0.24" babel-loader "8.1.0" chalk "^4.0.0" clean-webpack-plugin "^3.0.0" copy-webpack-plugin "~6.0.3" css-loader "~3.6.0" - expo-pwa "0.0.122" + expo-pwa "0.0.124" file-loader "~6.0.0" find-yarn-workspace-root "~2.0.0" getenv "^1.0.0" @@ -7630,13 +7716,12 @@ expo-modules-core@1.5.7: compare-versions "^3.4.0" invariant "^2.2.4" -expo-pwa@0.0.122: - version "0.0.122" - resolved "https://registry.yarnpkg.com/expo-pwa/-/expo-pwa-0.0.122.tgz#1ebe55694908a1f6d7b6f03d251464a4531cafcc" - integrity sha512-E2DVR/1SWFXqLLT9XNKnSVoHbZLGhpkx7PigaqfcI/t1hF+A6zAopwDfKmpFGymuSVqlwEJMTr/PYRdhUY55/g== +expo-pwa@0.0.124: + version "0.0.124" + resolved "https://registry.yarnpkg.com/expo-pwa/-/expo-pwa-0.0.124.tgz#684e68aea6c7f95864a8cde17a57e223ed017199" + integrity sha512-hYvQQhxATNTivWSRc9nrd1WVYJJnBG8P/SVrJ4PPu0pmsS7ZIvWt981IXYG461y9UWnTbXdZEG4UOt0Thak1Gg== dependencies: - "@expo/config" "6.0.24" - "@expo/image-utils" "0.3.22" + "@expo/image-utils" "0.3.23" chalk "^4.0.0" commander "2.20.0" update-check "1.5.3" @@ -7653,13 +7738,13 @@ expo-status-bar@~1.6.0: resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-1.6.0.tgz#e79ffdb9a84d2e0ec9a0dc7392d9ab364fefa9cf" integrity sha512-e//Oi2WPdomMlMDD3skE4+1ZarKCJ/suvcB4Jo/nO427niKug5oppcPNYO+csR6y3ZglGuypS+3pp/hJ+Xp6fQ== -expo-yarn-workspaces@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expo-yarn-workspaces/-/expo-yarn-workspaces-2.0.2.tgz#744d03684d21661aedc6af97df1ef46811b375ff" - integrity sha512-wpNDZCtct+74a0SpTNhEWRPREXCMANn8+aIHonqBf2hp+bFf3lDmyquH1flreVvB5hmBo5/ytWPb7McGkAXmJw== +expo-yarn-workspaces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/expo-yarn-workspaces/-/expo-yarn-workspaces-2.3.2.tgz#fbb8a0990f9b70495a4822560f1c733f87c04476" + integrity sha512-ar/gWQlqLHYbILgNqyImFo3pgAl5bWgbyQyG6h4lM5DnC2/C+z08wtdAeJ3JE9wM4AddFZH1lF7RBGRtGrNfmw== dependencies: - "@expo/metro-config" "~0.3.18" - "@expo/webpack-config" "~0.16.14" + "@expo/metro-config" "~0.17.0" + "@expo/webpack-config" "~0.17.4" debug "^4.3.2" find-yarn-workspace-root "^2.0.0" glob "^7.1.7" @@ -12025,6 +12110,11 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -13452,6 +13542,15 @@ postcss@~8.4.21: picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@~8.4.32: + version "8.4.34" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.34.tgz#563276e86b4ff20dfa5eed0d394d4c53853b2051" + integrity sha512-4eLTO36woPSocqZ1zIrFD2K1v6wH7pY1uBh0JIM2KKfrVtGvPFiAku6aNOP0W1Wr9qwnaCsF0Z+CrVnryB2A8Q== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.0.2" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -13917,11 +14016,6 @@ react-native-adjust@^4.33.0: resolved "https://registry.yarnpkg.com/react-native-adjust/-/react-native-adjust-4.33.0.tgz#92a906d137993d8763500d85e07e4789c6ab33cd" integrity sha512-EYCG5iA5I/VaIpAEEvawEvdE4miKH2hAtEzWo7on775go+dbtKsd4c3G26NvSu8cCei39HMs9CAIlGBVI+SxRw== -react-native-ble-plx@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/react-native-ble-plx/-/react-native-ble-plx-2.0.3.tgz#b0a746f33389dbf7fd7b158513330d487d5d0fbb" - integrity sha512-62LRDBPf/03K7sge+qq2ZuF8PWCGB782G+SBrpgNm5fA5Hs3FCY1ExTJZ1G0tB5ZhBPYEXcKRxPLuFegcDFrqA== - react-native-blob-util@^0.18.3: version "0.18.3" resolved "https://registry.yarnpkg.com/react-native-blob-util/-/react-native-blob-util-0.18.3.tgz#e3b408dfdd5b175093bbef23f33811f8ef3407ee" @@ -15026,6 +15120,11 @@ slugify@^1.3.4: resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.6.5.tgz#c8f5c072bf2135b80703589b39a3d41451fbe8c8" integrity sha512-8mo9bslnBO3tr5PEVFzMPIWwWnipGS0xVbYf65zxDqfNwmzYn1LpiKNrR6DlClusuvo+hDHd1zKpmfAe83NQSQ== +slugify@^1.6.6: + version "1.6.6" + resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.6.6.tgz#2d4ac0eacb47add6af9e04d3be79319cbcc7924b" + integrity sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw== + smart-buffer@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" @@ -15602,6 +15701,19 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" +sucrase@3.34.0: + version "3.34.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f" + integrity sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.2" + commander "^4.0.0" + glob "7.1.6" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + sucrase@^3.20.0: version "3.25.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.25.0.tgz#6dffa34e614b3347877507a4380cc4f022b7b7aa"