peachsim 0.1.1716 → 0.1.1738
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/README.md +21 -3
- package/cli/app-bundle-resources.ts +2 -1
- package/cli/app-fonts.ts +4 -4
- package/cli/app-splash.ts +4 -4
- package/cli/app-stubs.ts +17 -0
- package/cli/command-registry.ts +1 -0
- package/cli/commands/control.ts +83 -822
- package/cli/commands/coverage-swift.ts +112 -4
- package/cli/commands/daemon.ts +8 -0
- package/cli/commands/detox.ts +3 -0
- package/cli/commands/doctor.ts +19 -2
- package/cli/commands/inspect/actions.ts +74 -14
- package/cli/commands/inspect/core.ts +5 -1
- package/cli/commands/inspect/settling.ts +5 -2
- package/cli/commands/inspect/wait-ready.ts +6 -0
- package/cli/commands/inspect.ts +48 -45
- package/cli/commands/kotlin.ts +12 -2
- package/cli/commands/package.ts +760 -0
- package/cli/commands/serve.ts +6 -0
- package/cli/commands/shell-url.ts +838 -0
- package/cli/commands/swift.ts +42 -102
- package/cli/commands/test.ts +20 -0
- package/cli/commands/upload.ts +1 -1
- package/cli/device-option.ts +1 -1
- package/cli/main.ts +13 -1
- package/cli/native-input.ts +199 -0
- package/cli/outbound-endpoints.ts +26 -1
- package/cli/packaged-app-launcher.ts +95 -0
- package/cli/scene-video.ts +36 -12
- package/detox/index.ts +196 -24
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- 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 +39889 -31873
- 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 +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +195 -63
- package/dist-lib/dev-bundle-resolution.cjs +14 -13
- package/dist-lib/expo-swift-bundle.cjs +18507 -11835
- package/dist-lib/expo-swift-metadata.cjs +4 -1
- package/dist-lib/expo-swift-metadata.mjs +3 -1
- package/dist-lib/home-paths.cjs +27 -3
- package/dist-lib/host/bridge-host.cjs +28373 -24090
- package/dist-lib/host/fetch-proxy-handler.cjs +235 -225
- 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 +915 -399
- 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 +335 -47
- package/dist-lib/menu.cjs +13 -1
- package/dist-lib/menu.mjs +13 -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 +918 -411
- package/dist-lib/native-app-identity-project.cjs +703 -283
- package/dist-lib/native-app-identity-project.mjs +500 -87
- package/dist-lib/native-app-identity.cjs +13 -2
- package/dist-lib/native-app-identity.mjs +13 -2
- 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 +5 -2
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +28 -23
- package/dist-lib/public-origins-lib.json +418 -224
- package/dist-lib/react-native-host-modules.cjs +35 -2
- package/dist-lib/react-native-host-modules.mjs +35 -2
- package/dist-lib/reap-browser.cjs +12 -4
- package/dist-lib/scripts/dev-server-scanner.cjs +15 -8
- package/dist-lib/sdk.cjs +17 -7
- package/dist-lib/sdk.mjs +16 -7
- package/dist-lib/skills.cjs +44825 -29141
- package/dist-lib/swift-compile.cjs +616 -400
- package/dist-lib/swift-compile.mjs +528 -315
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +105 -17
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +4660 -2252
- package/dist-lib/vite.cjs +248 -234
- 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-cookies.d.ts +17 -8
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +9 -6
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +11 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +5 -12
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +9 -0
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -2
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +36 -2
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
- package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +9 -2
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +12 -25
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +3 -1
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -3
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +711 -46
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +7 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
- package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
- package/sdk/ios/usr/include/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +10 -0
- package/sdk/ios/usr/include/sys/cdefs.h +5 -0
- package/sdk/ios/usr/include/sys/ioccom.h +99 -0
- package/sdk/ios/usr/include/sys/syslog.h +236 -0
- package/sdk/ios/usr/include/syslog.h +24 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/fcntl.h +4 -2
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/stdio.h +24 -0
- package/sdk/ios/wasm/include/stdlib.h +32 -7
- package/sdk/ios/wasm/include/sys/file.h +7 -0
- package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/ios/wasm/include/sys/syscall.h +9 -0
- package/sdk/ios/wasm/include/sys/time.h +10 -0
- package/sdk/ios/wasm/include/unistd.h +12 -3
- package/sdk/native-hashes.json +4 -3
- package/skills/contrast/SKILL.md +2 -1
- package/skills/peach-debug/SKILL.md +0 -1
- package/skills/peach-perf/SKILL.md +0 -1
- package/skills/peach-setup/SKILL.md +0 -1
- package/skills/peach-test/SKILL.md +7 -4
- package/skills/peach-visual/SKILL.md +0 -1
- package/src/admitted-mac-build.ts +3 -0
- package/src/android-app-identity.ts +18 -0
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/android-root-module.ts +9 -9
- package/src/appPackageContract.ts +83 -0
- package/src/bridge-contract.ts +50 -0
- package/src/bundle-channel.mjs +41 -6
- package/src/cli-runtime.ts +9 -5
- package/src/dev-bundle-resolution.ts +7 -27
- package/src/dom-source-reference.ts +15 -0
- package/src/expo-discovery-cache.ts +134 -26
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-manifest-body.ts +33 -0
- package/src/expo-native-workspace.ts +158 -38
- package/src/expo-swift-host.ts +350 -75
- package/src/expo-swift-ready.ts +5 -1
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +10 -0
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +41 -2
- package/src/host/app-package-handler.ts +47 -0
- package/src/host/bridge-host.ts +8 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/host/staged-host-files.ts +18 -0
- package/src/index.ts +3 -0
- package/src/kotlin-host.ts +225 -48
- package/src/kotlin-instance-source.ts +126 -0
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +14 -0
- package/src/native-app-identity-project.ts +7 -2
- package/src/native-app-identity.ts +11 -0
- package/src/native-firebase-config.ts +24 -1
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +270 -270
- package/src/nitro-adapter.ts +56 -50
- package/src/nitro-bundle.ts +92 -74
- package/src/nitro-compile.ts +45 -14
- package/src/nitro-dependencies.ts +63 -46
- package/src/nitro-source.ts +64 -26
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +71 -21
- package/src/react-native-bridge-modules.ts +70 -42
- package/src/react-native-host-modules.ts +34 -1
- package/src/reactNativeConfigurationContract.ts +14 -0
- package/src/reap-browser.ts +15 -3
- package/src/sdk.ts +5 -0
- package/src/settingsContract.ts +38 -1
- package/src/sim-client.ts +4 -1
- package/src/storageSnapshotContract.ts +32 -81
- package/src/swift-compile.ts +268 -89
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/provenance.ts +1 -0
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
- package/src/swift-coverage/xcode-assets.ts +89 -131
- package/src/swift-coverage/xcode.ts +10 -2
- package/src/swift-cxx-reachable.ts +2 -1
- package/src/swift-distribution.lock.json +20 -16
- package/src/swift-host.ts +98 -22
- package/src/swift-icu.ts +1 -1
- package/src/swift-link-roots.ts +118 -0
- package/src/swift-objc-compile.ts +144 -22
- package/src/swift-objc-import.ts +6 -0
- package/src/swift-objc-standin.ts +2 -14
- package/src/swift-package-manifest.ts +14 -6
- package/src/swift-packages.ts +75 -11
- package/src/swift-pdf-raster.ts +1 -0
- package/src/swift-root-lock.ts +17 -1
- package/src/swift-source-pods.ts +2 -10
- package/src/swift-standin-emit.ts +597 -57
- package/src/swift-standins.ts +599 -56
- package/src/swift-submit.ts +7 -1
- package/src/swift-toolchain.ts +140 -17
- package/src/turbo-bundle.ts +81 -0
- package/src/turbo-codegen-intake.ts +91 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +17 -12
- package/src/vite-plugin.ts +28 -15
- package/src/xcode-project.ts +223 -22
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1738 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -36,8 +36,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
37
|
|
|
38
38
|
// <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
|
|
39
|
+
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
39
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
40
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "cc658cd5e5521e0d5cadf569f4f271523bee9d710d723479b30487a9e989757f", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "fd93887e807533ae1537c979faba3c7659e84654e8c197180ee48d27bd107612", "swift-coverage/xcode-assets.ts": "f674c68408df22bff2ac80c89467b6cf4018c7e4ada6f2408d7b5f98ee83289d", "swift-coverage/xcode-asset-symbols.ts": "b94c5836f6f11c400c93b931ed0a980b8067d84a5f7a1ee75f24d6bdbf46013d", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "b112ed694771c1df8d9f4dd86691ee83fc9302f05690fae9a5151d0623191b0b", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "d9170f454c21b88b10902e601998b42179b94a8a2018f51f92f9ddafdfcfd8f6", "swift-package.ts": "36c0beef4686796e700a479135c58b1680dc30f73e2b6107891898aa46db33b0", "swift-source-file.ts": "7653751b3edfd63479f733427b6767847de0cd2267715c14dc18d6e5233c3a91", "swift-toolchain.ts": "0e3911c0f285dff280b13730b765eac0423bd026d50d93994366d296ebb3386a", "home-paths.ts": "662171633e6d98202269b7f1f5e99ae15eedb8f1ac15254f5e47a1c5337cf308", "xcode-header-search.ts": "1cfadaf2b1b29fbd72899716fc2469b6b6ca39d6c2b61fee9927fb28668967c5", "xcode-project.ts": "64d7996165ac049f4baa8b04242d4550639c9c5de7d12f61ad0d05f58857d39d", "xcode-target-members.ts": "94e7daaf57b351aa716b2c49e39c5dec8db5377d938a4f16f2d88d9099813c35", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
|
|
@@ -98,7 +100,7 @@ var init_bundleGlobalFooter = __esm({
|
|
|
98
100
|
var runtime_companion_default;
|
|
99
101
|
var init_runtime_companion = __esm({
|
|
100
102
|
"runtime-companion.json"() {
|
|
101
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
103
|
+
runtime_companion_default = { abi: 1, sha256: "65f18da220835917c493afae338016e2e9c092419e67b12eb3fb00e389637557", file: "node/cli-65f18da220835917c493afae338016e2e9c092419e67b12eb3fb00e389637557.cjs" };
|
|
102
104
|
}
|
|
103
105
|
});
|
|
104
106
|
|
|
@@ -142,10 +144,13 @@ var init_src = __esm({
|
|
|
142
144
|
});
|
|
143
145
|
|
|
144
146
|
// src/home-paths.ts
|
|
147
|
+
function ambientHomeDir() {
|
|
148
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
|
|
149
|
+
}
|
|
145
150
|
function rnxHomeDir() {
|
|
146
151
|
const override = process.env[PEACH_HOME_ENV];
|
|
147
152
|
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
148
|
-
return
|
|
153
|
+
return ambientHomeDir();
|
|
149
154
|
}
|
|
150
155
|
function runtimesDir() {
|
|
151
156
|
return import_node_path.default.join(rnxHomeDir(), "runtimes");
|
|
@@ -159,8 +164,16 @@ function activeRuntimeFile() {
|
|
|
159
164
|
function cacheDir() {
|
|
160
165
|
return import_node_path.default.join(rnxHomeDir(), "cache");
|
|
161
166
|
}
|
|
167
|
+
function buildersRootEnv() {
|
|
168
|
+
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
169
|
+
return root ? root : null;
|
|
170
|
+
}
|
|
171
|
+
function swiftCacheDir() {
|
|
172
|
+
const root = buildersRootEnv();
|
|
173
|
+
return root ? import_node_path.default.join(root, "peach-cache") : cacheDir();
|
|
174
|
+
}
|
|
162
175
|
function swiftPackageCacheOptions() {
|
|
163
|
-
const root = import_node_path.default.join(
|
|
176
|
+
const root = import_node_path.default.join(swiftCacheDir(), "swiftpm");
|
|
164
177
|
return ["cache", "config", "security"].flatMap((name2) => [
|
|
165
178
|
`--${name2}-path`,
|
|
166
179
|
import_node_path.default.join(root, name2)
|
|
@@ -260,7 +273,7 @@ function isDevBridgeLockfileFresh(lock, now = Date.now()) {
|
|
|
260
273
|
return false;
|
|
261
274
|
}
|
|
262
275
|
}
|
|
263
|
-
var import_node_fs, import_node_os, import_node_path, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DEV_BRIDGES_DIR, DAEMON_HEARTBEAT_STALE_MS, DAEMON_LOCKFILE_MAX_BYTES;
|
|
276
|
+
var import_node_fs, import_node_os, import_node_path, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DEV_BRIDGES_DIR, DAEMON_HEARTBEAT_STALE_MS, BUILDERS_ROOT_ENV, DAEMON_LOCKFILE_MAX_BYTES;
|
|
264
277
|
var init_home_paths = __esm({
|
|
265
278
|
"src/home-paths.ts"() {
|
|
266
279
|
"use strict";
|
|
@@ -273,6 +286,7 @@ var init_home_paths = __esm({
|
|
|
273
286
|
DAEMON_LOCKFILE = "daemon.json";
|
|
274
287
|
DEV_BRIDGES_DIR = "dev-bridges";
|
|
275
288
|
DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
289
|
+
BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
|
|
276
290
|
DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
277
291
|
}
|
|
278
292
|
});
|
|
@@ -517,7 +531,8 @@ function verifyCliCompanion(root) {
|
|
|
517
531
|
}
|
|
518
532
|
function getCliRuntime() {
|
|
519
533
|
if (loaded) return loaded.runtime;
|
|
520
|
-
const
|
|
534
|
+
const monorepoRoot = findMonorepoRoot();
|
|
535
|
+
const root = monorepoRoot ? (0, import_node_path2.join)(monorepoRoot, "public/sootsim") : resolveActiveRuntimeRoot();
|
|
521
536
|
if (!root) throw new Error("No Peach runtime installed; run `peach runtime install`");
|
|
522
537
|
verifyCliCompanion(root);
|
|
523
538
|
const require2 = (0, import_node_module.createRequire)(__sootsim_import_meta_url);
|
|
@@ -6043,7 +6058,7 @@ var init_kotlin_toolchain = __esm({
|
|
|
6043
6058
|
});
|
|
6044
6059
|
|
|
6045
6060
|
// src/nitro-dependencies.ts
|
|
6046
|
-
var import_node_child_process9, import_node_util4, run4;
|
|
6061
|
+
var import_node_child_process9, import_node_util4, run4, DOUBLE_CONVERSION_WASM32_BACKPORT, RN_SHARED_DEPENDENCIES, RN_DEPENDENCIES;
|
|
6047
6062
|
var init_nitro_dependencies = __esm({
|
|
6048
6063
|
"src/nitro-dependencies.ts"() {
|
|
6049
6064
|
"use strict";
|
|
@@ -6056,6 +6071,67 @@ var init_nitro_dependencies = __esm({
|
|
|
6056
6071
|
init_swift_source_file();
|
|
6057
6072
|
init_swift_submit();
|
|
6058
6073
|
run4 = (0, import_node_util4.promisify)(import_node_child_process9.execFile);
|
|
6074
|
+
DOUBLE_CONVERSION_WASM32_BACKPORT = {
|
|
6075
|
+
upstreamCommit: "8857767d5b2f5a035321e3712e8cd0008840ba6b",
|
|
6076
|
+
originalSha256: "b495b11f7b61693486894f747add5b454894b8b3ca41aa1610d370ba16407ab7",
|
|
6077
|
+
derivedSha256: "642d9f83289672def295f6a0a4f8c94823c20c3186e2b1b9ec36b436cb366da8",
|
|
6078
|
+
before: " defined(__AARCH64EL__)\n",
|
|
6079
|
+
after: " defined(__AARCH64EL__) || defined(__wasm32__)\n"
|
|
6080
|
+
};
|
|
6081
|
+
RN_SHARED_DEPENDENCIES = [
|
|
6082
|
+
{
|
|
6083
|
+
name: "RCT-Folly",
|
|
6084
|
+
url: "https://github.com/facebook/folly/archive/v2024.11.18.00.tar.gz",
|
|
6085
|
+
sha256: "b2c6879ba8ba625218d1ab9eefcc1611a9003d05bc2cb1a38f3bae21892e5167",
|
|
6086
|
+
prefix: "folly-2024.11.18.00",
|
|
6087
|
+
headers: { from: "folly", to: "folly" }
|
|
6088
|
+
},
|
|
6089
|
+
{
|
|
6090
|
+
name: "boost",
|
|
6091
|
+
url: "https://github.com/react-native-community/boost-for-react-native/archive/v1.84.0.tar.gz",
|
|
6092
|
+
sha256: "954a04e9468dee21259937b83a2b21c3985cc96f91ee0152a34a7f0f752093e8",
|
|
6093
|
+
prefix: "boost-for-react-native-1.84.0",
|
|
6094
|
+
headers: { from: "boost", to: "boost" }
|
|
6095
|
+
},
|
|
6096
|
+
{
|
|
6097
|
+
// the podspec's prepare_command renames src to double-conversion.
|
|
6098
|
+
name: "DoubleConversion",
|
|
6099
|
+
url: "https://github.com/google/double-conversion/archive/v1.1.6.tar.gz",
|
|
6100
|
+
sha256: "6b850acd8e88515764472c52973277744a945f9a769a93968efc42efef64d67a",
|
|
6101
|
+
prefix: "double-conversion-1.1.6",
|
|
6102
|
+
headers: { from: "src", to: "double-conversion" },
|
|
6103
|
+
backport: { file: "src/utils.h", ...DOUBLE_CONVERSION_WASM32_BACKPORT }
|
|
6104
|
+
},
|
|
6105
|
+
{
|
|
6106
|
+
name: "fast_float",
|
|
6107
|
+
url: "https://github.com/fastfloat/fast_float/archive/v8.0.0.tar.gz",
|
|
6108
|
+
sha256: "f312f2dc34c61e665f4b132c0307d6f70ad9420185fa831911bc24408acf625d",
|
|
6109
|
+
prefix: "fast_float-8.0.0",
|
|
6110
|
+
headers: { from: "include/fast_float", to: "fast_float" }
|
|
6111
|
+
}
|
|
6112
|
+
];
|
|
6113
|
+
RN_DEPENDENCIES = {
|
|
6114
|
+
"0.83.1": [
|
|
6115
|
+
...RN_SHARED_DEPENDENCIES,
|
|
6116
|
+
{
|
|
6117
|
+
name: "fmt",
|
|
6118
|
+
url: "https://github.com/fmtlib/fmt/archive/11.0.2.tar.gz",
|
|
6119
|
+
sha256: "6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f",
|
|
6120
|
+
prefix: "fmt-11.0.2",
|
|
6121
|
+
headers: { from: "include/fmt", to: "fmt" }
|
|
6122
|
+
}
|
|
6123
|
+
],
|
|
6124
|
+
"0.88.0": [
|
|
6125
|
+
...RN_SHARED_DEPENDENCIES,
|
|
6126
|
+
{
|
|
6127
|
+
name: "fmt",
|
|
6128
|
+
url: "https://github.com/fmtlib/fmt/archive/12.1.0.tar.gz",
|
|
6129
|
+
sha256: "ea7de4299689e12b6dddd392f9896f08fb0777ac7168897a244a6d6085043fea",
|
|
6130
|
+
prefix: "fmt-12.1.0",
|
|
6131
|
+
headers: { from: "include/fmt", to: "fmt" }
|
|
6132
|
+
}
|
|
6133
|
+
]
|
|
6134
|
+
};
|
|
6059
6135
|
}
|
|
6060
6136
|
});
|
|
6061
6137
|
|
|
@@ -6067,19 +6143,19 @@ function readJson(root, relative3) {
|
|
|
6067
6143
|
return JSON.parse(
|
|
6068
6144
|
readPackageFile(
|
|
6069
6145
|
root,
|
|
6070
|
-
|
|
6146
|
+
import_node_path24.default.join(root, relative3),
|
|
6071
6147
|
MAX_SWIFT_COMPILE_SOURCE_BYTES
|
|
6072
6148
|
).toString("utf8")
|
|
6073
6149
|
);
|
|
6074
6150
|
}
|
|
6075
6151
|
function registrations(root) {
|
|
6076
|
-
const directory =
|
|
6077
|
-
const initializers =
|
|
6152
|
+
const directory = import_node_path24.default.join(root, "nitrogen/generated/ios");
|
|
6153
|
+
const initializers = import_node_fs23.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
|
|
6078
6154
|
if (initializers.length !== 1)
|
|
6079
6155
|
throw new Error(`${root}: expected one generated Nitro iOS initializer`);
|
|
6080
6156
|
const source = readPackageFile(
|
|
6081
6157
|
root,
|
|
6082
|
-
|
|
6158
|
+
import_node_path24.default.join(directory, initializers[0]),
|
|
6083
6159
|
MAX_SWIFT_COMPILE_SOURCE_BYTES
|
|
6084
6160
|
).toString("utf8");
|
|
6085
6161
|
const namespaces = [
|
|
@@ -6121,12 +6197,12 @@ function registrations(root) {
|
|
|
6121
6197
|
return { namespace, swiftModule, classes, views: viewNames(root, classes) };
|
|
6122
6198
|
}
|
|
6123
6199
|
function viewNames(root, classes) {
|
|
6124
|
-
const directory =
|
|
6125
|
-
if (!
|
|
6200
|
+
const directory = import_node_path24.default.join(root, "nitrogen/generated/shared/json");
|
|
6201
|
+
if (!import_node_fs23.default.existsSync(directory)) return /* @__PURE__ */ new Set();
|
|
6126
6202
|
const views = /* @__PURE__ */ new Set();
|
|
6127
|
-
for (const file of
|
|
6203
|
+
for (const file of import_node_fs23.default.readdirSync(directory)) {
|
|
6128
6204
|
if (!file.endsWith("Config.json")) continue;
|
|
6129
|
-
const config = readJson(root,
|
|
6205
|
+
const config = readJson(root, import_node_path24.default.join("nitrogen/generated/shared/json", file));
|
|
6130
6206
|
const name2 = object(config) ? config.uiViewClassName : void 0;
|
|
6131
6207
|
if (typeof name2 === "string" && classes.some((entry) => entry.name === name2))
|
|
6132
6208
|
views.add(name2);
|
|
@@ -6134,22 +6210,22 @@ function viewNames(root, classes) {
|
|
|
6134
6210
|
return views;
|
|
6135
6211
|
}
|
|
6136
6212
|
function hasNitroIosInitializer(root) {
|
|
6137
|
-
const generated =
|
|
6138
|
-
return
|
|
6213
|
+
const generated = import_node_path24.default.join(root, "nitrogen/generated/ios");
|
|
6214
|
+
return import_node_fs23.default.existsSync(generated) && import_node_fs23.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
|
|
6139
6215
|
}
|
|
6140
6216
|
function nitroRegisteredNames(root) {
|
|
6141
6217
|
if (!hasNitroIosInitializer(root)) return null;
|
|
6142
6218
|
const { classes, views } = registrations(root);
|
|
6143
6219
|
return { names: classes.map(({ name: name2 }) => name2), views: [...views].sort() };
|
|
6144
6220
|
}
|
|
6145
|
-
var import_node_child_process10,
|
|
6221
|
+
var import_node_child_process10, import_node_fs23, import_node_path24, import_node_util5, run5;
|
|
6146
6222
|
var init_nitro_source = __esm({
|
|
6147
6223
|
"src/nitro-source.ts"() {
|
|
6148
6224
|
"use strict";
|
|
6149
6225
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6150
6226
|
import_node_child_process10 = require("node:child_process");
|
|
6151
|
-
|
|
6152
|
-
|
|
6227
|
+
import_node_fs23 = __toESM(require("node:fs"), 1);
|
|
6228
|
+
import_node_path24 = __toESM(require("node:path"), 1);
|
|
6153
6229
|
import_node_util5 = require("node:util");
|
|
6154
6230
|
init_internal_child();
|
|
6155
6231
|
init_nitro_dependencies();
|
|
@@ -6275,7 +6351,7 @@ function resolveAppStubs(appDir, config, configDir) {
|
|
|
6275
6351
|
const { modules, views, hybridObjects } = expandStubs(appDir, source);
|
|
6276
6352
|
assertRegisteredHybridObjects(appDir, source, hybridObjects);
|
|
6277
6353
|
for (const [name2, answer] of Object.entries(hybridObjects))
|
|
6278
|
-
nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0,
|
|
6354
|
+
nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path25.resolve)(source.baseDir, answer) };
|
|
6279
6355
|
for (const [name2, stub] of Object.entries(modules))
|
|
6280
6356
|
nativeModules[name2] = lowerStub(stub, source.baseDir);
|
|
6281
6357
|
for (const [name2, stub] of Object.entries(views))
|
|
@@ -6340,10 +6416,10 @@ function assertRegisteredHybridObjects(appDir, source, hybridObjects) {
|
|
|
6340
6416
|
);
|
|
6341
6417
|
}
|
|
6342
6418
|
function lowerStub(stub, baseDir) {
|
|
6343
|
-
return stub === "noop" ? stub : { file: (0,
|
|
6419
|
+
return stub === "noop" ? stub : { file: (0, import_node_path25.resolve)(baseDir, stub) };
|
|
6344
6420
|
}
|
|
6345
6421
|
function readPackageJson(dir) {
|
|
6346
|
-
const text2 = readSmallFile((0,
|
|
6422
|
+
const text2 = readSmallFile((0, import_node_path25.join)(dir, "package.json"));
|
|
6347
6423
|
if (!text2) return null;
|
|
6348
6424
|
try {
|
|
6349
6425
|
const parsed = JSON.parse(text2);
|
|
@@ -6355,9 +6431,9 @@ function readPackageJson(dir) {
|
|
|
6355
6431
|
function installedPackageDir(appDir, name2) {
|
|
6356
6432
|
let current = appDir;
|
|
6357
6433
|
while (true) {
|
|
6358
|
-
const dir = (0,
|
|
6359
|
-
if ((0,
|
|
6360
|
-
const parent = (0,
|
|
6434
|
+
const dir = (0, import_node_path25.join)(current, "node_modules", name2);
|
|
6435
|
+
if ((0, import_node_fs24.existsSync)((0, import_node_path25.join)(dir, "package.json"))) return (0, import_node_fs24.realpathSync)(dir);
|
|
6436
|
+
const parent = (0, import_node_path25.dirname)(current);
|
|
6361
6437
|
if (parent === current) return null;
|
|
6362
6438
|
current = parent;
|
|
6363
6439
|
}
|
|
@@ -6412,6 +6488,18 @@ function sourceNativeRequests(file, text2, includeLegacy = false) {
|
|
|
6412
6488
|
LogicalExpression(node) {
|
|
6413
6489
|
if (node.operator === "&&") guard(node.left, node.right);
|
|
6414
6490
|
},
|
|
6491
|
+
VariableDeclarator(node) {
|
|
6492
|
+
if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
|
|
6493
|
+
return;
|
|
6494
|
+
for (const property of node.id.properties) {
|
|
6495
|
+
if (property.type !== "Property") continue;
|
|
6496
|
+
const key = property.key;
|
|
6497
|
+
if (!property.computed && key.type === "Identifier")
|
|
6498
|
+
add("module", key.name, property.start, false);
|
|
6499
|
+
else if (key.type === "Literal" && typeof key.value === "string")
|
|
6500
|
+
add("module", key.value, property.start, false);
|
|
6501
|
+
}
|
|
6502
|
+
},
|
|
6415
6503
|
CallExpression(node) {
|
|
6416
6504
|
const first = node.arguments[0];
|
|
6417
6505
|
if (first?.type !== "Literal" || typeof first.value !== "string") return;
|
|
@@ -6449,7 +6537,7 @@ function mergeRequests(previous, next) {
|
|
|
6449
6537
|
function packageNativeRequests(dir) {
|
|
6450
6538
|
const found = /* @__PURE__ */ new Map();
|
|
6451
6539
|
const directories = scanRepository(dir).directories.filter((sub) => {
|
|
6452
|
-
const segments = (0,
|
|
6540
|
+
const segments = (0, import_node_path25.relative)(dir, sub).split("/");
|
|
6453
6541
|
return !NATIVE_SOURCE_DIRS.has(segments[0]) && !segments.some((segment) => PACKAGE_SKIP_DIRS.has(segment));
|
|
6454
6542
|
});
|
|
6455
6543
|
let files = 0;
|
|
@@ -6457,7 +6545,7 @@ function packageNativeRequests(dir) {
|
|
|
6457
6545
|
for (const name2 of listDir(sub)) {
|
|
6458
6546
|
if (!SOURCE_FILE.test(name2) || name2.endsWith(".d.ts") || files >= 2e3) continue;
|
|
6459
6547
|
files++;
|
|
6460
|
-
const file = (0,
|
|
6548
|
+
const file = (0, import_node_path25.join)(sub, name2);
|
|
6461
6549
|
const text2 = readSmallFile(file);
|
|
6462
6550
|
if (!text2) continue;
|
|
6463
6551
|
for (const { line: _line, ...request } of sourceNativeRequests(file, text2, true)) {
|
|
@@ -6575,27 +6663,27 @@ function wireSlotMigration(appDir, configPath, wire, kept = []) {
|
|
|
6575
6663
|
}
|
|
6576
6664
|
function listDir(dir) {
|
|
6577
6665
|
try {
|
|
6578
|
-
return (0,
|
|
6666
|
+
return (0, import_node_fs24.readdirSync)(dir);
|
|
6579
6667
|
} catch {
|
|
6580
6668
|
return [];
|
|
6581
6669
|
}
|
|
6582
6670
|
}
|
|
6583
6671
|
function readSmallFile(file) {
|
|
6584
6672
|
try {
|
|
6585
|
-
return (0,
|
|
6673
|
+
return (0, import_node_fs24.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs24.readFileSync)(file, "utf8") : null;
|
|
6586
6674
|
} catch {
|
|
6587
6675
|
return null;
|
|
6588
6676
|
}
|
|
6589
6677
|
}
|
|
6590
6678
|
function hasNativeCode(dir, platform) {
|
|
6591
|
-
const expoConfig = (0,
|
|
6679
|
+
const expoConfig = (0, import_node_path25.join)(dir, "expo-module.config.json");
|
|
6592
6680
|
const platforms = metadataValue(readProjectJson(expoConfig), "platforms");
|
|
6593
6681
|
if (Array.isArray(platforms))
|
|
6594
6682
|
return platforms.includes(platform) || platform === "ios" && platforms.includes("apple");
|
|
6595
|
-
if ([platform, "expo-module.config.json"].some((entry) => (0,
|
|
6683
|
+
if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs24.existsSync)((0, import_node_path25.join)(dir, entry))))
|
|
6596
6684
|
return true;
|
|
6597
6685
|
if (listDir(dir).some((name2) => name2.endsWith(".podspec"))) return true;
|
|
6598
|
-
const manifest = readSmallFile((0,
|
|
6686
|
+
const manifest = readSmallFile((0, import_node_path25.join)(dir, "package.json"));
|
|
6599
6687
|
return manifest !== null && manifest.includes('"codegenConfig"');
|
|
6600
6688
|
}
|
|
6601
6689
|
function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__PURE__ */ new Set(), includeLegacy = false, providers) {
|
|
@@ -6608,7 +6696,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6608
6696
|
(excluded) => dir === excluded || dir.startsWith(`${excluded}/`)
|
|
6609
6697
|
))
|
|
6610
6698
|
continue;
|
|
6611
|
-
if ((0,
|
|
6699
|
+
if ((0, import_node_fs24.existsSync)((0, import_node_path25.join)(dir, "expo-module.config.json"))) {
|
|
6612
6700
|
if (platform && !hasNativeCode(dir, platform)) {
|
|
6613
6701
|
excludedModuleDirs.push(dir);
|
|
6614
6702
|
continue;
|
|
@@ -6617,7 +6705,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6617
6705
|
}
|
|
6618
6706
|
for (const name2 of listDir(dir)) {
|
|
6619
6707
|
if (SOURCE_FILE.test(name2) && !name2.endsWith(".d.ts"))
|
|
6620
|
-
sourceFiles.push((0,
|
|
6708
|
+
sourceFiles.push((0, import_node_path25.join)(dir, name2));
|
|
6621
6709
|
}
|
|
6622
6710
|
}
|
|
6623
6711
|
}
|
|
@@ -6627,7 +6715,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6627
6715
|
scanRepository(dir).directories.flatMap(
|
|
6628
6716
|
(sub) => listDir(sub).filter(
|
|
6629
6717
|
(name2) => NATIVE_SOURCE_FILE.test(name2) && (!platform || (platform === "ios" ? name2.endsWith(".swift") : name2.endsWith(".kt")))
|
|
6630
|
-
).map((name2) => (0,
|
|
6718
|
+
).map((name2) => (0, import_node_path25.join)(sub, name2))
|
|
6631
6719
|
)
|
|
6632
6720
|
])
|
|
6633
6721
|
);
|
|
@@ -6636,7 +6724,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6636
6724
|
const known = owners.get(dir);
|
|
6637
6725
|
if (known) return known;
|
|
6638
6726
|
const name2 = readPackageJson(dir)?.name;
|
|
6639
|
-
const parent = (0,
|
|
6727
|
+
const parent = (0, import_node_path25.dirname)(dir);
|
|
6640
6728
|
const result = typeof name2 === "string" ? name2 : parent === dir ? pkg.name ?? "app" : owner(parent);
|
|
6641
6729
|
owners.set(dir, result);
|
|
6642
6730
|
return result;
|
|
@@ -6650,15 +6738,15 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6650
6738
|
return;
|
|
6651
6739
|
}
|
|
6652
6740
|
providers ??= dependencyNativeOwners(appDir, pkg);
|
|
6653
|
-
const packageName = providers.get(key) ?? owner((0,
|
|
6741
|
+
const packageName = providers.get(key) ?? owner((0, import_node_path25.dirname)(file));
|
|
6654
6742
|
if (knownPackages.has(packageName)) return;
|
|
6655
6743
|
const moduleDir = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`)) ?? null;
|
|
6656
6744
|
found.set(key, {
|
|
6657
6745
|
kind,
|
|
6658
6746
|
name: name2,
|
|
6659
6747
|
package: packageName,
|
|
6660
|
-
path: `${(0,
|
|
6661
|
-
expoModule: moduleDir ? (0,
|
|
6748
|
+
path: `${(0, import_node_path25.relative)(appDir, file)}:${line}`,
|
|
6749
|
+
expoModule: moduleDir ? (0, import_node_path25.relative)(appDir, moduleDir) || "." : null,
|
|
6662
6750
|
optional,
|
|
6663
6751
|
swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
|
|
6664
6752
|
(path26) => path26.endsWith(".swift") && [...(readSmallFile(path26) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
|
|
@@ -6709,30 +6797,30 @@ function workspacePackageDirs(appDir, pkg) {
|
|
|
6709
6797
|
for (const name2 of Object.keys({ ...pkg.dependencies, ...pkg.devDependencies })) {
|
|
6710
6798
|
let current = appDir;
|
|
6711
6799
|
while (true) {
|
|
6712
|
-
const link = (0,
|
|
6713
|
-
if ((0,
|
|
6714
|
-
if ((0,
|
|
6715
|
-
const target = (0,
|
|
6800
|
+
const link = (0, import_node_path25.join)(current, "node_modules", name2);
|
|
6801
|
+
if ((0, import_node_fs24.existsSync)(link)) {
|
|
6802
|
+
if ((0, import_node_fs24.lstatSync)(link).isSymbolicLink()) {
|
|
6803
|
+
const target = (0, import_node_fs24.realpathSync)(link);
|
|
6716
6804
|
if (!target.split("/").includes("node_modules") && !target.startsWith(`${appDir}/`)) {
|
|
6717
6805
|
dirs.add(target);
|
|
6718
6806
|
}
|
|
6719
6807
|
}
|
|
6720
6808
|
break;
|
|
6721
6809
|
}
|
|
6722
|
-
const parent = (0,
|
|
6810
|
+
const parent = (0, import_node_path25.dirname)(current);
|
|
6723
6811
|
if (parent === current) break;
|
|
6724
6812
|
current = parent;
|
|
6725
6813
|
}
|
|
6726
6814
|
}
|
|
6727
6815
|
return [...dirs];
|
|
6728
6816
|
}
|
|
6729
|
-
var
|
|
6817
|
+
var import_node_fs24, import_node_path25, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
|
|
6730
6818
|
var init_app_stubs = __esm({
|
|
6731
6819
|
"cli/app-stubs.ts"() {
|
|
6732
6820
|
"use strict";
|
|
6733
6821
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6734
|
-
|
|
6735
|
-
|
|
6822
|
+
import_node_fs24 = require("node:fs");
|
|
6823
|
+
import_node_path25 = require("node:path");
|
|
6736
6824
|
init_version_range();
|
|
6737
6825
|
import_oxc_parser2 = require("oxc-parser");
|
|
6738
6826
|
import_sucrase = require("sucrase");
|
|
@@ -6768,12 +6856,12 @@ function resolveFileEntries(entries, configDir) {
|
|
|
6768
6856
|
return Object.fromEntries(
|
|
6769
6857
|
Object.entries(entries).map(([name2, resolution]) => [
|
|
6770
6858
|
name2,
|
|
6771
|
-
resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file:
|
|
6859
|
+
resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path26.default.resolve(configDir, resolution.file) } : resolution
|
|
6772
6860
|
])
|
|
6773
6861
|
);
|
|
6774
6862
|
}
|
|
6775
6863
|
function resolveConfigReplacementFiles(config, configPath) {
|
|
6776
|
-
const configDir =
|
|
6864
|
+
const configDir = import_node_path26.default.dirname(configPath);
|
|
6777
6865
|
return {
|
|
6778
6866
|
...config,
|
|
6779
6867
|
modules: resolveFileEntries(config.modules, configDir)
|
|
@@ -6789,7 +6877,7 @@ async function loadRNXAppStubs(project) {
|
|
|
6789
6877
|
return resolveAppStubs(
|
|
6790
6878
|
project.appDir,
|
|
6791
6879
|
config,
|
|
6792
|
-
project.configPath ?
|
|
6880
|
+
project.configPath ? import_node_path26.default.dirname(project.configPath) : project.appDir
|
|
6793
6881
|
);
|
|
6794
6882
|
} catch (error) {
|
|
6795
6883
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -6808,7 +6896,7 @@ async function loadConfigFile(project) {
|
|
|
6808
6896
|
[`${rnxPublicBrand.packageName}/config`]: config_exports
|
|
6809
6897
|
}
|
|
6810
6898
|
});
|
|
6811
|
-
const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0,
|
|
6899
|
+
const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs25.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
|
|
6812
6900
|
if (!isPeachConfig(loaded3)) {
|
|
6813
6901
|
throw new Error("the default export must be a peach config object");
|
|
6814
6902
|
}
|
|
@@ -6844,13 +6932,13 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
|
|
|
6844
6932
|
const project = resolveAppProject(startDir);
|
|
6845
6933
|
return { project, ...await loadRNXAppStubs(project) };
|
|
6846
6934
|
}
|
|
6847
|
-
var
|
|
6935
|
+
var import_node_fs25, import_node_path26, import_jiti, WIRE_SLOTS;
|
|
6848
6936
|
var init_app_config = __esm({
|
|
6849
6937
|
"cli/app-config.ts"() {
|
|
6850
6938
|
"use strict";
|
|
6851
6939
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6852
|
-
|
|
6853
|
-
|
|
6940
|
+
import_node_fs25 = require("node:fs");
|
|
6941
|
+
import_node_path26 = __toESM(require("node:path"), 1);
|
|
6854
6942
|
import_jiti = require("jiti");
|
|
6855
6943
|
init_config();
|
|
6856
6944
|
init_config();
|
|
@@ -6947,14 +7035,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
6947
7035
|
const neededPackages = /* @__PURE__ */ new Set();
|
|
6948
7036
|
const factories = [];
|
|
6949
7037
|
const visit3 = (filePath) => {
|
|
6950
|
-
const real =
|
|
7038
|
+
const real = import_node_fs26.default.realpathSync(filePath);
|
|
6951
7039
|
const previous = files.get(real);
|
|
6952
7040
|
if (previous !== void 0) return previous;
|
|
6953
7041
|
const id = "peach-config-file:" + files.size;
|
|
6954
7042
|
files.set(real, id);
|
|
6955
7043
|
const compiled = compileReplacementModule({
|
|
6956
7044
|
filePath: real,
|
|
6957
|
-
source:
|
|
7045
|
+
source: import_node_fs26.default.readFileSync(real, "utf8"),
|
|
6958
7046
|
runtimePackages,
|
|
6959
7047
|
localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
|
|
6960
7048
|
});
|
|
@@ -6978,7 +7066,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
6978
7066
|
if (!entries || typeof entries !== "object") continue;
|
|
6979
7067
|
for (const resolution of Object.values(entries)) {
|
|
6980
7068
|
if (resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string") {
|
|
6981
|
-
resolution.file = visit3(
|
|
7069
|
+
resolution.file = visit3(import_node_path27.default.resolve(resolution.file));
|
|
6982
7070
|
}
|
|
6983
7071
|
}
|
|
6984
7072
|
}
|
|
@@ -7002,13 +7090,13 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
7002
7090
|
const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
|
|
7003
7091
|
return prefix2 + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
|
|
7004
7092
|
}
|
|
7005
|
-
var
|
|
7093
|
+
var import_node_fs26, import_node_path27, import_sucrase2, import_terser;
|
|
7006
7094
|
var init_configured_bundle_producer = __esm({
|
|
7007
7095
|
"src/configured-bundle-producer.ts"() {
|
|
7008
7096
|
"use strict";
|
|
7009
7097
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
7010
|
-
|
|
7011
|
-
|
|
7098
|
+
import_node_fs26 = __toESM(require("node:fs"), 1);
|
|
7099
|
+
import_node_path27 = __toESM(require("node:path"), 1);
|
|
7012
7100
|
import_sucrase2 = require("sucrase");
|
|
7013
7101
|
import_terser = require("terser");
|
|
7014
7102
|
init_dependencies();
|
|
@@ -9404,7 +9492,7 @@ function waitReadyReason(status) {
|
|
|
9404
9492
|
if (status.bridgeError.includes(HEADLESS_TENANT_FETCH_HUNG_MARKER)) {
|
|
9405
9493
|
return status.bridgeError;
|
|
9406
9494
|
}
|
|
9407
|
-
return `
|
|
9495
|
+
return `readiness probe failed: ${status.bridgeError}; no readiness snapshot received (check \`peach list\` for connection state)`;
|
|
9408
9496
|
}
|
|
9409
9497
|
const waitingOnGuestFetch = status.externalReady === false && /https?:\/\//.test(status.externalStatus);
|
|
9410
9498
|
const base = status.externalError ? `guest app errored: ${status.externalError}` : waitingOnGuestFetch ? `waiting on a guest fetch: ${status.externalStatus}` : status.loadingText ? `still showing "${status.loadingText}"` : status.externalReady === false ? "guest app is still loading" : status.flag !== true && status.targets > 0 ? "native content is rendered but the ready signal has not settled" : status.flag !== true ? "guest app has not emitted sootsim:externalAppReady" : status.targets <= 0 && !status.paintedAppContent ? "ready flag emitted but no visible app content is inspectable yet" : "node tree is still changing";
|
|
@@ -9464,6 +9552,7 @@ async function inspectWaitReady(bridge, timeoutMs, options = {}) {
|
|
|
9464
9552
|
const status = waitReadyFromResult(result);
|
|
9465
9553
|
status.elapsedMs = now() - start;
|
|
9466
9554
|
lastStatus = status;
|
|
9555
|
+
if (status.bridgeError.startsWith("command timed out after ")) continue;
|
|
9467
9556
|
if (status.ready || status.externalError || status.bridgeError) return status;
|
|
9468
9557
|
const key = waitReadyProgressKey(status);
|
|
9469
9558
|
if (key !== lastKey) {
|
|
@@ -10091,8 +10180,11 @@ async function waitForSootsimIdle({
|
|
|
10091
10180
|
}
|
|
10092
10181
|
const counts = await countsRead
|
|
10093
10182
|
if (counts === BUSY) workerBusy = true
|
|
10094
|
-
|
|
10095
|
-
|
|
10183
|
+
// <Image> loads are left to the image loader, which counts only those
|
|
10184
|
+
// that can reach the window. a runtime older than the CLI reports none.
|
|
10185
|
+
const imageLoads = counts?.imageLoads ?? { total: 0, inFlight: 0 }
|
|
10186
|
+
requestTotal = typeof counts?.total === 'number' ? counts.total - imageLoads.total : 0
|
|
10187
|
+
requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight - imageLoads.inFlight : 0
|
|
10096
10188
|
const total = await nodeCountRead
|
|
10097
10189
|
if (total === BUSY) workerBusy = true
|
|
10098
10190
|
nodeCount = typeof total === 'number' ? total : null
|
|
@@ -10479,6 +10571,7 @@ function tapTiming(agent, opts = {}) {
|
|
|
10479
10571
|
function isTapSuccess(result) {
|
|
10480
10572
|
if (!result || result.hit === false || result.ok === false) return false;
|
|
10481
10573
|
if (result.handled === false) return false;
|
|
10574
|
+
if (result.hit !== true && result.handled !== true) return false;
|
|
10482
10575
|
if (result.requestedTargetMatched === false) return false;
|
|
10483
10576
|
if (result.pointerTapHandled === false && !(result.hit === true && result.requestedTargetMatched === true) && !result.keyboardOpened && !result.isTextInput) {
|
|
10484
10577
|
return false;
|
|
@@ -10609,7 +10702,7 @@ async function tapCoordinates(bridge, x, y, target) {
|
|
|
10609
10702
|
...target ? { target } : {}
|
|
10610
10703
|
});
|
|
10611
10704
|
}
|
|
10612
|
-
function payloadFromResolved(resolved, match, extra =
|
|
10705
|
+
function payloadFromResolved(resolved, match, extra = null) {
|
|
10613
10706
|
return {
|
|
10614
10707
|
cx: resolved.x,
|
|
10615
10708
|
cy: resolved.y,
|
|
@@ -10629,7 +10722,7 @@ function payloadFromResolved(resolved, match, extra = {}) {
|
|
|
10629
10722
|
type: resolved.type ?? match.type ?? null
|
|
10630
10723
|
},
|
|
10631
10724
|
strategy: "matched-node",
|
|
10632
|
-
...extra
|
|
10725
|
+
...extra ?? {}
|
|
10633
10726
|
};
|
|
10634
10727
|
}
|
|
10635
10728
|
function collectTextCandidates(nodes, ancestors = [], pressableOwnerText = "", actionableAncestor = false, actionableRole) {
|
|
@@ -11244,7 +11337,7 @@ var SimClient = class {
|
|
|
11244
11337
|
// --- internals ---
|
|
11245
11338
|
throwUnlessTapped(outcome, label) {
|
|
11246
11339
|
if (!outcome.failure && isTapSuccess(outcome.result)) return;
|
|
11247
|
-
const reason = outcome.failure === "not-found" ? "no matching node" : outcome.failure === "missed" ? outcome.result?.reason ?? "press missed" : outcome.payload?.ambiguous ? `ambiguous: ${outcome.payload.total} matches` : outcome.result?.reason ?? outcome.payload?.error ?? "tap failed";
|
|
11340
|
+
const reason = outcome.failure === "not-found" ? "no matching node" : outcome.failure === "missed" ? outcome.result?.reason ?? "press missed" : outcome.payload?.ambiguous ? outcome.payload.error ?? (outcome.payload.total === void 0 ? "ambiguous target" : `ambiguous: ${outcome.payload.total} matches`) : outcome.result?.reason ?? outcome.payload?.error ?? "tap failed";
|
|
11248
11341
|
throw new SimTapError(`tap ${JSON.stringify(label)} failed: ${reason}`, outcome);
|
|
11249
11342
|
}
|
|
11250
11343
|
coordsForTapTarget(target) {
|
|
@@ -11813,6 +11906,7 @@ var import_path3 = __toESM(require("path"), 1);
|
|
|
11813
11906
|
|
|
11814
11907
|
// ../peach-compat/src/lazy-stub-patterns.ts
|
|
11815
11908
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
11909
|
+
init_version_range();
|
|
11816
11910
|
var LAZY_STUB_PATTERNS = [
|
|
11817
11911
|
"@10play/tentap-editor",
|
|
11818
11912
|
"@adobe/react-native-aepcore",
|
|
@@ -11868,13 +11962,10 @@ var LAZY_STUB_PATTERNS = [
|
|
|
11868
11962
|
"@shopify/checkout-sheet-kit",
|
|
11869
11963
|
"@stream-io/video-react-native-sdk",
|
|
11870
11964
|
"@stripe/stripe-identity-react-native",
|
|
11871
|
-
"@stripe/stripe-react-native",
|
|
11872
|
-
"@stripe/stripe-react-native/lib/typescript/src/types",
|
|
11873
11965
|
"@stripe/stripe-terminal-react-native",
|
|
11874
11966
|
"@supersami/rn-foreground-service",
|
|
11875
11967
|
"@survicate/react-native-survicate",
|
|
11876
11968
|
"@twilio/voice-react-native-sdk",
|
|
11877
|
-
"@walletconnect/react-native-compat",
|
|
11878
11969
|
"@xmartlabs/react-native-line",
|
|
11879
11970
|
"@zoontek/react-native-navigation-bar",
|
|
11880
11971
|
"clevertap-react-native",
|
|
@@ -11886,9 +11977,7 @@ var LAZY_STUB_PATTERNS = [
|
|
|
11886
11977
|
"expo-modules-core",
|
|
11887
11978
|
"expo-superwall",
|
|
11888
11979
|
"freerasp-react-native",
|
|
11889
|
-
"klaviyo-react-native-sdk",
|
|
11890
11980
|
"llama.rn",
|
|
11891
|
-
"mixpanel-react-native",
|
|
11892
11981
|
"newrelic-react-native-agent",
|
|
11893
11982
|
"realm",
|
|
11894
11983
|
"react-native-a11y",
|
|
@@ -11900,7 +11989,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
11900
11989
|
"react-native-android-location-enabler",
|
|
11901
11990
|
"react-native-animateable-text",
|
|
11902
11991
|
"react-native-app-clip",
|
|
11903
|
-
"react-native-appsflyer",
|
|
11904
11992
|
"react-native-avoid-softinput",
|
|
11905
11993
|
"react-native-azure-auth",
|
|
11906
11994
|
"react-native-background-actions",
|
|
@@ -11909,7 +11997,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
11909
11997
|
"react-native-bluetooth-classic",
|
|
11910
11998
|
"react-native-bluetooth-state-manager",
|
|
11911
11999
|
"react-native-bottom-tabs",
|
|
11912
|
-
"react-native-branch",
|
|
11913
12000
|
"react-native-camera-kit",
|
|
11914
12001
|
"react-native-change-icon",
|
|
11915
12002
|
"react-native-charts-wrapper",
|
|
@@ -11947,7 +12034,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
11947
12034
|
"react-native-moengage",
|
|
11948
12035
|
"react-native-navigation-mode",
|
|
11949
12036
|
"react-native-network-info",
|
|
11950
|
-
"react-native-nitro-haptics",
|
|
11951
12037
|
"react-native-otp-verify",
|
|
11952
12038
|
"react-native-passkey",
|
|
11953
12039
|
"react-native-payments",
|
|
@@ -11968,6 +12054,7 @@ var LAZY_STUB_PATTERNS = [
|
|
|
11968
12054
|
"react-native-restart-newarch",
|
|
11969
12055
|
"react-native-screenguard",
|
|
11970
12056
|
"react-native-screens",
|
|
12057
|
+
"react-native-screens/components/Screen",
|
|
11971
12058
|
"react-native-screenshot-prevent",
|
|
11972
12059
|
"react-native-select-contact",
|
|
11973
12060
|
"react-native-send-intent",
|
|
@@ -12839,7 +12926,6 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
12839
12926
|
"@callstack/timezone-hermes-fix",
|
|
12840
12927
|
"@candlefinance/faster-image",
|
|
12841
12928
|
"@candlefinance/haptics",
|
|
12842
|
-
"@clerk/expo",
|
|
12843
12929
|
"@clerk/expo-passkeys",
|
|
12844
12930
|
"@cometchat/chat-uikit-react-native",
|
|
12845
12931
|
"@computools/react-native-dynamic-app-icon",
|
|
@@ -12875,6 +12961,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
12875
12961
|
"@flyskywhy/react-native-gcanvas",
|
|
12876
12962
|
"@fugood/react-native-audio-pcm-stream",
|
|
12877
12963
|
"@fullstory/react-native",
|
|
12964
|
+
"@g4rb4g3/react-native-carplay",
|
|
12878
12965
|
"@gabriel-sisjr/react-native-background-location",
|
|
12879
12966
|
"@generac/react-native-local-network-permission",
|
|
12880
12967
|
"@giphy/react-native-sdk",
|
|
@@ -12882,6 +12969,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
12882
12969
|
"@goliapkg/sentori-react-native",
|
|
12883
12970
|
"@google/react-native-make-payment",
|
|
12884
12971
|
"@googlemaps/react-native-navigation-sdk",
|
|
12972
|
+
"@gutenye/ocr-react-native",
|
|
12885
12973
|
"@haroldtran/react-native-pax",
|
|
12886
12974
|
"@hot-updater/react-native",
|
|
12887
12975
|
"@huymobile/react-native-sms-retriever-nitro-module",
|
|
@@ -13010,6 +13098,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
13010
13098
|
"@rn-org/react-native-geofencing",
|
|
13011
13099
|
"@rn-org/react-native-shortcuts",
|
|
13012
13100
|
"@rnmapbox/maps",
|
|
13101
|
+
"@rntp/player",
|
|
13013
13102
|
"@rnw-community/react-native-payments",
|
|
13014
13103
|
"@rocket.chat/mobile-crypto",
|
|
13015
13104
|
"@roman.sytnyk/blur-app-in-recents",
|
|
@@ -13487,6 +13576,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
13487
13576
|
"react-native-nfc-manager",
|
|
13488
13577
|
"react-native-nitro-ark",
|
|
13489
13578
|
"react-native-nitro-audio-manager",
|
|
13579
|
+
"react-native-nitro-base64",
|
|
13490
13580
|
"react-native-nitro-buffer",
|
|
13491
13581
|
"react-native-nitro-cloud-uploader",
|
|
13492
13582
|
"react-native-nitro-cookies",
|
|
@@ -13791,7 +13881,7 @@ var NATIVE_RUNTIME_PACKAGE_NAMES = [
|
|
|
13791
13881
|
"@valora/react-native-keychain",
|
|
13792
13882
|
"react-native-app-control",
|
|
13793
13883
|
"react-native-blue-crypto",
|
|
13794
|
-
"react-native-
|
|
13884
|
+
"react-native-dynamic-theme",
|
|
13795
13885
|
"react-native-nitro-gzip",
|
|
13796
13886
|
"react-native-sectioned-slider"
|
|
13797
13887
|
];
|
|
@@ -14054,6 +14144,10 @@ var SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES = {
|
|
|
14054
14144
|
specifier: "@peach-internal/expo-platform",
|
|
14055
14145
|
packageName: "expo-modules-core/build/Platform.js"
|
|
14056
14146
|
},
|
|
14147
|
+
expoLegacyEventEmitter: {
|
|
14148
|
+
specifier: "@peach-internal/expo-legacy-event-emitter",
|
|
14149
|
+
packageName: "expo-modules-core/build/LegacyEventEmitter.js"
|
|
14150
|
+
},
|
|
14057
14151
|
expoSharedObjectHook: {
|
|
14058
14152
|
specifier: "@peach-internal/expo-shared-object-hook",
|
|
14059
14153
|
packageName: "expo-modules-core/build/hooks/useReleasingSharedObject.js"
|
|
@@ -16189,6 +16283,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
16189
16283
|
else proxyReq.end(nextBody);
|
|
16190
16284
|
});
|
|
16191
16285
|
const proxyRes = await send().finally(() => req.off("aborted", markAborted));
|
|
16286
|
+
upstreamAnswered = true;
|
|
16192
16287
|
const status = proxyRes.statusCode ?? 502;
|
|
16193
16288
|
const location = proxyRes.headers.location;
|
|
16194
16289
|
const hopCookies = [...setCookies, ...proxyRes.headers["set-cookie"] ?? []];
|
|
@@ -16234,6 +16329,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
16234
16329
|
}
|
|
16235
16330
|
await (0, import_promises3.pipeline)(proxyRes, res);
|
|
16236
16331
|
};
|
|
16332
|
+
let upstreamAnswered = false;
|
|
16237
16333
|
let body;
|
|
16238
16334
|
try {
|
|
16239
16335
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
@@ -16248,6 +16344,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
16248
16344
|
await proxy(upstreamUrl, originalMethod, body, 0, []);
|
|
16249
16345
|
} catch (err) {
|
|
16250
16346
|
const norm = normalizeHostname(upstreamUrl.hostname);
|
|
16347
|
+
if (upstreamAnswered && !res.headersSent)
|
|
16348
|
+
console.error(`[peach] fetch proxy could not forward ${upstreamUrl.href}:`, err);
|
|
16251
16349
|
if (!res.headersSent && isLoopbackHost(norm) && err?.code === "ECONNREFUSED") {
|
|
16252
16350
|
const altHosts = norm === "::1" ? ["127.0.0.1"] : norm === "127.0.0.1" ? ["[::1]"] : ["[::1]", "127.0.0.1"];
|
|
16253
16351
|
for (const altHost of altHosts) {
|
|
@@ -16275,6 +16373,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
16275
16373
|
res.end();
|
|
16276
16374
|
return;
|
|
16277
16375
|
}
|
|
16376
|
+
if (!(err instanceof Error && "code" in err))
|
|
16377
|
+
console.error("[peach] fetch proxy failed:", err);
|
|
16278
16378
|
if (req instanceof import_node_http2.Http2ServerRequest)
|
|
16279
16379
|
req.stream.destroy(new Error("fetch proxy upstream failed", { cause: err }));
|
|
16280
16380
|
else req.socket.destroy();
|
|
@@ -16490,6 +16590,10 @@ function swiftViteLifetime(server) {
|
|
|
16490
16590
|
}
|
|
16491
16591
|
|
|
16492
16592
|
// src/vite-plugin-one.ts
|
|
16593
|
+
function requestAuthority(req) {
|
|
16594
|
+
const authority = req.headers[":authority"];
|
|
16595
|
+
return req.headers.host ?? (typeof authority === "string" ? authority : void 0);
|
|
16596
|
+
}
|
|
16493
16597
|
function exposeHeader(res, name2) {
|
|
16494
16598
|
const exposed = res.getHeader("access-control-expose-headers");
|
|
16495
16599
|
const names = typeof exposed === "string" && exposed ? exposed.split(/,\s*/) : [];
|
|
@@ -16565,7 +16669,6 @@ function peachPlugin(options = {}) {
|
|
|
16565
16669
|
return;
|
|
16566
16670
|
}
|
|
16567
16671
|
const loopback = address.address === "::" || address.address === "0.0.0.0" ? "127.0.0.1" : address.address;
|
|
16568
|
-
const authority = req.headers[":authority"];
|
|
16569
16672
|
const options2 = {
|
|
16570
16673
|
host: loopback,
|
|
16571
16674
|
port: address.port,
|
|
@@ -16575,7 +16678,7 @@ function peachPlugin(options = {}) {
|
|
|
16575
16678
|
...Object.fromEntries(
|
|
16576
16679
|
Object.entries(req.headers).filter(([key]) => !key.startsWith(":"))
|
|
16577
16680
|
),
|
|
16578
|
-
host: req
|
|
16681
|
+
host: requestAuthority(req),
|
|
16579
16682
|
"accept-encoding": "identity",
|
|
16580
16683
|
[BUNDLE_SOURCE_REQUEST_HEADER]: "1"
|
|
16581
16684
|
},
|
|
@@ -16591,13 +16694,14 @@ function peachPlugin(options = {}) {
|
|
|
16591
16694
|
res.setHeader(key, value);
|
|
16592
16695
|
}
|
|
16593
16696
|
const forward = res.statusCode === 200 ? forwardRolldownBundleResponse(upstream, res) : (0, import_promises5.pipeline)(upstream, res);
|
|
16594
|
-
forward.catch(
|
|
16595
|
-
|
|
16596
|
-
|
|
16697
|
+
forward.catch((error) => {
|
|
16698
|
+
console.error("[peach] bundle forward failed", error);
|
|
16699
|
+
res.destroy(error instanceof Error ? error : new Error(String(error)));
|
|
16700
|
+
});
|
|
16597
16701
|
};
|
|
16598
16702
|
const upstreamReq = server.config.server.https ? import_node_https2.default.request(options2, respond) : import_node_http3.default.request(options2, respond);
|
|
16599
16703
|
upstreamReq.once("error", next);
|
|
16600
|
-
|
|
16704
|
+
res.once("close", () => {
|
|
16601
16705
|
if (!res.writableFinished) upstreamReq.destroy();
|
|
16602
16706
|
});
|
|
16603
16707
|
upstreamReq.end();
|
|
@@ -16676,7 +16780,7 @@ function peachPlugin(options = {}) {
|
|
|
16676
16780
|
const devOrigin = () => `http://localhost:${listeningPort()}`;
|
|
16677
16781
|
const requestOrigin = (req) => new URL(
|
|
16678
16782
|
req.url || "/",
|
|
16679
|
-
`${server.config.server.https ? "https" : "http"}://${req
|
|
16783
|
+
`${server.config.server.https ? "https" : "http"}://${requestAuthority(req)}`
|
|
16680
16784
|
).origin;
|
|
16681
16785
|
const sendSwiftChange = (change) => {
|
|
16682
16786
|
const message = JSON.stringify(change);
|
|
@@ -16821,7 +16925,7 @@ function peachPlugin(options = {}) {
|
|
|
16821
16925
|
const html = import_fs6.default.readFileSync(import_path5.default.join(runtimeRoot, "index.html"), "utf8");
|
|
16822
16926
|
const lock = readDaemonLockfile();
|
|
16823
16927
|
const bridgePort = lock && isDaemonLockfileFresh(lock) && lock.bridgePort > 0 ? lock.bridgePort : DEFAULT_SOOTSIM_BRIDGE_PORT;
|
|
16824
|
-
const inject = `<script>(function(){var u=new URL(location.href);var b=${JSON.stringify(bundleForOrigin(origin))};if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',b);window.__sootsimBridgePort=${bridgePort};window.__peachPageServingAuthority='contributor';history.replaceState(null,'','${prefix2}/'+u.search)})()</script>`;
|
|
16928
|
+
const inject = `<script>(function(){var u=new URL(location.href);var b=${JSON.stringify(bundleForOrigin(origin))};if(!u.searchParams.has('bundle')&&!u.searchParams.get('demoApp')?.trim())u.searchParams.set('bundle',b);window.__sootsimBridgePort=${bridgePort};window.__peachPageServingAuthority='contributor';history.replaceState(null,'','${prefix2}/'+u.search)})()</script>`;
|
|
16825
16929
|
return html.replace("</head>", inject + "</head>");
|
|
16826
16930
|
};
|
|
16827
16931
|
server.middlewares.use((req, res, next) => {
|
|
@@ -16886,7 +16990,7 @@ function peachPlugin(options = {}) {
|
|
|
16886
16990
|
if (serveBrowserProxyRoute(req, res)) return;
|
|
16887
16991
|
const url = req.url || "";
|
|
16888
16992
|
const pathname = url.split("?")[0];
|
|
16889
|
-
const runtimeRoot = resolveRuntimeRootForRequestHost(req
|
|
16993
|
+
const runtimeRoot = resolveRuntimeRootForRequestHost(requestAuthority(req));
|
|
16890
16994
|
if (!runtimeRoot) {
|
|
16891
16995
|
if (pathname === prefix2 || pathname === prefix2 + "/" || pathname.startsWith(prefix2 + "/")) {
|
|
16892
16996
|
res.statusCode = 500;
|
|
@@ -16944,7 +17048,7 @@ function peachPlugin(options = {}) {
|
|
|
16944
17048
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
16945
17049
|
var import_fs7 = __toESM(require("fs"), 1);
|
|
16946
17050
|
var import_module2 = require("module");
|
|
16947
|
-
var
|
|
17051
|
+
var import_node_crypto9 = require("node:crypto");
|
|
16948
17052
|
var import_path6 = __toESM(require("path"), 1);
|
|
16949
17053
|
init_app_project();
|
|
16950
17054
|
|
|
@@ -16995,7 +17099,8 @@ async function resolveAndroidModules(appRoot) {
|
|
|
16995
17099
|
{
|
|
16996
17100
|
timeout: 3e4,
|
|
16997
17101
|
maxBuffer: 8 * 1024 * 1024,
|
|
16998
|
-
env: { ...process.env, [RNX_FORKED_SCRIPT_ENV]: "1" }
|
|
17102
|
+
env: { ...process.env, [RNX_FORKED_SCRIPT_ENV]: "1" },
|
|
17103
|
+
cwd: appRoot
|
|
16999
17104
|
}
|
|
17000
17105
|
);
|
|
17001
17106
|
const resolved = JSON.parse(stdout);
|
|
@@ -17122,13 +17227,13 @@ function readModuleNamespace(moduleRoot, manifest) {
|
|
|
17122
17227
|
function readModuleRootModuleName(moduleRoot) {
|
|
17123
17228
|
const sourceSets = import_node_path16.default.join(moduleRoot, "src");
|
|
17124
17229
|
const manifestFile = import_node_path16.default.join(sourceSets, "main/AndroidManifest.xml");
|
|
17125
|
-
if (!import_node_fs16.default.existsSync(manifestFile)) return
|
|
17230
|
+
if (!import_node_fs16.default.existsSync(manifestFile)) return null;
|
|
17126
17231
|
const document = parseXml(import_node_fs16.default.readFileSync(manifestFile, "utf8"), manifestFile);
|
|
17127
17232
|
const manifest = document.children[0];
|
|
17128
17233
|
const application = manifest?.children.find((child) => child.name === "application");
|
|
17129
|
-
if (manifest?.name !== "manifest" || !application) return
|
|
17234
|
+
if (manifest?.name !== "manifest" || !application) return null;
|
|
17130
17235
|
const launchers = launcherActivities(application);
|
|
17131
|
-
if (launchers.length === 0) return
|
|
17236
|
+
if (launchers.length === 0) return null;
|
|
17132
17237
|
for (const set2 of import_node_fs16.default.readdirSync(sourceSets, { withFileTypes: true })) {
|
|
17133
17238
|
const file = import_node_path16.default.join(sourceSets, set2.name, "AndroidManifest.xml");
|
|
17134
17239
|
if (!set2.isDirectory() || set2.name === "main" || !import_node_fs16.default.existsSync(file)) continue;
|
|
@@ -17160,10 +17265,7 @@ function readModuleRootModuleName(moduleRoot) {
|
|
|
17160
17265
|
function readAndroidLauncherRootModuleName(projectRoot) {
|
|
17161
17266
|
const androidRoot = import_node_path16.default.join(projectRoot, "android");
|
|
17162
17267
|
if (!import_node_fs16.default.existsSync(androidRoot)) return void 0;
|
|
17163
|
-
const names = import_node_fs16.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).
|
|
17164
|
-
const name2 = readModuleRootModuleName(import_node_path16.default.join(androidRoot, entry.name));
|
|
17165
|
-
return name2 === void 0 ? [] : [name2];
|
|
17166
|
-
});
|
|
17268
|
+
const names = import_node_fs16.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => readModuleRootModuleName(import_node_path16.default.join(androidRoot, entry.name))).filter((name2) => name2 !== null);
|
|
17167
17269
|
return names.length === 1 ? names[0] : void 0;
|
|
17168
17270
|
}
|
|
17169
17271
|
|
|
@@ -17250,6 +17352,13 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
17250
17352
|
...max === void 0 ? {} : { maxSdkVersion: Number(max) }
|
|
17251
17353
|
});
|
|
17252
17354
|
}
|
|
17355
|
+
let androidPhotoLibraryAddOnly;
|
|
17356
|
+
for (const element of application.children) {
|
|
17357
|
+
if (element.name !== "meta-data" || element.attributes[`${attribute}name`] !== "one.photoLibrary.addOnly")
|
|
17358
|
+
continue;
|
|
17359
|
+
if (/^(?:true|True|TRUE)$/.test(element.attributes[`${attribute}value`]?.trim() ?? ""))
|
|
17360
|
+
androidPhotoLibraryAddOnly = true;
|
|
17361
|
+
}
|
|
17253
17362
|
let label = application.attributes[`${attribute}label`];
|
|
17254
17363
|
let applicationName = null;
|
|
17255
17364
|
if (label && !/\$\{|^[@?]/.test(label)) applicationName = label;
|
|
@@ -17288,7 +17397,8 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
17288
17397
|
buildVersion,
|
|
17289
17398
|
bundleIdentifier,
|
|
17290
17399
|
platform: "android",
|
|
17291
|
-
androidManifestPermissions
|
|
17400
|
+
androidManifestPermissions,
|
|
17401
|
+
...androidPhotoLibraryAddOnly === void 0 ? {} : { androidPhotoLibraryAddOnly }
|
|
17292
17402
|
};
|
|
17293
17403
|
}
|
|
17294
17404
|
function androidMergedResourceValuesDirectory(manifestFile) {
|
|
@@ -17481,7 +17591,7 @@ function parseOpenStepPlist(text2) {
|
|
|
17481
17591
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
17482
17592
|
var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
|
|
17483
17593
|
var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
|
|
17484
|
-
function xcodePathResolver(objects, projectDir,
|
|
17594
|
+
function xcodePathResolver(objects, projectDir, join8) {
|
|
17485
17595
|
const parents = /* @__PURE__ */ new Map();
|
|
17486
17596
|
for (const [id, entry] of Object.entries(objects)) {
|
|
17487
17597
|
if (!isDict(entry)) continue;
|
|
@@ -17499,11 +17609,11 @@ function xcodePathResolver(objects, projectDir, join7) {
|
|
|
17499
17609
|
const own = str(entry.path) ?? "";
|
|
17500
17610
|
const tree = str(entry.sourceTree) ?? "<group>";
|
|
17501
17611
|
if (tree === "<absolute>") result = own;
|
|
17502
|
-
else if (tree === "SOURCE_ROOT") result =
|
|
17612
|
+
else if (tree === "SOURCE_ROOT") result = join8(projectDir, own);
|
|
17503
17613
|
else if (tree === "<group>") {
|
|
17504
17614
|
const parent = parents.get(id);
|
|
17505
17615
|
const base = parent ? resolve5(parent) : projectDir;
|
|
17506
|
-
if (base !== null) result =
|
|
17616
|
+
if (base !== null) result = join8(base, own);
|
|
17507
17617
|
}
|
|
17508
17618
|
}
|
|
17509
17619
|
paths.set(id, result);
|
|
@@ -17511,7 +17621,7 @@ function xcodePathResolver(objects, projectDir, join7) {
|
|
|
17511
17621
|
};
|
|
17512
17622
|
return resolve5;
|
|
17513
17623
|
}
|
|
17514
|
-
function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder,
|
|
17624
|
+
function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, join8, visit3) {
|
|
17515
17625
|
const target = objects[targetId];
|
|
17516
17626
|
if (!isDict(target)) return;
|
|
17517
17627
|
for (const phaseId of list(target.buildPhases)) {
|
|
@@ -17547,7 +17657,7 @@ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, joi
|
|
|
17547
17657
|
for (const relative3 of list(exception.membershipExceptions))
|
|
17548
17658
|
exceptions.add(relative3);
|
|
17549
17659
|
}
|
|
17550
|
-
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(
|
|
17660
|
+
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(join8(folder, relative3)));
|
|
17551
17661
|
for (const file of members) {
|
|
17552
17662
|
const relative3 = file.slice(prefix2.length);
|
|
17553
17663
|
const excepted = [...exceptions].some(
|
|
@@ -17944,7 +18054,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
17944
18054
|
if (resourceUri) {
|
|
17945
18055
|
if (!selectedTarget)
|
|
17946
18056
|
throw new Error("native app icon target membership is unresolved");
|
|
17947
|
-
const
|
|
18057
|
+
const join8 = (base, own) => {
|
|
17948
18058
|
const segments = [];
|
|
17949
18059
|
for (const segment of `${base}/${own}`.split("/")) {
|
|
17950
18060
|
if (segment === "" || segment === ".") continue;
|
|
@@ -17957,7 +18067,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
17957
18067
|
const project = Object.values(objects).find(
|
|
17958
18068
|
(object2) => isRecord(object2) && object2.isa === "PBXProject"
|
|
17959
18069
|
);
|
|
17960
|
-
const projectDir =
|
|
18070
|
+
const projectDir = join8(
|
|
17961
18071
|
pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
|
|
17962
18072
|
isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
|
|
17963
18073
|
);
|
|
@@ -17965,7 +18075,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
17965
18075
|
visitXcodeTargetMembers(
|
|
17966
18076
|
objects,
|
|
17967
18077
|
selectedTarget.id,
|
|
17968
|
-
xcodePathResolver(objects, projectDir,
|
|
18078
|
+
xcodePathResolver(objects, projectDir, join8),
|
|
17969
18079
|
(file) => {
|
|
17970
18080
|
if (Object.hasOwn(files, file)) return [file];
|
|
17971
18081
|
const prefix2 = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
@@ -17973,7 +18083,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
17973
18083
|
(path26) => path26.startsWith(prefix2) && !/(?:^|\/)\./.test(path26.slice(prefix2.length))
|
|
17974
18084
|
);
|
|
17975
18085
|
},
|
|
17976
|
-
|
|
18086
|
+
join8,
|
|
17977
18087
|
(file, kind) => {
|
|
17978
18088
|
if (kind === "resource") resources.add(file);
|
|
17979
18089
|
}
|
|
@@ -18067,26 +18177,221 @@ function extractNativeAppIdentityFromFiles(files, platform, parseInfoPlist, iosT
|
|
|
18067
18177
|
|
|
18068
18178
|
// src/native-app-identity-project.ts
|
|
18069
18179
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18070
|
-
var
|
|
18180
|
+
var import_node_fs21 = __toESM(require("node:fs"), 1);
|
|
18071
18181
|
var import_node_module4 = require("node:module");
|
|
18072
|
-
var
|
|
18182
|
+
var import_node_path22 = __toESM(require("node:path"), 1);
|
|
18073
18183
|
init_is_record();
|
|
18074
18184
|
|
|
18075
18185
|
// src/xcode-project.ts
|
|
18076
18186
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18077
18187
|
var import_node_child_process6 = require("node:child_process");
|
|
18078
|
-
var
|
|
18079
|
-
var
|
|
18080
|
-
var
|
|
18188
|
+
var import_node_crypto8 = require("node:crypto");
|
|
18189
|
+
var import_node_fs20 = __toESM(require("node:fs"), 1);
|
|
18190
|
+
var import_node_path21 = __toESM(require("node:path"), 1);
|
|
18081
18191
|
var import_plist3 = __toESM(require("plist"), 1);
|
|
18082
18192
|
|
|
18083
18193
|
// src/swift-coverage/xcode-assets.ts
|
|
18084
18194
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18085
|
-
|
|
18086
|
-
|
|
18087
|
-
|
|
18088
|
-
|
|
18089
|
-
|
|
18195
|
+
|
|
18196
|
+
// src/swift-coverage/provenance.ts
|
|
18197
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18198
|
+
var import_node_crypto7 = require("node:crypto");
|
|
18199
|
+
var import_node_fs17 = require("node:fs");
|
|
18200
|
+
var import_node_path17 = require("node:path");
|
|
18201
|
+
var SWIFT_COVERAGE_DIGEST_SOURCES = [
|
|
18202
|
+
"swift-coverage/indexdump.ts",
|
|
18203
|
+
"swift-coverage/indexing.ts",
|
|
18204
|
+
"swift-coverage/types.ts",
|
|
18205
|
+
"swift-coverage/source.ts",
|
|
18206
|
+
"swift-coverage/package.ts",
|
|
18207
|
+
"swift-coverage/xcode.ts",
|
|
18208
|
+
"swift-coverage/xcode-assets.ts",
|
|
18209
|
+
"swift-coverage/xcode-asset-symbols.ts",
|
|
18210
|
+
"swift-coverage/xcode-bridging.ts",
|
|
18211
|
+
"swift-coverage/xcode-packages.ts",
|
|
18212
|
+
"swift-coverage/xcode-strings.ts",
|
|
18213
|
+
"swift-coverage/reader.ts",
|
|
18214
|
+
"swift-coverage/provenance.ts",
|
|
18215
|
+
"swift-package-manifest.ts",
|
|
18216
|
+
"swift-package.ts",
|
|
18217
|
+
"swift-source-file.ts",
|
|
18218
|
+
"swift-toolchain.ts",
|
|
18219
|
+
"home-paths.ts",
|
|
18220
|
+
"xcode-header-search.ts",
|
|
18221
|
+
"xcode-project.ts",
|
|
18222
|
+
"xcode-target-members.ts",
|
|
18223
|
+
"xcode-json-project.ts",
|
|
18224
|
+
"openstep-plist.ts"
|
|
18225
|
+
];
|
|
18226
|
+
function swiftCoverageSourceDigests(srcDir) {
|
|
18227
|
+
return Object.fromEntries(
|
|
18228
|
+
SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
|
|
18229
|
+
file,
|
|
18230
|
+
(0, import_node_crypto7.createHash)("sha256").update((0, import_node_fs17.readFileSync)((0, import_node_path17.join)(srcDir, file))).digest("hex")
|
|
18231
|
+
])
|
|
18232
|
+
);
|
|
18233
|
+
}
|
|
18234
|
+
var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0, import_node_path17.join)(__sootsim_import_meta_dirname, ".."));
|
|
18235
|
+
|
|
18236
|
+
// src/swift-coverage/xcode-asset-symbols.ts
|
|
18237
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18238
|
+
var silentTypes = /* @__PURE__ */ new Set([
|
|
18239
|
+
"appiconset",
|
|
18240
|
+
"brandassets",
|
|
18241
|
+
"dataset",
|
|
18242
|
+
"iconset",
|
|
18243
|
+
"iconstack",
|
|
18244
|
+
"iconstackgroup",
|
|
18245
|
+
"launchimage",
|
|
18246
|
+
"stickerpack",
|
|
18247
|
+
"stickersiconset",
|
|
18248
|
+
"textureset"
|
|
18249
|
+
]);
|
|
18250
|
+
var stackTypes = /* @__PURE__ */ new Set(["imagestack", "solidimagestack"]);
|
|
18251
|
+
var unprovenTypes = /* @__PURE__ */ new Set([
|
|
18252
|
+
"arobject",
|
|
18253
|
+
"arreferenceimage",
|
|
18254
|
+
"arresourcegroup",
|
|
18255
|
+
"complicationset",
|
|
18256
|
+
"cubetextureset",
|
|
18257
|
+
"gcdashboardimage",
|
|
18258
|
+
"gcleaderboard",
|
|
18259
|
+
"gcleaderboardset",
|
|
18260
|
+
"glyphset",
|
|
18261
|
+
"iconbadgeset",
|
|
18262
|
+
"iconstacklayer",
|
|
18263
|
+
"imagestacklayer",
|
|
18264
|
+
"mipmapset",
|
|
18265
|
+
"modelset",
|
|
18266
|
+
"sidebariconset",
|
|
18267
|
+
"solidimagestacklayer",
|
|
18268
|
+
"sticker",
|
|
18269
|
+
"stickerframeset",
|
|
18270
|
+
"stickersequence"
|
|
18271
|
+
]);
|
|
18272
|
+
var knownTypes = /* @__PURE__ */ new Set([
|
|
18273
|
+
"colorset",
|
|
18274
|
+
"imageset",
|
|
18275
|
+
"symbolset",
|
|
18276
|
+
"spriteatlas",
|
|
18277
|
+
...silentTypes,
|
|
18278
|
+
...stackTypes,
|
|
18279
|
+
...unprovenTypes
|
|
18280
|
+
]);
|
|
18281
|
+
var compressionTypes = [
|
|
18282
|
+
"automatic",
|
|
18283
|
+
"lossless",
|
|
18284
|
+
"lossy",
|
|
18285
|
+
"gpu-optimized-best",
|
|
18286
|
+
"gpu-optimized-smallest"
|
|
18287
|
+
];
|
|
18288
|
+
var renditionRules = {
|
|
18289
|
+
appearances: "objects",
|
|
18290
|
+
locale: "string",
|
|
18291
|
+
platform: "string",
|
|
18292
|
+
resizing: "object",
|
|
18293
|
+
"alignment-insets": "object",
|
|
18294
|
+
"compression-type": compressionTypes,
|
|
18295
|
+
"display-gamut": ["sRGB", "display-P3"],
|
|
18296
|
+
"minimum-system-version": "string",
|
|
18297
|
+
"matching-style": "string",
|
|
18298
|
+
"template-rendering-intent": "string",
|
|
18299
|
+
size: "string",
|
|
18300
|
+
role: "string",
|
|
18301
|
+
orientation: "string",
|
|
18302
|
+
extent: "string"
|
|
18303
|
+
};
|
|
18304
|
+
var setRules = {
|
|
18305
|
+
localizable: "any",
|
|
18306
|
+
"auto-scaling": "string",
|
|
18307
|
+
"symbol-rendering-intent": "string",
|
|
18308
|
+
"provides-namespace": "any",
|
|
18309
|
+
"on-demand-resource-tags": "any",
|
|
18310
|
+
"template-rendering-intent": "string",
|
|
18311
|
+
"preserves-vector-representation": "any"
|
|
18312
|
+
};
|
|
18313
|
+
var inclusionRules = {
|
|
18314
|
+
idiom: "any",
|
|
18315
|
+
subtype: "any",
|
|
18316
|
+
unassigned: "any"
|
|
18317
|
+
};
|
|
18318
|
+
var rules = {
|
|
18319
|
+
// colors check none of the image traits
|
|
18320
|
+
colorset: {
|
|
18321
|
+
entry: {
|
|
18322
|
+
...renditionRules,
|
|
18323
|
+
...inclusionRules,
|
|
18324
|
+
color: "any",
|
|
18325
|
+
scale: "string",
|
|
18326
|
+
"language-direction": "string",
|
|
18327
|
+
"width-class": "string",
|
|
18328
|
+
"height-class": "string",
|
|
18329
|
+
memory: "string",
|
|
18330
|
+
"graphics-feature-set": "string",
|
|
18331
|
+
"screen-width": "string"
|
|
18332
|
+
},
|
|
18333
|
+
set: setRules
|
|
18334
|
+
},
|
|
18335
|
+
imageset: {
|
|
18336
|
+
entry: {
|
|
18337
|
+
...renditionRules,
|
|
18338
|
+
...inclusionRules,
|
|
18339
|
+
filename: "any",
|
|
18340
|
+
scale: ["1x", "2x", "3x"],
|
|
18341
|
+
"language-direction": ["left-to-right", "right-to-left"],
|
|
18342
|
+
"width-class": ["compact", "regular", "unspecified"],
|
|
18343
|
+
"height-class": ["compact", "regular"],
|
|
18344
|
+
memory: ["1GB", "2GB", "3GB", "4GB", "6GB", "8GB", "12GB", "16GB"],
|
|
18345
|
+
"graphics-feature-set": [
|
|
18346
|
+
...Array.from({ length: 10 }, (_, i) => `apple${i + 1}`),
|
|
18347
|
+
"metal1v2",
|
|
18348
|
+
"metal2v2",
|
|
18349
|
+
"metal3v1",
|
|
18350
|
+
"metal3v2",
|
|
18351
|
+
"metal4v1"
|
|
18352
|
+
],
|
|
18353
|
+
"screen-width": "string"
|
|
18354
|
+
},
|
|
18355
|
+
// an image whose vector flag is not a boolean is dropped
|
|
18356
|
+
set: {
|
|
18357
|
+
...setRules,
|
|
18358
|
+
"preserves-vector-representation": "boolean",
|
|
18359
|
+
"compression-type": compressionTypes
|
|
18360
|
+
}
|
|
18361
|
+
},
|
|
18362
|
+
symbolset: {
|
|
18363
|
+
entry: { idiom: "any", filename: "any" },
|
|
18364
|
+
set: { "symbol-rendering-intent": "any" }
|
|
18365
|
+
}
|
|
18366
|
+
};
|
|
18367
|
+
var swiftKeywords = new Set(
|
|
18368
|
+
"precedencegroup associatedtype fileprivate fallthrough extension typealias subscript continue internal Protocol protocol operator rethrows private default public static switch return throws repeat struct deinit import guard while where false catch break defer super class inout throw func Type case else true Self self enum init nil var for let Any try if in do as is _".split(
|
|
18369
|
+
" "
|
|
18370
|
+
)
|
|
18371
|
+
);
|
|
18372
|
+
var nsColorConflicts = new Set(
|
|
18373
|
+
"unemphasizedSelectedContentBackgroundColor unemphasizedSelectedTextBackgroundColor controlAlternatingRowBackgroundColors alternatingContentBackgroundColors systemColorsDidChangeNotification alternateSelectedControlTextColor selectedContentBackgroundColor alternateSelectedControlColor secondarySelectedControlColor unemphasizedSelectedTextColor selectedTextBackgroundColor keyboardFocusIndicatorColor scrubberTexturedBackground controlLightHighlightColor selectedMenuItemTextColor underPageBackgroundColor disabledControlTextColor selectedControlTextColor controlBackgroundColor controlDarkShadowColor windowBackgroundColor selectedMenuItemColor controlHighlightColor quaternaryLabelColor selectedControlColor windowFrameTextColor placeholderTextColor textBackgroundColor secondaryLabelColor tertiaryLabelColor findHighlightColor controlAccentColor controlShadowColor currentControlTint selectedKnobColor selectedTextColor windowFrameColor controlTextColor headerTextColor scrollBarColor separatorColor highlightColor ignoresAlpha systemOrange systemPurple systemIndigo controlColor systemYellow systemGreen systemBrown headerColor shadowColor systemBlue systemPink systemTeal systemCyan labelColor systemMint systemGray systemRed knobColor gridColor linkColor textColor lightGray darkGray magenta orange purple yellow white black green brown clear blue cyan gray red".split(
|
|
18374
|
+
" "
|
|
18375
|
+
)
|
|
18376
|
+
);
|
|
18377
|
+
var uiColorConflicts = new Set(
|
|
18378
|
+
"secondarySystemGroupedBackground tertiarySystemGroupedBackground secondarySystemBackground tertiarySystemBackground groupTableViewBackground systemGroupedBackground quaternarySystemFill smallSystemFontSize secondarySystemFill tertiarySystemFill systemBackground quaternaryLabel opaqueSeparator placeholderText systemFontSize buttonFontSize secondaryLabel labelFontSize tertiaryLabel systemOrange systemPurple systemIndigo systemYellow systemGray2 systemGray3 systemGray4 systemGray5 systemGray6 systemGreen systemBrown systemBlue systemPink systemTeal systemFill systemCyan systemMint systemGray systemRed tintColor separator lightText lightGray darkText darkGray magenta orange purple yellow white black label green brown clear blue link cyan gray red".split(
|
|
18379
|
+
" "
|
|
18380
|
+
)
|
|
18381
|
+
);
|
|
18382
|
+
var colorConflicts = new Set(
|
|
18383
|
+
"transferRepresentation accentColor secondary primary orange purple indigo yellow white black green brown clear blue pink teal cyan mint gray red".split(
|
|
18384
|
+
" "
|
|
18385
|
+
)
|
|
18386
|
+
);
|
|
18387
|
+
var nsImageConflicts = new Set(
|
|
18388
|
+
"touchBarAudioOutputVolumeMediumTemplateName touchBarAudioOutputVolumeHighTemplateName touchBarAudioOutputVolumeOffTemplateName touchBarAudioOutputVolumeLowTemplateName touchBarTextJustifiedAlignTemplateName touchBarCommunicationVideoTemplateName touchBarCommunicationAudioTemplateName touchBarSkipAhead30SecondsTemplateName touchBarSkipAhead15SecondsTemplateName touchBarTextStrikethroughTemplateName touchBarSkipBack30SecondsTemplateName touchBarSkipBack15SecondsTemplateName stopProgressFreestandingTemplateName touchBarAudioOutputMuteTemplateName invalidDataFreestandingTemplateName touchBarEnterFullScreenTemplateName touchBarTextCenterAlignTemplateName touchBarAudioInputMuteTemplateName followLinkFreestandingTemplateName touchBarExitFullScreenTemplateName touchBarTextRightAlignTemplateName touchBarTextUnderlineTemplateName touchBarTextLeftAlignTemplateName touchBarOpenInBrowserTemplateName touchBarFolderMoveToTemplateName touchBarFolderCopyToTemplateName touchBarFastForwardTemplateName rightFacingTriangleTemplateName refreshFreestandingTemplateName touchBarRotateRightTemplateName touchBarRecordStartTemplateName touchBarSkipToStartTemplateName touchBarTextItalicTemplateName touchBarNewMessageTemplateName leftFacingTriangleTemplateName revealFreestandingTemplateName touchBarVolumeDownTemplateName touchBarRecordStopTemplateName touchBarRotateLeftTemplateName touchBarAudioInputTemplateName touchBarColorPickerStrokeName touchBarSkipAheadTemplateName touchBarSkipToEndTemplateName touchBarGoForwardTemplateName touchBarPlayPauseTemplateName touchBarQuickLookTemplateName touchBarAddDetailTemplateName touchBarUserGroupTemplateName touchBarNewFolderTemplateName touchBarBookmarksTemplateName touchBarSlideshowTemplateName statusPartiallyAvailableName touchBarPlayheadTemplateName touchBarDownloadTemplateName touchBarTextBoldTemplateName touchBarSkipBackTemplateName touchBarVolumeUpTemplateName touchBarTextListTemplateName touchBarIconViewTemplateName touchBarListViewTemplateName touchBarUserAddTemplateName touchBarComposeTemplateName touchBarRefreshTemplateName enterFullScreenTemplateName touchBarTagIconTemplateName touchBarGetInfoTemplateName touchBarSidebarTemplateName touchBarTextBoxTemplateName touchBarHistoryTemplateName touchBarColorPickerFillName touchBarColorPickerFontName touchBarRewindTemplateName menuMixedStateTemplateName touchBarDeleteTemplateName touchBarRemoveTemplateName touchBarSearchTemplateName touchBarGoBackTemplateName exitFullScreenTemplateName touchBarGoDownTemplateName touchBarFolderTemplateName touchBarShareTemplateName touchBarPauseTemplateName touchBarAlarmTemplateName lockUnlockedTemplateName touchBarMailTemplateName touchBarGoUpTemplateName touchBarUserTemplateName iChatTheaterTemplateName stopProgressTemplateName touchBarPlayTemplateName touchBarAddTemplateName menuOnStateTemplateName lockLockedTemplateName smartBadgeTemplateName columnViewTemplateName preferencesGeneralName statusUnavailableName goForwardTemplateName bluetoothTemplateName quickLookTemplateName bookmarksTemplateName slideshowTemplateName multipleDocumentsName iconViewTemplateName listViewTemplateName flowViewTemplateName imageUnfilteredTypes statusAvailableName refreshTemplateName goRightTemplateName applicationIconName folderBurnableName removeTemplateName goBackTemplateName actionTemplateName goLeftTemplateName shareTemplateName homeTemplateName pathTemplateName userAccountsName addTemplateName folderSmartName statusNoneName colorPanelName trashEmptyName fontPanelName trashFullName userGroupName userGuestName advancedName mobileMeName everyoneName computerName networkName cautionName bonjourName folderName imageTypes infoName userName".split(
|
|
18389
|
+
" "
|
|
18390
|
+
)
|
|
18391
|
+
);
|
|
18392
|
+
|
|
18393
|
+
// src/swift-coverage/xcode-assets.ts
|
|
18394
|
+
var unprovenAssetSettings = [
|
|
18090
18395
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
|
|
18091
18396
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
|
|
18092
18397
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_ERRORS",
|
|
@@ -18095,10 +18400,16 @@ var assetSymbolSettingKeys = [
|
|
|
18095
18400
|
"ASSETCATALOG_COMPILER_GENERATE_OBJC_ASSET_SYMBOLS_PATH",
|
|
18096
18401
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_INDEX_PATH",
|
|
18097
18402
|
"ASSETCATALOG_COMPILER_BUNDLE_IDENTIFIER",
|
|
18098
|
-
"ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
|
|
18403
|
+
"ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
|
|
18404
|
+
];
|
|
18405
|
+
var assetSymbolSettingKeys = [
|
|
18406
|
+
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS",
|
|
18407
|
+
"ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS",
|
|
18408
|
+
"PRODUCT_BUNDLE_IDENTIFIER",
|
|
18409
|
+
"TARGETED_DEVICE_FAMILY",
|
|
18410
|
+
...unprovenAssetSettings,
|
|
18099
18411
|
"ASSETCATALOG_OTHER_FLAGS"
|
|
18100
18412
|
];
|
|
18101
|
-
var unprovenAssetSettings = assetSymbolSettingKeys.slice(4).filter((key) => key !== "ASSETCATALOG_OTHER_FLAGS");
|
|
18102
18413
|
|
|
18103
18414
|
// src/swift-package.ts
|
|
18104
18415
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -18146,19 +18457,19 @@ function swiftPackageIdentity(url) {
|
|
|
18146
18457
|
// src/swift-package-manifest.ts
|
|
18147
18458
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18148
18459
|
var import_node_child_process5 = require("node:child_process");
|
|
18149
|
-
var
|
|
18460
|
+
var import_node_fs19 = __toESM(require("node:fs"), 1);
|
|
18150
18461
|
var import_node_os5 = __toESM(require("node:os"), 1);
|
|
18151
|
-
var
|
|
18462
|
+
var import_node_path19 = __toESM(require("node:path"), 1);
|
|
18152
18463
|
init_home_paths();
|
|
18153
18464
|
|
|
18154
18465
|
// src/swift-distribution.lock.json
|
|
18155
18466
|
var swift_distribution_lock_default = {
|
|
18156
|
-
id: "
|
|
18157
|
-
release: "swift-6.4.0-RELEASE-custom-
|
|
18158
|
-
wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-
|
|
18159
|
-
wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-
|
|
18160
|
-
wasmSdkChecksum: "
|
|
18161
|
-
source: "
|
|
18467
|
+
id: "c1636d7b2e11fc76",
|
|
18468
|
+
release: "swift-6.4.0-RELEASE-custom-81b2c791c27276bf",
|
|
18469
|
+
wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-b26c1c1d",
|
|
18470
|
+
wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-b26c1c1d.artifactbundle.tar.gz",
|
|
18471
|
+
wasmSdkChecksum: "d3bec118d62c1015e0a2b30e0f09b8fab25613d0ac98e0dee31e68c5521bc747",
|
|
18472
|
+
source: "94f583e01ad78e91cc0908a829b83ab756ac6a12",
|
|
18162
18473
|
targets: [
|
|
18163
18474
|
"ImagePlayground",
|
|
18164
18475
|
"QuickLookThumbnailing",
|
|
@@ -18169,6 +18480,7 @@ var swift_distribution_lock_default = {
|
|
|
18169
18480
|
"GeoToolbox",
|
|
18170
18481
|
"DataDetection",
|
|
18171
18482
|
"Accessibility",
|
|
18483
|
+
"Accounts",
|
|
18172
18484
|
"Contacts",
|
|
18173
18485
|
"CoreML",
|
|
18174
18486
|
"EventKit",
|
|
@@ -18198,6 +18510,7 @@ var swift_distribution_lock_default = {
|
|
|
18198
18510
|
"PeachFoundation",
|
|
18199
18511
|
"FoundationNetworking",
|
|
18200
18512
|
"DeveloperToolsSupport",
|
|
18513
|
+
"CoreImageEnums",
|
|
18201
18514
|
"SwiftUI",
|
|
18202
18515
|
"DarwinRecords",
|
|
18203
18516
|
"Darwin",
|
|
@@ -18307,6 +18620,7 @@ var swift_distribution_lock_default = {
|
|
|
18307
18620
|
"FoundationModels",
|
|
18308
18621
|
"CoreTransferable",
|
|
18309
18622
|
"AudioToolbox",
|
|
18623
|
+
"MediaToolbox",
|
|
18310
18624
|
"CoreAudioTypes",
|
|
18311
18625
|
"AudioUnit",
|
|
18312
18626
|
"Intents",
|
|
@@ -18329,11 +18643,13 @@ var swift_distribution_lock_default = {
|
|
|
18329
18643
|
],
|
|
18330
18644
|
systemEnvironment: {
|
|
18331
18645
|
scenePhase: ["string:active", "string:inactive", "string:background"],
|
|
18332
|
-
colorScheme: ["string:light", "string:dark"],
|
|
18333
|
-
semanticColors: ["object"],
|
|
18334
18646
|
deviceModel: ["string"],
|
|
18335
18647
|
systemName: ["string"],
|
|
18336
18648
|
systemVersion: ["string"],
|
|
18649
|
+
screenMetrics: ["array"],
|
|
18650
|
+
colorScheme: ["string:light", "string:dark"],
|
|
18651
|
+
semanticColors: ["object"],
|
|
18652
|
+
imageAssets: ["object"],
|
|
18337
18653
|
locale: ["string"],
|
|
18338
18654
|
dynamicTypeSize: [
|
|
18339
18655
|
"string:xSmall",
|
|
@@ -18349,51 +18665,88 @@ var swift_distribution_lock_default = {
|
|
|
18349
18665
|
"string:accessibility4",
|
|
18350
18666
|
"string:accessibility5"
|
|
18351
18667
|
],
|
|
18352
|
-
accessibilityReduceMotion: ["bool"],
|
|
18353
18668
|
horizontalSizeClass: ["string:compact", "string:regular"],
|
|
18354
18669
|
verticalSizeClass: ["string:compact", "string:regular"],
|
|
18355
|
-
|
|
18670
|
+
accessibilityReduceMotion: ["bool"]
|
|
18356
18671
|
},
|
|
18357
18672
|
hosts: {
|
|
18358
18673
|
"darwin-arm64": {
|
|
18359
|
-
sha256: "
|
|
18360
|
-
size:
|
|
18674
|
+
sha256: "80c62efc0a94a3cd8e6aa69c5fc4e6af3f2ceae1287623709e28dc9ae3a0761c",
|
|
18675
|
+
size: 89408081
|
|
18361
18676
|
},
|
|
18362
18677
|
"linux-x64": {
|
|
18363
|
-
sha256: "
|
|
18364
|
-
size:
|
|
18678
|
+
sha256: "373b6d83663204d3a5e185367695b0e93e60d4d7f501277fc5644e2928039c2a",
|
|
18679
|
+
size: 92125337
|
|
18365
18680
|
},
|
|
18366
18681
|
"linux-arm64": {
|
|
18367
|
-
sha256: "
|
|
18368
|
-
size:
|
|
18682
|
+
sha256: "86297691a209a83adda674d397ec26d5284e7c283c30f60b4dcd13329ded7b94",
|
|
18683
|
+
size: 91619555
|
|
18369
18684
|
}
|
|
18370
18685
|
}
|
|
18371
18686
|
};
|
|
18372
18687
|
|
|
18373
18688
|
// src/swift-toolchain.ts
|
|
18374
18689
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18375
|
-
var
|
|
18690
|
+
var import_node_fs18 = __toESM(require("node:fs"), 1);
|
|
18376
18691
|
var import_node_os4 = __toESM(require("node:os"), 1);
|
|
18377
|
-
var
|
|
18692
|
+
var import_node_path18 = __toESM(require("node:path"), 1);
|
|
18693
|
+
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
18694
|
+
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
18695
|
+
var compilerArchives = {
|
|
18696
|
+
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
18697
|
+
identity: "0b2d0a9011c88e66",
|
|
18698
|
+
hosts: {
|
|
18699
|
+
"darwin-arm64": {
|
|
18700
|
+
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
18701
|
+
manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
|
|
18702
|
+
},
|
|
18703
|
+
"linux-x64": {
|
|
18704
|
+
checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
|
|
18705
|
+
manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
|
|
18706
|
+
},
|
|
18707
|
+
"linux-arm64": {
|
|
18708
|
+
checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
|
|
18709
|
+
manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
|
|
18710
|
+
}
|
|
18711
|
+
}
|
|
18712
|
+
},
|
|
18713
|
+
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
18714
|
+
identity: SWIFT_HOST_COMPILER_ID,
|
|
18715
|
+
hosts: {
|
|
18716
|
+
"darwin-arm64": {
|
|
18717
|
+
checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
|
|
18718
|
+
manifest: "a26eb9cb4fbd1dbd7faac20cced1ec5e67745bd358aa1180cc4abc1a0d21d6e6"
|
|
18719
|
+
},
|
|
18720
|
+
"linux-x64": {
|
|
18721
|
+
checksum: "ea63bbdecae14ff8e9e3f535b521fedc65d51b31521c5d10cc332cb91882d058",
|
|
18722
|
+
manifest: "b22b321ce3eb3fe044fa2122484a15c061f262c45d88a05b3fbace0a5bf038b6"
|
|
18723
|
+
},
|
|
18724
|
+
"linux-arm64": {
|
|
18725
|
+
checksum: "3eef4ed57830908515d8def2882e312f7cabeea57ccda5b2a7585401ef98cc48",
|
|
18726
|
+
manifest: "cfab342b8090fa83a697a391a7563cba14b771c24f07e1f8e19977f913ac88be"
|
|
18727
|
+
}
|
|
18728
|
+
}
|
|
18729
|
+
}
|
|
18730
|
+
};
|
|
18378
18731
|
function swiftToolchainBin(release) {
|
|
18379
18732
|
if (process.platform === "darwin") {
|
|
18380
18733
|
const dirs = [import_node_os4.default.homedir(), "/"].map(
|
|
18381
|
-
(base) =>
|
|
18734
|
+
(base) => import_node_path18.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
|
|
18382
18735
|
);
|
|
18383
|
-
return dirs.find((dir) =>
|
|
18736
|
+
return dirs.find((dir) => import_node_fs18.default.existsSync(import_node_path18.default.join(dir, "swift"))) ?? dirs[0];
|
|
18384
18737
|
}
|
|
18385
18738
|
if (process.env.CONTRAST_SWIFT_TOOLCHAINS) {
|
|
18386
|
-
return
|
|
18739
|
+
return import_node_path18.default.join(process.env.CONTRAST_SWIFT_TOOLCHAINS, release, "usr/bin");
|
|
18387
18740
|
}
|
|
18388
|
-
const image =
|
|
18389
|
-
if (
|
|
18741
|
+
const image = import_node_path18.default.join("/opt/swift", release, "usr/bin");
|
|
18742
|
+
if (import_node_fs18.default.existsSync(import_node_path18.default.join(image, "swift"))) return image;
|
|
18390
18743
|
if (release.includes("-custom-"))
|
|
18391
|
-
return
|
|
18392
|
-
return (process.env.PATH ?? "").split(
|
|
18744
|
+
return import_node_path18.default.join(peachHome(), "swift", "toolchains", release, "usr/bin");
|
|
18745
|
+
return (process.env.PATH ?? "").split(import_node_path18.default.delimiter).find((dir) => dir && import_node_fs18.default.existsSync(import_node_path18.default.join(dir, "swift"))) ?? image;
|
|
18393
18746
|
}
|
|
18394
18747
|
function peachHome() {
|
|
18395
18748
|
const override = process.env.PEACH_HOME;
|
|
18396
|
-
return override ?
|
|
18749
|
+
return override ? import_node_path18.default.resolve(override) : import_node_path18.default.join(import_node_os4.default.homedir(), ".peach");
|
|
18397
18750
|
}
|
|
18398
18751
|
var scratch;
|
|
18399
18752
|
function swiftEnvironment(base = process.env) {
|
|
@@ -18401,18 +18754,23 @@ function swiftEnvironment(base = process.env) {
|
|
|
18401
18754
|
return {
|
|
18402
18755
|
...base,
|
|
18403
18756
|
TMPDIR: scratch.directory,
|
|
18404
|
-
XDG_CONFIG_HOME:
|
|
18405
|
-
XDG_CACHE_HOME:
|
|
18406
|
-
XDG_DATA_HOME:
|
|
18757
|
+
XDG_CONFIG_HOME: import_node_path18.default.join(scratch.home, ".config"),
|
|
18758
|
+
XDG_CACHE_HOME: import_node_path18.default.join(scratch.home, ".cache"),
|
|
18759
|
+
XDG_DATA_HOME: import_node_path18.default.join(scratch.home, ".local", "share"),
|
|
18407
18760
|
...process.platform === "linux" ? { HOME: scratch.home } : {}
|
|
18408
18761
|
};
|
|
18409
18762
|
}
|
|
18410
18763
|
|
|
18411
18764
|
// src/swift-package-manifest.ts
|
|
18412
18765
|
function swiftCommand() {
|
|
18413
|
-
return
|
|
18766
|
+
return import_node_path19.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
|
|
18414
18767
|
}
|
|
18415
|
-
|
|
18768
|
+
function swiftPackageFailure(error) {
|
|
18769
|
+
if (!(error instanceof Error)) return String(error);
|
|
18770
|
+
const stderr = "stderr" in error && (typeof error.stderr === "string" || Buffer.isBuffer(error.stderr)) ? error.stderr.toString().trim() : "";
|
|
18771
|
+
return stderr || error.message;
|
|
18772
|
+
}
|
|
18773
|
+
var cacheDir2 = import_node_path19.default.join(cacheDir(), "swift-manifests");
|
|
18416
18774
|
var requirementClause = (item) => {
|
|
18417
18775
|
const url = JSON.stringify(item.url);
|
|
18418
18776
|
const requirement = item.requirement;
|
|
@@ -18452,9 +18810,9 @@ let package = Package(
|
|
|
18452
18810
|
]
|
|
18453
18811
|
)
|
|
18454
18812
|
`;
|
|
18455
|
-
const dir =
|
|
18813
|
+
const dir = import_node_fs19.default.mkdtempSync(import_node_path19.default.join(import_node_os5.default.tmpdir(), "peach-resolve-"));
|
|
18456
18814
|
try {
|
|
18457
|
-
|
|
18815
|
+
import_node_fs19.default.writeFileSync(import_node_path19.default.join(dir, "Package.swift"), manifest);
|
|
18458
18816
|
try {
|
|
18459
18817
|
(0, import_node_child_process5.execFileSync)(
|
|
18460
18818
|
swiftCommand(),
|
|
@@ -18464,7 +18822,7 @@ let package = Package(
|
|
|
18464
18822
|
"--package-path",
|
|
18465
18823
|
dir,
|
|
18466
18824
|
"--scratch-path",
|
|
18467
|
-
|
|
18825
|
+
import_node_path19.default.join(dir, ".build"),
|
|
18468
18826
|
"resolve"
|
|
18469
18827
|
],
|
|
18470
18828
|
{
|
|
@@ -18475,24 +18833,24 @@ let package = Package(
|
|
|
18475
18833
|
}
|
|
18476
18834
|
);
|
|
18477
18835
|
} catch (error) {
|
|
18478
|
-
const stderr = error instanceof Error && "stderr" in error ? String(error.stderr).trim() : "";
|
|
18479
18836
|
throw new Error(
|
|
18480
|
-
`swiftpm could not resolve ${clauses.length} package requirements${
|
|
18837
|
+
`swiftpm could not resolve ${clauses.length} package requirements (${clauses.join(", ")}): ${swiftPackageFailure(error)}`,
|
|
18838
|
+
{ cause: error }
|
|
18481
18839
|
);
|
|
18482
18840
|
}
|
|
18483
|
-
const resolved =
|
|
18484
|
-
if (!
|
|
18841
|
+
const resolved = import_node_path19.default.join(dir, "Package.resolved");
|
|
18842
|
+
if (!import_node_fs19.default.existsSync(resolved))
|
|
18485
18843
|
throw new Error("swift package resolve wrote no Package.resolved");
|
|
18486
|
-
|
|
18487
|
-
|
|
18844
|
+
import_node_fs19.default.mkdirSync(import_node_path19.default.dirname(destination), { recursive: true });
|
|
18845
|
+
import_node_fs19.default.copyFileSync(resolved, destination);
|
|
18488
18846
|
} finally {
|
|
18489
|
-
|
|
18847
|
+
import_node_fs19.default.rmSync(dir, { recursive: true, force: true });
|
|
18490
18848
|
}
|
|
18491
18849
|
}
|
|
18492
18850
|
|
|
18493
18851
|
// src/xcode-json-project.ts
|
|
18494
18852
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
18495
|
-
var
|
|
18853
|
+
var import_node_path20 = __toESM(require("node:path"), 1);
|
|
18496
18854
|
var import_json52 = __toESM(require_lib(), 1);
|
|
18497
18855
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18498
18856
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -18550,7 +18908,7 @@ var PHASE_ISA = {
|
|
|
18550
18908
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
18551
18909
|
const json = import_json52.default.parse(source);
|
|
18552
18910
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
18553
|
-
const projectDir =
|
|
18911
|
+
const projectDir = import_node_path20.default.dirname(xcodeproj);
|
|
18554
18912
|
const objects = {};
|
|
18555
18913
|
let next = 0;
|
|
18556
18914
|
const add = (entry, id) => {
|
|
@@ -18563,7 +18921,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
18563
18921
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
18564
18922
|
if (base) {
|
|
18565
18923
|
if (base[1] === "PROJECT")
|
|
18566
|
-
return { sourceTree: "<absolute>", path:
|
|
18924
|
+
return { sourceTree: "<absolute>", path: import_node_path20.default.join(projectDir, base[2]) };
|
|
18567
18925
|
if (base[1] === "PRODUCTS")
|
|
18568
18926
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
18569
18927
|
return null;
|
|
@@ -18571,7 +18929,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
18571
18929
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
18572
18930
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
18573
18931
|
if (unescaped.startsWith("~")) return null;
|
|
18574
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
18932
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path20.default.join(groupDir, unescaped) };
|
|
18575
18933
|
};
|
|
18576
18934
|
const memberships = [];
|
|
18577
18935
|
const folders = [];
|
|
@@ -18582,7 +18940,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
18582
18940
|
const kind = text(entry.kind) ?? "file-reference";
|
|
18583
18941
|
const raw = text(entry.path) ?? "";
|
|
18584
18942
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
18585
|
-
const name2 = text(entry.name) ??
|
|
18943
|
+
const name2 = text(entry.name) ?? import_node_path20.default.basename(raw);
|
|
18586
18944
|
const node = { id: "", name: name2, dir: null, parent, children: [] };
|
|
18587
18945
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
18588
18946
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -18703,7 +19061,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
18703
19061
|
if (!isObject(entry)) continue;
|
|
18704
19062
|
const repository = text(entry.repository);
|
|
18705
19063
|
const local = text(entry.path);
|
|
18706
|
-
const name2 = local !== void 0 ?
|
|
19064
|
+
const name2 = local !== void 0 ? import_node_path20.default.basename(import_node_path20.default.resolve(import_node_path20.default.dirname(xcodeproj), local)) : import_node_path20.default.basename(repository ?? "").replace(/\.git$/, "");
|
|
18707
19065
|
const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
18708
19066
|
isa: "XCRemoteSwiftPackageReference",
|
|
18709
19067
|
repositoryURL: repository ?? "",
|
|
@@ -18878,7 +19236,23 @@ function isJsonObject(value) {
|
|
|
18878
19236
|
|
|
18879
19237
|
// src/xcode-project.ts
|
|
18880
19238
|
var XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = "27.0";
|
|
19239
|
+
var CXX_STANDARD_ALIASES = {
|
|
19240
|
+
"c++0x": "c++11",
|
|
19241
|
+
"gnu++0x": "gnu++11"
|
|
19242
|
+
};
|
|
19243
|
+
var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
|
|
19244
|
+
"c++98",
|
|
19245
|
+
"gnu++98",
|
|
19246
|
+
"c++0x",
|
|
19247
|
+
"gnu++0x",
|
|
19248
|
+
"c++14",
|
|
19249
|
+
"gnu++14",
|
|
19250
|
+
"c++17",
|
|
19251
|
+
"gnu++17",
|
|
19252
|
+
"compiler-default"
|
|
19253
|
+
]);
|
|
18881
19254
|
var APPLICATION = "com.apple.product-type.application";
|
|
19255
|
+
var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
|
|
18882
19256
|
var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
|
|
18883
19257
|
"com.apple.product-type.framework",
|
|
18884
19258
|
"com.apple.product-type.framework.static"
|
|
@@ -18896,28 +19270,28 @@ var CONDITIONS = {
|
|
|
18896
19270
|
variant: "normal"
|
|
18897
19271
|
};
|
|
18898
19272
|
function walkFiles(dir) {
|
|
18899
|
-
if (!
|
|
19273
|
+
if (!import_node_fs20.default.existsSync(dir)) return [];
|
|
18900
19274
|
const out = [];
|
|
18901
|
-
for (const entry of
|
|
19275
|
+
for (const entry of import_node_fs20.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
18902
19276
|
if (entry.name.startsWith(".")) continue;
|
|
18903
|
-
const full =
|
|
19277
|
+
const full = import_node_path21.default.join(dir, entry.name);
|
|
18904
19278
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
18905
19279
|
else if (entry.isFile()) out.push(full);
|
|
18906
19280
|
}
|
|
18907
19281
|
return out;
|
|
18908
19282
|
}
|
|
18909
|
-
var isDirectory = (dir) =>
|
|
19283
|
+
var isDirectory = (dir) => import_node_fs20.default.existsSync(dir) && import_node_fs20.default.statSync(dir).isDirectory();
|
|
18910
19284
|
function readXcconfig(file, read) {
|
|
18911
|
-
if (read.includes(file) || !
|
|
19285
|
+
if (read.includes(file) || !import_node_fs20.default.existsSync(file)) return {};
|
|
18912
19286
|
read.push(file);
|
|
18913
19287
|
const settings = {};
|
|
18914
|
-
for (const raw of
|
|
19288
|
+
for (const raw of import_node_fs20.default.readFileSync(file, "utf8").split("\n")) {
|
|
18915
19289
|
const line = raw.replace(/\/\/.*$/, "").trim();
|
|
18916
19290
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
18917
19291
|
if (include) {
|
|
18918
19292
|
Object.assign(
|
|
18919
19293
|
settings,
|
|
18920
|
-
readXcconfig(
|
|
19294
|
+
readXcconfig(import_node_path21.default.resolve(import_node_path21.default.dirname(file), include[1]), read)
|
|
18921
19295
|
);
|
|
18922
19296
|
continue;
|
|
18923
19297
|
}
|
|
@@ -18967,22 +19341,22 @@ function decodeXml(text2) {
|
|
|
18967
19341
|
return text2.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
18968
19342
|
}
|
|
18969
19343
|
function workspaceReferences(workspace) {
|
|
18970
|
-
const data =
|
|
18971
|
-
if (!
|
|
19344
|
+
const data = import_node_path21.default.join(workspace, "contents.xcworkspacedata");
|
|
19345
|
+
if (!import_node_fs20.default.existsSync(data))
|
|
18972
19346
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
18973
|
-
const container =
|
|
19347
|
+
const container = import_node_path21.default.dirname(workspace);
|
|
18974
19348
|
const locate = (location, base) => {
|
|
18975
19349
|
const colon = location.indexOf(":");
|
|
18976
19350
|
const kind = location.slice(0, colon);
|
|
18977
19351
|
const rest = location.slice(colon + 1);
|
|
18978
|
-
if (kind === "group") return
|
|
18979
|
-
if (kind === "container" || kind === "self") return
|
|
18980
|
-
if (kind === "absolute") return
|
|
18981
|
-
throw new Error(`${
|
|
19352
|
+
if (kind === "group") return import_node_path21.default.resolve(base, rest);
|
|
19353
|
+
if (kind === "container" || kind === "self") return import_node_path21.default.resolve(container, rest);
|
|
19354
|
+
if (kind === "absolute") return import_node_path21.default.resolve(rest);
|
|
19355
|
+
throw new Error(`${import_node_path21.default.basename(workspace)} has an unsupported location ${location}`);
|
|
18982
19356
|
};
|
|
18983
19357
|
const groups = [container];
|
|
18984
19358
|
const references = [];
|
|
18985
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
19359
|
+
for (const [, closing, tag, attributes, selfClosing] of import_node_fs20.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
18986
19360
|
if (closing) {
|
|
18987
19361
|
if (tag === "Group") groups.pop();
|
|
18988
19362
|
continue;
|
|
@@ -19033,8 +19407,8 @@ function remotePackageRequirements(projects) {
|
|
|
19033
19407
|
var loaded2 = /* @__PURE__ */ new Map();
|
|
19034
19408
|
function xcodeProjectFile(xcodeproj) {
|
|
19035
19409
|
for (const name2 of ["project.pbxproj", "project.xcproj"]) {
|
|
19036
|
-
const file =
|
|
19037
|
-
if (
|
|
19410
|
+
const file = import_node_path21.default.join(xcodeproj, name2);
|
|
19411
|
+
if (import_node_fs20.default.existsSync(file)) return file;
|
|
19038
19412
|
}
|
|
19039
19413
|
return null;
|
|
19040
19414
|
}
|
|
@@ -19042,8 +19416,8 @@ function loadProject(xcodeproj) {
|
|
|
19042
19416
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
19043
19417
|
if (!projectFile)
|
|
19044
19418
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
19045
|
-
const source =
|
|
19046
|
-
const digest = (0,
|
|
19419
|
+
const source = import_node_fs20.default.readFileSync(projectFile, "utf8");
|
|
19420
|
+
const digest = (0, import_node_crypto8.createHash)("sha256").update(source).digest("hex");
|
|
19047
19421
|
const cached2 = loaded2.get(projectFile);
|
|
19048
19422
|
if (cached2?.digest === digest) return cached2.project;
|
|
19049
19423
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -19059,10 +19433,10 @@ function loadProject(xcodeproj) {
|
|
|
19059
19433
|
if (!project || project.isa !== "PBXProject") {
|
|
19060
19434
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
19061
19435
|
}
|
|
19062
|
-
const projectDir =
|
|
19063
|
-
|
|
19436
|
+
const projectDir = import_node_fs20.default.realpathSync(
|
|
19437
|
+
import_node_path21.default.resolve(import_node_path21.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
19064
19438
|
);
|
|
19065
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
19439
|
+
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path21.default.join);
|
|
19066
19440
|
const result = {
|
|
19067
19441
|
xcodeproj,
|
|
19068
19442
|
projectFile,
|
|
@@ -19096,8 +19470,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
19096
19470
|
const relative3 = str(config.baseConfigurationReferenceRelativePath);
|
|
19097
19471
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
19098
19472
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
19099
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative3 ?
|
|
19100
|
-
if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !
|
|
19473
|
+
const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path21.default.resolve(directory, relative3) : null;
|
|
19474
|
+
if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !import_node_fs20.default.existsSync(baseFile)))
|
|
19101
19475
|
throw new Error(
|
|
19102
19476
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative3 ?? anchor}'`
|
|
19103
19477
|
);
|
|
@@ -19153,7 +19527,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
19153
19527
|
const derived = (key) => {
|
|
19154
19528
|
if (key === "AppIdentifierPrefix" || key === "TeamIdentifierPrefix")
|
|
19155
19529
|
return teamPrefix();
|
|
19156
|
-
return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : process.env[key] ?? "";
|
|
19530
|
+
return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : options.environment?.[key] ?? process.env[key] ?? "";
|
|
19157
19531
|
};
|
|
19158
19532
|
return {
|
|
19159
19533
|
get,
|
|
@@ -19175,27 +19549,27 @@ function settingList(value) {
|
|
|
19175
19549
|
);
|
|
19176
19550
|
return items2;
|
|
19177
19551
|
}
|
|
19178
|
-
function expandSearchPath(directory,
|
|
19179
|
-
if (
|
|
19552
|
+
function expandSearchPath(directory, rules2) {
|
|
19553
|
+
if (import_node_path21.default.basename(directory) !== "**") return [directory];
|
|
19180
19554
|
const expanded = [];
|
|
19181
19555
|
const seen = /* @__PURE__ */ new Set();
|
|
19182
|
-
const queue = [
|
|
19556
|
+
const queue = [import_node_path21.default.dirname(directory)];
|
|
19183
19557
|
for (let at = 0; at < queue.length; at++) {
|
|
19184
19558
|
const current = queue[at];
|
|
19185
19559
|
let real;
|
|
19186
19560
|
try {
|
|
19187
|
-
real =
|
|
19561
|
+
real = import_node_fs20.default.realpathSync(current);
|
|
19188
19562
|
} catch {
|
|
19189
19563
|
continue;
|
|
19190
19564
|
}
|
|
19191
|
-
if (!
|
|
19565
|
+
if (!import_node_fs20.default.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
19192
19566
|
seen.add(real);
|
|
19193
19567
|
expanded.push(current);
|
|
19194
|
-
for (const entry of
|
|
19195
|
-
if (entry.isSymbolicLink() ? !
|
|
19196
|
-
if (
|
|
19568
|
+
for (const entry of import_node_fs20.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
19569
|
+
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
19570
|
+
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
19197
19571
|
continue;
|
|
19198
|
-
queue.push(
|
|
19572
|
+
queue.push(import_node_path21.default.join(current, entry.name));
|
|
19199
19573
|
}
|
|
19200
19574
|
}
|
|
19201
19575
|
return expanded;
|
|
@@ -19277,14 +19651,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
19277
19651
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
19278
19652
|
return [];
|
|
19279
19653
|
copies.push({
|
|
19280
|
-
from:
|
|
19281
|
-
to:
|
|
19654
|
+
from: import_node_path21.default.resolve(projectDir, operands[0]),
|
|
19655
|
+
to: import_node_path21.default.resolve(projectDir, operands[1])
|
|
19282
19656
|
});
|
|
19283
19657
|
}
|
|
19284
19658
|
return copies;
|
|
19285
19659
|
}
|
|
19286
19660
|
function fileListEntries(file, absolute) {
|
|
19287
|
-
return
|
|
19661
|
+
return import_node_fs20.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
19288
19662
|
}
|
|
19289
19663
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
19290
19664
|
const { project, target, id: targetId } = ref;
|
|
@@ -19297,7 +19671,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
19297
19671
|
const copiedFiles = [];
|
|
19298
19672
|
let generatedInfoPlist = false;
|
|
19299
19673
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
19300
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
19674
|
+
const infoPlistOutput = declaredInfoPlist ? import_node_path21.default.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
19301
19675
|
const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
|
|
19302
19676
|
for (const phaseId of list(target.buildPhases)) {
|
|
19303
19677
|
const phase = project.object(phaseId);
|
|
@@ -19306,7 +19680,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
19306
19680
|
copiedFiles.push(
|
|
19307
19681
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
19308
19682
|
);
|
|
19309
|
-
const absolute = (raw) =>
|
|
19683
|
+
const absolute = (raw) => import_node_path21.default.resolve(project.projectDir, expand(raw, settings));
|
|
19310
19684
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
19311
19685
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
19312
19686
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -19315,7 +19689,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
19315
19689
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
19316
19690
|
).map((raw) => {
|
|
19317
19691
|
const file = absolute(raw);
|
|
19318
|
-
if (!
|
|
19692
|
+
if (!import_node_fs20.default.existsSync(file)) {
|
|
19319
19693
|
return { file, entries: [] };
|
|
19320
19694
|
}
|
|
19321
19695
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -19336,13 +19710,13 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
19336
19710
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
19337
19711
|
];
|
|
19338
19712
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
19339
|
-
for (const file of inputFiles) if (
|
|
19713
|
+
for (const file of inputFiles) if (import_node_fs20.default.existsSync(file)) projectInputs.add(file);
|
|
19340
19714
|
}
|
|
19341
19715
|
if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
|
|
19342
|
-
const phaseDir =
|
|
19716
|
+
const phaseDir = import_node_path21.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
19343
19717
|
for (const lists of fileLists.values())
|
|
19344
19718
|
for (const { file } of lists)
|
|
19345
|
-
if (!
|
|
19719
|
+
if (!import_node_fs20.default.existsSync(file))
|
|
19346
19720
|
throw new Error(
|
|
19347
19721
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
19348
19722
|
);
|
|
@@ -19361,34 +19735,34 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
19361
19735
|
const lists = fileLists.get(kind);
|
|
19362
19736
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
19363
19737
|
lists.forEach((_item, index) => {
|
|
19364
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
19738
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path21.default.join(
|
|
19365
19739
|
phaseDir,
|
|
19366
19740
|
`${kind}-${index}.xcfilelist`
|
|
19367
19741
|
);
|
|
19368
19742
|
});
|
|
19369
19743
|
}
|
|
19370
|
-
const signature = (0,
|
|
19744
|
+
const signature = (0, import_node_crypto8.createHash)("sha256").update(
|
|
19371
19745
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
19372
19746
|
);
|
|
19373
19747
|
for (const file of inputFiles) {
|
|
19374
19748
|
signature.update(file);
|
|
19375
|
-
if (
|
|
19376
|
-
const stat =
|
|
19749
|
+
if (import_node_fs20.default.existsSync(file)) {
|
|
19750
|
+
const stat = import_node_fs20.default.statSync(file);
|
|
19377
19751
|
signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
|
|
19378
19752
|
} else signature.update("missing");
|
|
19379
19753
|
}
|
|
19380
19754
|
const stamp = signature.digest("hex");
|
|
19381
19755
|
const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
19382
|
-
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) =>
|
|
19756
|
+
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs20.default.existsSync(file)))
|
|
19383
19757
|
continue;
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
|
|
19758
|
+
import_node_fs20.default.mkdirSync(phaseDir, { recursive: true });
|
|
19759
|
+
import_node_fs20.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
19760
|
+
import_node_fs20.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
19387
19761
|
for (const output of allOutputs)
|
|
19388
|
-
|
|
19762
|
+
import_node_fs20.default.mkdirSync(import_node_path21.default.dirname(output), { recursive: true });
|
|
19389
19763
|
for (const [kind, lists] of fileLists)
|
|
19390
19764
|
lists.forEach((item, index) => {
|
|
19391
|
-
|
|
19765
|
+
import_node_fs20.default.writeFileSync(
|
|
19392
19766
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
19393
19767
|
`${item.entries.join("\n")}
|
|
19394
19768
|
`
|
|
@@ -19414,7 +19788,7 @@ ${output}`
|
|
|
19414
19788
|
);
|
|
19415
19789
|
}
|
|
19416
19790
|
const missing2 = allOutputs.filter(
|
|
19417
|
-
(file) => file === infoPlistOutput && !
|
|
19791
|
+
(file) => file === infoPlistOutput && !import_node_fs20.default.existsSync(file)
|
|
19418
19792
|
);
|
|
19419
19793
|
if (missing2.length > 0)
|
|
19420
19794
|
throw new Error(
|
|
@@ -19427,8 +19801,8 @@ ${output}`
|
|
|
19427
19801
|
project.objects,
|
|
19428
19802
|
targetId,
|
|
19429
19803
|
project.resolvePath,
|
|
19430
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
19431
|
-
|
|
19804
|
+
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs20.default.existsSync(file) ? [file] : [],
|
|
19805
|
+
import_node_path21.default.join,
|
|
19432
19806
|
(file, kind) => {
|
|
19433
19807
|
if (kind === "header") {
|
|
19434
19808
|
headers.add(file);
|
|
@@ -19438,9 +19812,9 @@ ${output}`
|
|
|
19438
19812
|
resources.add(file);
|
|
19439
19813
|
return;
|
|
19440
19814
|
}
|
|
19441
|
-
if (!
|
|
19815
|
+
if (!import_node_fs20.default.existsSync(file)) {
|
|
19442
19816
|
if (options.requireSources === false) return;
|
|
19443
|
-
const script = scriptForOutput.get(
|
|
19817
|
+
const script = scriptForOutput.get(import_node_path21.default.normalize(file));
|
|
19444
19818
|
throw new Error(
|
|
19445
19819
|
script ? `${targetName}: missing generated source ${file} (Run Script "${script}" declares it in outputPaths; run the script or check in its output)` : `${targetName}: missing source ${file}`
|
|
19446
19820
|
);
|
|
@@ -19451,8 +19825,8 @@ ${output}`
|
|
|
19451
19825
|
);
|
|
19452
19826
|
for (const [file] of scriptForOutput) {
|
|
19453
19827
|
if (sources.has(file) || allSources.has(file)) continue;
|
|
19454
|
-
if (!
|
|
19455
|
-
const canonical =
|
|
19828
|
+
if (!import_node_fs20.default.existsSync(file)) continue;
|
|
19829
|
+
const canonical = import_node_fs20.default.realpathSync(file);
|
|
19456
19830
|
if (sources.has(canonical) || allSources.has(canonical)) continue;
|
|
19457
19831
|
allSources.add(canonical);
|
|
19458
19832
|
sources.add(canonical);
|
|
@@ -19469,37 +19843,37 @@ ${output}`
|
|
|
19469
19843
|
function commonAncestor(dirs) {
|
|
19470
19844
|
let common = dirs[0];
|
|
19471
19845
|
for (const dir of dirs) {
|
|
19472
|
-
while (common !==
|
|
19473
|
-
common =
|
|
19846
|
+
while (common !== import_node_path21.default.dirname(common) && import_node_path21.default.relative(common, dir).startsWith(".."))
|
|
19847
|
+
common = import_node_path21.default.dirname(common);
|
|
19474
19848
|
}
|
|
19475
19849
|
return common;
|
|
19476
19850
|
}
|
|
19477
|
-
var isPodsProject = (xcodeproj) =>
|
|
19851
|
+
var isPodsProject = (xcodeproj) => import_node_path21.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path21.default.basename(import_node_path21.default.dirname(xcodeproj)) === "Pods";
|
|
19478
19852
|
function installedPodsSandbox(pods) {
|
|
19479
|
-
const podfileLock =
|
|
19480
|
-
const manifestLock =
|
|
19481
|
-
if (!
|
|
19853
|
+
const podfileLock = import_node_path21.default.join(import_node_path21.default.dirname(pods), "Podfile.lock");
|
|
19854
|
+
const manifestLock = import_node_path21.default.join(pods, "Manifest.lock");
|
|
19855
|
+
if (!import_node_fs20.default.existsSync(podfileLock))
|
|
19482
19856
|
throw new Error(
|
|
19483
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
19857
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path21.default.dirname(pods)}`
|
|
19484
19858
|
);
|
|
19485
|
-
if (!
|
|
19859
|
+
if (!import_node_fs20.default.existsSync(manifestLock) || !import_node_fs20.default.readFileSync(manifestLock).equals(import_node_fs20.default.readFileSync(podfileLock)))
|
|
19486
19860
|
throw new Error(
|
|
19487
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
19861
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path21.default.dirname(pods)}`
|
|
19488
19862
|
);
|
|
19489
19863
|
const specChecksums = {};
|
|
19490
|
-
const lines =
|
|
19864
|
+
const lines = import_node_fs20.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
19491
19865
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
19492
19866
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
19493
19867
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
19494
19868
|
if (!entry) break;
|
|
19495
19869
|
specChecksums[entry[1]] = entry[2];
|
|
19496
19870
|
}
|
|
19497
|
-
const specs =
|
|
19871
|
+
const specs = import_node_path21.default.join(pods, "Local Podspecs");
|
|
19498
19872
|
return {
|
|
19499
19873
|
podfileLock,
|
|
19500
19874
|
manifestLock,
|
|
19501
19875
|
specChecksums,
|
|
19502
|
-
localPodspecs: isDirectory(specs) ?
|
|
19876
|
+
localPodspecs: isDirectory(specs) ? import_node_fs20.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path21.default.join(specs, name2)) : []
|
|
19503
19877
|
};
|
|
19504
19878
|
}
|
|
19505
19879
|
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
@@ -19511,14 +19885,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
19511
19885
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
19512
19886
|
if (installedPods && isPodsProject(xcodeproj))
|
|
19513
19887
|
throw new Error(
|
|
19514
|
-
`${
|
|
19888
|
+
`${import_node_path21.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path21.default.dirname(import_node_path21.default.dirname(xcodeproj))}`
|
|
19515
19889
|
);
|
|
19516
19890
|
return;
|
|
19517
19891
|
}
|
|
19518
|
-
const key =
|
|
19519
|
-
if (projectAt.has(key) || !installedPods && key.split(
|
|
19892
|
+
const key = import_node_fs20.default.realpathSync(xcodeproj);
|
|
19893
|
+
if (projectAt.has(key) || !installedPods && key.split(import_node_path21.default.sep).includes("Pods"))
|
|
19520
19894
|
return;
|
|
19521
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
19895
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path21.default.dirname(key));
|
|
19522
19896
|
const project = loadProject(key);
|
|
19523
19897
|
projectAt.set(key, project);
|
|
19524
19898
|
projects.push(project);
|
|
@@ -19534,12 +19908,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
19534
19908
|
for (const reference of listed)
|
|
19535
19909
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
19536
19910
|
if (projects.length === 0) {
|
|
19537
|
-
throw new Error(`${
|
|
19911
|
+
throw new Error(`${import_node_path21.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
19538
19912
|
}
|
|
19539
|
-
const podfile =
|
|
19540
|
-
if (installedPods && !cocoapods &&
|
|
19913
|
+
const podfile = import_node_path21.default.join(import_node_path21.default.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
19914
|
+
if (installedPods && !cocoapods && import_node_fs20.default.existsSync(podfile))
|
|
19541
19915
|
throw new Error(
|
|
19542
|
-
`${podfile} is not installed into ${
|
|
19916
|
+
`${podfile} is not installed into ${import_node_path21.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path21.default.dirname(podfile)} and open the workspace it writes`
|
|
19543
19917
|
);
|
|
19544
19918
|
return { listed, projects, projectAt, cocoapods };
|
|
19545
19919
|
}
|
|
@@ -19575,7 +19949,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
|
19575
19949
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
|
|
19576
19950
|
}
|
|
19577
19951
|
function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
|
|
19578
|
-
const xcodeprojOrWorkspace =
|
|
19952
|
+
const xcodeprojOrWorkspace = import_node_fs20.default.realpathSync(input);
|
|
19579
19953
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
19580
19954
|
const { listed, projects, projectAt, cocoapods } = workspaceProjects(
|
|
19581
19955
|
xcodeprojOrWorkspace,
|
|
@@ -19584,7 +19958,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19584
19958
|
const allTargets = projects.flatMap(projectTargets);
|
|
19585
19959
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
|
|
19586
19960
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
19587
|
-
const container =
|
|
19961
|
+
const container = import_node_path21.default.basename(xcodeprojOrWorkspace);
|
|
19588
19962
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
19589
19963
|
if (named.length !== 1) {
|
|
19590
19964
|
throw new Error(
|
|
@@ -19597,15 +19971,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19597
19971
|
for (const ref of allTargets) {
|
|
19598
19972
|
const product = ref.project.object(str(ref.target.productReference));
|
|
19599
19973
|
const file = str(product?.path);
|
|
19600
|
-
if (file && !byProduct.has(
|
|
19601
|
-
byProduct.set(
|
|
19974
|
+
if (file && !byProduct.has(import_node_path21.default.basename(file)))
|
|
19975
|
+
byProduct.set(import_node_path21.default.basename(file), ref);
|
|
19602
19976
|
}
|
|
19603
19977
|
const proxied = (project, proxyId) => {
|
|
19604
19978
|
const proxy = project.object(proxyId);
|
|
19605
19979
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
19606
19980
|
const portal = str(proxy.containerPortal);
|
|
19607
19981
|
const portalPath = project.resolvePath(portal ?? "");
|
|
19608
|
-
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath &&
|
|
19982
|
+
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs20.default.existsSync(portalPath) ? projectAt.get(import_node_fs20.default.realpathSync(portalPath)) : void 0;
|
|
19609
19983
|
const remote = str(proxy.remoteGlobalIDString);
|
|
19610
19984
|
if (!owner || !remote) return void 0;
|
|
19611
19985
|
return projectTargets(owner).find(
|
|
@@ -19626,12 +20000,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19626
20000
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
19627
20001
|
for (const buildFileId of list(phase.files)) {
|
|
19628
20002
|
const file = project.object(str(project.object(buildFileId)?.fileRef));
|
|
19629
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
20003
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path21.default.basename(str(file.path) ?? "")) : void 0;
|
|
19630
20004
|
if (resolved) found.push(resolved);
|
|
19631
20005
|
}
|
|
19632
20006
|
}
|
|
19633
20007
|
return found.filter(
|
|
19634
|
-
(candidate) => candidate.target.isa === "PBXAggregateTarget" || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
20008
|
+
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
19635
20009
|
);
|
|
19636
20010
|
};
|
|
19637
20011
|
const order = [];
|
|
@@ -19675,8 +20049,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19675
20049
|
ref.project.objects,
|
|
19676
20050
|
ref.id,
|
|
19677
20051
|
ref.project.resolvePath,
|
|
19678
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
19679
|
-
|
|
20052
|
+
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs20.default.existsSync(file) ? [file] : [],
|
|
20053
|
+
import_node_path21.default.join,
|
|
19680
20054
|
(file, kind) => {
|
|
19681
20055
|
if (kind === "header") found.push(file);
|
|
19682
20056
|
}
|
|
@@ -19692,12 +20066,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19692
20066
|
for (const ref of projectTargets(project)) {
|
|
19693
20067
|
const product = productName(ref);
|
|
19694
20068
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
19695
|
-
const name2 =
|
|
20069
|
+
const name2 = import_node_path21.default.basename(file);
|
|
19696
20070
|
if (!entries.has(name2))
|
|
19697
20071
|
entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
|
|
19698
20072
|
}
|
|
19699
20073
|
for (const file of synchronizedHeaders(ref)) {
|
|
19700
|
-
const name2 =
|
|
20074
|
+
const name2 = import_node_path21.default.basename(file);
|
|
19701
20075
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
19702
20076
|
}
|
|
19703
20077
|
}
|
|
@@ -19707,7 +20081,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19707
20081
|
if (folder === null) continue;
|
|
19708
20082
|
for (const file of walkFiles(folder)) {
|
|
19709
20083
|
if (!HEADER_FILE.test(file)) continue;
|
|
19710
|
-
const name2 =
|
|
20084
|
+
const name2 = import_node_path21.default.basename(file);
|
|
19711
20085
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
19712
20086
|
}
|
|
19713
20087
|
}
|
|
@@ -19715,18 +20089,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19715
20089
|
for (const id of Object.keys(project.objects)) {
|
|
19716
20090
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
19717
20091
|
const file = project.resolvePath(id);
|
|
19718
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
19719
|
-
entries.set(
|
|
20092
|
+
if (file && HEADER_FILE.test(file) && !entries.has(import_node_path21.default.basename(file)))
|
|
20093
|
+
entries.set(import_node_path21.default.basename(file), file);
|
|
19720
20094
|
}
|
|
19721
20095
|
const map2 = [...entries];
|
|
19722
20096
|
projectHeaderMaps.set(project, map2);
|
|
19723
20097
|
return map2;
|
|
19724
20098
|
};
|
|
19725
20099
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
19726
|
-
const buildDir = (project) =>
|
|
20100
|
+
const buildDir = (project) => import_node_path21.default.join(project.projectDir, ".build/peach-xcode/Build");
|
|
19727
20101
|
const podsBuild = {
|
|
19728
|
-
SYMROOT:
|
|
19729
|
-
OBJROOT:
|
|
20102
|
+
SYMROOT: import_node_path21.default.join(buildDir(app.project), "Products"),
|
|
20103
|
+
OBJROOT: import_node_path21.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
19730
20104
|
};
|
|
19731
20105
|
const moduleTarget = (ref) => {
|
|
19732
20106
|
const name2 = str(ref.target.name) ?? ref.id;
|
|
@@ -19741,18 +20115,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19741
20115
|
TARGET_NAME: name2,
|
|
19742
20116
|
TARGETNAME: "$(TARGET_NAME)",
|
|
19743
20117
|
PROJECT: "$(PROJECT_NAME)",
|
|
19744
|
-
PROJECT_NAME:
|
|
20118
|
+
PROJECT_NAME: import_node_path21.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
19745
20119
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
19746
20120
|
SRCROOT: ref.project.projectDir,
|
|
19747
20121
|
SOURCE_ROOT: ref.project.projectDir,
|
|
19748
20122
|
PROJECT_DIR: ref.project.projectDir,
|
|
19749
|
-
SYMROOT:
|
|
20123
|
+
SYMROOT: import_node_path21.default.join(buildDir(ref.project), "Products"),
|
|
19750
20124
|
BUILD_DIR: "$(SYMROOT)",
|
|
19751
20125
|
BUILD_ROOT: "$(SYMROOT)",
|
|
19752
|
-
OBJROOT:
|
|
20126
|
+
OBJROOT: import_node_path21.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
19753
20127
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
19754
20128
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
19755
20129
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
20130
|
+
UNLOCALIZED_RESOURCES_FOLDER_PATH: str(ref.project.object(str(ref.target.productReference))?.path) ?? "",
|
|
19756
20131
|
PROJECT_TEMP_DIR: "$(OBJROOT)/$(PROJECT_NAME).build",
|
|
19757
20132
|
CONFIGURATION_TEMP_DIR: "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
19758
20133
|
TARGET_TEMP_DIR: "$(CONFIGURATION_TEMP_DIR)/$(TARGET_NAME).build",
|
|
@@ -19760,6 +20135,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19760
20135
|
TEMP_FILES_DIR: "$(TEMP_DIR)",
|
|
19761
20136
|
TEMP_FILE_DIR: "$(TEMP_DIR)",
|
|
19762
20137
|
TEMP_ROOT: "$(OBJROOT)",
|
|
20138
|
+
OBJECT_FILE_DIR: "$(TARGET_TEMP_DIR)/Objects",
|
|
20139
|
+
// the per-variant object directory carries no arch: xcode defines
|
|
20140
|
+
// OBJECT_FILE_DIR_normal as OBJECT_FILE_DIR-normal, and the target
|
|
20141
|
+
// appends $(CURRENT_ARCH) itself for the per-arch directory.
|
|
20142
|
+
OBJECT_FILE_DIR_normal: "$(OBJECT_FILE_DIR)-normal",
|
|
19763
20143
|
DERIVED_FILE_DIR: "$(TARGET_TEMP_DIR)/DerivedSources",
|
|
19764
20144
|
DERIVED_FILES_DIR: "$(DERIVED_FILE_DIR)",
|
|
19765
20145
|
DERIVED_SOURCES_DIR: "$(DERIVED_FILE_DIR)",
|
|
@@ -19783,7 +20163,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19783
20163
|
xcconfigs
|
|
19784
20164
|
);
|
|
19785
20165
|
const searchRules = recursiveSearchRules(settings2);
|
|
19786
|
-
const absolute = (file) =>
|
|
20166
|
+
const absolute = (file) => import_node_path21.default.resolve(ref.project.projectDir, file);
|
|
19787
20167
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
19788
20168
|
const product = settings2("PRODUCT_NAME");
|
|
19789
20169
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -19814,7 +20194,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19814
20194
|
`${name2}: Swift compatibility header phase has no Swift producer sources`
|
|
19815
20195
|
);
|
|
19816
20196
|
const building = options.prepareGeneratedSources && options.requireSources !== false;
|
|
19817
|
-
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
20197
|
+
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path21.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
19818
20198
|
if (versioning) {
|
|
19819
20199
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
19820
20200
|
const custom = [
|
|
@@ -19827,7 +20207,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19827
20207
|
].filter((key) => settings2(key));
|
|
19828
20208
|
if (custom.length)
|
|
19829
20209
|
throw new Error(
|
|
19830
|
-
`${name2}: Xcode generates ${
|
|
20210
|
+
`${name2}: Xcode generates ${import_node_path21.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
19831
20211
|
);
|
|
19832
20212
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
19833
20213
|
const [major, minor] = version.split(".");
|
|
@@ -19840,9 +20220,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19840
20220
|
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
|
|
19841
20221
|
""
|
|
19842
20222
|
].join("\n");
|
|
19843
|
-
if (!
|
|
19844
|
-
|
|
19845
|
-
|
|
20223
|
+
if (!import_node_fs20.default.existsSync(versioning) || import_node_fs20.default.readFileSync(versioning, "utf8") !== unit) {
|
|
20224
|
+
import_node_fs20.default.mkdirSync(import_node_path21.default.dirname(versioning), { recursive: true });
|
|
20225
|
+
import_node_fs20.default.writeFileSync(versioning, unit);
|
|
19846
20226
|
}
|
|
19847
20227
|
allSources.push(versioning);
|
|
19848
20228
|
}
|
|
@@ -19861,7 +20241,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19861
20241
|
const headerFiles = headerPhase(ref);
|
|
19862
20242
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
19863
20243
|
for (const { file, visibility } of headerFiles) {
|
|
19864
|
-
const name3 =
|
|
20244
|
+
const name3 = import_node_path21.default.basename(file);
|
|
19865
20245
|
const published = visibility !== "Project";
|
|
19866
20246
|
if (!ownHeaders.has(name3))
|
|
19867
20247
|
ownHeaders.set(name3, published ? `${product}/${name3}` : file);
|
|
@@ -19869,7 +20249,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19869
20249
|
ownHeaders.set(`${product}/${name3}`, file);
|
|
19870
20250
|
}
|
|
19871
20251
|
for (const file of synchronizedHeaders(ref)) {
|
|
19872
|
-
const name3 =
|
|
20252
|
+
const name3 = import_node_path21.default.basename(file);
|
|
19873
20253
|
if (ownHeaders.has(name3)) continue;
|
|
19874
20254
|
ownHeaders.set(name3, file);
|
|
19875
20255
|
const qualified = `${product}/${name3}`;
|
|
@@ -19881,16 +20261,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19881
20261
|
const otherProduct = productName(other);
|
|
19882
20262
|
for (const { file, visibility } of headerPhase(other)) {
|
|
19883
20263
|
if (visibility === "Project") continue;
|
|
19884
|
-
const key = `${otherProduct}/${
|
|
20264
|
+
const key = `${otherProduct}/${import_node_path21.default.basename(file)}`;
|
|
19885
20265
|
if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
|
|
19886
20266
|
}
|
|
19887
20267
|
}
|
|
19888
|
-
const wrapper =
|
|
20268
|
+
const wrapper = import_node_path21.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
19889
20269
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
19890
|
-
const
|
|
20270
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path21.default.join(import_node_path21.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
20271
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs20.default.existsSync(moduleMap) && import_node_fs20.default.existsSync(frameworkUmbrella) ? {
|
|
20272
|
+
framework: true,
|
|
20273
|
+
moduleMap,
|
|
20274
|
+
umbrella: frameworkUmbrella,
|
|
20275
|
+
outputModuleMap: import_node_path21.default.join(wrapper, "Modules", "module.modulemap"),
|
|
20276
|
+
outputUmbrella: import_node_path21.default.join(
|
|
20277
|
+
wrapper,
|
|
20278
|
+
"Headers",
|
|
20279
|
+
import_node_path21.default.basename(frameworkUmbrella)
|
|
20280
|
+
),
|
|
20281
|
+
outputHeader: import_node_path21.default.join(
|
|
20282
|
+
wrapper,
|
|
20283
|
+
"Headers",
|
|
20284
|
+
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
20285
|
+
)
|
|
20286
|
+
} : null;
|
|
20287
|
+
const swiftCompatibility = compatibility ? {
|
|
20288
|
+
framework: false,
|
|
20289
|
+
moduleMap: compatibility.moduleMap,
|
|
20290
|
+
umbrella: compatibility.umbrella,
|
|
20291
|
+
outputModuleMap: compatibility.outputModuleMap,
|
|
20292
|
+
outputUmbrella: compatibility.outputUmbrella,
|
|
20293
|
+
outputHeader: compatibility.outputHeader
|
|
20294
|
+
} : frameworkCompatibility;
|
|
20295
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path21.default.relative(import_node_path21.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path21.default.sep)[0] !== ".." && import_node_fs20.default.existsSync(moduleMap) ? import_node_fs20.default.readdirSync(import_node_path21.default.dirname(moduleMap)).flatMap((entry) => {
|
|
19891
20296
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
19892
|
-
const file =
|
|
19893
|
-
return
|
|
20297
|
+
const file = import_node_path21.default.join(import_node_path21.default.dirname(moduleMap), entry);
|
|
20298
|
+
return import_node_fs20.default.existsSync(file) ? [file] : [];
|
|
19894
20299
|
}) : [];
|
|
19895
20300
|
const fileFlags = {};
|
|
19896
20301
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -19908,6 +20313,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19908
20313
|
);
|
|
19909
20314
|
}
|
|
19910
20315
|
}
|
|
20316
|
+
const cStandard = settings2("GCC_C_LANGUAGE_STANDARD");
|
|
20317
|
+
const cxxStandard = settings2("CLANG_CXX_LANGUAGE_STANDARD");
|
|
19911
20318
|
return {
|
|
19912
20319
|
settings: settings2,
|
|
19913
20320
|
keys,
|
|
@@ -19933,13 +20340,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19933
20340
|
swift: {
|
|
19934
20341
|
flags: settingList(settings2("OTHER_SWIFT_FLAGS")),
|
|
19935
20342
|
includePaths: settingList(settings2("SWIFT_INCLUDE_PATHS")).map(absolute),
|
|
19936
|
-
compatibility:
|
|
19937
|
-
moduleMap: compatibility.moduleMap,
|
|
19938
|
-
umbrella: compatibility.umbrella,
|
|
19939
|
-
outputModuleMap: compatibility.outputModuleMap,
|
|
19940
|
-
outputUmbrella: compatibility.outputUmbrella,
|
|
19941
|
-
outputHeader: compatibility.outputHeader
|
|
19942
|
-
} : null
|
|
20343
|
+
compatibility: swiftCompatibility
|
|
19943
20344
|
}
|
|
19944
20345
|
} : {},
|
|
19945
20346
|
...native ? {
|
|
@@ -19955,7 +20356,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19955
20356
|
...headers,
|
|
19956
20357
|
...Object.keys(ref.project.objects).flatMap((id) => {
|
|
19957
20358
|
const file = ref.project.resolvePath(id);
|
|
19958
|
-
return file && HEADER_FILE.test(file) &&
|
|
20359
|
+
return file && HEADER_FILE.test(file) && import_node_fs20.default.existsSync(file) ? [file] : [];
|
|
19959
20360
|
})
|
|
19960
20361
|
])
|
|
19961
20362
|
],
|
|
@@ -19964,15 +20365,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19964
20365
|
// xcode searches its products' include directory before
|
|
19965
20366
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
19966
20367
|
headerSearchPaths: [
|
|
19967
|
-
|
|
20368
|
+
import_node_path21.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
19968
20369
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
19969
20370
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
19970
20371
|
),
|
|
19971
|
-
|
|
20372
|
+
import_node_path21.default.join(
|
|
19972
20373
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
19973
20374
|
settings2("CURRENT_ARCH")
|
|
19974
20375
|
),
|
|
19975
|
-
|
|
20376
|
+
import_node_path21.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
19976
20377
|
settings2("DERIVED_FILE_DIR")
|
|
19977
20378
|
],
|
|
19978
20379
|
userHeaderSearchPaths: settingList(
|
|
@@ -19989,14 +20390,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
19989
20390
|
settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? "-fobjc-arc" : "-fno-objc-arc",
|
|
19990
20391
|
...settings2("CLANG_ENABLE_OBJC_WEAK") === "YES" ? ["-fobjc-weak"] : [],
|
|
19991
20392
|
...settings2("CLANG_ENABLE_MODULES") === "YES" ? ["-fmodules"] : [],
|
|
19992
|
-
...
|
|
20393
|
+
...cStandard && cStandard !== "compiler-default" ? [`-std=${cStandard}`] : [],
|
|
19993
20394
|
...settingList(settings2("GCC_PREPROCESSOR_DEFINITIONS")).map(
|
|
19994
20395
|
(value) => `-D${value}`
|
|
19995
20396
|
),
|
|
19996
20397
|
...settingList(settings2("OTHER_CFLAGS"))
|
|
19997
20398
|
],
|
|
19998
20399
|
cxxFlags: [
|
|
19999
|
-
...
|
|
20400
|
+
...cxxStandard && cxxStandard !== "compiler-default" ? [`-std=${CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard}`] : [],
|
|
20401
|
+
// clang.xcspec's hidden CLANG_DISABLE_CXX_MODULES (default
|
|
20402
|
+
// YES) keeps c++ and objective-c++ units out of modules when
|
|
20403
|
+
// modules are on or the standard is c++20 or later.
|
|
20404
|
+
...settings2("CLANG_DISABLE_CXX_MODULES") !== "NO" && (settings2("CLANG_ENABLE_MODULES") === "YES" || !PRE_CXX20_STANDARDS.has(cxxStandard || "compiler-default")) ? ["-fno-cxx-modules"] : [],
|
|
20000
20405
|
...settingList(settings2("OTHER_CPLUSPLUSFLAGS"))
|
|
20001
20406
|
],
|
|
20002
20407
|
fileFlags,
|
|
@@ -20012,16 +20417,42 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20012
20417
|
...headerFiles.flatMap(
|
|
20013
20418
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
20014
20419
|
[
|
|
20015
|
-
|
|
20420
|
+
import_node_path21.default.join(
|
|
20016
20421
|
wrapper,
|
|
20017
20422
|
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
20018
|
-
|
|
20423
|
+
import_node_path21.default.basename(file)
|
|
20019
20424
|
),
|
|
20020
20425
|
file
|
|
20021
20426
|
]
|
|
20022
20427
|
]
|
|
20023
20428
|
),
|
|
20024
|
-
|
|
20429
|
+
// a copy files phase into the products directory, as
|
|
20430
|
+
// cocoapods writes for each header_mappings_dir folder.
|
|
20431
|
+
...list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
20432
|
+
const phase = ref.project.object(phaseId);
|
|
20433
|
+
if (phase?.isa !== "PBXCopyFilesBuildPhase" || str(phase.dstSubfolderSpec) !== "16")
|
|
20434
|
+
return [];
|
|
20435
|
+
const destination = expand(
|
|
20436
|
+
str(phase.dstPath) ?? "",
|
|
20437
|
+
(name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path21.default.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path21.default.join(wrapper, "PrivateHeaders") : settings2(name3)
|
|
20438
|
+
);
|
|
20439
|
+
return list(phase.files).flatMap((id) => {
|
|
20440
|
+
const file = ref.project.resolvePath(
|
|
20441
|
+
str(ref.project.object(id)?.fileRef) ?? ""
|
|
20442
|
+
);
|
|
20443
|
+
return file && HEADER_FILE.test(file) ? [
|
|
20444
|
+
[
|
|
20445
|
+
import_node_path21.default.resolve(
|
|
20446
|
+
settings2("BUILT_PRODUCTS_DIR"),
|
|
20447
|
+
destination,
|
|
20448
|
+
import_node_path21.default.basename(file)
|
|
20449
|
+
),
|
|
20450
|
+
file
|
|
20451
|
+
]
|
|
20452
|
+
] : [];
|
|
20453
|
+
});
|
|
20454
|
+
}),
|
|
20455
|
+
...moduleMap ? [[import_node_path21.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
20025
20456
|
]) : Object.fromEntries(podHeaders.map((file) => [file, file]))
|
|
20026
20457
|
}
|
|
20027
20458
|
} : {}
|
|
@@ -20030,29 +20461,94 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20030
20461
|
};
|
|
20031
20462
|
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
|
|
20032
20463
|
const { settings, keys: settingKeys, module: module2 } = builtTargets.at(-1);
|
|
20033
|
-
const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => ref.target.
|
|
20464
|
+
const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
|
|
20034
20465
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
20035
20466
|
const podSourceDirs = frameworkTargets.flatMap(
|
|
20036
|
-
({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) =>
|
|
20467
|
+
({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => import_node_path21.default.dirname(file)).filter((dir) => import_node_fs20.default.existsSync(dir)) : []
|
|
20037
20468
|
);
|
|
20038
|
-
const expandValue = (value) => {
|
|
20039
|
-
if (typeof value === "string") return expand(value,
|
|
20040
|
-
if (Array.isArray(value)) return value.map(expandValue);
|
|
20469
|
+
const expandValue = (value, settings2) => {
|
|
20470
|
+
if (typeof value === "string") return expand(value, settings2);
|
|
20471
|
+
if (Array.isArray(value)) return value.map((item) => expandValue(item, settings2));
|
|
20041
20472
|
if (typeof value === "object" && !(value instanceof Date) && !Buffer.isBuffer(value)) {
|
|
20042
20473
|
return Object.fromEntries(
|
|
20043
|
-
Object.entries(value).map(([key, value2]) => [key, expandValue(value2)])
|
|
20474
|
+
Object.entries(value).map(([key, value2]) => [key, expandValue(value2, settings2)])
|
|
20044
20475
|
);
|
|
20045
20476
|
}
|
|
20046
20477
|
return value;
|
|
20047
20478
|
};
|
|
20048
|
-
const
|
|
20479
|
+
const resourceProducts = [];
|
|
20480
|
+
const bundleTargets = builtTargets.filter(
|
|
20481
|
+
({ ref }) => ref.target.productType === RESOURCE_BUNDLE
|
|
20482
|
+
);
|
|
20483
|
+
for (const owner of options.installedPods ? builtTargets : []) {
|
|
20484
|
+
for (const phaseId of list(owner.ref.target.buildPhases)) {
|
|
20485
|
+
const phase = owner.ref.project.object(phaseId);
|
|
20486
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
20487
|
+
continue;
|
|
20488
|
+
const absolute = (raw) => import_node_path21.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
20489
|
+
const entries = (paths) => paths.flatMap((raw) => {
|
|
20490
|
+
const file = absolute(raw);
|
|
20491
|
+
xcconfigs.add(file);
|
|
20492
|
+
return fileListEntries(file, absolute);
|
|
20493
|
+
});
|
|
20494
|
+
const inputs = entries(list(phase.inputFileListPaths)).filter(
|
|
20495
|
+
(file) => file.endsWith(".bundle")
|
|
20496
|
+
);
|
|
20497
|
+
const outputs = entries(list(phase.outputFileListPaths)).filter(
|
|
20498
|
+
(file) => file.endsWith(".bundle")
|
|
20499
|
+
);
|
|
20500
|
+
if (inputs.length !== outputs.length)
|
|
20501
|
+
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
20502
|
+
const destinationRoot = import_node_path21.default.join(
|
|
20503
|
+
owner.settings("TARGET_BUILD_DIR"),
|
|
20504
|
+
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
20505
|
+
);
|
|
20506
|
+
for (const [index, input2] of inputs.entries()) {
|
|
20507
|
+
const product = bundleTargets.find((target) => {
|
|
20508
|
+
const file = str(
|
|
20509
|
+
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
20510
|
+
);
|
|
20511
|
+
return file && import_node_path21.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
20512
|
+
});
|
|
20513
|
+
if (!product)
|
|
20514
|
+
throw new Error(
|
|
20515
|
+
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
20516
|
+
);
|
|
20517
|
+
const destination = import_node_path21.default.relative(destinationRoot, outputs[index]);
|
|
20518
|
+
if (destination === ".." || destination.startsWith(`..${import_node_path21.default.sep}`) || import_node_path21.default.isAbsolute(destination) || import_node_path21.default.basename(input2) !== import_node_path21.default.basename(destination))
|
|
20519
|
+
throw new Error(
|
|
20520
|
+
`${owner.module.name}: invalid resource bundle copy destination`
|
|
20521
|
+
);
|
|
20522
|
+
const infoFile = import_node_path21.default.resolve(
|
|
20523
|
+
product.ref.project.projectDir,
|
|
20524
|
+
product.settings("INFOPLIST_FILE")
|
|
20525
|
+
);
|
|
20526
|
+
xcconfigs.add(infoFile);
|
|
20527
|
+
const parsed = import_plist3.default.parse(import_node_fs20.default.readFileSync(infoFile, "utf8"));
|
|
20528
|
+
const infoPlist = import_plist3.default.build(expandValue(parsed, product.settings));
|
|
20529
|
+
const prefix2 = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
20530
|
+
const bundlePath = prefix2 + destination.split(import_node_path21.default.sep).join("/");
|
|
20531
|
+
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
20532
|
+
throw new Error(
|
|
20533
|
+
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
20534
|
+
);
|
|
20535
|
+
resourceProducts.push({
|
|
20536
|
+
path: bundlePath,
|
|
20537
|
+
resources: product.module.resources,
|
|
20538
|
+
infoPlist
|
|
20539
|
+
});
|
|
20540
|
+
}
|
|
20541
|
+
}
|
|
20542
|
+
}
|
|
20543
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path21.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
20049
20544
|
const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
20050
|
-
const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(
|
|
20545
|
+
const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs20.default.readFileSync(infoPlistFile, "utf8")) : {};
|
|
20051
20546
|
if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
|
|
20052
20547
|
throw new Error(`${module2.name} Info.plist must contain a dictionary`);
|
|
20053
20548
|
}
|
|
20054
20549
|
const info = {};
|
|
20055
|
-
for (const [key, value] of Object.entries(sourceInfo))
|
|
20550
|
+
for (const [key, value] of Object.entries(sourceInfo))
|
|
20551
|
+
info[key] = expandValue(value, settings);
|
|
20056
20552
|
for (const key of settingKeys) {
|
|
20057
20553
|
if (!key.startsWith("INFOPLIST_KEY_") || key.endsWith("_Generation")) continue;
|
|
20058
20554
|
const value = settings(key);
|
|
@@ -20075,7 +20571,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20075
20571
|
};
|
|
20076
20572
|
}
|
|
20077
20573
|
const localPackageDirs = [
|
|
20078
|
-
...listed.filter((reference) =>
|
|
20574
|
+
...listed.filter((reference) => import_node_fs20.default.existsSync(import_node_path21.default.join(reference, "Package.swift"))),
|
|
20079
20575
|
...projects.flatMap(
|
|
20080
20576
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
20081
20577
|
if (!isDict(entry)) return [];
|
|
@@ -20085,19 +20581,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20085
20581
|
const packages = [];
|
|
20086
20582
|
while (pending.length > 0) {
|
|
20087
20583
|
const dir = pending.pop();
|
|
20088
|
-
if (
|
|
20584
|
+
if (import_node_fs20.default.existsSync(import_node_path21.default.join(dir, "Package.swift"))) {
|
|
20089
20585
|
packages.push(dir);
|
|
20090
20586
|
continue;
|
|
20091
20587
|
}
|
|
20092
20588
|
if (!isDirectory(dir)) continue;
|
|
20093
|
-
for (const child of
|
|
20589
|
+
for (const child of import_node_fs20.default.readdirSync(dir, { withFileTypes: true }))
|
|
20094
20590
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
20095
|
-
pending.push(
|
|
20591
|
+
pending.push(import_node_path21.default.join(dir, child.name));
|
|
20096
20592
|
}
|
|
20097
20593
|
return packages;
|
|
20098
20594
|
}
|
|
20099
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
20100
|
-
return candidate &&
|
|
20595
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path21.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
20596
|
+
return candidate && import_node_fs20.default.existsSync(import_node_path21.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
20101
20597
|
})
|
|
20102
20598
|
)
|
|
20103
20599
|
];
|
|
@@ -20118,12 +20614,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20118
20614
|
const linkedProductKeys = /* @__PURE__ */ new Set();
|
|
20119
20615
|
const binaryFrameworks = /* @__PURE__ */ new Map();
|
|
20120
20616
|
for (const { ref, settings: settings2 } of builtTargets) {
|
|
20121
|
-
const absolute = (raw) =>
|
|
20617
|
+
const absolute = (raw) => import_node_path21.default.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
20122
20618
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
20123
20619
|
const dir = absolute(raw);
|
|
20124
|
-
const modulemap =
|
|
20125
|
-
if (!
|
|
20126
|
-
const name2 = moduleMapName(
|
|
20620
|
+
const modulemap = import_node_path21.default.join(dir, "module.modulemap");
|
|
20621
|
+
if (!import_node_fs20.default.existsSync(modulemap)) continue;
|
|
20622
|
+
const name2 = moduleMapName(import_node_fs20.default.readFileSync(modulemap, "utf8"));
|
|
20127
20623
|
if (name2 && !binaryFrameworks.has(name2)) binaryFrameworks.set(name2, dir);
|
|
20128
20624
|
}
|
|
20129
20625
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -20132,7 +20628,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20132
20628
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
20133
20629
|
for (const raw of list(phase.inputFileListPaths)) {
|
|
20134
20630
|
const file = absolute(raw);
|
|
20135
|
-
if (!
|
|
20631
|
+
if (!import_node_fs20.default.existsSync(file)) continue;
|
|
20136
20632
|
xcconfigs.add(file);
|
|
20137
20633
|
inputs.push(...fileListEntries(file, absolute));
|
|
20138
20634
|
}
|
|
@@ -20171,7 +20667,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20171
20667
|
product,
|
|
20172
20668
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
20173
20669
|
kind: "local",
|
|
20174
|
-
dir:
|
|
20670
|
+
dir: import_node_path21.default.resolve(
|
|
20175
20671
|
project.projectDir,
|
|
20176
20672
|
str(reference.relativePath) ?? ""
|
|
20177
20673
|
)
|
|
@@ -20194,11 +20690,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20194
20690
|
const fileId = str(project.object(buildFileId)?.fileRef);
|
|
20195
20691
|
const file = project.object(fileId);
|
|
20196
20692
|
const tree = str(file?.sourceTree);
|
|
20197
|
-
const
|
|
20693
|
+
const rawPath = str(file?.path) ?? "";
|
|
20694
|
+
const name2 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
|
|
20198
20695
|
if (file?.isa !== "PBXFileReference" || !name2) continue;
|
|
20199
|
-
if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR"
|
|
20696
|
+
if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
|
|
20697
|
+
// however it is rooted: xcode links -framework <name> from the sdk
|
|
20698
|
+
// and a stale group-relative path to it contributes nothing.
|
|
20699
|
+
/\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
|
|
20700
|
+
byProduct.has(import_node_path21.default.basename(rawPath)))
|
|
20200
20701
|
continue;
|
|
20201
20702
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
20703
|
+
if (fileId && resolved !== null && !import_node_fs20.default.existsSync(resolved))
|
|
20704
|
+
throw new Error(
|
|
20705
|
+
`${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
20706
|
+
);
|
|
20202
20707
|
if (!binaryFrameworks.get(name2)) binaryFrameworks.set(name2, resolved);
|
|
20203
20708
|
}
|
|
20204
20709
|
}
|
|
@@ -20213,18 +20718,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20213
20718
|
}
|
|
20214
20719
|
for (const built of builtTargets)
|
|
20215
20720
|
built.module.packageProducts = productsByTarget.get(built.ref) ?? [];
|
|
20216
|
-
const resolvedFile =
|
|
20217
|
-
workspace ??
|
|
20721
|
+
const resolvedFile = import_node_path21.default.join(
|
|
20722
|
+
workspace ?? import_node_path21.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
20218
20723
|
"xcshareddata",
|
|
20219
20724
|
"swiftpm",
|
|
20220
20725
|
"Package.resolved"
|
|
20221
20726
|
);
|
|
20222
|
-
let packageResolved =
|
|
20727
|
+
let packageResolved = import_node_fs20.default.existsSync(resolvedFile) ? [import_node_fs20.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path21.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs20.default.existsSync(file)).map((file) => import_node_fs20.default.realpathSync(file)).sort();
|
|
20223
20728
|
if (packageResolved.length === 0) {
|
|
20224
20729
|
const requirements = remotePackageRequirements(projects);
|
|
20225
20730
|
if (requirements.length > 0) {
|
|
20226
20731
|
resolveSwiftPackageRequirements(requirements, resolvedFile);
|
|
20227
|
-
packageResolved = [
|
|
20732
|
+
packageResolved = [import_node_fs20.default.realpathSync(resolvedFile)];
|
|
20228
20733
|
}
|
|
20229
20734
|
}
|
|
20230
20735
|
const used = order.map((ref) => ref.project);
|
|
@@ -20232,14 +20737,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20232
20737
|
...module2,
|
|
20233
20738
|
rootDir: commonAncestor(
|
|
20234
20739
|
[
|
|
20235
|
-
workspace ?
|
|
20740
|
+
workspace ? import_node_path21.default.dirname(workspace) : app.project.projectDir,
|
|
20236
20741
|
...used.map((project) => project.projectDir),
|
|
20237
20742
|
...localPackageDirs,
|
|
20238
20743
|
...linkedProducts.flatMap(
|
|
20239
|
-
({ source }) => source.kind === "local" &&
|
|
20744
|
+
({ source }) => source.kind === "local" && import_node_fs20.default.existsSync(source.dir) ? [source.dir] : []
|
|
20240
20745
|
),
|
|
20241
20746
|
...new Set(podSourceDirs)
|
|
20242
|
-
].map((dir) =>
|
|
20747
|
+
].map((dir) => import_node_fs20.default.realpathSync(dir))
|
|
20243
20748
|
),
|
|
20244
20749
|
projectFiles: [
|
|
20245
20750
|
.../* @__PURE__ */ new Set([
|
|
@@ -20252,10 +20757,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
20252
20757
|
appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
|
|
20253
20758
|
infoPlist: infoPlistPending ? null : import_plist3.default.build(info),
|
|
20254
20759
|
infoPlistFile,
|
|
20760
|
+
developmentRegion: str(app.project.project.developmentRegion) ?? "en",
|
|
20255
20761
|
frameworks,
|
|
20762
|
+
resourceProducts,
|
|
20256
20763
|
linkedProducts,
|
|
20257
20764
|
localPackageDirs: [
|
|
20258
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
20765
|
+
...new Set(localPackageDirs.map((dir) => import_node_fs20.default.realpathSync(dir)))
|
|
20259
20766
|
].sort(),
|
|
20260
20767
|
binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
20261
20768
|
packageResolved,
|
|
@@ -20334,7 +20841,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
20334
20841
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
|
|
20335
20842
|
const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
|
|
20336
20843
|
const rootModuleName = readRootModuleName(
|
|
20337
|
-
app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) &&
|
|
20844
|
+
app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) && import_node_fs21.default.existsSync(file)).map((file) => import_node_fs21.default.readFileSync(file, "utf8"))
|
|
20338
20845
|
);
|
|
20339
20846
|
return {
|
|
20340
20847
|
applicationName,
|
|
@@ -20355,7 +20862,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
20355
20862
|
googleSignIn: readGoogleSignInConfiguration(
|
|
20356
20863
|
dictionary,
|
|
20357
20864
|
Object.fromEntries(
|
|
20358
|
-
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(
|
|
20865
|
+
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs21.default.readFileSync(file, "utf8"))])
|
|
20359
20866
|
)
|
|
20360
20867
|
),
|
|
20361
20868
|
supportedInterfaceOrientations,
|
|
@@ -20364,11 +20871,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
20364
20871
|
alternateIconNames: [...alternateIconNames],
|
|
20365
20872
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
20366
20873
|
app.resources,
|
|
20367
|
-
(file) =>
|
|
20874
|
+
(file) => import_node_fs21.default.readFileSync(file, "utf8"),
|
|
20368
20875
|
(file) => {
|
|
20369
|
-
const extension =
|
|
20876
|
+
const extension = import_node_path22.default.extname(file).toLowerCase();
|
|
20370
20877
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
20371
|
-
return `data:${contentType};base64,${
|
|
20878
|
+
return `data:${contentType};base64,${import_node_fs21.default.readFileSync(file).toString("base64")}`;
|
|
20372
20879
|
},
|
|
20373
20880
|
icons,
|
|
20374
20881
|
app.appIconName,
|
|
@@ -20388,10 +20895,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
20388
20895
|
}
|
|
20389
20896
|
var NativeAppTargetSelectionError = class extends Error {
|
|
20390
20897
|
};
|
|
20391
|
-
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest) {
|
|
20898
|
+
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment) {
|
|
20392
20899
|
const read = selectNativeAppIdentityReader(platform, {
|
|
20393
20900
|
android: () => readAndroidNativeAppIdentity(projectRoot, androidMergedManifest),
|
|
20394
|
-
ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget)
|
|
20901
|
+
ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment)
|
|
20395
20902
|
});
|
|
20396
20903
|
return read ? read() : null;
|
|
20397
20904
|
}
|
|
@@ -20399,22 +20906,22 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
20399
20906
|
const read = selectNativeAppIdentityReader(platform, {
|
|
20400
20907
|
android: () => null,
|
|
20401
20908
|
ios: () => {
|
|
20402
|
-
const iosRoot =
|
|
20403
|
-
if (!
|
|
20909
|
+
const iosRoot = import_node_path22.default.join(projectRoot, "ios");
|
|
20910
|
+
if (!import_node_fs21.default.existsSync(iosRoot)) return null;
|
|
20404
20911
|
const files = {};
|
|
20405
|
-
for (const entry of
|
|
20912
|
+
for (const entry of import_node_fs21.default.readdirSync(iosRoot, { withFileTypes: true })) {
|
|
20406
20913
|
if (entry.name === "Pods") continue;
|
|
20407
20914
|
if (entry.isDirectory()) {
|
|
20408
20915
|
const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
|
|
20409
20916
|
for (const name2 of names) {
|
|
20410
20917
|
const relative3 = `ios/${entry.name}/${name2}`;
|
|
20411
|
-
const file =
|
|
20412
|
-
if (
|
|
20918
|
+
const file = import_node_path22.default.join(projectRoot, relative3);
|
|
20919
|
+
if (import_node_fs21.default.existsSync(file)) files[relative3] = import_node_fs21.default.readFileSync(file, "utf8");
|
|
20413
20920
|
}
|
|
20414
20921
|
} else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
|
|
20415
20922
|
const relative3 = `ios/${entry.name}`;
|
|
20416
|
-
const file =
|
|
20417
|
-
if (
|
|
20923
|
+
const file = import_node_path22.default.join(projectRoot, relative3);
|
|
20924
|
+
if (import_node_fs21.default.existsSync(file)) files[relative3] = import_node_fs21.default.readFileSync(file, "utf8");
|
|
20418
20925
|
}
|
|
20419
20926
|
}
|
|
20420
20927
|
return extractNativeAppIdentityFromFiles(files, "ios", parseInfoPlist, iosTarget);
|
|
@@ -20425,41 +20932,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
20425
20932
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
20426
20933
|
const files = {};
|
|
20427
20934
|
if (androidMergedManifest) {
|
|
20428
|
-
const file =
|
|
20429
|
-
if (!
|
|
20430
|
-
files[androidMergedManifest] =
|
|
20935
|
+
const file = import_node_path22.default.resolve(projectRoot, androidMergedManifest);
|
|
20936
|
+
if (!import_node_fs21.default.existsSync(file)) return null;
|
|
20937
|
+
files[androidMergedManifest] = import_node_fs21.default.readFileSync(file, "utf8");
|
|
20431
20938
|
} else {
|
|
20432
|
-
const androidRoot =
|
|
20433
|
-
if (!
|
|
20939
|
+
const androidRoot = import_node_path22.default.join(projectRoot, "android");
|
|
20940
|
+
if (!import_node_fs21.default.existsSync(androidRoot)) return null;
|
|
20434
20941
|
const collect = (directory) => {
|
|
20435
|
-
for (const entry of
|
|
20436
|
-
const file =
|
|
20942
|
+
for (const entry of import_node_fs21.default.readdirSync(directory, { withFileTypes: true })) {
|
|
20943
|
+
const file = import_node_path22.default.join(directory, entry.name);
|
|
20437
20944
|
if (entry.isDirectory()) collect(file);
|
|
20438
20945
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
20439
|
-
files[
|
|
20946
|
+
files[import_node_path22.default.relative(projectRoot, file).split(import_node_path22.default.sep).join("/")] = import_node_fs21.default.readFileSync(file, "utf8");
|
|
20440
20947
|
}
|
|
20441
20948
|
};
|
|
20442
|
-
for (const module2 of
|
|
20949
|
+
for (const module2 of import_node_fs21.default.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
20443
20950
|
if (!module2.isDirectory()) continue;
|
|
20444
|
-
const outputs =
|
|
20951
|
+
const outputs = import_node_path22.default.join(
|
|
20445
20952
|
androidRoot,
|
|
20446
20953
|
module2.name,
|
|
20447
20954
|
"build/intermediates/merged_manifests"
|
|
20448
20955
|
);
|
|
20449
|
-
if (
|
|
20956
|
+
if (import_node_fs21.default.existsSync(outputs)) collect(outputs);
|
|
20450
20957
|
}
|
|
20451
20958
|
}
|
|
20452
20959
|
for (const manifest of Object.keys(files)) {
|
|
20453
20960
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
20454
20961
|
if (!resourceDirectory) continue;
|
|
20455
|
-
const absolute =
|
|
20456
|
-
if (!
|
|
20457
|
-
for (const entry of
|
|
20962
|
+
const absolute = import_node_path22.default.resolve(projectRoot, resourceDirectory);
|
|
20963
|
+
if (!import_node_fs21.default.existsSync(absolute)) continue;
|
|
20964
|
+
for (const entry of import_node_fs21.default.readdirSync(absolute, { withFileTypes: true })) {
|
|
20458
20965
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
20459
|
-
for (const resource of
|
|
20966
|
+
for (const resource of import_node_fs21.default.readdirSync(import_node_path22.default.join(absolute, entry.name))) {
|
|
20460
20967
|
if (!resource.endsWith(".xml")) continue;
|
|
20461
20968
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
20462
|
-
files[file] =
|
|
20969
|
+
files[file] = import_node_fs21.default.readFileSync(import_node_path22.default.resolve(projectRoot, file), "utf8");
|
|
20463
20970
|
}
|
|
20464
20971
|
}
|
|
20465
20972
|
}
|
|
@@ -20472,11 +20979,11 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
|
20472
20979
|
androidMergedManifest
|
|
20473
20980
|
);
|
|
20474
20981
|
}
|
|
20475
|
-
function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
20476
|
-
const app = readIosAppTarget(projectRoot, iosTarget);
|
|
20982
|
+
function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment) {
|
|
20983
|
+
const app = readIosAppTarget(projectRoot, iosTarget, environment);
|
|
20477
20984
|
if (!app) return null;
|
|
20478
20985
|
const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
|
|
20479
|
-
const projectManifestPath =
|
|
20986
|
+
const projectManifestPath = import_node_path22.default.join(projectRoot, "package.json");
|
|
20480
20987
|
const projectRequire = (0, import_node_module4.createRequire)(projectManifestPath);
|
|
20481
20988
|
let reanimatedManifestPath;
|
|
20482
20989
|
try {
|
|
@@ -20490,22 +20997,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
|
20490
20997
|
throw error;
|
|
20491
20998
|
}
|
|
20492
20999
|
const installedManifest = JSON.parse(
|
|
20493
|
-
|
|
21000
|
+
import_node_fs21.default.readFileSync(reanimatedManifestPath, "utf8")
|
|
20494
21001
|
);
|
|
20495
21002
|
const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
20496
21003
|
if (!installedVersion) throw new Error("Reanimated package version is malformed");
|
|
20497
21004
|
if (Number.parseInt(installedVersion, 10) < 4) return identity;
|
|
20498
21005
|
const defaults = JSON.parse(
|
|
20499
|
-
|
|
20500
|
-
|
|
20501
|
-
|
|
21006
|
+
import_node_fs21.default.readFileSync(
|
|
21007
|
+
import_node_path22.default.join(
|
|
21008
|
+
import_node_path22.default.dirname(reanimatedManifestPath),
|
|
20502
21009
|
"src/featureFlags/staticFlags.json"
|
|
20503
21010
|
),
|
|
20504
21011
|
"utf8"
|
|
20505
21012
|
)
|
|
20506
21013
|
);
|
|
20507
21014
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
20508
|
-
const manifest = JSON.parse(
|
|
21015
|
+
const manifest = JSON.parse(import_node_fs21.default.readFileSync(projectManifestPath, "utf8"));
|
|
20509
21016
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
20510
21017
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
20511
21018
|
if (overrides !== void 0 && !isRecord(overrides)) {
|
|
@@ -20527,10 +21034,10 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
|
20527
21034
|
}
|
|
20528
21035
|
return { ...identity, reanimatedStaticFeatureFlags: flags };
|
|
20529
21036
|
}
|
|
20530
|
-
function readIosAppTarget(projectRoot, iosTarget) {
|
|
20531
|
-
const iosRoot =
|
|
20532
|
-
if (!
|
|
20533
|
-
const projects =
|
|
21037
|
+
function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
21038
|
+
const iosRoot = import_node_path22.default.join(projectRoot, "ios");
|
|
21039
|
+
if (!import_node_fs21.default.existsSync(iosRoot)) return null;
|
|
21040
|
+
const projects = import_node_fs21.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
20534
21041
|
if (projects.length === 0) return null;
|
|
20535
21042
|
if (projects.length > 1 && !iosTarget) {
|
|
20536
21043
|
throw new NativeAppTargetSelectionError(
|
|
@@ -20540,7 +21047,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
|
|
|
20540
21047
|
let project = projects[0];
|
|
20541
21048
|
if (iosTarget && projects.length > 1) {
|
|
20542
21049
|
const matches = projects.filter(
|
|
20543
|
-
(entry) => listXcodeAppTargets(
|
|
21050
|
+
(entry) => listXcodeAppTargets(import_node_path22.default.join(iosRoot, entry.name), {
|
|
20544
21051
|
requireSources: false
|
|
20545
21052
|
}).includes(iosTarget)
|
|
20546
21053
|
);
|
|
@@ -20554,7 +21061,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
|
|
|
20554
21061
|
}
|
|
20555
21062
|
project = matches[0];
|
|
20556
21063
|
}
|
|
20557
|
-
const xcodeproj =
|
|
21064
|
+
const xcodeproj = import_node_path22.default.join(iosRoot, project.name);
|
|
20558
21065
|
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
20559
21066
|
if (!iosTarget && appTargets.length > 1) {
|
|
20560
21067
|
throw new NativeAppTargetSelectionError(
|
|
@@ -20563,33 +21070,42 @@ function readIosAppTarget(projectRoot, iosTarget) {
|
|
|
20563
21070
|
}
|
|
20564
21071
|
return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
|
|
20565
21072
|
requireSources: false,
|
|
20566
|
-
prepareGeneratedSources: true
|
|
21073
|
+
prepareGeneratedSources: true,
|
|
21074
|
+
environment
|
|
20567
21075
|
});
|
|
20568
21076
|
}
|
|
20569
21077
|
|
|
20570
21078
|
// src/native-firebase-config.ts
|
|
20571
21079
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
20572
21080
|
var import_node_child_process7 = require("node:child_process");
|
|
20573
|
-
var
|
|
21081
|
+
var import_node_fs22 = __toESM(require("node:fs"), 1);
|
|
20574
21082
|
var import_node_os6 = __toESM(require("node:os"), 1);
|
|
20575
|
-
var
|
|
21083
|
+
var import_node_path23 = __toESM(require("node:path"), 1);
|
|
20576
21084
|
init_is_record();
|
|
20577
21085
|
var EXPO_CONFIG_SCRIPT = `const { createRequire } = require('node:module');
|
|
20578
21086
|
const { writeFileSync } = require('node:fs');
|
|
20579
21087
|
const { join } = require('node:path');
|
|
20580
21088
|
const root = process.argv[1];
|
|
20581
|
-
const
|
|
21089
|
+
const projectRequire = createRequire(join(root, 'package.json'));
|
|
21090
|
+
const expoRequire = createRequire(projectRequire.resolve('expo/package.json'));
|
|
21091
|
+
const { getConfig } = expoRequire('@expo/config');
|
|
21092
|
+
let expoEnv = null;
|
|
21093
|
+
try { expoEnv = createRequire(expoRequire.resolve('@expo/cli/package.json'))('@expo/env'); } catch {}
|
|
21094
|
+
if (expoEnv) {
|
|
21095
|
+
process.env.NODE_ENV ||= 'development';
|
|
21096
|
+
expoEnv.load(root, { silent: true });
|
|
21097
|
+
}
|
|
20582
21098
|
const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true }).exp);
|
|
20583
21099
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
20584
21100
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
20585
21101
|
function hasExpoConfig(projectRoot) {
|
|
20586
|
-
const appJsonPath =
|
|
20587
|
-
const appJson =
|
|
21102
|
+
const appJsonPath = import_node_path23.default.join(projectRoot, "app.json");
|
|
21103
|
+
const appJson = import_node_fs22.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs22.default.readFileSync(appJsonPath, "utf8")) : null;
|
|
20588
21104
|
const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
|
|
20589
21105
|
(value) => isRecord(value) && typeof value.googleServicesFile === "string"
|
|
20590
21106
|
));
|
|
20591
21107
|
return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
|
|
20592
|
-
(name2) =>
|
|
21108
|
+
(name2) => import_node_fs22.default.existsSync(import_node_path23.default.join(projectRoot, name2))
|
|
20593
21109
|
);
|
|
20594
21110
|
}
|
|
20595
21111
|
function expoConfigArgs(projectRoot, resultPath) {
|
|
@@ -20597,22 +21113,22 @@ function expoConfigArgs(projectRoot, resultPath) {
|
|
|
20597
21113
|
"--input-type=commonjs",
|
|
20598
21114
|
"-e",
|
|
20599
21115
|
EXPO_CONFIG_SCRIPT,
|
|
20600
|
-
|
|
21116
|
+
import_node_path23.default.resolve(projectRoot),
|
|
20601
21117
|
resultPath
|
|
20602
21118
|
];
|
|
20603
21119
|
}
|
|
20604
21120
|
function readExpoConfigResult(resultPath, status, stderr) {
|
|
20605
21121
|
if (status !== 0)
|
|
20606
21122
|
throw new Error(stderr || "Expo native configuration evaluation failed.");
|
|
20607
|
-
const resolved = JSON.parse(
|
|
21123
|
+
const resolved = JSON.parse(import_node_fs22.default.readFileSync(resultPath, "utf8"));
|
|
20608
21124
|
if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
|
|
20609
21125
|
return resolved;
|
|
20610
21126
|
}
|
|
20611
|
-
var resultDirectory = () =>
|
|
21127
|
+
var resultDirectory = () => import_node_fs22.default.mkdtempSync(import_node_path23.default.join(import_node_os6.default.tmpdir(), "peach-expo-config-"));
|
|
20612
21128
|
function readExpoConfig(projectRoot) {
|
|
20613
21129
|
if (!hasExpoConfig(projectRoot)) return {};
|
|
20614
21130
|
const directory = resultDirectory();
|
|
20615
|
-
const resultPath =
|
|
21131
|
+
const resultPath = import_node_path23.default.join(directory, "config.json");
|
|
20616
21132
|
try {
|
|
20617
21133
|
const child = (0, import_node_child_process7.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
20618
21134
|
cwd: projectRoot,
|
|
@@ -20624,7 +21140,7 @@ function readExpoConfig(projectRoot) {
|
|
|
20624
21140
|
if (child.error) throw child.error;
|
|
20625
21141
|
return readExpoConfigResult(resultPath, child.status, child.stderr);
|
|
20626
21142
|
} finally {
|
|
20627
|
-
|
|
21143
|
+
import_node_fs22.default.rmSync(directory, { recursive: true, force: true });
|
|
20628
21144
|
}
|
|
20629
21145
|
}
|
|
20630
21146
|
function evaluateFirebaseGuard(header, resources) {
|
|
@@ -20646,7 +21162,7 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
20646
21162
|
}
|
|
20647
21163
|
clauses.push(condition.slice(start).trim());
|
|
20648
21164
|
const sources = resources.filter(
|
|
20649
|
-
(file) =>
|
|
21165
|
+
(file) => import_node_path23.default.basename(file) === "GoogleService-Info.plist"
|
|
20650
21166
|
);
|
|
20651
21167
|
const bound = /* @__PURE__ */ new Map();
|
|
20652
21168
|
for (const clause of clauses) {
|
|
@@ -20662,7 +21178,7 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
20662
21178
|
const dictionary = /^let\s+(\w+)\s*=\s*NSDictionary\s*\(\s*contentsOfFile:\s*(\w+)\s*\)$/.exec(clause);
|
|
20663
21179
|
if (dictionary && typeof bound.get(dictionary[2]) === "string") {
|
|
20664
21180
|
const parsed = parsePlistSource(
|
|
20665
|
-
|
|
21181
|
+
import_node_fs22.default.readFileSync(String(bound.get(dictionary[2])), "utf8")
|
|
20666
21182
|
);
|
|
20667
21183
|
if (!isRecord(parsed)) return false;
|
|
20668
21184
|
bound.set(dictionary[1], parsed);
|
|
@@ -20744,7 +21260,7 @@ function findDefaultConfigureCall(body, sources) {
|
|
|
20744
21260
|
const [, type, name2] = call;
|
|
20745
21261
|
for (const file of sources) {
|
|
20746
21262
|
if (!file.endsWith(".swift")) continue;
|
|
20747
|
-
const source = blankSwiftObjcLiterals(
|
|
21263
|
+
const source = blankSwiftObjcLiterals(import_node_fs22.default.readFileSync(file, "utf8"));
|
|
20748
21264
|
const declaration = new RegExp(
|
|
20749
21265
|
`\\b(?:enum|struct|class)\\s+${type}\\b[^{]*\\{`
|
|
20750
21266
|
).exec(source);
|
|
@@ -20766,10 +21282,10 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
20766
21282
|
prepareGeneratedSources
|
|
20767
21283
|
});
|
|
20768
21284
|
const delegates = app.allSources.filter(
|
|
20769
|
-
(file) => /^AppDelegate\.(swift|mm|m)$/.test(
|
|
21285
|
+
(file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path23.default.basename(file))
|
|
20770
21286
|
);
|
|
20771
21287
|
const defaultConfigured = delegates.some((file) => {
|
|
20772
|
-
const raw =
|
|
21288
|
+
const raw = import_node_fs22.default.readFileSync(file, "utf8");
|
|
20773
21289
|
const source = blankSwiftObjcLiterals(raw);
|
|
20774
21290
|
const launch = /(?:\bfunc\s+application\s*\([\s\S]*?didFinishLaunchingWithOptions[\s\S]*?\)\s*->\s*Bool|^-\s*\(BOOL\)\s*application\s*:[\s\S]*?didFinishLaunchingWithOptions[^{]*)\s*\{/m.exec(
|
|
20775
21291
|
source
|
|
@@ -20834,17 +21350,17 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
20834
21350
|
return guarded;
|
|
20835
21351
|
});
|
|
20836
21352
|
if (!defaultConfigured) return null;
|
|
20837
|
-
const bundle =
|
|
21353
|
+
const bundle = import_node_path23.default.join(
|
|
20838
21354
|
app.settings("BUILT_PRODUCTS_DIR"),
|
|
20839
21355
|
app.settings("WRAPPER_NAME") || `${app.settings("PRODUCT_NAME")}.app`
|
|
20840
21356
|
);
|
|
20841
21357
|
const staged = app.copiedFiles.filter(
|
|
20842
|
-
({ from, to }) => to ===
|
|
20843
|
-
).map(({ from }) =>
|
|
21358
|
+
({ from, to }) => to === import_node_path23.default.join(bundle, "GoogleService-Info.plist") && import_node_fs22.default.existsSync(from)
|
|
21359
|
+
).map(({ from }) => import_node_fs22.default.realpathSync(from));
|
|
20844
21360
|
const resources = [
|
|
20845
21361
|
.../* @__PURE__ */ new Set([
|
|
20846
21362
|
...app.resources.filter(
|
|
20847
|
-
(file) => /^GoogleService-Info\.plist$/.test(
|
|
21363
|
+
(file) => /^GoogleService-Info\.plist$/.test(import_node_path23.default.basename(file))
|
|
20848
21364
|
),
|
|
20849
21365
|
...staged
|
|
20850
21366
|
])
|
|
@@ -20853,21 +21369,21 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
20853
21369
|
throw new Error(
|
|
20854
21370
|
"native Firebase default initialization requires one GoogleService-Info.plist build resource"
|
|
20855
21371
|
);
|
|
20856
|
-
return
|
|
21372
|
+
return import_node_path23.default.relative(import_node_fs22.default.realpathSync(projectRoot), resources[0]);
|
|
20857
21373
|
}
|
|
20858
21374
|
function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], iosTarget, config = readExpoConfig(projectRoot), prepareGeneratedSources = false) {
|
|
20859
21375
|
const result = {};
|
|
20860
21376
|
const ios = config.ios;
|
|
20861
21377
|
if (platforms.includes("ios") && (!isRecord(ios) || typeof ios.googleServicesFile !== "string")) {
|
|
20862
|
-
const iosRoot =
|
|
20863
|
-
if (
|
|
20864
|
-
const projects =
|
|
21378
|
+
const iosRoot = import_node_path23.default.join(projectRoot, "ios");
|
|
21379
|
+
if (import_node_fs22.default.existsSync(iosRoot)) {
|
|
21380
|
+
const projects = import_node_fs22.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
20865
21381
|
if (projects.length > 1)
|
|
20866
21382
|
throw new Error(
|
|
20867
21383
|
`native Firebase configuration requires a selected Xcode project; set withPeach's iosTarget to an app target in one of: ${projects.map((entry) => entry.name).join(", ")}`
|
|
20868
21384
|
);
|
|
20869
21385
|
if (projects.length === 1) {
|
|
20870
|
-
const xcodeproj =
|
|
21386
|
+
const xcodeproj = import_node_path23.default.join(iosRoot, projects[0].name);
|
|
20871
21387
|
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
20872
21388
|
const bundleId = isRecord(ios) && typeof ios.bundleIdentifier === "string" ? ios.bundleIdentifier : null;
|
|
20873
21389
|
const matching = bundleId ? appTargets.filter(
|
|
@@ -20899,8 +21415,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
|
|
|
20899
21415
|
const native = config[platform];
|
|
20900
21416
|
if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
|
|
20901
21417
|
try {
|
|
20902
|
-
const source =
|
|
20903
|
-
|
|
21418
|
+
const source = import_node_fs22.default.readFileSync(
|
|
21419
|
+
import_node_path23.default.resolve(projectRoot, native.googleServicesFile),
|
|
20904
21420
|
"utf8"
|
|
20905
21421
|
);
|
|
20906
21422
|
const parsed = platform === "ios" ? parsePlistSource(source) : JSON.parse(source);
|
|
@@ -21168,7 +21684,7 @@ function withPeach(config, options = {}) {
|
|
|
21168
21684
|
const configuredBundleUrl = "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
|
|
21169
21685
|
const cfgServer = config.server;
|
|
21170
21686
|
const port = resolveMetroPort(cfgServer);
|
|
21171
|
-
const metroServerId = (0,
|
|
21687
|
+
const metroServerId = (0, import_node_crypto9.randomUUID)();
|
|
21172
21688
|
const bundleUrl = tagRnxBundleForPlugin(
|
|
21173
21689
|
configuredBundleUrl,
|
|
21174
21690
|
`http://localhost:${port}`,
|