expo-targets 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/expo/modules/targets/ExpoTargetsConfig.kt +36 -0
- package/android/src/main/java/expo/modules/targets/ExpoTargetsRemoteViewsProvider.kt +10 -1
- package/android/src/main/java/expo/modules/targets/notification/ExpoTargetsNotificationModule.kt +2 -2
- package/android/src/main/java/expo/modules/targets/storage/ExpoTargetsStorageModule.kt +5 -13
- package/bin/export-safari-bundle.js +20 -1
- package/build/plugin/src/config.d.ts +86 -3
- package/build/plugin/src/config.d.ts.map +1 -1
- package/build/plugin/src/config.js +1 -52
- package/build/plugin/src/config.js.map +1 -1
- package/build/plugin/src/domain/typeSets.d.ts +31 -0
- package/build/plugin/src/domain/typeSets.d.ts.map +1 -0
- package/build/plugin/src/domain/typeSets.js +70 -0
- package/build/plugin/src/domain/typeSets.js.map +1 -0
- package/build/plugin/src/domain/types.d.ts +9 -0
- package/build/plugin/src/domain/types.d.ts.map +1 -0
- package/build/plugin/src/domain/types.js +10 -0
- package/build/plugin/src/domain/types.js.map +1 -0
- package/build/src/Target.d.ts.map +1 -1
- package/build/src/Target.js +5 -13
- package/build/src/Target.js.map +1 -1
- package/build/src/index.d.ts +3 -1
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +56 -52
- package/build/src/index.js.map +1 -1
- package/build/src/modules/appIntents/index.d.ts +53 -0
- package/build/src/modules/appIntents/index.d.ts.map +1 -0
- package/build/src/modules/appIntents/index.js +145 -0
- package/build/src/modules/appIntents/index.js.map +1 -0
- package/build/src/modules/contentBlocker/index.js +2 -2
- package/build/src/modules/contentBlocker/index.js.map +1 -1
- package/build/src/modules/extension/index.js +2 -2
- package/build/src/modules/extension/index.js.map +1 -1
- package/build/src/modules/extensionBundle/ExtensionUpdatesApi.js +1 -1
- package/build/src/modules/extensionBundle/ExtensionUpdatesApi.js.map +1 -1
- package/build/src/modules/extensionBundle/enableExtensionUpdates.d.ts.map +1 -1
- package/build/src/modules/extensionBundle/enableExtensionUpdates.js +2 -8
- package/build/src/modules/extensionBundle/enableExtensionUpdates.js.map +1 -1
- package/build/src/modules/extensionBundle/nativeInstall.js +2 -2
- package/build/src/modules/extensionBundle/nativeInstall.js.map +1 -1
- package/build/src/modules/fileProvider/index.js +2 -2
- package/build/src/modules/fileProvider/index.js.map +1 -1
- package/build/src/modules/liveActivity/index.d.ts +1 -1
- package/build/src/modules/liveActivity/index.d.ts.map +1 -1
- package/build/src/modules/liveActivity/index.js +2 -2
- package/build/src/modules/liveActivity/index.js.map +1 -1
- package/build/src/modules/messages/index.js +2 -2
- package/build/src/modules/messages/index.js.map +1 -1
- package/build/src/modules/notification/index.js +2 -2
- package/build/src/modules/notification/index.js.map +1 -1
- package/build/src/modules/storage/appGroup.d.ts +7 -0
- package/build/src/modules/storage/appGroup.d.ts.map +1 -0
- package/build/src/modules/storage/appGroup.js +25 -0
- package/build/src/modules/storage/appGroup.js.map +1 -0
- package/build/src/modules/storage/index.d.ts +19 -3
- package/build/src/modules/storage/index.d.ts.map +1 -1
- package/build/src/modules/storage/index.js +37 -4
- package/build/src/modules/storage/index.js.map +1 -1
- package/build/src/modules/targetsConfig.d.ts.map +1 -1
- package/build/src/modules/targetsConfig.js +1 -13
- package/build/src/modules/targetsConfig.js.map +1 -1
- package/build/src/resolveHostProduct.d.ts.map +1 -1
- package/build/src/resolveHostProduct.js +2 -1
- package/build/src/resolveHostProduct.js.map +1 -1
- package/build/src/widgets.d.ts +1 -1
- package/build/src/widgets.d.ts.map +1 -1
- package/build/src/widgets.js +4 -4
- package/build/src/widgets.js.map +1 -1
- package/cli/build/checks/bundleIds.d.ts +4 -0
- package/cli/build/checks/bundleIds.d.ts.map +1 -0
- package/cli/build/checks/bundleIds.js +38 -0
- package/cli/build/checks/bundleIds.js.map +1 -0
- package/cli/build/checks/configFilename.js +1 -1
- package/cli/build/checks/configFilename.js.map +1 -1
- package/cli/build/checks/heavyExclusions.d.ts.map +1 -1
- package/cli/build/checks/heavyExclusions.js +2 -8
- package/cli/build/checks/heavyExclusions.js.map +1 -1
- package/cli/build/checks/updateScript.d.ts.map +1 -1
- package/cli/build/checks/updateScript.js +2 -8
- package/cli/build/checks/updateScript.js.map +1 -1
- package/cli/build/doctor.d.ts.map +1 -1
- package/cli/build/doctor.js +2 -0
- package/cli/build/doctor.js.map +1 -1
- package/cli/build/exportExtensionBundles.d.ts.map +1 -1
- package/cli/build/exportExtensionBundles.js +2 -8
- package/cli/build/exportExtensionBundles.js.map +1 -1
- package/cli/build/exportSafari.d.ts +13 -1
- package/cli/build/exportSafari.d.ts.map +1 -1
- package/cli/build/exportSafari.js +77 -22
- package/cli/build/exportSafari.js.map +1 -1
- package/cli/build/extensionBundle/constants.d.ts +1 -3
- package/cli/build/extensionBundle/constants.d.ts.map +1 -1
- package/cli/build/extensionBundle/constants.js +4 -17
- package/cli/build/extensionBundle/constants.js.map +1 -1
- package/cli/build/index.js +4 -3
- package/cli/build/index.js.map +1 -1
- package/cli/build/project.d.ts +3 -1
- package/cli/build/project.d.ts.map +1 -1
- package/cli/build/project.js +11 -111
- package/cli/build/project.js.map +1 -1
- package/cli/build/scaffold/copyTemplate.d.ts.map +1 -1
- package/cli/build/scaffold/copyTemplate.js +11 -3
- package/cli/build/scaffold/copyTemplate.js.map +1 -1
- package/cli/build/scaffold/prompts.d.ts.map +1 -1
- package/cli/build/scaffold/prompts.js +14 -9
- package/cli/build/scaffold/prompts.js.map +1 -1
- package/cli/build/scaffold/reactNativeTemplate.d.ts.map +1 -1
- package/cli/build/scaffold/reactNativeTemplate.js +3 -10
- package/cli/build/scaffold/reactNativeTemplate.js.map +1 -1
- package/cli/build/scaffold/resolveAppGroup.d.ts +3 -2
- package/cli/build/scaffold/resolveAppGroup.d.ts.map +1 -1
- package/cli/build/scaffold/resolveAppGroup.js +11 -51
- package/cli/build/scaffold/resolveAppGroup.js.map +1 -1
- package/cli/build/scaffold/scaffoldTarget.d.ts.map +1 -1
- package/cli/build/scaffold/scaffoldTarget.js +5 -3
- package/cli/build/scaffold/scaffoldTarget.js.map +1 -1
- package/cli/build/scaffold/templates/iosHandlers.d.ts +11 -0
- package/cli/build/scaffold/templates/iosHandlers.d.ts.map +1 -0
- package/cli/build/scaffold/templates/iosHandlers.js +1073 -0
- package/cli/build/scaffold/templates/iosHandlers.js.map +1 -0
- package/cli/build/sync.d.ts.map +1 -1
- package/cli/build/sync.js +29 -16
- package/cli/build/sync.js.map +1 -1
- package/cli/build/testing/fixtureProject.d.ts +8 -0
- package/cli/build/testing/fixtureProject.d.ts.map +1 -0
- package/cli/build/{targetConfigFile.js → testing/fixtureProject.js} +25 -25
- package/cli/build/testing/fixtureProject.js.map +1 -0
- package/cli/build/types.d.ts +3 -0
- package/cli/build/types.d.ts.map +1 -1
- package/expo-module.config.json +2 -1
- package/ios/ExpoTargetsAppIntentDispatcher.swift +190 -0
- package/ios/ExpoTargetsAppIntentsModule.swift +53 -0
- package/ios/ExpoTargetsStorage.podspec +2 -0
- package/metro/build/withTargets.d.ts +2 -1
- package/metro/build/withTargets.d.ts.map +1 -1
- package/metro/build/withTargets.js +6 -4
- package/metro/build/withTargets.js.map +1 -1
- package/package.json +17 -3
- package/plugin/README.md +107 -0
- package/plugin/build/android/withAndroidTargetsConfig.d.ts.map +1 -1
- package/plugin/build/android/withAndroidTargetsConfig.js +3 -1
- package/plugin/build/android/withAndroidTargetsConfig.js.map +1 -1
- package/plugin/build/codegen/collectRuntimeConfigs.d.ts.map +1 -1
- package/plugin/build/codegen/collectRuntimeConfigs.js +2 -10
- package/plugin/build/codegen/collectRuntimeConfigs.js.map +1 -1
- package/plugin/build/config.d.ts +86 -3
- package/plugin/build/config.d.ts.map +1 -1
- package/plugin/build/config.js +1 -52
- package/plugin/build/config.js.map +1 -1
- package/plugin/build/domain/appGroups.d.ts +18 -0
- package/plugin/build/domain/appGroups.d.ts.map +1 -1
- package/plugin/build/domain/appGroups.js +44 -0
- package/plugin/build/domain/appGroups.js.map +1 -1
- package/plugin/build/domain/bundleIds.d.ts +49 -5
- package/plugin/build/domain/bundleIds.d.ts.map +1 -1
- package/plugin/build/domain/bundleIds.js +109 -6
- package/plugin/build/domain/bundleIds.js.map +1 -1
- package/plugin/build/domain/characteristics.d.ts +2 -0
- package/plugin/build/domain/characteristics.d.ts.map +1 -1
- package/plugin/build/domain/characteristics.js +64 -8
- package/plugin/build/domain/characteristics.js.map +1 -1
- package/plugin/build/domain/entitlements.d.ts +28 -0
- package/plugin/build/domain/entitlements.d.ts.map +1 -0
- package/plugin/build/domain/entitlements.js +108 -0
- package/plugin/build/domain/entitlements.js.map +1 -0
- package/plugin/build/domain/index.d.ts +7 -3
- package/plugin/build/domain/index.d.ts.map +1 -1
- package/plugin/build/domain/index.js +26 -3
- package/plugin/build/domain/index.js.map +1 -1
- package/plugin/build/domain/rnCompat.d.ts +2 -3
- package/plugin/build/domain/rnCompat.d.ts.map +1 -1
- package/plugin/build/domain/rnCompat.js +6 -13
- package/plugin/build/domain/rnCompat.js.map +1 -1
- package/plugin/build/domain/typeSets.d.ts +31 -0
- package/plugin/build/domain/typeSets.d.ts.map +1 -0
- package/plugin/build/domain/typeSets.js +70 -0
- package/plugin/build/domain/typeSets.js.map +1 -0
- package/plugin/build/ensureHostAppGroups.d.ts.map +1 -1
- package/plugin/build/ensureHostAppGroups.js +10 -4
- package/plugin/build/ensureHostAppGroups.js.map +1 -1
- package/plugin/build/index.d.ts.map +1 -1
- package/plugin/build/index.js +4 -2
- package/plugin/build/index.js.map +1 -1
- package/plugin/build/ios/apply/fs/assets.d.ts +5 -0
- package/plugin/build/ios/apply/fs/assets.d.ts.map +1 -1
- package/plugin/build/ios/apply/fs/assets.js +32 -3
- package/plugin/build/ios/apply/fs/assets.js.map +1 -1
- package/plugin/build/ios/apply/pbx/safariWebBundle.d.ts.map +1 -1
- package/plugin/build/ios/apply/pbx/safariWebBundle.js +5 -7
- package/plugin/build/ios/apply/pbx/safariWebBundle.js.map +1 -1
- package/plugin/build/ios/cng/appShortcutsCodegen.js +1 -1
- package/plugin/build/ios/cng/appShortcutsCodegen.js.map +1 -1
- package/plugin/build/ios/cng/controlCodegen.d.ts +2 -0
- package/plugin/build/ios/cng/controlCodegen.d.ts.map +1 -1
- package/plugin/build/ios/cng/controlCodegen.js +13 -1
- package/plugin/build/ios/cng/controlCodegen.js.map +1 -1
- package/plugin/build/ios/cng/intentsCodegen.d.ts +38 -0
- package/plugin/build/ios/cng/intentsCodegen.d.ts.map +1 -0
- package/plugin/build/ios/cng/intentsCodegen.js +556 -0
- package/plugin/build/ios/cng/intentsCodegen.js.map +1 -0
- package/plugin/build/ios/cng/withExpoTargetsGenerated.d.ts +4 -1
- package/plugin/build/ios/cng/withExpoTargetsGenerated.d.ts.map +1 -1
- package/plugin/build/ios/cng/withExpoTargetsGenerated.js +90 -7
- package/plugin/build/ios/cng/withExpoTargetsGenerated.js.map +1 -1
- package/plugin/build/ios/config-plugins/withEntitlements.d.ts +2 -0
- package/plugin/build/ios/config-plugins/withEntitlements.d.ts.map +1 -1
- package/plugin/build/ios/config-plugins/withEntitlements.js +3 -0
- package/plugin/build/ios/config-plugins/withEntitlements.js.map +1 -1
- package/plugin/build/ios/config-plugins/withIOSTarget.d.ts.map +1 -1
- package/plugin/build/ios/config-plugins/withIOSTarget.js +18 -90
- package/plugin/build/ios/config-plugins/withIOSTarget.js.map +1 -1
- package/plugin/build/ios/plan/buildInfoPlist.d.ts.map +1 -1
- package/plugin/build/ios/plan/buildInfoPlist.js +11 -0
- package/plugin/build/ios/plan/buildInfoPlist.js.map +1 -1
- package/plugin/build/ios/plan/buildSettings.d.ts.map +1 -1
- package/plugin/build/ios/plan/buildSettings.js +2 -3
- package/plugin/build/ios/plan/buildSettings.js.map +1 -1
- package/plugin/build/ios/plan/entitlements.d.ts +6 -2
- package/plugin/build/ios/plan/entitlements.d.ts.map +1 -1
- package/plugin/build/ios/plan/entitlements.js +20 -23
- package/plugin/build/ios/plan/entitlements.js.map +1 -1
- package/plugin/build/ios/plan/identity.d.ts.map +1 -1
- package/plugin/build/ios/plan/identity.js +6 -5
- package/plugin/build/ios/plan/identity.js.map +1 -1
- package/plugin/build/ios/plan/safariWebBundle.d.ts.map +1 -1
- package/plugin/build/ios/plan/safariWebBundle.js +1 -0
- package/plugin/build/ios/plan/safariWebBundle.js.map +1 -1
- package/plugin/build/ios/plan/swiftSources.d.ts.map +1 -1
- package/plugin/build/ios/plan/swiftSources.js +5 -10
- package/plugin/build/ios/plan/swiftSources.js.map +1 -1
- package/plugin/build/ios/plan/types.d.ts +2 -0
- package/plugin/build/ios/plan/types.d.ts.map +1 -1
- package/plugin/build/ios/utils/asset.d.ts +7 -0
- package/plugin/build/ios/utils/asset.d.ts.map +1 -1
- package/plugin/build/ios/utils/asset.js +11 -0
- package/plugin/build/ios/utils/asset.js.map +1 -1
- package/plugin/build/ios/utils/plist.d.ts +0 -11
- package/plugin/build/ios/utils/plist.d.ts.map +1 -1
- package/plugin/build/ios/utils/plist.js +0 -32
- package/plugin/build/ios/utils/plist.js.map +1 -1
- package/plugin/build/targetsRoot.d.ts +32 -0
- package/plugin/build/targetsRoot.d.ts.map +1 -0
- package/plugin/build/targetsRoot.js +160 -0
- package/plugin/build/targetsRoot.js.map +1 -0
- package/plugin/build/withTargetsDir.d.ts.map +1 -1
- package/plugin/build/withTargetsDir.js +42 -23
- package/plugin/build/withTargetsDir.js.map +1 -1
- package/cli/build/targetConfigFile.d.ts +0 -12
- package/cli/build/targetConfigFile.d.ts.map +0 -1
- package/cli/build/targetConfigFile.js.map +0 -1
- package/plugin/build/ios/safari/exportSafariWebBundleCli.d.ts +0 -2
- package/plugin/build/ios/safari/exportSafariWebBundleCli.d.ts.map +0 -1
- package/plugin/build/ios/safari/exportSafariWebBundleCli.js +0 -75
- package/plugin/build/ios/safari/exportSafariWebBundleCli.js.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
package expo.modules.targets
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import org.json.JSONArray
|
|
5
|
+
|
|
6
|
+
/** Reads `assets/expo_targets_config.json`, written by the config plugin. */
|
|
7
|
+
object ExpoTargetsConfig {
|
|
8
|
+
const val ASSET = "expo_targets_config.json"
|
|
9
|
+
|
|
10
|
+
/** Raw JSON text, or null when the asset is missing, blank or unreadable. */
|
|
11
|
+
fun readJson(context: Context): String? {
|
|
12
|
+
return try {
|
|
13
|
+
context.assets.open(ASSET).bufferedReader().use { it.readText() }.ifBlank { null }
|
|
14
|
+
} catch (e: Exception) {
|
|
15
|
+
ExpoTargetsLogger.d("Config", "targets config unavailable: ${e.message}")
|
|
16
|
+
null
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The app's App Group: the `hostAppGroup` prebuild recorded (on Android it
|
|
22
|
+
* defaults to `group.<android.package>`), else the first target's resolved
|
|
23
|
+
* `appGroup`. Same rule as JS `new AppGroupStorage()`.
|
|
24
|
+
*/
|
|
25
|
+
fun defaultAppGroup(context: Context): String? {
|
|
26
|
+
val json = readJson(context) ?: return null
|
|
27
|
+
return try {
|
|
28
|
+
val targets = JSONArray(json)
|
|
29
|
+
val entries = (0 until targets.length()).mapNotNull { targets.optJSONObject(it) }
|
|
30
|
+
entries.map { it.optString("hostAppGroup") }.firstOrNull { it.isNotEmpty() }
|
|
31
|
+
?: entries.map { it.optString("appGroup") }.firstOrNull { it.isNotEmpty() }
|
|
32
|
+
} catch (e: Exception) {
|
|
33
|
+
null
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -9,11 +9,19 @@ import android.widget.RemoteViews
|
|
|
9
9
|
/**
|
|
10
10
|
* Base provider for RemoteViews widgets.
|
|
11
11
|
* Automatically reads from SharedPreferences and calls updateWidget().
|
|
12
|
+
*
|
|
13
|
+
* @param explicitPrefsName App Group / SharedPreferences name. Omit it to use
|
|
14
|
+
* the app's group from the targets config (what JS `AppGroupStorage()` uses).
|
|
12
15
|
*/
|
|
13
16
|
abstract class ExpoTargetsRemoteViewsProvider(
|
|
14
|
-
private val
|
|
17
|
+
private val explicitPrefsName: String? = null
|
|
15
18
|
) : AppWidgetProvider() {
|
|
16
19
|
|
|
20
|
+
private fun resolvePrefsName(context: Context): String =
|
|
21
|
+
explicitPrefsName
|
|
22
|
+
?: ExpoTargetsConfig.defaultAppGroup(context)
|
|
23
|
+
?: "${context.packageName}_preferences"
|
|
24
|
+
|
|
17
25
|
companion object {
|
|
18
26
|
private const val TAG = "RemoteViewsProvider"
|
|
19
27
|
}
|
|
@@ -23,6 +31,7 @@ abstract class ExpoTargetsRemoteViewsProvider(
|
|
|
23
31
|
|
|
24
32
|
override fun onUpdate(context: Context, manager: AppWidgetManager, appWidgetIds: IntArray) {
|
|
25
33
|
ExpoTargetsLogger.init(context)
|
|
34
|
+
val prefsName = resolvePrefsName(context)
|
|
26
35
|
ExpoTargetsLogger.d(TAG, "onUpdate called: prefsName=$prefsName, widgetIds=${appWidgetIds.toList()}")
|
|
27
36
|
|
|
28
37
|
val prefs = context.getSharedPreferences(prefsName, Context.MODE_PRIVATE)
|
package/android/src/main/java/expo/modules/targets/notification/ExpoTargetsNotificationModule.kt
CHANGED
|
@@ -3,6 +3,7 @@ package expo.modules.targets.notification
|
|
|
3
3
|
import android.content.pm.PackageManager
|
|
4
4
|
import android.os.Build
|
|
5
5
|
import expo.modules.kotlin.modules.Module
|
|
6
|
+
import expo.modules.targets.ExpoTargetsConfig
|
|
6
7
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
7
8
|
import org.json.JSONArray
|
|
8
9
|
import org.json.JSONObject
|
|
@@ -99,8 +100,7 @@ class ExpoTargetsNotificationModule : Module() {
|
|
|
99
100
|
private fun findTarget(targetName: String?, type: String): NotifTargetConfig? {
|
|
100
101
|
val ctx = appContext.reactContext ?: return null
|
|
101
102
|
return try {
|
|
102
|
-
val json =
|
|
103
|
-
ctx.assets.open("expo_targets_config.json").bufferedReader().use { it.readText() }
|
|
103
|
+
val json = ExpoTargetsConfig.readJson(ctx) ?: return null
|
|
104
104
|
val arr = JSONArray(json)
|
|
105
105
|
for (i in 0 until arr.length()) {
|
|
106
106
|
val obj = arr.getJSONObject(i)
|
|
@@ -7,6 +7,7 @@ import android.content.SharedPreferences
|
|
|
7
7
|
import android.net.VpnService
|
|
8
8
|
import expo.modules.kotlin.modules.Module
|
|
9
9
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
10
|
+
import expo.modules.targets.ExpoTargetsConfig
|
|
10
11
|
import expo.modules.targets.ExpoTargetsLogger
|
|
11
12
|
import expo.modules.targets.ExpoTargetsReceiver
|
|
12
13
|
import java.lang.ref.WeakReference
|
|
@@ -14,7 +15,7 @@ import java.lang.ref.WeakReference
|
|
|
14
15
|
class ExpoTargetsStorageModule : Module() {
|
|
15
16
|
companion object {
|
|
16
17
|
private const val TAG = "Storage"
|
|
17
|
-
const val TARGETS_CONFIG_ASSET =
|
|
18
|
+
const val TARGETS_CONFIG_ASSET = ExpoTargetsConfig.ASSET
|
|
18
19
|
|
|
19
20
|
@Volatile
|
|
20
21
|
private var moduleRef: WeakReference<ExpoTargetsStorageModule>? = null
|
|
@@ -331,20 +332,11 @@ class ExpoTargetsStorageModule : Module() {
|
|
|
331
332
|
}
|
|
332
333
|
|
|
333
334
|
private fun readTargetsConfigAsset(context: Context): Any? {
|
|
335
|
+
val json = ExpoTargetsConfig.readJson(context) ?: return null
|
|
334
336
|
return try {
|
|
335
|
-
|
|
336
|
-
val json = reader.readText()
|
|
337
|
-
if (json.isBlank()) {
|
|
338
|
-
null
|
|
339
|
-
} else {
|
|
340
|
-
parseJsonValue(org.json.JSONTokener(json).nextValue())
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
} catch (e: java.io.FileNotFoundException) {
|
|
344
|
-
ExpoTargetsLogger.d(TAG, "getTargetsConfig: asset missing (${e.message})")
|
|
345
|
-
null
|
|
337
|
+
parseJsonValue(org.json.JSONTokener(json).nextValue())
|
|
346
338
|
} catch (e: Exception) {
|
|
347
|
-
ExpoTargetsLogger.w(TAG, "getTargetsConfig: failed to
|
|
339
|
+
ExpoTargetsLogger.w(TAG, "getTargetsConfig: failed to parse asset: ${e.message}")
|
|
348
340
|
null
|
|
349
341
|
}
|
|
350
342
|
}
|
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
// Deprecated: Xcode phases written by expo-targets < 2.1 call this. Re-run
|
|
3
|
+
// prebuild (or `expo-targets sync`) to switch to `expo-targets export-safari`.
|
|
4
|
+
// Kept as a shim onto the same code path; remove in the next major.
|
|
5
|
+
const process = require('node:process');
|
|
6
|
+
|
|
7
|
+
const argv = process.argv.slice(2);
|
|
8
|
+
const flag = (name) => {
|
|
9
|
+
const i = argv.indexOf(name);
|
|
10
|
+
return i >= 0 ? argv[i + 1] : undefined;
|
|
11
|
+
};
|
|
12
|
+
const projectRoot = flag('--project-root') || process.cwd();
|
|
13
|
+
const path = require('node:path');
|
|
14
|
+
const entry = flag('--entry');
|
|
15
|
+
const { runExportSafari } = require('../cli/build/exportSafari.js');
|
|
16
|
+
|
|
17
|
+
process.exit(
|
|
18
|
+
runExportSafari(projectRoot, {
|
|
19
|
+
entryFile: entry ? path.relative(projectRoot, entry) : undefined,
|
|
20
|
+
})
|
|
21
|
+
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExpoConfig } from '@expo/config-types';
|
|
2
|
+
import type { ReactNativeNativeType } from './domain/typeSets';
|
|
2
3
|
export type ExtensionType = 'widget' | 'clip' | 'stickers' | 'messages' | 'share' | 'action' | 'wallet' | 'wallet-ui' | 'safari' | 'notification-content' | 'notification-service' | 'intent' | 'intent-ui' | 'spotlight' | 'bg-download' | 'quicklook-thumbnail' | 'location-push' | 'credentials-provider' | 'account-auth' | 'app-intent' | 'device-activity-monitor' | 'matter' | 'watch' | 'content-blocker' | 'keyboard' | 'photo-editing' | 'file-provider' | 'file-provider-ui' | 'broadcast-upload' | 'broadcast-setup-ui' | 'call-directory' | 'message-filter' | 'unwanted-communication' | 'network-packet-tunnel' | 'network-app-proxy' | 'network-dns-proxy' | 'network-filter-data' | 'shield-action' | 'shield-config' | 'classkit-context' | 'authentication-services' | 'spotlight-delegate' | 'quicklook-preview' | 'print-service' | 'smart-card' | 'virtual-conference' | 'watch-widget';
|
|
3
4
|
export interface Color {
|
|
4
5
|
light?: string;
|
|
@@ -47,12 +48,12 @@ export interface WalletConfig {
|
|
|
47
48
|
ui?: boolean | WalletUIConfig;
|
|
48
49
|
}
|
|
49
50
|
export declare const TYPE_MINIMUM_DEPLOYMENT_TARGETS: Record<ExtensionType, string>;
|
|
50
|
-
export declare const TYPE_BUNDLE_IDENTIFIER_SUFFIXES: Record<ExtensionType, string>;
|
|
51
51
|
export type NativeLinkMode = 'entry' | 'host';
|
|
52
52
|
interface BaseIosTargetConfig {
|
|
53
53
|
icon?: string;
|
|
54
54
|
deploymentTarget?: string;
|
|
55
55
|
bundleIdentifier?: string;
|
|
56
|
+
/** iOS-only display name; defaults to the target's `displayName`. */
|
|
56
57
|
displayName?: string;
|
|
57
58
|
colors?: Record<string, string | Color>;
|
|
58
59
|
images?: Record<string, string>;
|
|
@@ -80,6 +81,12 @@ interface BaseIosTargetConfig {
|
|
|
80
81
|
* project's objectVersion to 77 (Xcode 16+). Code targets only.
|
|
81
82
|
*/
|
|
82
83
|
synchronizedFolder?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Share the host app's keychain: copies its `keychain-access-groups`, or
|
|
86
|
+
* joins the host's app id group when it declares none. A
|
|
87
|
+
* `keychain-access-groups` entry in `entitlements` wins.
|
|
88
|
+
*/
|
|
89
|
+
keychainSharing?: boolean;
|
|
83
90
|
entitlements?: Record<string, any>;
|
|
84
91
|
infoPlist?: Record<string, any>;
|
|
85
92
|
swiftVersion?: string;
|
|
@@ -230,6 +237,15 @@ export interface IosControlConfig {
|
|
|
230
237
|
url?: string;
|
|
231
238
|
/** Toggle only: SF Symbol shown while on. Defaults to `systemImageName`. */
|
|
232
239
|
onSystemImageName?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Button only: run this config-declared intent (an `intents[].name` on an
|
|
242
|
+
* `app-intent` target) instead of opening the app. The JS handler runs in the
|
|
243
|
+
* app process without bringing it forward. Works from Control Center, the
|
|
244
|
+
* Lock Screen and the Action button.
|
|
245
|
+
*/
|
|
246
|
+
intent?: string;
|
|
247
|
+
/** Constant parameters passed to `intent`. */
|
|
248
|
+
params?: Record<string, string | number | boolean>;
|
|
233
249
|
}
|
|
234
250
|
/** WidgetKit family names (expo-ui supportedFamilies). */
|
|
235
251
|
export type WidgetFamily = 'systemSmall' | 'systemMedium' | 'systemLarge' | 'systemExtraLarge' | 'accessoryCircular' | 'accessoryRectangular' | 'accessoryInline';
|
|
@@ -308,7 +324,69 @@ export interface AppShortcutConfig {
|
|
|
308
324
|
shortTitle: string;
|
|
309
325
|
systemImageName?: string;
|
|
310
326
|
}
|
|
311
|
-
|
|
327
|
+
/** Parameter value types for config-declared intents (`intents[].parameters`). */
|
|
328
|
+
export type IntentParameterType = 'string' | 'int' | 'double' | 'bool' | 'date' | 'url' | 'enum';
|
|
329
|
+
export interface IntentParameterConfig {
|
|
330
|
+
/** Swift property name and the key JS handlers receive. */
|
|
331
|
+
name: string;
|
|
332
|
+
type: IntentParameterType;
|
|
333
|
+
/** Label Siri and Shortcuts show. Defaults to `name`. */
|
|
334
|
+
title?: string;
|
|
335
|
+
description?: string;
|
|
336
|
+
/** When true the parameter may be left empty (Swift optional). */
|
|
337
|
+
optional?: boolean;
|
|
338
|
+
/** Default value (`string`, `int`, `double`, `bool`, `enum` only). */
|
|
339
|
+
default?: string | number | boolean;
|
|
340
|
+
/** Choices for `type: "enum"`. `value` reaches JS; `title` is shown. */
|
|
341
|
+
options?: {
|
|
342
|
+
value: string;
|
|
343
|
+
title: string;
|
|
344
|
+
}[];
|
|
345
|
+
}
|
|
346
|
+
export interface IntentShortcutConfig {
|
|
347
|
+
/**
|
|
348
|
+
* Siri phrases. Use `${applicationName}` (required in every phrase) and
|
|
349
|
+
* `${param}` for an `enum` parameter.
|
|
350
|
+
*/
|
|
351
|
+
phrases: string[];
|
|
352
|
+
/** Shortcuts tile title. Defaults to the intent title. */
|
|
353
|
+
shortTitle?: string;
|
|
354
|
+
/** SF Symbol name. Defaults to `app`. */
|
|
355
|
+
symbol?: string;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* A config-declared App Intent (`type: "app-intent"` targets, top-level
|
|
359
|
+
* `intents`). Generated into the main app; handled in JS with
|
|
360
|
+
* `useAppIntent` / `AppIntents.setHandler`.
|
|
361
|
+
*/
|
|
362
|
+
export interface IntentConfig {
|
|
363
|
+
/** Swift type name and the key JS handlers register under. */
|
|
364
|
+
name: string;
|
|
365
|
+
title: string;
|
|
366
|
+
description?: string;
|
|
367
|
+
parameters?: IntentParameterConfig[];
|
|
368
|
+
/**
|
|
369
|
+
* - `"js"` (default): await a JS handler and return its dialog and value.
|
|
370
|
+
* - `"open"`: open the app first, then hand the call to JS.
|
|
371
|
+
* - `{ swift: "Hook" }`: call `Hook.perform(_ params: [String: Any]) async throws -> String?`
|
|
372
|
+
* from a user-owned file under `targets/<name>/ios/`.
|
|
373
|
+
*/
|
|
374
|
+
perform?: 'js' | 'open' | {
|
|
375
|
+
swift: string;
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* `perform: "js"` only. When JS is not running: on iOS 26+ the app opens and
|
|
379
|
+
* the call continues there; on older iOS the call is queued for
|
|
380
|
+
* `AppIntents.getPending()` and `dialog` is spoken. Default `true`.
|
|
381
|
+
*/
|
|
382
|
+
background?: boolean;
|
|
383
|
+
/** Spoken/shown when the handler returns no dialog. `${param}` is filled in. */
|
|
384
|
+
dialog?: string;
|
|
385
|
+
/** How long to wait for the JS handler, in ms. Default 10000. */
|
|
386
|
+
timeoutMs?: number;
|
|
387
|
+
shortcuts?: IntentShortcutConfig[];
|
|
388
|
+
}
|
|
389
|
+
export type ReactNativeCompatibleType = ReactNativeNativeType;
|
|
312
390
|
export type NativeOnlyType = Exclude<ExtensionType, ReactNativeCompatibleType>;
|
|
313
391
|
export interface IOSTargetConfigWithReactNative extends BaseIosTargetConfig {
|
|
314
392
|
}
|
|
@@ -445,6 +523,12 @@ interface BaseTargetConfig {
|
|
|
445
523
|
* entry does not import them.
|
|
446
524
|
*/
|
|
447
525
|
linkedPackages?: string[];
|
|
526
|
+
/**
|
|
527
|
+
* Config-declared App Intents (`type: "app-intent"` only). Siri, Shortcuts
|
|
528
|
+
* and (later) widgets, controls and Android route them to JS handlers.
|
|
529
|
+
* See docs/app-intents.md.
|
|
530
|
+
*/
|
|
531
|
+
intents?: IntentConfig[];
|
|
448
532
|
}
|
|
449
533
|
type TargetConfigReactNativeCompatible = BaseTargetConfig & {
|
|
450
534
|
type: ReactNativeCompatibleType;
|
|
@@ -457,6 +541,5 @@ type TargetConfigNativeOnly = BaseTargetConfig & {
|
|
|
457
541
|
export type TargetConfig = TargetConfigReactNativeCompatible | TargetConfigNativeOnly;
|
|
458
542
|
export type TargetConfigFunction = (config: ExpoConfig) => TargetConfig;
|
|
459
543
|
export declare const getAppGroup: (identifier: string) => string;
|
|
460
|
-
export declare const getTargetBundleIdentifier: (appBundleId: string, targetName: string) => string;
|
|
461
544
|
export {};
|
|
462
545
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../plugin/src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../plugin/src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB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AAG;IAC/C,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,CAAC,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAGF,MAAM,MAAM,YAAY,GACpB,iCAAiC,GACjC,sBAAsB,CAAC;AAE3B,MAAM,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,YAAY,CAAC;AAExE,eAAO,MAAM,WAAW,eAAgB,MAAM,WAA0B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAppGroup = exports.TYPE_MINIMUM_DEPLOYMENT_TARGETS = void 0;
|
|
4
4
|
exports.TYPE_MINIMUM_DEPLOYMENT_TARGETS = {
|
|
5
5
|
widget: '14.0',
|
|
6
6
|
clip: '14.0',
|
|
@@ -50,57 +50,6 @@ exports.TYPE_MINIMUM_DEPLOYMENT_TARGETS = {
|
|
|
50
50
|
'virtual-conference': '15.0',
|
|
51
51
|
'watch-widget': '10.0',
|
|
52
52
|
};
|
|
53
|
-
exports.TYPE_BUNDLE_IDENTIFIER_SUFFIXES = {
|
|
54
|
-
widget: 'widget',
|
|
55
|
-
clip: 'clip',
|
|
56
|
-
stickers: 'stickers',
|
|
57
|
-
messages: 'messages',
|
|
58
|
-
share: 'share',
|
|
59
|
-
action: 'action',
|
|
60
|
-
wallet: 'wallet',
|
|
61
|
-
'wallet-ui': 'wallet-ui',
|
|
62
|
-
safari: 'safari',
|
|
63
|
-
'notification-content': 'notification-content',
|
|
64
|
-
'notification-service': 'notification-service',
|
|
65
|
-
intent: 'intent',
|
|
66
|
-
'intent-ui': 'intent-ui',
|
|
67
|
-
spotlight: 'spotlight',
|
|
68
|
-
'bg-download': 'bg-download',
|
|
69
|
-
'quicklook-thumbnail': 'quicklook-thumbnail',
|
|
70
|
-
'location-push': 'location-push',
|
|
71
|
-
'credentials-provider': 'credentials-provider',
|
|
72
|
-
'account-auth': 'account-auth',
|
|
73
|
-
'app-intent': 'app-intent',
|
|
74
|
-
'device-activity-monitor': 'device-activity-monitor',
|
|
75
|
-
matter: 'matter',
|
|
76
|
-
watch: 'watch',
|
|
77
|
-
'content-blocker': 'content-blocker',
|
|
78
|
-
keyboard: 'keyboard',
|
|
79
|
-
'photo-editing': 'photo-editing',
|
|
80
|
-
'file-provider': 'file-provider',
|
|
81
|
-
'file-provider-ui': 'file-provider-ui',
|
|
82
|
-
'broadcast-upload': 'broadcast-upload',
|
|
83
|
-
'broadcast-setup-ui': 'broadcast-setup-ui',
|
|
84
|
-
'call-directory': 'call-directory',
|
|
85
|
-
'message-filter': 'message-filter',
|
|
86
|
-
'unwanted-communication': 'unwanted-communication',
|
|
87
|
-
'network-packet-tunnel': 'network-packet-tunnel',
|
|
88
|
-
'network-app-proxy': 'network-app-proxy',
|
|
89
|
-
'network-dns-proxy': 'network-dns-proxy',
|
|
90
|
-
'network-filter-data': 'network-filter-data',
|
|
91
|
-
'shield-action': 'shield-action',
|
|
92
|
-
'shield-config': 'shield-config',
|
|
93
|
-
'classkit-context': 'classkit-context',
|
|
94
|
-
'authentication-services': 'authentication-services',
|
|
95
|
-
'spotlight-delegate': 'spotlight-delegate',
|
|
96
|
-
'quicklook-preview': 'quicklook-preview',
|
|
97
|
-
'print-service': 'print-service',
|
|
98
|
-
'smart-card': 'smart-card',
|
|
99
|
-
'virtual-conference': 'virtual-conference',
|
|
100
|
-
'watch-widget': 'watch-widget',
|
|
101
|
-
};
|
|
102
53
|
const getAppGroup = (identifier) => `group.${identifier}`;
|
|
103
54
|
exports.getAppGroup = getAppGroup;
|
|
104
|
-
const getTargetBundleIdentifier = (appBundleId, targetName) => `${appBundleId}.${targetName}`;
|
|
105
|
-
exports.getTargetBundleIdentifier = getTargetBundleIdentifier;
|
|
106
55
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../plugin/src/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../plugin/src/config.ts"],"names":[],"mappings":";;;AAqHa,QAAA,+BAA+B,GAAkC;IAC5E,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,MAAM;IACnB,sBAAsB,EAAE,MAAM;IAC9B,sBAAsB,EAAE,MAAM;IAC9B,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,KAAK;IACpB,qBAAqB,EAAE,MAAM;IAC7B,eAAe,EAAE,MAAM;IACvB,sBAAsB,EAAE,MAAM;IAC9B,cAAc,EAAE,MAAM;IACtB,YAAY,EAAE,MAAM;IACpB,yBAAyB,EAAE,MAAM;IACjC,MAAM,EAAE,MAAM;IACd,0CAA0C,CAAC,KAAK,EAAE,MAAM;IACxD,iBAAiB,EAAE,MAAM;IACzB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,MAAM;IACvB,kBAAkB,EAAE,MAAM;IAC1B,kBAAkB,EAAE,MAAM;IAC1B,oBAAoB,EAAE,MAAM;IAC5B,gBAAgB,EAAE,MAAM;IACxB,gBAAgB,EAAE,MAAM;IACxB,wBAAwB,EAAE,MAAM;IAChC,uBAAuB,EAAE,KAAK;IAC9B,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,MAAM;IAC3B,qBAAqB,EAAE,KAAK;IAC5B,eAAe,EAAE,MAAM;IACvB,eAAe,EAAE,MAAM;IACvB,kBAAkB,EAAE,MAAM;IAC1B,yBAAyB,EAAE,MAAM;IACjC,oBAAoB,EAAE,MAAM;IAC5B,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,MAAM;IACvB,YAAY,EAAE,MAAM;IACpB,oBAAoB,EAAE,MAAM;IAC5B,cAAc,EAAE,MAAM;CACvB,CAAC;AAijBK,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,SAAS,UAAU,EAAE,CAAC;AAA5D,QAAA,WAAW,GAAX,WAAW,CAAiD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small, dependency-free type lists shared by the plugin, CLI and runtime.
|
|
3
|
+
* Kept apart from `characteristics.ts` (which derives its flags from these)
|
|
4
|
+
* so the app bundle can import them without the whole ledger.
|
|
5
|
+
*/
|
|
6
|
+
/** Types that render real React Native with native modules. */
|
|
7
|
+
export declare const RN_NATIVE_TYPES: readonly ["share", "action", "clip", "messages", "notification-content"];
|
|
8
|
+
/** Types that render React Native Web inside a web view. */
|
|
9
|
+
export declare const RN_WEB_TYPES: readonly ["safari"];
|
|
10
|
+
/** Every type that accepts an `entry` field. */
|
|
11
|
+
export declare const RN_COMPATIBLE_TYPES: readonly ["share", "action", "clip", "messages", "notification-content", "safari"];
|
|
12
|
+
/** WidgetKit extensions (iOS home screen and watchOS). */
|
|
13
|
+
export declare const WIDGETKIT_TYPES: readonly ["widget", "watch-widget"];
|
|
14
|
+
/** Targets that build for watchOS. */
|
|
15
|
+
export declare const WATCHOS_TYPES: readonly ["watch", "watch-widget"];
|
|
16
|
+
export type ReactNativeNativeType = (typeof RN_NATIVE_TYPES)[number];
|
|
17
|
+
export declare const isReactNativeNativeType: (type: string | undefined) => boolean;
|
|
18
|
+
export declare const isReactNativeWebType: (type: string | undefined) => boolean;
|
|
19
|
+
export declare const isReactNativeCompatibleType: (type: string | undefined) => boolean;
|
|
20
|
+
export declare const isWidgetKitType: (type: string | undefined) => boolean;
|
|
21
|
+
export declare const isWatchOSType: (type: string | undefined) => boolean;
|
|
22
|
+
/** Cap for RN-native types without their own entry below. */
|
|
23
|
+
export declare const DEFAULT_EXTENSION_BUNDLE_MAX_BYTES: number;
|
|
24
|
+
/**
|
|
25
|
+
* Max sideloaded `main.jsbundle` bytes per RN-native extension type (App
|
|
26
|
+
* Clips get more headroom). Mirrored in `ios/ExpoTargetsExtensionBundleModule.swift`;
|
|
27
|
+
* `typeSets.test.ts` checks the Swift copy.
|
|
28
|
+
*/
|
|
29
|
+
export declare const EXTENSION_BUNDLE_MAX_BYTES: Record<ReactNativeNativeType, number>;
|
|
30
|
+
export declare function maxBundleBytesForType(type: string): number;
|
|
31
|
+
//# sourceMappingURL=typeSets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeSets.d.ts","sourceRoot":"","sources":["../../../../plugin/src/domain/typeSets.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,+DAA+D;AAC/D,eAAO,MAAM,eAAe,0EAMiB,CAAC;AAE9C,4DAA4D;AAC5D,eAAO,MAAM,YAAY,qBAEoB,CAAC;AAE9C,gDAAgD;AAChD,eAAO,MAAM,mBAAmB,oFAGtB,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,eAAe,qCAGiB,CAAC;AAE9C,sCAAsC;AACtC,eAAO,MAAM,aAAa,oCAGmB,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAKrE,eAAO,MAAM,uBAAuB,SAAU,MAAM,GAAG,SAAS,YACpC,CAAC;AAC7B,eAAO,MAAM,oBAAoB,SAAU,MAAM,GAAG,SAAS,YACpC,CAAC;AAC1B,eAAO,MAAM,2BAA2B,SAAU,MAAM,GAAG,SAAS,YACpC,CAAC;AACjC,eAAO,MAAM,eAAe,SAAU,MAAM,GAAG,SAAS,YAC5B,CAAC;AAC7B,eAAO,MAAM,aAAa,SAAU,MAAM,GAAG,SAAS,YAC5B,CAAC;AAI3B,6DAA6D;AAC7D,eAAO,MAAM,kCAAkC,QAAS,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAO1E,CAAC;AAEJ,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ1D"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXTENSION_BUNDLE_MAX_BYTES = exports.DEFAULT_EXTENSION_BUNDLE_MAX_BYTES = exports.isWatchOSType = exports.isWidgetKitType = exports.isReactNativeCompatibleType = exports.isReactNativeWebType = exports.isReactNativeNativeType = exports.WATCHOS_TYPES = exports.WIDGETKIT_TYPES = exports.RN_COMPATIBLE_TYPES = exports.RN_WEB_TYPES = exports.RN_NATIVE_TYPES = void 0;
|
|
4
|
+
exports.maxBundleBytesForType = maxBundleBytesForType;
|
|
5
|
+
/**
|
|
6
|
+
* Small, dependency-free type lists shared by the plugin, CLI and runtime.
|
|
7
|
+
* Kept apart from `characteristics.ts` (which derives its flags from these)
|
|
8
|
+
* so the app bundle can import them without the whole ledger.
|
|
9
|
+
*/
|
|
10
|
+
/** Types that render real React Native with native modules. */
|
|
11
|
+
exports.RN_NATIVE_TYPES = [
|
|
12
|
+
'share',
|
|
13
|
+
'action',
|
|
14
|
+
'clip',
|
|
15
|
+
'messages',
|
|
16
|
+
'notification-content',
|
|
17
|
+
];
|
|
18
|
+
/** Types that render React Native Web inside a web view. */
|
|
19
|
+
exports.RN_WEB_TYPES = [
|
|
20
|
+
'safari',
|
|
21
|
+
];
|
|
22
|
+
/** Every type that accepts an `entry` field. */
|
|
23
|
+
exports.RN_COMPATIBLE_TYPES = [
|
|
24
|
+
...exports.RN_NATIVE_TYPES,
|
|
25
|
+
...exports.RN_WEB_TYPES,
|
|
26
|
+
];
|
|
27
|
+
/** WidgetKit extensions (iOS home screen and watchOS). */
|
|
28
|
+
exports.WIDGETKIT_TYPES = [
|
|
29
|
+
'widget',
|
|
30
|
+
'watch-widget',
|
|
31
|
+
];
|
|
32
|
+
/** Targets that build for watchOS. */
|
|
33
|
+
exports.WATCHOS_TYPES = [
|
|
34
|
+
'watch',
|
|
35
|
+
'watch-widget',
|
|
36
|
+
];
|
|
37
|
+
const has = (list, type) => type !== undefined && list.includes(type);
|
|
38
|
+
const isReactNativeNativeType = (type) => has(exports.RN_NATIVE_TYPES, type);
|
|
39
|
+
exports.isReactNativeNativeType = isReactNativeNativeType;
|
|
40
|
+
const isReactNativeWebType = (type) => has(exports.RN_WEB_TYPES, type);
|
|
41
|
+
exports.isReactNativeWebType = isReactNativeWebType;
|
|
42
|
+
const isReactNativeCompatibleType = (type) => has(exports.RN_COMPATIBLE_TYPES, type);
|
|
43
|
+
exports.isReactNativeCompatibleType = isReactNativeCompatibleType;
|
|
44
|
+
const isWidgetKitType = (type) => has(exports.WIDGETKIT_TYPES, type);
|
|
45
|
+
exports.isWidgetKitType = isWidgetKitType;
|
|
46
|
+
const isWatchOSType = (type) => has(exports.WATCHOS_TYPES, type);
|
|
47
|
+
exports.isWatchOSType = isWatchOSType;
|
|
48
|
+
const MB = 1024 * 1024;
|
|
49
|
+
/** Cap for RN-native types without their own entry below. */
|
|
50
|
+
exports.DEFAULT_EXTENSION_BUNDLE_MAX_BYTES = 5 * MB;
|
|
51
|
+
/**
|
|
52
|
+
* Max sideloaded `main.jsbundle` bytes per RN-native extension type (App
|
|
53
|
+
* Clips get more headroom). Mirrored in `ios/ExpoTargetsExtensionBundleModule.swift`;
|
|
54
|
+
* `typeSets.test.ts` checks the Swift copy.
|
|
55
|
+
*/
|
|
56
|
+
exports.EXTENSION_BUNDLE_MAX_BYTES = {
|
|
57
|
+
share: 5 * MB,
|
|
58
|
+
action: 5 * MB,
|
|
59
|
+
messages: 5 * MB,
|
|
60
|
+
'notification-content': 5 * MB,
|
|
61
|
+
clip: 8 * MB,
|
|
62
|
+
};
|
|
63
|
+
function maxBundleBytesForType(type) {
|
|
64
|
+
const max = exports.EXTENSION_BUNDLE_MAX_BYTES[type];
|
|
65
|
+
if (max === undefined) {
|
|
66
|
+
throw new Error(`No sideload size cap for extension type "${type}". Supported: ${Object.keys(exports.EXTENSION_BUNDLE_MAX_BYTES).join(', ')}`);
|
|
67
|
+
}
|
|
68
|
+
return max;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=typeSets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeSets.js","sourceRoot":"","sources":["../../../../plugin/src/domain/typeSets.ts"],"names":[],"mappings":";;;;AAEA;;;;GAIG;AAEH,+DAA+D;AAClD,QAAA,eAAe,GAAG;IAC7B,OAAO;IACP,QAAQ;IACR,MAAM;IACN,UAAU;IACV,sBAAsB;CACqB,CAAC;AAE9C,4DAA4D;AAC/C,QAAA,YAAY,GAAG;IAC1B,QAAQ;CACmC,CAAC;AAE9C,gDAAgD;AACnC,QAAA,mBAAmB,GAAG;IACjC,GAAG,QAAA,eAAe;IAClB,GAAG,QAAA,YAAY;CACP,CAAC;AAEX,0DAA0D;AAC7C,QAAA,eAAe,GAAG;IAC7B,QAAQ;IACR,cAAc;CAC6B,CAAC;AAE9C,sCAAsC;AACzB,QAAA,aAAa,GAAG;IAC3B,OAAO;IACP,cAAc;CAC6B,CAAC;AAI9C,MAAM,GAAG,GAAG,CAAC,IAAuB,EAAE,IAAwB,EAAW,EAAE,CACzE,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAErC,MAAM,uBAAuB,GAAG,CAAC,IAAwB,EAAE,EAAE,CAClE,GAAG,CAAC,QAAA,eAAe,EAAE,IAAI,CAAC,CAAC;AADhB,QAAA,uBAAuB,GAAvB,uBAAuB,CACP;AACtB,MAAM,oBAAoB,GAAG,CAAC,IAAwB,EAAE,EAAE,CAC/D,GAAG,CAAC,QAAA,YAAY,EAAE,IAAI,CAAC,CAAC;AADb,QAAA,oBAAoB,GAApB,oBAAoB,C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* domain layer re-exports the subset it reasons about so downstream modules can
|
|
6
|
+
* depend on `domain/` instead of reaching into the config surface.
|
|
7
|
+
*/
|
|
8
|
+
export type { Color, ExtensionType, IntentsConfig, IOSTargetConfig, IOSTargetConfigNativeOnly, IOSTargetConfigWithReactNative, NativeLinkMode, NativeOnlyType, ReactNativeCompatibleType, ShareExtensionActivationRule, ShareExtensionContentType, StickerPack, TargetConfig, WalletConfig, } from '../config';
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../plugin/src/domain/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,KAAK,EACL,aAAa,EACb,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Domain type re-exports.
|
|
4
|
+
*
|
|
5
|
+
* `../config` stays the source of the public, user-facing config types; the
|
|
6
|
+
* domain layer re-exports the subset it reasons about so downstream modules can
|
|
7
|
+
* depend on `domain/` instead of reaching into the config surface.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../plugin/src/domain/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Target.d.ts","sourceRoot":"","sources":["../../src/Target.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,yBAAyB,EACzB,YAAY,EACb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AAyB,CAAC,EAE5D,UAAU,EAAE,UAAU,GAAG,cAAc,EACvC,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACvC,kBAAkB,GAAG,kBAAkB,CAAC;AAC3C,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,GAAG,cAAc,EACvC,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACvC,MAAM,CAAC"}
|
package/build/src/Target.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createTarget = createTarget;
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
|
+
const typeSets_1 = require("../plugin/src/domain/typeSets");
|
|
5
6
|
const uiMode_1 = require("../plugin/src/domain/uiMode");
|
|
6
7
|
const resolveIosKinds_1 = require("../plugin/src/ios/utils/resolveIosKinds");
|
|
7
8
|
const index_1 = require("./modules/extension/index");
|
|
@@ -16,22 +17,14 @@ function getProcessEnv() {
|
|
|
16
17
|
const proc = globalThis.process;
|
|
17
18
|
return proc?.env ?? {};
|
|
18
19
|
}
|
|
19
|
-
const EXTENSION_TYPES = new Set([
|
|
20
|
-
'share',
|
|
21
|
-
'action',
|
|
22
|
-
'clip',
|
|
23
|
-
'messages',
|
|
24
|
-
'notification-content',
|
|
25
|
-
]);
|
|
26
|
-
const WEB_EXTENSION_TYPES = new Set(['safari']);
|
|
27
20
|
function isExtensionType(type) {
|
|
28
|
-
return
|
|
21
|
+
return (0, typeSets_1.isReactNativeNativeType)(type);
|
|
29
22
|
}
|
|
30
23
|
function isWebExtensionType(type) {
|
|
31
|
-
return
|
|
24
|
+
return (0, typeSets_1.isReactNativeWebType)(type);
|
|
32
25
|
}
|
|
33
26
|
function isWidgetType(type) {
|
|
34
|
-
return
|
|
27
|
+
return (0, typeSets_1.isWidgetKitType)(type);
|
|
35
28
|
}
|
|
36
29
|
function shouldRefreshAfterSetData(widgetProduct, options) {
|
|
37
30
|
return widgetProduct ? options?.refresh !== false : options?.refresh === true;
|
|
@@ -341,8 +334,7 @@ function registerTargetComponent(targetName, componentFunc, target) {
|
|
|
341
334
|
entry: config.entry,
|
|
342
335
|
ui: config.ui,
|
|
343
336
|
});
|
|
344
|
-
if (uiMode === 'expo-ui' &&
|
|
345
|
-
(config.type === 'widget' || config.type === 'watch-widget')) {
|
|
337
|
+
if (uiMode === 'expo-ui' && (0, typeSets_1.isWidgetKitType)(config.type)) {
|
|
346
338
|
registerExpoUiWidget(targetName, componentFunc);
|
|
347
339
|
return;
|
|
348
340
|
}
|