peachsim 0.1.1655 → 0.1.1659
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/cli/app-config.ts +4 -0
- package/cli/app-stubs.ts +43 -6
- package/cli/commands/inspect/shared.ts +5 -2
- package/cli/commands/inspect/url.ts +2 -1
- package/cli/commands/screenshot.ts +5 -5
- package/cli/commands/state.ts +9 -6
- package/cli/outbound-endpoints.ts +9 -1
- package/cli/output-redaction.ts +49 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +11251 -1123
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +29 -5
- package/dist-lib/config.mjs +29 -5
- package/dist-lib/detox/index.cjs +19 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +8960 -134
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +9769 -731
- package/dist-lib/host/fetch-proxy-handler.cjs +260 -197
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +653 -338
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +443 -312
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +548 -163
- package/dist-lib/native-app-identity-project.cjs +179 -33
- package/dist-lib/native-app-identity-project.mjs +179 -33
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +23 -23
- package/dist-lib/public-origins-lib.json +96 -63
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +2 -2
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +10651 -1418
- package/dist-lib/swift-compile.cjs +8802 -138
- package/dist-lib/swift-compile.mjs +8802 -138
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +8960 -134
- package/dist-lib/vite.cjs +149 -163
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/app-font-registry.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +21 -0
- package/dist-types/packages/peach-engine/src/render-worker/gesture-seam-protocol.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +25 -0
- package/kotlin/README.md +38 -23
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +2 -12
- package/runtime-companion.json +1 -1
- package/src/bundleGlobalFooter.ts +0 -2
- package/src/config.ts +54 -2
- package/src/configured-bundle-producer.ts +7 -1
- package/src/host/fetch-proxy-handler.ts +14 -50
- package/src/host/rolldown-bundle-forward.ts +71 -0
- package/src/installed-package-versions.ts +54 -2
- package/src/kotlin-host.ts +138 -285
- package/src/kotlin-module.ts +4 -7
- package/src/kotlin-sdk.ts +81 -0
- package/src/kotlin-toolchain.ts +152 -0
- package/src/kotlin-view-models.ts +1 -1
- package/src/kotlinSdkContract.ts +113 -0
- package/src/nitro-adapter.lock.json +3 -3
- package/src/nitro-bundle.ts +18 -4
- package/src/nitro-compile.ts +5 -1
- package/src/nitro-source.ts +112 -28
- package/src/nitroContract.ts +16 -4
- package/src/swift-compile.ts +12 -3
- package/src/swift-host.ts +2 -1
- package/src/swift-objc-compile.ts +117 -4
- package/src/swift-objc-sdk.ts +8792 -135
- package/src/swift-objc-standin.ts +1 -0
- package/src/vite-plugin-one.ts +73 -134
- package/src/worker-system-chunks.ts +14 -4
- package/src/xcode-project.ts +261 -34
- package/kotlin/AndroidViewSources/android/content/Context.kt +0 -22
- package/kotlin/AndroidViewSources/android/content/res/Configuration.kt +0 -25
- package/kotlin/AndroidViewSources/android/content/res/Resources.kt +0 -72
- package/kotlin/AndroidViewSources/android/graphics/Canvas.kt +0 -22
- package/kotlin/AndroidViewSources/android/graphics/Color.kt +0 -13
- package/kotlin/AndroidViewSources/android/graphics/Paint.kt +0 -18
- package/kotlin/AndroidViewSources/android/util/DisplayMetrics.kt +0 -12
- package/kotlin/AndroidViewSources/android/view/View.kt +0 -211
- package/kotlin/AndroidViewSources/android/widget/FrameLayout.kt +0 -61
- package/kotlin/AndroidViewSources/android/widget/LinearLayout.kt +0 -49
- package/kotlin/AndroidViewSources/dev/peach/app/JavaFormat.kt +0 -272
- package/kotlin/AppSources/android/app/Activity.kt +0 -174
- package/kotlin/AppSources/android/app/Application.kt +0 -11
- package/kotlin/AppSources/android/app/UiModeManager.kt +0 -9
- package/kotlin/AppSources/android/content/Intent.kt +0 -16
- package/kotlin/AppSources/android/os/Bundle.kt +0 -11
- package/kotlin/AppSources/android/util/SuperNotCalledException.kt +0 -3
- package/kotlin/AppSources/android/view/Window.kt +0 -182
- package/kotlin/AppSources/android/view/WindowInsets.kt +0 -9
- package/kotlin/AppSources/android/view/WindowInsetsController.kt +0 -17
- package/kotlin/AppSources/android/view/WindowManager.kt +0 -16
- package/kotlin/AppSources/android/window/BackEvent.kt +0 -24
- package/kotlin/AppSources/android/window/OnBackAnimationCallback.kt +0 -7
- package/kotlin/AppSources/android/window/OnBackInvokedDispatcher.kt +0 -84
- package/kotlin/AppSources/androidx/activity/ActivityFlags.kt +0 -9
- package/kotlin/AppSources/androidx/activity/ActivityViewModelLazy.kt +0 -21
- package/kotlin/AppSources/androidx/activity/BackEventCompat.kt +0 -43
- package/kotlin/AppSources/androidx/activity/ComponentActivity.kt +0 -122
- package/kotlin/AppSources/androidx/activity/EdgeToEdge.kt +0 -75
- package/kotlin/AppSources/androidx/activity/ExperimentalActivityApi.kt +0 -6
- package/kotlin/AppSources/androidx/activity/OnBackPressedCallback.kt +0 -69
- package/kotlin/AppSources/androidx/activity/OnBackPressedDispatcher.kt +0 -144
- package/kotlin/AppSources/androidx/activity/OnBackPressedDispatcherOwner.kt +0 -7
- package/kotlin/AppSources/androidx/activity/compose/BackHandler.kt +0 -86
- package/kotlin/AppSources/androidx/activity/compose/ComponentActivity.kt +0 -29
- package/kotlin/AppSources/androidx/activity/compose/internal/BackHandlerCompat.kt +0 -38
- package/kotlin/AppSources/androidx/activity/compose/internal/BackHandlerDispatcherCompat.kt +0 -27
- package/kotlin/AppSources/androidx/compose/foundation/layout/WindowInsets.kt +0 -15
- package/kotlin/AppSources/androidx/compose/ui/platform/AndroidCompositionLocals.kt +0 -27
- package/kotlin/AppSources/androidx/compose/ui/platform/ComposeView.kt +0 -68
- package/kotlin/AppSources/androidx/compose/ui/res/ColorResources.kt +0 -16
- package/kotlin/AppSources/androidx/compose/ui/res/PainterResources.kt +0 -70
- package/kotlin/AppSources/androidx/compose/ui/res/StringResources.kt +0 -38
- package/kotlin/AppSources/androidx/core/view/WindowCompat.kt +0 -32
- package/kotlin/AppSources/androidx/lifecycle/AndroidViewModel.kt +0 -10
- package/kotlin/AppSources/dev/peach/app/PeachApp.kt +0 -388
- package/kotlin/AppSources/dev/peach/app/PeachDrawable.kt +0 -102
- package/kotlin/AppSources/dev/peach/app/PeachWindowHost.kt +0 -14
- package/kotlin/CompilerSources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar +0 -1
- package/kotlin/CompilerSources/PeachJniIncoming.kt +0 -243
- package/kotlin/CompilerSources/PeachJniPlugin.kt +0 -116
- package/kotlin/ComposeSources/PeachComposeHost.kt +0 -724
- package/kotlin/ComposeSources/PeachMagnifier.kt +0 -185
- package/kotlin/ComposeSources/PeachSemantics.kt +0 -127
- package/kotlin/ExpoComposeSources/PeachAndroidView.kt +0 -103
- package/kotlin/ExpoComposeSources/PeachExpoViewMount.kt +0 -24
- package/kotlin/ExpoComposeSources/dev/peach/expo/PeachExpoCompose.kt +0 -28
- package/kotlin/ExpoComposeSources/expo/modules/kotlin/views/ExpoComposeView.kt +0 -70
- package/kotlin/ExpoSources/dev/peach/expo/PeachExpoRuntime.kt +0 -516
- package/kotlin/ExpoSources/dev/peach/expo/PeachExpoTypes.kt +0 -173
- package/kotlin/ExpoSources/expo/modules/kotlin/AppContext.kt +0 -20
- package/kotlin/ExpoSources/expo/modules/kotlin/Promise.kt +0 -19
- package/kotlin/ExpoSources/expo/modules/kotlin/classcomponent/ClassComponentBuilder.kt +0 -198
- package/kotlin/ExpoSources/expo/modules/kotlin/exception/CodedException.kt +0 -126
- package/kotlin/ExpoSources/expo/modules/kotlin/functions/Functions.kt +0 -132
- package/kotlin/ExpoSources/expo/modules/kotlin/jni/JavaScriptTypedArray.kt +0 -81
- package/kotlin/ExpoSources/expo/modules/kotlin/modules/Module.kt +0 -98
- package/kotlin/ExpoSources/expo/modules/kotlin/objects/ObjectDefinitionBuilder.kt +0 -236
- package/kotlin/ExpoSources/expo/modules/kotlin/records/Record.kt +0 -12
- package/kotlin/ExpoSources/expo/modules/kotlin/runtime/Runtime.kt +0 -9
- package/kotlin/ExpoSources/expo/modules/kotlin/sharedobjects/SharedObject.kt +0 -50
- package/kotlin/ExpoSources/expo/modules/kotlin/sharedobjects/SharedObjectRegistry.kt +0 -57
- package/kotlin/ExpoSources/expo/modules/kotlin/sharedobjects/SharedRef.kt +0 -19
- package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/ConcreteTypedArrays.kt +0 -158
- package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/GenericTypedArray.kt +0 -8
- package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/TypedArray.kt +0 -29
- package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/TypedArrayIterator.kt +0 -9
- package/kotlin/ExpoSources/expo/modules/kotlin/types/AnyType.kt +0 -155
- package/kotlin/ExpoSources/expo/modules/kotlin/types/Either.kt +0 -91
- package/kotlin/ExpoSources/expo/modules/kotlin/types/Enumerable.kt +0 -6
- package/kotlin/ExpoSources/expo/modules/kotlin/viewevent/ViewEvent.kt +0 -68
- package/kotlin/ExpoSources/expo/modules/kotlin/views/ExpoView.kt +0 -20
- package/kotlin/ExpoSources/expo/modules/kotlin/views/ViewDefinitionBuilder.kt +0 -72
- package/kotlin/ExpoSources/expo/modules/kotlin/views/ViewProps.kt +0 -36
- package/kotlin/JniPlatformSources/androidx/annotation/CallSuper.kt +0 -5
- package/kotlin/JniPlatformSources/com/facebook/proguard/annotations/DoNotStrip.kt +0 -5
- package/kotlin/JniPlatformSources/dalvik/annotation/optimization/FastNative.kt +0 -5
- package/kotlin/JniPlatformSources/kotlin/Synchronized.kt +0 -6
- package/kotlin/JniPlatformSources/kotlin/jvm/JvmField.kt +0 -5
- package/kotlin/JniPlatformSources/kotlin/jvm/JvmStatic.kt +0 -5
- package/kotlin/JniSources/com/facebook/jni/HybridData.kt +0 -66
- package/kotlin/JniSources/dev/peach/jni/IncomingBindings.kt +0 -157
- package/kotlin/JniSources/dev/peach/jni/NativeBindings.kt +0 -77
- package/kotlin/JniTransportSources/dev/peach/jni/integration/JniTransport.kt +0 -89
- package/kotlin/Sources/android/os/Build.kt +0 -17
- package/kotlin/Sources/android/os/Handler.kt +0 -35
- package/kotlin/Sources/android/os/Looper.kt +0 -17
- package/kotlin/Sources/android/os/MessageQueue.kt +0 -56
- package/kotlin/Sources/android/os/SystemClock.kt +0 -14
- package/kotlin/Sources/android/util/Log.kt +0 -64
- package/kotlin/Sources/androidx/annotation/DrawableRes.kt +0 -14
- package/kotlin/Sources/androidx/annotation/Keep.kt +0 -4
- package/kotlin/Sources/dev/onejs/one/OneNativeSourceDispatch.kt +0 -7
- package/kotlin/Sources/dev/onejs/one/OneNativeSourceViewDispatch.kt +0 -13
- package/kotlin/Sources/dev/onejs/one/source/OneModule.kt +0 -4
- package/kotlin/Sources/java/lang/Runnable.kt +0 -6
- package/kotlin/Sources/java/security/MessageDigest.kt +0 -114
- package/kotlin/Sources/java/util/IllegalFormatCodePointException.kt +0 -10
- package/kotlin/Sources/java/util/IllegalFormatException.kt +0 -5
- package/kotlin/Sources/kotlin/text/StringFormat.kt +0 -9
- package/kotlin/Sources/org/json/JSON.kt +0 -307
- package/kotlin/tools/abi-classes.main.kts +0 -41
- package/kotlin/tools/expo-types.main.kts +0 -127
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1659 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -2426,6 +2426,11 @@ function isJsonObject(value) {
|
|
|
2426
2426
|
|
|
2427
2427
|
// src/xcode-project.ts
|
|
2428
2428
|
var APPLICATION = "com.apple.product-type.application";
|
|
2429
|
+
var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
|
|
2430
|
+
"com.apple.product-type.framework",
|
|
2431
|
+
"com.apple.product-type.framework.static"
|
|
2432
|
+
]);
|
|
2433
|
+
var HEADER_FILE = /\.(h|hh|hpp|hxx|pch)$/;
|
|
2429
2434
|
var MODULE_PRODUCTS = /* @__PURE__ */ new Set([
|
|
2430
2435
|
"com.apple.product-type.framework",
|
|
2431
2436
|
"com.apple.product-type.framework.static",
|
|
@@ -2589,7 +2594,7 @@ function defaultConfiguration(project) {
|
|
|
2589
2594
|
);
|
|
2590
2595
|
return names.includes("Debug") ? "Debug" : str(configList?.defaultConfigurationName) ?? names[0] ?? "Debug";
|
|
2591
2596
|
}
|
|
2592
|
-
function targetSettings(ref, configuration, builtins, options = {}) {
|
|
2597
|
+
function targetSettings(ref, configuration, builtins, options = {}, overrides = {}) {
|
|
2593
2598
|
const { project, target } = ref;
|
|
2594
2599
|
const xcconfigs = [];
|
|
2595
2600
|
const level = (listId) => {
|
|
@@ -2626,7 +2631,8 @@ function targetSettings(ref, configuration, builtins, options = {}) {
|
|
|
2626
2631
|
const levels = [
|
|
2627
2632
|
{ ...builtins, CONFIGURATION: configuration },
|
|
2628
2633
|
...level(str(project.project.buildConfigurationList)),
|
|
2629
|
-
...level(str(target.buildConfigurationList))
|
|
2634
|
+
...level(str(target.buildConfigurationList)),
|
|
2635
|
+
overrides
|
|
2630
2636
|
];
|
|
2631
2637
|
const resolving = /* @__PURE__ */ new Set();
|
|
2632
2638
|
const valueAt = (key, top) => {
|
|
@@ -2919,14 +2925,51 @@ function commonAncestor(dirs) {
|
|
|
2919
2925
|
}
|
|
2920
2926
|
return common;
|
|
2921
2927
|
}
|
|
2922
|
-
|
|
2928
|
+
var isPodsProject = (xcodeproj) => import_node_path2.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path2.default.basename(import_node_path2.default.dirname(xcodeproj)) === "Pods";
|
|
2929
|
+
function installedPodsSandbox(pods) {
|
|
2930
|
+
const podfileLock = import_node_path2.default.join(import_node_path2.default.dirname(pods), "Podfile.lock");
|
|
2931
|
+
const manifestLock = import_node_path2.default.join(pods, "Manifest.lock");
|
|
2932
|
+
if (!import_node_fs.default.existsSync(podfileLock))
|
|
2933
|
+
throw new Error(
|
|
2934
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path2.default.dirname(pods)}`
|
|
2935
|
+
);
|
|
2936
|
+
if (!import_node_fs.default.existsSync(manifestLock) || !import_node_fs.default.readFileSync(manifestLock).equals(import_node_fs.default.readFileSync(podfileLock)))
|
|
2937
|
+
throw new Error(
|
|
2938
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path2.default.dirname(pods)}`
|
|
2939
|
+
);
|
|
2940
|
+
const specChecksums = {};
|
|
2941
|
+
const lines = import_node_fs.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
2942
|
+
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
2943
|
+
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
2944
|
+
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
2945
|
+
if (!entry) break;
|
|
2946
|
+
specChecksums[entry[1]] = entry[2];
|
|
2947
|
+
}
|
|
2948
|
+
const specs = import_node_path2.default.join(pods, "Local Podspecs");
|
|
2949
|
+
return {
|
|
2950
|
+
podfileLock,
|
|
2951
|
+
manifestLock,
|
|
2952
|
+
specChecksums,
|
|
2953
|
+
localPodspecs: isDirectory(specs) ? import_node_fs.default.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => import_node_path2.default.join(specs, name)) : []
|
|
2954
|
+
};
|
|
2955
|
+
}
|
|
2956
|
+
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
2923
2957
|
const listed = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? workspaceReferences(xcodeprojOrWorkspace) : [xcodeprojOrWorkspace];
|
|
2924
2958
|
const projects = [];
|
|
2925
2959
|
const projectAt = /* @__PURE__ */ new Map();
|
|
2960
|
+
let cocoapods = null;
|
|
2926
2961
|
const addProject = (xcodeproj) => {
|
|
2927
|
-
if (!xcodeProjectFile(xcodeproj))
|
|
2962
|
+
if (!xcodeProjectFile(xcodeproj)) {
|
|
2963
|
+
if (installedPods && isPodsProject(xcodeproj))
|
|
2964
|
+
throw new Error(
|
|
2965
|
+
`${import_node_path2.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path2.default.dirname(import_node_path2.default.dirname(xcodeproj))}`
|
|
2966
|
+
);
|
|
2967
|
+
return;
|
|
2968
|
+
}
|
|
2928
2969
|
const key = import_node_fs.default.realpathSync(xcodeproj);
|
|
2929
|
-
if (projectAt.has(key) || key.split(import_node_path2.default.sep).includes("Pods"))
|
|
2970
|
+
if (projectAt.has(key) || !installedPods && key.split(import_node_path2.default.sep).includes("Pods"))
|
|
2971
|
+
return;
|
|
2972
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path2.default.dirname(key));
|
|
2930
2973
|
const project = loadProject(key);
|
|
2931
2974
|
projectAt.set(key, project);
|
|
2932
2975
|
projects.push(project);
|
|
@@ -2944,7 +2987,12 @@ function workspaceProjects(xcodeprojOrWorkspace) {
|
|
|
2944
2987
|
if (projects.length === 0) {
|
|
2945
2988
|
throw new Error(`${import_node_path2.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
2946
2989
|
}
|
|
2947
|
-
|
|
2990
|
+
const podfile = import_node_path2.default.join(import_node_path2.default.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
2991
|
+
if (installedPods && !cocoapods && import_node_fs.default.existsSync(podfile))
|
|
2992
|
+
throw new Error(
|
|
2993
|
+
`${podfile} is not installed into ${import_node_path2.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path2.default.dirname(podfile)} and open the workspace it writes`
|
|
2994
|
+
);
|
|
2995
|
+
return { listed, projects, projectAt, cocoapods };
|
|
2948
2996
|
}
|
|
2949
2997
|
var targetRefs = /* @__PURE__ */ new WeakMap();
|
|
2950
2998
|
function nativeTargets(project) {
|
|
@@ -2980,7 +3028,10 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
|
2980
3028
|
function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
|
|
2981
3029
|
const xcodeprojOrWorkspace = import_node_fs.default.realpathSync(input);
|
|
2982
3030
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
2983
|
-
const { listed, projects, projectAt } = workspaceProjects(
|
|
3031
|
+
const { listed, projects, projectAt, cocoapods } = workspaceProjects(
|
|
3032
|
+
xcodeprojOrWorkspace,
|
|
3033
|
+
options.installedPods
|
|
3034
|
+
);
|
|
2984
3035
|
const allTargets = projects.flatMap(nativeTargets);
|
|
2985
3036
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
|
|
2986
3037
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
@@ -3043,7 +3094,61 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3043
3094
|
order.push(ref);
|
|
3044
3095
|
};
|
|
3045
3096
|
visit(app);
|
|
3097
|
+
const headerPhase = (ref) => list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
3098
|
+
const phase = ref.project.object(phaseId);
|
|
3099
|
+
if (phase?.isa !== "PBXHeadersBuildPhase") return [];
|
|
3100
|
+
return list(phase.files).flatMap((id) => {
|
|
3101
|
+
const file = ref.project.object(id);
|
|
3102
|
+
const resolved = ref.project.resolvePath(str(file?.fileRef) ?? "");
|
|
3103
|
+
const attributes = isDict(file?.settings) ? list(file.settings.ATTRIBUTES) : [];
|
|
3104
|
+
if (!resolved) return [];
|
|
3105
|
+
return [
|
|
3106
|
+
{
|
|
3107
|
+
file: resolved,
|
|
3108
|
+
visibility: attributes.includes("Public") ? "Public" : attributes.includes("Private") ? "Private" : "Project"
|
|
3109
|
+
}
|
|
3110
|
+
];
|
|
3111
|
+
});
|
|
3112
|
+
});
|
|
3113
|
+
const productName = (ref) => targetSettings(
|
|
3114
|
+
ref,
|
|
3115
|
+
configuration,
|
|
3116
|
+
{ TARGET_NAME: str(ref.target.name) ?? ref.id },
|
|
3117
|
+
options
|
|
3118
|
+
).get("PRODUCT_NAME");
|
|
3119
|
+
const projectHeaderMaps = /* @__PURE__ */ new Map();
|
|
3120
|
+
const projectHeaderMap = (project) => {
|
|
3121
|
+
const cached = projectHeaderMaps.get(project);
|
|
3122
|
+
if (cached) return cached;
|
|
3123
|
+
const entries = /* @__PURE__ */ new Map();
|
|
3124
|
+
for (const ref of nativeTargets(project)) {
|
|
3125
|
+
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
3126
|
+
const product = framework ? productName(ref) : "";
|
|
3127
|
+
for (const { file, visibility } of headerPhase(ref)) {
|
|
3128
|
+
const name = import_node_path2.default.basename(file);
|
|
3129
|
+
if (!entries.has(name))
|
|
3130
|
+
entries.set(
|
|
3131
|
+
name,
|
|
3132
|
+
framework && visibility !== "Project" ? `${product}/${name}` : file
|
|
3133
|
+
);
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
for (const id of Object.keys(project.objects)) {
|
|
3137
|
+
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
3138
|
+
const file = project.resolvePath(id);
|
|
3139
|
+
if (file && HEADER_FILE.test(file) && !entries.has(import_node_path2.default.basename(file)))
|
|
3140
|
+
entries.set(import_node_path2.default.basename(file), file);
|
|
3141
|
+
}
|
|
3142
|
+
const map = [...entries];
|
|
3143
|
+
projectHeaderMaps.set(project, map);
|
|
3144
|
+
return map;
|
|
3145
|
+
};
|
|
3046
3146
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
3147
|
+
const buildDir = (project) => import_node_path2.default.join(project.projectDir, ".build/peach-xcode/Build");
|
|
3148
|
+
const podsBuild = {
|
|
3149
|
+
SYMROOT: import_node_path2.default.join(buildDir(app.project), "Products"),
|
|
3150
|
+
OBJROOT: import_node_path2.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
3151
|
+
};
|
|
3047
3152
|
const moduleTarget = (ref) => {
|
|
3048
3153
|
const name = str(ref.target.name) ?? ref.id;
|
|
3049
3154
|
const {
|
|
@@ -3059,12 +3164,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3059
3164
|
SRCROOT: ref.project.projectDir,
|
|
3060
3165
|
SOURCE_ROOT: ref.project.projectDir,
|
|
3061
3166
|
PROJECT_DIR: ref.project.projectDir,
|
|
3062
|
-
SYMROOT: import_node_path2.default.join(ref.project
|
|
3167
|
+
SYMROOT: import_node_path2.default.join(buildDir(ref.project), "Products"),
|
|
3063
3168
|
BUILD_DIR: "$(SYMROOT)",
|
|
3064
|
-
OBJROOT: import_node_path2.default.join(
|
|
3065
|
-
ref.project.projectDir,
|
|
3066
|
-
".build/peach-xcode/Build/Intermediates.noindex"
|
|
3067
|
-
),
|
|
3169
|
+
OBJROOT: import_node_path2.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
3068
3170
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
3069
3171
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
3070
3172
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -3080,7 +3182,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3080
3182
|
ACTION: "build",
|
|
3081
3183
|
DEVELOPMENT_LANGUAGE: str(ref.project.project.developmentRegion) ?? "en"
|
|
3082
3184
|
},
|
|
3083
|
-
options
|
|
3185
|
+
options,
|
|
3186
|
+
isPodsProject(ref.project.xcodeproj) ? podsBuild : {}
|
|
3084
3187
|
);
|
|
3085
3188
|
for (const file of read) xcconfigs.add(file);
|
|
3086
3189
|
const swiftVersion = Number.parseFloat(settings2("SWIFT_VERSION") || "5");
|
|
@@ -3090,6 +3193,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3090
3193
|
(file) => /\.(c|cc|cpp|cxx|m|mm)$/.test(file)
|
|
3091
3194
|
);
|
|
3092
3195
|
const absolute = (file) => import_node_path2.default.resolve(ref.project.projectDir, file);
|
|
3196
|
+
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
3197
|
+
const product = settings2("PRODUCT_NAME");
|
|
3198
|
+
const headerFiles = headerPhase(ref);
|
|
3199
|
+
const ownHeaders = /* @__PURE__ */ new Map();
|
|
3200
|
+
for (const { file, visibility } of headerFiles) {
|
|
3201
|
+
const name2 = import_node_path2.default.basename(file);
|
|
3202
|
+
const published = framework && visibility !== "Project";
|
|
3203
|
+
if (!ownHeaders.has(name2))
|
|
3204
|
+
ownHeaders.set(name2, published ? `${product}/${name2}` : file);
|
|
3205
|
+
if (framework && !published && !ownHeaders.has(`${product}/${name2}`))
|
|
3206
|
+
ownHeaders.set(`${product}/${name2}`, file);
|
|
3207
|
+
}
|
|
3208
|
+
const wrapper = import_node_path2.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
3209
|
+
const moduleMap = settings2("DEFINES_MODULE") === "YES" && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
3093
3210
|
const fileFlags = {};
|
|
3094
3211
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
3095
3212
|
const phase = ref.project.object(phaseId);
|
|
@@ -3119,22 +3236,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3119
3236
|
iosDeploymentTarget: settings2("IPHONEOS_DEPLOYMENT_TARGET") || null,
|
|
3120
3237
|
...implementations.some((file) => /\.mm?$/.test(file)) ? {
|
|
3121
3238
|
objc: {
|
|
3122
|
-
publicHeaders:
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
return list(phase.files).flatMap((id) => {
|
|
3126
|
-
const file = ref.project.object(id);
|
|
3127
|
-
const attributes = isDict(file?.settings) ? list(file.settings.ATTRIBUTES) : [];
|
|
3128
|
-
const resolved = ref.project.resolvePath(str(file?.fileRef) ?? "");
|
|
3129
|
-
return attributes.includes("Public") && resolved ? [resolved] : [];
|
|
3130
|
-
});
|
|
3131
|
-
}),
|
|
3239
|
+
publicHeaders: headerFiles.flatMap(
|
|
3240
|
+
({ file, visibility }) => visibility === "Public" ? [file] : []
|
|
3241
|
+
),
|
|
3132
3242
|
headers: [
|
|
3133
3243
|
.../* @__PURE__ */ new Set([
|
|
3134
3244
|
...headers,
|
|
3135
3245
|
...Object.keys(ref.project.objects).flatMap((id) => {
|
|
3136
3246
|
const file = ref.project.resolvePath(id);
|
|
3137
|
-
return file &&
|
|
3247
|
+
return file && HEADER_FILE.test(file) && import_node_fs.default.existsSync(file) ? [file] : [];
|
|
3138
3248
|
})
|
|
3139
3249
|
])
|
|
3140
3250
|
],
|
|
@@ -3144,9 +3254,13 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3144
3254
|
...settingList(settings2("HEADER_SEARCH_PATHS")),
|
|
3145
3255
|
...settingList(settings2("USER_HEADER_SEARCH_PATHS"))
|
|
3146
3256
|
].flatMap((raw) => expandSearchPath(absolute(raw), searchRules)),
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3257
|
+
// xcode searches the target's own products directory first
|
|
3258
|
+
frameworkSearchPaths: [
|
|
3259
|
+
settings2("BUILT_PRODUCTS_DIR"),
|
|
3260
|
+
...settingList(settings2("FRAMEWORK_SEARCH_PATHS")).flatMap(
|
|
3261
|
+
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
3262
|
+
)
|
|
3263
|
+
],
|
|
3150
3264
|
flags: [
|
|
3151
3265
|
settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? "-fobjc-arc" : "-fno-objc-arc",
|
|
3152
3266
|
...settings2("CLANG_ENABLE_OBJC_WEAK") === "YES" ? ["-fobjc-weak"] : [],
|
|
@@ -3161,14 +3275,40 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3161
3275
|
...settings2("CLANG_CXX_LANGUAGE_STANDARD") ? [`-std=${settings2("CLANG_CXX_LANGUAGE_STANDARD")}`] : [],
|
|
3162
3276
|
...settingList(settings2("OTHER_CPLUSPLUSFLAGS"))
|
|
3163
3277
|
],
|
|
3164
|
-
fileFlags
|
|
3278
|
+
fileFlags,
|
|
3279
|
+
headerMaps: settings2("USE_HEADERMAP") === "NO" ? [] : [
|
|
3280
|
+
{ flag: "-I", entries: [...ownHeaders] },
|
|
3281
|
+
{
|
|
3282
|
+
flag: "-iquote",
|
|
3283
|
+
entries: projectHeaderMap(ref.project)
|
|
3284
|
+
}
|
|
3285
|
+
],
|
|
3286
|
+
productHeaders: framework ? Object.fromEntries([
|
|
3287
|
+
...headerFiles.flatMap(
|
|
3288
|
+
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
3289
|
+
[
|
|
3290
|
+
import_node_path2.default.join(
|
|
3291
|
+
wrapper,
|
|
3292
|
+
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
3293
|
+
import_node_path2.default.basename(file)
|
|
3294
|
+
),
|
|
3295
|
+
file
|
|
3296
|
+
]
|
|
3297
|
+
]
|
|
3298
|
+
),
|
|
3299
|
+
...moduleMap ? [[import_node_path2.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
3300
|
+
]) : {}
|
|
3165
3301
|
}
|
|
3166
3302
|
} : {}
|
|
3167
3303
|
}
|
|
3168
3304
|
};
|
|
3169
3305
|
};
|
|
3170
3306
|
const { settings, keys: settingKeys, module: module2 } = moduleTarget(app);
|
|
3171
|
-
const
|
|
3307
|
+
const frameworkTargets = order.slice(0, -1).map((ref) => ({ ref, framework: moduleTarget(ref).module }));
|
|
3308
|
+
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
3309
|
+
const podSourceDirs = frameworkTargets.flatMap(
|
|
3310
|
+
({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => import_node_path2.default.dirname(file)).filter((dir) => import_node_fs.default.existsSync(dir)) : []
|
|
3311
|
+
);
|
|
3172
3312
|
const expandValue = (value) => {
|
|
3173
3313
|
if (typeof value === "string") return expand(value, settings);
|
|
3174
3314
|
if (Array.isArray(value)) return value.map(expandValue);
|
|
@@ -3294,11 +3434,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3294
3434
|
...localPackageDirs,
|
|
3295
3435
|
...linkedProducts.flatMap(
|
|
3296
3436
|
({ source }) => source.kind === "local" && import_node_fs.default.existsSync(source.dir) ? [source.dir] : []
|
|
3297
|
-
)
|
|
3437
|
+
),
|
|
3438
|
+
...new Set(podSourceDirs)
|
|
3298
3439
|
].map((dir) => import_node_fs.default.realpathSync(dir))
|
|
3299
3440
|
),
|
|
3300
3441
|
projectFiles: [
|
|
3301
|
-
.../* @__PURE__ */ new Set([
|
|
3442
|
+
.../* @__PURE__ */ new Set([
|
|
3443
|
+
...used.map((project) => project.projectFile),
|
|
3444
|
+
...xcconfigs,
|
|
3445
|
+
...cocoapods ? [cocoapods.podfileLock, cocoapods.manifestLock, ...cocoapods.localPodspecs] : []
|
|
3446
|
+
])
|
|
3302
3447
|
].sort(),
|
|
3303
3448
|
appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
|
|
3304
3449
|
infoPlist: import_plist2.default.build(info),
|
|
@@ -3312,7 +3457,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3312
3457
|
packageResolved,
|
|
3313
3458
|
appTargets: appTargetNames,
|
|
3314
3459
|
configuration,
|
|
3315
|
-
settings
|
|
3460
|
+
settings,
|
|
3461
|
+
cocoapods
|
|
3316
3462
|
};
|
|
3317
3463
|
}
|
|
3318
3464
|
|